diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..e559023b1 --- /dev/null +++ b/.clang-format @@ -0,0 +1,13 @@ +BasedOnStyle: LLVM +BreakBeforeBraces: Linux +UseTab: Never +IndentWidth: 4 +TabWidth: 4 +ColumnLimit: 0 +AccessModifierOffset: -4 +AllowShortIfStatementsOnASingleLine: Always +AlignAfterOpenBracket: DontAlign +BreakConstructorInitializers: AfterColon +NamespaceIndentation: None +IndentCaseLabels: true +SortIncludes: Never diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..fb9105078 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,40 @@ +--- +name: Bug report +about: Is something not working as it should? Please report it here. +title: '' +labels: '' +assignees: '' + +--- + + + +**Short description** + + +**Steps to reproduce** + + +**Expected behavior** + + +**Additional information** + diff --git a/.github/ISSUE_TEMPLATE/camera-support---color-calibration.md b/.github/ISSUE_TEMPLATE/camera-support---color-calibration.md new file mode 100644 index 000000000..5b787c7aa --- /dev/null +++ b/.github/ISSUE_TEMPLATE/camera-support---color-calibration.md @@ -0,0 +1,13 @@ +--- +name: Camera support / color calibration +about: Report new file formats or requests for color calibration support here +title: '' +labels: '' +assignees: '' + +--- + + diff --git a/.github/ISSUE_TEMPLATE/feature-request---enhancements.md b/.github/ISSUE_TEMPLATE/feature-request---enhancements.md new file mode 100644 index 000000000..9eccbe37c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request---enhancements.md @@ -0,0 +1,15 @@ +--- +name: Feature request / enhancements +about: Ideas and suggestions for improvement are always welcome! +title: '' +labels: '' +assignees: '' + +--- + + + + diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e483ace01..4fa09ee98 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,16 +14,16 @@ on: - created jobs: build: - runs-on: macos-10.15 + runs-on: macos-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Install dependencies run: | date -u mkdir build date +%s > build/stamp brew uninstall --ignore-dependencies libtiff - brew install libtiff gtk+3 gtkmm3 gtk-mac-integration adwaita-icon-theme libsigc++ little-cms2 libiptcdata fftw lensfun expat pkgconfig libomp shared-mime-info | tee -a depslog + brew install libtiff gtk+3 gtkmm3 gtk-mac-integration adwaita-icon-theme libsigc++@2 little-cms2 libiptcdata fftw lensfun expat pkgconfig libomp shared-mime-info | tee -a depslog date -u echo "----====Pourage====----" cat depslog | grep Pouring @@ -82,11 +82,11 @@ jobs: echo "=== artifact: ${ARTIFACT}" # defining environment variables for next step as per # https://github.com/actions/starter-workflows/issues/68 - echo "::set-env name=ARTIFACT_PATH::${GITHUB_WORKSPACE}/build/${ARTIFACT}" - echo "::set-env name=ARTIFACT_FILE::${ARTIFACT}" + echo "ARTIFACT_PATH=${GITHUB_WORKSPACE}/build/${ARTIFACT}" >> $GITHUB_ENV + echo "ARTIFACT_FILE=${ARTIFACT}" >> $GITHUB_ENV zsh -c 'echo "Bundled in $(printf "%0.2f" $(($[$(date +%s)-$(cat bundlestamp)]/$((60.))))) minutes"' exit - - uses: actions/upload-artifact@v1 + - uses: actions/upload-artifact@v2 with: name: ${{env.ARTIFACT_FILE}} path: ${{env.ARTIFACT_PATH}} diff --git a/CMakeLists.txt b/CMakeLists.txt index cffb8044c..f3630eecb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -144,6 +144,10 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=delete-incomplete") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-math-errno") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-math-errno") +# suppress warning https://github.com/Beep6581/RawTherapee/issues/6105 +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-attributes") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes") + # Special treatment for x87 and x86-32 SSE (see GitHub issue #4324) include(FindX87Math) if(HAVE_X87_MATH) @@ -456,13 +460,13 @@ if(GTK_VERSION VERSION_GREATER "3.24.1" AND GTK_VERSION VERSION_LESS "3.24.7") ) endif() -pkg_check_modules(GLIB2 REQUIRED glib-2.0>=2.44) -pkg_check_modules(GLIBMM REQUIRED glibmm-2.4>=2.44) +pkg_check_modules(GLIB2 REQUIRED glib-2.0>=2.48) +pkg_check_modules(GLIBMM REQUIRED glibmm-2.4>=2.48) pkg_check_modules(CAIROMM REQUIRED cairomm-1.0) -pkg_check_modules(GIO REQUIRED gio-2.0>=2.44) -pkg_check_modules(GIOMM REQUIRED giomm-2.4>=2.44) -pkg_check_modules(GTHREAD REQUIRED gthread-2.0>=2.44) -pkg_check_modules(GOBJECT REQUIRED gobject-2.0>=2.44) +pkg_check_modules(GIO REQUIRED gio-2.0>=2.48) +pkg_check_modules(GIOMM REQUIRED giomm-2.4>=2.48) +pkg_check_modules(GTHREAD REQUIRED gthread-2.0>=2.48) +pkg_check_modules(GOBJECT REQUIRED gobject-2.0>=2.48) pkg_check_modules(SIGC REQUIRED sigc++-2.0>=2.3.1) pkg_check_modules(LENSFUN REQUIRED lensfun>=0.2) pkg_check_modules(RSVG REQUIRED librsvg-2.0>=2.40) @@ -500,7 +504,8 @@ endif() pkg_check_modules(LCMS REQUIRED lcms2>=2.6) pkg_check_modules(EXPAT REQUIRED expat>=2.1) pkg_check_modules(FFTW3F REQUIRED fftw3f) -pkg_check_modules(TIFF REQUIRED libtiff-4>=4.0.4) +pkg_check_modules(IPTCDATA REQUIRED libiptcdata) +find_package(TIFF 4.0.4 REQUIRED) find_package(JPEG REQUIRED) find_package(PNG REQUIRED) find_package(ZLIB REQUIRED) @@ -697,7 +702,7 @@ if(WIN32) elseif(APPLE) set( ABOUT_COMMAND_WITH_ARGS - cmake + ${CMAKE_COMMAND} -DPROJECT_SOURCE_DIR:STRING=${PROJECT_SOURCE_DIR} -DCACHE_NAME_SUFFIX:STRING=${CACHE_NAME_SUFFIX} -P ${PROJECT_SOURCE_DIR}/UpdateInfo.cmake diff --git a/LICENSE.txt b/LICENSE.txt index 2ba8256ab..24b3ca2eb 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ RawTherapee - A powerful, cross-platform raw image processing program. Copyright (C) 2004-2012 Gabor Horvath - Copyright (C) 2010-2020 RawTherapee development team. + Copyright (C) 2010-2021 RawTherapee development team. RawTherapee is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/ProcessorTargets.cmake b/ProcessorTargets.cmake index aa06b29ee..b22cfc839 100644 --- a/ProcessorTargets.cmake +++ b/ProcessorTargets.cmake @@ -6,7 +6,13 @@ set(PROC_TARGET_1_FLAGS "-mtune=generic" CACHE STRING "Processor-1 flags") # This second choice should be used for your own build only set(PROC_TARGET_2_LABEL native CACHE STRING "Processor-2 label - use it for your own build") -set(PROC_TARGET_2_FLAGS "-march=native" CACHE STRING "Processor-2 flags") + +# The flag is different on x86 and Arm based processors +if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL arm64) + set(PROC_TARGET_2_FLAGS "-mcpu=native" CACHE STRING "Processor-2 flags") +else() + set(PROC_TARGET_2_FLAGS "-march=native" CACHE STRING "Processor-2 flags") +endif() # The later choices is intended to be used if you want to provide specific builds, but it should match your own processor # You can cross compile but you have to know what you're doing, this mechanism has not been designed for that diff --git a/licenses/sleef_LICENSE.txt b/licenses/sleef_LICENSE.txt new file mode 100644 index 000000000..8170d3224 --- /dev/null +++ b/licenses/sleef_LICENSE.txt @@ -0,0 +1,30 @@ +============================================================================= +Boost Software License - Version 1.0 + +This license applies to selected portions of the software derived from SLEEF +(https://sleef.org/), as noted in the applicable source file headers. +============================================================================= + +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/rtdata/dcpprofiles/Canon EOS R.dcp b/rtdata/dcpprofiles/Canon EOS R.dcp new file mode 100644 index 000000000..6ea5302e2 Binary files /dev/null and b/rtdata/dcpprofiles/Canon EOS R.dcp differ diff --git a/rtdata/dcpprofiles/Canon EOS R5.dcp b/rtdata/dcpprofiles/Canon EOS R5.dcp new file mode 100644 index 000000000..88f94620d Binary files /dev/null and b/rtdata/dcpprofiles/Canon EOS R5.dcp differ diff --git a/rtdata/dcpprofiles/Canon EOS R6.dcp b/rtdata/dcpprofiles/Canon EOS R6.dcp new file mode 100644 index 000000000..7aaa04ab2 Binary files /dev/null and b/rtdata/dcpprofiles/Canon EOS R6.dcp differ diff --git a/rtdata/dcpprofiles/Panasonic DC-S5.dcp b/rtdata/dcpprofiles/Panasonic DC-S5.dcp new file mode 100644 index 000000000..fd01c1225 Binary files /dev/null and b/rtdata/dcpprofiles/Panasonic DC-S5.dcp differ diff --git a/rtdata/iccprofiles/output/RTv2_Medium.icc b/rtdata/iccprofiles/output/RTv2_Medium.icc index ebaf4d133..930f38a71 100644 Binary files a/rtdata/iccprofiles/output/RTv2_Medium.icc and b/rtdata/iccprofiles/output/RTv2_Medium.icc differ diff --git a/rtdata/images/svg/histogram-ellipsis-small.svg b/rtdata/images/svg/histogram-ellipsis-small.svg new file mode 100644 index 000000000..4fdb17907 --- /dev/null +++ b/rtdata/images/svg/histogram-ellipsis-small.svg @@ -0,0 +1,135 @@ + + + + + + + + + + image/svg+xml + + + + + Lawrence Lee + + + + + + + + RawTherapee icon. + + + + + + + + + + + + + + + + + + + + diff --git a/rtdata/images/svg/histogram-bayer-on-small.svg b/rtdata/images/svg/histogram-type-histogram-raw-small.svg similarity index 100% rename from rtdata/images/svg/histogram-bayer-on-small.svg rename to rtdata/images/svg/histogram-type-histogram-raw-small.svg diff --git a/rtdata/images/svg/histogram-bayer-off-small.svg b/rtdata/images/svg/histogram-type-histogram-small.svg similarity index 59% rename from rtdata/images/svg/histogram-bayer-off-small.svg rename to rtdata/images/svg/histogram-type-histogram-small.svg index 5d6c439fb..1d2f6547e 100644 --- a/rtdata/images/svg/histogram-bayer-off-small.svg +++ b/rtdata/images/svg/histogram-type-histogram-small.svg @@ -1,6 +1,4 @@ - - + inkscape:version="1.0 (4035a4fb49, 2020-05-01)" + sodipodi:docname="histogram-type-histogram-small.svg"> + inkscape:snap-bbox-midpoints="false" + inkscape:document-rotation="0"> image/svg+xml - + - Maciej Dworak + Lawrence Lee @@ -100,40 +99,24 @@ inkscape:groupmode="layer" inkscape:label="Layer 1" transform="translate(0,-8)"> + + y="10" + x="2" + height="12" + width="12" + id="rect1467" + style="opacity:0.3;fill:#2a7fff;stroke-linecap:square;fill-opacity:1" /> - - - + style="opacity:1;fill:none;fill-opacity:0.3;stroke:#000000;stroke-width:0.999999;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect849" + width="13" + height="13.000001" + x="1.5" + y="9.5" /> diff --git a/rtdata/images/svg/histogram-type-parade-small.svg b/rtdata/images/svg/histogram-type-parade-small.svg new file mode 100644 index 000000000..f299f8ab2 --- /dev/null +++ b/rtdata/images/svg/histogram-type-parade-small.svg @@ -0,0 +1,132 @@ + + + + + + + + + + image/svg+xml + + + + + Lawrence Lee + + + + + + + + RawTherapee icon. + + + + + + + + + + + + + + + + + + + + diff --git a/rtdata/images/svg/histogram-type-vectorscope-hc-small.svg b/rtdata/images/svg/histogram-type-vectorscope-hc-small.svg new file mode 100644 index 000000000..ef2e8b51f --- /dev/null +++ b/rtdata/images/svg/histogram-type-vectorscope-hc-small.svg @@ -0,0 +1,131 @@ + + + + + + + + + + image/svg+xml + + + + + Lawrence Lee + + + + + + + + RawTherapee icon. + + + + + + + + + + + + + + + + + + + + diff --git a/rtdata/images/svg/histogram-type-vectorscope-hs-small.svg b/rtdata/images/svg/histogram-type-vectorscope-hs-small.svg new file mode 100644 index 000000000..62bbf9586 --- /dev/null +++ b/rtdata/images/svg/histogram-type-vectorscope-hs-small.svg @@ -0,0 +1,135 @@ + + + + + + + + + + image/svg+xml + + + + + Lawrence Lee + + + + + + + + RawTherapee icon. + + + + + + + + + + + + + + + + + + + + + diff --git a/rtdata/images/svg/histogram-type-waveform-small.svg b/rtdata/images/svg/histogram-type-waveform-small.svg new file mode 100644 index 000000000..5147ab2fc --- /dev/null +++ b/rtdata/images/svg/histogram-type-waveform-small.svg @@ -0,0 +1,122 @@ + + + + + + + + + + image/svg+xml + + + + + Lawrence Lee + + + + + + + + RawTherapee icon. + + + + + + + + + + + + + + + + + + diff --git a/rtdata/images/svg/power-off-small.svg b/rtdata/images/svg/power-off-small.svg index d04115bb9..a45e63dc5 100644 --- a/rtdata/images/svg/power-off-small.svg +++ b/rtdata/images/svg/power-off-small.svg @@ -1,6 +1,4 @@ - - + inkscape:snap-bbox-midpoints="false" + inkscape:document-rotation="0"> image/svg+xml - + Maciej Dworak @@ -100,11 +99,15 @@ inkscape:groupmode="layer" inkscape:label="Layer 1" transform="translate(0,-8)"> - + + diff --git a/rtdata/images/svg/power-on-small.svg b/rtdata/images/svg/power-on-small.svg index caaf7992d..271c8e53e 100644 --- a/rtdata/images/svg/power-on-small.svg +++ b/rtdata/images/svg/power-on-small.svg @@ -1,6 +1,4 @@ - - + inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)" + sodipodi:docname="power-on-small.svg"> + inkscape:snap-bbox-midpoints="false" + inkscape:document-rotation="0" + inkscape:snap-global="false"> + dotted="false" + visible="true" + enabled="true" /> @@ -63,7 +65,7 @@ image/svg+xml - + Maciej Dworak @@ -97,18 +99,36 @@ + transform="translate(0,-8)" + inkscape:groupmode="layer"> + style="display:none;opacity:0.75;fill:none;fill-opacity:0.752941;fill-rule:nonzero;stroke:#2a7fff;stroke-width:2.9;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal" + d="M 11.503774,13.128228 A 5,5 0 0 1 13,16.695239 v 0 a 5,5 0 0 1 -5,5 5,5 0 0 1 -5,-5 5,5 0 0 1 1.499601,-3.570323" + id="path5608-3" + inkscape:connector-curvature="0" + inkscape:label="bottom round glow" /> + id="path2553-6" + inkscape:connector-curvature="0" + inkscape:label="bottom straight glow" /> + + + diff --git a/rtdata/languages/Chinese (Simplified) b/rtdata/languages/Chinese (Simplified) index 61cbd58ac..9e2990aa1 100644 --- a/rtdata/languages/Chinese (Simplified) +++ b/rtdata/languages/Chinese (Simplified) @@ -4,25 +4,33 @@ #03 2013-10-20 Jiero #04 2014-10-24 Jie Luo #05 2017-09-18 Chongnuo Ji +#06 2020-08-11 十一元人民币 ABOUT_TAB_BUILD;版本 -ABOUT_TAB_CREDITS;感谢 +ABOUT_TAB_CREDITS;致谢名单 ABOUT_TAB_LICENSE;授权协议 ABOUT_TAB_RELEASENOTES;发布说明 ABOUT_TAB_SPLASH;启动页 +ADJUSTER_RESET_TO_DEFAULT;单击-恢复默认值\nCtrl+单击-恢复初始值 BATCH_PROCESSING;批量处理 +CURVEEDITOR_AXIS_IN;I: +CURVEEDITOR_AXIS_LEFT_TAN;LT: +CURVEEDITOR_AXIS_OUT;O: +CURVEEDITOR_AXIS_RIGHT_TAN;RT: +CURVEEDITOR_CATMULLROM;灵活 CURVEEDITOR_CURVE;曲线 CURVEEDITOR_CURVES;曲线 CURVEEDITOR_CUSTOM;自定义 CURVEEDITOR_DARKS;暗 -CURVEEDITOR_HIGHLIGHTS;高亮 +CURVEEDITOR_EDITPOINT_HINT;启用对于节点进/出值的编辑\n\n右击节点以选中\n右击空白处以取消选中节点 +CURVEEDITOR_HIGHLIGHTS;高光 CURVEEDITOR_LIGHTS;光 CURVEEDITOR_LINEAR;线性 -CURVEEDITOR_LOADDLGLABEL;正读取曲线... +CURVEEDITOR_LOADDLGLABEL;加载曲线... CURVEEDITOR_MINMAXCPOINTS;均衡器 CURVEEDITOR_NURBS;控制点 CURVEEDITOR_PARAMETRIC;参数 -CURVEEDITOR_SAVEDLGLABEL;正保存曲线... +CURVEEDITOR_SAVEDLGLABEL;保存曲线... CURVEEDITOR_SHADOWS;阴影 CURVEEDITOR_TOOLTIPCOPY;复制当前曲线到剪贴板 CURVEEDITOR_TOOLTIPLINEAR;重置曲线 @@ -35,18 +43,25 @@ DONT_SHOW_AGAIN;不再显示该信息 DYNPROFILEEDITOR_DELETE;删除 DYNPROFILEEDITOR_EDIT;编辑 DYNPROFILEEDITOR_EDIT_RULE;编辑动态配置规则 -DYNPROFILEEDITOR_ENTRY_TOOLTIP;该项匹配不区分大小写 \n使用 "re:" 前缀来输入 \na 正则式 +DYNPROFILEEDITOR_ENTRY_TOOLTIP;该项匹配不区分大小写\n使用 "re:" 前缀来输入\n一个正则式 +DYNPROFILEEDITOR_IMGTYPE_ANY;任意 +DYNPROFILEEDITOR_IMGTYPE_HDR;HDR +DYNPROFILEEDITOR_IMGTYPE_PS;像素偏移 +DYNPROFILEEDITOR_IMGTYPE_STD;标准 DYNPROFILEEDITOR_MOVE_DOWN;下移 DYNPROFILEEDITOR_MOVE_UP;上移 DYNPROFILEEDITOR_NEW;新建 DYNPROFILEEDITOR_NEW_RULE;新建动态配置规则 DYNPROFILEEDITOR_PROFILE;处理配置规则 EDITWINDOW_TITLE;图片修改 +EDIT_OBJECT_TOOLTIP;在预览窗口中展示一个允许你调整本工具的可视窗口。 +EDIT_PIPETTE_TOOLTIP;要向曲线添加调整点,点击此按钮,按住Ctrl键并用鼠标左键点击图像预览中你想调整的地方。\n要调整点的位置,按住Ctrl键并用鼠标左键点击图像预览中的对应位置,然后松开Ctrl(除非你希望精调)同时按住鼠标左键,将鼠标向上/下移动以上下调整曲线中的点。 EXIFFILTER_APERTURE;光圈 EXIFFILTER_CAMERA;相机 EXIFFILTER_EXPOSURECOMPENSATION;曝光补偿值 (EV) EXIFFILTER_FILETYPE;文件类型 EXIFFILTER_FOCALLEN;焦距 +EXIFFILTER_IMAGETYPE;图像类型 EXIFFILTER_ISO;感光度 EXIFFILTER_LENS;镜头 EXIFFILTER_METADATAFILTER;启用元数据过滤器 @@ -64,121 +79,157 @@ EXIFPANEL_RESET;重置 EXIFPANEL_RESETALL;全部重置 EXIFPANEL_RESETALLHINT;重置所有标签内容 EXIFPANEL_RESETHINT;重置所选标签内容 +EXIFPANEL_SHOWALL;显示所有 EXIFPANEL_SUBDIRECTORY;子文件夹 -EXPORT_BYPASS_ALL;(取消)选择全部 -EXPORT_BYPASS_DEFRINGE;不应用去边处理 -EXPORT_BYPASS_DIRPYRDENOISE;不应用降噪处理 -EXPORT_BYPASS_DIRPYREQUALIZER;不应用分频反差调整 -EXPORT_BYPASS_EQUALIZER;不应用小波变换级别处理 -EXPORT_BYPASS_RAW_CA;不应用 [raw] 色差矫正 -EXPORT_BYPASS_RAW_CCSTEPS;不应用 [raw] 摩尔纹控制 -EXPORT_BYPASS_RAW_DF;不应用 [raw] 暗场处理 -EXPORT_BYPASS_RAW_FF;不应用 [raw] 平场 -EXPORT_BYPASS_RAW_GREENTHRESH;不应用 [raw] 绿色偏纠正 -EXPORT_BYPASS_RAW_LINENOISE;不应用 [raw] 线噪过滤 -EXPORT_BYPASS_SHARPENEDGE;不应用边缘锐化 -EXPORT_BYPASS_SHARPENING;不应用锐化 -EXPORT_BYPASS_SHARPENMICRO;不应用微反差调节 +EXPORT_BYPASS;要跳过的处理步骤 +EXPORT_BYPASS_ALL;选择/取消选择全部选项 +EXPORT_BYPASS_DEFRINGE;跳过去除色边处理 +EXPORT_BYPASS_DIRPYRDENOISE;跳过降噪处理 +EXPORT_BYPASS_DIRPYREQUALIZER;跳过分频反差调整 +EXPORT_BYPASS_EQUALIZER;跳过小波层级处理 +EXPORT_BYPASS_RAW_CA;跳过 [raw] 色差矫正 +EXPORT_BYPASS_RAW_CCSTEPS;跳过 [raw] 伪色抑制 +EXPORT_BYPASS_RAW_DCB_ENHANCE;跳过 [raw] DCB优化步长 +EXPORT_BYPASS_RAW_DCB_ITERATIONS;跳过 [raw] DCB迭代 +EXPORT_BYPASS_RAW_DF;跳过 [raw] 暗场处理 +EXPORT_BYPASS_RAW_FF;跳过 [raw] 平场 +EXPORT_BYPASS_RAW_GREENTHRESH;跳过 [raw] 绿平衡 +EXPORT_BYPASS_RAW_LINENOISE;跳过 [raw] 线状噪点过滤 +EXPORT_BYPASS_RAW_LMMSE_ITERATIONS;跳过 [raw] LMMSE优化步长 +EXPORT_BYPASS_SHARPENEDGE;跳过边缘锐化 +EXPORT_BYPASS_SHARPENING;跳过锐化 +EXPORT_BYPASS_SHARPENMICRO;跳过微反差调节 EXPORT_FASTEXPORTOPTIONS;快速导出选项 -EXPORT_MAXHEIGHT;最大高度 -EXPORT_MAXWIDTH;最大宽度 -EXPORT_PUTTOQUEUEFAST; 放入快速导出序列 -EXPORT_RAW_DMETHOD;反拜尔算法 +EXPORT_INSTRUCTIONS;快速导出选项提供跳过占用资源和时间的处理步骤的选项,并使用快速导出设定来进行队列处理。\n此方法推荐在优先追求速度,生成低分辨率图片时使用,或是调整尺寸的输出大小适合你想输出的图片,你又不想修改这些照片的后期处理设定时使用。 +EXPORT_MAXHEIGHT;最大高度: +EXPORT_MAXWIDTH;最大宽度: +EXPORT_PIPELINE;输出流水线 +EXPORT_PUTTOQUEUEFAST; 放入快速导出队列 +EXPORT_RAW_DMETHOD;去马赛克算法 +EXPORT_USE_FAST_PIPELINE;专门(对缩放大小的图片应用全部处理) +EXPORT_USE_FAST_PIPELINE_TIP;使用专门的处理流水线来对图片进行处理,以牺牲质量来换取速度。对图片的缩放会尽早进行,而非在正常流水线中那样在最后进行。这能够大幅提升速度,但是用户可能会在输出的图片中看到杂点和较低的总体质量。 +EXPORT_USE_NORMAL_PIPELINE;标准(跳过某些步骤,并在最后缩放图片) EXTPROGTARGET_1;raw EXTPROGTARGET_2;队列已处理 FILEBROWSER_APPLYPROFILE;应用配置 -FILEBROWSER_APPLYPROFILE_PARTIAL;应用 - 局部 +FILEBROWSER_APPLYPROFILE_PARTIAL;部分应用配置 FILEBROWSER_AUTODARKFRAME;自动暗场 FILEBROWSER_AUTOFLATFIELD;自动平场 +FILEBROWSER_BROWSEPATHBUTTONHINT;点击以打开路径,刷新文件夹并搜索“查找”框中的关键词 +FILEBROWSER_BROWSEPATHHINT;输入你想前往的路径。\n\n快捷键:\nCtrl-o 让文本框获得焦点\nEnter / Ctrl-Enter 前往输入的目录\nEsc 清除改动\nShift-Esc 让文本框失去焦点\n\n路径快捷键:\n~ - 用户的home/文档路径\n! - 用户的图片路径 FILEBROWSER_CACHE;缓存 -FILEBROWSER_CLEARPROFILE;清空配置 -FILEBROWSER_COPYPROFILE;复制配置 +FILEBROWSER_CACHECLEARFROMFULL;清除全部,包括缓存文件 +FILEBROWSER_CACHECLEARFROMPARTIAL;清除全部,不包括缓存文件 +FILEBROWSER_CLEARPROFILE;清空 +FILEBROWSER_COLORLABEL_TOOLTIP;颜色标记,\n\n使用下拉菜单或快捷键:\nShift-Ctrl-0 无颜色\nShift-Ctrl-1 红\nShift-Ctrl-2 黄\nShift-Ctrl-3 绿\nShift-Ctrl-4 蓝\nShift-Ctrl-5 紫 +FILEBROWSER_COPYPROFILE;复制 FILEBROWSER_CURRENT_NAME;当前名称: FILEBROWSER_DARKFRAME;暗场 -FILEBROWSER_DELETEDIALOG_HEADER;确认删除 +FILEBROWSER_DELETEDIALOG_ALL;你确定要永久删除%1个垃圾桶中的文件吗? +FILEBROWSER_DELETEDIALOG_HEADER;删除确认 +FILEBROWSER_DELETEDIALOG_SELECTED;你希望永久删除%1个被选中的文件吗? +FILEBROWSER_DELETEDIALOG_SELECTEDINCLPROC;你希望永久删除%1个被选中的文件,包括已进行过队列处理的版本吗? FILEBROWSER_EMPTYTRASH;清空垃圾箱 -FILEBROWSER_EXTPROGMENU;调用程序... +FILEBROWSER_EMPTYTRASHHINT;永久删除垃圾桶的所有文件 +FILEBROWSER_EXTPROGMENU;打开方式 FILEBROWSER_FLATFIELD;平场 FILEBROWSER_MOVETODARKFDIR;移动到暗场路径 FILEBROWSER_MOVETOFLATFIELDDIR;移动到平场路径 FILEBROWSER_NEW_NAME;新名称: -FILEBROWSER_OPENDEFAULTVIEWER;Windows 默认阅览工具 (序列) +FILEBROWSER_OPENDEFAULTVIEWER;Windows默认阅览工具(队列) FILEBROWSER_PARTIALPASTEPROFILE;选择性粘贴 -FILEBROWSER_PASTEPROFILE;粘贴配置 +FILEBROWSER_PASTEPROFILE;粘贴 FILEBROWSER_POPUPCANCELJOB;取消任务 -FILEBROWSER_POPUPCOLORLABEL;彩色标帖 -FILEBROWSER_POPUPCOLORLABEL0;Label: 无 -FILEBROWSER_POPUPCOLORLABEL1;Label: 红 -FILEBROWSER_POPUPCOLORLABEL2;Label: 黄 -FILEBROWSER_POPUPCOLORLABEL3;Label: 绿 -FILEBROWSER_POPUPCOLORLABEL4;Label: 蓝 -FILEBROWSER_POPUPCOLORLABEL5;Label: 紫 +FILEBROWSER_POPUPCOLORLABEL;色彩标签 +FILEBROWSER_POPUPCOLORLABEL0;标签:无 +FILEBROWSER_POPUPCOLORLABEL1;标签:红 +FILEBROWSER_POPUPCOLORLABEL2;标签:黄 +FILEBROWSER_POPUPCOLORLABEL3;标签:绿 +FILEBROWSER_POPUPCOLORLABEL4;标签:蓝 +FILEBROWSER_POPUPCOLORLABEL5;标签:紫 FILEBROWSER_POPUPCOPYTO;复制至... FILEBROWSER_POPUPFILEOPERATIONS;文件操作 FILEBROWSER_POPUPMOVEEND;移动到队列尾部 FILEBROWSER_POPUPMOVEHEAD;移动到队列头部 FILEBROWSER_POPUPMOVETO;移动至... FILEBROWSER_POPUPOPEN;打开 -FILEBROWSER_POPUPOPENINEDITOR;打开在编辑器 +FILEBROWSER_POPUPOPENINEDITOR;在编辑器中打开 FILEBROWSER_POPUPPROCESS;放入队列 -FILEBROWSER_POPUPPROCESSFAST;放入序列(快速导出) -FILEBROWSER_POPUPPROFILEOPERATIONS;处理色彩档案 -FILEBROWSER_POPUPRANK;评分 -FILEBROWSER_POPUPRANK0;去评分 -FILEBROWSER_POPUPRANK1;评 1 星 -FILEBROWSER_POPUPRANK2;评 2 星 -FILEBROWSER_POPUPRANK3;评 3 星 -FILEBROWSER_POPUPRANK4;评 4 星 -FILEBROWSER_POPUPRANK5;评 5 星 +FILEBROWSER_POPUPPROCESSFAST;放入队列(快速导出) +FILEBROWSER_POPUPPROFILEOPERATIONS;后期档案操作 +FILEBROWSER_POPUPRANK;评级 +FILEBROWSER_POPUPRANK0;取消评级 +FILEBROWSER_POPUPRANK1;评1星 +FILEBROWSER_POPUPRANK2;评2星 +FILEBROWSER_POPUPRANK3;评3星 +FILEBROWSER_POPUPRANK4;评4星 +FILEBROWSER_POPUPRANK5;评5星 +FILEBROWSER_POPUPREMOVE;永久删除 +FILEBROWSER_POPUPREMOVEINCLPROC;永久删除,包括队列处理的版本 FILEBROWSER_POPUPRENAME;重命名 FILEBROWSER_POPUPSELECTALL;全部选中 FILEBROWSER_POPUPTRASH;移动到垃圾箱 FILEBROWSER_POPUPUNRANK;取消星级 FILEBROWSER_POPUPUNTRASH;从垃圾箱中移除 -FILEBROWSER_QUERYBUTTONHINT;清除搜索序列 +FILEBROWSER_QUERYBUTTONHINT;清除搜索队列 +FILEBROWSER_QUERYHINT;输入文件名进行搜索。支持不完整文件名。使用英文逗号分割关键词,例:\n1001,1004,1199\n\n在关键词前面加入!=以排除此关键词,例:\n!=1001,1004,1199\n\n快捷键:\nCtrl-f-让搜索框获得焦点,\nEnter-搜索,\nEsc-清空搜索框,\nShift-Esc-让搜索框失去焦点 FILEBROWSER_QUERYLABEL; 查找: -FILEBROWSER_RANK1_TOOLTIP;评分 1 *\n快捷键:Shift-1 -FILEBROWSER_RANK2_TOOLTIP;评分 2 *\n快捷键:Shift-2 -FILEBROWSER_RANK3_TOOLTIP;评分 3 *\n快捷键:Shift-3 -FILEBROWSER_RANK4_TOOLTIP;评分 4 *\n快捷键:Shift-4 -FILEBROWSER_RANK5_TOOLTIP;评分 5 *\n快捷键:Shift-5 +FILEBROWSER_RANK1_TOOLTIP;评1星\n快捷键:Shift-1 +FILEBROWSER_RANK2_TOOLTIP;评2星\n快捷键:Shift-2 +FILEBROWSER_RANK3_TOOLTIP;评3星\n快捷键:Shift-3 +FILEBROWSER_RANK4_TOOLTIP;评4星\n快捷键:Shift-4 +FILEBROWSER_RANK5_TOOLTIP;评5星\n快捷键:Shift-5 FILEBROWSER_RENAMEDLGLABEL;文件重命名 FILEBROWSER_RESETDEFAULTPROFILE;还原到默认 -FILEBROWSER_SELECTDARKFRAME;选择暗场... -FILEBROWSER_SELECTFLATFIELD;选择平场…… +FILEBROWSER_SELECTDARKFRAME;选择暗场… +FILEBROWSER_SELECTFLATFIELD;选择平场… +FILEBROWSER_SHOWCOLORLABEL1HINT;显示被标记为红色的照片\n快捷键:Alt-1 +FILEBROWSER_SHOWCOLORLABEL2HINT;显示被标记为黄色的照片\n快捷键:Alt-2 +FILEBROWSER_SHOWCOLORLABEL3HINT;显示被标记为绿色的照片\n快捷键:Alt-3 +FILEBROWSER_SHOWCOLORLABEL4HINT;显示被标记为蓝色的照片\n快捷键:Alt-4 +FILEBROWSER_SHOWCOLORLABEL5HINT;显示被标记为紫色的照片\n快捷键:Alt-5 FILEBROWSER_SHOWDIRHINT;显示文件夹中所有图片 -FILEBROWSER_SHOWEXIFINFO;显示Exif 信息\n\n快捷:\ni - 多编辑标签页模式, \nAlt-i - 单编辑标签模式 +FILEBROWSER_SHOWEDITEDHINT;显示已编辑的照片\n快捷键:7 +FILEBROWSER_SHOWEDITEDNOTHINT;显示未编辑的照片\n快捷键:6 +FILEBROWSER_SHOWEXIFINFO;显示Exif信息\n\n快捷键:\ni - 多编辑标签页模式, \nAlt-i - 单编辑标签模式 +FILEBROWSER_SHOWNOTTRASHHINT;仅显示未进入垃圾箱的照片 +FILEBROWSER_SHOWORIGINALHINT;仅显示原图\n\n当多张文件名相同,但扩展名不同的图片存在时,在参数设置-文件浏览器-已知扩展名列表中,扩展名排得更靠上的图片会被当作这些图片的原图。 FILEBROWSER_SHOWRANK1HINT;显示1星图片 FILEBROWSER_SHOWRANK2HINT;显示2星图片 FILEBROWSER_SHOWRANK3HINT;显示3星图片 FILEBROWSER_SHOWRANK4HINT;显示4星图片 FILEBROWSER_SHOWRANK5HINT;显示5星图片 -FILEBROWSER_SHOWRECENTLYSAVEDHINT;显示保存的图片\n快捷: Alt-7 +FILEBROWSER_SHOWRECENTLYSAVEDHINT;显示保存的图片\n快捷键:Alt-7 +FILEBROWSER_SHOWRECENTLYSAVEDNOTHINT;显示未保存的图片\n快捷键:Alt-6 FILEBROWSER_SHOWTRASHHINT;显示垃圾箱内容 +FILEBROWSER_SHOWUNCOLORHINT;显示没有颜色标记的照片\n快捷键:Alt-0 FILEBROWSER_SHOWUNRANKHINT;显示未评星图片 FILEBROWSER_THUMBSIZE;缩略图大小 +FILEBROWSER_UNRANK_TOOLTIP;未评级\n快捷键:Shift-0 FILEBROWSER_ZOOMINHINT;增大缩略图 -FILEBROWSER_ZOOMOUTHINT;减小缩略图 +FILEBROWSER_ZOOMOUTHINT;缩小缩略图 FILECHOOSER_FILTER_ANY;所有文件 FILECHOOSER_FILTER_COLPROF;色彩配置文件 FILECHOOSER_FILTER_CURVE;曲线文件 FILECHOOSER_FILTER_LCP;镜头矫正配置文件 FILECHOOSER_FILTER_PP;处理预设文件 FILECHOOSER_FILTER_SAME;与当前照片格式相同 -FILECHOOSER_FILTER_TIFF;TIFF 文件 +FILECHOOSER_FILTER_TIFF;TIFF文件 GENERAL_ABOUT;关于 -GENERAL_AFTER;之后 +GENERAL_AFTER;处理后 GENERAL_APPLY;应用 GENERAL_ASIMAGE;跟随图像 GENERAL_AUTO;自动 -GENERAL_BEFORE;之前 +GENERAL_BEFORE;处理前 GENERAL_CANCEL;取消 GENERAL_CLOSE;关闭 +GENERAL_CURRENT;当前 GENERAL_DISABLE;禁用 GENERAL_DISABLED;禁用 GENERAL_ENABLE;启用 GENERAL_ENABLED;开启 GENERAL_FILE;文件 +GENERAL_HELP;帮助 GENERAL_LANDSCAPE;横向 GENERAL_NA;不适用 GENERAL_NO;否 @@ -186,137 +237,330 @@ GENERAL_NONE;无 GENERAL_OK;确定 GENERAL_OPEN;打开 GENERAL_PORTRAIT;纵向 +GENERAL_RESET;重置 GENERAL_SAVE;保存 -GENERAL_UNCHANGED;(未改变) +GENERAL_SLIDER;滑条 +GENERAL_UNCHANGED;(不改变) GENERAL_WARNING;警告 +GIMP_PLUGIN_INFO;欢迎使用RawTherapee的GIMP插件!\n当你完成编辑后,关闭RawTherapee主窗口,图片就会被自动导入到GIMP中 HISTOGRAM_TOOLTIP_B;显示/隐藏 蓝色直方图 +HISTOGRAM_TOOLTIP_BAR;显示/隐藏RGB指示条 +HISTOGRAM_TOOLTIP_CHRO;显示/隐藏色度直方图 HISTOGRAM_TOOLTIP_G;显示/隐藏 绿色直方图 HISTOGRAM_TOOLTIP_L;显示/隐藏 CIELAB 亮度直方图 +HISTOGRAM_TOOLTIP_MODE;将直方图显示模式切换为线性/对数线性/双对数 HISTOGRAM_TOOLTIP_R;显示/隐藏 红色直方图 +HISTOGRAM_TOOLTIP_RAW;显示/隐藏Raw直方图 HISTORY_CHANGED;已更改 HISTORY_CUSTOMCURVE;自定义曲线 HISTORY_FROMCLIPBOARD;从剪贴板 HISTORY_LABEL;历史 -HISTORY_MSG_1;图片加载完 -HISTORY_MSG_2;配置加载完 +HISTORY_MSG_1;图片加载完成 +HISTORY_MSG_2;配置加载完成 HISTORY_MSG_3;配置改变 HISTORY_MSG_4;历史浏览 -HISTORY_MSG_5;亮度 -HISTORY_MSG_6;对比度 -HISTORY_MSG_7;黑点 -HISTORY_MSG_8;曝光补偿 -HISTORY_MSG_9;高光压缩 -HISTORY_MSG_10;阴影压缩 -HISTORY_MSG_11;影调曲线 -HISTORY_MSG_12;自动曝光 -HISTORY_MSG_13;曝光溢出 -HISTORY_MSG_14;亮度亮度 -HISTORY_MSG_15;亮度对比度 -HISTORY_MSG_16;亮度黑 +HISTORY_MSG_5;曝光-光亮度 +HISTORY_MSG_6;曝光-对比度 +HISTORY_MSG_7;曝光-暗部 +HISTORY_MSG_8;曝光-曝光补偿 +HISTORY_MSG_9;曝光-高光压缩 +HISTORY_MSG_10;曝光-阴影压缩 +HISTORY_MSG_11;曝光-色调曲线1 +HISTORY_MSG_12;曝光-自动曝光 +HISTORY_MSG_13;曝光-溢出 +HISTORY_MSG_14;L*a*b*-明度 +HISTORY_MSG_15;L*a*b*-对比度 +HISTORY_MSG_16;L*a*b*-黑 HISTORY_MSG_17;亮度高光压缩 HISTORY_MSG_18;亮度阴影压缩 -HISTORY_MSG_19;亮度曲线 +HISTORY_MSG_19;L*a*b*-L*曲线 HISTORY_MSG_20;锐化 -HISTORY_MSG_21;锐化半径 -HISTORY_MSG_22;锐化程度 -HISTORY_MSG_23;锐化阈值 -HISTORY_MSG_24;仅锐化边缘 -HISTORY_MSG_25;锐化边缘半径 -HISTORY_MSG_26;锐化边缘容差 -HISTORY_MSG_27;锐化光晕控制 -HISTORY_MSG_28;光晕控制量 -HISTORY_MSG_29;锐化方式 -HISTORY_MSG_30;重叠半径 -HISTORY_MSG_31;重叠程度 -HISTORY_MSG_32;重叠衰减 -HISTORY_MSG_33;重叠次数 -HISTORY_MSG_34;避免色彩溢出 -HISTORY_MSG_35;饱和度限制器 -HISTORY_MSG_36;饱和度限制 -HISTORY_MSG_37;色彩增强 -HISTORY_MSG_38;拍平衡方式 -HISTORY_MSG_39;色温 -HISTORY_MSG_40;白平衡微调 -HISTORY_MSG_41;色彩偏移 "A" -HISTORY_MSG_42;色彩偏移 "B" -HISTORY_MSG_43;亮度降噪 -HISTORY_MSG_44;亮度降噪半径 -HISTORY_MSG_45;亮度降噪边缘容差 -HISTORY_MSG_46;色彩降噪 -HISTORY_MSG_47;色彩降噪半径 -HISTORY_MSG_48;色彩降噪边缘容差 -HISTORY_MSG_49;色彩降噪边缘敏感度 +HISTORY_MSG_21;USM锐化-半径 +HISTORY_MSG_22;USM锐化-数量 +HISTORY_MSG_23;USM锐化-阈值 +HISTORY_MSG_24;USM锐化-仅锐化边缘 +HISTORY_MSG_25;USM锐化-边缘检测半径 +HISTORY_MSG_26;USM锐化-边缘容差 +HISTORY_MSG_27;USM锐化-光晕控制 +HISTORY_MSG_28;USM锐化-光晕控制数量 +HISTORY_MSG_29;锐化-方法 +HISTORY_MSG_30;RLD-半径 +HISTORY_MSG_31;RLD-数量 +HISTORY_MSG_32;RLD-衰减 +HISTORY_MSG_33;RLD-迭代 +HISTORY_MSG_34;镜头矫正-畸变 +HISTORY_MSG_35;镜头矫正-暗角 +HISTORY_MSG_36;镜头矫正-色差 +HISTORY_MSG_37;曝光-自动曝光 +HISTORY_MSG_38;白平衡-方法 +HISTORY_MSG_39;白平衡-色温 +HISTORY_MSG_40;白平衡-色相 +HISTORY_MSG_41;曝光-色调曲线1模式 +HISTORY_MSG_42;曝光-色调曲线2 +HISTORY_MSG_43;曝光-色调曲线2模式 +HISTORY_MSG_44;亮度降噪-半径 +HISTORY_MSG_45;亮度降噪-边缘容差 +HISTORY_MSG_46;色度降噪 +HISTORY_MSG_47;色度降噪-半径 +HISTORY_MSG_48;色度降噪-边缘容差 +HISTORY_MSG_49;色度降噪-边缘敏感度 HISTORY_MSG_50;阴影/高光工具 -HISTORY_MSG_51;高光增强 -HISTORY_MSG_52;阴影增强 -HISTORY_MSG_53;高光色度范围 -HISTORY_MSG_54;阴影色度范围 -HISTORY_MSG_55;局部对比度 -HISTORY_MSG_56;阴影/高光半径 +HISTORY_MSG_51;阴影/高光-高光增强 +HISTORY_MSG_52;阴影/高光-阴影增强 +HISTORY_MSG_53;阴影/高光-高光色调宽度 +HISTORY_MSG_54;阴影/高光-阴影色调宽度 +HISTORY_MSG_55;阴影/高光-局部对比度 +HISTORY_MSG_56;阴影/高光-半径 HISTORY_MSG_57;粗略旋转 HISTORY_MSG_58;水平翻转 -HISTORY_MSG_59;竖直翻转 +HISTORY_MSG_59;垂直翻转 HISTORY_MSG_60;旋转 -HISTORY_MSG_61;旋转 -HISTORY_MSG_62;镜头失真矫正 -HISTORY_MSG_63;设置书签 -HISTORY_MSG_64;剪切图片 -HISTORY_MSG_65;色散矫正 -HISTORY_MSG_66;高光还原 -HISTORY_MSG_67;高光还原程度 -HISTORY_MSG_68;高光还原方式 +HISTORY_MSG_61;自动填充 +HISTORY_MSG_62;镜头畸变矫正 +HISTORY_MSG_63;选择快照 +HISTORY_MSG_64;裁剪 +HISTORY_MSG_65;色差矫正 +HISTORY_MSG_66;曝光-高光还原 +HISTORY_MSG_67;曝光-高光还原数量 +HISTORY_MSG_68;曝光-高光还原方法 HISTORY_MSG_69;工作色彩空间 HISTORY_MSG_70;输出色彩空间 HISTORY_MSG_71;输入色彩空间 HISTORY_MSG_72;暗角矫正 HISTORY_MSG_73;通道混合器 -HISTORY_MSG_74;调整大小比例 -HISTORY_MSG_75;调整大小方式 +HISTORY_MSG_74;调整大小-比例 +HISTORY_MSG_75;调整大小-方法 HISTORY_MSG_76;Exif元数据 HISTORY_MSG_77;IPTC元数据 HISTORY_MSG_78;调整大小数据 -HISTORY_MSG_79;调整宽度 -HISTORY_MSG_80;调整高度 -HISTORY_MSG_81;调整尺寸开启 -HISTORY_MSG_83;S/H - 锐度蒙板 +HISTORY_MSG_79;调整大小-宽度 +HISTORY_MSG_80;调整大小-高度 +HISTORY_MSG_81;调整大小 +HISTORY_MSG_82;档案修改 +HISTORY_MSG_83;阴影/高光-锐度蒙板 HISTORY_MSG_84;视角矫正 -HISTORY_MSG_85;LCP +HISTORY_MSG_85;镜头矫正-LCP档案 +HISTORY_MSG_86;RGB曲线-色度模式 +HISTORY_MSG_87;脉冲噪声降低 +HISTORY_MSG_88;脉冲降噪阈值 HISTORY_MSG_89;降噪 -HISTORY_MSG_90;降噪 - 亮度 -HISTORY_MSG_92;降噪 - 伽马 -HISTORY_MSG_103;HSV - 数值 -HISTORY_MSG_111;Lab - 避免色彩偏移 -HISTORY_MSG_113;Lab - 保护 +HISTORY_MSG_90;降噪-亮度 +HISTORY_MSG_91;降噪-色度主控 +HISTORY_MSG_92;降噪-伽马 +HISTORY_MSG_93;CbDL-数值 +HISTORY_MSG_94;分频反差调整(CbDL) +HISTORY_MSG_95;L*a*b*-色度 +HISTORY_MSG_96;L*a*b*-a* 曲线 +HISTORY_MSG_97;L*a*b*-b* 曲线 +HISTORY_MSG_98;去马赛克方法 +HISTORY_MSG_99;热像素过滤器 +HISTORY_MSG_100;曝光-饱和度 +HISTORY_MSG_101;HSV-色度(Hue) +HISTORY_MSG_102;HSV-饱和度(Saturation) +HISTORY_MSG_103;HSV-数值 +HISTORY_MSG_104;HSV均衡器 +HISTORY_MSG_105;去除色边 +HISTORY_MSG_106;去除色边-半径 +HISTORY_MSG_107;去除色边-阈值 +HISTORY_MSG_108;曝光-高光压缩阈值 +HISTORY_MSG_109;调整大小-边界限制网格 +HISTORY_MSG_110;调整大小-应用到 +HISTORY_MSG_111;Lab-避免色彩偏移 +HISTORY_MSG_113;Lab-保护 HISTORY_MSG_114;DCB 迭代 -HISTORY_MSG_119;线性消噪 -HISTORY_MSG_122;自动暗幅 -HISTORY_MSG_123;暗幅文件 +HISTORY_MSG_115;伪色抑制 +HISTORY_MSG_116;DCB增强 +HISTORY_MSG_117;Raw色差矫正-红 +HISTORY_MSG_118;Raw色差矫正-蓝 +HISTORY_MSG_119;线状噪点过滤器 +HISTORY_MSG_120;绿平衡 +HISTORY_MSG_121;Raw色差矫正-自动 +HISTORY_MSG_122;自动暗场 +HISTORY_MSG_123;暗场文件 HISTORY_MSG_124;线性曝光修正 HISTORY_MSG_126;平场文件 HISTORY_MSG_127;平场自动选择 HISTORY_MSG_128;平场模糊半径 HISTORY_MSG_129;平场模糊类型 HISTORY_MSG_130;自动扭曲纠正 +HISTORY_MSG_131;降噪-亮度 +HISTORY_MSG_132;降噪-色度 +HISTORY_MSG_142;边缘锐化-迭代 +HISTORY_MSG_143;边缘锐化-数量 +HISTORY_MSG_144;微反差-数量 +HISTORY_MSG_145;微反差-均匀度 HISTORY_MSG_146;边缘锐化 -HISTORY_MSG_147;边缘锐化 - 单纯亮度 -HISTORY_MSG_155;Vib - 避免色彩偏移 +HISTORY_MSG_147;边缘锐化-仅亮度 +HISTORY_MSG_148;微反差 +HISTORY_MSG_149;微反差-3×3阵列 +HISTORY_MSG_155;Vib-避免色彩偏移 HISTORY_MSG_158;力度 HISTORY_MSG_159;边缘停止 HISTORY_MSG_160;拉伸 HISTORY_MSG_162;色调映射 +HISTORY_MSG_163;RGB曲线-红 +HISTORY_MSG_164;RGB曲线-绿 +HISTORY_MSG_165;RGB曲线-蓝 +HISTORY_MSG_166;曝光-重置 +HISTORY_MSG_167;去马赛克方法 +HISTORY_MSG_168;L*a*b*-CC曲线 +HISTORY_MSG_169;L*a*b*-CH曲线 +HISTORY_MSG_170;Vibrance-HH曲线 +HISTORY_MSG_171;L*a*b*-LC曲线 +HISTORY_MSG_172;L*a*b*-限制LC +HISTORY_MSG_173;降噪-细节恢复 HISTORY_MSG_174;CIECAM02 -HISTORY_MSG_183;CAM02 - 对比度 (J) -HISTORY_MSG_210;渐变 - 角度 +HISTORY_MSG_180;CAM02-亮度 (J) +HISTORY_MSG_181;CAM02-色度 (C) +HISTORY_MSG_183;CAM02-对比度 (J) +HISTORY_MSG_186;CAM02-算法 +HISTORY_MSG_187;CAM02-红色/肤色保护 +HISTORY_MSG_188;CAM02-亮度 (Q) +HISTORY_MSG_189;CAM02-对比度 (Q) +HISTORY_MSG_190;CAM02-饱和度 (S) +HISTORY_MSG_191;CAM02-色彩丰富度 (M) +HISTORY_MSG_192;CAM02-色度 (h) +HISTORY_MSG_193;CAM02-色调曲线1 +HISTORY_MSG_194;CAM02-色调曲线2 +HISTORY_MSG_195;CAM02-色调曲线1 +HISTORY_MSG_196;CAM02-色调曲线2 +HISTORY_MSG_200;CAM02-色调映射 +HISTORY_MSG_201;降噪-色度-红&绿 +HISTORY_MSG_202;降噪-色度-蓝&黄 +HISTORY_MSG_203;降噪-色彩空间 +HISTORY_MSG_204;LMMSE优化步长 +HISTORY_MSG_205;CAM02-热像素/坏点过滤器 +HISTORY_MSG_207;去除色边-色度曲线 +HISTORY_MSG_210;渐变-角度 HISTORY_MSG_211;渐变滤镜 -HISTORY_MSG_212;暗角 - 力度 +HISTORY_MSG_212;暗角-力度 HISTORY_MSG_213;暗角滤镜 -HISTORY_MSG_239;GF - 力度 -HISTORY_MSG_244;VC - 力度 -HISTORY_MSG_245;VC - 中心 +HISTORY_MSG_239;GF-力度 +HISTORY_MSG_244;暗角矫正-力度 +HISTORY_MSG_245;暗角矫正-中心 +HISTORY_MSG_246;L*a*b*-CL曲线 +HISTORY_MSG_247;L*a*b*-LH曲线 +HISTORY_MSG_248;L*a*b*-HH曲线 +HISTORY_MSG_249;CbDL-阈值 +HISTORY_MSG_252;CbDL-肤色保护 +HISTORY_MSG_253;CbDL-减少杂色 +HISTORY_MSG_254;CbDL-皮肤色相 +HISTORY_MSG_255;降噪-中值滤波器 +HISTORY_MSG_256;降噪-中值滤波器-方法 +HISTORY_MSG_285;降噪-中值滤波-方法 +HISTORY_MSG_286;降噪-中值滤波-类型 +HISTORY_MSG_287;降噪-中值滤波-迭代 +HISTORY_MSG_288;平场-溢出控制 +HISTORY_MSG_289;平场-溢出控制-自动 +HISTORY_MSG_293;胶片模拟 +HISTORY_MSG_294;胶片模拟-力度 +HISTORY_MSG_295;胶片模拟-胶片 +HISTORY_MSG_296;降噪-亮度曲线 +HISTORY_MSG_297;降噪-模式 +HISTORY_MSG_298;坏点过滤器 +HISTORY_MSG_299;降噪-色度曲线 +HISTORY_MSG_301;降噪-亮度控制 +HISTORY_MSG_302;降噪-色度方法 +HISTORY_MSG_303;降噪-色度方法 +HISTORY_MSG_305;小波层级 +HISTORY_MSG_306;W-处理 +HISTORY_MSG_307;W-处理 +HISTORY_MSG_308;W-处理方向 +HISTORY_MSG_309;小波-边缘锐度-细节 +HISTORY_MSG_310;W-残差图-肤色保护 +HISTORY_MSG_311;小波-小波层级 +HISTORY_MSG_312;W-残差图-阴影阈值 +HISTORY_MSG_338;小波-边缘锐度-半径 +HISTORY_MSG_339;小波-边缘锐度-力度 +HISTORY_MSG_340;小波-力度 +HISTORY_MSG_347;小波-去噪-第1级 +HISTORY_MSG_348;小波-去噪-第2级 +HISTORY_MSG_349;小波-去噪-第3级 +HISTORY_MSG_357;W-去噪-边缘锐度挂钩 +HISTORY_MSG_371;调整大小后加锐(PRS) +HISTORY_MSG_372;PRS USM-半径 +HISTORY_MSG_373;PRS USM-数量 +HISTORY_MSG_374;PRS USM-阈值 +HISTORY_MSG_375;PRS USM-仅加锐边缘 +HISTORY_MSG_376;PRS USM-边缘检测半径 +HISTORY_MSG_377;PRS USM-边缘容差 +HISTORY_MSG_378;PRS USM-光晕控制 +HISTORY_MSG_379;PRS USM-光晕控制数量 +HISTORY_MSG_380;PRS-方法 +HISTORY_MSG_381;PRS RLD-半径 +HISTORY_MSG_382;PRS RLD-数量 +HISTORY_MSG_383;PRS RLD-衰减 +HISTORY_MSG_384;PRS RLD-迭代 +HISTORY_MSG_405;小波-去噪-第4级 +HISTORY_MSG_445;Raw子图像 +HISTORY_MSG_449;像素偏移-ISO适应 +HISTORY_MSG_452;像素偏移-显示动体 +HISTORY_MSG_453;像素偏移-仅显示动体蒙版 +HISTORY_MSG_457;像素偏移-检测红/蓝 +HISTORY_MSG_462;像素偏移-检测绿 +HISTORY_MSG_464;像素偏移-动体蒙版模糊 +HISTORY_MSG_465;像素偏移-模糊半径 +HISTORY_MSG_468;像素偏移-填洞 +HISTORY_MSG_469;像素偏移-中值 +HISTORY_MSG_471;像素偏移-动体补正 +HISTORY_MSG_472;像素偏移-顺滑过渡 +HISTORY_MSG_473;像素偏移-使用LMMSE +HISTORY_MSG_474;像素偏移-亮度均等 +HISTORY_MSG_475;像素偏移-均等各通道 +HISTORY_MSG_485;镜头矫正 +HISTORY_MSG_486;镜头矫正-相机 +HISTORY_MSG_487;镜头矫正-镜头 +HISTORY_MSG_488;动态范围压缩(DRC) +HISTORY_MSG_489;DRC-细节 +HISTORY_MSG_490;DRC-数量 +HISTORY_MSG_491;白平衡 +HISTORY_MSG_492;RGB曲线 +HISTORY_MSG_493;L*a*b*调整 +HISTORY_MSG_494;捕图加锐 +HISTORY_MSG_CLAMPOOG;超色域色彩溢出 +HISTORY_MSG_DEHAZE_DEPTH;去雾-纵深值 +HISTORY_MSG_DEHAZE_ENABLED;去雾 +HISTORY_MSG_DEHAZE_LUMINANCE;去雾-仅亮度 +HISTORY_MSG_DEHAZE_SHOW_DEPTH_MAP;去雾-显示纵深蒙版 +HISTORY_MSG_DEHAZE_STRENGTH;去雾-力度 +HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST;双重去马赛克-自动阈值 +HISTORY_MSG_DUALDEMOSAIC_CONTRAST;双重去马赛克-反差阈值 +HISTORY_MSG_FILMNEGATIVE_ENABLED;胶片负片 +HISTORY_MSG_HISTMATCHING;自适应色调曲线 +HISTORY_MSG_LOCALCONTRAST_AMOUNT;局部反差-数量 +HISTORY_MSG_LOCALCONTRAST_DARKNESS;局部反差-黑部 +HISTORY_MSG_LOCALCONTRAST_ENABLED;局部反差 +HISTORY_MSG_LOCALCONTRAST_LIGHTNESS;局部反差-亮部 +HISTORY_MSG_LOCALCONTRAST_RADIUS;局部反差-半径 +HISTORY_MSG_METADATA_MODE;元数据复制模式 +HISTORY_MSG_MICROCONTRAST_CONTRAST;微反差-反差阈值 +HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;捕图加锐-自动阈值 +HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;捕图加锐-自动半径 +HISTORY_MSG_PDSHARPEN_CHECKITER;捕图加锐-自动限制迭代 +HISTORY_MSG_PDSHARPEN_CONTRAST;捕图加锐-反差阈值 +HISTORY_MSG_PDSHARPEN_ITERATIONS;捕图加锐-迭代 +HISTORY_MSG_PDSHARPEN_RADIUS;捕图加锐-半径 +HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;捕图加锐-边缘半径值提升 +HISTORY_MSG_PIXELSHIFT_DEMOSAIC;像素偏移-动体部分去马赛克算法 +HISTORY_MSG_PREPROCESS_LINEDENOISE_DIRECTION;线状噪点过滤方向 +HISTORY_MSG_PREPROCESS_PDAFLINESFILTER;PDAF条纹过滤 +HISTORY_MSG_PRSHARPEN_CONTRAST;PRS-反差阈值 +HISTORY_MSG_RAWCACORR_AUTOIT;Raw色差矫正-迭代 +HISTORY_MSG_RAWCACORR_COLORSHIFT;Raw色差矫正-避免色偏 +HISTORY_MSG_RAW_BORDER;Raw边界 +HISTORY_MSG_RESIZE_ALLOWUPSCALING;调整大小-允许升采样 +HISTORY_MSG_SHARPENING_BLUR;加锐-模糊半径 +HISTORY_MSG_SHARPENING_CONTRAST;加锐-反差阈值 +HISTORY_MSG_SH_COLORSPACE;阴影/高光-色彩空间 +HISTORY_MSG_TM_FATTAL_ANCHOR;DRC-锚点 HISTORY_NEWSNAPSHOT;新建快照 HISTORY_NEWSNAPSHOT_TOOLTIP;快捷键:Alt-s HISTORY_SNAPSHOT;快照 -HISTORY_SNAPSHOTS;系列快照 +HISTORY_SNAPSHOTS;快照 +ICCPROFCREATOR_COPYRIGHT;版权: +ICCPROFCREATOR_CUSTOM;自定义 +ICCPROFCREATOR_DESCRIPTION;描述: +ICCPROFCREATOR_SAVEDIALOG_TITLE;将ICC档案保存为... IPTCPANEL_CATEGORY;类别 IPTCPANEL_CITY;城市 IPTCPANEL_COPYHINT;将IPTC设置复制到剪贴板 @@ -334,44 +578,48 @@ IPTCPANEL_RESET;重置 IPTCPANEL_RESETHINT;重置为默认配置 IPTCPANEL_SOURCE;来源 IPTCPANEL_TITLE;标题 -MAIN_BUTTON_FULLSCREEN;全屏幕 +MAIN_BUTTON_FULLSCREEN;全屏 MAIN_BUTTON_PREFERENCES;参数设置 -MAIN_BUTTON_PUTTOQUEUE_TOOLTIP;将当前图片放入处理序列中\n快捷键: Ctrl+b +MAIN_BUTTON_PUTTOQUEUE_TOOLTIP;将当前图片放入处理队列中\n快捷键:Ctrl+b MAIN_BUTTON_SAVE;保存图片 -MAIN_BUTTON_SAVE_TOOLTIP;保存当前图像 \n快捷键:Ctrl+S +MAIN_BUTTON_SAVE_TOOLTIP;保存当前图像\n快捷键:Ctrl+S MAIN_BUTTON_SENDTOEDITOR;发送到编辑器 -MAIN_BUTTON_SENDTOEDITOR_TOOLTIP;使用外部工具编辑当前图像 \n快捷键:Ctrl+E -MAIN_BUTTON_SHOWHIDESIDEPANELS_TOOLTIP;显示/隐藏全部侧边栏\n快捷键: m +MAIN_BUTTON_SENDTOEDITOR_TOOLTIP;使用外部工具编辑当前图像\n快捷键:Ctrl+E +MAIN_BUTTON_SHOWHIDESIDEPANELS_TOOLTIP;显示/隐藏全部侧边栏\n快捷键:m MAIN_BUTTON_UNFULLSCREEN;退出全屏 MAIN_FRAME_EDITOR;编辑器 -MAIN_FRAME_EDITOR_TOOLTIP;编辑器.\n快捷键: Ctrl-F4 -MAIN_FRAME_FILEBROWSER;文件浏览 -MAIN_FRAME_FILEBROWSER_TOOLTIP;文件浏览\n快捷键: Ctrl-F2 +MAIN_FRAME_EDITOR_TOOLTIP;编辑器\n快捷键:Ctrl-F4 +MAIN_FRAME_FILEBROWSER;文件浏览器 +MAIN_FRAME_FILEBROWSER_TOOLTIP;文件浏览器\n快捷键:Ctrl-F2 MAIN_FRAME_PLACES;位置 MAIN_FRAME_PLACES_ADD;添加 +MAIN_FRAME_PLACES_DEL;移除 MAIN_FRAME_QUEUE;批处理队列 -MAIN_FRAME_QUEUE_TOOLTIP;处理序列\n快捷键: Ctrl-F3 +MAIN_FRAME_QUEUE_TOOLTIP;处理队列\n快捷键:Ctrl-F3 MAIN_FRAME_RECENT;最近使用的文件夹 MAIN_MSG_ALREADYEXISTS;该文件已存在 MAIN_MSG_CANNOTLOAD;无法加载图片 MAIN_MSG_CANNOTSAVE;文件保存中出错 MAIN_MSG_CANNOTSTARTEDITOR;无法启动编辑器 -MAIN_MSG_CANNOTSTARTEDITOR_SECONDARY;请在“首选项“对话框设置正确的路径 +MAIN_MSG_CANNOTSTARTEDITOR_SECONDARY;请在“参数设置”中设置正确的路径 MAIN_MSG_EMPTYFILENAME;未指定文件名! -MAIN_MSG_NAVIGATOR;浏览器 +MAIN_MSG_NAVIGATOR;导航器 MAIN_MSG_OPERATIONCANCELLED;取消 MAIN_MSG_QOVERWRITE;是否覆盖? +MAIN_TAB_ADVANCED;高级 +MAIN_TAB_ADVANCED_TOOLTIP;快捷键:Alt-a MAIN_TAB_COLOR;色彩 MAIN_TAB_COLOR_TOOLTIP;快捷键:Alt-c MAIN_TAB_DETAIL;细节 -MAIN_TAB_DETAIL_TOOLTIP;快捷键: Alt-d -MAIN_TAB_DEVELOP;图片调整 +MAIN_TAB_DETAIL_TOOLTIP;快捷键:Alt-d +MAIN_TAB_DEVELOP;批量调整 MAIN_TAB_EXIF;Exif -MAIN_TAB_EXPORT; 快速导出 +MAIN_TAB_EXPORT;快速导出 MAIN_TAB_EXPOSURE;曝光 MAIN_TAB_EXPOSURE_TOOLTIP;快捷键:Alt-e +MAIN_TAB_FAVORITES_TOOLTIP;快捷键: Alt-u MAIN_TAB_FILTER;过滤器 -MAIN_TAB_INSPECT; 检阅 +MAIN_TAB_INSPECT;检视 MAIN_TAB_IPTC;IPTC MAIN_TAB_METADATA;元数据 MAIN_TAB_METADATA_TOOLTIP;快捷键:Alt-m @@ -379,16 +627,26 @@ MAIN_TAB_RAW;Raw MAIN_TAB_RAW_TOOLTIP;快捷键:Alt-R MAIN_TAB_TRANSFORM;变换 MAIN_TAB_TRANSFORM_TOOLTIP;快捷键:Alt-t -MAIN_TOOLTIP_HIDEHP;显示/隐藏左面板 (包含历史, 快捷键: H) +MAIN_TOOLTIP_BACKCOLOR0;预览图的背景色:基于主题调整\n快捷键:9 +MAIN_TOOLTIP_BACKCOLOR1;预览图的背景色:黑色\n快捷键:9 +MAIN_TOOLTIP_BACKCOLOR2;预览图的背景色:白色\n快捷键:9 +MAIN_TOOLTIP_BACKCOLOR3;预览图的背景色:中灰色\n快捷键:9 +MAIN_TOOLTIP_HIDEHP;显示/隐藏左面板(包含历史,快捷键:H) MAIN_TOOLTIP_INDCLIPPEDH;高光溢出提示 MAIN_TOOLTIP_INDCLIPPEDS;阴影不足提示 -MAIN_TOOLTIP_PREVIEWR;预览 红色通道.\n快捷键: r -MAIN_TOOLTIP_QINFO;图片快捷信息 -MAIN_TOOLTIP_SHOWHIDELP1;显示/隐藏左面板\n快捷键: l -MAIN_TOOLTIP_SHOWHIDERP1;显示/隐藏右面板\n快捷键: Alt-l -MAIN_TOOLTIP_SHOWHIDETP1;显示/隐藏上面板\n快捷键: Shift-L +MAIN_TOOLTIP_PREVIEWB;预览蓝色通道\n快捷键:b +MAIN_TOOLTIP_PREVIEWFOCUSMASK;预览合焦蒙版\n快捷键:Shift-f\n\n在浅景深,噪点少,放大得大的图片中更加精准\n在噪点多的图像中,把图片缩放到10%-30%以提升检测精准度 +MAIN_TOOLTIP_PREVIEWG;预览绿色通道\n快捷键:g +MAIN_TOOLTIP_PREVIEWL;预览亮度\n快捷键:v\n\n0.299*R + 0.587*G + 0.114*B +MAIN_TOOLTIP_PREVIEWR;预览红色通道\n快捷键:r +MAIN_TOOLTIP_PREVIEWSHARPMASK;预览加锐反差蒙版\n快捷键:p +MAIN_TOOLTIP_QINFO;图片简略信息 +MAIN_TOOLTIP_SHOWHIDELP1;显示/隐藏左面板\n快捷键:l +MAIN_TOOLTIP_SHOWHIDERP1;显示/隐藏右面板\n快捷键:Alt-l +MAIN_TOOLTIP_SHOWHIDETP1;显示/隐藏上面板\n快捷键:Shift-L MAIN_TOOLTIP_THRESHOLD;阈值 -MAIN_TOOLTIP_TOGGLE;切换 /视图\n快捷键: Shift-b +MAIN_TOOLTIP_TOGGLE;切换处理前/处理后视图\n快捷键:Shift-b +MONITOR_PROFILE_SYSTEM;系统默认 NAVIGATOR_B;B: NAVIGATOR_G;G: NAVIGATOR_H;H: @@ -401,212 +659,255 @@ NAVIGATOR_S;S: NAVIGATOR_V;V: NAVIGATOR_XY_FULL;宽 = %1, 高 = %2 NAVIGATOR_XY_NA;x = n/a, y = n/a +OPTIONS_BUNDLED_MISSING;找不到附带档案"%1"!\n\n程序可能受损。\n\n将使用内部默认值 +PARTIALPASTE_ADVANCEDGROUP;高级设置 PARTIALPASTE_BASICGROUP;基本设置 PARTIALPASTE_CACORRECTION;色彩矫正 PARTIALPASTE_CHANNELMIXER;通道混合器 PARTIALPASTE_CHANNELMIXERBW;黑白 -PARTIALPASTE_COARSETRANS;90度旋转/翻转 +PARTIALPASTE_COARSETRANS;90°旋转/翻转 PARTIALPASTE_COLORAPP;CIECAM02 PARTIALPASTE_COLORGROUP;色彩相关设定 PARTIALPASTE_COLORTONING;色调 PARTIALPASTE_COMMONTRANSFORMPARAMS;自动填充 PARTIALPASTE_COMPOSITIONGROUP;构图设置 -PARTIALPASTE_CROP;剪裁 +PARTIALPASTE_CROP;裁剪 PARTIALPASTE_DARKFRAMEAUTOSELECT;暗场自动选择 PARTIALPASTE_DARKFRAMEFILE;暗场文件 -PARTIALPASTE_DEFRINGE;去边 +PARTIALPASTE_DEFRINGE;去除色边 +PARTIALPASTE_DEHAZE;去雾 PARTIALPASTE_DETAILGROUP;细节设置 PARTIALPASTE_DIALOGLABEL;选择性粘贴配置 PARTIALPASTE_DIRPYRDENOISE;降噪 PARTIALPASTE_DIRPYREQUALIZER;分频反差调整 PARTIALPASTE_DISTORTION;畸变矫正 PARTIALPASTE_EPD;色调映射 -PARTIALPASTE_EQUALIZER;小波变换等级 +PARTIALPASTE_EQUALIZER;小波变换层级 PARTIALPASTE_EVERYTHING;全部 PARTIALPASTE_EXIFCHANGES;对exif所做的修改 PARTIALPASTE_EXPOSURE;曝光 +PARTIALPASTE_FILMNEGATIVE;胶片负片 PARTIALPASTE_FILMSIMULATION;胶片模拟 PARTIALPASTE_FLATFIELDAUTOSELECT;平场自动选择 PARTIALPASTE_FLATFIELDBLURRADIUS;平场模糊半径 PARTIALPASTE_FLATFIELDBLURTYPE;平场模糊类型 PARTIALPASTE_FLATFIELDCLIPCONTROL;平场剪切控制 PARTIALPASTE_FLATFIELDFILE;平场文件夹 -PARTIALPASTE_GRADIENT;渐变过滤 -PARTIALPASTE_HSVEQUALIZER;HSV均衡 -PARTIALPASTE_ICMSETTINGS;ICM 设置 +PARTIALPASTE_GRADIENT;渐变滤镜 +PARTIALPASTE_HSVEQUALIZER;HSV均衡器 +PARTIALPASTE_ICMSETTINGS;ICM设置 PARTIALPASTE_IMPULSEDENOISE;脉冲噪声降低 PARTIALPASTE_IPTCINFO;IPTC 信息 PARTIALPASTE_LABCURVE;Lab调整 PARTIALPASTE_LENSGROUP;镜头相关设置 PARTIALPASTE_LENSPROFILE;镜片修正档案 +PARTIALPASTE_LOCALCONTRAST;局部反差 +PARTIALPASTE_METADATA;元数据模式 PARTIALPASTE_METAGROUP;元数据 PARTIALPASTE_PCVIGNETTE;暗角滤镜 PARTIALPASTE_PERSPECTIVE;视角 PARTIALPASTE_PREPROCESS_DEADPIXFILT;坏点过滤器 PARTIALPASTE_PREPROCESS_GREENEQUIL;绿平衡 PARTIALPASTE_PREPROCESS_HOTPIXFILT;热噪过滤器 -PARTIALPASTE_PREPROCESS_LINEDENOISE;线条噪点过滤 +PARTIALPASTE_PREPROCESS_LINEDENOISE;线状噪点过滤 +PARTIALPASTE_PREPROCESS_PDAFLINESFILTER;PDAF条纹过滤器 PARTIALPASTE_PRSHARPENING;调整大小后锐化 -PARTIALPASTE_RAWCACORR_AUTO;CA自动更正 -PARTIALPASTE_RAWCACORR_CAREDBLUE;红蓝色散 +PARTIALPASTE_RAWCACORR_AUTO;色差自动矫正 +PARTIALPASTE_RAWCACORR_AVOIDCOLORSHIFT;CA避免偏色 +PARTIALPASTE_RAWCACORR_CAREDBLUE;红蓝色差 PARTIALPASTE_RAWEXPOS_BLACK;黑色等级 PARTIALPASTE_RAWEXPOS_LINEAR;白点纠正 PARTIALPASTE_RAWGROUP;Raw设置 -PARTIALPASTE_RAW_DCBENHANCE;DCB 增强 -PARTIALPASTE_RAW_DCBITERATIONS;DCB 反复 -PARTIALPASTE_RAW_DMETHOD;解马赛克方法 +PARTIALPASTE_RAW_BORDER;Raw边界 +PARTIALPASTE_RAW_DCBENHANCE;DCB增强 +PARTIALPASTE_RAW_DCBITERATIONS;DCB迭代 +PARTIALPASTE_RAW_DMETHOD;去马赛克方法 PARTIALPASTE_RAW_FALSECOLOR;摩尔纹抑制 PARTIALPASTE_RAW_IMAGENUM;子图像 -PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE 增强级数 -PARTIALPASTE_RAW_PIXELSHIFT;像素位移 -PARTIALPASTE_RESIZE;缩放 -PARTIALPASTE_RETINEX;Retinex增强算法 +PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE优化步长 +PARTIALPASTE_RAW_PIXELSHIFT;像素偏移 +PARTIALPASTE_RESIZE;调整大小 PARTIALPASTE_RGBCURVES;RGB曲线 PARTIALPASTE_ROTATION;旋转 PARTIALPASTE_SHADOWSHIGHLIGHTS;阴影/高光 -PARTIALPASTE_SHARPENEDGE;边缘 +PARTIALPASTE_SHARPENEDGE;边缘锐化 PARTIALPASTE_SHARPENING;锐化 -PARTIALPASTE_SHARPENMICRO;微处对比 +PARTIALPASTE_SHARPENMICRO;微反差 +PARTIALPASTE_TM_FATTAL;动态范围压缩 PARTIALPASTE_VIBRANCE;鲜艳度 -PARTIALPASTE_VIGNETTING;暗角修正 +PARTIALPASTE_VIGNETTING;暗角矫正 PARTIALPASTE_WHITEBALANCE;白平衡 -PREFERENCES_ADD;添加 -PREFERENCES_APPEARANCE_NAVGUIDECOLOR;导航器引导颜色 +PREFERENCES_ADD;相加 +PREFERENCES_APPEARANCE;外观 +PREFERENCES_APPEARANCE_COLORPICKERFONT;拾色器字体 +PREFERENCES_APPEARANCE_CROPMASKCOLOR;裁剪蒙版颜色 +PREFERENCES_APPEARANCE_MAINFONT;主字体 +PREFERENCES_APPEARANCE_NAVGUIDECOLOR;导航器图框颜色 +PREFERENCES_APPEARANCE_PSEUDOHIDPI;伪-高DPI模式 +PREFERENCES_APPEARANCE_THEME;主题 PREFERENCES_APPLNEXTSTARTUP;下次启动生效 PREFERENCES_AUTOMONPROFILE;使用操作系统主显示器的色彩档案 +PREFERENCES_AUTOSAVE_TP_OPEN;在退出时保存工具的展开/折叠状态 PREFERENCES_BATCH_PROCESSING;批处理 -PREFERENCES_BEHADDALL;全 '添加' +PREFERENCES_BEHADDALL;全“相加” +PREFERENCES_BEHADDALLHINT;将所有选项设为相加模式。\n批量调整栏的处理参数将在图片当前参数的基础上加减 PREFERENCES_BEHAVIOR;行为 -PREFERENCES_BEHSETALL;全 '设定' +PREFERENCES_BEHSETALL;全“设定” +PREFERENCES_BEHSETALLHINT;将所有选项设为设定模式。\n批量调整栏的处理参数将是绝对值,数值会被显示 +PREFERENCES_CACHECLEAR;清空 +PREFERENCES_CACHECLEAR_ALL;清空所有缓存文件: +PREFERENCES_CACHECLEAR_ALLBUTPROFILES;清除所有缓存文件,已缓存的后期档案除外: +PREFERENCES_CACHECLEAR_ONLYPROFILES;仅清除已缓存的后期档案: +PREFERENCES_CACHECLEAR_SAFETY;仅缓存中的文件会被清除,与原图片保存在一起的后期档案不会受到影响。 PREFERENCES_CACHEMAXENTRIES;最大缓存数量 PREFERENCES_CACHEOPTS;缓存选项 PREFERENCES_CACHETHUMBHEIGHT;最大缩略图高度 +PREFERENCES_CHUNKSIZES;每个线程的切片数 +PREFERENCES_CHUNKSIZE_RAW_AMAZE;AMaZE去马赛克 +PREFERENCES_CHUNKSIZE_RAW_CA;Raw色差矫正 +PREFERENCES_CHUNKSIZE_RAW_RCD;RCD去马赛克 +PREFERENCES_CHUNKSIZE_RGB;RGB处理 PREFERENCES_CLIPPINGIND;高光溢出提示 -PREFERENCES_CLUTSCACHE;HaldCLUT 缓存 -PREFERENCES_CLUTSCACHE_LABEL;CLUTs 最大缓存数 -PREFERENCES_CLUTSDIR;HaldCLUT 路径 +PREFERENCES_CLUTSCACHE;HaldCLUT缓存 +PREFERENCES_CLUTSCACHE_LABEL;CLUT最大缓存数 +PREFERENCES_CLUTSDIR;HaldCLUT路径 PREFERENCES_CMMBPC;黑场补偿 +PREFERENCES_CROP;裁剪编辑 +PREFERENCES_CROP_AUTO_FIT;自动放大以适应裁剪 +PREFERENCES_CROP_GUIDES;在不编辑裁剪区域时,裁剪区域所显示的辅助方式 +PREFERENCES_CROP_GUIDES_FRAME;方框 +PREFERENCES_CROP_GUIDES_FULL;原方式 +PREFERENCES_CROP_GUIDES_NONE;无 PREFERENCES_CURVEBBOXPOS;曲线复制/粘贴按钮位置 PREFERENCES_CURVEBBOXPOS_ABOVE;上 PREFERENCES_CURVEBBOXPOS_BELOW;下 PREFERENCES_CURVEBBOXPOS_LEFT;左 PREFERENCES_CURVEBBOXPOS_RIGHT;右 -PREFERENCES_CUSTPROFBUILD;Custom Processing Profile Builder -PREFERENCES_CUSTPROFBUILDKEYFORMAT;Keys format -PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME;Name -PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID PREFERENCES_CUSTPROFBUILDPATH;可执行文件路径 PREFERENCES_DARKFRAMEFOUND;找到 PREFERENCES_DARKFRAMESHOTS;张 PREFERENCES_DARKFRAMETEMPLATES;模板 PREFERENCES_DATEFORMAT;日期格式 -PREFERENCES_DATEFORMATHINT;可以使用下列控制符:\n%y : 年\n%m : 月h\n%d : 日\n\n例如, 中文日期格式:\n%y/%m/%d +PREFERENCES_DATEFORMATHINT;你可以使用下列控制符:\n%y :年\n%m :月\n%d :日\n\n例如,ISO 8601标准的时间格式为:\n%y/%m/%d PREFERENCES_DIRDARKFRAMES;暗场图像路径 +PREFERENCES_DIRECTORIES;目录 PREFERENCES_DIRHOME;用户文件路径 PREFERENCES_DIRLAST;上次访问路径 PREFERENCES_DIROTHER;其他 PREFERENCES_DIRSELECTDLG;启动时选择图片路径... PREFERENCES_DIRSOFTWARE;软件安装路径 +PREFERENCES_EDITORCMDLINE;自定义命令行 PREFERENCES_EDITORLAYOUT;编辑器布局 PREFERENCES_EXTERNALEDITOR;外部编辑器 -PREFERENCES_FBROWSEROPTS;文件浏览选项 +PREFERENCES_FBROWSEROPTS;文件浏览器选项 +PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;在文件浏览器中显示紧凑的工具栏 PREFERENCES_FLATFIELDFOUND;找到 PREFERENCES_FLATFIELDSDIR;平场图像路径 PREFERENCES_FLATFIELDSHOTS;张 PREFERENCES_FLATFIELDTEMPLATES;模板 PREFERENCES_FORIMAGE;用于图片文件 PREFERENCES_FORRAW;用于Raw文件 -PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser -PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;令文件浏览器和编辑器的缩略图高度相同 +PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;若文件浏览器和编辑器的缩略图大小不同,那么在二者间切换时,生成缩略图的用时就会变长 PREFERENCES_GIMPPATH;GIMP安装文件夹 -PREFERENCES_HISTOGRAMPOSITIONLEFT;直方图放置在左面板 -PREFERENCES_HISTOGRAM_TOOLTIP;If enabled, the working profile is used for rendering the main histogram and the Navigator panel, otherwise the gamma-corrected output profile is used. +PREFERENCES_HISTOGRAMPOSITIONLEFT;将直方图放置在左面板 +PREFERENCES_HISTOGRAM_TOOLTIP;启用后,当前使用的后期配置档案将被用于渲染主直方图和导航栏,不启用则将使用伽马矫正的输出档案进行渲染 PREFERENCES_HLTHRESHOLD;高光溢出阈值 PREFERENCES_ICCDIR;ICC配置路径 PREFERENCES_IMPROCPARAMS;默认图片处理参数 -PREFERENCES_INSPECT_LABEL;检阅 +PREFERENCES_INSPECT_LABEL;检视 PREFERENCES_INSPECT_MAXBUFFERS_LABEL;最大缓存图片数 -PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. PREFERENCES_INTENT_ABSOLUTE;绝对比色 PREFERENCES_INTENT_PERCEPTUAL;可感知 PREFERENCES_INTENT_RELATIVE;相对比色 PREFERENCES_INTENT_SATURATION;饱和度 -PREFERENCES_INTERNALTHUMBIFUNTOUCHED;如果RAW文件没有修改, 显示内嵌JPEG缩略图 +PREFERENCES_INTERNALTHUMBIFUNTOUCHED;如果RAW文件没有被修改,显示内嵌JPEG的缩略图 PREFERENCES_LANG;语言 PREFERENCES_LANGAUTODETECT;使用系统语言 PREFERENCES_MAXRECENTFOLDERS;最近访问路径历史记录数 -PREFERENCES_MENUGROUPEXTPROGS;Group "Open with" -PREFERENCES_MENUGROUPFILEOPERATIONS;Group "File operations" -PREFERENCES_MENUGROUPLABEL;Group "Color label" -PREFERENCES_MENUGROUPPROFILEOPERATIONS;Group "Processing profile operations" -PREFERENCES_MENUGROUPRANK;组 "评价" -PREFERENCES_MENUOPTIONS;子菜单选项 +PREFERENCES_MENUGROUPEXTPROGS;组合"打开方式" +PREFERENCES_MENUGROUPFILEOPERATIONS;组合"文件操作" +PREFERENCES_MENUGROUPLABEL;组合"色彩标签" +PREFERENCES_MENUGROUPPROFILEOPERATIONS;组合"后期档案操作" +PREFERENCES_MENUGROUPRANK;组合 "评级" +PREFERENCES_MENUOPTIONS;右键子菜单选项 PREFERENCES_MONINTENT;默认渲染意图 PREFERENCES_MONITOR;显示器 PREFERENCES_MONPROFILE;默认色彩配置文件 PREFERENCES_MONPROFILE_WARNOSX;受MacOS限制, 仅支持sRGB PREFERENCES_MULTITAB;多编辑器标签模式 -PREFERENCES_MULTITABDUALMON;多编辑器标签独立模式 +PREFERENCES_MULTITABDUALMON;多编辑器标签,标签独立模式 PREFERENCES_NAVIGATIONFRAME;导航器 -PREFERENCES_OVERLAY_FILENAMES;Overlay filenames on thumbnails in the file browser -PREFERENCES_OVERLAY_FILENAMES_FILMSTRIP;Overlay filenames on thumbnails in the editor pannel -PREFERENCES_OVERWRITEOUTPUTFILE;Overwrite existing output files -PREFERENCES_PANFACTORLABEL;Pan rate amplification +PREFERENCES_OVERLAY_FILENAMES;在文件浏览器的缩略图上显示文件名 +PREFERENCES_OVERLAY_FILENAMES_FILMSTRIP;在编辑器的缩略图上显示文件名 +PREFERENCES_OVERWRITEOUTPUTFILE;覆盖已存在的输出文件 +PREFERENCES_PANFACTORLABEL;拖移速率增幅 PREFERENCES_PARSEDEXT;已知扩展名 PREFERENCES_PARSEDEXTADD;添加扩展名 PREFERENCES_PARSEDEXTADDHINT;输入扩展名并按此按钮将其添加至列表 PREFERENCES_PARSEDEXTDELHINT;从列表中删除选中的扩展名 -PREFERENCES_PARSEDEXTDOWNHINT;Move selected extension down in the list. -PREFERENCES_PARSEDEXTUPHINT;Move selected extension up in the list. -PREFERENCES_PREVDEMO;预览解马赛克方法 +PREFERENCES_PARSEDEXTDOWNHINT;让选中的扩展名在列表中的位置下降 +PREFERENCES_PARSEDEXTUPHINT;让选中的扩展名在列表中的位置上升 +PREFERENCES_PERFORMANCE_MEASURE;测速 +PREFERENCES_PERFORMANCE_MEASURE_HINT;在控制台记录处理时间 +PREFERENCES_PERFORMANCE_THREADS;线程 +PREFERENCES_PERFORMANCE_THREADS_LABEL;用于降噪和小波层级的最大线程数(0=自动) +PREFERENCES_PREVDEMO;预览去马赛克方法 PREFERENCES_PREVDEMO_FAST;快速 -PREFERENCES_PREVDEMO_LABEL;小于100%缩放查看时使用的解马赛克算法: +PREFERENCES_PREVDEMO_LABEL;小于100%缩放查看时使用的去马赛克算法: PREFERENCES_PREVDEMO_SIDECAR;与PP3相同 PREFERENCES_PRINTER;打印机 (软打样) PREFERENCES_PROFILEHANDLING;图片处理配置管理 PREFERENCES_PROFILELOADPR;配置文件读取优先级 PREFERENCES_PROFILEPRCACHE;缓存中的配置文件 -PREFERENCES_PROFILEPRFILE;与图片并列存放的配置文件 -PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file -PREFERENCES_PROFILESAVECACHE;将配置文件写至缓存 +PREFERENCES_PROFILEPRFILE;图片所在位置的配置文件 +PREFERENCES_PROFILESAVEBOTH;将配置文件存放到缓存和输入图片所在位置 +PREFERENCES_PROFILESAVECACHE;将配置文件存放到缓存 PREFERENCES_PROFILESAVEINPUT;将配置文件与图片并列存放 -PREFERENCES_PROFILESAVELOCATION;处理配置文件存储路径 +PREFERENCES_PROFILESAVELOCATION;将配置文件存放到缓存和输入图片所在位置 PREFERENCES_PROFILE_NONE;无 PREFERENCES_PROPERTY;属性 PREFERENCES_PRTINTENT;渲染意图 PREFERENCES_PRTPROFILE;色彩配置文件 PREFERENCES_PSPATH;Adobe Photoshop安装路径 -PREFERENCES_REMEMBERZOOMPAN;记忆缩放和位置 -PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". +PREFERENCES_REMEMBERZOOMPAN;记忆图片的缩放和拖动位置 +PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;当打开新图片时,记忆上一张图片放大的百分比和被拖动到的位置。\n\n这个选项仅在使用“单编辑器模式”且“小于100%缩放查看时使用的去马赛克方法”被设为“与PP3相同”时才有效 +PREFERENCES_SAVE_TP_OPEN_NOW;保存工具的展开/折叠状态 PREFERENCES_SELECTLANG;选择语言 -PREFERENCES_SERIALIZE_TIFF_READ;TIFF 读取设定 -PREFERENCES_SERIALIZE_TIFF_READ_LABEL;连续载入TIFF文件 -PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;开启后可以提高在无压缩TIFF图片文件夹中的缩略图生成速度 -PREFERENCES_SET;设置 +PREFERENCES_SERIALIZE_TIFF_READ;TIFF读取设定 +PREFERENCES_SERIALIZE_TIFF_READ_LABEL;序列化载入TIFF文件 +PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;启用此选项后,在打开包含大量无压缩TIFF的文件夹时,缩略图生成速度会加快 +PREFERENCES_SET;设定 PREFERENCES_SHOWBASICEXIF;显示基本Exif信息 PREFERENCES_SHOWDATETIME;显示时间日期 -PREFERENCES_SHOWEXPOSURECOMPENSATION;附加曝光补偿 -PREFERENCES_SHOWFILMSTRIPTOOLBAR;显示图像胶片栏 +PREFERENCES_SHOWEXPOSURECOMPENSATION;附带曝光补偿 +PREFERENCES_SHOWFILMSTRIPTOOLBAR;显示“数码底片夹”栏 PREFERENCES_SHTHRESHOLD;阴影过暗阈值 -PREFERENCES_SINGLETAB;单编辑器栏模式 -PREFERENCES_SINGLETABVERTAB;单编辑器栏模式, 标签栏垂直 -PREFERENCES_SND_HELP;输入完整路径来指定声音文件, 或者留空表示无声 \nWindows系统声音可以使用 "SystemDefault", "SystemAsterisk" 等 Linux则可以使用 "complete", "window-attention" 等 +PREFERENCES_SINGLETAB;单编辑器标签模式 +PREFERENCES_SINGLETABVERTAB;单编辑器标签模式, 标签栏垂直 +PREFERENCES_SND_HELP;输入完整路径来指定声音文件, 或者留空表示无声。\nWindows系统声音可以使用"SystemDefault", "SystemAsterisk" 等\nLinux则可以使用 "complete", "window-attention"等 PREFERENCES_SND_LNGEDITPROCDONE;编辑器处理完成 -PREFERENCES_SND_QUEUEDONE;队列处理完成 -PREFERENCES_SND_THRESHOLDSECS;几秒之后 +PREFERENCES_SND_QUEUEDONE;完成队列 +PREFERENCES_SND_THRESHOLDSECS;等待秒数 PREFERENCES_STARTUPIMDIR;启动时路径 PREFERENCES_TAB_BROWSER;文件浏览器 PREFERENCES_TAB_COLORMGR;色彩管理 PREFERENCES_TAB_DYNAMICPROFILE;动态预设规则 -PREFERENCES_TAB_GENERAL;一般 +PREFERENCES_TAB_GENERAL;通用 PREFERENCES_TAB_IMPROC;图片处理 +PREFERENCES_TAB_PERFORMANCE;性能 PREFERENCES_TAB_SOUND;音效 +PREFERENCES_THUMBNAIL_INSPECTOR_JPEG;内嵌JPEG预览 +PREFERENCES_THUMBNAIL_INSPECTOR_MODE;展示的图片 +PREFERENCES_THUMBNAIL_INSPECTOR_RAW;中性Raw渲染图 +PREFERENCES_THUMBNAIL_INSPECTOR_RAW_IF_NO_JPEG_FULLSIZE;若内嵌JPEG为全尺寸,则预览它;否则预览中性Raw PREFERENCES_TP_LABEL;工具栏 -PREFERENCES_TP_VSCROLLBAR;隐藏垂直滚动栏 +PREFERENCES_TP_VSCROLLBAR;隐藏垂直滚动条 PREFERENCES_USEBUNDLEDPROFILES;启用内置预设 PREFERENCES_WORKFLOW;排版 PROFILEPANEL_LABEL;处理参数配置 PROFILEPANEL_LOADDLGLABEL;加载处理参数为... +PROFILEPANEL_MODE_TIP;后期档案应用模式。\n\n按下按钮:部分性档案将被转化为全面性档案;没有被使用的工具将会用预定的参数得到处理。\n\n松开按钮:档案按照其制作时的形式被应用,只有被调整过的工具参数会被应用。 PROFILEPANEL_MYPROFILES;我的档案 PROFILEPANEL_PCUSTOM;自定义 PROFILEPANEL_PFILE;由文件 @@ -616,44 +917,65 @@ PROFILEPANEL_TOOLTIPCOPY;将当前配置复制到剪贴板 PROFILEPANEL_TOOLTIPLOAD;由文件加载配置 PROFILEPANEL_TOOLTIPPASTE;从剪贴板粘贴配置 PROFILEPANEL_TOOLTIPSAVE;保存当前配置 +PROGRESSBAR_DECODING;解码中... +PROGRESSBAR_GREENEQUIL;绿平衡... +PROGRESSBAR_HLREC;高光还原... +PROGRESSBAR_HOTDEADPIXELFILTER;热像素/坏点过滤... +PROGRESSBAR_LINEDENOISE;线状噪点过滤... PROGRESSBAR_LOADING;图片加载中... -PROGRESSBAR_LOADINGTHUMBS;正在读取缩略图…… +PROGRESSBAR_LOADINGTHUMBS;读取缩略图... PROGRESSBAR_LOADJPEG;JPEG文件加载中... PROGRESSBAR_LOADPNG;PNG文件加载中... PROGRESSBAR_LOADTIFF;TIFF文件加载中... -PROGRESSBAR_NOIMAGES;没找到图片 +PROGRESSBAR_NOIMAGES;未找到图片 PROGRESSBAR_PROCESSING;图片处理中... +PROGRESSBAR_PROCESSING_PROFILESAVED;处理配置档案已保存 +PROGRESSBAR_RAWCACORR;Raw色差矫正... PROGRESSBAR_READY;就绪 PROGRESSBAR_SAVEJPEG;JPEG文件保存中... PROGRESSBAR_SAVEPNG;PNG文件保存中... PROGRESSBAR_SAVETIFF;TIFF文件保存中... +PROGRESSBAR_SNAPSHOT_ADDED;快照已添加 +QINFO_FRAMECOUNT;%2帧 +QINFO_HDR;HDR / %2帧 QINFO_ISO;ISO -QINFO_NOEXIF;Exif数据不可用. +QINFO_NOEXIF;Exif数据不可用 +QINFO_PIXELSHIFT;像素偏移/ %2帧 QUEUE_AUTOSTART;自动开始 +QUEUE_AUTOSTART_TOOLTIP;当新工作被发送到队列后,立刻自动开始处理 QUEUE_DESTFILENAME;路径和文件名 QUEUE_FORMAT_TITLE;文件格式 QUEUE_LOCATION_FOLDER;保存至文件夹 QUEUE_LOCATION_TEMPLATE;使用模板 -QUEUE_LOCATION_TEMPLATE_TOOLTIP;可以使用下列控制符:\n%f, %d1, %d2, ..., %p1, %p2, ...\n\n这些控制符指向RAW文件所在文件夹及子文件夹 \n\n例如 假如 /home/tom/image/02-09-2006/dsc0012.nef已经打开, 控制符的意义如下:\n%f=dsc0012, %d1=02-09-2006, %d2=image, ...\n%p1=/home/tom/image/02-09-2006, %p2=/home/tom/image, p3=/home/tom, ...\n\n如果想将输出文件保存到输入文件所在位置:\n%p1/%f\n\n如果想将输出文件保存至输入文件夹内的'converted'子文件夹:\n%p1/converted/%f\n\n如果想将输出文件保存至 '/home/tom/converted' 并保留按日期所分的子文件夹:\n%p2/converted/%d1/%f +QUEUE_LOCATION_TEMPLATE_TOOLTIP;根据图片的位置,评级,被置于垃圾桶与否,或是在队列中的位次来决定其被保存的位置。\n\n以这个路径为例:\n/home/tom/photos/2010-10-31/photo1.raw\n下列格式化的字符串意义如下:\n%d4 = home\n%d3 = tom\n%d2 = photos\n%d1 = 2010-10-31\n%f = photo1\n%p1 = /home/tom/photos/2010-10-31/\n%p2 = /home/tom/photos/\n%p3 = /home/tom/\n%p4 = /home/\n\n%r(在文件名中)会变为图片的评级。若图片无评级,则变为'0'。若图片被置于垃圾箱,则变为'x'。\n\n%s1, ..., %s9会变为照片在队列中的排序位次。"%s"后面所跟的数字规定着文件名的长度,比如使用%s3导出队列中的第一张照片,其将被命名为'001'。\n\n如果你想把图片保存到和原图相同的目录,输入:\n%p1/%f\n\n如果你想把图片保存到原图片所在文件夹的'converted'子文件夹下,输入:\n%p1/converted/%f\n\n如果你想把图片保存到\n'/home/tom/photos/converted/2010-10-31',输入:\n%p2/converted/%d1/%f +QUEUE_LOCATION_TITLE;输出位置 +QUEUE_STARTSTOP_TOOLTIP;开始/停止处理队列中的图像\n\n快捷键:Ctrl+s +SAMPLEFORMAT_0;未知数据格式 +SAMPLEFORMAT_1;8-bit unsigned +SAMPLEFORMAT_2;16-bit unsigned +SAMPLEFORMAT_16;16-bit浮点数 +SAMPLEFORMAT_32;24-bit浮点数 +SAMPLEFORMAT_64;32-bit浮点数 SAVEDLG_AUTOSUFFIX;自动加后缀到已经存在的文件 SAVEDLG_FILEFORMAT;文件格式 +SAVEDLG_FILEFORMAT_FLOAT;浮点数 SAVEDLG_FORCEFORMATOPTS;强制保存选项 SAVEDLG_JPEGQUAL;JPEG质量 SAVEDLG_PUTTOQUEUE;放入队列 -SAVEDLG_PUTTOQUEUEHEAD;放在处理序列首位 -SAVEDLG_PUTTOQUEUETAIL;放在处理序列末位 +SAVEDLG_PUTTOQUEUEHEAD;放在处理队列首位 +SAVEDLG_PUTTOQUEUETAIL;放在处理队列末位 SAVEDLG_SAVEIMMEDIATELY;立即保存 SAVEDLG_SAVESPP;随图片保存处理参数 SAVEDLG_SUBSAMP;二次抽样 SAVEDLG_SUBSAMP_1;极限压缩 SAVEDLG_SUBSAMP_2;平衡 SAVEDLG_SUBSAMP_3;质量至优 -SAVEDLG_TIFFUNCOMPRESSED;未压缩的TIFF +SAVEDLG_TIFFUNCOMPRESSED;无压缩TIFF SAVEDLG_WARNFILENAME;文件将被命名 -TOOLBAR_TOOLTIP_CROP;剪裁选择 (快捷键: C) -TOOLBAR_TOOLTIP_HAND;手形工具 (快捷键: N) -TOOLBAR_TOOLTIP_STRAIGHTEN;基准线选择 (快捷键: S) -TOOLBAR_TOOLTIP_WB;白平衡采样 (快捷键: W) +TOOLBAR_TOOLTIP_CROP;裁剪选择\n快捷键:c +TOOLBAR_TOOLTIP_HAND;手形工具\n快捷键:n +TOOLBAR_TOOLTIP_STRAIGHTEN;基准线选择\n快捷键:s +TOOLBAR_TOOLTIP_WB;白平衡采样\n快捷键:w TP_BWMIX_ALGO_LI;线性 TP_BWMIX_ALGO_SP;特定效果 TP_BWMIX_AUTOCH;自动 @@ -670,47 +992,59 @@ TP_BWMIX_FILTER_YELLOW;黄 TP_BWMIX_GAMMA;伽马矫正 TP_BWMIX_GAM_TOOLTIP;矫正红绿蓝三色通道(RGB)伽马 TP_BWMIX_LABEL;黑白 -TP_BWMIX_MET;方式 -TP_BWMIX_MET_DESAT;淡化饱和度 -TP_BWMIX_MET_LUMEQUAL;明亮度平衡工具 +TP_BWMIX_MET;方法 +TP_BWMIX_MET_CHANMIX;通道混合器 +TP_BWMIX_MET_DESAT;去饱和 +TP_BWMIX_MET_LUMEQUAL;亮度均衡工具 +TP_BWMIX_MIXC;通道混合器 +TP_BWMIX_NEUTRAL;重置 TP_BWMIX_SETTING;预设 -TP_BWMIX_SETTING_TOOLTIP;不同预设 (影片、水平排布等)或手动通道混合工具设置 +TP_BWMIX_SETTING_TOOLTIP;不同预设 (胶片、风光等)或手动的通道混合工具设置 TP_BWMIX_SET_HIGHCONTAST;高对比度 TP_BWMIX_SET_HIGHSENSIT;高灵敏度 TP_BWMIX_SET_INFRARED;红外 TP_BWMIX_SET_LANDSCAPE;水平排布(风景) TP_BWMIX_SET_LOWSENSIT;低灵敏度 -TP_BWMIX_SET_LUMINANCE;光亮度 +TP_BWMIX_SET_LUMINANCE;亮度 TP_BWMIX_SET_PANCHRO;全色的 TP_BWMIX_SET_PORTRAIT;垂直排布(肖像) -TP_BWMIX_TCMODE_FILMLIKE;黑白电影样式 -TP_BWMIX_TCMODE_STANDARD;黑白电影标准 +TP_BWMIX_SET_RGBABS;绝对RGB +TP_BWMIX_SET_RGBREL;相对RGB +TP_BWMIX_TCMODE_FILMLIKE;黑白 仿胶片式 +TP_BWMIX_TCMODE_SATANDVALBLENDING;黑白 饱和度亮度混合 +TP_BWMIX_TCMODE_STANDARD;黑白 标准 +TP_BWMIX_TCMODE_WEIGHTEDSTD;黑白 加权标准 TP_BWMIX_VAL;L TP_CACORRECTION_BLUE;蓝 TP_CACORRECTION_LABEL;色散矫正 TP_CACORRECTION_RED;红 +TP_CBDL_AFT;在黑白工具之后 +TP_CBDL_BEF;在黑白工具之前 +TP_CBDL_METHOD;处理时机 +TP_CBDL_METHOD_TOOLTIP;选择让分频反差调整工具先于黑白工具生效(使分频反差的工作色彩空间为L*a*b*),或后于黑白工具生效(此时的工作色彩空间为RGB) TP_CHMIXER_BLUE;蓝 TP_CHMIXER_GREEN;绿 TP_CHMIXER_LABEL;通道混合 TP_CHMIXER_RED;红 TP_COARSETRAF_TOOLTIP_HFLIP;水平翻转 -TP_COARSETRAF_TOOLTIP_ROTLEFT;左转 -TP_COARSETRAF_TOOLTIP_ROTRIGHT;右转 +TP_COARSETRAF_TOOLTIP_ROTLEFT;左转\n\n快捷键:\n[ - 多编辑器模式,\nAlt-[ - 单编辑器模式 +TP_COARSETRAF_TOOLTIP_ROTRIGHT;右转\n\n快捷键:\n] - 多编辑器模式,\nAlt-] - 单编辑器模式 TP_COARSETRAF_TOOLTIP_VFLIP;竖直翻转 +TP_COLORAPP_BADPIXSL;热像素/坏点过滤器 TP_COLORAPP_LABEL_CAM02;图像调整 -TP_COLORAPP_LIGHT;光度 (J) -TP_COLORAPP_LIGHT_TOOLTIP; CIECAM02、Lab 、RGB中光度意义各不同 +TP_COLORAPP_LIGHT;明度 (J) +TP_COLORAPP_LIGHT_TOOLTIP; CIECAM02, Lab, RGB中,明度的意义各不相同 TP_COLORAPP_SURROUND_AVER;平均 TP_COLORAPP_SURROUND_DARK;暗 TP_COLORAPP_SURROUND_DIM;暗淡 -TP_COLORAPP_TCMODE_BRIGHTNESS;亮度 -TP_COLORAPP_TCMODE_LIGHTNESS;光度 +TP_COLORAPP_TCMODE_BRIGHTNESS;光亮度 +TP_COLORAPP_TCMODE_LIGHTNESS;明度 TP_COLORAPP_TCMODE_SATUR;色彩饱和度 TP_CROP_FIXRATIO;比例: TP_CROP_GTDIAGONALS;对角线法则 TP_CROP_GTEPASSPORT;生物辨识护照 -TP_CROP_GTFRAME;框架 -TP_CROP_GTGRID;方格 +TP_CROP_GTFRAME;方框 +TP_CROP_GTGRID;网格 TP_CROP_GTHARMMEANS;调和平均律 TP_CROP_GTNONE;无 TP_CROP_GTRULETHIRDS;三等份法则 @@ -718,27 +1052,73 @@ TP_CROP_GTTRIANGLE1;黄金三角 1 TP_CROP_GTTRIANGLE2;黄金三角 2 TP_CROP_GUIDETYPE;辅助方式: TP_CROP_H;高 -TP_CROP_LABEL;剪裁 +TP_CROP_LABEL;裁剪 +TP_CROP_RESETCROP;重置 +TP_CROP_SELECTCROP;选择区域 TP_CROP_W;宽 TP_CROP_X;x TP_CROP_Y;y TP_DARKFRAME_AUTOSELECT;自动选择 -TP_DARKFRAME_LABEL;黑框架 -TP_DEFRINGE_LABEL;去色彩边缘(紫边) +TP_DARKFRAME_LABEL;暗场 +TP_DEFRINGE_LABEL;去除色边 TP_DEFRINGE_RADIUS;半径 -TP_DIRPYRDENOISE_LUMINANCE_DETAIL;明亮度细节 -TP_DIRPYRDENOISE_LUMINANCE_SMOOTHING;光亮度/发光度 +TP_DEFRINGE_THRESHOLD;阈值 +TP_DEHAZE_DEPTH;纵深 +TP_DEHAZE_LABEL;去雾 +TP_DEHAZE_LUMINANCE;仅亮度 +TP_DEHAZE_SHOW_DEPTH_MAP;显示纵深蒙版 +TP_DEHAZE_STRENGTH;力度 +TP_DIRPYRDENOISE_CHROMINANCE_AUTOGLOBAL;全局自动 +TP_DIRPYRDENOISE_CHROMINANCE_BLUEYELLOW;色度—蓝-黄 +TP_DIRPYRDENOISE_CHROMINANCE_CURVE;色度曲线 +TP_DIRPYRDENOISE_CHROMINANCE_FRAME;色度噪点 +TP_DIRPYRDENOISE_CHROMINANCE_MANUAL;手动 +TP_DIRPYRDENOISE_CHROMINANCE_MASTER;色度—主控 +TP_DIRPYRDENOISE_CHROMINANCE_METHOD;方法 +TP_DIRPYRDENOISE_CHROMINANCE_PREVIEW_NOISEINFO;当前预览处噪点:中位数=%1 最大=%2 +TP_DIRPYRDENOISE_CHROMINANCE_PREVIEW_NOISEINFO_EMPTY;当前预览处噪点:中位数= - 最大= - +TP_DIRPYRDENOISE_CHROMINANCE_REDGREEN;色度—红-绿 +TP_DIRPYRDENOISE_LABEL;降噪 +TP_DIRPYRDENOISE_LUMINANCE_CONTROL;亮度控制 +TP_DIRPYRDENOISE_LUMINANCE_CURVE;亮度曲线 +TP_DIRPYRDENOISE_LUMINANCE_DETAIL;细节恢复 +TP_DIRPYRDENOISE_LUMINANCE_FRAME;亮度噪点 +TP_DIRPYRDENOISE_LUMINANCE_SMOOTHING;亮度 +TP_DIRPYRDENOISE_MAIN_COLORSPACE;色彩空间 TP_DIRPYRDENOISE_MAIN_COLORSPACE_RGB;RGB +TP_DIRPYRDENOISE_MAIN_COLORSPACE_TOOLTIP;对于Raw文件,RGB和L*a*b*均可用\n\n非Raw文件只可用L*a*b*空间,不论用户选择了哪个 +TP_DIRPYRDENOISE_MAIN_MODE;模式 +TP_DIRPYRDENOISE_MAIN_MODE_AGGRESSIVE;激进 +TP_DIRPYRDENOISE_MAIN_MODE_CONSERVATIVE;保守 +TP_DIRPYRDENOISE_MAIN_MODE_TOOLTIP;“保守”会保留低频的色度纹路,而“激进”会消除它们 +TP_DIRPYRDENOISE_MEDIAN_METHOD;中值法 +TP_DIRPYRDENOISE_MEDIAN_METHOD_CHROMINANCE;仅色度 +TP_DIRPYRDENOISE_MEDIAN_METHOD_LAB;L*a*b* +TP_DIRPYRDENOISE_MEDIAN_METHOD_LABEL;中值滤波器 +TP_DIRPYRDENOISE_MEDIAN_METHOD_LUMINANCE;仅亮度 +TP_DIRPYRDENOISE_MEDIAN_METHOD_RGB;RGB +TP_DIRPYRDENOISE_MEDIAN_METHOD_TOOLTIP;当使用“仅亮度”和“L*a*b*”法时,在降噪流水线中,\n中值滤波会在小波被应用后进行。\n当使用“RGB”模式时,它会在降噪流水线的最后被进行 +TP_DIRPYRDENOISE_MEDIAN_METHOD_WEIGHTED;权重L* (小) + a*b* (正常) +TP_DIRPYRDENOISE_MEDIAN_PASSES;中值迭代 +TP_DIRPYRDENOISE_MEDIAN_PASSES_TOOLTIP;使用3x3窗口进行三次中值迭代通常比使用7x7窗口进行一次迭代的效果更好 +TP_DIRPYRDENOISE_MEDIAN_TYPE;中值类型 +TP_DIRPYRDENOISE_MEDIAN_TYPE_TOOLTIP;使用你想要的窗口大小的中值滤波器。窗口大小越大,处理用时越长。\n3×3柔和:处理3x3窗口中的5个像素。\n3x3:处理3x3窗口里面的9个像素。\n5x5柔和:处理5x5窗口中的13个像素。\n5x5:处理5x5窗口中的25个像素。\n7x7:处理7x7窗口中的49个像素。\n9x9:处理9x9窗口中的81个像素。\n\n有时使用小窗口进行多次迭代的效果会优于使用大窗口进行一次迭代的效果 +TP_DIRPYRDENOISE_TYPE_3X3;3×3 +TP_DIRPYRDENOISE_TYPE_3X3SOFT;3×3柔和 +TP_DIRPYRDENOISE_TYPE_5X5;5×5 +TP_DIRPYRDENOISE_TYPE_5X5SOFT;5×5柔和 +TP_DIRPYRDENOISE_TYPE_7X7;7×7 +TP_DIRPYRDENOISE_TYPE_9X9;9×9 TP_DIRPYREQUALIZER_ALGO;皮肤色彩范围 TP_DIRPYREQUALIZER_ARTIF;减少杂色 TP_DIRPYREQUALIZER_HUESKIN;皮肤色相 TP_DIRPYREQUALIZER_LABEL;分频反差调整 -TP_DIRPYREQUALIZER_LUMACOARSEST;最粗 +TP_DIRPYREQUALIZER_LUMACOARSEST;最粗糙 TP_DIRPYREQUALIZER_LUMACONTRAST_MINUS;反差 - TP_DIRPYREQUALIZER_LUMACONTRAST_PLUS;反差 + -TP_DIRPYREQUALIZER_LUMAFINEST;最细 -TP_DIRPYREQUALIZER_LUMANEUTRAL;自然 -TP_DIRPYREQUALIZER_SKIN;皮肤色彩 针对/保护 +TP_DIRPYREQUALIZER_LUMAFINEST;最精细 +TP_DIRPYREQUALIZER_LUMANEUTRAL;还原 +TP_DIRPYREQUALIZER_SKIN;肤色针对/保护 TP_DIRPYREQUALIZER_THRESHOLD;阈值 TP_DISTORTION_AMOUNT;数量 TP_DISTORTION_LABEL;畸变 @@ -747,143 +1127,320 @@ TP_EPD_SCALE;拉伸 TP_EPD_STRENGTH;力度 TP_EXPOSURE_AUTOLEVELS;自动色阶 TP_EXPOSURE_BLACKLEVEL;黑点 -TP_EXPOSURE_BRIGHTNESS;亮度 -TP_EXPOSURE_CLIP;高光溢出 +TP_EXPOSURE_BRIGHTNESS;光亮度 +TP_EXPOSURE_CLAMPOOG;令超出色域的色彩溢出 +TP_EXPOSURE_CLIP;可溢出% +TP_EXPOSURE_CLIP_TIP;自动色阶功能可以让占总数的多少比例的像素溢出 TP_EXPOSURE_COMPRHIGHLIGHTS;高光压缩 TP_EXPOSURE_COMPRHIGHLIGHTSTHRESHOLD;高光压缩阈值 TP_EXPOSURE_COMPRSHADOWS;阴影压缩 TP_EXPOSURE_CONTRAST;对比度 -TP_EXPOSURE_CURVEEDITOR;影调曲线 +TP_EXPOSURE_CURVEEDITOR;色调曲线 TP_EXPOSURE_CURVEEDITOR1;色调曲线 1 TP_EXPOSURE_CURVEEDITOR2;色调曲线 2 -TP_EXPOSURE_CURVEEDITOR2_TOOLTIP;请从 RawPedia 网站中 Exposure > Tone Curve 文章中了解如何使用双色调曲线 +TP_EXPOSURE_CURVEEDITOR2_TOOLTIP;请在RawPedia的Exposure > Tone Curve文章中了解如何使用双色调曲线 TP_EXPOSURE_EXPCOMP;曝光补偿 +TP_EXPOSURE_HISTMATCHING;自适应色调曲线 +TP_EXPOSURE_HISTMATCHING_TOOLTIP;自动调整滑条和曲线(不包括曝光补偿)以使图片贴近于内嵌于Raw的JPEG预览图 TP_EXPOSURE_LABEL;曝光 TP_EXPOSURE_SATURATION;色彩饱和度 TP_EXPOSURE_TCMODE_FILMLIKE;仿胶片式 TP_EXPOSURE_TCMODE_LABEL1;曲线模式1 TP_EXPOSURE_TCMODE_LABEL2;曲线模式2 -TP_EXPOSURE_TCMODE_SATANDVALBLENDING;饱和度和混合值 +TP_EXPOSURE_TCMODE_LUMINANCE;亮度 +TP_EXPOSURE_TCMODE_PERCEPTUAL;感知性 +TP_EXPOSURE_TCMODE_SATANDVALBLENDING;饱和度-亮度混合 TP_EXPOSURE_TCMODE_STANDARD;标准 -TP_EXPOSURE_TCMODE_WEIGHTEDSTD;倾向于标准 +TP_EXPOSURE_TCMODE_WEIGHTEDSTD;加权标准 +TP_EXPOS_BLACKPOINT_LABEL;Raw黑点 +TP_EXPOS_WHITEPOINT_LABEL;Raw白点 +TP_FILMNEGATIVE_LABEL;胶片负片 +TP_FILMNEGATIVE_PICK;选择(两个)中灰点 +TP_FILMSIMULATION_LABEL;胶片模拟 +TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee被设置寻找用于胶片模拟工具的Hald CLUT图像,图像所在的文件夹加载时间过长。\n前往参数设置-图片处理-Hald CLUT路径\n以寻找被使用的文件夹是哪个。你应该令该文件夹指向一个只有Hald CLUT图像而没有其他图片的文件夹,而如果你不想用胶片模拟功能,就将它指向一个空文件夹。\n\n阅读RawPedia的Film Simulation词条以获取更多信息。\n\n你现在想取消扫描吗? +TP_FILMSIMULATION_STRENGTH;力度 +TP_FILMSIMULATION_ZEROCLUTSFOUND;在参数设置中设定HaldCLUT目录 TP_FLATFIELD_AUTOSELECT;自动选择 TP_FLATFIELD_BLURRADIUS;模糊半径 TP_FLATFIELD_BLURTYPE;模糊种类 TP_FLATFIELD_BT_AREA;区域 TP_FLATFIELD_BT_HORIZONTAL;水平 -TP_FLATFIELD_BT_VERTHORIZ;垂直 + 水平 +TP_FLATFIELD_BT_VERTHORIZ;垂直+水平 TP_FLATFIELD_BT_VERTICAL;垂直 +TP_FLATFIELD_CLIPCONTROL;溢出控制 +TP_FLATFIELD_CLIPCONTROL_TOOLTIP;溢出控制能够避免由于平场的应用而导致的高光溢出。如果在应用平场之前就有溢出的高光,数值就会为0 TP_FLATFIELD_LABEL;平场 +TP_GENERAL_11SCALE_TOOLTIP;此工具的效果仅在以1:1大小预览时才可见/准确 TP_GRADIENT_CENTER;中心 TP_GRADIENT_CENTER_X;中心 X +TP_GRADIENT_CENTER_X_TOOLTIP;将渐变滤镜向左(负值)或向右(正值)移动 TP_GRADIENT_CENTER_Y;中心 Y +TP_GRADIENT_CENTER_Y_TOOLTIP;将渐变滤镜向上(负值)或向下(正值)移动 TP_GRADIENT_DEGREE;角度 -TP_GRADIENT_DEGREE_TOOLTIP;转动角度数 +TP_GRADIENT_DEGREE_TOOLTIP;转动的角度数 TP_GRADIENT_FEATHER;羽化 -TP_GRADIENT_FEATHER_TOOLTIP;图像对角比例表示渐变宽度 -TP_GRADIENT_LABEL;渐变过滤 -TP_GRADIENT_STRENGTH;延展 +TP_GRADIENT_FEATHER_TOOLTIP;以图像对角线的长度为100,设定渐变的宽度 +TP_GRADIENT_LABEL;渐变滤镜 +TP_GRADIENT_STRENGTH;力度 +TP_GRADIENT_STRENGTH_TOOLTIP;滤镜的强度(档数) TP_HLREC_BLEND;混合 -TP_HLREC_CIELAB;CIELab模式混合 +TP_HLREC_CIELAB;CIELab混合 TP_HLREC_COLOR;色彩延伸 +TP_HLREC_ENA_TOOLTIP;可能会被自动色阶功能启用 TP_HLREC_LABEL;高光还原 TP_HLREC_LUMINANCE;亮度还原 TP_HLREC_METHOD;方法: -TP_HSVEQUALIZER_CHANNEL;频道 +TP_HSVEQUALIZER_CHANNEL;通道 TP_HSVEQUALIZER_HUE;H -TP_HSVEQUALIZER_LABEL;HSV 平衡 +TP_HSVEQUALIZER_LABEL;HSV均衡器 TP_HSVEQUALIZER_SAT;S TP_HSVEQUALIZER_VAL;V TP_ICM_INPUTCAMERA;相机缺省 +TP_ICM_INPUTCAMERAICC;自适应相机档案 TP_ICM_INPUTCUSTOM;自定义 -TP_ICM_INPUTCUSTOM_TOOLTIP;选择你自己的 DCP/ICC 色彩档案 +TP_ICM_INPUTCUSTOM_TOOLTIP;选择你自己的DCP/ICC色彩档案 TP_ICM_INPUTDLGLABEL;选择输入ICC配置... TP_ICM_INPUTEMBEDDED;如可能, 使用内置 -TP_ICM_INPUTEMBEDDED_TOOLTIP;使用色彩档案嵌入非raw文件 +TP_ICM_INPUTEMBEDDED_TOOLTIP;使用非raw文件内嵌的色彩档案 TP_ICM_INPUTNONE;无档案 +TP_ICM_INPUTNONE_TOOLTIP;不使用任何色彩档案。\n仅在特殊情况下使用此选项 TP_ICM_INPUTPROFILE;输入配置 TP_ICM_LABEL;ICM -TP_ICM_NOICM;No ICM: sRGB配置 +TP_ICM_NOICM;无ICM:sRGB配置 TP_ICM_OUTPUTPROFILE;输出配置 -TP_ICM_TONECURVE;使用 DCP 色调曲线 +TP_ICM_TONECURVE;使用DCP色调曲线 TP_ICM_WORKINGPROFILE;当前配置 -TP_IMPULSEDENOISE_LABEL;降低脉冲噪声 +TP_IMPULSEDENOISE_LABEL;脉冲噪声降低 TP_IMPULSEDENOISE_THRESH;阈值 TP_LABCURVE_AVOIDCOLORSHIFT;避免色彩偏移 TP_LABCURVE_AVOIDCOLORSHIFT_TOOLTIP;使色彩适应当前色彩空间范围, 并使用Munsell色矫正 -TP_LABCURVE_BRIGHTNESS;光度 -TP_LABCURVE_CHROMATICITY;色度 CIE +TP_LABCURVE_BRIGHTNESS;光强度 +TP_LABCURVE_CHROMATICITY;色度 +TP_LABCURVE_CHROMA_TOOLTIP;若要应用黑白色调,将色度值降低为-100 TP_LABCURVE_CONTRAST;对比度 -TP_LABCURVE_CURVEEDITOR;明亮度曲线 +TP_LABCURVE_CURVEEDITOR;亮度曲线 +TP_LABCURVE_CURVEEDITOR_CC_TOOLTIP;根据色度(C)调整色度(C),C=f(C) +TP_LABCURVE_CURVEEDITOR_CH;CH +TP_LABCURVE_CURVEEDITOR_CH_TOOLTIP;根据色相(H)调整色度(C),C=f(H) +TP_LABCURVE_CURVEEDITOR_CL;CL +TP_LABCURVE_CURVEEDITOR_CL_TOOLTIP;根据亮度(L)调整色度(C),C=f(L) +TP_LABCURVE_CURVEEDITOR_HH;HH +TP_LABCURVE_CURVEEDITOR_HH_TOOLTIP;根据色相(H)调整色相(H),H=f(H) +TP_LABCURVE_CURVEEDITOR_LC;LC +TP_LABCURVE_CURVEEDITOR_LC_TOOLTIP;根据色度(C)调整亮度(L),L=f(C) +TP_LABCURVE_CURVEEDITOR_LH;LH +TP_LABCURVE_CURVEEDITOR_LH_TOOLTIP;根据色相(H)调整亮度(L),L=f(H) +TP_LABCURVE_CURVEEDITOR_LL_TOOLTIP;根据亮度(L)调整亮度(L),L=f(L) TP_LABCURVE_LABEL;Lab调整 +TP_LABCURVE_LCREDSK;将LC曲线的效果限定于红色和肤色 +TP_LABCURVE_LCREDSK_TIP;勾选该选项框,LC曲线就只会影响红色和肤色。\n取消勾选,它的效果就会应用到所有色彩上 +TP_LABCURVE_RSTPROTECTION;红色与肤色保护 +TP_LABCURVE_RSTPRO_TOOLTIP;作用在色度滑条和CC曲线的调整上 TP_LENSGEOM_AUTOCROP;自动剪切 TP_LENSGEOM_FILL;自动填充 -TP_LENSGEOM_LABEL;镜头 / 几何 +TP_LENSGEOM_LABEL;镜头/几何 +TP_LENSGEOM_LIN;线性 +TP_LENSGEOM_LOG;对数 +TP_LENSPROFILE_CORRECTION_AUTOMATCH;自动选择 +TP_LENSPROFILE_CORRECTION_LCPFILE;LCP文件 +TP_LENSPROFILE_CORRECTION_MANUAL;手动选择 TP_LENSPROFILE_LABEL;镜头矫正档案 +TP_LENSPROFILE_LENS_WARNING;警告:制作镜头档案时相机所用的裁切系数比本图片拍摄时\n所使用的裁剪系数更大。矫正结果可能出现错误 +TP_LENSPROFILE_MODE_HEADER;镜头档案 +TP_LENSPROFILE_USE_CA;色差 +TP_LENSPROFILE_USE_GEOMETRIC;几何畸变 +TP_LENSPROFILE_USE_HEADER;矫正 +TP_LENSPROFILE_USE_VIGNETTING;暗角 +TP_LOCALCONTRAST_AMOUNT;数量 +TP_LOCALCONTRAST_DARKNESS;暗部等级 +TP_LOCALCONTRAST_LABEL;局部反差 +TP_LOCALCONTRAST_LIGHTNESS;亮部等级 +TP_LOCALCONTRAST_RADIUS;半径 +TP_METADATA_EDIT;应用修改 +TP_METADATA_MODE;元数据复制模式 +TP_METADATA_STRIP;移除所有元数据 +TP_NEUTRAL;重置 +TP_NEUTRAL_TIP;还原各个曝光控制滑条的值\n自动色阶所能调整的滑条都会被此还原,不论你是否使用了自动色阶功能 TP_PCVIGNETTE_FEATHER;羽化 +TP_PCVIGNETTE_FEATHER_TOOLTIP;羽化:\n0 = 仅边角\n50 = 到达一半的位置\n100 = 到达中心 TP_PCVIGNETTE_LABEL;暗角滤镜 TP_PCVIGNETTE_ROUNDNESS;圆度 +TP_PCVIGNETTE_ROUNDNESS_TOOLTIP;圆度:\n0 = 矩形\n50 = 适于图像的椭圆\n100 = 圆形 TP_PCVIGNETTE_STRENGTH;力度 -TP_PCVIGNETTE_STRENGTH_TOOLTIP;滤镜的力度刻度 (到达角落) +TP_PCVIGNETTE_STRENGTH_TOOLTIP;滤镜的曝光补偿力度(到达边角) +TP_PDSHARPENING_LABEL;捕图加锐 TP_PERSPECTIVE_HORIZONTAL;水平 TP_PERSPECTIVE_LABEL;视角 TP_PERSPECTIVE_VERTICAL;垂直 -TP_PREPROCESS_LABEL;处理中 -TP_PREPROCESS_LINEDENOISE;线性噪点过滤 -TP_PREPROCESS_NO_FOUND;没发现 +TP_PFCURVE_CURVEEDITOR_CH;色相 +TP_PFCURVE_CURVEEDITOR_CH_TOOLTIP;控制去除某个色彩的色边的力度。\n越向上 = 越强,\n越向下 = 越弱 +TP_PREPROCESS_DEADPIXFILT;坏点过滤器 +TP_PREPROCESS_DEADPIXFILT_TOOLTIP;尝试过滤坏点 +TP_PREPROCESS_GREENEQUIL;绿平衡 +TP_PREPROCESS_HOTPIXFILT;热像素过滤器 +TP_PREPROCESS_HOTPIXFILT_TOOLTIP;尝试过滤热像素 +TP_PREPROCESS_LABEL;预处理 +TP_PREPROCESS_LINEDENOISE;线状噪点过滤 +TP_PREPROCESS_LINEDENOISE_DIRECTION;方向 +TP_PREPROCESS_LINEDENOISE_DIRECTION_BOTH;双向 +TP_PREPROCESS_LINEDENOISE_DIRECTION_HORIZONTAL;横向 +TP_PREPROCESS_LINEDENOISE_DIRECTION_PDAF_LINES;横向,只在PDAF点所在的行上 +TP_PREPROCESS_LINEDENOISE_DIRECTION_VERTICAL;纵向 +TP_PREPROCESS_NO_FOUND;未检测出 +TP_PREPROCESS_PDAFLINESFILTER;PDAF条纹过滤器 +TP_PRSHARPENING_LABEL;调整大小后加锐 +TP_PRSHARPENING_TOOLTIP;在调整图片大小后加锐图像。仅在选择"Lanczos"算法时可用。\n本工具的效果无法预览。见RawPedia的文章以了解本工具的使用教程 TP_RAWCACORR_AUTO;自动修正 +TP_RAWCACORR_AUTOIT;迭代 +TP_RAWCACORR_AUTOIT_TOOLTIP;若“自动矫正”被勾选,此设置便可用。\n自动矫正是保守的,也就是说它经常不会去除所有色差。\n要移除全部色差,你可以使用至多迭代五次的色差矫正迭代。\n每次迭代会纠正上个迭代未能修正的色差,代价是需要花费额外的处理时间 +TP_RAWCACORR_AVOIDCOLORSHIFT;避免偏色 TP_RAWCACORR_CABLUE;蓝 TP_RAWCACORR_CARED;红 -TP_RESIZE_CROPPEDAREA;切出的部分 -TP_RESIZE_FITBOX;Bounding Box -TP_RESIZE_FULLIMAGE;全图 +TP_RAWCACORR_LABEL;色差矫正 +TP_RAWEXPOS_BLACK_0;绿 1 (lead) +TP_RAWEXPOS_BLACK_1;红 +TP_RAWEXPOS_BLACK_2;蓝 +TP_RAWEXPOS_BLACK_3;绿 2 +TP_RAWEXPOS_BLACK_BLUE;蓝 +TP_RAWEXPOS_BLACK_GREEN;绿 +TP_RAWEXPOS_BLACK_RED;红 +TP_RAWEXPOS_LINEAR;白点矫正 +TP_RAWEXPOS_RGB;红,绿,蓝 +TP_RAW_AHD;AHD +TP_RAW_AMAZE;AMaZE +TP_RAW_AMAZEVNG4;AMaZE+VNG4 +TP_RAW_BORDER;边界 +TP_RAW_DCB;DCB +TP_RAW_DCBENHANCE;DCB优化 +TP_RAW_DCBITERATIONS;DCB迭代数 +TP_RAW_DCBVNG4;DCB+VNG4 +TP_RAW_DMETHOD;方法 +TP_RAW_DMETHOD_PROGRESSBAR;%1 去马赛克中... +TP_RAW_DMETHOD_PROGRESSBAR_REFINE;去马赛克精细化... +TP_RAW_DMETHOD_TOOLTIP;注:IGV和LMMSE是专门用于配合降噪工具,在为高ISO图片降噪时不产生迷宫状噪点,色调分离或是褪色所用的。\n像素偏移是为宾得/索尼的像素偏移文件所用的。此算法将使用AMaZE算法来处理非像素偏移文件 +TP_RAW_DUALDEMOSAICAUTOCONTRAST;自动阈值 +TP_RAW_DUALDEMOSAICAUTOCONTRAST_TOOLTIP;如果勾选框被打勾(推荐如此做),RawTherapee会根据图片中的平缓区域自动计算一个最优值。\n如果图像中没有平缓的区域,或是图片噪点太多,该数值会被设为0\n若想手动调整此数值,首先要将勾选框取消勾选(合适的值取决于具体图像的情况) +TP_RAW_DUALDEMOSAICCONTRAST;反差阈值 +TP_RAW_EAHD;EAHD +TP_RAW_FALSECOLOR;伪色抑制步长 +TP_RAW_FAST;Fast +TP_RAW_HD;阈值 +TP_RAW_HD_TOOLTIP;更低的数值会使热像素/坏点的检测更加激进,但是“宁错杀,不放过”的激进程度可能会导致杂点的产生。在启用本功能后,如果你发现了新出现的杂点,就逐渐提高阈值,直至杂点消失 +TP_RAW_HPHD;HPHD +TP_RAW_IGV;IGV +TP_RAW_IMAGENUM;子图像 +TP_RAW_IMAGENUM_SN;SN模式 +TP_RAW_IMAGENUM_TOOLTIP;某些Raw文件包含多张子图像(宾得/索尼的像素偏移,宾得的3张合并HDR,佳能的双像素,富士的EXR)。\n\n当使用除像素偏移外的任意一个去马赛克算法时,本栏用来选择哪帧子图像被处理。\n\n当在像素偏移的Raw文件上使用像素偏移去马赛克算法时,所有子图像都会被应用,此时本栏用来选择哪帧子图像被用来处理动体 +TP_RAW_LABEL;去马赛克 +TP_RAW_LMMSE;LMMSE +TP_RAW_LMMSEITERATIONS;LMMSE优化步长 +TP_RAW_LMMSE_TOOLTIP;添加gamma(步长1),中位数(步长2-4)和精细化(步长5-6)以减少杂点并提升信噪比 +TP_RAW_MONO;黑白 +TP_RAW_NONE;无(显示传感器阵列) +TP_RAW_PIXELSHIFT;像素偏移 +TP_RAW_PIXELSHIFTBLUR;动体蒙版模糊 +TP_RAW_PIXELSHIFTDMETHOD;动体区域的去马赛克算法 +TP_RAW_PIXELSHIFTEPERISO;敏感度 +TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;默认值0在原生ISO下应该具有不错的效果。\n更大的数值会增强动体检测的敏感度。\n以微小的步长调整此值,同时观察动体蒙版的变化。\n对于欠曝/高ISO的照片,应提高此值 +TP_RAW_PIXELSHIFTEQUALBRIGHT;将不同照片的亮度均等化 +TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;将各个通道分别均等化 +TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;启用:对RGB通道分别进行均等化。\n禁用:使用同一个均等化系数对所有通道进行均等化 +TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;以当前被选中的一帧图像为基准,均等化各帧图像的亮度。\n如果各帧中有过曝的区域,应选择最亮的一帧以避免过曝区域出现紫色,也可启用动体补正来解决该问题 +TP_RAW_PIXELSHIFTGREEN;检查绿色通道以检测动体 +TP_RAW_PIXELSHIFTHOLEFILL;填补动体蒙版的洞 +TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;填补动体蒙版中间所存在的洞 +TP_RAW_PIXELSHIFTMEDIAN;对动体区域使用中值 +TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;对于运动的部分,使用所有图片的中值,而不是用户选择的某一帧图片。\n移除在所有图片中位置都不同的物体。\n在移动慢(重叠)的物体上会产生动体效果 +TP_RAW_PIXELSHIFTMM_AUTO;自动 +TP_RAW_PIXELSHIFTMM_CUSTOM;自定义 +TP_RAW_PIXELSHIFTMM_OFF;关闭 +TP_RAW_PIXELSHIFTMOTIONMETHOD;动体补正 +TP_RAW_PIXELSHIFTNONGREENCROSS;检查红/蓝色通道以检测动体 +TP_RAW_PIXELSHIFTSHOWMOTION;显示动体蒙版 +TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;仅显示动体蒙版 +TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;显示没有照片的动体蒙版 +TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;在图像上用绿色蒙版显示动体区域 +TP_RAW_PIXELSHIFTSIGMA;模糊半径 +TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;默认半径值1.0一般对于原生ISO来说足够好。\n对于高ISO照片,提高此值,5.0是不错的起始点。\n在改变此值的同时关注动体蒙版 +TP_RAW_PIXELSHIFTSMOOTH;顺滑过渡 +TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;让存在动体的区域与没有动体之间的区域之间顺滑地过渡。\n将此值设置为0以禁用顺滑过渡\n将此值设置为1以使用AMaZE/LMMSE算法(这取决于你是否选择了“使用LMMSE”)所解出的你所选择的那一帧图像,如果你选择了“使用中值”,那么就会根据通过所有图像计算出的中值解出图像 +TP_RAW_RCD;RCD +TP_RAW_RCDVNG4;RCD+VNG4 +TP_RAW_SENSOR_BAYER_LABEL;拜耳阵列传感器 +TP_RAW_VNG4;VNG4 +TP_RESIZE_ALLOW_UPSCALING;允许升采样 +TP_RESIZE_APPLIESTO;应用到: +TP_RESIZE_CROPPEDAREA;裁剪区域 +TP_RESIZE_FITBOX;矩形区域 +TP_RESIZE_FULLIMAGE;整张图 TP_RESIZE_H;高: TP_RESIZE_HEIGHT;高度 TP_RESIZE_LABEL;调整大小 TP_RESIZE_LANCZOS;Lanczos算法 -TP_RESIZE_METHOD;方式: +TP_RESIZE_METHOD;方法: TP_RESIZE_NEAREST;最近点 -TP_RESIZE_SCALE;比例 -TP_RESIZE_SPECIFY;指定: +TP_RESIZE_SCALE;缩放倍数 +TP_RESIZE_SPECIFY;调整: TP_RESIZE_W;宽: TP_RESIZE_WIDTH;宽度 +TP_RETINEX_CONTEDIT_HSL;HSL直方图 +TP_RETINEX_CONTEDIT_LAB;L*a*b*直方图 +TP_RETINEX_CONTEDIT_LH;色调 +TP_RETINEX_CONTEDIT_MAP;均衡器 +TP_RETINEX_EQUAL;均衡器 +TP_RETINEX_VIEW_UNSHARP;USM锐化 TP_RGBCURVES_BLUE;B -TP_RGBCURVES_CHANNEL;频道 +TP_RGBCURVES_CHANNEL;通道 TP_RGBCURVES_GREEN;G TP_RGBCURVES_LABEL;RGB曲线 -TP_RGBCURVES_LUMAMODE;光度模式 -TP_RGBCURVES_LUMAMODE_TOOLTIP;光度模式 允许改变R、G、B三种通道光量但不影响色彩 +TP_RGBCURVES_LUMAMODE;亮度模式 +TP_RGBCURVES_LUMAMODE_TOOLTIP;亮度模式允许改变R、G、B三个通道的亮度分配而不影响色彩 TP_RGBCURVES_RED;R TP_ROTATE_DEGREE;角度 TP_ROTATE_LABEL;旋转 -TP_ROTATE_SELECTLINE; 选择基准线 -TP_SAVEDIALOG_OK_TIP;快捷键: Ctrl-Enter +TP_ROTATE_SELECTLINE;选择基准线 +TP_SAVEDIALOG_OK_TIP;快捷键:Ctrl-Enter TP_SHADOWSHLIGHTS_HIGHLIGHTS;高光 -TP_SHADOWSHLIGHTS_HLTONALW;影调范围 +TP_SHADOWSHLIGHTS_HLTONALW;色调范围 TP_SHADOWSHLIGHTS_LABEL;阴影/高光 TP_SHADOWSHLIGHTS_RADIUS;半径 TP_SHADOWSHLIGHTS_SHADOWS;阴影 -TP_SHADOWSHLIGHTS_SHTONALW;影调范围 +TP_SHADOWSHLIGHTS_SHTONALW;色调范围 TP_SHARPENEDGE_AMOUNT;数量 TP_SHARPENEDGE_LABEL;边缘 -TP_SHARPENEDGE_PASSES;迭代次数 -TP_SHARPENEDGE_THREE;仅光度 +TP_SHARPENEDGE_PASSES;迭代 +TP_SHARPENEDGE_THREE;仅亮度 TP_SHARPENING_AMOUNT;数量 +TP_SHARPENING_BLUR;模糊半径 +TP_SHARPENING_CONTRAST;反差阈值 TP_SHARPENING_EDRADIUS;半径 TP_SHARPENING_EDTOLERANCE;边缘容差 TP_SHARPENING_HALOCONTROL;光晕控制 TP_SHARPENING_HCAMOUNT;数量 +TP_SHARPENING_ITERCHECK;自动限制迭代 TP_SHARPENING_LABEL;锐化 -TP_SHARPENING_METHOD;方式 +TP_SHARPENING_METHOD;方法 TP_SHARPENING_ONLYEDGES;仅锐化边缘 TP_SHARPENING_RADIUS;半径 -TP_SHARPENING_RLD;理查森-露西反卷积法 +TP_SHARPENING_RADIUS_BOOST;边缘半径值提升 +TP_SHARPENING_RLD;理查森-露西反卷积法(RLD) TP_SHARPENING_RLD_AMOUNT;数量 TP_SHARPENING_RLD_DAMPING;衰减 TP_SHARPENING_RLD_ITERATIONS;迭代 TP_SHARPENING_THRESHOLD;阈值 TP_SHARPENING_USM;USM锐化 TP_SHARPENMICRO_AMOUNT;数量 +TP_SHARPENMICRO_CONTRAST;反差阈值 +TP_SHARPENMICRO_LABEL;微反差 +TP_SHARPENMICRO_MATRIX;使用3×3阵列而非5×5阵列 +TP_SHARPENMICRO_UNIFORMITY;均匀度 +TP_TM_FATTAL_AMOUNT;数量 +TP_TM_FATTAL_ANCHOR;锚点 +TP_TM_FATTAL_LABEL;动态范围压缩 +TP_TM_FATTAL_THRESHOLD;细节 +TP_VIBRANCE_AVOIDCOLORSHIFT;避免偏色 +TP_VIBRANCE_CURVEEDITOR_SKINTONES_TOOLTIP;根据色相(H)调整色相(H),H=f(H) +TP_VIBRANCE_PROTECTSKINS;保护肤色 TP_VIGNETTING_AMOUNT;数量 TP_VIGNETTING_CENTER;中心 TP_VIGNETTING_CENTER_X;中心 X @@ -891,6 +1448,106 @@ TP_VIGNETTING_CENTER_Y;中心 Y TP_VIGNETTING_LABEL;暗角矫正 TP_VIGNETTING_RADIUS;半径 TP_VIGNETTING_STRENGTH;力度 +TP_WAVELET_1;第1级 +TP_WAVELET_2;第2级 +TP_WAVELET_3;第3级 +TP_WAVELET_4;第4级 +TP_WAVELET_5;第5级 +TP_WAVELET_6;第6级 +TP_WAVELET_7;第7级 +TP_WAVELET_8;第8级 +TP_WAVELET_9;第9级 +TP_WAVELET_APPLYTO;应用到 +TP_WAVELET_AVOID;避免偏色 +TP_WAVELET_B0;黑色 +TP_WAVELET_B1;灰色 +TP_WAVELET_B2;残差图 +TP_WAVELET_BACKGROUND;背景 +TP_WAVELET_BACUR;曲线 +TP_WAVELET_BANONE;无 +TP_WAVELET_BASLI;滑条 +TP_WAVELET_CCURVE;局部反差 +TP_WAVELET_CH1;应用到整个色度范围 +TP_WAVELET_CH2;根据饱和度高低 +TP_WAVELET_CH3;与反差等级挂钩 +TP_WAVELET_CHCU;曲线 +TP_WAVELET_CHR;色度-反差挂钩力度 +TP_WAVELET_CHRO;根据饱和度高低 +TP_WAVELET_CHSL;滑条 +TP_WAVELET_CHTYPE;色度应用方法 +TP_WAVELET_COMPCONT;反差 +TP_WAVELET_CONTR;色彩范围 +TP_WAVELET_CONTRA;反差 +TP_WAVELET_CONTRAST_MINUS;反差 - +TP_WAVELET_CONTRAST_PLUS;反差 + +TP_WAVELET_CONTRA_TOOLTIP;改变残差图的反差 +TP_WAVELET_CTYPE;色度控制 +TP_WAVELET_DALL;所有方向 +TP_WAVELET_DAUB;边缘表现 +TP_WAVELET_DAUB2;D2-低 +TP_WAVELET_DAUB4;D4-标准 +TP_WAVELET_DAUB6;D6-标准增强 +TP_WAVELET_DAUB10;D10-中等 +TP_WAVELET_DAUB14;D14-高 +TP_WAVELET_DAUB_TOOLTIP;改变多贝西系数:\nD4 = 标准,\nD14 = 一般而言表现最好,但会增加10%的处理耗时。\n\n影响边缘检测以及较低层级的质量。但是质量不完全和这个系数有关,可能会随具体的图像和处理方式而变化 +TP_WAVELET_DONE;纵向 +TP_WAVELET_DTHR;斜向 +TP_WAVELET_DTWO;横向 +TP_WAVELET_EDCU;曲线 +TP_WAVELET_EDGCONT;局部反差 +TP_WAVELET_EDGE;边缘锐度 +TP_WAVELET_EDGTHRESH;细节 +TP_WAVELET_EDGTHRESH_TOOLTIP;改变力度在第1级和其它层级之间的分配。阈值越高,在第1级上的活动越突出。谨慎使用负值,因为这会让更高层级上的活动更强烈,可能导致杂点的出现。 +TP_WAVELET_EDRAD;半径 +TP_WAVELET_EDSL;阈值滑条 +TP_WAVELET_EDVAL;力度 +TP_WAVELET_FINEST;最精细 +TP_WAVELET_HS1;全部亮度范围 +TP_WAVELET_HS2;阴影/高光 +TP_WAVELET_HUESKIN;肤色和其它色彩 +TP_WAVELET_HUESKY;天空色 +TP_WAVELET_LABEL;小波层级 +TP_WAVELET_LARGEST;最粗糙 +TP_WAVELET_LEVCH;色度 +TP_WAVELET_LEVDIR_ALL;所有方向的全部层级 +TP_WAVELET_LEVDIR_INF;小于等于此层级 +TP_WAVELET_LEVDIR_ONE;一个层级 +TP_WAVELET_LEVDIR_SUP;高于此层级 +TP_WAVELET_LEVELS;小波层级数 +TP_WAVELET_LEVELS_TOOLTIP;选择将图像分解为几个层级的细节。更多的层级需要使用更多的内存和更长的处理时间 +TP_WAVELET_LEVF;反差 +TP_WAVELET_LEVLABEL;当前预览中可见的层级数 = %1 +TP_WAVELET_LEVONE;第2级 +TP_WAVELET_LEVTHRE;第4级 +TP_WAVELET_LEVTWO;第3级 +TP_WAVELET_LEVZERO;第1级 +TP_WAVELET_LINKEDG;与边缘锐度的力度挂钩 +TP_WAVELET_MEDGREINF;第一层级 +TP_WAVELET_MEDI;减少蓝天中的杂点 +TP_WAVELET_NEUTRAL;还原 +TP_WAVELET_NOIS;去噪 +TP_WAVELET_NOISE;去噪和精细化 +TP_WAVELET_PROC;处理 +TP_WAVELET_RE1;增强 +TP_WAVELET_RE2;不变 +TP_WAVELET_RE3;减弱 +TP_WAVELET_RESCHRO;色度 +TP_WAVELET_RESCON;阴影 +TP_WAVELET_RESCONH;高光 +TP_WAVELET_RESID;残差图像 +TP_WAVELET_SETTINGS;小波设定 +TP_WAVELET_SKIN;肤色针对/保护 +TP_WAVELET_STREN;力度 +TP_WAVELET_STRENGTH;力度 +TP_WAVELET_SUPE;额外级 +TP_WAVELET_THR;阴影阈值 +TP_WAVELET_THRH;高光阈值 +TP_WAVELET_TILESBIG;大切片 +TP_WAVELET_TILESFULL;整张图片 +TP_WAVELET_TILESIZE;切片缓存方法 +TP_WAVELET_TILESLIT;小切片 +TP_WAVELET_TILES_TOOLTIP;处理整张图片可以让图像质量更好,所以推荐使用该选项,切片缓存是给小内存用户的备用方法。阅读RawPedia的文章以了解具体的内存需求 +TP_WAVELET_TON;调色 TP_WBALANCE_AUTO;自动 TP_WBALANCE_CAMERA;相机 TP_WBALANCE_CLOUDY;阴天 @@ -898,121 +1555,53 @@ TP_WBALANCE_CUSTOM;自定义 TP_WBALANCE_DAYLIGHT;晴天 TP_WBALANCE_EQBLUERED;蓝红平衡 TP_WBALANCE_FLASH55;徕卡 +TP_WBALANCE_FLASH60;标准,佳能,宾得,奥林巴斯 +TP_WBALANCE_FLASH65;尼康,松下,索尼,美能达 TP_WBALANCE_FLASH_HEADER;闪光 +TP_WBALANCE_FLUO_HEADER;荧光灯 TP_WBALANCE_GREEN;色度 TP_WBALANCE_LABEL;白平衡 TP_WBALANCE_LED_HEADER;LED -TP_WBALANCE_METHOD;方式 +TP_WBALANCE_METHOD;方法 +TP_WBALANCE_PICKER;选点 TP_WBALANCE_SHADE;阴影 TP_WBALANCE_SIZE;大小: TP_WBALANCE_SOLUX35;Solux 3500K TP_WBALANCE_SOLUX41;Solux 4100K TP_WBALANCE_SPOTWB;白平衡采样 +TP_WBALANCE_TEMPBIAS;自动白平衡色温偏向 +TP_WBALANCE_TEMPBIAS_TOOLTIP;此功能允许你将色温向冷/暖偏移\n以调整计算出的“自动白平衡”。这个偏移被表达为已计\n算出的色温的一个百分比,故最终的调整结果为“色温+色温*偏移” TP_WBALANCE_TEMPERATURE;色温 +TP_WBALANCE_TUNGSTEN;白炽灯 TP_WBALANCE_WATER1;水下 1 TP_WBALANCE_WATER2;水下 2 TP_WBALANCE_WATER_HEADER;水下 ZOOMPANEL_100;(100%) -ZOOMPANEL_NEWCROPWINDOW;开启(新)细节窗口 -ZOOMPANEL_ZOOM100;缩放到100%\n快捷键: z -ZOOMPANEL_ZOOMFITCROPSCREEN;适应边缘到屏幕\n快捷键:f -ZOOMPANEL_ZOOMFITSCREEN;适应屏幕\n快捷键: Alt-f -ZOOMPANEL_ZOOMIN;缩放拉近\n快捷键: + -ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - +ZOOMPANEL_NEWCROPWINDOW;开启(新的)细节窗口 +ZOOMPANEL_ZOOM100;缩放到100%\n快捷键:z +ZOOMPANEL_ZOOMFITCROPSCREEN;适应裁剪区域到屏幕\n快捷键:f +ZOOMPANEL_ZOOMFITSCREEN;适应屏幕\n快捷键:Alt-f +ZOOMPANEL_ZOOMIN;缩放拉近\n快捷键:+ +ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键:- !!!!!!!!!!!!!!!!!!!!!!!!! ! Untranslated keys follow; remove the ! prefix after an entry is translated. !!!!!!!!!!!!!!!!!!!!!!!!! -!ADJUSTER_RESET_TO_DEFAULT;Click - reset to default value.\nCtrl+click - reset to initial value. -!CURVEEDITOR_AXIS_IN;I: -!CURVEEDITOR_AXIS_LEFT_TAN;LT: -!CURVEEDITOR_AXIS_OUT;O: -!CURVEEDITOR_AXIS_RIGHT_TAN;RT: -!CURVEEDITOR_CATMULLROM;Flexible -!CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. -!DYNPROFILEEDITOR_IMGTYPE_ANY;Any -!DYNPROFILEEDITOR_IMGTYPE_HDR;HDR -!DYNPROFILEEDITOR_IMGTYPE_PS;Pixel Shift -!DYNPROFILEEDITOR_IMGTYPE_STD;Standard -!EDIT_OBJECT_TOOLTIP;Displays a widget on the preview window which lets you adjust this tool. -!EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. -!EXIFFILTER_IMAGETYPE;Image type -!EXIFPANEL_SHOWALL;Show all -!EXPORT_BYPASS;Processing steps to bypass -!EXPORT_BYPASS_RAW_DCB_ENHANCE;Bypass [raw] DCB Enhancement Steps -!EXPORT_BYPASS_RAW_DCB_ITERATIONS;Bypass [raw] DCB Iterations -!EXPORT_BYPASS_RAW_LMMSE_ITERATIONS;Bypass [raw] LMMSE Enhancement Steps -!EXPORT_INSTRUCTIONS;Fast Export options provide overrides to bypass time and resource consuming development settings and to run queue processing using the fast export settings instead. This method is recommended for quicker generation of lower resolution images when speed is a priority or when resized output is desired for one or many images without making modifications to their saved development parameters. -!EXPORT_PIPELINE;Processing pipeline -!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) -!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. -!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) -!FILEBROWSER_BROWSEPATHBUTTONHINT;Click to open specified path, reload folder and apply "find" keywords. -!FILEBROWSER_BROWSEPATHHINT;Type a path to navigate to.\n\nKeyboard shortcuts:\nCtrl-o to focus to the path text box.\nEnter / Ctrl-Enter to browse there;\nEsc to clear changes.\nShift-Esc to remove focus.\n\nPath shortcuts:\n~ - user's home directory.\n! - user's pictures directory -!FILEBROWSER_CACHECLEARFROMFULL;Clear all including cached profiles -!FILEBROWSER_CACHECLEARFROMPARTIAL;Clear all except cached profiles -!FILEBROWSER_COLORLABEL_TOOLTIP;Color label.\n\nUse dropdown menu or shortcuts:\nShift-Ctrl-0 No Color\nShift-Ctrl-1 Red\nShift-Ctrl-2 Yellow\nShift-Ctrl-3 Green\nShift-Ctrl-4 Blue\nShift-Ctrl-5 Purple -!FILEBROWSER_DELETEDIALOG_ALL;Are you sure you want to permanently delete all %1 files in trash? -!FILEBROWSER_DELETEDIALOG_SELECTED;Are you sure you want to permanently delete the selected %1 files? -!FILEBROWSER_DELETEDIALOG_SELECTEDINCLPROC;Are you sure you want to permanently delete the selected %1 files, including a queue-processed version? -!FILEBROWSER_EMPTYTRASHHINT;Permanently delete all files in trash. -!FILEBROWSER_POPUPREMOVE;Delete permanently -!FILEBROWSER_POPUPREMOVEINCLPROC;Delete permanently, including queue-processed version -!FILEBROWSER_QUERYHINT;Type filenames to search for. Supports partial filenames. Separate the search terms using commas, e.g.\n1001,1004,1199\n\nExclude search terms by prefixing them with !=\ne.g.\n!=1001,1004,1199\n\nShortcuts:\nCtrl-f - focus the Find box,\nEnter - search,\nEsc - clear the Find box,\nShift-Esc - defocus the Find box. -!FILEBROWSER_SHOWCOLORLABEL1HINT;Show images labeled Red.\nShortcut: Alt-1 -!FILEBROWSER_SHOWCOLORLABEL2HINT;Show images labeled Yellow.\nShortcut: Alt-2 -!FILEBROWSER_SHOWCOLORLABEL3HINT;Show images labeled Green.\nShortcut: Alt-3 -!FILEBROWSER_SHOWCOLORLABEL4HINT;Show images labeled Blue.\nShortcut: Alt-4 -!FILEBROWSER_SHOWCOLORLABEL5HINT;Show images labeled Purple.\nShortcut: Alt-5 -!FILEBROWSER_SHOWEDITEDHINT;Show edited images.\nShortcut: 7 -!FILEBROWSER_SHOWEDITEDNOTHINT;Show not edited images.\nShortcut: 6 -!FILEBROWSER_SHOWNOTTRASHHINT;Show only images not in trash. -!FILEBROWSER_SHOWORIGINALHINT;Show only original images.\n\nWhen several images exist with the same filename but different extensions, the one considered original is the one whose extension is nearest the top of the parsed extensions list in Preferences > File Browser > Parsed Extensions. -!FILEBROWSER_SHOWRECENTLYSAVEDNOTHINT;Show unsaved images.\nShortcut: Alt-6 -!FILEBROWSER_SHOWUNCOLORHINT;Show images without a color label.\nShortcut: Alt-0 -!FILEBROWSER_UNRANK_TOOLTIP;Unrank.\nShortcut: Shift-0 -!GENERAL_CURRENT;Current -!GENERAL_HELP;Help -!GENERAL_RESET;Reset +!FILEBROWSER_POPUPINSPECT;Inspect +!GENERAL_DELETE_ALL;Delete all +!GENERAL_EDIT;Edit !GENERAL_SAVE_AS;Save as... -!GENERAL_SLIDER;Slider -!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. -!HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar. -!HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. -!HISTOGRAM_TOOLTIP_MODE;Toggle between linear, log-linear and log-log scaling of the histogram. -!HISTOGRAM_TOOLTIP_RAW;Show/Hide raw histogram. -!HISTORY_MSG_82;Profile changed -!HISTORY_MSG_86;RGB Curves - Luminosity mode -!HISTORY_MSG_87;Impulse Noise Reduction -!HISTORY_MSG_88;Impulse NR threshold -!HISTORY_MSG_91;NR - Chrominance master -!HISTORY_MSG_93;CbDL - Value -!HISTORY_MSG_94;Contrast by Detail Levels -!HISTORY_MSG_95;L*a*b* - Chromaticity -!HISTORY_MSG_96;L*a*b* - a* curve -!HISTORY_MSG_97;L*a*b* - b* curve -!HISTORY_MSG_98;Demosaicing method -!HISTORY_MSG_99;Hot pixel filter -!HISTORY_MSG_100;Exposure - Saturation -!HISTORY_MSG_101;HSV - Hue -!HISTORY_MSG_102;HSV - Saturation -!HISTORY_MSG_104;HSV Equalizer -!HISTORY_MSG_105;Defringe -!HISTORY_MSG_106;Defringe - Radius -!HISTORY_MSG_107;Defringe - Threshold -!HISTORY_MSG_108;Exposure - HLC threshold -!HISTORY_MSG_109;Resize - Bounding box -!HISTORY_MSG_110;Resize - Applies to +!HISTOGRAM_TOOLTIP_CROSSHAIR;Show/Hide indicator crosshair. +!HISTOGRAM_TOOLTIP_SHOW_OPTIONS;Toggle visibility of the scope option buttons. +!HISTOGRAM_TOOLTIP_TRACE_BRIGHTNESS;Adjust scope brightness. +!HISTOGRAM_TOOLTIP_TYPE_HISTOGRAM;Histogram +!HISTOGRAM_TOOLTIP_TYPE_HISTOGRAM_RAW;Raw Histogram +!HISTOGRAM_TOOLTIP_TYPE_PARADE;RGB Parade +!HISTOGRAM_TOOLTIP_TYPE_VECTORSCOPE_HC;Hue-Chroma Vectorscope +!HISTOGRAM_TOOLTIP_TYPE_VECTORSCOPE_HS;Hue-Saturation Vectorscope +!HISTOGRAM_TOOLTIP_TYPE_WAVEFORM;Waveform !HISTORY_MSG_112;--unused-- -!HISTORY_MSG_115;False color suppression -!HISTORY_MSG_116;DCB enhancement -!HISTORY_MSG_117;Raw CA correction - Red -!HISTORY_MSG_118;Raw CA correction - Blue -!HISTORY_MSG_120;Green equilibration -!HISTORY_MSG_121;Raw CA Correction - Auto -!HISTORY_MSG_131;NR - Luma -!HISTORY_MSG_132;NR - Chroma !HISTORY_MSG_133;Output gamma !HISTORY_MSG_134;Free gamma !HISTORY_MSG_135;Free gamma @@ -1022,12 +1611,6 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_139;Black level - Blue !HISTORY_MSG_140;Black level - Green 2 !HISTORY_MSG_141;Black level - Link greens -!HISTORY_MSG_142;ES - Iterations -!HISTORY_MSG_143;ES - Quantity -!HISTORY_MSG_144;Microcontrast - Quantity -!HISTORY_MSG_145;Microcontrast - Uniformity -!HISTORY_MSG_148;Microcontrast -!HISTORY_MSG_149;Microcontrast - 3×3 matrix !HISTORY_MSG_150;Post-demosaic artifact/noise red. !HISTORY_MSG_151;Vibrance !HISTORY_MSG_152;Vib - Pastel tones @@ -1036,49 +1619,18 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_156;Vib - Link pastel/saturated !HISTORY_MSG_157;Vib - P/S threshold !HISTORY_MSG_161;TM - Reweighting iterates -!HISTORY_MSG_163;RGB Curves - Red -!HISTORY_MSG_164;RGB Curves - Green -!HISTORY_MSG_165;RGB Curves - Blue -!HISTORY_MSG_166;Exposure - Reset -!HISTORY_MSG_167;Demosaicing method -!HISTORY_MSG_168;L*a*b* - CC curve -!HISTORY_MSG_169;L*a*b* - CH curve -!HISTORY_MSG_170;Vibrance - HH curve -!HISTORY_MSG_171;L*a*b* - LC curve -!HISTORY_MSG_172;L*a*b* - Restrict LC -!HISTORY_MSG_173;NR - Detail recovery -!HISTORY_MSG_175;CAM02 - CAT02 adaptation -!HISTORY_MSG_176;CAM02 - Viewing surround -!HISTORY_MSG_177;CAM02 - Scene luminosity -!HISTORY_MSG_178;CAM02 - Viewing luminosity -!HISTORY_MSG_179;CAM02 - White-point model -!HISTORY_MSG_180;CAM02 - Lightness (J) -!HISTORY_MSG_181;CAM02 - Chroma (C) -!HISTORY_MSG_182;CAM02 - Automatic CAT02 -!HISTORY_MSG_184;CAM02 - Scene surround -!HISTORY_MSG_185;CAM02 - Gamut control -!HISTORY_MSG_186;CAM02 - Algorithm -!HISTORY_MSG_187;CAM02 - Red/skin prot. -!HISTORY_MSG_188;CAM02 - Brightness (Q) -!HISTORY_MSG_189;CAM02 - Contrast (Q) -!HISTORY_MSG_190;CAM02 - Saturation (S) -!HISTORY_MSG_191;CAM02 - Colorfulness (M) -!HISTORY_MSG_192;CAM02 - Hue (h) -!HISTORY_MSG_193;CAM02 - Tone curve 1 -!HISTORY_MSG_194;CAM02 - Tone curve 2 -!HISTORY_MSG_195;CAM02 - Tone curve 1 -!HISTORY_MSG_196;CAM02 - Tone curve 2 -!HISTORY_MSG_197;CAM02 - Color curve -!HISTORY_MSG_198;CAM02 - Color curve -!HISTORY_MSG_199;CAM02 - Output histograms -!HISTORY_MSG_200;CAM02 - Tone mapping -!HISTORY_MSG_201;NR - Chrominance - R&G -!HISTORY_MSG_202;NR - Chrominance - B&Y -!HISTORY_MSG_203;NR - Color space -!HISTORY_MSG_204;LMMSE enhancement steps -!HISTORY_MSG_205;CAM02 - Hot/bad pixel filter -!HISTORY_MSG_206;CAT02 - Auto scene luminosity -!HISTORY_MSG_207;Defringe - Hue curve +!HISTORY_MSG_175;CAM02/16 - CAT02/16 adaptation +!HISTORY_MSG_176;CAM02/16 - Viewing surround +!HISTORY_MSG_177;CAM02/16 - Scene luminosity +!HISTORY_MSG_178;CAM02/16 - Viewing luminosity +!HISTORY_MSG_179;CAM02/16 - White-point model +!HISTORY_MSG_182;CAM02/16 - Automatic CAT02/16 +!HISTORY_MSG_184;CAM02/16 - Scene surround +!HISTORY_MSG_185;CAM02/16 - Gamut control +!HISTORY_MSG_197;CAM02/16 - Color curve +!HISTORY_MSG_198;CAM02/16 - Color curve +!HISTORY_MSG_199;CAM02/16 - Output histograms +!HISTORY_MSG_206;CAT02/16 - Auto scene luminosity !HISTORY_MSG_208;WB - B/R equalizer !HISTORY_MSG_214;Black-and-White !HISTORY_MSG_215;B&W - CM - Red @@ -1109,17 +1661,8 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_241;VF - Feather !HISTORY_MSG_242;VF - Roundness !HISTORY_MSG_243;VC - Radius -!HISTORY_MSG_246;L*a*b* - CL curve -!HISTORY_MSG_247;L*a*b* - LH curve -!HISTORY_MSG_248;L*a*b* - HH curve -!HISTORY_MSG_249;CbDL - Threshold !HISTORY_MSG_250;NR - Enhanced !HISTORY_MSG_251;B&W - Algorithm -!HISTORY_MSG_252;CbDL - Skin tar/prot -!HISTORY_MSG_253;CbDL - Reduce artifacts -!HISTORY_MSG_254;CbDL - Skin hue -!HISTORY_MSG_255;NR - Median filter -!HISTORY_MSG_256;NR - Median - Type !HISTORY_MSG_257;Color Toning !HISTORY_MSG_258;CT - Color curve !HISTORY_MSG_259;CT - Opacity curve @@ -1148,43 +1691,20 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_282;CT - Sat. threshold !HISTORY_MSG_283;CT - Strength !HISTORY_MSG_284;CT - Auto sat. protection -!HISTORY_MSG_285;NR - Median - Method -!HISTORY_MSG_286;NR - Median - Type -!HISTORY_MSG_287;NR - Median - Iterations -!HISTORY_MSG_288;Flat-Field - Clip control -!HISTORY_MSG_289;Flat-Field - Clip control - Auto !HISTORY_MSG_290;Black Level - Red !HISTORY_MSG_291;Black Level - Green !HISTORY_MSG_292;Black Level - Blue -!HISTORY_MSG_293;Film Simulation -!HISTORY_MSG_294;Film Simulation - Strength -!HISTORY_MSG_295;Film Simulation - Film -!HISTORY_MSG_296;NR - Luminance curve -!HISTORY_MSG_297;NR - Mode -!HISTORY_MSG_298;Dead pixel filter -!HISTORY_MSG_299;NR - Chrominance curve !HISTORY_MSG_300;- -!HISTORY_MSG_301;NR - Luma control -!HISTORY_MSG_302;NR - Chroma method -!HISTORY_MSG_303;NR - Chroma method !HISTORY_MSG_304;W - Contrast levels -!HISTORY_MSG_305;Wavelet Levels -!HISTORY_MSG_306;W - Process -!HISTORY_MSG_307;W - Process -!HISTORY_MSG_308;W - Process direction -!HISTORY_MSG_309;W - ES - Detail -!HISTORY_MSG_310;W - Residual - Sky tar/prot -!HISTORY_MSG_311;W - Wavelet levels -!HISTORY_MSG_312;W - Residual - Shadows threshold !HISTORY_MSG_313;W - Chroma - Sat/past !HISTORY_MSG_314;W - Gamut - Reduce artifacts !HISTORY_MSG_315;W - Residual - Contrast !HISTORY_MSG_316;W - Gamut - Skin tar/prot !HISTORY_MSG_317;W - Gamut - Skin hue -!HISTORY_MSG_318;W - Contrast - Highlight levels -!HISTORY_MSG_319;W - Contrast - Highlight range -!HISTORY_MSG_320;W - Contrast - Shadow range -!HISTORY_MSG_321;W - Contrast - Shadow levels +!HISTORY_MSG_318;W - Contrast - Finer levels +!HISTORY_MSG_319;W - Contrast - Finer range +!HISTORY_MSG_320;W - Contrast - Coarser range +!HISTORY_MSG_321;W - Contrast - Coarser levels !HISTORY_MSG_322;W - Gamut - Avoid color shift !HISTORY_MSG_323;W - ES - Local contrast !HISTORY_MSG_324;W - Chroma - Pastel @@ -1201,18 +1721,12 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_335;W - Residual - Highlights !HISTORY_MSG_336;W - Residual - Highlights threshold !HISTORY_MSG_337;W - Residual - Sky hue -!HISTORY_MSG_338;W - ES - Radius -!HISTORY_MSG_339;W - ES - Strength -!HISTORY_MSG_340;W - Strength !HISTORY_MSG_341;W - Edge performance !HISTORY_MSG_342;W - ES - First level !HISTORY_MSG_343;W - Chroma levels !HISTORY_MSG_344;W - Meth chroma sl/cur !HISTORY_MSG_345;W - ES - Local contrast !HISTORY_MSG_346;W - ES - Local contrast method -!HISTORY_MSG_347;W - Denoise - Level 1 -!HISTORY_MSG_348;W - Denoise - Level 2 -!HISTORY_MSG_349;W - Denoise - Level 3 !HISTORY_MSG_350;W - ES - Edge detection !HISTORY_MSG_351;W - Residual - HH curve !HISTORY_MSG_352;W - Background @@ -1220,7 +1734,6 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_354;W - ES - Enhanced !HISTORY_MSG_355;W - ES - Threshold low !HISTORY_MSG_356;W - ES - Threshold high -!HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold !HISTORY_MSG_360;TM - Gamma @@ -1234,28 +1747,14 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_368;W - Final - Contrast balance !HISTORY_MSG_369;W - Final - Balance method !HISTORY_MSG_370;W - Final - Local contrast curve -!HISTORY_MSG_371;Post-Resize Sharpening -!HISTORY_MSG_372;PRS USM - Radius -!HISTORY_MSG_373;PRS USM - Amount -!HISTORY_MSG_374;PRS USM - Threshold -!HISTORY_MSG_375;PRS USM - Sharpen only edges -!HISTORY_MSG_376;PRS USM - Edge detection radius -!HISTORY_MSG_377;PRS USM - Edge tolerance -!HISTORY_MSG_378;PRS USM - Halo control -!HISTORY_MSG_379;PRS USM - Halo control amount -!HISTORY_MSG_380;PRS - Method -!HISTORY_MSG_381;PRS RLD - Radius -!HISTORY_MSG_382;PRS RLD - Amount -!HISTORY_MSG_383;PRS RLD - Damping -!HISTORY_MSG_384;PRS RLD - Iterations -!HISTORY_MSG_385;W - Residual - Color Balance +!HISTORY_MSG_385;W - Residual - Color balance !HISTORY_MSG_386;W - Residual - CB green high !HISTORY_MSG_387;W - Residual - CB blue high !HISTORY_MSG_388;W - Residual - CB green mid !HISTORY_MSG_389;W - Residual - CB blue mid !HISTORY_MSG_390;W - Residual - CB green low !HISTORY_MSG_391;W - Residual - CB blue low -!HISTORY_MSG_392;W - Residual - Color Balance +!HISTORY_MSG_392;W - Residual - Color balance !HISTORY_MSG_393;DCP - Look table !HISTORY_MSG_394;DCP - Baseline exposure !HISTORY_MSG_395;DCP - Base table @@ -1268,7 +1767,6 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_402;W - Denoise sub-tool !HISTORY_MSG_403;W - ES - Edge sensitivity !HISTORY_MSG_404;W - ES - Base amplification -!HISTORY_MSG_405;W - Denoise - Level 4 !HISTORY_MSG_406;W - ES - Neighboring pixels !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius @@ -1308,41 +1806,569 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_442;Retinex - Scale !HISTORY_MSG_443;Output black point compensation !HISTORY_MSG_444;WB - Temp bias -!HISTORY_MSG_445;Raw sub-image -!HISTORY_MSG_449;PS - ISO adaption -!HISTORY_MSG_452;PS - Show motion -!HISTORY_MSG_453;PS - Show mask only -!HISTORY_MSG_457;PS - Check red/blue -!HISTORY_MSG_462;PS - Check green -!HISTORY_MSG_464;PS - Blur motion mask -!HISTORY_MSG_465;PS - Blur radius -!HISTORY_MSG_468;PS - Fill holes -!HISTORY_MSG_469;PS - Median -!HISTORY_MSG_471;PS - Motion correction -!HISTORY_MSG_472;PS - Smooth transitions -!HISTORY_MSG_473;PS - Use LMMSE -!HISTORY_MSG_474;PS - Equalize -!HISTORY_MSG_475;PS - Equalize channel -!HISTORY_MSG_476;CAM02 - Temp out -!HISTORY_MSG_477;CAM02 - Green out -!HISTORY_MSG_478;CAM02 - Yb out -!HISTORY_MSG_479;CAM02 - CAT02 adaptation out -!HISTORY_MSG_480;CAM02 - Automatic CAT02 out -!HISTORY_MSG_481;CAM02 - Temp scene -!HISTORY_MSG_482;CAM02 - Green scene -!HISTORY_MSG_483;CAM02 - Yb scene -!HISTORY_MSG_484;CAM02 - Auto Yb scene -!HISTORY_MSG_485;Lens Correction -!HISTORY_MSG_486;Lens Correction - Camera -!HISTORY_MSG_487;Lens Correction - Lens -!HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Detail -!HISTORY_MSG_490;DRC - Amount -!HISTORY_MSG_491;White Balance -!HISTORY_MSG_492;RGB Curves -!HISTORY_MSG_493;L*a*b* Adjustments -!HISTORY_MSG_494;Capture Sharpening -!HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors +!HISTORY_MSG_446;EvPixelShiftMotion +!HISTORY_MSG_447;EvPixelShiftMotionCorrection +!HISTORY_MSG_448;EvPixelShiftStddevFactorGreen +!HISTORY_MSG_450;EvPixelShiftNreadIso +!HISTORY_MSG_451;EvPixelShiftPrnu +!HISTORY_MSG_454;EvPixelShiftAutomatic +!HISTORY_MSG_455;EvPixelShiftNonGreenHorizontal +!HISTORY_MSG_456;EvPixelShiftNonGreenVertical +!HISTORY_MSG_458;EvPixelShiftStddevFactorRed +!HISTORY_MSG_459;EvPixelShiftStddevFactorBlue +!HISTORY_MSG_460;EvPixelShiftGreenAmaze +!HISTORY_MSG_461;EvPixelShiftNonGreenAmaze +!HISTORY_MSG_463;EvPixelShiftRedBlueWeight +!HISTORY_MSG_466;EvPixelShiftSum +!HISTORY_MSG_467;EvPixelShiftExp0 +!HISTORY_MSG_470;EvPixelShiftMedian3 +!HISTORY_MSG_476;CAM02/16 - Temp out +!HISTORY_MSG_477;CAM02/16 - Green out +!HISTORY_MSG_478;CAM02/16 - Yb out +!HISTORY_MSG_479;CAM02/16 - CAT02/16 adaptation out +!HISTORY_MSG_480;CAM02/16 - Automatic CAT02/16 out +!HISTORY_MSG_481;CAM02/16 - Temp scene +!HISTORY_MSG_482;CAM02/16 - Green scene +!HISTORY_MSG_483;CAM02/16 - Yb scene +!HISTORY_MSG_484;CAM02/16 - Auto Yb scene +!HISTORY_MSG_496;Local Spot deleted +!HISTORY_MSG_497;Local Spot selected +!HISTORY_MSG_498;Local Spot name +!HISTORY_MSG_499;Local Spot visibility +!HISTORY_MSG_500;Local Spot shape +!HISTORY_MSG_501;Local Spot method +!HISTORY_MSG_502;Local Spot shape method +!HISTORY_MSG_503;Local Spot locX +!HISTORY_MSG_504;Local Spot locXL +!HISTORY_MSG_505;Local Spot locY +!HISTORY_MSG_506;Local Spot locYT +!HISTORY_MSG_507;Local Spot center +!HISTORY_MSG_508;Local Spot circrad +!HISTORY_MSG_509;Local Spot quality method +!HISTORY_MSG_510;Local Spot transition +!HISTORY_MSG_511;Local Spot thresh +!HISTORY_MSG_512;Local Spot ΔE -decay +!HISTORY_MSG_513;Local Spot scope +!HISTORY_MSG_514;Local Spot structure +!HISTORY_MSG_515;Local Adjustments +!HISTORY_MSG_516;Local - Color and light +!HISTORY_MSG_517;Local - Enable super +!HISTORY_MSG_518;Local - Lightness +!HISTORY_MSG_519;Local - Contrast +!HISTORY_MSG_520;Local - Chrominance +!HISTORY_MSG_521;Local - Scope +!HISTORY_MSG_522;Local - curve method +!HISTORY_MSG_523;Local - LL Curve +!HISTORY_MSG_524;Local - CC curve +!HISTORY_MSG_525;Local - LH Curve +!HISTORY_MSG_526;Local - H curve +!HISTORY_MSG_527;Local - Color Inverse +!HISTORY_MSG_528;Local - Exposure +!HISTORY_MSG_529;Local - Exp Compensation +!HISTORY_MSG_530;Local - Exp Hlcompr +!HISTORY_MSG_531;Local - Exp hlcomprthresh +!HISTORY_MSG_532;Local - Exp black +!HISTORY_MSG_533;Local - Exp Shcompr +!HISTORY_MSG_534;Local - Warm Cool +!HISTORY_MSG_535;Local - Exp Scope +!HISTORY_MSG_536;Local - Exp Contrast curve +!HISTORY_MSG_537;Local - Vibrance +!HISTORY_MSG_538;Local - Vib Saturated +!HISTORY_MSG_539;Local - Vib Pastel +!HISTORY_MSG_540;Local - Vib Threshold +!HISTORY_MSG_541;Local - Vib Protect skin tones +!HISTORY_MSG_542;Local - Vib avoid colorshift +!HISTORY_MSG_543;Local - Vib link +!HISTORY_MSG_544;Local - Vib Scope +!HISTORY_MSG_545;Local - Vib H curve +!HISTORY_MSG_546;Local - Blur and noise +!HISTORY_MSG_547;Local - Radius +!HISTORY_MSG_548;Local - Noise +!HISTORY_MSG_549;Local - Blur scope +!HISTORY_MSG_550;Local - Blur method +!HISTORY_MSG_551;Local - Blur Luminance only +!HISTORY_MSG_552;Local - Tone mapping +!HISTORY_MSG_553;Local - TM compression strength +!HISTORY_MSG_554;Local - TM gamma +!HISTORY_MSG_555;Local - TM edge stopping +!HISTORY_MSG_556;Local - TM scale +!HISTORY_MSG_557;Local - TM Reweighting +!HISTORY_MSG_558;Local - TM scope +!HISTORY_MSG_559;Local - Retinex +!HISTORY_MSG_560;Local - Retinex method +!HISTORY_MSG_561;Local - Retinex strength +!HISTORY_MSG_562;Local - Retinex chroma +!HISTORY_MSG_563;Local - Retinex radius +!HISTORY_MSG_564;Local - Retinex contrast +!HISTORY_MSG_565;Local - scope +!HISTORY_MSG_566;Local - Retinex Gain curve +!HISTORY_MSG_567;Local - Retinex Inverse +!HISTORY_MSG_568;Local - Sharpening +!HISTORY_MSG_569;Local - Sh Radius +!HISTORY_MSG_570;Local - Sh Amount +!HISTORY_MSG_571;Local - Sh Damping +!HISTORY_MSG_572;Local - Sh Iterations +!HISTORY_MSG_573;Local - Sh Scope +!HISTORY_MSG_574;Local - Sh Inverse +!HISTORY_MSG_575;Local - CBDL +!HISTORY_MSG_576;Local - cbdl mult +!HISTORY_MSG_577;Local - cbdl chroma +!HISTORY_MSG_578;Local - cbdl threshold +!HISTORY_MSG_579;Local - cbdl scope +!HISTORY_MSG_580;Local - Denoise +!HISTORY_MSG_581;Local - deNoise lum f 1 +!HISTORY_MSG_582;Local - deNoise lum c +!HISTORY_MSG_583;Local - deNoise lum detail +!HISTORY_MSG_584;Local - deNoise equalizer White-Black +!HISTORY_MSG_585;Local - deNoise chro f +!HISTORY_MSG_586;Local - deNoise chro c +!HISTORY_MSG_587;Local - deNoise chro detail +!HISTORY_MSG_588;Local - deNoise equalizer Blue-Red +!HISTORY_MSG_589;Local - deNoise bilateral +!HISTORY_MSG_590;Local - deNoise Scope +!HISTORY_MSG_591;Local - Avoid color shift +!HISTORY_MSG_592;Local - Sh Contrast +!HISTORY_MSG_593;Local - Local contrast +!HISTORY_MSG_594;Local - Local contrast radius +!HISTORY_MSG_595;Local - Local contrast amount +!HISTORY_MSG_596;Local - Local contrast darkness +!HISTORY_MSG_597;Local - Local contrast lightness +!HISTORY_MSG_598;Local - Local contrast scope +!HISTORY_MSG_599;Local - Retinex dehaze +!HISTORY_MSG_600;Local - Soft Light enable +!HISTORY_MSG_601;Local - Soft Light strength +!HISTORY_MSG_602;Local - Soft Light scope +!HISTORY_MSG_603;Local - Sh Blur radius +!HISTORY_MSG_605;Local - Mask preview choice +!HISTORY_MSG_606;Local Spot selected +!HISTORY_MSG_607;Local - Color Mask C +!HISTORY_MSG_608;Local - Color Mask L +!HISTORY_MSG_609;Local - Exp Mask C +!HISTORY_MSG_610;Local - Exp Mask L +!HISTORY_MSG_611;Local - Color Mask H +!HISTORY_MSG_612;Local - Color Structure +!HISTORY_MSG_613;Local - Exp Structure +!HISTORY_MSG_614;Local - Exp Mask H +!HISTORY_MSG_615;Local - Blend color +!HISTORY_MSG_616;Local - Blend Exp +!HISTORY_MSG_617;Local - Blur Exp +!HISTORY_MSG_618;Local - Use Color Mask +!HISTORY_MSG_619;Local - Use Exp Mask +!HISTORY_MSG_620;Local - Blur col +!HISTORY_MSG_621;Local - Exp inverse +!HISTORY_MSG_622;Local - Exclude structure +!HISTORY_MSG_623;Local - Exp Chroma compensation +!HISTORY_MSG_624;Local - Color correction grid +!HISTORY_MSG_625;Local - Color correction strength +!HISTORY_MSG_626;Local - Color correction Method +!HISTORY_MSG_627;Local - Shadow Highlight +!HISTORY_MSG_628;Local - SH Highlight +!HISTORY_MSG_629;Local - SH H tonalwidth +!HISTORY_MSG_630;Local - SH Shadows +!HISTORY_MSG_631;Local - SH S tonalwidth +!HISTORY_MSG_632;Local - SH radius +!HISTORY_MSG_633;Local - SH Scope +!HISTORY_MSG_634;Local - radius color +!HISTORY_MSG_635;Local - radius Exp +!HISTORY_MSG_636;Local - Tool added +!HISTORY_MSG_637;Local - SH Mask C +!HISTORY_MSG_638;Local - SH Mask L +!HISTORY_MSG_639;Local - SH Mask H +!HISTORY_MSG_640;Local - SH blend +!HISTORY_MSG_641;Local - Use SH mask +!HISTORY_MSG_642;Local - radius SH +!HISTORY_MSG_643;Local - Blur SH +!HISTORY_MSG_644;Local - inverse SH +!HISTORY_MSG_645;Local - balance ΔE ab-L +!HISTORY_MSG_646;Local - Exp mask chroma +!HISTORY_MSG_647;Local - Exp mask gamma +!HISTORY_MSG_648;Local - Exp mask slope +!HISTORY_MSG_649;Local - Exp soft radius +!HISTORY_MSG_650;Local - Color mask chroma +!HISTORY_MSG_651;Local - Color mask gamma +!HISTORY_MSG_652;Local - Color mask slope +!HISTORY_MSG_653;Local - SH mask chroma +!HISTORY_MSG_654;Local - SH mask gamma +!HISTORY_MSG_655;Local - SH mask slope +!HISTORY_MSG_656;Local - Color soft radius +!HISTORY_MSG_657;Local - Retinex Reduce artifacts +!HISTORY_MSG_658;Local - CBDL soft radius +!HISTORY_MSG_659;Local Spot transition-decay +!HISTORY_MSG_660;Local - cbdl clarity +!HISTORY_MSG_661;Local - cbdl contrast residual +!HISTORY_MSG_662;Local - deNoise lum f 0 +!HISTORY_MSG_663;Local - deNoise lum f 2 +!HISTORY_MSG_664;Local - cbdl Blur +!HISTORY_MSG_665;Local - cbdl mask Blend +!HISTORY_MSG_666;Local - cbdl mask radius +!HISTORY_MSG_667;Local - cbdl mask chroma +!HISTORY_MSG_668;Local - cbdl mask gamma +!HISTORY_MSG_669;Local - cbdl mask slope +!HISTORY_MSG_670;Local - cbdl mask C +!HISTORY_MSG_671;Local - cbdl mask L +!HISTORY_MSG_672;Local - cbdl mask CL +!HISTORY_MSG_673;Local - Use cbdl mask +!HISTORY_MSG_674;Local - Tool removed +!HISTORY_MSG_675;Local - TM soft radius +!HISTORY_MSG_676;Local Spot transition-differentiation +!HISTORY_MSG_677;Local - TM amount +!HISTORY_MSG_678;Local - TM saturation +!HISTORY_MSG_679;Local - Retinex mask C +!HISTORY_MSG_680;Local - Retinex mask L +!HISTORY_MSG_681;Local - Retinex mask CL +!HISTORY_MSG_682;Local - Retinex mask +!HISTORY_MSG_683;Local - Retinex mask Blend +!HISTORY_MSG_684;Local - Retinex mask radius +!HISTORY_MSG_685;Local - Retinex mask chroma +!HISTORY_MSG_686;Local - Retinex mask gamma +!HISTORY_MSG_687;Local - Retinex mask slope +!HISTORY_MSG_688;Local - Tool removed +!HISTORY_MSG_689;Local - Retinex mask transmission map +!HISTORY_MSG_690;Local - Retinex scale +!HISTORY_MSG_691;Local - Retinex darkness +!HISTORY_MSG_692;Local - Retinex lightness +!HISTORY_MSG_693;Local - Retinex threshold +!HISTORY_MSG_694;Local - Retinex Laplacian threshold +!HISTORY_MSG_695;Local - Soft method +!HISTORY_MSG_696;Local - Retinex Normalize +!HISTORY_MSG_697;Local - TM Normalize +!HISTORY_MSG_698;Local - Local contrast Fast Fourier +!HISTORY_MSG_699;Local - Retinex Fast Fourier +!HISTORY_MSG_701;Local - Exp Shadows +!HISTORY_MSG_702;Local - Exp Method +!HISTORY_MSG_703;Local - Exp Laplacian threshold +!HISTORY_MSG_704;Local - Exp PDE balance +!HISTORY_MSG_705;Local - Exp linearity +!HISTORY_MSG_706;Local - TM mask C +!HISTORY_MSG_707;Local - TM mask L +!HISTORY_MSG_708;Local - TM mask CL +!HISTORY_MSG_709;Local - use TM mask +!HISTORY_MSG_710;Local - TM mask Blend +!HISTORY_MSG_711;Local - TM mask radius +!HISTORY_MSG_712;Local - TM mask chroma +!HISTORY_MSG_713;Local - TM mask gamma +!HISTORY_MSG_714;Local - TM mask slope +!HISTORY_MSG_716;Local - Local method +!HISTORY_MSG_717;Local - Local contrast +!HISTORY_MSG_718;Local - Local contrast levels +!HISTORY_MSG_719;Local - Local contrast residual L +!HISTORY_MSG_720;Local - Blur mask C +!HISTORY_MSG_721;Local - Blur mask L +!HISTORY_MSG_722;Local - Blur mask CL +!HISTORY_MSG_723;Local - use Blur mask +!HISTORY_MSG_725;Local - Blur mask Blend +!HISTORY_MSG_726;Local - Blur mask radius +!HISTORY_MSG_727;Local - Blur mask chroma +!HISTORY_MSG_728;Local - Blur mask gamma +!HISTORY_MSG_729;Local - Blur mask slope +!HISTORY_MSG_730;Local - Blur method +!HISTORY_MSG_731;Local - median method +!HISTORY_MSG_732;Local - median iterations +!HISTORY_MSG_733;Local - soft radius +!HISTORY_MSG_734;Local - detail +!HISTORY_MSG_738;Local - Local contrast Merge L +!HISTORY_MSG_739;Local - Local contrast Soft radius +!HISTORY_MSG_740;Local - Local contrast Merge C +!HISTORY_MSG_741;Local - Local contrast Residual C +!HISTORY_MSG_742;Local - Exp Laplacian gamma +!HISTORY_MSG_743;Local - Exp Fattal Amount +!HISTORY_MSG_744;Local - Exp Fattal Detail +!HISTORY_MSG_745;Local - Exp Fattal Offset +!HISTORY_MSG_746;Local - Exp Fattal Sigma +!HISTORY_MSG_747;Local Spot created +!HISTORY_MSG_748;Local - Exp Denoise +!HISTORY_MSG_749;Local - Reti Depth +!HISTORY_MSG_750;Local - Reti Mode log - lin +!HISTORY_MSG_751;Local - Reti Dehaze saturation +!HISTORY_MSG_752;Local - Reti Offset +!HISTORY_MSG_753;Local - Reti Transmission map +!HISTORY_MSG_754;Local - Reti Clip +!HISTORY_MSG_755;Local - TM use tm mask +!HISTORY_MSG_756;Local - Exp use algo exposure mask +!HISTORY_MSG_757;Local - Exp Laplacian mask +!HISTORY_MSG_758;Local - Reti Laplacian mask +!HISTORY_MSG_759;Local - Exp Laplacian mask +!HISTORY_MSG_760;Local - Color Laplacian mask +!HISTORY_MSG_761;Local - SH Laplacian mask +!HISTORY_MSG_762;Local - cbdl Laplacian mask +!HISTORY_MSG_763;Local - Blur Laplacian mask +!HISTORY_MSG_764;Local - Solve PDE Laplacian mask +!HISTORY_MSG_765;Local - deNoise Detail threshold +!HISTORY_MSG_766;Local - Blur Fast Fourier +!HISTORY_MSG_767;Local - Grain Iso +!HISTORY_MSG_768;Local - Grain Strength +!HISTORY_MSG_769;Local - Grain Scale +!HISTORY_MSG_770;Local - Color Mask contrast curve +!HISTORY_MSG_771;Local - Exp Mask contrast curve +!HISTORY_MSG_772;Local - SH Mask contrast curve +!HISTORY_MSG_773;Local - TM Mask contrast curve +!HISTORY_MSG_774;Local - Reti Mask contrast curve +!HISTORY_MSG_775;Local - CBDL Mask contrast curve +!HISTORY_MSG_776;Local - Blur Denoise Mask contrast curve +!HISTORY_MSG_777;Local - Blur Mask local contrast curve +!HISTORY_MSG_778;Local - Mask highlights +!HISTORY_MSG_779;Local - Color Mask local contrast curve +!HISTORY_MSG_780;Local - Color Mask shadows +!HISTORY_MSG_781;Local - Contrast Mask Wavelet level +!HISTORY_MSG_782;Local - Blur Denoise Mask Wavelet levels +!HISTORY_MSG_783;Local - Color Wavelet levels +!HISTORY_MSG_784;Local - Mask ΔE +!HISTORY_MSG_785;Local - Mask Scope ΔE +!HISTORY_MSG_786;Local - SH method +!HISTORY_MSG_787;Local - Equalizer multiplier +!HISTORY_MSG_788;Local - Equalizer detail +!HISTORY_MSG_789;Local - SH mask amount +!HISTORY_MSG_790;Local - SH mask anchor +!HISTORY_MSG_791;Local - Mask Short L curves +!HISTORY_MSG_792;Local - Mask Luminance Background +!HISTORY_MSG_793;Local - SH TRC gamma +!HISTORY_MSG_794;Local - SH TRC slope +!HISTORY_MSG_795;Local - Mask save restore image +!HISTORY_MSG_796;Local - Recursive references +!HISTORY_MSG_797;Local - Merge Original method +!HISTORY_MSG_798;Local - Opacity +!HISTORY_MSG_799;Local - Color RGB ToneCurve +!HISTORY_MSG_800;Local - Color ToneCurve Method +!HISTORY_MSG_801;Local - Color ToneCurve Special +!HISTORY_MSG_802;Local - Contrast threshold +!HISTORY_MSG_803;Local - Color Merge +!HISTORY_MSG_804;Local - Color mask Structure +!HISTORY_MSG_805;Local - Blur Noise mask Structure +!HISTORY_MSG_806;Local - Color mask Structure as tool +!HISTORY_MSG_807;Local - Blur Noise mask Structure as tool +!HISTORY_MSG_808;Local - Color mask curve H(H) +!HISTORY_MSG_809;Local - Vib mask curve C(C) +!HISTORY_MSG_810;Local - Vib mask curve L(L) +!HISTORY_MSG_811;Local - Vib mask curve LC(H) +!HISTORY_MSG_813;Local - Use Vib mask +!HISTORY_MSG_814;Local - Vib mask Blend +!HISTORY_MSG_815;Local - Vib mask radius +!HISTORY_MSG_816;Local - Vib mask chroma +!HISTORY_MSG_817;Local - Vib mask gamma +!HISTORY_MSG_818;Local - Vib mask slope +!HISTORY_MSG_819;Local - Vib mask laplacian +!HISTORY_MSG_820;Local - Vib mask contrast curve +!HISTORY_MSG_821;Local - color grid background +!HISTORY_MSG_822;Local - color background merge +!HISTORY_MSG_823;Local - color background luminance +!HISTORY_MSG_824;Local - Exp gradient mask strength +!HISTORY_MSG_825;Local - Exp gradient mask angle +!HISTORY_MSG_826;Local - Exp gradient strength +!HISTORY_MSG_827;Local - Exp gradient angle +!HISTORY_MSG_828;Local - SH gradient strength +!HISTORY_MSG_829;Local - SH gradient angle +!HISTORY_MSG_830;Local - Color gradient strength L +!HISTORY_MSG_831;Local - Color gradient angle +!HISTORY_MSG_832;Local - Color gradient strength C +!HISTORY_MSG_833;Local - Gradient feather +!HISTORY_MSG_834;Local - Color gradient strength H +!HISTORY_MSG_835;Local - Vib gradient strength L +!HISTORY_MSG_836;Local - Vib gradient angle +!HISTORY_MSG_837;Local - Vib gradient strength C +!HISTORY_MSG_838;Local - Vib gradient strength H +!HISTORY_MSG_839;Local - Software complexity +!HISTORY_MSG_840;Local - CL Curve +!HISTORY_MSG_841;Local - LC curve +!HISTORY_MSG_842;Local - Contrast Threshold +!HISTORY_MSG_843;Local - Radius +!HISTORY_MSG_845;Local - Log encoding +!HISTORY_MSG_846;Local - Log encoding auto +!HISTORY_MSG_847;Local - Log encoding Source +!HISTORY_MSG_849;Local - Log encoding Source auto +!HISTORY_MSG_850;Local - Log encoding B_Ev +!HISTORY_MSG_851;Local - Log encoding W_Ev +!HISTORY_MSG_852;Local - Log encoding Target +!HISTORY_MSG_853;Local - Log encodind loc contrast +!HISTORY_MSG_854;Local - Log encodind Scope +!HISTORY_MSG_855;Local - Log encoding Whole image +!HISTORY_MSG_856;Local - Log encoding Shadows range +!HISTORY_MSG_857;Local - Wavelet blur residual +!HISTORY_MSG_858;Local - Wavelet blur luminance only +!HISTORY_MSG_859;Local - Wavelet max blur +!HISTORY_MSG_860;Local - Wavelet blur levels +!HISTORY_MSG_861;Local - Wavelet contrast levels +!HISTORY_MSG_862;Local - Wavelet contrast attenuation +!HISTORY_MSG_863;Local - Wavelet merge original image +!HISTORY_MSG_864;Local - Wavelet dir contrast attenuation +!HISTORY_MSG_865;Local - Wavelet dir contrast delta +!HISTORY_MSG_866;Local - Wavelet dir compression +!HISTORY_MSG_869;Local - Denoise by level +!HISTORY_MSG_870;Local - Wavelet mask curve H +!HISTORY_MSG_871;Local - Wavelet mask curve C +!HISTORY_MSG_872;Local - Wavelet mask curve L +!HISTORY_MSG_873;Local - Wavelet mask +!HISTORY_MSG_875;Local - Wavelet mask blend +!HISTORY_MSG_876;Local - Wavelet mask smooth +!HISTORY_MSG_877;Local - Wavelet mask chroma +!HISTORY_MSG_878;Local - Wavelet mask contrast curve +!HISTORY_MSG_879;Local - Wavelet contrast chroma +!HISTORY_MSG_880;Local - Wavelet blur chroma +!HISTORY_MSG_881;Local - Wavelet contrast offset +!HISTORY_MSG_882;Local - Wavelet blur +!HISTORY_MSG_883;Local - Wavelet contrast by level +!HISTORY_MSG_884;Local - Wavelet dir contrast +!HISTORY_MSG_885;Local - Wavelet tone mapping +!HISTORY_MSG_886;Local - Wavelet tone mapping compress +!HISTORY_MSG_887;Local - Wavelet tone mapping compress residual +!HISTORY_MSG_888;Local - Contrast Wavelet Balance Threshold +!HISTORY_MSG_889;Local - Contrast Wavelet Graduated Strength +!HISTORY_MSG_890;Local - Contrast Wavelet Graduated angle +!HISTORY_MSG_891;Local - Contrast Wavelet Graduated +!HISTORY_MSG_892;Local - Log Encoding Graduated Strength +!HISTORY_MSG_893;Local - Log Encoding Graduated angle +!HISTORY_MSG_894;Local - Color Preview dE +!HISTORY_MSG_897;Local - Contrast Wavelet ES strength +!HISTORY_MSG_898;Local - Contrast Wavelet ES radius +!HISTORY_MSG_899;Local - Contrast Wavelet ES detail +!HISTORY_MSG_900;Local - Contrast Wavelet ES gradient +!HISTORY_MSG_901;Local - Contrast Wavelet ES threshold low +!HISTORY_MSG_902;Local - Contrast Wavelet ES threshold high +!HISTORY_MSG_903;Local - Contrast Wavelet ES local contrast +!HISTORY_MSG_904;Local - Contrast Wavelet ES first level +!HISTORY_MSG_905;Local - Contrast Wavelet Edge Sharpness +!HISTORY_MSG_906;Local - Contrast Wavelet ES sensitivity +!HISTORY_MSG_907;Local - Contrast Wavelet ES amplification +!HISTORY_MSG_908;Local - Contrast Wavelet ES neighboring +!HISTORY_MSG_909;Local - Contrast Wavelet ES show +!HISTORY_MSG_910;Local - Wavelet Edge performance +!HISTORY_MSG_911;Local - Blur Chroma Luma +!HISTORY_MSG_912;Local - Blur Guide filter strength +!HISTORY_MSG_913;Local - Contrast Wavelet Sigma DR +!HISTORY_MSG_914;Local - Blur Wavelet Sigma BL +!HISTORY_MSG_915;Local - Edge Wavelet Sigma ED +!HISTORY_MSG_916;Local - Residual wavelet shadows +!HISTORY_MSG_917;Local - Residual wavelet shadows threshold +!HISTORY_MSG_918;Local - Residual wavelet highlights +!HISTORY_MSG_919;Local - Residual wavelet highlights threshold +!HISTORY_MSG_920;Local - Wavelet sigma LC +!HISTORY_MSG_921;Local - Wavelet Graduated sigma LC2 +!HISTORY_MSG_922;Local - changes In Black and White +!HISTORY_MSG_923;Local - Tool complexity mode +!HISTORY_MSG_924;Local - Tool complexity mode +!HISTORY_MSG_925;Local - Scope color tools +!HISTORY_MSG_926;Local - Show mask type +!HISTORY_MSG_927;Local - Shadow +!HISTORY_MSG_928;Local - Common color mask +!HISTORY_MSG_929;Local - Mask common scope +!HISTORY_MSG_930;Local - Mask Common blend luma +!HISTORY_MSG_931;Local - Mask Common enable +!HISTORY_MSG_932;Local - Mask Common radius soft +!HISTORY_MSG_933;Local - Mask Common laplacian +!HISTORY_MSG_934;Local - Mask Common chroma +!HISTORY_MSG_935;Local - Mask Common gamma +!HISTORY_MSG_936;Local - Mask Common slope +!HISTORY_MSG_937;Local - Mask Common curve C(C) +!HISTORY_MSG_938;Local - Mask Common curve L(L) +!HISTORY_MSG_939;Local - Mask Common curve LC(H) +!HISTORY_MSG_940;Local - Mask Common structure as tool +!HISTORY_MSG_941;Local - Mask Common structure strength +!HISTORY_MSG_942;Local - Mask Common H(H) curve +!HISTORY_MSG_943;Local - Mask Common FFT +!HISTORY_MSG_944;Local - Mask Common Blur radius +!HISTORY_MSG_945;Local - Mask Common contrast threshold +!HISTORY_MSG_946;Local - Mask Common shadows +!HISTORY_MSG_947;Local - Mask Common Contrast curve +!HISTORY_MSG_948;Local - Mask Common Wavelet curve +!HISTORY_MSG_949;Local - Mask Common Threshold levels +!HISTORY_MSG_950;Local - Mask Common GF strength +!HISTORY_MSG_951;Local - Mask Common GF angle +!HISTORY_MSG_952;Local - Mask Common soft radius +!HISTORY_MSG_953;Local - Mask Common blend chroma +!HISTORY_MSG_954;Local - Show-hide tools +!HISTORY_MSG_955;Local - Enable Spot +!HISTORY_MSG_956;Local - CH Curve +!HISTORY_MSG_957;Local - Denoise mode +!HISTORY_MSG_958;Local - Show/hide settings +!HISTORY_MSG_959;Local - Inverse blur +!HISTORY_MSG_960;Local - Log encoding - cat16 +!HISTORY_MSG_961;Local - Log encoding Ciecam +!HISTORY_MSG_962;Local - Log encoding Absolute luminance source +!HISTORY_MSG_963;Local - Log encoding Absolute luminance target +!HISTORY_MSG_964;Local - Log encoding Surround +!HISTORY_MSG_965;Local - Log encoding Saturation s +!HISTORY_MSG_966;Local - Log encoding Contrast J +!HISTORY_MSG_967;Local - Log encoding Mask curve C +!HISTORY_MSG_968;Local - Log encoding Mask curve L +!HISTORY_MSG_969;Local - Log encoding Mask curve H +!HISTORY_MSG_970;Local - Log encoding Mask enable +!HISTORY_MSG_971;Local - Log encoding Mask blend +!HISTORY_MSG_972;Local - Log encoding Mask radius +!HISTORY_MSG_973;Local - Log encoding Mask chroma +!HISTORY_MSG_974;Local - Log encoding Mask contrast +!HISTORY_MSG_975;Local - Log encoding Lightness J +!HISTORY_MSG_977;Local - Log encoding Contrast Q +!HISTORY_MSG_978;Local - Log encoding Sursource +!HISTORY_MSG_979;Local - Log encoding Brightness Q +!HISTORY_MSG_980;Local - Log encoding Colorfulness M +!HISTORY_MSG_981;Local - Log encoding Strength +!HISTORY_MSG_982;Local - Equalizer hue +!HISTORY_MSG_983;Local - denoise threshold mask high +!HISTORY_MSG_984;Local - denoise threshold mask low +!HISTORY_MSG_985;Local - denoise Laplacian +!HISTORY_MSG_986;Local - denoise reinforce +!HISTORY_MSG_987;Local - GF recovery threshold +!HISTORY_MSG_988;Local - GF threshold mask low +!HISTORY_MSG_989;Local - GF threshold mask high +!HISTORY_MSG_990;Local - Denoise recovery threshold +!HISTORY_MSG_991;Local - Denoise threshold mask low +!HISTORY_MSG_992;Local - Denoise threshold mask high +!HISTORY_MSG_993;Local - Denoise Inverse algo +!HISTORY_MSG_994;Local - GF Inverse algo +!HISTORY_MSG_995;Local - Denoise decay +!HISTORY_MSG_996;Local - Color recovery threshold +!HISTORY_MSG_997;Local - Color threshold mask low +!HISTORY_MSG_998;Local - Color threshold mask high +!HISTORY_MSG_999;Local - Color decay +!HISTORY_MSG_1000;Local - Denoise luminance gray +!HISTORY_MSG_1001;Local - Log recovery threshold +!HISTORY_MSG_1002;Local - Log threshold mask low +!HISTORY_MSG_1003;Local - Log threshold mask high +!HISTORY_MSG_1004;Local - Log decay +!HISTORY_MSG_1005;Local - Exp recovery threshold +!HISTORY_MSG_1006;Local - Exp threshold mask low +!HISTORY_MSG_1007;Local - Exp threshold mask high +!HISTORY_MSG_1008;Local - Exp decay +!HISTORY_MSG_1009;Local - SH recovery threshold +!HISTORY_MSG_1010;Local - SH threshold mask low +!HISTORY_MSG_1011;Local - SH threshold mask high +!HISTORY_MSG_1012;Local - SH decay +!HISTORY_MSG_1013;Local - vib recovery threshold +!HISTORY_MSG_1014;Local - vib threshold mask low +!HISTORY_MSG_1015;Local - vib threshold mask high +!HISTORY_MSG_1016;Local - vib decay +!HISTORY_MSG_1017;Local - lc recovery threshold +!HISTORY_MSG_1018;Local - lc threshold mask low +!HISTORY_MSG_1019;Local - lc threshold mask high +!HISTORY_MSG_1020;Local - lc decay +!HISTORY_MSG_1021;Local - Denoise chrominance gray +!HISTORY_MSG_1022;Local - TM recovery threshold +!HISTORY_MSG_1023;Local - TM threshold mask low +!HISTORY_MSG_1024;Local - TM threshold mask high +!HISTORY_MSG_1025;Local - TM decay +!HISTORY_MSG_1026;Local - cbdl recovery threshold +!HISTORY_MSG_1027;Local - cbdl threshold mask low +!HISTORY_MSG_1028;Local - cbdl threshold mask high +!HISTORY_MSG_1029;Local - cbdl decay +!HISTORY_MSG_1030;Local - reti recovery threshold +!HISTORY_MSG_1031;Local - reti threshold mask low +!HISTORY_MSG_1032;Local - reti threshold mask high +!HISTORY_MSG_1033;Local - reti decay +!HISTORY_MSG_1034;Local - Nlmeans - strength +!HISTORY_MSG_1035;Local - Nlmeans - detail +!HISTORY_MSG_1036;Local - Nlmeans - patch +!HISTORY_MSG_1037;Local - Nlmeans - radius +!HISTORY_MSG_1038;Local - Nlmeans - gamma +!HISTORY_MSG_1039;Local - Grain - gamma +!HISTORY_MSG_1040;Local - Spot - soft radius +!HISTORY_MSG_1041;Local - Spot - Munsell +!HISTORY_MSG_BLSHAPE;Blur by level +!HISTORY_MSG_BLURCWAV;Blur chroma +!HISTORY_MSG_BLURWAV;Blur luminance +!HISTORY_MSG_BLUWAV;Attenuation response +!HISTORY_MSG_CAT02PRESET;Cat02/16 automatic preset +!HISTORY_MSG_CATCAT;Cat02/16 mode +!HISTORY_MSG_CATCOMPLEX;Ciecam complexity +!HISTORY_MSG_CATMODEL;CAM Model !HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction !HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction !HISTORY_MSG_COLORTONING_LABREGION_CHANNEL;CT - Channel @@ -1357,55 +2383,79 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_COLORTONING_LABREGION_SATURATION;CT - Saturation !HISTORY_MSG_COLORTONING_LABREGION_SHOWMASK;CT - region show mask !HISTORY_MSG_COLORTONING_LABREGION_SLOPE;CT - region slope -!HISTORY_MSG_DEHAZE_DEPTH;Dehaze - Depth -!HISTORY_MSG_DEHAZE_ENABLED;Haze Removal -!HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only -!HISTORY_MSG_DEHAZE_SHOW_DEPTH_MAP;Dehaze - Show depth map -!HISTORY_MSG_DEHAZE_STRENGTH;Dehaze - Strength -!HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST;Dual demosaic - Auto threshold -!HISTORY_MSG_DUALDEMOSAIC_CONTRAST;Dual demosaic - Contrast threshold -!HISTORY_MSG_FILMNEGATIVE_ENABLED;Film Negative +!HISTORY_MSG_COMPLEX;Wavelet complexity +!HISTORY_MSG_COMPLEXRETI;Retinex complexity +!HISTORY_MSG_DEHAZE_SATURATION;Dehaze - Saturation +!HISTORY_MSG_EDGEFFECT;Edge Attenuation response +!HISTORY_MSG_FILMNEGATIVE_BALANCE;FN - Reference output +!HISTORY_MSG_FILMNEGATIVE_COLORSPACE;Film negative color space +!HISTORY_MSG_FILMNEGATIVE_REF_SPOT;FN - Reference input !HISTORY_MSG_FILMNEGATIVE_VALUES;Film negative values -!HISTORY_MSG_HISTMATCHING;Auto-matched tone curve +!HISTORY_MSG_HLBL;Color propagation - blur !HISTORY_MSG_ICM_OUTPUT_PRIMARIES;Output - Primaries !HISTORY_MSG_ICM_OUTPUT_TEMP;Output - ICC-v4 illuminant D !HISTORY_MSG_ICM_OUTPUT_TYPE;Output - Type !HISTORY_MSG_ICM_WORKING_GAMMA;Working - Gamma !HISTORY_MSG_ICM_WORKING_SLOPE;Working - Slope !HISTORY_MSG_ICM_WORKING_TRC_METHOD;Working - TRC method -!HISTORY_MSG_LOCALCONTRAST_AMOUNT;Local Contrast - Amount -!HISTORY_MSG_LOCALCONTRAST_DARKNESS;Local Contrast - Darkness -!HISTORY_MSG_LOCALCONTRAST_ENABLED;Local Contrast -!HISTORY_MSG_LOCALCONTRAST_LIGHTNESS;Local Contrast - Lightness -!HISTORY_MSG_LOCALCONTRAST_RADIUS;Local Contrast - Radius -!HISTORY_MSG_METADATA_MODE;Metadata copy mode -!HISTORY_MSG_MICROCONTRAST_CONTRAST;Microcontrast - Contrast threshold -!HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold -!HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - Auto radius -!HISTORY_MSG_PDSHARPEN_CHECKITER;CS - Auto limit iterations -!HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold -!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations -!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius -!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost -!HISTORY_MSG_PIXELSHIFT_DEMOSAIC;PS - Demosaic method for motion -!HISTORY_MSG_PREPROCESS_LINEDENOISE_DIRECTION;Line noise filter direction -!HISTORY_MSG_PREPROCESS_PDAFLINESFILTER;PDAF lines filter -!HISTORY_MSG_PRSHARPEN_CONTRAST;PRS - Contrast threshold -!HISTORY_MSG_RAWCACORR_AUTOIT;Raw CA Correction - Iterations -!HISTORY_MSG_RAWCACORR_COLORSHIFT;Raw CA Correction - Avoid color shift -!HISTORY_MSG_RAW_BORDER;Raw border -!HISTORY_MSG_RESIZE_ALLOWUPSCALING;Resize - Allow upscaling -!HISTORY_MSG_SHARPENING_BLUR;Sharpening - Blur radius -!HISTORY_MSG_SHARPENING_CONTRAST;Sharpening - Contrast threshold -!HISTORY_MSG_SH_COLORSPACE;S/H - Colorspace +!HISTORY_MSG_ILLUM;Illuminant +!HISTORY_MSG_PERSP_CAM_ANGLE;Perspective - Camera +!HISTORY_MSG_PERSP_CAM_FL;Perspective - Camera +!HISTORY_MSG_PERSP_CAM_SHIFT;Perspective - Camera +!HISTORY_MSG_PERSP_CTRL_LINE;Perspective - Control lines +!HISTORY_MSG_PERSP_METHOD;Perspective - Method +!HISTORY_MSG_PERSP_PROJ_ANGLE;Perspective - Recovery +!HISTORY_MSG_PERSP_PROJ_ROTATE;Perspective - PCA rotation +!HISTORY_MSG_PERSP_PROJ_SHIFT;Perspective - PCA +!HISTORY_MSG_PREPROCWB_MODE;Preprocess WB Mode +!HISTORY_MSG_PROTAB;Protection +!HISTORY_MSG_RANGEAB;Range ab +!HISTORY_MSG_SIGMACOL;Chroma Attenuation response +!HISTORY_MSG_SIGMADIR;Dir Attenuation response +!HISTORY_MSG_SIGMAFIN;Final contrast Attenuation response +!HISTORY_MSG_SIGMATON;Toning Attenuation response !HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light !HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength -!HISTORY_MSG_TM_FATTAL_ANCHOR;DRC - Anchor +!HISTORY_MSG_TEMPOUT;CAM02 automatic temperature +!HISTORY_MSG_THRESWAV;Balance threshold !HISTORY_MSG_TRANS_Method;Geometry - Method -!ICCPROFCREATOR_COPYRIGHT;Copyright: +!HISTORY_MSG_WAVBALCHROM;Equalizer chrominance +!HISTORY_MSG_WAVBALLUM;Equalizer luminance +!HISTORY_MSG_WAVBL;Blur levels +!HISTORY_MSG_WAVCHROMCO;Chroma coarse +!HISTORY_MSG_WAVCHROMFI;Chroma fine +!HISTORY_MSG_WAVCLARI;Clarity +!HISTORY_MSG_WAVDENLH;Level 5 +!HISTORY_MSG_WAVDENMET;Local equalizer +!HISTORY_MSG_WAVDENOISE;Local contrast +!HISTORY_MSG_WAVDENOISEH;High levels Local contrast +!HISTORY_MSG_WAVDETEND;Details soft +!HISTORY_MSG_WAVEDGS;Edge stopping +!HISTORY_MSG_WAVGUIDH;Local contrast-Hue equalizer +!HISTORY_MSG_WAVHUE;Equalizer hue +!HISTORY_MSG_WAVLEVDEN;High level local contrast +!HISTORY_MSG_WAVLEVSIGM;Radius +!HISTORY_MSG_WAVLIMDEN;Interaction 56 14 +!HISTORY_MSG_WAVLOWTHR;Threshold low contrast +!HISTORY_MSG_WAVMERGEC;Merge C +!HISTORY_MSG_WAVMERGEL;Merge L +!HISTORY_MSG_WAVMIXMET;Reference local contrast +!HISTORY_MSG_WAVOFFSET;Offset +!HISTORY_MSG_WAVOLDSH;Old algorithm +!HISTORY_MSG_WAVQUAMET;Denoise mode +!HISTORY_MSG_WAVRADIUS;Radius shadows-highlights +!HISTORY_MSG_WAVSCALE;Scale +!HISTORY_MSG_WAVSHOWMASK;Show wavelet mask +!HISTORY_MSG_WAVSIGM;Sigma +!HISTORY_MSG_WAVSIGMA;Attenuation response +!HISTORY_MSG_WAVSLIMET;Method +!HISTORY_MSG_WAVSOFTRAD;Soft radius clarity +!HISTORY_MSG_WAVSOFTRADEND;Soft radius final +!HISTORY_MSG_WAVSTREND;Strength soft +!HISTORY_MSG_WAVTHRDEN;Threshold local contrast +!HISTORY_MSG_WAVTHREND;Threshold local contrast +!HISTORY_MSG_WAVUSHAMET;Clarity method !ICCPROFCREATOR_COPYRIGHT_RESET_TOOLTIP;Reset to the default copyright, granted to "RawTherapee, CC0" -!ICCPROFCREATOR_CUSTOM;Custom -!ICCPROFCREATOR_DESCRIPTION;Description: !ICCPROFCREATOR_DESCRIPTION_ADDPARAM;Append gamma and slope values to the description !ICCPROFCREATOR_DESCRIPTION_TOOLTIP;Leave empty to set the default description. !ICCPROFCREATOR_GAMMA;Gamma @@ -1419,7 +2469,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !ICCPROFCREATOR_ILL_80;D80 !ICCPROFCREATOR_ILL_DEF;Default !ICCPROFCREATOR_ILL_INC;StdA 2856K -!ICCPROFCREATOR_ILL_TOOLTIP;You can only set the illuminant for ICC v4 profiles. +!ICCPROFCREATOR_ILL_TOOLTIP;You can set the illuminant for ICC v4 profiles and also for ICC v2 profiles. !ICCPROFCREATOR_PRIMARIES;Primaries: !ICCPROFCREATOR_PRIM_ACESP0;ACES AP0 !ICCPROFCREATOR_PRIM_ACESP1;ACES AP1 @@ -1436,11 +2486,10 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !ICCPROFCREATOR_PRIM_REDX;Red X !ICCPROFCREATOR_PRIM_REDY;Red Y !ICCPROFCREATOR_PRIM_SRGB;sRGB -!ICCPROFCREATOR_PRIM_TOOLTIP;You can only set custom primaries for ICC v4 profiles. +!ICCPROFCREATOR_PRIM_TOOLTIP;You can set custom primaries for ICC v4 profiles and also for ICC v2 profiles. !ICCPROFCREATOR_PRIM_WIDEG;Widegamut !ICCPROFCREATOR_PROF_V2;ICC v2 !ICCPROFCREATOR_PROF_V4;ICC v4 -!ICCPROFCREATOR_SAVEDIALOG_TITLE;Save ICC profile as... !ICCPROFCREATOR_SLOPE;Slope !ICCPROFCREATOR_TRC_PRESET;Tone response curve: !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. @@ -1472,112 +2521,43 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !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). -!MAIN_FRAME_PLACES_DEL;Remove !MAIN_MSG_IMAGEUNPROCESSED;This command requires all selected images to be queue-processed first. !MAIN_MSG_PATHDOESNTEXIST;The path\n\n%1\n\ndoes not exist. Please set a correct path in Preferences. !MAIN_MSG_SETPATHFIRST;You first have to set a target path in Preferences in order to use this function! !MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_MSG_WRITEFAILED;Failed to write\n"%1"\n\nMake sure that the folder exists and that you have write permission to it. -!MAIN_TAB_ADVANCED;Advanced -!MAIN_TAB_ADVANCED_TOOLTIP;Shortcut: Alt-a !MAIN_TAB_FAVORITES;Favorites -!MAIN_TAB_FAVORITES_TOOLTIP;Shortcut: Alt-u -!MAIN_TOOLTIP_BACKCOLOR0;Background color of the preview: theme-based\nShortcut: 9 -!MAIN_TOOLTIP_BACKCOLOR1;Background color of the preview: black\nShortcut: 9 -!MAIN_TOOLTIP_BACKCOLOR2;Background color of the preview: white\nShortcut: 9 -!MAIN_TOOLTIP_BACKCOLOR3;Background color of the preview: middle grey\nShortcut: 9 !MAIN_TOOLTIP_BEFOREAFTERLOCK;Lock / Unlock the Before view\n\nLock: keep the Before view unchanged.\nUseful to evaluate the cumulative effect of multiple tools.\nAdditionally, comparisons can be made to any state in the History.\n\nUnlock: the Before view will follow the After view one step behind, showing the image before the effect of the currently used tool. -!MAIN_TOOLTIP_PREVIEWB;Preview the blue channel.\nShortcut: b -!MAIN_TOOLTIP_PREVIEWFOCUSMASK;Preview the focus mask.\nShortcut: Shift-f\n\nMore accurate on images with shallow depth of field, low noise and at higher zoom levels.\nZoom out to 10-30% to improve detection accuracy on noisy images. -!MAIN_TOOLTIP_PREVIEWG;Preview the green channel.\nShortcut: g -!MAIN_TOOLTIP_PREVIEWL;Preview the luminosity.\nShortcut: v\n\n0.299*R + 0.587*G + 0.114*B -!MAIN_TOOLTIP_PREVIEWSHARPMASK;Preview the sharpening contrast mask.\nShortcut: p\n\nOnly works when sharpening is enabled and zoom >= 100%. -!MONITOR_PROFILE_SYSTEM;System default -!OPTIONS_BUNDLED_MISSING;The bundled profile "%1" could not be found!\n\nYour installation could be damaged.\n\nDefault internal values will be used instead. !OPTIONS_DEFIMG_MISSING;The default profile for non-raw photos could not be found or is not set.\n\nPlease check your profiles' directory, it may be missing or damaged.\n\n"%1" will be used instead. !OPTIONS_DEFRAW_MISSING;The default profile for raw photos could not be found or is not set.\n\nPlease check your profiles' directory, it may be missing or damaged.\n\n"%1" will be used instead. -!PARTIALPASTE_ADVANCEDGROUP;Advanced Settings -!PARTIALPASTE_DEHAZE;Haze removal -!PARTIALPASTE_FILMNEGATIVE;Film Negative -!PARTIALPASTE_LOCALCONTRAST;Local contrast -!PARTIALPASTE_METADATA;Metadata mode -!PARTIALPASTE_PREPROCESS_PDAFLINESFILTER;PDAF lines filter -!PARTIALPASTE_RAWCACORR_AVOIDCOLORSHIFT;CA avoid color shift -!PARTIALPASTE_RAW_BORDER;Raw border +!PARTIALPASTE_LOCGROUP;Local +!PARTIALPASTE_PREPROCWB;Preprocess White Balance +!PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_SOFTLIGHT;Soft light -!PARTIALPASTE_TM_FATTAL;Dynamic range compression -!PREFERENCES_APPEARANCE;Appearance -!PREFERENCES_APPEARANCE_COLORPICKERFONT;Color picker font -!PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color -!PREFERENCES_APPEARANCE_MAINFONT;Main font -!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode -!PREFERENCES_APPEARANCE_THEME;Theme -!PREFERENCES_AUTOSAVE_TP_OPEN;Save tool collapsed/expanded state on exit -!PREFERENCES_BEHADDALLHINT;Set all parameters to the Add mode.\nAdjustments of parameters in the batch tool panel will be deltas to the stored values. -!PREFERENCES_BEHSETALLHINT;Set all parameters to the Set mode.\nAdjustments of parameters in the batch tool panel will be absolute, the actual values will be displayed. -!PREFERENCES_CACHECLEAR;Clear -!PREFERENCES_CACHECLEAR_ALL;Clear all cached files: -!PREFERENCES_CACHECLEAR_ALLBUTPROFILES;Clear all cached files except for cached processing profiles: -!PREFERENCES_CACHECLEAR_ONLYPROFILES;Clear only cached processing profiles: -!PREFERENCES_CACHECLEAR_SAFETY;Only files in the cache are cleared. Processing profiles stored alongside the source images are not touched. -!PREFERENCES_CHUNKSIZES;Tiles per thread -!PREFERENCES_CHUNKSIZE_RAW_AMAZE;AMaZE demosaic -!PREFERENCES_CHUNKSIZE_RAW_CA;Raw CA correction -!PREFERENCES_CHUNKSIZE_RAW_RCD;RCD demosaic !PREFERENCES_CHUNKSIZE_RAW_XT;Xtrans demosaic -!PREFERENCES_CHUNKSIZE_RGB;RGB processing -!PREFERENCES_CROP;Crop Editing -!PREFERENCES_CROP_AUTO_FIT;Automatically zoom to fit the crop -!PREFERENCES_CROP_GUIDES;Guides shown when not editing the crop -!PREFERENCES_CROP_GUIDES_FRAME;Frame -!PREFERENCES_CROP_GUIDES_FULL;Original -!PREFERENCES_CROP_GUIDES_NONE;None +!PREFERENCES_COMPLEXITYLOC;Default complexity for Local Adjustments +!PREFERENCES_COMPLEXITY_EXP;Advanced +!PREFERENCES_COMPLEXITY_NORM;Standard +!PREFERENCES_COMPLEXITY_SIMP;Basic +!PREFERENCES_CUSTPROFBUILD;Custom Processing Profile Builder !PREFERENCES_CUSTPROFBUILDHINT;Executable (or script) file called when a new initial processing profile should be generated for an image.\n\nThe path of the communication file (*.ini style, a.k.a. "Keyfile") is added as a command line parameter. It contains various parameters required for the scripts and image Exif to allow a rules-based processing profile generation.\n\nWARNING: You are responsible for using double quotes where necessary if you're using paths containing spaces. -!PREFERENCES_DIRECTORIES;Directories -!PREFERENCES_EDITORCMDLINE;Custom command line -!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Compact toolbars in File Browser -!PREFERENCES_PERFORMANCE_MEASURE;Measure -!PREFERENCES_PERFORMANCE_MEASURE_HINT;Logs processing times in console -!PREFERENCES_PERFORMANCE_THREADS;Threads -!PREFERENCES_PERFORMANCE_THREADS_LABEL;Maximum number of threads for Noise Reduction and Wavelet Levels (0 = Automatic) -!PREFERENCES_SAVE_TP_OPEN_NOW;Save tool collapsed/expanded state now -!PREFERENCES_TAB_PERFORMANCE;Performance -!PREFERENCES_THUMBNAIL_INSPECTOR_JPEG;Embedded JPEG preview -!PREFERENCES_THUMBNAIL_INSPECTOR_MODE;Image to show -!PREFERENCES_THUMBNAIL_INSPECTOR_RAW;Neutral raw rendering -!PREFERENCES_THUMBNAIL_INSPECTOR_RAW_IF_NO_JPEG_FULLSIZE;Embedded JPEG if fullsize, neutral raw otherwise +!PREFERENCES_CUSTPROFBUILDKEYFORMAT;Keys format +!PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME;Name +!PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID +!PREFERENCES_INSPECTORWINDOW;Open inspector in own window or fullscreen +!PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_SHOWTOOLTIP;Show Local Adjustments advice tooltips +!PREFERENCES_ZOOMONSCROLL;Zoom images by scrolling !PROFILEPANEL_COPYPPASTE;Parameters to copy !PROFILEPANEL_GLOBALPROFILES;Bundled profiles !PROFILEPANEL_LOADPPASTE;Parameters to load -!PROFILEPANEL_MODE_TIP;Processing profile fill mode.\n\nButton pressed: partial profiles will be converted to full profiles; the missing values will be replaced with hard-coded defaults.\n\nButton released: profiles will be applied as they are, altering only those values which they contain. !PROFILEPANEL_PASTEPPASTE;Parameters to paste !PROFILEPANEL_PDYNAMIC;Dynamic !PROFILEPANEL_PINTERNAL;Neutral !PROFILEPANEL_SAVEPPASTE;Parameters to save -!PROGRESSBAR_DECODING;Decoding... -!PROGRESSBAR_GREENEQUIL;Green equilibration... -!PROGRESSBAR_HLREC;Highlight reconstruction... -!PROGRESSBAR_HOTDEADPIXELFILTER;Hot/dead pixel filter... -!PROGRESSBAR_LINEDENOISE;Line noise filter... -!PROGRESSBAR_PROCESSING_PROFILESAVED;Processing profile saved -!PROGRESSBAR_RAWCACORR;Raw CA correction... -!PROGRESSBAR_SNAPSHOT_ADDED;Snapshot added !PROGRESSDLG_PROFILECHANGEDINBROWSER;Processing profile changed in browser -!QINFO_FRAMECOUNT;%2 frames -!QINFO_HDR;HDR / %2 frame(s) -!QINFO_PIXELSHIFT;Pixel Shift / %2 frame(s) -!QUEUE_AUTOSTART_TOOLTIP;Start processing automatically when a new job arrives. -!QUEUE_LOCATION_TITLE;Output Location -!QUEUE_STARTSTOP_TOOLTIP;Start or stop processing the images in the queue.\n\nShortcut: Ctrl+s -!SAMPLEFORMAT_0;Unknown data format -!SAMPLEFORMAT_1;8-bit unsigned -!SAMPLEFORMAT_2;16-bit unsigned !SAMPLEFORMAT_4;24-bit LogLuv !SAMPLEFORMAT_8;32-bit LogLuv -!SAMPLEFORMAT_16;16-bit floating-point -!SAMPLEFORMAT_32;24-bit floating-point -!SAMPLEFORMAT_64;32-bit floating-point -!SAVEDLG_FILEFORMAT_FLOAT; floating-point !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. !SOFTPROOF_GAMUTCHECK_TOOLTIP;Highlight pixels with out-of-gamut colors with respect to:\n- the printer profile, if one is set and soft-proofing is enabled,\n- the output profile, if a printer profile is not set and soft-proofing is enabled,\n- the monitor profile, if soft-proofing is disabled. @@ -1590,6 +2570,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right !TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen the tool is active:\n- Add a picker: left-click.\n- Drag a picker: left-click and drag.\n- Delete a picker: right-click.\n- Delete all pickers: Ctrl+Shift+right-click.\n- Revert to hand tool: right-click outside any picker. +!TOOLBAR_TOOLTIP_PERSPECTIVE;Perspective Correction\n\nEdit control lines to correct perspective distortion. Click this button again to apply correction. !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_TOOLTIP;Linear: will produce a normal linear response.\nSpecial effects: will produce special effects by mixing channels non-linearly. !TP_BWMIX_CC_ENABLED;Adjust complementary color @@ -1601,85 +2582,107 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_BWMIX_CURVEEDITOR_BEFORE_TOOLTIP;Tone curve, just before B&W conversion.\nMay take into account the color components. !TP_BWMIX_CURVEEDITOR_LH_TOOLTIP;Luminance according to hue L=f(H).\nPay attention to extreme values as they may cause artifacts. !TP_BWMIX_FILTER_TOOLTIP;The color filter simulates shots taken with a colored filter placed in front of the lens. Colored filters reduce the transmission of specific color ranges and therefore affect their lightness. E.g. a red filter darkens blue skies. -!TP_BWMIX_MET_CHANMIX;Channel Mixer -!TP_BWMIX_MIXC;Channel Mixer -!TP_BWMIX_NEUTRAL;Reset !TP_BWMIX_RGBLABEL;R: %1%% G: %2%% B: %3%% Total: %4%% !TP_BWMIX_RGBLABEL_HINT;Final RGB factors that take care of all the mixer options.\n"Total" displays the sum of the RGB values:\n- always 100% in relative mode\n- higher (lighter) or lower (darker) than 100% in absolute mode. !TP_BWMIX_RGB_TOOLTIP;Mix the RGB channels. Use presets for guidance.\nPay attention to negative values that may cause artifacts or erratic behavior. !TP_BWMIX_SET_HYPERPANCHRO;Hyper Panchromatic !TP_BWMIX_SET_NORMCONTAST;Normal Contrast !TP_BWMIX_SET_ORTHOCHRO;Orthochromatic -!TP_BWMIX_SET_RGBABS;Absolute RGB -!TP_BWMIX_SET_RGBREL;Relative RGB !TP_BWMIX_SET_ROYGCBPMABS;Absolute ROYGCBPM !TP_BWMIX_SET_ROYGCBPMREL;Relative ROYGCBPM -!TP_BWMIX_TCMODE_SATANDVALBLENDING;B&W Saturation and Value Blending -!TP_BWMIX_TCMODE_WEIGHTEDSTD;B&W Weighted Standard -!TP_CBDL_AFT;After Black-and-White -!TP_CBDL_BEF;Before Black-and-White -!TP_CBDL_METHOD;Process located -!TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_COLORAPP_ABSOLUTELUMINANCE;Absolute luminance +!TP_COLORAPP_ADAPSCEN_TOOLTIP;Corresponds to the luminance in candelas per m2 at the time of shooting, calculated automatically from the exif data. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) !TP_COLORAPP_ALGO_JS;Lightness + Saturation (JS) !TP_COLORAPP_ALGO_QM;Brightness + Colorfulness (QM) !TP_COLORAPP_ALGO_TOOLTIP;Lets you choose between parameter subsets or all parameters. -!TP_COLORAPP_BADPIXSL;Hot/bad pixel filter !TP_COLORAPP_BADPIXSL_TOOLTIP;Suppression of hot/bad (brightly colored) pixels.\n0 = No effect\n1 = Median\n2 = Gaussian.\nAlternatively, adjust the image to avoid very dark shadows.\n\nThese artifacts are due to limitations of CIECAM02. !TP_COLORAPP_BRIGHT;Brightness (Q) -!TP_COLORAPP_BRIGHT_TOOLTIP;Brightness in CIECAM02 takes into account the white's luminosity and differs from L*a*b* and RGB brightness. +!TP_COLORAPP_BRIGHT_TOOLTIP;Brightness in CIECAM02/16 is the amount of perceived light emanating from a stimulus and differs from L*a*b* and RGB brightness. !TP_COLORAPP_CAT02ADAPTATION_TOOLTIP;When setting manually, values above 65 are recommended. +!TP_COLORAPP_CATCLASSIC;Classic +!TP_COLORAPP_CATMET_TOOLTIP;Classic - traditional CIECAM operation. The chromatic adaptation transforms are applied separately on ‘Scene conditions’ and basic illuminant on the one hand, and on basic illuminant and ‘Viewing conditions’ on the other.\n\nSymmetric – The chromatic adaptation is based on the white balance. The ‘Scene conditions’, ‘Image adjustments’ and ‘Viewing conditions’ settings are neutralized.\n\nMixed – Same as the ‘Classic’ option but in this case, the chromatic adaptation is based on the white balance. +!TP_COLORAPP_CATMOD;Cat02/16 mode +!TP_COLORAPP_CATSYMGEN;Automatic Symmetric +!TP_COLORAPP_CATSYMSPE;Mixed !TP_COLORAPP_CHROMA;Chroma (C) !TP_COLORAPP_CHROMA_M;Colorfulness (M) -!TP_COLORAPP_CHROMA_M_TOOLTIP;Colorfulness in CIECAM02 differs from L*a*b* and RGB colorfulness. +!TP_COLORAPP_CHROMA_M_TOOLTIP;Colorfulness in CIECAM02/16 is the perceived amount of hue in relation to gray, an indicator that a stimulus appears to be more or less colored. !TP_COLORAPP_CHROMA_S;Saturation (S) -!TP_COLORAPP_CHROMA_S_TOOLTIP;Saturation in CIECAM02 differs from L*a*b* and RGB saturation. -!TP_COLORAPP_CHROMA_TOOLTIP;Chroma in CIECAM02 differs from L*a*b* and RGB chroma. -!TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation +!TP_COLORAPP_CHROMA_S_TOOLTIP;Saturation in CIECAM02/16 corresponds to the color of a stimulus in relation to its own brightness, differs from L*a*b* and RGB saturation. +!TP_COLORAPP_CHROMA_TOOLTIP;Chroma in CIECAM02/16 corresponds to the color of a stimulus relative to the clarity of a stimulus that appears white under identical conditions, differs from L*a*b* and RGB chroma. +!TP_COLORAPP_CIECAT_DEGREE;CAT02/16 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast (Q) in CIECAM02/16 is based on brightness, differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast (J) in CIECAM02/16 is based on lightness, differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 -!TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. +!TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02/16.\nIf the "CIECAM02/16 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02/16.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 !TP_COLORAPP_CURVEEDITOR2_TOOLTIP;Same usage as with the second exposure tone curve. !TP_COLORAPP_CURVEEDITOR3;Color curve -!TP_COLORAPP_CURVEEDITOR3_TOOLTIP;Adjust either chroma, saturation or colorfulness.\n\nShows the histogram of chromaticity (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of C, s or M after CIECAM02.\n\nC, s and M are not shown in the main histogram panel.\nFor final output refer to the main histogram panel. -!TP_COLORAPP_DATACIE;CIECAM02 output histograms in curves -!TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. -!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_CURVEEDITOR3_TOOLTIP;Adjust either chroma, saturation or colorfulness.\n\nShows the histogram of chromaticity (L*a*b*) before CIECAM02/16.\nIf the "CIECAM02/16 output histograms in curves" checkbox is enabled, shows the histogram of C, S or M after CIECAM02/16.\n\nC, S and M are not shown in the main histogram panel.\nFor final output refer to the main histogram panel. +!TP_COLORAPP_DATACIE;CIECAM02/16 output histograms in curves +!TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02/16 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02/16 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02/16 curves show L*a*b* values before CIECAM02/16 adjustments. +!TP_COLORAPP_DEGREE_TOOLTIP;CAT02/16 is a chromatic adaptation, it converts the values of an image whose white point is that of a given illuminant (for example D65), into new values whose white point is that of the new illuminant - see WP Model (for example D50 or D55). +!TP_COLORAPP_DEGREOUT_TOOLTIP;CAT02/16 is a chromatic adaptation, it converts the values of an image whose white point is that of a given illuminant (for example D50), into new values whose white point is that of the new illuminant - see WP model (for example D75). +!TP_COLORAPP_FREE;Free temp + tint + CAT02/16 +[output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. +!TP_COLORAPP_GEN;Settings - Preset +!TP_COLORAPP_GEN_TOOLTIP;This module is based on the CIECAM color appearance model, which was designed to better simulate how human vision perceives colors under different lighting conditions, e.g., against different backgrounds.\nIt takes into account the environment of each color and modifies its appearance to get as close as possible to human perception.\nIt also adapts the output to the intended viewing conditions (monitor, TV, projector, printer, etc.) so that the chromatic appearance is preserved across the scene and display environments. !TP_COLORAPP_HUE;Hue (h) -!TP_COLORAPP_HUE_TOOLTIP;Hue (h) - angle between 0° and 360°. -!TP_COLORAPP_LABEL;CIE Color Appearance Model 2002 +!TP_COLORAPP_HUE_TOOLTIP;Hue (h) is the degree to which a stimulus can be described as similar to a color described as red, green, blue and yellow. +!TP_COLORAPP_IL41;D41 +!TP_COLORAPP_IL50;D50 +!TP_COLORAPP_IL55;D55 +!TP_COLORAPP_IL60;D60 +!TP_COLORAPP_IL65;D65 +!TP_COLORAPP_IL75;D75 +!TP_COLORAPP_ILA;Incandescent StdA 2856K +!TP_COLORAPP_ILFREE;Free +!TP_COLORAPP_ILLUM;Illuminant +!TP_COLORAPP_ILLUM_TOOLTIP;Select the illuminant closest to the shooting conditions.\nIn general D50, but it can change depending on the time and latitude. +!TP_COLORAPP_LABEL;Color Appearance & Lighting (CIECAM02/16) !TP_COLORAPP_LABEL_SCENE;Scene Conditions !TP_COLORAPP_LABEL_VIEWING;Viewing Conditions !TP_COLORAPP_MEANLUMINANCE;Mean luminance (Yb%) +!TP_COLORAPP_MOD02;CIECAM02 +!TP_COLORAPP_MOD16;CIECAM16 !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected by the user, the output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_MODELCAT;CAM Model +!TP_COLORAPP_MODELCAT_TOOLTIP;Allows you to choose between CIECAM02 or CIECAM16.\n CIECAM02 will sometimes be more accurate.\n CIECAM16 should generate fewer artifacts +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02/16 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02/16] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp + tint + CAT02/16 + [output]: temp and tint are selected by the user, the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_NEUTRAL;Reset !TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_PRESETCAT02;Preset cat02/16 automatic - Symmetric mode +!TP_COLORAPP_PRESETCAT02_TIP;Set combobox, sliders, temp, green so that Cat02/16 automatic is preset.\nYou can change illuminant shooting conditions.\nYou must change Cat02/16 adaptation Viewing conditions if needed.\nYou can change Temperature and Tint Viewing conditions if needed, and other settings if needed.\nAll auto checkbox are disabled !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. +!TP_COLORAPP_SOURCEF_TOOLTIP;Corresponds to the shooting conditions and how to bring the conditions and data back to a "normal" area. Normal" means average or standard conditions and data, i.e. without taking into account CIECAM corrections. !TP_COLORAPP_SURROUND;Surround +!TP_COLORAPP_SURROUNDSRC;Surround - Scene Lighting !TP_COLORAPP_SURROUND_EXDARK;Extremly Dark (Cutsheet) !TP_COLORAPP_SURROUND_TOOLTIP;Changes tones and colors to take into account the viewing conditions of the output device.\n\nAverage: Average light environment (standard). The image will not change.\n\nDim: Dim environment (TV). The image will become slightly dark.\n\nDark: Dark environment (projector). The image will become more dark.\n\nExtremly Dark: Extremly dark environment (cutsheet). The image will become very dark. +!TP_COLORAPP_SURSOURCE_TOOLTIP;Changes tones and colors to take into account the Scene conditions.\n\nAverage: Average light environment (standard). The image will not change.\n\nDim: Dim environment. The image will become slightly bright.\n\nDark: Dark environment. The image will become more bright.\n\nExtremly Dark: Extremly dark environment. The image will become very bright. !TP_COLORAPP_TCMODE_CHROMA;Chroma !TP_COLORAPP_TCMODE_COLORF;Colorfulness !TP_COLORAPP_TCMODE_LABEL1;Curve mode 1 !TP_COLORAPP_TCMODE_LABEL2;Curve mode 2 !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode -!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant, always set Tint=1.\n\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 -!TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 +!TP_COLORAPP_TEMP2_TOOLTIP;Either symmetrical mode temp = White balance.\nEither select illuminant always set Tint=1.\n\nA temp=2856\nD41 temp=4100\nD50 temp=5003\nD55 temp=5503\nD60 temp=6000\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_TEMPOUT_TOOLTIP;Disable to change temperature and tint +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant, always set Tint=1.\n\nA temp=2856\nD41 temp=4100\nD50 temp=5003\nD55 temp=5503\nD60 temp=6000\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_TONECIE;Tone mapping using CIECAM02/16 !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. +!TP_COLORAPP_VIEWINGF_TOOLTIP;Takes into account the support on which the final image will be viewed (monitor, TV, projector, printer, ...), as well as its environment. This process will take the data coming from process "Image Adjustments" and "bring" it to the support in such a way that the viewing conditions and its environment are taken into account. !TP_COLORAPP_VIEWING_ABSOLUTELUMINANCE_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16 cd/m²). -!TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] +!TP_COLORAPP_WBCAM;WB [RT+CAT02/16] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YBOUT_TOOLTIP;Yb is the relative luminance of the background, expressed in % of gray. A gray at 18% corresponds to a background luminance expressed in CIE L of 50%.\nThis data must take into account the average luminance of the image +!TP_COLORAPP_YBSCEN_TOOLTIP;Yb is the relative luminance of the background, expressed in % of gray. A gray at 18% corresponds to a background luminance expressed in CIE L of 50%.\nThis data is calculated from the average luminance of the image !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1738,64 +2741,19 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_COLORTONING_TWOCOLOR_TOOLTIP;Standard chroma:\nLinear response, a* = b*.\n\nSpecial chroma:\nLinear response, a* = b*, but unbound - try under the diagonal.\n\nSpecial a* and b*:\nLinear response unbound with separate curves for a* and b*. Intended for special effects.\n\nSpecial chroma 2 colors:\nMore predictable. !TP_COLORTONING_TWOSTD;Standard chroma !TP_CROP_PPI;PPI -!TP_CROP_RESETCROP;Reset -!TP_CROP_SELECTCROP;Select -!TP_DEFRINGE_THRESHOLD;Threshold -!TP_DEHAZE_DEPTH;Depth -!TP_DEHAZE_LABEL;Haze Removal -!TP_DEHAZE_LUMINANCE;Luminance only -!TP_DEHAZE_SHOW_DEPTH_MAP;Show depth map -!TP_DEHAZE_STRENGTH;Strength +!TP_DEHAZE_SATURATION;Saturation !TP_DIRPYRDENOISE_CHROMINANCE_AMZ;Auto multi-zones -!TP_DIRPYRDENOISE_CHROMINANCE_AUTOGLOBAL;Automatic global -!TP_DIRPYRDENOISE_CHROMINANCE_BLUEYELLOW;Chrominance - Blue-Yellow -!TP_DIRPYRDENOISE_CHROMINANCE_CURVE;Chrominance curve !TP_DIRPYRDENOISE_CHROMINANCE_CURVE_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. -!TP_DIRPYRDENOISE_CHROMINANCE_FRAME;Chrominance -!TP_DIRPYRDENOISE_CHROMINANCE_MANUAL;Manual -!TP_DIRPYRDENOISE_CHROMINANCE_MASTER;Chrominance - Master -!TP_DIRPYRDENOISE_CHROMINANCE_METHOD;Method !TP_DIRPYRDENOISE_CHROMINANCE_METHODADVANCED_TOOLTIP;Manual\nActs on the full image.\nYou control the noise reduction settings manually.\n\nAutomatic global\nActs on the full image.\n9 zones are used to calculate a global chrominance noise reduction setting.\n\nPreview\nActs on the whole image.\nThe part of the image visible in the preview is used to calculate global chrominance noise reduction settings. !TP_DIRPYRDENOISE_CHROMINANCE_METHOD_TOOLTIP;Manual\nActs on the full image.\nYou control the noise reduction settings manually.\n\nAutomatic global\nActs on the full image.\n9 zones are used to calculate a global chrominance noise reduction setting.\n\nAutomatic multi-zones\nNo preview - works only during saving, but using the "Preview" method by matching the tile size and center to the preview size and center you can get an idea of the expected results.\nThe image is divided into tiles (about 10 to 70 depending on image size) and each tile receives its own chrominance noise reduction settings.\n\nPreview\nActs on the whole image.\nThe part of the image visible in the preview is used to calculate global chrominance noise reduction settings. !TP_DIRPYRDENOISE_CHROMINANCE_PMZ;Preview multi-zones !TP_DIRPYRDENOISE_CHROMINANCE_PREVIEW;Preview !TP_DIRPYRDENOISE_CHROMINANCE_PREVIEWRESIDUAL_INFO_TOOLTIP;Displays the remaining noise levels of the part of the image visible in the preview after wavelet.\n\n>300 Very noisy\n100-300 Noisy\n50-100 A little noisy\n<50 Very low noise\n\nBeware, the values will differ between RGB and L*a*b* mode. The RGB values are less accurate because the RGB mode does not completely separate luminance and chrominance. !TP_DIRPYRDENOISE_CHROMINANCE_PREVIEW_INFO;Preview size=%1, Center: Px=%2 Py=%3 -!TP_DIRPYRDENOISE_CHROMINANCE_PREVIEW_NOISEINFO;Preview noise: Mean=%1 High=%2 -!TP_DIRPYRDENOISE_CHROMINANCE_PREVIEW_NOISEINFO_EMPTY;Preview noise: Mean= - High= - !TP_DIRPYRDENOISE_CHROMINANCE_PREVIEW_TILEINFO;Tile size=%1, Center: Tx=%2 Ty=%3 -!TP_DIRPYRDENOISE_CHROMINANCE_REDGREEN;Chrominance - Red-Green -!TP_DIRPYRDENOISE_LABEL;Noise Reduction -!TP_DIRPYRDENOISE_LUMINANCE_CONTROL;Luminance control -!TP_DIRPYRDENOISE_LUMINANCE_CURVE;Luminance curve -!TP_DIRPYRDENOISE_LUMINANCE_FRAME;Luminance -!TP_DIRPYRDENOISE_MAIN_COLORSPACE;Color space !TP_DIRPYRDENOISE_MAIN_COLORSPACE_LAB;L*a*b* -!TP_DIRPYRDENOISE_MAIN_COLORSPACE_TOOLTIP;For raw images either RGB or L*a*b* methods can be used.\n\nFor non-raw images the L*a*b* method will be used, regardless of the selection. !TP_DIRPYRDENOISE_MAIN_GAMMA;Gamma !TP_DIRPYRDENOISE_MAIN_GAMMA_TOOLTIP;Gamma varies noise reduction strength across the range of tones. Smaller values will target shadows, while larger values will stretch the effect to the brighter tones. -!TP_DIRPYRDENOISE_MAIN_MODE;Mode -!TP_DIRPYRDENOISE_MAIN_MODE_AGGRESSIVE;Aggressive -!TP_DIRPYRDENOISE_MAIN_MODE_CONSERVATIVE;Conservative -!TP_DIRPYRDENOISE_MAIN_MODE_TOOLTIP;"Conservative" preserves low frequency chroma patterns, while "aggressive" obliterates them. -!TP_DIRPYRDENOISE_MEDIAN_METHOD;Median method -!TP_DIRPYRDENOISE_MEDIAN_METHOD_CHROMINANCE;Chroma only -!TP_DIRPYRDENOISE_MEDIAN_METHOD_LAB;L*a*b* -!TP_DIRPYRDENOISE_MEDIAN_METHOD_LABEL;Median Filter -!TP_DIRPYRDENOISE_MEDIAN_METHOD_LUMINANCE;Luminance only -!TP_DIRPYRDENOISE_MEDIAN_METHOD_RGB;RGB -!TP_DIRPYRDENOISE_MEDIAN_METHOD_TOOLTIP;When using the "Luminance only" and "L*a*b*" methods, median filtering will be performed just after the wavelet step in the noise reduction pipeline.\nWhen using the "RGB" mode, it will be performed at the very end of the noise reduction pipeline. -!TP_DIRPYRDENOISE_MEDIAN_METHOD_WEIGHTED;Weighted L* (little) + a*b* (normal) -!TP_DIRPYRDENOISE_MEDIAN_PASSES;Median iterations -!TP_DIRPYRDENOISE_MEDIAN_PASSES_TOOLTIP;Applying three median filter iterations with a 3×3 window size often leads to better results than using one median filter iteration with a 7×7 window size. -!TP_DIRPYRDENOISE_MEDIAN_TYPE;Median type -!TP_DIRPYRDENOISE_MEDIAN_TYPE_TOOLTIP;Apply a median filter of the desired window size. The larger the window's size, the longer it takes.\n\n3×3 soft: treats 5 pixels in a 3×3 pixel window.\n3×3: treats 9 pixels in a 3×3 pixel window.\n5×5 soft: treats 13 pixels in a 5×5 pixel window.\n5×5: treats 25 pixels in a 5×5 pixel window.\n7×7: treats 49 pixels in a 7×7 pixel window.\n9×9: treats 81 pixels in a 9×9 pixel window.\n\nSometimes it is possible to achieve higher quality running several iterations with a smaller window size than one iteration with a larger one. -!TP_DIRPYRDENOISE_TYPE_3X3;3×3 -!TP_DIRPYRDENOISE_TYPE_3X3SOFT;3×3 soft -!TP_DIRPYRDENOISE_TYPE_5X5;5×5 -!TP_DIRPYRDENOISE_TYPE_5X5SOFT;5×5 soft -!TP_DIRPYRDENOISE_TYPE_7X7;7×7 -!TP_DIRPYRDENOISE_TYPE_9X9;9×9 !TP_DIRPYREQUALIZER_ALGO_TOOLTIP;Fine: closer to the colors of the skin, minimizing the action on other colors\nLarge: avoid more artifacts. !TP_DIRPYREQUALIZER_HUESKIN_TOOLTIP;This pyramid is for the upper part, so far as the algorithm at its maximum efficiency.\nTo the lower part, the transition zones.\nIf you need to move the area significantly to the left or right - or if there are artifacts: the white balance is incorrect\nYou can slightly reduce the zone to prevent the rest of the image is affected. !TP_DIRPYREQUALIZER_SKIN_TOOLTIP;At -100 skin-tones are targetted.\nAt 0 all tones are treated equally.\nAt +100 skin-tones are protected while all other tones are affected. @@ -1805,31 +2763,21 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_EPD_GAMMA;Gamma !TP_EPD_REWEIGHTINGITERATES;Reweighting iterates !TP_EXPOSURE_AUTOLEVELS_TIP;Toggles execution of Auto Levels to automatically set Exposure slider values based on an image analysis.\nEnables Highlight Reconstruction if necessary. -!TP_EXPOSURE_CLAMPOOG;Clip out-of-gamut colors -!TP_EXPOSURE_CLIP_TIP;The fraction of pixels to be clipped in Auto Levels operation. -!TP_EXPOSURE_HISTMATCHING;Auto-Matched Tone Curve -!TP_EXPOSURE_HISTMATCHING_TOOLTIP;Automatically adjust sliders and curves (except exposure compensation) to match the look of the embedded JPEG thumbnail. -!TP_EXPOSURE_TCMODE_LUMINANCE;Luminance -!TP_EXPOSURE_TCMODE_PERCEPTUAL;Perceptual -!TP_EXPOS_BLACKPOINT_LABEL;Raw Black Points -!TP_EXPOS_WHITEPOINT_LABEL;Raw White Points !TP_FILMNEGATIVE_BLUE;Blue ratio -!TP_FILMNEGATIVE_GREEN;Reference exponent (contrast) -!TP_FILMNEGATIVE_GUESS_TOOLTIP;Automatically set the red and blue ratios by picking two patches which had a neutral hue (no color) in the original scene. The patches should differ in brightness. Set the white balance afterwards. -!TP_FILMNEGATIVE_LABEL;Film Negative -!TP_FILMNEGATIVE_PICK;Pick neutral spots +!TP_FILMNEGATIVE_BLUEBALANCE;Cool/Warm +!TP_FILMNEGATIVE_COLORSPACE;Inversion color space: +!TP_FILMNEGATIVE_COLORSPACE_INPUT;Input color space +!TP_FILMNEGATIVE_COLORSPACE_TOOLTIP;Select the color space used to perform the negative inversion:\nInput color space : perform inversion before the input profile is applied, as in the previous versions of RT.\nWorking color space : perform inversion after input profile, using the currently selected working profile. +!TP_FILMNEGATIVE_COLORSPACE_WORKING;Working color space +!TP_FILMNEGATIVE_GREEN;Reference exponent +!TP_FILMNEGATIVE_GREENBALANCE;Magenta/Green +!TP_FILMNEGATIVE_GUESS_TOOLTIP;Automatically set the red and blue ratios by picking two patches which had a neutral hue (no color) in the original scene. The patches should differ in brightness. +!TP_FILMNEGATIVE_OUT_LEVEL;Output level !TP_FILMNEGATIVE_RED;Red ratio -!TP_FILMSIMULATION_LABEL;Film Simulation -!TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now? -!TP_FILMSIMULATION_STRENGTH;Strength -!TP_FILMSIMULATION_ZEROCLUTSFOUND;Set HaldCLUT directory in Preferences -!TP_FLATFIELD_CLIPCONTROL;Clip control -!TP_FLATFIELD_CLIPCONTROL_TOOLTIP;Clip control avoids clipped highlights caused by applying the flat field. If there are already clipped highlights before applying the flat field, value 0 is used. -!TP_GENERAL_11SCALE_TOOLTIP;The effects of this tool are only visible or only accurate at a preview scale of 1:1. -!TP_GRADIENT_CENTER_X_TOOLTIP;Shift gradient to the left (negative values) or right (positive values). -!TP_GRADIENT_CENTER_Y_TOOLTIP;Shift gradient up (negative values) or down (positive values). -!TP_GRADIENT_STRENGTH_TOOLTIP;Filter strength in stops. -!TP_HLREC_ENA_TOOLTIP;Could be activated by Auto Levels. +!TP_FILMNEGATIVE_REF_LABEL;Input RGB: %1 +!TP_FILMNEGATIVE_REF_PICK;Pick white balance spot +!TP_FILMNEGATIVE_REF_TOOLTIP;Pick a gray patch for white-balancing the output, positive image. +!TP_HLREC_HLBLUR;Blur !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure !TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table @@ -1840,10 +2788,8 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. -!TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. -!TP_ICM_INPUTNONE_TOOLTIP;Use no input color profile at all.\nUse only in special cases. !TP_ICM_PROFILEINTENT;Rendering Intent !TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance @@ -1856,7 +2802,6 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_ICM_WORKING_TRC_NONE;None !TP_ICM_WORKING_TRC_SLOPE;Slope !TP_ICM_WORKING_TRC_TOOLTIP;Only for built-in profiles. -!TP_LABCURVE_CHROMA_TOOLTIP;To apply B&W toning, set Chromaticity to -100. !TP_LABCURVE_CURVEEDITOR_A_RANGE1;Green Saturated !TP_LABCURVE_CURVEEDITOR_A_RANGE2;Green Pastel !TP_LABCURVE_CURVEEDITOR_A_RANGE3;Red Pastel @@ -1870,164 +2815,54 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_LABCURVE_CURVEEDITOR_CC_RANGE2;Dull !TP_LABCURVE_CURVEEDITOR_CC_RANGE3;Pastel !TP_LABCURVE_CURVEEDITOR_CC_RANGE4;Saturated -!TP_LABCURVE_CURVEEDITOR_CC_TOOLTIP;Chromaticity according to chromaticity C=f(C) -!TP_LABCURVE_CURVEEDITOR_CH;CH -!TP_LABCURVE_CURVEEDITOR_CH_TOOLTIP;Chromaticity according to hue C=f(H) -!TP_LABCURVE_CURVEEDITOR_CL;CL -!TP_LABCURVE_CURVEEDITOR_CL_TOOLTIP;Chromaticity according to luminance C=f(L) -!TP_LABCURVE_CURVEEDITOR_HH;HH -!TP_LABCURVE_CURVEEDITOR_HH_TOOLTIP;Hue according to hue H=f(H) -!TP_LABCURVE_CURVEEDITOR_LC;LC -!TP_LABCURVE_CURVEEDITOR_LC_TOOLTIP;Luminance according to chromaticity L=f(C) -!TP_LABCURVE_CURVEEDITOR_LH;LH -!TP_LABCURVE_CURVEEDITOR_LH_TOOLTIP;Luminance according to hue L=f(H) -!TP_LABCURVE_CURVEEDITOR_LL_TOOLTIP;Luminance according to luminance L=f(L) -!TP_LABCURVE_LCREDSK;Restrict LC to red and skin-tones -!TP_LABCURVE_LCREDSK_TIP;If enabled, the LC Curve affects only red and skin-tones.\nIf disabled, it applies to all tones. -!TP_LABCURVE_RSTPROTECTION;Red and skin-tones protection -!TP_LABCURVE_RSTPRO_TOOLTIP;Works on the Chromaticity slider and the CC curve. -!TP_LENSGEOM_LIN;Linear -!TP_LENSGEOM_LOG;Logarithmic -!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected -!TP_LENSPROFILE_CORRECTION_LCPFILE;LCP file -!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected -!TP_LENSPROFILE_LENS_WARNING;Warning: the crop factor used for lens profiling is larger than the crop factor of the camera, the results might be wrong. -!TP_LENSPROFILE_MODE_HEADER;Lens Profile -!TP_LENSPROFILE_USE_CA;Chromatic aberration -!TP_LENSPROFILE_USE_GEOMETRIC;Geometric distortion -!TP_LENSPROFILE_USE_HEADER;Correct -!TP_LENSPROFILE_USE_VIGNETTING;Vignetting -!TP_LOCALCONTRAST_AMOUNT;Amount -!TP_LOCALCONTRAST_DARKNESS;Darkness level -!TP_LOCALCONTRAST_LABEL;Local Contrast -!TP_LOCALCONTRAST_LIGHTNESS;Lightness level -!TP_LOCALCONTRAST_RADIUS;Radius -!TP_METADATA_EDIT;Apply modifications -!TP_METADATA_MODE;Metadata copy mode -!TP_METADATA_STRIP;Strip all metadata !TP_METADATA_TUNNEL;Copy unchanged -!TP_NEUTRAL;Reset -!TP_NEUTRAL_TIP;Resets exposure sliders to neutral values.\nApplies to the same controls that Auto Levels applies to, regardless of whether you used Auto Levels or not. -!TP_PCVIGNETTE_FEATHER_TOOLTIP;Feathering:\n0 = corners only,\n50 = halfway to center,\n100 = to center. -!TP_PCVIGNETTE_ROUNDNESS_TOOLTIP;Roundness:\n0 = rectangle,\n50 = fitted ellipse,\n100 = circle. -!TP_PDSHARPENING_LABEL;Capture Sharpening -!TP_PFCURVE_CURVEEDITOR_CH;Hue -!TP_PFCURVE_CURVEEDITOR_CH_TOOLTIP;Controls defringe strength by color.\nHigher = more,\nLower = less. -!TP_PREPROCESS_DEADPIXFILT;Dead pixel filter -!TP_PREPROCESS_DEADPIXFILT_TOOLTIP;Tries to suppress dead pixels. -!TP_PREPROCESS_GREENEQUIL;Green equilibration -!TP_PREPROCESS_HOTPIXFILT;Hot pixel filter -!TP_PREPROCESS_HOTPIXFILT_TOOLTIP;Tries to suppress hot pixels. -!TP_PREPROCESS_LINEDENOISE_DIRECTION;Direction -!TP_PREPROCESS_LINEDENOISE_DIRECTION_BOTH;Both -!TP_PREPROCESS_LINEDENOISE_DIRECTION_HORIZONTAL;Horizontal -!TP_PREPROCESS_LINEDENOISE_DIRECTION_PDAF_LINES;Horizontal only on PDAF rows -!TP_PREPROCESS_LINEDENOISE_DIRECTION_VERTICAL;Vertical -!TP_PREPROCESS_PDAFLINESFILTER;PDAF lines filter -!TP_PRSHARPENING_LABEL;Post-Resize Sharpening -!TP_PRSHARPENING_TOOLTIP;Sharpens the image after resizing. Only works when the "Lanczos" resizing method is used. It is impossible to preview the effects of this tool. See RawPedia for usage instructions. -!TP_RAWCACORR_AUTOIT;Iterations -!TP_RAWCACORR_AUTOIT_TOOLTIP;This setting is available if "Auto-correction" is checked.\nAuto-correction is conservative, meaning that it often does not correct all chromatic aberration.\nTo correct the remaining chromatic aberration, you can use up to five iterations of automatic chromatic aberration correction.\nEach iteration will reduce the remaining chromatic aberration from the last iteration at the cost of additional processing time. -!TP_RAWCACORR_AVOIDCOLORSHIFT;Avoid color shift -!TP_RAWCACORR_LABEL;Chromatic Aberration Correction -!TP_RAWEXPOS_BLACK_0;Green 1 (lead) -!TP_RAWEXPOS_BLACK_1;Red -!TP_RAWEXPOS_BLACK_2;Blue -!TP_RAWEXPOS_BLACK_3;Green 2 -!TP_RAWEXPOS_BLACK_BLUE;Blue -!TP_RAWEXPOS_BLACK_GREEN;Green -!TP_RAWEXPOS_BLACK_RED;Red -!TP_RAWEXPOS_LINEAR;White-point correction -!TP_RAWEXPOS_RGB;Red, Green, Blue +!TP_PERSPECTIVE_CAMERA_CROP_FACTOR;Crop factor +!TP_PERSPECTIVE_CAMERA_FOCAL_LENGTH;Focal length +!TP_PERSPECTIVE_CAMERA_FRAME;Correction +!TP_PERSPECTIVE_CAMERA_PITCH;Vertical +!TP_PERSPECTIVE_CAMERA_ROLL;Rotation +!TP_PERSPECTIVE_CAMERA_SHIFT_HORIZONTAL;Horizontal shift +!TP_PERSPECTIVE_CAMERA_SHIFT_VERTICAL;Vertical shift +!TP_PERSPECTIVE_CAMERA_YAW;Horizontal +!TP_PERSPECTIVE_CONTROL_LINES;Control lines +!TP_PERSPECTIVE_CONTROL_LINES_TOOLTIP;Ctrl+drag: Draw new line\nRight-click: Delete line +!TP_PERSPECTIVE_METHOD;Method +!TP_PERSPECTIVE_METHOD_CAMERA_BASED;Camera-based +!TP_PERSPECTIVE_METHOD_SIMPLE;Simple +!TP_PERSPECTIVE_POST_CORRECTION_ADJUSTMENT_FRAME;Post-correction adjustment +!TP_PERSPECTIVE_PROJECTION_PITCH;Vertical +!TP_PERSPECTIVE_PROJECTION_ROTATE;Rotation +!TP_PERSPECTIVE_PROJECTION_SHIFT_HORIZONTAL;Horizontal shift +!TP_PERSPECTIVE_PROJECTION_SHIFT_VERTICAL;Vertical shift +!TP_PERSPECTIVE_PROJECTION_YAW;Horizontal +!TP_PERSPECTIVE_RECOVERY_FRAME;Recovery +!TP_PREPROCWB_LABEL;Preprocess White Balance +!TP_PREPROCWB_MODE;Mode +!TP_PREPROCWB_MODE_AUTO;Auto +!TP_PREPROCWB_MODE_CAMERA;Camera !TP_RAWEXPOS_TWOGREEN;Link greens !TP_RAW_1PASSMEDIUM;1-pass (Markesteijn) !TP_RAW_2PASS;1-pass+fast !TP_RAW_3PASSBEST;3-pass (Markesteijn) !TP_RAW_4PASS;3-pass+fast -!TP_RAW_AHD;AHD -!TP_RAW_AMAZE;AMaZE -!TP_RAW_AMAZEVNG4;AMaZE+VNG4 -!TP_RAW_BORDER;Border -!TP_RAW_DCB;DCB -!TP_RAW_DCBENHANCE;DCB enhancement -!TP_RAW_DCBITERATIONS;Number of DCB iterations -!TP_RAW_DCBVNG4;DCB+VNG4 -!TP_RAW_DMETHOD;Method -!TP_RAW_DMETHOD_PROGRESSBAR;%1 demosaicing... -!TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Demosaicing refinement... -!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look.\nPixel Shift is for Pentax/Sony Pixel Shift files. It falls back to AMaZE for non-Pixel Shift files. -!TP_RAW_DUALDEMOSAICAUTOCONTRAST;Auto threshold -!TP_RAW_DUALDEMOSAICAUTOCONTRAST_TOOLTIP;If the checkbox is checked (recommended), RawTherapee calculates an optimum value based on flat regions in the image.\nIf there is no flat region in the image or the image is too noisy, the value will be set to 0.\nTo set the value manually, uncheck the checkbox first (reasonable values depend on the image). -!TP_RAW_DUALDEMOSAICCONTRAST;Contrast threshold -!TP_RAW_EAHD;EAHD -!TP_RAW_FALSECOLOR;False color suppression steps -!TP_RAW_FAST;Fast -!TP_RAW_HD;Threshold -!TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. -!TP_RAW_HPHD;HPHD -!TP_RAW_IGV;IGV -!TP_RAW_IMAGENUM;Sub-image -!TP_RAW_IMAGENUM_SN;SN mode -!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax/Sony Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel, Fuji EXR).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. -!TP_RAW_LABEL;Demosaicing -!TP_RAW_LMMSE;LMMSE -!TP_RAW_LMMSEITERATIONS;LMMSE enhancement steps -!TP_RAW_LMMSE_TOOLTIP;Adds gamma (step 1), median (steps 2-4) and refinement (steps 5-6) to reduce artifacts and improve the signal-to-noise ratio. -!TP_RAW_MONO;Mono -!TP_RAW_NONE;None (Shows sensor pattern) -!TP_RAW_PIXELSHIFT;Pixel Shift -!TP_RAW_PIXELSHIFTBLUR;Blur motion mask -!TP_RAW_PIXELSHIFTDMETHOD;Demosaic method for motion -!TP_RAW_PIXELSHIFTEPERISO;Sensitivity -!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nHigher values increase sensitivity of motion detection.\nChange in small steps and watch the motion mask while changing.\nIncrease sensitivity for underexposed or high ISO images. -!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames -!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel -!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. -!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta color cast in overexposed areas or enable motion correction. -!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion -!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask -!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask -!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts -!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. -!TP_RAW_PIXELSHIFTMM_AUTO;Automatic -!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom -!TP_RAW_PIXELSHIFTMM_OFF;Off -!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction -!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion -!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask -!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask -!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. -!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a green mask showing the regions with motion. -!TP_RAW_PIXELSHIFTSIGMA;Blur radius -!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. -!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions -!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. -!TP_RAW_RCD;RCD -!TP_RAW_RCDVNG4;RCD+VNG4 -!TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix +!TP_RAW_AMAZEBILINEAR;AMaZE+Bilinear +!TP_RAW_DCBBILINEAR;DCB+Bilinear +!TP_RAW_RCDBILINEAR;RCD+Bilinear !TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster.\n+fast gives less artifacts in flat areas !TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix -!TP_RAW_VNG4;VNG4 !TP_RAW_XTRANS;X-Trans !TP_RAW_XTRANSFAST;Fast X-Trans -!TP_RESIZE_ALLOW_UPSCALING;Allow Upscaling -!TP_RESIZE_APPLIESTO;Applies to: -!TP_RETINEX_CONTEDIT_HSL;HSL histogram -!TP_RETINEX_CONTEDIT_LAB;L*a*b* histogram -!TP_RETINEX_CONTEDIT_LH;Hue -!TP_RETINEX_CONTEDIT_MAP;Equalizer !TP_RETINEX_CURVEEDITOR_CD;L=f(L) !TP_RETINEX_CURVEEDITOR_CD_TOOLTIP;Luminance according to luminance L=f(L)\nCorrect raw data to reduce halos and artifacts. !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 the transmission map to achieve the desired luminance.\nThe x-axis is the transmission.\nThe y-axis is the gain. +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Increase or reduce the transmission map to achieve the desired luminance. The x-axis is the transmission. The y-axis is the gain. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free !TP_RETINEX_GAMMA_HIGH;High @@ -2061,8 +2896,8 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_RETINEX_MEDIAN;Transmission median filter !TP_RETINEX_METHOD;Method !TP_RETINEX_METHOD_TOOLTIP;Low = Reinforce low light.\nUniform = Equalize action.\nHigh = Reinforce high light.\nHighlights = Remove magenta in highlights. -!TP_RETINEX_MLABEL;Restored haze-free Min=%1 Max=%2 -!TP_RETINEX_MLABEL_TOOLTIP;Should be near min=0 max=32768\nRestored image with no mixture. +!TP_RETINEX_MLABEL;Restored data Min=%1 Max=%2 +!TP_RETINEX_MLABEL_TOOLTIP;The values should be close to Min=0 Max=32768 (log mode) but other values are possible.You can adjust ‘Clip restored data (gain)’ and ‘Offset’ to normalize.\nRecovers image data without blending !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. @@ -2075,9 +2910,9 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold !TP_RETINEX_THRESHOLD_TOOLTIP;Limits in/out.\nIn = image source,\nOut = image gauss. -!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_TLABEL;TM Datas Min=%1 Max=%2 Mean=%3 Sigma=%4 +!TP_RETINEX_TLABEL2;TM Effective Tm=%1 TM=%2 +!TP_RETINEX_TLABEL_TOOLTIP;ransmission map result.\nMin and Max are used by Variance.\nTm=Min TM=Max of Transmission Map.\nYou can normalize the results with the threshold slider. !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. @@ -2090,204 +2925,188 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_RETINEX_VIEW_NONE;Standard !TP_RETINEX_VIEW_TRAN;Transmission - Auto !TP_RETINEX_VIEW_TRAN2;Transmission - Fixed -!TP_RETINEX_VIEW_UNSHARP;Unsharp mask -!TP_SHARPENING_BLUR;Blur radius -!TP_SHARPENING_CONTRAST;Contrast threshold -!TP_SHARPENING_ITERCHECK;Auto limit iterations -!TP_SHARPENING_RADIUS_BOOST;Corner radius boost -!TP_SHARPENMICRO_CONTRAST;Contrast threshold -!TP_SHARPENMICRO_LABEL;Microcontrast -!TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 -!TP_SHARPENMICRO_UNIFORMITY;Uniformity !TP_SOFTLIGHT_LABEL;Soft Light !TP_SOFTLIGHT_STRENGTH;Strength -!TP_TM_FATTAL_AMOUNT;Amount -!TP_TM_FATTAL_ANCHOR;Anchor -!TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Detail -!TP_VIBRANCE_AVOIDCOLORSHIFT;Avoid color shift !TP_VIBRANCE_CURVEEDITOR_SKINTONES;HH !TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;Skin-tones !TP_VIBRANCE_CURVEEDITOR_SKINTONES_RANGE1;Red/Purple !TP_VIBRANCE_CURVEEDITOR_SKINTONES_RANGE2;Red !TP_VIBRANCE_CURVEEDITOR_SKINTONES_RANGE3;Red/Yellow !TP_VIBRANCE_CURVEEDITOR_SKINTONES_RANGE4;Yellow -!TP_VIBRANCE_CURVEEDITOR_SKINTONES_TOOLTIP;Hue according to hue H=f(H) !TP_VIBRANCE_LABEL;Vibrance -!TP_VIBRANCE_PASTELS;Pastel Tones +!TP_VIBRANCE_PASTELS;Pastel tones !TP_VIBRANCE_PASTSATTOG;Link pastel and saturated tones -!TP_VIBRANCE_PROTECTSKINS;Protect skin-tones !TP_VIBRANCE_PSTHRESHOLD;Pastel/saturated tones threshold !TP_VIBRANCE_PSTHRESHOLD_SATTHRESH;Saturation threshold !TP_VIBRANCE_PSTHRESHOLD_TOOLTIP;The vertical axis represents pastel tones at the bottom and saturated tones at the top.\nThe horizontal axis represents the saturation range. !TP_VIBRANCE_PSTHRESHOLD_WEIGTHING;Pastel/saturated transition's weighting !TP_VIBRANCE_SATURATED;Saturated Tones -!TP_WAVELET_1;Level 1 -!TP_WAVELET_2;Level 2 -!TP_WAVELET_3;Level 3 -!TP_WAVELET_4;Level 4 -!TP_WAVELET_5;Level 5 -!TP_WAVELET_6;Level 6 -!TP_WAVELET_7;Level 7 -!TP_WAVELET_8;Level 8 -!TP_WAVELET_9;Level 9 -!TP_WAVELET_APPLYTO;Apply To -!TP_WAVELET_AVOID;Avoid color shift -!TP_WAVELET_B0;Black -!TP_WAVELET_B1;Grey -!TP_WAVELET_B2;Residual -!TP_WAVELET_BACKGROUND;Background -!TP_WAVELET_BACUR;Curve !TP_WAVELET_BALANCE;Contrast balance d/v-h !TP_WAVELET_BALANCE_TOOLTIP;Alters the balance between the wavelet directions: vertical-horizontal and diagonal.\nIf contrast, chroma or residual tone mapping are activated, the effect due to balance is amplified. !TP_WAVELET_BALCHRO;Chroma balance +!TP_WAVELET_BALCHROM;Denoise equalizer Blue-Yellow/Red-Green !TP_WAVELET_BALCHRO_TOOLTIP;If enabled, the 'Contrast balance' curve or slider also modifies chroma balance. -!TP_WAVELET_BANONE;None -!TP_WAVELET_BASLI;Slider +!TP_WAVELET_BALLUM;Denoise equalizer White-Black !TP_WAVELET_BATYPE;Contrast balance method -!TP_WAVELET_CBENAB;Toning and Color Balance -!TP_WAVELET_CB_TOOLTIP;For strong values product color-toning by combining it or not with levels decomposition 'toning'\nFor low values you can change the white balance of the background (sky, ...) without changing that of the front plane, generally more contrasted -!TP_WAVELET_CCURVE;Local contrast -!TP_WAVELET_CH1;Whole chroma range -!TP_WAVELET_CH2;Saturated/pastel -!TP_WAVELET_CH3;Link contrast levels -!TP_WAVELET_CHCU;Curve -!TP_WAVELET_CHR;Chroma-contrast link strength -!TP_WAVELET_CHRO;Saturated/pastel threshold +!TP_WAVELET_BL;Blur levels +!TP_WAVELET_BLCURVE;Blur by levels +!TP_WAVELET_BLURFRAME;Blur +!TP_WAVELET_BLUWAV;Attenuation response +!TP_WAVELET_CBENAB;Toning and Color balance +!TP_WAVELET_CB_TOOLTIP;With high values you can create special effects, similar to those achieved with the Chroma Module, but focused on the residual image\nWith moderate values you can manually correct the white balance +!TP_WAVELET_CHROFRAME;Denoise chrominance +!TP_WAVELET_CHROMAFRAME;Chroma +!TP_WAVELET_CHROMCO;Chrominance Coarse +!TP_WAVELET_CHROMFI;Chrominance Fine !TP_WAVELET_CHRO_TOOLTIP;Sets the wavelet level which will be the threshold between saturated and pastel colors.\n1-x: saturated\nx-9: pastel\n\nIf the value exceeds the amount of wavelet levels you are using then it will be ignored. +!TP_WAVELET_CHRWAV;Blur chroma !TP_WAVELET_CHR_TOOLTIP;Adjusts chroma as a function of "contrast levels" and "chroma-contrast link strength" -!TP_WAVELET_CHSL;Sliders -!TP_WAVELET_CHTYPE;Chrominance method -!TP_WAVELET_COLORT;Opacity Red-Green -!TP_WAVELET_COMPCONT;Contrast +!TP_WAVELET_CLA;Clarity +!TP_WAVELET_CLARI;Sharp-mask and Clarity +!TP_WAVELET_COLORT;Opacity red-green +!TP_WAVELET_COMPEXPERT;Advanced !TP_WAVELET_COMPGAMMA;Compression gamma !TP_WAVELET_COMPGAMMA_TOOLTIP;Adjusting the gamma of the residual image allows you to equilibrate the data and histogram. +!TP_WAVELET_COMPLEXLAB;Complexity +!TP_WAVELET_COMPLEX_TOOLTIP;Standard: shows a reduced set of tools suitable for most processing operations.\nAdvanced: shows the complete set of tools for advanced processing operations +!TP_WAVELET_COMPNORMAL;Standard !TP_WAVELET_COMPTM;Tone mapping !TP_WAVELET_CONTEDIT;'After' contrast curve -!TP_WAVELET_CONTR;Gamut -!TP_WAVELET_CONTRA;Contrast -!TP_WAVELET_CONTRAST_MINUS;Contrast - -!TP_WAVELET_CONTRAST_PLUS;Contrast + -!TP_WAVELET_CONTRA_TOOLTIP;Changes contrast of the residual image. -!TP_WAVELET_CTYPE;Chrominance control +!TP_WAVELET_CONTFRAME;Contrast - Compression +!TP_WAVELET_CONTRASTEDIT;Finer - Coarser levels +!TP_WAVELET_CURVEEDITOR_BL_TOOLTIP;Disabled if zoom > about 300% !TP_WAVELET_CURVEEDITOR_CC_TOOLTIP;Modifies local contrast as a function of the original local contrast (abscissa).\nLow abscissa values represent small local contrast (real values about 10..20).\n50% abscissa represents average local contrast (real value about 100..300).\n66% abscissa represents standard deviation of local contrast (real value about 300..800).\n100% abscissa represents maximum local contrast (real value about 3000..8000). !TP_WAVELET_CURVEEDITOR_CH;Contrast levels=f(Hue) !TP_WAVELET_CURVEEDITOR_CH_TOOLTIP;Modifies each level's contrast as a function of hue.\nTake care not to overwrite changes made with the Gamut sub-tool's hue controls.\nThe curve will only have an effect when wavelet contrast level sliders are non-zero. !TP_WAVELET_CURVEEDITOR_CL;L -!TP_WAVELET_CURVEEDITOR_CL_TOOLTIP;Applies a final contrast luminance curve at the end of the wavelet treatment. +!TP_WAVELET_CURVEEDITOR_CL_TOOLTIP;Applies a final contrast-luminance curve at the end of the wavelet processing. !TP_WAVELET_CURVEEDITOR_HH;HH -!TP_WAVELET_CURVEEDITOR_HH_TOOLTIP;Modifies the residual image's hue as a function of hue. -!TP_WAVELET_DALL;All directions -!TP_WAVELET_DAUB;Edge performance -!TP_WAVELET_DAUB2;D2 - low -!TP_WAVELET_DAUB4;D4 - standard -!TP_WAVELET_DAUB6;D6 - standard plus -!TP_WAVELET_DAUB10;D10 - medium -!TP_WAVELET_DAUB14;D14 - high -!TP_WAVELET_DAUB_TOOLTIP;Changes Daubechies coefficients:\nD4 = Standard,\nD14 = Often best performance, 10% more time-intensive.\n\nAffects edge detection as well as the general quality of the firsts levels. However the quality is not strictly related to this coefficient and can vary with images and uses. -!TP_WAVELET_DONE;Vertical -!TP_WAVELET_DTHR;Diagonal -!TP_WAVELET_DTWO;Horizontal -!TP_WAVELET_EDCU;Curve -!TP_WAVELET_EDGCONT;Local contrast -!TP_WAVELET_EDGCONT_TOOLTIP;Adjusting the points to the left decreases contrast, and to the right increases it.\nBottom-left, top-left, top-right and bottom-right represent respectively local contrast for low values, mean, mean+stdev and maxima. -!TP_WAVELET_EDGE;Edge Sharpness +!TP_WAVELET_CURVEEDITOR_HH_TOOLTIP;Modifies the residual image hue as a function of hue. +!TP_WAVELET_DAUBLOCAL;Wavelet Edge performance +!TP_WAVELET_DEN5THR;Guided threshold +!TP_WAVELET_DEN12LOW;1 2 Low +!TP_WAVELET_DEN12PLUS;1 2 High +!TP_WAVELET_DEN14LOW;1 4 Low +!TP_WAVELET_DEN14PLUS;1 4 High +!TP_WAVELET_DENCONTRAST;Local contrast Equalizer +!TP_WAVELET_DENCURV;Curve +!TP_WAVELET_DENEQUAL;1 2 3 4 Equal +!TP_WAVELET_DENH;Threshold +!TP_WAVELET_DENL;Correction structure +!TP_WAVELET_DENLH;Guided threshold by detail levels 1-4 +!TP_WAVELET_DENLOCAL_TOOLTIP;Use a curve in order to guide the denoising according to the local contrast.\nThe areas are denoised, the structures are maintained +!TP_WAVELET_DENMIX_TOOLTIP;Balances the action of the guide taking into account the original image and the denoised image +!TP_WAVELET_DENOISE;Guide curve based on Local contrast +!TP_WAVELET_DENOISEGUID;Guided threshold based on hue +!TP_WAVELET_DENOISEH;High levels Curve Local contrast +!TP_WAVELET_DENOISEHUE;Denoise hue equalizer +!TP_WAVELET_DENQUA;Mode +!TP_WAVELET_DENSIGMA_TOOLTIP;Adapts the shape of the guide +!TP_WAVELET_DENSLI;Slider +!TP_WAVELET_DENSLILAB;Method +!TP_WAVELET_DENWAVGUID_TOOLTIP;Uses hue to reduce or increase the action of the guided filter +!TP_WAVELET_DENWAVHUE_TOOLTIP;Amplify or reduce denoising depending on the color +!TP_WAVELET_DETEND;Details +!TP_WAVELET_DIRFRAME;Directional contrast +!TP_WAVELET_EDEFFECT;Attenuation response +!TP_WAVELET_EDEFFECT_TOOLTIP;This slider selects the range of contrast values that will receive the full effect of any adjustment +!TP_WAVELET_EDGCONT_TOOLTIP;Adjusting the points to the left decreases contrast, and to the right increases it.\nBottom-left, top-left, top-right and bottom-right represent respectively local contrast for low values, mean, mean+std. dev. and maxima. !TP_WAVELET_EDGEAMPLI;Base amplification !TP_WAVELET_EDGEDETECT;Gradient sensitivity !TP_WAVELET_EDGEDETECTTHR;Threshold low (noise) -!TP_WAVELET_EDGEDETECTTHR2;Threshold high (detection) -!TP_WAVELET_EDGEDETECTTHR_TOOLTIP;This adjuster lets you target edge detection for example to avoid applying edge sharpness to fine details, such as noise in the sky. +!TP_WAVELET_EDGEDETECTTHR2;Edge enhancement +!TP_WAVELET_EDGEDETECTTHR_TOOLTIP;This slider sets a threshold below which finer details won't be considered as an edge !TP_WAVELET_EDGEDETECT_TOOLTIP;Moving the slider to the right increases edge sensitivity. This affects local contrast, edge settings and noise. !TP_WAVELET_EDGESENSI;Edge sensitivity !TP_WAVELET_EDGREINF_TOOLTIP;Reinforce or reduce the action of the first level, do the opposite to the second level, and leave the rest unchanged. -!TP_WAVELET_EDGTHRESH;Detail -!TP_WAVELET_EDGTHRESH_TOOLTIP;Change the repartition between the first levels and the others. The higher the threshold the more the action is centered on the first levels. Be careful with negative values, they increase the action of high levels and can introduce artifacts. -!TP_WAVELET_EDRAD;Radius -!TP_WAVELET_EDRAD_TOOLTIP;This radius adjustment is very different from those in other sharpening tools. Its value is compared to each level through a complex function. In this sense, a value of zero still has an effect. -!TP_WAVELET_EDSL;Threshold Sliders +!TP_WAVELET_EDRAD_TOOLTIP;This adjustment controls the local enhancement. A value of zero still has an effect !TP_WAVELET_EDTYPE;Local contrast method -!TP_WAVELET_EDVAL;Strength !TP_WAVELET_FINAL;Final Touchup -!TP_WAVELET_FINEST;Finest -!TP_WAVELET_HIGHLIGHT;Highlight luminance range -!TP_WAVELET_HS1;Whole luminance range -!TP_WAVELET_HS2;Shadows/Highlights -!TP_WAVELET_HUESKIN;Skin hue +!TP_WAVELET_FINCFRAME;Final local contrast +!TP_WAVELET_FINCOAR_TOOLTIP;The left (positive) part of the curve acts on the finer levels (increase).\nThe 2 points on the abscissa represent the respective action limits of finer and coarser levels 5 and 6 (default).\nThe right (negative) part of the curve acts on the coarser levels (increase).\nAvoid moving the left part of the curve with negative values. Avoid moving the right part of the curve with positives values +!TP_WAVELET_FINTHR_TOOLTIP;Uses local contrast to reduce or increase the action of the guided filter +!TP_WAVELET_GUIDFRAME;Final smoothing (guided filter) +!TP_WAVELET_HIGHLIGHT;Finer levels luminance range !TP_WAVELET_HUESKIN_TOOLTIP;The bottom points set the beginning of the transition zone, and the upper points the end of it, where the effect is at its maximum.\n\nIf you need to move the area significantly, or if there are artifacts, then the white balance is incorrect. -!TP_WAVELET_HUESKY;Sky hue !TP_WAVELET_HUESKY_TOOLTIP;The bottom points set the beginning of the transition zone, and the upper points the end of it, where the effect is at its maximum.\n\nIf you need to move the area significantly, or if there are artifacts, then the white balance is incorrect. !TP_WAVELET_ITER;Delta balance levels !TP_WAVELET_ITER_TOOLTIP;Left: increase low levels and reduce high levels,\nRight: reduce low levels and increase high levels. -!TP_WAVELET_LABEL;Wavelet Levels -!TP_WAVELET_LARGEST;Coarsest -!TP_WAVELET_LEVCH;Chroma -!TP_WAVELET_LEVDIR_ALL;All levels in all directions -!TP_WAVELET_LEVDIR_INF;Below or equal the level -!TP_WAVELET_LEVDIR_ONE;One level -!TP_WAVELET_LEVDIR_SUP;Above the level -!TP_WAVELET_LEVELS;Wavelet levels -!TP_WAVELET_LEVELS_TOOLTIP;Choose the number of detail levels the image is to be decomposed into. More levels require more RAM and require a longer processing time. -!TP_WAVELET_LEVF;Contrast -!TP_WAVELET_LEVLABEL;Preview maximum possible levels = %1 -!TP_WAVELET_LEVONE;Level 2 -!TP_WAVELET_LEVTHRE;Level 4 -!TP_WAVELET_LEVTWO;Level 3 -!TP_WAVELET_LEVZERO;Level 1 -!TP_WAVELET_LINKEDG;Link with Edge Sharpness' Strength +!TP_WAVELET_LEVDEN;Level 5-6 denoise +!TP_WAVELET_LEVELHIGH;Radius 5-6 +!TP_WAVELET_LEVELLOW;Radius 1-4 +!TP_WAVELET_LEVELSIGM;Radius +!TP_WAVELET_LEVFOUR;Level 5-6 denoise and guided threshold +!TP_WAVELET_LIMDEN;Interaction levels 5-6 on levels 1-4 !TP_WAVELET_LIPST;Enhanced algoritm -!TP_WAVELET_LOWLIGHT;Shadow luminance range -!TP_WAVELET_MEDGREINF;First level -!TP_WAVELET_MEDI;Reduce artifacts in blue sky +!TP_WAVELET_LOWLIGHT;Coarser levels luminance range +!TP_WAVELET_LOWTHR_TOOLTIP;Prevents amplification of fine textures and noise !TP_WAVELET_MEDILEV;Edge detection !TP_WAVELET_MEDILEV_TOOLTIP;When you enable Edge Detection, it is recommanded:\n- to disabled low contrast levels to avoid artifacts,\n- to use high values of gradient sensitivity.\n\nYou can modulate the strength with 'refine' from Denoise and Refine. -!TP_WAVELET_NEUTRAL;Neutral -!TP_WAVELET_NOIS;Denoise -!TP_WAVELET_NOISE;Denoise and Refine +!TP_WAVELET_MERGEC;Merge chroma +!TP_WAVELET_MERGEL;Merge luma +!TP_WAVELET_MIXCONTRAST;Reference local contrast +!TP_WAVELET_MIXDENOISE;Denoise +!TP_WAVELET_MIXMIX;Mixed 50% noise - 50% denoise +!TP_WAVELET_MIXMIX70;Mixed 30% noise - 70% denoise +!TP_WAVELET_MIXNOISE;Noise +!TP_WAVELET_NOISE_TOOLTIP;If level 4 luminance denoise superior to 50, mode Aggressive is used.\nIf chrominance coarse superior to 20, mode Aggressive is used. !TP_WAVELET_NPHIGH;High !TP_WAVELET_NPLOW;Low !TP_WAVELET_NPNONE;None !TP_WAVELET_NPTYPE;Neighboring pixels !TP_WAVELET_NPTYPE_TOOLTIP;This algorithm uses the proximity of a pixel and eight of its neighbors. If less difference, edges are reinforced. -!TP_WAVELET_OPACITY;Opacity Blue-Yellow +!TP_WAVELET_OFFSET_TOOLTIP;Offset modifies the balance between low contrast and high contrast details.\nHigh values will amplify contrast changes to the higher contrast details, whereas low values will amplify contrast changes to low contrast details.\nBy using a low Attenuation response value you can select which contrast values will be enhanced. +!TP_WAVELET_OLDSH;Algorithm using negatives values +!TP_WAVELET_OPACITY;Opacity blue-yellow !TP_WAVELET_OPACITYW;Contrast balance d/v-h curve -!TP_WAVELET_OPACITYWL;Final local contrast +!TP_WAVELET_OPACITYWL;Local contrast !TP_WAVELET_OPACITYWL_TOOLTIP;Modify the final local contrast at the end of the wavelet treatment.\n\nThe left side represents the smallest local contrast, progressing to the largest local contrast on the right. !TP_WAVELET_PASTEL;Pastel chroma -!TP_WAVELET_PROC;Process -!TP_WAVELET_RE1;Reinforced -!TP_WAVELET_RE2;Unchanged -!TP_WAVELET_RE3;Reduced -!TP_WAVELET_RESCHRO;Chroma -!TP_WAVELET_RESCON;Shadows -!TP_WAVELET_RESCONH;Highlights -!TP_WAVELET_RESID;Residual Image +!TP_WAVELET_PROTAB;Protection +!TP_WAVELET_QUAAGRES;Aggressive +!TP_WAVELET_QUACONSER;Conservative +!TP_WAVELET_QUANONE;Off +!TP_WAVELET_RADIUS;Radius shadows - highlight +!TP_WAVELET_RANGEAB;Range a and b % +!TP_WAVELET_RESBLUR;Blur luminance +!TP_WAVELET_RESBLURC;Blur chroma +!TP_WAVELET_RESBLUR_TOOLTIP;Disabled if zoom > about 500% !TP_WAVELET_SAT;Saturated chroma -!TP_WAVELET_SETTINGS;Wavelet Settings -!TP_WAVELET_SKIN;Skin targetting/protection +!TP_WAVELET_SHA;Sharp mask +!TP_WAVELET_SHFRAME;Shadows/Highlights +!TP_WAVELET_SHOWMASK;Show wavelet 'mask' +!TP_WAVELET_SIGM;Radius +!TP_WAVELET_SIGMA;Attenuation response +!TP_WAVELET_SIGMAFIN;Attenuation response +!TP_WAVELET_SIGMA_TOOLTIP;The effect of the contrast sliders is stronger in medium contrast details, and weaker in high and low contrast details.\n With this slider you can control how quickly the effect dampens towards the extreme contrasts.\n The higher the slider is set, the wider the range of contrasts which will get a strong change, and the higher the risk to generate artifacts.\n .The lower it is, the more the effect will be pinpointed towards a narrow range of contrast values !TP_WAVELET_SKIN_TOOLTIP;At -100 skin-tones are targetted.\nAt 0 all tones are treated equally.\nAt +100 skin-tones are protected while all other tones are affected. -!TP_WAVELET_SKY;Sky targetting/protection -!TP_WAVELET_SKY_TOOLTIP;At -100 sky-tones are targetted.\nAt 0 all tones are treated equally.\nAt +100 sky-tones are protected while all other tones are affected. -!TP_WAVELET_STREN;Strength -!TP_WAVELET_STRENGTH;Strength -!TP_WAVELET_SUPE;Extra -!TP_WAVELET_THR;Shadows threshold -!TP_WAVELET_THRESHOLD;Highlight levels -!TP_WAVELET_THRESHOLD2;Shadow levels -!TP_WAVELET_THRESHOLD2_TOOLTIP;Only levels between 9 and 9 minus the value will be affected by the shadow luminance range. Other levels will be fully treated. The highest level possible is limited by the highlight level value (9 minus highlight level value). -!TP_WAVELET_THRESHOLD_TOOLTIP;Only levels beyond the chosen value will be affected by the highlight luminance range. Other levels will be fully treated. The chosen value here limits the highest possible value of the shadow levels. -!TP_WAVELET_THRH;Highlights threshold -!TP_WAVELET_TILESBIG;Big tiles -!TP_WAVELET_TILESFULL;Full image -!TP_WAVELET_TILESIZE;Tiling method -!TP_WAVELET_TILESLIT;Little tiles -!TP_WAVELET_TILES_TOOLTIP;Processing the full image leads to better quality and is the recommended option, while using tiles is a fall-back solution for users with little RAM. Refer to RawPedia for memory requirements. +!TP_WAVELET_SKY;Hue targetting/protection +!TP_WAVELET_SKY_TOOLTIP;Allows you to target or protect a range of hues.\nAt -100 selected hues are targetted.\nAt 0 all hues are treated equally.\nAt +100 selected hues are protected while all other hues are targetted. +!TP_WAVELET_SOFTRAD;Soft radius +!TP_WAVELET_STREND;Strength +!TP_WAVELET_THRDEN_TOOLTIP;Generates a stepped curve in order to guide the denoising according to the local contrast.\nThe areas are denoised, the structures are maintained +!TP_WAVELET_THREND;Local contrast threshold +!TP_WAVELET_THRESHOLD;Finer levels +!TP_WAVELET_THRESHOLD2;Coarser levels +!TP_WAVELET_THRESHOLD2_TOOLTIP;Only levels from the chosen value to the selected number of ‘wavelet levels’ will be affected by the Shadow luminance range. +!TP_WAVELET_THRESHOLD_TOOLTIP;Only levels below and including the chosen value will be affected by the Highlight luminance range. +!TP_WAVELET_THRESWAV;Balance threshold +!TP_WAVELET_TMEDGS;Edge stopping +!TP_WAVELET_TMSCALE;Scale !TP_WAVELET_TMSTRENGTH;Compression strength -!TP_WAVELET_TMSTRENGTH_TOOLTIP;Control the strength of tone mapping or contrast compression of the residual image. When the value is different from 0, the Strength and Gamma sliders of the Tone Mapping tool in the Exposure tab will become grayed out. +!TP_WAVELET_TMSTRENGTH_TOOLTIP;Control the strength of tone mapping or contrast compression of the residual image. !TP_WAVELET_TMTYPE;Compression method -!TP_WAVELET_TON;Toning +!TP_WAVELET_TONFRAME;Excluded colors +!TP_WAVELET_USH;None +!TP_WAVELET_USHARP;Clarity method +!TP_WAVELET_USHARP_TOOLTIP;Origin : the source file is the file before Wavelet.\nWavelet : the source file is the file including wavelet threatment +!TP_WAVELET_USH_TOOLTIP;If you select Sharp-mask, you can choose any level (in Settings) from 1 to 4 for processing.\nIf you select Clarity, you can choose any level (in Settings) between 5 and Extra. +!TP_WAVELET_WAVLOWTHR;Low contrast threshold +!TP_WAVELET_WAVOFFSET;Offset +!TP_WBALANCE_AUTOITCGREEN;Temperature correlation +!TP_WBALANCE_AUTOOLD;RGB grey +!TP_WBALANCE_AUTO_HEADER;Automatic !TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behavior of "white balance" by modulating the blue/red balance.\nThis can be useful when shooting conditions:\na) are far from the standard illuminant (e.g. underwater),\nb) are far from conditions where calibrations were performed,\nc) where the matrices or ICC profiles are unsuitable. -!TP_WBALANCE_FLASH60;Standard, Canon, Pentax, Olympus -!TP_WBALANCE_FLASH65;Nikon, Panasonic, Sony, Minolta !TP_WBALANCE_FLUO1;F1 - Daylight !TP_WBALANCE_FLUO2;F2 - Cool White !TP_WBALANCE_FLUO3;F3 - White @@ -2300,16 +3119,13 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_WBALANCE_FLUO10;F10 - Philips TL85 !TP_WBALANCE_FLUO11;F11 - Philips TL84 !TP_WBALANCE_FLUO12;F12 - Philips TL83 -!TP_WBALANCE_FLUO_HEADER;Fluorescent !TP_WBALANCE_GTI;GTI !TP_WBALANCE_HMI;HMI !TP_WBALANCE_JUDGEIII;JudgeIII !TP_WBALANCE_LAMP_HEADER;Lamp !TP_WBALANCE_LED_CRS;CRS SP12 WWMR16 !TP_WBALANCE_LED_LSI;LSI Lumelex 2040 -!TP_WBALANCE_PICKER;Pick !TP_WBALANCE_SOLUX47;Solux 4700K (vendor) !TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery) -!TP_WBALANCE_TEMPBIAS;AWB temperature bias -!TP_WBALANCE_TEMPBIAS_TOOLTIP;Allows to alter the computation of the "auto white balance"\nby biasing it towards warmer or cooler temperatures. The bias\nis expressed as a percentage of the computed temperature,\nso that the result is given by "computedTemp + computedTemp * bias". -!TP_WBALANCE_TUNGSTEN;Tungsten +!TP_WBALANCE_STUDLABEL;Correlation factor: %1 +!TP_WBALANCE_STUDLABEL_TOOLTIP;Display calculated Student correlation.\nLower values are better, where <0.005 is excellent,\n<0.01 is good, and >0.5 is poor.\nLow values do not mean that the white balance is good:\nif the illuminant is non-standard the results can be erratic.\nA value of 1000 means previous calculations are used and\nthe resultsare probably good. diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index ae2d78b2f..083bf654a 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -809,7 +809,7 @@ ICCPROFCREATOR_PROF_V2;ICC v2 ICCPROFCREATOR_PROF_V4;ICC v4 ICCPROFCREATOR_SAVEDIALOG_TITLE;Enregistrer le profil ICC sous... ICCPROFCREATOR_SLOPE;Pente -ICCPROFCREATOR_TRC_PRESET;Courbe de réponse tonale: +ICCPROFCREATOR_TRC_PRESET;Courbe de réponse tonale IPTCPANEL_CATEGORY;Catégorie IPTCPANEL_CATEGORYHINT;Identifie le sujet de l'image selon l'opinion du fournisseur. IPTCPANEL_CITY;Ville @@ -1297,8 +1297,8 @@ TP_BWMIX_AUTOCH;Auto TP_BWMIX_CC_ENABLED;Ajuster les couleurs complémentaires TP_BWMIX_CC_TOOLTIP;Activer pour permettre l'ajustage automatique des couleur complémentaire dans le mode ROJVCBPM TP_BWMIX_CHANNEL;Égaliseur de Luminance -TP_BWMIX_CURVEEDITOR1;Courbe 'avant' -TP_BWMIX_CURVEEDITOR2;Courbe 'après' +TP_BWMIX_CURVEEDITOR1;Courbe 'avant': +TP_BWMIX_CURVEEDITOR2;Courbe 'après': TP_BWMIX_CURVEEDITOR_AFTER_TOOLTIP;Courbe tonale, après la conversion en N&B, à la fin du traitement TP_BWMIX_CURVEEDITOR_BEFORE_TOOLTIP;Courbe tonale, juste avant la conversion en N&B\nPeut prendre en compte les composantes couleur TP_BWMIX_CURVEEDITOR_LH_TOOLTIP;Modifie la luminance en fonction de la teinte\nFaites attention aux valeurs extrêmes qui peuvent causer des artefacts @@ -1363,6 +1363,7 @@ TP_COARSETRAF_TOOLTIP_ROTLEFT;Rotation vers la gauche\nRaccourci: [\n\nRa TP_COARSETRAF_TOOLTIP_ROTRIGHT;Rotation vers la droite\nRaccourci: ]\n\nRaccourci en mode Éditeur unique: Alt-] TP_COARSETRAF_TOOLTIP_VFLIP;Symétriser / axe horizontal TP_COLORAPP_ABSOLUTELUMINANCE;Luminance absolue +TP_COLORAPP_ADAPSCEN_TOOLTIP;Correspond à la luminance en candelas par m2 au moment de la prise de vue, calculée automatiquement à partir des données exif. TP_COLORAPP_ALGO;Algorithme TP_COLORAPP_ALGO_ALL;Tout TP_COLORAPP_ALGO_JC;Luminosité + Chroma (JC) @@ -1429,6 +1430,7 @@ TP_COLORAPP_TEMP_TOOLTIP;Pour sélectionner un illuminant, toujours régler Tein TP_COLORAPP_TONECIE;Compression Tonale utilisant CIECAM02 TP_COLORAPP_TONECIE_TOOLTIP;Si cette option est désactivée, la compression tonale est faite dans l'espace Lab.\nSi cette options est activée, la compression tonale est faite en utilisant CIECAM02.\nL'outil Compression Tonale doit être activé pour que ce réglage prenne effet TP_COLORAPP_VIEWING_ABSOLUTELUMINANCE_TOOLTIP;Luminance absolue de l'environnement de visionnage\n(souvent 16cd/m²) +TP_COLORAPP_YBOUT_TOOLTIP;Yb est la luminance relative de l'arrière plan, exprimée e % de gris. Un gris à 18% correspond à une luminance exprimée en CIE L de 50%.\nCette donnée prend en compte la luminance moyenne de l'image. TP_COLORAPP_WBCAM;BB [RT+CAT02] + [sortie] TP_COLORAPP_WBRT;BB [RT] + [sortie] TP_COLORTONING_AB;o C/L @@ -1436,7 +1438,7 @@ TP_COLORTONING_AUTOSAT;Automatique TP_COLORTONING_BALANCE;Balance TP_COLORTONING_BY;o C/L TP_COLORTONING_CHROMAC;Opacité -TP_COLORTONING_COLOR;Couleur +TP_COLORTONING_COLOR;Couleur: TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP;Opacité chroma en fonction de la luminance oC=f(L) TP_COLORTONING_HIGHLIGHT;Hautes lumières TP_COLORTONING_HUE;Teinte @@ -1518,11 +1520,11 @@ TP_DEHAZE_STRENGTH;Force TP_DIRPYRDENOISE_CHROMINANCE_AMZ;Multi-zones auto TP_DIRPYRDENOISE_CHROMINANCE_AUTOGLOBAL;Global automatique TP_DIRPYRDENOISE_CHROMINANCE_BLUEYELLOW;Chrominance - Bleu-Jaune -TP_DIRPYRDENOISE_CHROMINANCE_CURVE;Courbe de chrominance +TP_DIRPYRDENOISE_CHROMINANCE_CURVE;Courbe de chrominance: TP_DIRPYRDENOISE_CHROMINANCE_CURVE_TOOLTIP;Augmente (multiplie) la valeur de tous les curseurs de chrominance.\nCette courbe vous permet d'ajuster la force de la réduction de bruit chromatique en fonction de la chromaticité, par exemple pour augmenter l'action dans les zones faiblement saturées et pour la diminuer dans celles très saturées. TP_DIRPYRDENOISE_CHROMINANCE_FRAME;Chrominance TP_DIRPYRDENOISE_CHROMINANCE_MANUAL;Manuel -TP_DIRPYRDENOISE_CHROMINANCE_MASTER;Chrominance - Maître +TP_DIRPYRDENOISE_CHROMINANCE_MASTER;Chrominance-Maître TP_DIRPYRDENOISE_CHROMINANCE_METHOD;Méthode TP_DIRPYRDENOISE_CHROMINANCE_METHODADVANCED_TOOLTIP;Manuel\nAgit sur l'image entière.\nVous controlez les paramètres de réduction de bruit manuellement.\n\nGlobal automatique\nAgit sur l'image entière.\n9 zones sont utilisées pour calculer un réglage de réduction de bruit de chroma.\n\nAperçu\nAgit sur l'image entière.\nLa partie visible de l'image dans l'aperçu est utilisé pour calculer un réglage de réduction de bruit de chroma. TP_DIRPYRDENOISE_CHROMINANCE_METHOD_TOOLTIP;Manuel\nAgit sur l'image entière.\nVous controlez les paramètres de réduction de bruit manuellement.\n\nGlobal automatique\nAgit sur l'image entière.\n9 zones sont utilisées pour calculer un réglage de réduction de bruit de chroma.\n\nAutomatique multi-zones\nPas d'aperçu - ne fonctionne que lors de l'enregistrement, mais utiliser la méthode "Aperçu" en faisant correspondre la taille et le centre de la tuile à la taille et au centre de l'aperçu, vous permet d'avoir une idée des résultats attendus.\nL'image est divisé en tuiles (entre 10 et 70 en fonction de la taille de l'image) et chaque tuile reçoit son propre réglage de réduction de bruit de chrominance.\n\nAperçu\nAgit sur l'image entière.\nLa partie de l'image visible dans l'aperçu est utilisé pour calculer un réglage de réduction de bruit de chroma. @@ -1536,7 +1538,7 @@ TP_DIRPYRDENOISE_CHROMINANCE_PREVIEW_TILEINFO;Taille des tuiles =%1, Centre: Tx= TP_DIRPYRDENOISE_CHROMINANCE_REDGREEN;Chrominance - Rouge-Vert TP_DIRPYRDENOISE_LABEL;Réduction de Bruit TP_DIRPYRDENOISE_LUMINANCE_CONTROL;Contrôle de luminance -TP_DIRPYRDENOISE_LUMINANCE_CURVE;Courbe de luminance +TP_DIRPYRDENOISE_LUMINANCE_CURVE;Courbe de luminance: TP_DIRPYRDENOISE_LUMINANCE_DETAIL;Niveau de détails de Luminance TP_DIRPYRDENOISE_LUMINANCE_FRAME;Luminance TP_DIRPYRDENOISE_LUMINANCE_SMOOTHING;Luminance @@ -1655,7 +1657,7 @@ TP_HLREC_ENA_TOOLTIP;Peut être activé par le bouton Niveau Auto TP_HLREC_LABEL;Reconstruction des hautes lumières TP_HLREC_LUMINANCE;Récupération de la luminance TP_HLREC_METHOD;Méthode: -TP_HSVEQUALIZER_CHANNEL;Canal +TP_HSVEQUALIZER_CHANNEL;Canal: TP_HSVEQUALIZER_HUE;T TP_HSVEQUALIZER_LABEL;Égaliseur TSV TP_HSVEQUALIZER_SAT;S @@ -1753,7 +1755,7 @@ TP_LOCALCONTRAST_LIGHTNESS;Niveau des hautes-lumières TP_LOCALCONTRAST_RADIUS;Rayon TP_LOCALLAB_ACTIV;Luminosité seulement TP_LOCALLAB_ACTIVSPOT;Activer le Spot -TP_LOCALLAB_ADJ;Egalisateur Bleu-jaune Rouge-vert +TP_LOCALLAB_ADJ;Egalisateur couleur TP_LOCALLAB_ALL;Toutes les rubriques TP_LOCALLAB_AMOUNT;Quantité TP_LOCALLAB_ARTIF;Détection de forme @@ -1769,8 +1771,8 @@ TP_LOCALLAB_BILATERAL;Filtre Bilateral TP_LOCALLAB_BLACK_EV;Noir Ev TP_LOCALLAB_BLCO;Chrominance seulement TP_LOCALLAB_BLENDMASKCOL;Mélange - fusion -TP_LOCALLAB_BLENDMASKMASK;Ajout / soustrait le masque Luminance -TP_LOCALLAB_BLENDMASKMASKAB;Ajout / soustrait le masque Chrominance +TP_LOCALLAB_BLENDMASKMASK;Ajout/soustrait masque Luminance +TP_LOCALLAB_BLENDMASKMASKAB;Ajout/soustrait masque Chro. TP_LOCALLAB_BLENDMASK_TOOLTIP;Si fusion = 0 seule la détection de forme est améliorée.\nSi fusion > 0 le masque est ajouté à l'image. Si fusion < 0 le masque est soustrait à l'image TP_LOCALLAB_BLENDMASKMASK_TOOLTIP;Si ce curseur = 0 pas d'action.\nAjoute ou soustrait le masque de l'image originale TP_LOCALLAB_BLGUID;Filtre guidé @@ -1802,14 +1804,14 @@ TP_LOCALLAB_BUTTON_DEL;Effacer TP_LOCALLAB_BUTTON_DUPL;Dupliquer TP_LOCALLAB_BUTTON_REN;Renommer TP_LOCALLAB_BUTTON_VIS;Montrer/Cacher -TP_LOCALLAB_CBDL;Contraste par niveaux de détail +TP_LOCALLAB_CBDL;Contr. par niveaux détail TP_LOCALLAB_CBDLCLARI_TOOLTIP;Ajuste les tons moyens et les réhausse. TP_LOCALLAB_CBDL_ADJ_TOOLTIP;Agit comme un outil ondelettes.\nLe premier niveau (0) agit sur des détails de 2x2.\nLe dernier niveau (5) agit sur des détails de 64x64. TP_LOCALLAB_CBDL_THRES_TOOLTIP;Empêche d'augmenter le bruit TP_LOCALLAB_CBDL_TOOLNAME;Contraste par niveaux de détail - 2 TP_LOCALLAB_CENTER_X;Centre X TP_LOCALLAB_CENTER_Y;Centre Y -TP_LOCALLAB_CH;Courbes CL - LC +TP_LOCALLAB_CH;CL - LC TP_LOCALLAB_CHROMA;Chrominance TP_LOCALLAB_CHROMABLU;Niveaux Chroma TP_LOCALLAB_CHROMABLU_TOOLTIP;Agit comme un amplificateur-reducteur d'action en comparant aux réglages de luma.\nEn dessous de 1 reduit, au dessus de 1 amplifie @@ -1822,7 +1824,7 @@ TP_LOCALLAB_CHRRT;Chroma TP_LOCALLAB_CIRCRADIUS;Taille Spot TP_LOCALLAB_CIRCRAD_TOOLTIP;Contient les références du RT-spot, utile pour la détection de forme (couleur, luma, chroma, Sobel).\nLes faibles valeurs peuvent être utiles pour les feuillages.\nLes valeurs élevées peuvent être utile pour la peau TP_LOCALLAB_CLARICRES;Fusion Chroma -TP_LOCALLAB_CLARIFRA;Clarté & Masque de netteté - Fusion & adoucir images +TP_LOCALLAB_CLARIFRA;Clarté & Masque netteté/Fusion & adoucir TP_LOCALLAB_CLARILRES;Fusion Luma TP_LOCALLAB_CLARISOFT;Rayon adoucir TP_LOCALLAB_CLARISOFT_TOOLTIP;Actif pour Clarté et Masque de netteté si différent de zéro.\n\nActif pour toutes les pyramides ondelettes.\nInactif si rayon = 0 @@ -1830,7 +1832,7 @@ TP_LOCALLAB_CLARITYML;Clarté TP_LOCALLAB_CLARI_TOOLTIP;En dessous ou égal à 4, 'Masque netteté' est actif.\nAu dessus du niveau ondelettes 5 'Clarté' est actif.\nUtilesu=i vous utilisez 'Compression dynamique des niveaux' TP_LOCALLAB_CLIPTM;Clip Recupère données (gain) TP_LOCALLAB_COFR;Couleur & Lumière -TP_LOCALLAB_COLORDE;Couleur prévisualisation sélection ΔE - Intensité +TP_LOCALLAB_COLORDE;Couleur prévis. sélection ΔE - Intensité TP_LOCALLAB_COLORDEPREV_TOOLTIP;Bouton Prévisualisation ΔE a besoin qu'un seul outil soit activé (expander).\nPour pouvoir avoir une Prévisualisation ΔE avec plusieurs outils activés utiliser Masque et modifications - Prévisualisation ΔE TP_LOCALLAB_COLORDE_TOOLTIP;Affiche la prévisualisation ΔE en bleu si négatif et en vert si positif.\n\nMasque et modifications (montre modifications sans masque): montre les modifications réelles si positf, montre les modifications améliorées (luminance seule) en bleu et jaune si négatif. TP_LOCALLAB_COLORSCOPE;Etendue Outils Couleur @@ -1852,8 +1854,8 @@ TP_LOCALLAB_CONTRESID;Contraste TP_LOCALLAB_CONTTHMASK_TOOLTIP;Vous permet de déterminer quelles parties de l'image seront concernées par la texture. TP_LOCALLAB_CONTTHR;Seuil contraste TP_LOCALLAB_CONTWFRA;Contrast Local -TP_LOCALLAB_CSTHRESHOLD;Ψ Ondelettes niveaux -TP_LOCALLAB_CSTHRESHOLDBLUR;Ψ Masque Ondelettes niveau +TP_LOCALLAB_CSTHRESHOLD;Ondelettes niveaux +TP_LOCALLAB_CSTHRESHOLDBLUR;Masque Ondelettes niveau TP_LOCALLAB_CURV;Luminosité - Contraste - Chrominance "Super" TP_LOCALLAB_CURVCURR;Normal TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP;Si la courbe est au sommet, le masque est compétement noir aucune transformation n'est réalisée par le masque sur l'image.\nQuand vous descendez la courbe, progressivement le masque va se colorer et s'éclaicir, l'image change de plus en plus.\n\nIl est recommendé (pas obligatoire) de positionner le sommet des courbes curves sur la ligne de transition grise qui représnte les références (chroma, luma, couleur). @@ -1876,8 +1878,10 @@ TP_LOCALLAB_DELTAD;Delta balance TP_LOCALLAB_DELTAEC;Masque ΔE Image TP_LOCALLAB_DENOIS;Ψ Réduction du bruit TP_LOCALLAB_DENOI_EXP;Réduction du bruit -TP_LOCALLAB_DENOIQUA_TOOLTIP;Conservatif préserve les fréquences basses, alors que agressif tend à les effacer +TP_LOCALLAB_DENOIQUA_TOOLTIP;Conservatif préserve les fréquences basses, alors que agressif tend à les effacer.\nConservatif et agressif utilisent les ondelletes et DCT et peuvent être utilisées en conjonction avec "débruitage par morceaux - luminance" TP_LOCALLAB_DENOIEQUAL_TOOLTIP;Equilibre l'action de denoise luminance entre les ombres et les lumières +TP_LOCALLAB_DENOI1_EXP;De-bruite basé sur masque luminance +TP_LOCALLAB_DENOI2_EXP;Récupération basée sur masque luminance TP_LOCALLAB_DENOI_TOOLTIP;Ce module peut être utilisé seul (à la fin du processus), ou en complément de Réduction du bruit (au début).\nEtendue(deltaE)permet de différencier l'action.\nVous pouvez compléter avec "median" ou "Filtre guidé" (Adoucir Flou...).\nVous pouvez compléter l'action avec "Flou niveaux" "Ondelette pyramide" TP_LOCALLAB_DENOILUMDETAIL_TOOLTIP;Permet de récupérer les détails de luminance par mise en oeuvre progressive de la transformée de Fourier (DCT) TP_LOCALLAB_DENOICHROF_TOOLTIP;Agit sur les fins détails du bruit de chrominance @@ -1887,9 +1891,10 @@ TP_LOCALLAB_DENOITHR_TOOLTIP;Règle l'effet de bord pour privilégier l'action s TP_LOCALLAB_DENOIEQUALCHRO_TOOLTIP;Equilibre l'action de denoise chrominance entre les bleus-jaunes et les rouges-verts TP_LOCALLAB_DENOIBILAT_TOOLTIP;Traite le bruit d'impulsion (poivre et sel) TP_LOCALLAB_DEPTH;Profondeur -TP_LOCALLAB_DETAIL;Contrast local +TP_LOCALLAB_DETAIL;Contraste local +TP_LOCALLAB_DETAILFRA;Détection bord - DCT TP_LOCALLAB_DETAILSH;Details -TP_LOCALLAB_DETAILTHR;Seuil Detail Luminance Chroma (DCT ƒ) +TP_LOCALLAB_DETAILTHR;Seuil Detail Luma-Chroma TP_LOCALLAB_DUPLSPOTNAME;Copier TP_LOCALLAB_EDGFRA;Netteté des bords TP_LOCALLAB_EDGSHOW;Montre tous les outils @@ -1912,9 +1917,10 @@ TP_LOCALLAB_EV_VIS_ALL;Montrer tout TP_LOCALLAB_EXCLUF;Exclure TP_LOCALLAB_EXCLUF_TOOLTIP;Peut être utilsé pour exclure une partie des données - agir sur Etendue pour prendre en compte plus de couleurs.\n Vous pouvez utiliser tous les réglages pour ce type de RT-spot. TP_LOCALLAB_EXCLUTYPE;Spot méthode -TP_LOCALLAB_EXCLUTYPE_TOOLTIP;Spot Normal utilise les données récursives.\n\nSpot exclusion réinitialise les données d'origine.\nPeut être utilsé pour annuler totalement ou partiellement une action précédente ou pour réaliser un mode inverse +TP_LOCALLAB_EXCLUTYPE_TOOLTIP;Spot Normal utilise les données récursives.\n\nSpot exclusion réinitialise les données d'origine.\nPeut être utilsé pour annuler totalement ou partiellement une action précédente ou pour réaliser un mode inverse.\n\nImage entière vous permet d'utiliser 'local adjustments" sur le totalité de l'image.\nLes délimiteurs sont positionnés au delà de la prévisualisation\nTransition est mis à 100.\nVous pouvez avoir à repositionner le Spot ainsi que sa taille pour obtenir les effets désirés.\nNotez que l'utilisation de De-bruite, ondelettes, FFTW en image entière va utiliser de grosses quantités de mémoire, et peut amener l'application à 'planter' sur des systèmes à faible capacité. TP_LOCALLAB_EXECLU;Spot Exclusion TP_LOCALLAB_EXNORM;Spot Normal +TP_LOCALLAB_EXFULL;Image entière TP_LOCALLAB_EXPCBDL_TOOLTIP;Peut être utilisé pour retirer les marques sur le capteur ou la lentille. TP_LOCALLAB_EXPCHROMA;Chroma compensation TP_LOCALLAB_EXPCHROMA_TOOLTIP;Seulement en association avec compensation d'exposition et PDE Ipol.\nEvite la desaturation des couleurs @@ -1934,13 +1940,13 @@ TP_LOCALLAB_EXPLAP_TOOLTIP;Plus vous agissez sur ce curseur de seuil, plus grand TP_LOCALLAB_EXPMERGEFILE_TOOLTIP;Autorise de nombreuses possibilités de fusionner les images (comme les calques dans Photosshop) : difference, multiply, soft light, overlay...avec opacité...\nOriginale Image : fusionne le RT-spot en cours avec Originale.\nSpot Précédent : fusionne le RT-spot en cours avec le précédent - si il n'y a qu'un spot précédent = original.\nArrière plan : fusionne le RT-spot en cours avec la couleur et la luminance de l'arrière plan (moins de possibilités) TP_LOCALLAB_EXPMETHOD_TOOLTIP;Standard : utilise un algorithme similaire à Exposure principal mais en L*a*b* et en prenant en compte le deltaE.\n\nCompression dynamique et atténuateur de contraste : utilise un autre algorithme aussi avec deltaE et avec l'équation de Poisson pour résoudre le Laplacien dans l'espace de Fourier.\nAtténuateur, Compression dynamqiue et Standard peuvent être combinés.\nFFTW La transformée de Fourier est optimisée en taille pour réduire les temps de traitement.\nRéduit les artéfacts et le bruit. TP_LOCALLAB_EXPNOISEMETHOD_TOOLTIP;Applique un median avant la transformée de Laplace pour éviter les artéfacts (bruit).\nVous pouvez aussi utiliser l'outil "Réduction du bruit". -TP_LOCALLAB_EXPOSE;Compression dynamique & Exposition +TP_LOCALLAB_EXPOSE;Plage dynamique & Exposition TP_LOCALLAB_EXPOSURE_TOOLTIP;Modifie l'exposition dans l'espace L*a*b* en utilisant un Laplacien et les algorithmes PDE en prenant en compte dE, minimise les artéfacts. TP_LOCALLAB_EXPRETITOOLS;Outils Retinex avancés TP_LOCALLAB_EXPSHARP_TOOLTIP;RT-Spot minimum 39*39.\nUtiliser de basses valeurs de transition et de hautes valeurs de transition affaiblissement et Etendue pour simuler un petit RT-spot. TP_LOCALLAB_EXPTOOL;Outils exposition TP_LOCALLAB_EXPTRC;Courbe de réponse Tonale - TRC -TP_LOCALLAB_EXP_TOOLNAME;Compression Dynamique & Exposition- 10 +TP_LOCALLAB_EXP_TOOLNAME;Plage Dynamique & Exposition- 10 TP_LOCALLAB_FATAMOUNT;Quantité TP_LOCALLAB_FATANCHOR;Ancre TP_LOCALLAB_FATANCHORA;Décalage @@ -1949,15 +1955,15 @@ TP_LOCALLAB_FATFRA;Compression Dynamique ƒ TP_LOCALLAB_FATFRAME_TOOLTIP;PDE Fattal - utilise Fattal Tone mapping algorithme. TP_LOCALLAB_FATLEVEL;Sigma TP_LOCALLAB_FATRES;Quantité de Residual Image -TP_LOCALLAB_FATSHFRA;Compression Dynamique Masque ƒ +TP_LOCALLAB_FATSHFRA;Compression Dynamique Masque TP_LOCALLAB_FEATH_TOOLTIP;Largeur du Gradient en porcentage de la diagonale du Spot\nUtilisé par tous les Filtres Gradués dans tous les outils.\nPas d'action si les filtres gradués ne sont pas utilisés. -TP_LOCALLAB_FEATVALUE;Adoucissement gradient (Filtres Gradués) +TP_LOCALLAB_FEATVALUE;Adouc. gradient(Filtres Gradués) TP_LOCALLAB_FFTCOL_MASK;FFTW ƒ TP_LOCALLAB_FFTMASK_TOOLTIP;Utilise une transformée de Fourier pour une meilleure qualité (accroit le temps de traitement et le besoin en mémoire) TP_LOCALLAB_FFTW;ƒ - Utilise Fast Fourier Transform TP_LOCALLAB_FFTW2;ƒ - Utilise Fast Fourier Transform (TIF, JPG,..) TP_LOCALLAB_FFTWBLUR;ƒ - Utilise toujours Fast Fourier Transform -TP_LOCALLAB_FULLIMAGE;Calcule les valeurs Noir Ev - Blanc Ev - sur l'image entière +TP_LOCALLAB_FULLIMAGE;Calcule les valeurs NoirEv-blancEv - image entière TP_LOCALLAB_FULLIMAGELOG_TOOLTIP;Calcule les valeurs Ev sur l'image entière. TP_LOCALLAB_GAM;Gamma TP_LOCALLAB_GAMFRA;Courbe Réponse Tonale (TRC) @@ -1993,12 +1999,13 @@ TP_LOCALLAB_GUIDSTRBL_TOOLTIP;Force du filtre guidé TP_LOCALLAB_GUIDEPSBL_TOOLTIP;Détail - agit sur la répartition du filtre guidé, les valeurs négatives simulent un flou gaussien TP_LOCALLAB_HHMASK_TOOLTIP;Ajustements fin de la teinte par exemple pour la peau. TP_LOCALLAB_HIGHMASKCOL;Hautes lumières masque -TP_LOCALLAB_HLH;Courbes H +TP_LOCALLAB_HLH;H TP_LOCALLAB_IND;Independant (souris) TP_LOCALLAB_INDSL;Independant (souris + curseurs) TP_LOCALLAB_INVERS;Inverse TP_LOCALLAB_INVERS_TOOLTIP;Si sélectionné (inverse) moins de possibilités.\n\nAlternative\nPremier Spot:\n image entière - delimiteurs en dehors de la prévisualisation\n RT-spot forme sélection : rectangle. Transition 100\n\nDeuxième spot : Spot Exclusion TP_LOCALLAB_INVBL_TOOLTIP;Alternative\nPremier Spot:\n image entière - delimiteurs en dehors de la prévisualisation\n RT-spot forme sélection : rectangle. Transition 100\n\nDeuxième spot : Spot Exclusion +TP_LOCALLAB_INVMASK;Algorithme inverse TP_LOCALLAB_ISOGR;Plus gros (ISO) TP_LOCALLAB_LABBLURM;Masque Flouter TP_LOCALLAB_LABEL;Ajustements Locaux @@ -2017,7 +2024,7 @@ TP_LOCALLAB_LC_FFTW_TOOLTIP;FFT améliore la qualité et autorise de grands rayo TP_LOCALLAB_LC_TOOLNAME;Constraste Local & Ondelettes - 7 TP_LOCALLAB_LEVELBLUR;Maximum Flouter TP_LOCALLAB_LEVELLOCCONTRAST_TOOLTIP;En abscisse le contraste local (proche du concept de luminance). En ordonnée, amplification ou reduction du contraste local. -TP_LOCALLAB_LEVELWAV;Ψ Ondelettes Niveaux +TP_LOCALLAB_LEVELWAV;Ondelettes Niveaux TP_LOCALLAB_LEVELWAV_TOOLTIP;Le niveau est automatiquement adapté à la taille du spot et de la prévisualisation.\nDu niveau 9 taille max 512 jusqu'au niveau 1 taille max = 4 TP_LOCALLAB_LEVFRA;Niveaux TP_LOCALLAB_LIGHTNESS;Luminosité @@ -2029,40 +2036,108 @@ TP_LOCALLAB_LIST_TOOLTIP;Vous pouvez choisir 3 niveaux de complexité pour chaqu TP_LOCALLAB_LMASK_LEVEL_TOOLTIP;Donne priorité à l'action sur les tons moyens et hautes lumières en choisissant les niveaux concernés d'ondelettes TP_LOCALLAB_LMASK_LL_TOOLTIP;Vous permet de modifier librement le contraste du masque. Peut amener de artefacts. TP_LOCALLAB_LOCCONT;Masque Flou -TP_LOCALLAB_LOC_CONTRAST;Contraste Local & Ondelettes -TP_LOCALLAB_LOC_CONTRASTPYR;Ψ Pyramide 1: -TP_LOCALLAB_LOC_CONTRASTPYR2;Ψ Pyramide 2: -TP_LOCALLAB_LOC_CONTRASTPYR2LAB; Contr. par niveaux- Tone Mapping - Cont.Dir. -TP_LOCALLAB_LOC_CONTRASTPYRLAB; Filtre Gradué - Netteté bords - Flouter +TP_LOCALLAB_LOC_CONTRAST;Contr. Local & Ondelettes +TP_LOCALLAB_LOC_CONTRASTPYR;Pyramide 1: +TP_LOCALLAB_LOC_CONTRASTPYR2;Pyramide 2: +TP_LOCALLAB_LOC_CONTRASTPYR2LAB; Contr. par niveaux/TM/Cont.Dir. +TP_LOCALLAB_LOC_CONTRASTPYRLAB; Filtre Gradué/Netteté bords/Flou TP_LOCALLAB_LOC_RESIDPYR;Image Residuelle TP_LOCALLAB_LOG;Codage log +TP_LOCALLAB_LOG1FRA;Ajustements Image +TP_LOCALLAB_LOG2FRA;Conditions de visionnage TP_LOCALLAB_LOGAUTO;Automatique -TP_LOCALLAB_LOGAUTO_TOOLTIP;Presser ce bouton va amner une évaluation an evaluation de l'amplitude dynamique et du point gris "source" (Si "Automatique" Source gris activé).\nPour être autorisé à retoucher les valeurs automatiques, presser le bouton à nouveau +TP_LOCALLAB_LOGAUTOGRAY_TOOLTIP;Calcule automatiquement la 'luminance moyenne' pour les conditons de prise de vue quand le bouton ‘Automatique’ dans Niveaux d'Exposition Relatif est pressé. +TP_LOCALLAB_LOGAUTO_TOOLTIP;Presser ce bouton va amener une évaluation an evaluation de l'amplitude dynamique et du point gris "source" (Si "Automatique" Source gris activé).\nPour être autorisé à retoucher les valeurs automatiques, presser le bouton à nouveau TP_LOCALLAB_LOGBASE_TOOLTIP;Défaut = 2.\nValeurs inférieures à 2 réduisent l'action de l'algorithme, les ombres sont plus sombres, les hautes lumières plus brillantes.\nValeurs supérieures à 2 changent l'action de l'algorithme, les ombres sont plus grises, les hautes lumières lavées TP_LOCALLAB_LOGBLACKWHEV_TOOLTIP;Valeurs estimées de la plage Dynamique - Noir Ev et Blanc Ev +TP_LOCALLAB_LOGCATAD_TOOLTIP;L'adaptation chromatique vous permet d'interpreter une couleur en se référant à son environnement spatio-temporel.\nUtile lorsque la balance des blancs est loin de D50.\nAdapte les couleurs à l'illuminant du périphérque de sortie. +TP_LOCALLAB_LOGCOLORFL;Niveau de couleurs (M) +TP_LOCALLAB_LOGCOLORF_TOOLTIP;Taux de perception de la teinte en relation au gris.\nIndicateur qu'un stimulus apparaît plus ou moins coloré. +TP_LOCALLAB_LOGCONQL;Contraste (Q) +TP_LOCALLAB_LOGCONTL;Contraste (J) +TP_LOCALLAB_LOGCONTL_TOOLTIP;Contraste (J) CIECAM16 prend en compte l'accroissement de la perception colorée avec la luminance. +TP_LOCALLAB_LOGCONTQ_TOOLTIP;Contraste (Q) CIECAM16 prend en compte l'accroissement de la perception colorée avec la brillance. +TP_LOCALLAB_LOGDETAIL_TOOLTIP;Agit principalment sur les hautes fréquences. TP_LOCALLAB_LOGENCOD_TOOLTIP;Autorise 'Tone Mapping' avec codage Logarithmique (ACES).\nUtile pour images ous-exposées, ou avec une plage dynamique élévée.\n\nDeux étapes dans le processus : 1) Calculer Plage Dynamique 2) Adaptation par utilisateur +TP_LOCALLAB_LOGEXP;Tous les outils TP_LOCALLAB_LOGFRA;Point gris source TP_LOCALLAB_LOGFRAME_TOOLTIP;Calcule ou utilise le niveau d'Exposition de l'image tôt dans le processus:\n Noir Ev, Blanc Ev et Point gris source.\n Prend en compte la compensation d'exposition principale. +TP_LOCALLAB_LOGIMAGE_TOOLTIP;Prend en compte les variables Ciecam (principalement Contraste 'J' et Saturation 's', et aussi 'avancé' Contraste 'Q' , Brillance 'Q', Luminosité (J), Niveau de couleurs (M)). +TP_LOCALLAB_LOGLIGHTL;Luminosité (J) +TP_LOCALLAB_LOGLIGHTL_TOOLTIP;Proche de luminosité (L*a*b*), prend en compte l'accroissement de la perception colorée. +TP_LOCALLAB_LOGLIGHTQ;Brillance (Q) +TP_LOCALLAB_LOGLIGHTQ_TOOLTIP;Taux de perception de lumière émanant d'un stimulus.\nIndicateur qu'un stimulus apparaît être plus ou moins brillant, clair. TP_LOCALLAB_LOGLIN;Logarithme mode TP_LOCALLAB_LOGPFRA;Niveaux d'Exposition relatif +TP_LOCALLAB_LOGREPART;Force +TP_LOCALLAB_LOGSATURL_TOOLTIP;Saturation (s) CIECAM16 correspond à la couleur d'un stimulus en relation avec sa propre brillance.\nAgit principalement sur les tons moyens et hauts. +TP_LOCALLAB_LOGSCENE_TOOLTIP;Correspond aux conditions de prise de vue. +TP_LOCALLAB_LOGSURSOUR_TOOLTIP;Change les tons et couleurs en prenant en compte les conditions de prise de vue.\n\nMoyen: Environnement lumineux moyen (standard). L'image ne change pas.\n\nTamisé: Environnement tamisé. L'iamge va devenir un peu plus claire. TP_LOCALLAB_LOGSRCGREY_TOOLTIP;Estime la valeur du point gris de l'image, tôt dans le processus TP_LOCALLAB_LOGTARGGREY_TOOLTIP;Vous pouvez changer cette valeur pour l'adapter à votre goût. TP_LOCALLAB_LOG_TOOLNAME;Codage log - 0 -TP_LOCALLAB_LUM;Courbes LL - CC +TP_LOCALLAB_LOGVIEWING_TOOLTIP;Correspond au medium sur lequel l'image finale sera vue (moniteur, TV, projecteur, imprimante,..), ainsi que son environnement. +TP_LOCALLAB_LUM;LL - CC TP_LOCALLAB_LUMADARKEST;Plus Sombre -TP_LOCALLAB_LUMASK;Maqsue Luminance arrière plan +TP_LOCALLAB_LUMASK;Masque Luminance arrière plan TP_LOCALLAB_LUMASK_TOOLTIP;Ajuste le gris de l'arrière plan du masque dans Montrer Masque (Masque et modifications) TP_LOCALLAB_LUMAWHITESEST;Plus clair TP_LOCALLAB_LUMONLY;Luminance seulement TP_LOCALLAB_MASKCOM;Masque couleur Commun TP_LOCALLAB_MASKCOM_TOOLTIP;Ces masques travaillent comme les autres outils, ils prennet en compte Etendue.\nIls sont différents des autres masques qui complètent un outil (Couleur et Lumière, Exposition...) +TP_LOCALLAB_MASKDDECAY;Force des transitions +TP_LOCALLAB_MASKDECAY_TOOLTIP;Gère le taux des tranistions des niveaux gris dans le masque.\n Transition = 1 linéaire, Transition > 1 transitions paraboliques rapides, Transitions < 1 transitions progressives TP_LOCALLAB_MASFRAME;Masque et Fusion TP_LOCALLAB_MASFRAME_TOOLTIP;For all masks.\nTake into account deltaE image to avoid retouching the selection area when sliders gamma mask, slope mask, chroma mask and curves contrast , levels contrasts, and mask blur, structure(if enabled tool) are used.\nDisabled in Inverse TP_LOCALLAB_MASK;Masque TP_LOCALLAB_MASK2;Courbe de Contraste TP_LOCALLAB_MASKCOL;Masque Courbes TP_LOCALLAB_MASKCURVE_TOOLTIP;Si la courbe est au sommet, le masque est compétement noir aucune transformation n'est réalisée par le masque sur l'image.\nQuand vous descendez la courbe, progressivement le masque va se colorer et s'éclaicir, l'image change de plus en plus.\n\nIl est recommendé (pas obligatoire) de positionner le sommet des courbes curves sur la ligne de transition grise qui représnte les références (chroma, luma, couleur). +TP_LOCALLAB_MASKLCTHRMID;Zones grises de-bruite lumina +TP_LOCALLAB_MASKLCTHRMIDCH;Zones grises de-bruite chroma +TP_LOCALLAB_MASKLC_TOOLTIP;Vous autorise à cibler le de-bruite en se basant sur les informations du masque dans L(L) ou LC(H) (Masque et Modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n si le masque est très sombre - sous le seuil 'sombre' - de-bruite sera accru si renforce > 1.\n si le masque est clair - au-dessus du seuil 'clair' - de-bruite sera progressivement réduit.\n entre les deux, de-bruite sera maintenu aux réglages sans masques. +TP_LOCALLAB_MASKLCTHR;Seuil luminance zones claires +TP_LOCALLAB_MASKLCTHRLOW;Seuil luminance zones sombres +TP_LOCALLAB_MASKLNOISELOW;Renf. de-bruite sombres/claires TP_LOCALLAB_MASKH;Courbe teinte +TP_LOCALLAB_MASKRECOTHRES;Seuil de Récupération +TP_LOCALLAB_MASKDE_TOOLTIP;Utilisé pour diriger l'action de de-bruite basé sur les informations des courbes masques L(L) ou LC(H) (Masque et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Si le masque est en dessous du seuil sombre le De-bruite sera appliqué progressivement.\n Si le masque est au-dessus du seuil 'clair', le De-bruite sera appliqué progressivement.\n Entre les deux, les réglages sans De-bruite seront maintenus, sauf si vous agissez sur les curseurs "Zones grise dé-bruite luminance" or "Zones grise de-bruite chrominance". +TP_LOCALLAB_MASKGF_TOOLTIP;Utilisé pour diriger l'action de Filtre Guidé basé sur les informations des courbes masques L(L) ou LC(H) (Masque et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Si le masque est en dessous du seuil sombre le Filtre Guidé sera appliqué progressivement.\n Si le masque est au-dessus du seuil 'clair', le Filtre Guidé sera appliqué progressivement.\n Entre les deux, les réglages sans Filtre Guidé seront maintenus. +TP_LOCALLAB_MASKRECOL_TOOLTIP;Utilisé pour moduler l'action des réglages de Couleur et Lumières en se basant sur les informations contenues dans les courbes des masques L(L) ou LC(H) (Masques et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Les zones ‘sombres’ et ‘claires’ en dessous du seuil sombre et au dessus du seuil clair seront restaurés progressivement à leurs valeurs originales avant d'avoir été modifiées par Couleurs et Lumières \n Entre ces 2 valeurs, les valeurs de Couleurs et Lumières seront appliquées +TP_LOCALLAB_MASKREEXP_TOOLTIP;Utilisé pour moduler l'action des réglages de Compression dynamique et Exposition en se basant sur les informations contenues dans les courbes des masques L(L) ou LC(H) (Masques et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Les zones ‘sombres’ et ‘claires’ en dessous du seuil sombre et au dessus du seuil clair seront restaurés progressivement à leurs valeurs originales avant d'avoir été modifiées par Compression dynamique et Exposition \n Entre ces 2 valeurs, les valeurs de Compression dynamique et Exposition seront appliquées +TP_LOCALLAB_MASKRESH_TOOLTIP;Utilisé pour moduler l'action des réglages de Ombres et Lumières en se basant sur les informations contenues dans les courbes des masques L(L) ou LC(H) (Masques et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Les zones ‘sombres’ et ‘claires’ en dessous du seuil sombre et au dessus du seuil clair seront restaurés progressivement à leurs valeurs originales avant d'avoir été modifiées par Ombres et Lumières \n Entre ces 2 valeurs, les valeurs de Ombres et Lumières seront appliquées +TP_LOCALLAB_MASKRESCB_TOOLTIP;Utilisé pour moduler l'action des réglages de CBDL (Luminance) en se basant sur les informations contenues dans les courbes des masques L(L) ou LC(H) (Masques et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Les zones ‘sombres’ et ‘claires’ en dessous du seuil sombre et au dessus du seuil clair seront restaurés progressivement à leurs valeurs originales avant d'avoir été modifiées par CBDL \n Entre ces 2 valeurs, les valeurs de CBDL seront appliquées +TP_LOCALLAB_MASKRESRETI_TOOLTIP;Utilisé pour moduler l'action des réglages de Retinex (Luminance) en se basant sur les informations contenues dans les courbes des masques L(L) ou LC(H) (Masques et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Les zones ‘sombres’ et ‘claires’ en dessous du seuil sombre et au dessus du seuil clair seront restaurés progressivement à leurs valeurs originales avant d'avoir été modifiées par Retinex \n Entre ces 2 valeurs, les valeurs de Retinex seront appliquées +TP_LOCALLAB_MASKRESTM_TOOLTIP;Utilisé pour moduler l'action des réglages de Compression tonale en se basant sur les informations contenues dans les courbes des masques L(L) ou LC(H) (Masques et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Les zones ‘sombres’ et ‘claires’ en dessous du seuil sombre et au dessus du seuil clair seront restaurés progressivement à leurs valeurs originales avant d'avoir été modifiées par Compression tonale \n Entre ces 2 valeurs, les valeurs de Compression tonale seront appliquées +TP_LOCALLAB_MASKRESVIB_TOOLTIP;Utilisé pour moduler l'action des réglages de Vibrance - Chaud et froid en se basant sur les informations contenues dans les courbes des masques L(L) ou LC(H) (Masques et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Les zones ‘sombres’ et ‘claires’ en dessous du seuil sombre et au dessus du seuil clair seront restaurés progressivement à leurs valeurs originales avant d'avoir été modifiées par Vibrance - Chaud et froid \n Entre ces 2 valeurs, les valeurs de Vibrance - Chaud et froid seront appliquées +TP_LOCALLAB_MASKRESWAV_TOOLTIP;Utilisé pour moduler l'action des réglages de Contraste local et ondelettes en se basant sur les informations contenues dans les courbes des masques L(L) ou LC(H) (Masques et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Les zones ‘sombres’ et ‘claires’ en dessous du seuil sombre et au dessus du seuil clair seront restaurés progressivement à leurs valeurs originales avant d'avoir été modifiées par Contraste local et ondelettes \n Entre ces 2 valeurs, les valeurs de Contraste local et Ondelettes seront appliquées +TP_LOCALLAB_MASKRELOG_TOOLTIP;Utilisé pour moduler l'action des réglages de Codage Log en se basant sur les informations contenues dans les courbes des masques L(L) ou LC(H) (Masques et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Les zones ‘sombres’ et ‘claires’ en dessous du seuil sombre et au dessus du seuil clair seront restaurés progressivement à leurs valeurs originales avant d'avoir été modifiées par Codage Log - peut être utilisé pour récupérer les hautes lumières de 'Couleur propagation' \n Entre ces 2 valeurs, les valeurs de Codage Log seront appliquées +TP_LOCALLAB_MASKHIGTHRESC_TOOLTIP;Limite des tons clairs au-dessus de laquelle Couleur et Lumière sera restauré progressivement à leurs valeurs avant d'être modifiés par Couleur et Lumières .\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris: ‘masque structure’, 'masque flouter', ‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’, ‘Niveau contraste local ondelettes’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKHIGTHRESS_TOOLTIP;Limite des tons clairs au-dessus de laquelle Ombres et Lumière sera restauré progressivement à leurs valeurs avant d'être modifiés par Ombres et Lumières .\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKHIGTHRESCB_TOOLTIP;Limite des tons clairs au-dessus de laquelle CBDL (luminance) sera restauré progressivement à leurs valeurs avant d'être modifiés par CBDL.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKHIGTHRESRETI_TOOLTIP;Limite des tons clairs au-dessus de laquelle Retinex (luminance) sera restauré progressivement à leurs valeurs avant d'être modifiés par Retinex.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKHIGTHRESTM_TOOLTIP;Limite des tons clairs au-dessus de laquelle Compression tonale sera restauré progressivement à leurs valeurs avant d'être modifiés par Compression tonale.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Maqsue luminance arrière plan = 0 +TP_LOCALLAB_MASKHIGTHRESVIB_TOOLTIP;Limite des tons clairs au-dessus de laquelle Vibrance - Chaud Froid sera restauré progressivement à leurs valeurs avant d'être modifiés par Vibrance - Chaud Froid.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKHIGTHRESWAV_TOOLTIP;Limite des tons clairs au-dessus de laquelle Contraste local - Ondelettes sera restauré progressivement à leurs valeurs avant d'être modifiés par Contraste local - Ondelettes.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKHIGTHRESE_TOOLTIP;Limite des tons clairs au-dessus de laquelle Compression dynamique et Exposition sera restauré progressivement à leurs valeurs avant d'être modifiés par Compression dynamique et Exposition.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKHIGTHRESL_TOOLTIP;Limite des tons clairs au-dessus de laquelle Codage Log sera restauré progressivement à leurs valeurs avant d'être modifiés par Codage Log.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKHIGTHRESL_TOOLTIP;Limite des tons clairs au-dessus de laquelle Codage Log sera restauré progressivement à leurs valeurs avant d'être modifiés par Codage Log.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKHIGTHRESD_TOOLTIP;Limite des tons clairs au-dessus de laquelle de-bruite sera appliquée progressivement.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris: ‘masque structure’,‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’, ‘Niveau contraste local ondelettes’.Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées.\n Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKHIGTHRES_TOOLTIP;Limite des tons clairs au-dessus de laquelle Filtre Guidé sera appliquée progressivement.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris: ‘masque structure’,‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’, ‘Niveau contraste local ondelettes’.Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées.\n Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKLOWTHRESC_TOOLTIP;Limite des tons sombres au-dessous de laquelle Couleur et Lumière sera restauré progressivement à leurs valeurs avant d'être modifiés par Couleur et Lumières .\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris: ‘masque structure’, 'masque flouter', ‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’, ‘Niveau contraste local ondelettes’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKLOWTHRESS_TOOLTIP;Limite des tons sombres au-dessous de laquelle Ombres et Lumière sera restauré progressivement à leurs valeurs avant d'être modifiés par Ombres et Lumières .\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKLOWTHRESCB_TOOLTIP;Limite des tons sombres au-dessous de laquelle CBDL (luminance) sera restauré progressivement à leurs valeurs avant d'être modifiés par CBDL.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKLOWTHRESRETI_TOOLTIP;Limite des tons sombres au-dessous de laquelle Retinex (luminance) sera restauré progressivement à leurs valeurs avant d'être modifiés par Retinex.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKLOWTHRESTM_TOOLTIP;Limite des tons sombres au-dessous de laquelle Compression tonale sera restauré progressivement à leurs valeurs avant d'être modifiés par Compression tonale.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKLOWTHRESVIB_TOOLTIP;Limite des tons sombres au-dessous de laquelle Vibrance - Chaud Froid sera restauré progressivement à leurs valeurs avant d'être modifiés par Vibrance - Chaud Froid.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKLOWTHRESWAV_TOOLTIP;Limite des tons sombres au-dessous de laquelle Contraste local - Ondelettes sera restauré progressivement à leurs valeurs avant d'être modifiés par Contraste local - Ondelettes.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKLOWTHRESE_TOOLTIP;Limite des tons sombres au-dessous de laquelle Compression dynamique et Exposition sera restauré progressivement à leurs valeurs avant d'être modifiés par Compression dynamique et Exposition.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKLOWTHRESL_TOOLTIP;Limite des tons sombres au-dessous de laquelle Codage Log sera restauré progressivement à leurs valeurs avant d'être modifiés par Codage Log.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKLOWTHRESL_TOOLTIP;Limite des tons sombres au-dessous de laquelle Codage Log sera restauré progressivement à leurs valeurs avant d'être modifiés par Codage Log.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKLOWTHRESD_TOOLTIP;Limite des tons sombres au-dessous de laquelle de-bruite sera appliquée progressivement.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris: ‘masque structure’,‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’, ‘Niveau contraste local ondelettes’.Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées.\n Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKLOWTHRES_TOOLTIP;Limite des tons sombres au-dessous de laquelle Filtre Guidé sera appliquée progressivement.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris: ‘masque structure’,‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’, ‘Niveau contraste local ondelettes’.Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées.\n Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0 +TP_LOCALLAB_MASKUSABLE;Masque activé (Masque & modifications) +TP_LOCALLAB_MASKUNUSABLE;Masque désactivé (Masque & modifications) TP_LOCALLAB_MASK_TOOLTIP;Vous pouvez activer plusieurs masques pour un simple outil, ceci nécessite d'activer un autre outil (mais sans utilser l'outil : curseurs à 0,...)où est le masque que vous souhaitez activer.\n\nVous pouvez aussi dupliquer le RT-spot et le placer juste à côté de l'autre,les variations de références autorisent un travail fin sur les images. TP_LOCALLAB_MED;Medium TP_LOCALLAB_MEDIAN;Median Bas @@ -2106,7 +2181,7 @@ TP_LOCALLAB_MERTHR;Difference TP_LOCALLAB_MERTWE;Exclusion TP_LOCALLAB_MERTWO;Soustrait TP_LOCALLAB_METHOD_TOOLTIP;'Enhanced + chroma denoise' significantly increases processing times.\nBut reduce artifacts. -TP_LOCALLAB_MLABEL;Récupère les données Min=%1 Max=%2 (Clip - décalage) +TP_LOCALLAB_MLABEL;Réc. données Min=%1 Max=%2 TP_LOCALLAB_MLABEL_TOOLTIP;'Doit être' près de min=0 max=32768 (log mode) mais d'autres valeurs sont possibles.\nVous pouvez agir sur les données récupérées (CLIP) et décalage pour normaliser.\n\nRécupère les données image sans mélange. TP_LOCALLAB_MODE_EXPERT;Avancé TP_LOCALLAB_MODE_NORMAL;Standard @@ -2117,15 +2192,24 @@ TP_LOCALLAB_MRTHR;Image Originale TP_LOCALLAB_MRTWO;Short Curves 'L' Mask TP_LOCALLAB_MULTIPL_TOOLTIP;Autorise la retouche des tons sur une large plage : -18EV +4EV. Le remier curseur agit sur -18EV and -6EV. Le dernier curseur agit sur les tons au-dessus de 4EV TP_LOCALLAB_NEIGH;Rayon +TP_LOCALLAB_NLDENOISE_TOOLTIP;"Récupération des détails" agit sur un Laplacien pour privilégier l'action de denoise sur les aplats plutôt que sur les structures. +TP_LOCALLAB_NLDENOISENLPAT_TOOLTIP;Agir sur ce curseur pour adapter le niveau de débruitage à la taille des objets à traiter. +TP_LOCALLAB_NLDENOISENLRAD_TOOLTIP;Plus la valeur sera importante, plus le débruitage sera intense.\nMais cela a une forte incidence sur les temps de traitement. +TP_LOCALLAB_NLFRAME_TOOLTIP;"Débruitage par morceaux" réalise une moyenne de la totalité des valeurs des pixels contenus dans l'image, pondérées en fonction de leur similarité avec le résultat attendu (pixel cible).\nL'algoritme permet d’amoindrir la perte de détails au sein de l'image.\nSeul le bruit de luminance est pris en compte, le bruit de chrominance est traité de manière plus performante par le couple ondelettes / Fourier (DCT).\nPeut être utilisé en conjonction avec 'ondelettes' ou isolé.\nLa taille du RT-Spot doit être supérieure à 150x150 pixels (sortie TIF/JPG). +TP_LOCALLAB_NLFRA;Débruitage par morceaux - Luminance +TP_LOCALLAB_NLLUM;Force +TP_LOCALLAB_NLDET;Récupération des détails +TP_LOCALLAB_NLPAT;Taille maximum du morceau +TP_LOCALLAB_NLRAD;Taille maximum du rayon TP_LOCALLAB_NOISE_TOOLTIP;Ajoute du bruit de luminance TP_LOCALLAB_NOISECHROCOARSE;Chroma gros (Ond) TP_LOCALLAB_NOISECHROC_TOOLTIP;Si supérieur à zéro, algorithme haute qualité est activé.\nGros est sélectionné si curseur >=0.2 -TP_LOCALLAB_NOISECHRODETAIL;Récupération des détails Chroma (DCT ƒ) +TP_LOCALLAB_NOISECHRODETAIL;Récup. détails Chroma(DCT) TP_LOCALLAB_NOISECHROFINE;Chroma fin (Ond) TP_LOCALLAB_NOISEDETAIL_TOOLTIP;Désactivé si curseur = 100 -TP_LOCALLAB_NOISELEQUAL;Egalisateurs balnc-noir +TP_LOCALLAB_NOISELEQUAL;Egalisateurs blanc-noir TP_LOCALLAB_NOISELUMCOARSE;Luminance gros (ond) -TP_LOCALLAB_NOISELUMDETAIL;Récupération Luminance fin(DCT ƒ) +TP_LOCALLAB_NOISELUMDETAIL;Récup. Luminance détail(DCT) TP_LOCALLAB_NOISELUMFINE;Luminance fin 1 (ond) TP_LOCALLAB_NOISELUMFINETWO;Luminance fin 2 (ond) TP_LOCALLAB_NOISELUMFINEZERO;Luminance fin 0 (ond) @@ -2136,7 +2220,7 @@ TP_LOCALLAB_OFFSETWAV;Décalage TP_LOCALLAB_OPACOL;Opacité TP_LOCALLAB_ORIGLC;Fusion seulement avec image originale TP_LOCALLAB_ORRETILAP_TOOLTIP;Agit sur un deuxième seuil Laplacien, pour prendre en compte ΔE pour différencier l'action nottament avec l'arrière plan (différent de Etendue) -TP_LOCALLAB_ORRETISTREN_TOOLTIP;Aagit sur un seuil Laplacien, plus grande est l'action, plus les différences de contraste seront réduites +TP_LOCALLAB_ORRETISTREN_TOOLTIP;Agit sur un seuil Laplacien, plus grande est l'action, plus les différences de contraste seront réduites TP_LOCALLAB_PASTELS2;Vibrance TP_LOCALLAB_PDE;Atténuation de Contraste - Compression dynamique TP_LOCALLAB_PDEFRA;Contraste atténuation ƒ @@ -2147,8 +2231,12 @@ TP_LOCALLAB_PREVSHOW;Montrer tous les réglages TP_LOCALLAB_PROXI;ΔE Affaiblissement TP_LOCALLAB_QUALCURV_METHOD;Types de Courbes TP_LOCALLAB_QUAL_METHOD;Qualité globale +TP_LOCALLAB_QUACONSER;Conservatif +TP_LOCALLAB_QUAAGRES;Aggressif +TP_LOCALLAB_QUANONEWAV;Débruit. par morceaux-luminance seulement +TP_LOCALLAB_QUANONEALL;Rien TP_LOCALLAB_RADIUS;Rayon -TP_LOCALLAB_RADIUS_TOOLTIP;Above Radius 30 Use Fast Fourier Transform +TP_LOCALLAB_RADIUS_TOOLTIP;Au-dessus de Rayon 30 Utilise 'Fast Fourier Transform' TP_LOCALLAB_RADMASKCOL;Rayon adoucir TP_LOCALLAB_RECT;Rectangle TP_LOCALLAB_RECURS;Réferences Récursives @@ -2166,7 +2254,7 @@ TP_LOCALLAB_RESIDHI;Hautes lumières TP_LOCALLAB_RESIDHITHR;Hautes lumières seuil TP_LOCALLAB_RESIDSHA;Ombres TP_LOCALLAB_RESIDSHATHR;Ombres seuil -TP_LOCALLAB_RETI;De-brume - Retinex Fort contraste +TP_LOCALLAB_RETI;De-brume - Retinex TP_LOCALLAB_RETIFRA;Retinex TP_LOCALLAB_RETIM;Original Retinex TP_LOCALLAB_RETITOOLFRA;Retinex Outils @@ -2206,7 +2294,7 @@ TP_LOCALLAB_SH1;Ombres Lumières TP_LOCALLAB_SH2;Egaliseur TP_LOCALLAB_SHADEX;Ombres TP_LOCALLAB_SHADEXCOMP;Compression ombres & profondeur tonale -TP_LOCALLAB_SHADHIGH;Ombres/Lumières - Egaliseur tonal +TP_LOCALLAB_SHADHIGH;Ombres/Lumières&Egaliseur TP_LOCALLAB_SHADOWHIGHLIGHT_TOOLTIP;Peut être utilisé - ou en complement - du module Exposition dans les cas difficiles.\nUtiliser réduction du bruit Denoise peut être nécessaire : éclaicir les ombres.\n\nPeut être utilisé comme un filtre gradué (augmenter Etendue) TP_LOCALLAB_SHAMASKCOL;Ombres TP_LOCALLAB_SHADMASK_TOOLTIP;Relève les ombres du masque de la même manière que l'algorithme "ombres/lumières" @@ -2240,9 +2328,10 @@ TP_LOCALLAB_SHOWMASKTYP3;Flouter & Bruit + De-bruite TP_LOCALLAB_SHOWMASKTYP_TOOLTIP;Masque et modifications peuvent être choisis.\nFlouter et bruit: dans ce cas il n'est pas utilisé pour 'Réduction du bruit'.\nRéduction du bruit : dans ce cas il n'est pas utilisé pour 'flouter et bruit'.\n\nFlouter et bruit + Réduction du bruit : le masque est partagé, faire attention à 'montrer modifications' et 'Etendue' TP_LOCALLAB_SHOWMNONE;Montrer image modifiée TP_LOCALLAB_SHOWMODIF;Montrer modifications sans masque +TP_LOCALLAB_SHOWMODIF2;Montrer modifications TP_LOCALLAB_SHOWMODIFMASK;Montrer modifications avec masque TP_LOCALLAB_SHOWNORMAL;Normalise luminance (non) -TP_LOCALLAB_SHOWPLUS;Masque et modifications - Adoucir-flouter & De-bruite +TP_LOCALLAB_SHOWPLUS;Masque et modifications TP_LOCALLAB_SHOWPOISSON;Poisson (pde ƒ) TP_LOCALLAB_SHOWR;Masque et modifications TP_LOCALLAB_SHOWREF;Prévisualisation ΔE @@ -2259,7 +2348,7 @@ TP_LOCALLAB_SIM;Simple TP_LOCALLAB_SLOMASKCOL;Pente (slope) TP_LOCALLAB_SLOMASK_TOOLTIP;Gamma et Pente (Slope) autorise une transformation du masque en douceur et sans artefacts en modifiant progressivement "L" pour éviter les discontinuité. TP_LOCALLAB_SLOSH;Pente -TP_LOCALLAB_SOFT;Lumière douce - Original Retinex +TP_LOCALLAB_SOFT;Lumière douce/Orig. Retinex TP_LOCALLAB_SOFTM;Lumière douce (soft light) TP_LOCALLAB_SOFTMETHOD_TOOLTIP;Applique un mélange Lumière douce. Effectue une émulation de "dodge and burn" en utilisant l'algorithme original de retinex. TP_LOCALLAB_SOFTRADIUSCOL;Rayon adoucir @@ -2268,6 +2357,7 @@ TP_LOCALLAB_SOFTRETI;Reduire artefact ΔE TP_LOCALLAB_SOFTRETI_TOOLTIP;Prend en compte ΔE pour améliorer Transmission map TP_LOCALLAB_SOFT_TOOLNAME;Lumière douce & Original Retinex - 6 TP_LOCALLAB_SOURCE_GRAY;Valeur +TP_LOCALLAB_SOURCE_ABS;Luminance absolue TP_LOCALLAB_SPECCASE; Cas spécifiques TP_LOCALLAB_SPECIAL;Usage Special des courbes RGB TP_LOCALLAB_SPECIAL_TOOLTIP;Seulement pour cette courbe RGB, désactive (ou réduit les effecs) de Etendue, masque...par exemple, si vous voulez rendre un effet "négatif". @@ -2298,10 +2388,10 @@ TP_LOCALLAB_THRES;Seuil structure TP_LOCALLAB_THRESDELTAE;Seuil ΔE-Etendue TP_LOCALLAB_THRESRETI;Seuil TP_LOCALLAB_THRESWAV;Balance Seuil -TP_LOCALLAB_TLABEL;TM Datas Min=%1 Max=%2 Mean=%3 Sigma=%4 (Seuil) +TP_LOCALLAB_TLABEL;TM Min=%1 Max=%2 Mea=%3 Sig=%4 TP_LOCALLAB_TLABEL2;TM Effectif Tm=%1 TM=%2 TP_LOCALLAB_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nTm=Min TM=Max of Transmission Map.\nYou can act on Threshold to normalize -TP_LOCALLAB_TM;Compression tonale - Texture +TP_LOCALLAB_TM;Compression tonale TP_LOCALLAB_TM_MASK;Utilise transmission map TP_LOCALLAB_TONEMAPESTOP_TOOLTIP;Ce paramètre affecte la sensibilité aux bords.\n Plus grand il est, plus la luminosité change peut être considéré comme un bord.\n Si réglé à zéro 'compression tonale' va avoir un effet similaire à masque flou. TP_LOCALLAB_TONEMAPGAM_TOOLTIP;Gamma déplace l'action de 'compression tonale' des ombres vers les lumières. @@ -2317,7 +2407,7 @@ TP_LOCALLAB_TRANSIT;Transition - Gradient TP_LOCALLAB_TRANSITGRAD;Transition différentiation XY TP_LOCALLAB_TRANSITGRAD_TOOLTIP;Change la transition des abscisses vers les ordonnées TP_LOCALLAB_TRANSITVALUE;Transition valeur -TP_LOCALLAB_TRANSITWEAK;Transition affaiblissement (linéaire-log) +TP_LOCALLAB_TRANSITWEAK;Transition affaiblissement (lin-log) TP_LOCALLAB_TRANSITWEAK_TOOLTIP;Ajuste l'affaiblissement de la transition : change le processus d'affaiblissement - 1 linéaire - 2 parabolique - 3 cubique - ^25.\nPeut être utilisé en conjonction avec de très faibles valeurs de transition pour traiter/réduire les défauts (CBDL, Ondelettes, Couleur et lumière) TP_LOCALLAB_TRANSIT_TOOLTIP;Ajuste la progressions de la transition enttre les zones affectées ou non affectées, comme un pourcentage du "rayon" TP_LOCALLAB_TRANSMISSIONGAIN;Transmission gain @@ -2336,9 +2426,9 @@ TP_LOCALLAB_SHARP_TOOLNAME;Netteté - 8 TP_LOCALLAB_LC_TOOLNAME;Constraste local & Ondelettes (Défauts) - 7 TP_LOCALLAB_CBDL_TOOLNAME;Contraste par Niveau détail - 2 TP_LOCALLAB_LOG_TOOLNAME;Codage log - 0 -TP_LOCALLAB_MASKCOM_TOOLNAME;Masque Commun Couleur - 13 +TP_LOCALLAB_MASKCOM_TOOLNAME;Masque Commun Couleur - 12 TP_LOCALLAB_VIS_TOOLTIP;Click pour montrer/cacher le Spot sélectionné.\nCtrl+click pour montrer/cacher tous les Spot. -TP_LOCALLAB_WAMASKCOL;Ψ Niveau Ondelettes +TP_LOCALLAB_WAMASKCOL;Niveau Ondelettes TP_LOCALLAB_WARM;Chaud - Froid & Artefacts de couleur TP_LOCALLAB_WARM_TOOLTIP;Ce curseur utilise l'algorithme Ciecam et agit comme une Balance des blancs, il prut réchauffer ou refroidir cool la zone concernée.\nIl peut aussi dans certains réduire les artefacts colorés. TP_LOCALLAB_WASDEN_TOOLTIP;De-bruite luminance pour les 3 premiers niveaux (fin).\nLa limite droite de la courbe correspond à gros : niveau 3 et au delà. @@ -2375,18 +2465,18 @@ TP_LOCALLAB_WAVCOMPRE_TOOLTIP;Réalise un 'Tone-mapping' ou une réduction du co TP_LOCALLAB_WAVCOMP_TOOLTIP;Réalise un contrast local en fonction de la direction de la décomposition en ondelettes : horizontal, vertical, diagonal TP_LOCALLAB_WAVCON;Contraste par niveau TP_LOCALLAB_WAVCONTF_TOOLTIP;Similaire à Contrast By Detail Levels : en abscisse niveaux. -TP_LOCALLAB_WAVDEN;de-bruite luminance par niveau (0 1 2 + 3 et plus) -TP_LOCALLAB_WAVE;Ψ Ondelette +TP_LOCALLAB_WAVDEN;de-bruite lum. par niveau +TP_LOCALLAB_WAVE;Ondelette TP_LOCALLAB_WAVEDG;Contrast Local TP_LOCALLAB_WAVEEDG_TOOLTIP;Améliore la netteté prenant en compte la notion de "ondelettes bords".\nNécessite au moins que les 4 premiers niveaux sont utilisables TP_LOCALLAB_WAVGRAD_TOOLTIP;Filtre gradué pour Contraste local "luminance" -TP_LOCALLAB_WAVHIGH;Ψ Ondelette haut -TP_LOCALLAB_WAVLEV;Flouter par niveau -TP_LOCALLAB_WAVLOW;Ψ Ondelette bas -TP_LOCALLAB_WAVMASK;Ψ Niveau contraste local +TP_LOCALLAB_WAVHIGH;Ondelette haut +TP_LOCALLAB_WAVLEV;Flou par niveau +TP_LOCALLAB_WAVLOW;Ondelette bas +TP_LOCALLAB_WAVMASK;Contr. local (par niveau) TP_LOCALLAB_WAVEMASK_LEVEL_TOOLTIP;Amplitude des niveaux d'ondelettes utilisés par “Local contrast” TP_LOCALLAB_WAVMASK_TOOLTIP;Autorise un travail fin sur les masques niveaux de contraste (structure) -TP_LOCALLAB_WAVMED;Ψ Ondelette normal +TP_LOCALLAB_WAVMED;Ondelette normal TP_LOCALLAB_WEDIANHI;Median Haut TP_LOCALLAB_WHITE_EV;Blanc Ev TP_METADATA_EDIT;Appliquer les modifications @@ -2514,7 +2604,7 @@ TP_RESIZE_APPLIESTO;S'applique à: TP_RESIZE_CROPPEDAREA;La zone recadrée TP_RESIZE_FITBOX;Boîte englobante TP_RESIZE_FULLIMAGE;L'image entière -TP_RESIZE_H;H: +TP_RESIZE_H;H TP_RESIZE_HEIGHT;Hauteur TP_RESIZE_LABEL;Redimensionnement TP_RESIZE_LANCZOS;Lanczos @@ -2526,7 +2616,7 @@ TP_RESIZE_W;L: TP_RESIZE_WIDTH;Largeur TP_RETINEX_CONTEDIT_HSL;Égaliseur d'histogramme TSV TP_RETINEX_CONTEDIT_LAB;Égaliseur d'histogramme L*a*b* -TP_RETINEX_CONTEDIT_LH;Égaliseur de teinte +TP_RETINEX_CONTEDIT_LH;Égaliseur teinte: TP_RETINEX_CONTEDIT_MAP;Égaliseur TP_RETINEX_CURVEEDITOR_CD;L=f(L) TP_RETINEX_CURVEEDITOR_CD_TOOLTIP;Luminance en fonction de la luminance L=f(L)\nCorrige les données raw pour réduire halos et artéfacts. @@ -2538,7 +2628,7 @@ TP_RETINEX_EQUAL;Égaliseur TP_RETINEX_FREEGAMMA;Gamma manuel TP_RETINEX_GAIN;Gain TP_RETINEX_GAINOFFS;Gain et Décalage (brillance) -TP_RETINEX_GAINTRANSMISSION;Gain sur Transmission +TP_RETINEX_GAINTRANSMISSION;Gain Transmission: TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplifie ou réduit le canal transmission pour atteindre la luminance souhaitée.\nAbscisses: transmission ; min = 0, max = valeurs.\nOrdonnées: gain. TP_RETINEX_GAMMA;Gamma TP_RETINEX_GAMMA_FREE;Manuel @@ -2591,7 +2681,7 @@ TP_RETINEX_TLABEL;CT Min=%1 Max=%2 Moyen=%3 Sigma=%4 TP_RETINEX_TLABEL2;CT Tm=%1 TM=%2 TP_RETINEX_TLABEL_TOOLTIP;Résultat du calcul de transmission.\nMin et Max sont utilisés par Variance.\nMoyen et Sigma.\nTm=Min TM=Niveau maximum de transmission. TP_RETINEX_TRANF;Transmission -TP_RETINEX_TRANSMISSION;Modulation du canal 'transmission' +TP_RETINEX_TRANSMISSION;Modulation 'transmission' TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission en fonction de la transmission.\nAbscisses: transmission des valeurs négatives (min), moyennes, et positives (max).\nOrdonnées: amplification ou réduction. TP_RETINEX_UNIFORM;Uniforme TP_RETINEX_VARIANCE;Contraste @@ -2719,7 +2809,7 @@ TP_WAVELET_COMPCONT;Contraste TP_WAVELET_COMPGAMMA;Compression gamma TP_WAVELET_COMPGAMMA_TOOLTIP;Ajuster le gamma de l'image résiduelle vous permet d'équiilibrer les données de l'histogramme. TP_WAVELET_COMPTM;Compression tonale -TP_WAVELET_CONTEDIT;Courbe de contraste 'Après' +TP_WAVELET_CONTEDIT;Courbe contraste 'Après' TP_WAVELET_CONTR;Gamut TP_WAVELET_CONTRA;Contraste TP_WAVELET_CONTRAST_MINUS;Contraste - @@ -2741,6 +2831,7 @@ TP_WAVELET_DAUB6;D6 - standard plus TP_WAVELET_DAUB10;D10 - moyen TP_WAVELET_DAUB14;D14 - haut TP_WAVELET_DAUB_TOOLTIP;Change les coéf. de Daubechies:\nD4 = Standard,\nD14 = Souvent les meilleurs performances, demande 10% de temps de traitement supplémentaire.\n\nAffecte la détection des bords ainsi que la qualité générale des premiers niveaux. Cependant la qualité n'est pas strcitement à ces coéficients et peut varier en fonction des images et des usages. +TP_WAVELET_DENOISEHUE;Egalisateur teinte TP_WAVELET_DONE;Vertical TP_WAVELET_DTHR;Diagonal TP_WAVELET_DTWO;Horizontal @@ -2806,7 +2897,7 @@ TP_WAVELET_NPTYPE;Pixels voisins TP_WAVELET_NPTYPE_TOOLTIP;Cet algorithme utilise la proximité d'un pixel et huit de ses voisins. Si moins de différence, les bords sont renforcés. TP_WAVELET_OPACITY;Opacité Bleu-Jaune TP_WAVELET_OPACITYW;Courbe de contraste d/v-h -TP_WAVELET_OPACITYWL;Contraste local final +TP_WAVELET_OPACITYWL;Contraste local TP_WAVELET_OPACITYWL_TOOLTIP;Modifie le contraste local final à la fin du traitement par ondelettes.\n\nLe côté gauche représente les plus faibles contrastes locaaux, progressant jusqu'aux plus grands contrastes locaux vers la droite. TP_WAVELET_PASTEL;Chroma des Pastels TP_WAVELET_PROC;Procédé diff --git a/rtdata/languages/default b/rtdata/languages/default index 83779b8f0..595f03e7e 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -2,7 +2,6 @@ #01 Developers should add translations to this file and then run the 'generateTranslationDiffs' Bash script to update other locales. #02 Translators please append a comment here with the current date and your name(s) as used in the RawTherapee forum or GitHub page, e.g.: #03 2525-12-24 Zager and Evans - ABOUT_TAB_BUILD;Version ABOUT_TAB_CREDITS;Credits ABOUT_TAB_LICENSE;License @@ -146,6 +145,7 @@ FILEBROWSER_POPUPCOLORLABEL4;Label: Blue FILEBROWSER_POPUPCOLORLABEL5;Label: Purple FILEBROWSER_POPUPCOPYTO;Copy to... FILEBROWSER_POPUPFILEOPERATIONS;File operations +FILEBROWSER_POPUPINSPECT;Inspect FILEBROWSER_POPUPMOVEEND;Move to end of queue FILEBROWSER_POPUPMOVEHEAD;Move to head of queue FILEBROWSER_POPUPMOVETO;Move to... @@ -246,11 +246,20 @@ GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done edit HISTOGRAM_TOOLTIP_B;Show/Hide blue histogram. HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar. HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. +HISTOGRAM_TOOLTIP_CROSSHAIR;Show/Hide indicator crosshair. HISTOGRAM_TOOLTIP_G;Show/Hide green histogram. HISTOGRAM_TOOLTIP_L;Show/Hide CIELab luminance histogram. HISTOGRAM_TOOLTIP_MODE;Toggle between linear, log-linear and log-log scaling of the histogram. HISTOGRAM_TOOLTIP_R;Show/Hide red histogram. HISTOGRAM_TOOLTIP_RAW;Show/Hide raw histogram. +HISTOGRAM_TOOLTIP_SHOW_OPTIONS;Toggle visibility of the scope option buttons. +HISTOGRAM_TOOLTIP_TRACE_BRIGHTNESS;Adjust scope brightness. +HISTOGRAM_TOOLTIP_TYPE_HISTOGRAM;Histogram +HISTOGRAM_TOOLTIP_TYPE_HISTOGRAM_RAW;Raw Histogram +HISTOGRAM_TOOLTIP_TYPE_PARADE;RGB Parade +HISTOGRAM_TOOLTIP_TYPE_VECTORSCOPE_HC;Hue-Chroma Vectorscope +HISTOGRAM_TOOLTIP_TYPE_VECTORSCOPE_HS;Hue-Saturation Vectorscope +HISTOGRAM_TOOLTIP_TYPE_WAVEFORM;Waveform HISTORY_CHANGED;Changed HISTORY_CUSTOMCURVE;Custom curve HISTORY_FROMCLIPBOARD;From clipboard @@ -427,39 +436,39 @@ HISTORY_MSG_170;Vibrance - HH curve HISTORY_MSG_171;L*a*b* - LC curve HISTORY_MSG_172;L*a*b* - Restrict LC HISTORY_MSG_173;NR - Detail recovery -HISTORY_MSG_174;CIECAM02 -HISTORY_MSG_175;CAM02 - CAT02 adaptation -HISTORY_MSG_176;CAM02 - Viewing surround -HISTORY_MSG_177;CAM02 - Scene luminosity -HISTORY_MSG_178;CAM02 - Viewing luminosity -HISTORY_MSG_179;CAM02 - White-point model -HISTORY_MSG_180;CAM02 - Lightness (J) -HISTORY_MSG_181;CAM02 - Chroma (C) -HISTORY_MSG_182;CAM02 - Automatic CAT02 -HISTORY_MSG_183;CAM02 - Contrast (J) -HISTORY_MSG_184;CAM02 - Scene surround -HISTORY_MSG_185;CAM02 - Gamut control -HISTORY_MSG_186;CAM02 - Algorithm -HISTORY_MSG_187;CAM02 - Red/skin prot. -HISTORY_MSG_188;CAM02 - Brightness (Q) -HISTORY_MSG_189;CAM02 - Contrast (Q) -HISTORY_MSG_190;CAM02 - Saturation (S) -HISTORY_MSG_191;CAM02 - Colorfulness (M) -HISTORY_MSG_192;CAM02 - Hue (h) -HISTORY_MSG_193;CAM02 - Tone curve 1 -HISTORY_MSG_194;CAM02 - Tone curve 2 -HISTORY_MSG_195;CAM02 - Tone curve 1 -HISTORY_MSG_196;CAM02 - Tone curve 2 -HISTORY_MSG_197;CAM02 - Color curve -HISTORY_MSG_198;CAM02 - Color curve -HISTORY_MSG_199;CAM02 - Output histograms -HISTORY_MSG_200;CAM02 - Tone mapping +HISTORY_MSG_174;CIECAM02/16 +HISTORY_MSG_175;CAM02/16 - CAT02/16 adaptation +HISTORY_MSG_176;CAM02/16 - Viewing surround +HISTORY_MSG_177;CAM02/16 - Scene luminosity +HISTORY_MSG_178;CAM02/16 - Viewing luminosity +HISTORY_MSG_179;CAM02/16 - White-point model +HISTORY_MSG_180;CAM02/16 - Lightness (J) +HISTORY_MSG_181;CAM02/16 - Chroma (C) +HISTORY_MSG_182;CAM02/16 - Automatic CAT02/16 +HISTORY_MSG_183;CAM02/16 - Contrast (J) +HISTORY_MSG_184;CAM02/16 - Scene surround +HISTORY_MSG_185;CAM02/16 - Gamut control +HISTORY_MSG_186;CAM02/16 - Algorithm +HISTORY_MSG_187;CAM02/16 - Red/skin prot. +HISTORY_MSG_188;CAM02/16 - Brightness (Q) +HISTORY_MSG_189;CAM02/16 - Contrast (Q) +HISTORY_MSG_190;CAM02/16 - Saturation (S) +HISTORY_MSG_191;CAM02/16 - Colorfulness (M) +HISTORY_MSG_192;CAM02/16 - Hue (h) +HISTORY_MSG_193;CAM02/16 - Tone curve 1 +HISTORY_MSG_194;CAM02/16 - Tone curve 2 +HISTORY_MSG_195;CAM02/16 - Tone curve 1 +HISTORY_MSG_196;CAM02/16 - Tone curve 2 +HISTORY_MSG_197;CAM02/16 - Color curve +HISTORY_MSG_198;CAM02/16 - Color curve +HISTORY_MSG_199;CAM02/16 - Output histograms +HISTORY_MSG_200;CAM02/16 - Tone mapping HISTORY_MSG_201;NR - Chrominance - R&G HISTORY_MSG_202;NR - Chrominance - B&Y HISTORY_MSG_203;NR - Color space HISTORY_MSG_204;LMMSE enhancement steps -HISTORY_MSG_205;CAM02 - Hot/bad pixel filter -HISTORY_MSG_206;CAT02 - Auto scene luminosity +HISTORY_MSG_205;CAT02/16 - Hot/bad pixel filter +HISTORY_MSG_206;CAT02/16 - Auto scene luminosity HISTORY_MSG_207;Defringe - Hue curve HISTORY_MSG_208;WB - B/R equalizer HISTORY_MSG_210;GF - Angle @@ -728,15 +737,15 @@ HISTORY_MSG_472;PS Smooth transitions HISTORY_MSG_473;PS Use lmmse HISTORY_MSG_474;PS Equalize HISTORY_MSG_475;PS Equalize channel -HISTORY_MSG_476;CAM02 - Temp out -HISTORY_MSG_477;CAM02 - Green out -HISTORY_MSG_478;CAM02 - Yb out -HISTORY_MSG_479;CAM02 - CAT02 adaptation out -HISTORY_MSG_480;CAM02 - Automatic CAT02 out -HISTORY_MSG_481;CAM02 - Temp scene -HISTORY_MSG_482;CAM02 - Green scene -HISTORY_MSG_483;CAM02 - Yb scene -HISTORY_MSG_484;CAM02 - Auto Yb scene +HISTORY_MSG_476;CAM02/16 - Temp out +HISTORY_MSG_477;CAM02/16 - Green out +HISTORY_MSG_478;CAM02/16 - Yb out +HISTORY_MSG_479;CAM02/16 - CAT02/16 adaptation out +HISTORY_MSG_480;CAM02/16 - Automatic CAT02/16 out +HISTORY_MSG_481;CAM02/16 - Temp scene +HISTORY_MSG_482;CAM02/16 - Green scene +HISTORY_MSG_483;CAM02/16 - Yb scene +HISTORY_MSG_484;CAM02/16 - Auto Yb scene HISTORY_MSG_485;Lens Correction HISTORY_MSG_486;Lens Correction - Camera HISTORY_MSG_487;Lens Correction - Lens @@ -745,7 +754,7 @@ HISTORY_MSG_489;DRC - Detail HISTORY_MSG_490;DRC - Amount HISTORY_MSG_491;White Balance HISTORY_MSG_492;RGB Curves -HISTORY_MSG_493;Local Adjustments +HISTORY_MSG_493;L*a*b* Adjustments HISTORY_MSG_494;Capture Sharpening HISTORY_MSG_496;Local Spot deleted HISTORY_MSG_497;Local Spot selected @@ -995,7 +1004,7 @@ HISTORY_MSG_747;Local Spot created HISTORY_MSG_748;Local - Exp Denoise HISTORY_MSG_749;Local - Reti Depth HISTORY_MSG_750;Local - Reti Mode log - lin -HISTORY_MSG_751;Local - Reti Dehaze luminance +HISTORY_MSG_751;Local - Reti Dehaze saturation HISTORY_MSG_752;Local - Reti Offset HISTORY_MSG_753;Local - Reti Transmission map HISTORY_MSG_754;Local - Reti Clip @@ -1087,6 +1096,45 @@ HISTORY_MSG_840;Local - CL Curve HISTORY_MSG_841;Local - LC curve HISTORY_MSG_842;Local - Contrast Threshold HISTORY_MSG_843;Local - Radius +HISTORY_MSG_845;Local - Log encoding +HISTORY_MSG_846;Local - Log encoding auto +HISTORY_MSG_847;Local - Log encoding Source +HISTORY_MSG_849;Local - Log encoding Source auto +HISTORY_MSG_850;Local - Log encoding B_Ev +HISTORY_MSG_851;Local - Log encoding W_Ev +HISTORY_MSG_852;Local - Log encoding Target +HISTORY_MSG_853;Local - Log encodind loc contrast +HISTORY_MSG_854;Local - Log encodind Scope +HISTORY_MSG_855;Local - Log encoding Whole image +HISTORY_MSG_856;Local - Log encoding Shadows range +HISTORY_MSG_857;Local - Wavelet blur residual +HISTORY_MSG_858;Local - Wavelet blur luminance only +HISTORY_MSG_859;Local - Wavelet max blur +HISTORY_MSG_860;Local - Wavelet blur levels +HISTORY_MSG_861;Local - Wavelet contrast levels +HISTORY_MSG_862;Local - Wavelet contrast attenuation +HISTORY_MSG_863;Local - Wavelet merge original image +HISTORY_MSG_864;Local - Wavelet dir contrast attenuation +HISTORY_MSG_865;Local - Wavelet dir contrast delta +HISTORY_MSG_866;Local - Wavelet dir compression +HISTORY_MSG_869;Local - Denoise by level +HISTORY_MSG_870;Local - Wavelet mask curve H +HISTORY_MSG_871;Local - Wavelet mask curve C +HISTORY_MSG_872;Local - Wavelet mask curve L +HISTORY_MSG_873;Local - Wavelet mask +HISTORY_MSG_875;Local - Wavelet mask blend +HISTORY_MSG_876;Local - Wavelet mask smooth +HISTORY_MSG_877;Local - Wavelet mask chroma +HISTORY_MSG_878;Local - Wavelet mask contrast curve +HISTORY_MSG_879;Local - Wavelet contrast chroma +HISTORY_MSG_880;Local - Wavelet blur chroma +HISTORY_MSG_881;Local - Wavelet contrast offset +HISTORY_MSG_882;Local - Wavelet blur +HISTORY_MSG_883;Local - Wavelet contrast by level +HISTORY_MSG_884;Local - Wavelet dir contrast +HISTORY_MSG_885;Local - Wavelet tone mapping +HISTORY_MSG_886;Local - Wavelet tone mapping compress +HISTORY_MSG_887;Local - Wavelet tone mapping compress residual HISTORY_MSG_888;Local - Contrast Wavelet Balance Threshold HISTORY_MSG_889;Local - Contrast Wavelet Graduated Strength HISTORY_MSG_890;Local - Contrast Wavelet Graduated angle @@ -1157,11 +1205,97 @@ HISTORY_MSG_956;Local - CH Curve HISTORY_MSG_957;Local - Denoise mode HISTORY_MSG_958;Local - Show/hide settings HISTORY_MSG_959;Local - Inverse blur +HISTORY_MSG_960;Local - Log encoding - cat16 +HISTORY_MSG_961;Local - Log encoding Ciecam +HISTORY_MSG_962;Local - Log encoding Absolute luminance source +HISTORY_MSG_963;Local - Log encoding Absolute luminance target +HISTORY_MSG_964;Local - Log encoding Surround +HISTORY_MSG_965;Local - Log encoding Saturation s +HISTORY_MSG_966;Local - Log encoding Contrast J +HISTORY_MSG_967;Local - Log encoding Mask curve C +HISTORY_MSG_968;Local - Log encoding Mask curve L +HISTORY_MSG_969;Local - Log encoding Mask curve H +HISTORY_MSG_970;Local - Log encoding Mask enable +HISTORY_MSG_971;Local - Log encoding Mask blend +HISTORY_MSG_972;Local - Log encoding Mask radius +HISTORY_MSG_973;Local - Log encoding Mask chroma +HISTORY_MSG_974;Local - Log encoding Mask contrast +HISTORY_MSG_975;Local - Log encoding Lightness J +HISTORY_MSG_977;Local - Log encoding Contrast Q +HISTORY_MSG_978;Local - Log encoding Sursource +HISTORY_MSG_979;Local - Log encoding Brightness Q +HISTORY_MSG_980;Local - Log encoding Colorfulness M +HISTORY_MSG_981;Local - Log encoding Strength +HISTORY_MSG_982;Local - Equalizer hue +HISTORY_MSG_983;Local - denoise threshold mask high +HISTORY_MSG_984;Local - denoise threshold mask low +HISTORY_MSG_985;Local - denoise Laplacian +HISTORY_MSG_986;Local - denoise reinforce +HISTORY_MSG_987;Local - GF recovery threshold +HISTORY_MSG_988;Local - GF threshold mask low +HISTORY_MSG_989;Local - GF threshold mask high +HISTORY_MSG_990;Local - Denoise recovery threshold +HISTORY_MSG_991;Local - Denoise threshold mask low +HISTORY_MSG_992;Local - Denoise threshold mask high +HISTORY_MSG_993;Local - Denoise Inverse algo +HISTORY_MSG_994;Local - GF Inverse algo +HISTORY_MSG_995;Local - Denoise decay +HISTORY_MSG_996;Local - Color recovery threshold +HISTORY_MSG_997;Local - Color threshold mask low +HISTORY_MSG_998;Local - Color threshold mask high +HISTORY_MSG_999;Local - Color decay +HISTORY_MSG_1000;Local - Denoise luminance gray +HISTORY_MSG_1001;Local - Log recovery threshold +HISTORY_MSG_1002;Local - Log threshold mask low +HISTORY_MSG_1003;Local - Log threshold mask high +HISTORY_MSG_1004;Local - Log decay +HISTORY_MSG_1005;Local - Exp recovery threshold +HISTORY_MSG_1006;Local - Exp threshold mask low +HISTORY_MSG_1007;Local - Exp threshold mask high +HISTORY_MSG_1008;Local - Exp decay +HISTORY_MSG_1009;Local - SH recovery threshold +HISTORY_MSG_1010;Local - SH threshold mask low +HISTORY_MSG_1011;Local - SH threshold mask high +HISTORY_MSG_1012;Local - SH decay +HISTORY_MSG_1013;Local - vib recovery threshold +HISTORY_MSG_1014;Local - vib threshold mask low +HISTORY_MSG_1015;Local - vib threshold mask high +HISTORY_MSG_1016;Local - vib decay +HISTORY_MSG_1017;Local - lc recovery threshold +HISTORY_MSG_1018;Local - lc threshold mask low +HISTORY_MSG_1019;Local - lc threshold mask high +HISTORY_MSG_1020;Local - lc decay +HISTORY_MSG_1021;Local - Denoise chrominance gray +HISTORY_MSG_1022;Local - TM recovery threshold +HISTORY_MSG_1023;Local - TM threshold mask low +HISTORY_MSG_1024;Local - TM threshold mask high +HISTORY_MSG_1025;Local - TM decay +HISTORY_MSG_1026;Local - cbdl recovery threshold +HISTORY_MSG_1027;Local - cbdl threshold mask low +HISTORY_MSG_1028;Local - cbdl threshold mask high +HISTORY_MSG_1029;Local - cbdl decay +HISTORY_MSG_1030;Local - reti recovery threshold +HISTORY_MSG_1031;Local - reti threshold mask low +HISTORY_MSG_1032;Local - reti threshold mask high +HISTORY_MSG_1033;Local - reti decay +HISTORY_MSG_1034;Local - Nlmeans - strength +HISTORY_MSG_1035;Local - Nlmeans - detail +HISTORY_MSG_1036;Local - Nlmeans - patch +HISTORY_MSG_1037;Local - Nlmeans - radius +HISTORY_MSG_1038;Local - Nlmeans - gamma +HISTORY_MSG_1039;Local - Grain - gamma +HISTORY_MSG_1040;Local - Spot - soft radius +HISTORY_MSG_1041;Local - Spot - Munsell +HISTORY_MSG_1042;Local - Log encoding - threshold +HISTORY_MSG_1043;Local - Exp - normalize HISTORY_MSG_BLSHAPE;Blur by level HISTORY_MSG_BLURCWAV;Blur chroma HISTORY_MSG_BLURWAV;Blur luminance HISTORY_MSG_BLUWAV;Attenuation response -HISTORY_MSG_CAT02PRESET;Cat02 automatic preset +HISTORY_MSG_CATCAT;Cat02/16 mode +HISTORY_MSG_CAT02PRESET;Cat02/16 automatic preset +HISTORY_MSG_CATCOMPLEX;Ciecam complexity +HISTORY_MSG_CATMODEL;CAM Model HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction @@ -1181,16 +1315,19 @@ HISTORY_MSG_COMPLEX;Wavelet complexity HISTORY_MSG_COMPLEXRETI;Retinex complexity HISTORY_MSG_DEHAZE_DEPTH;Dehaze - Depth HISTORY_MSG_DEHAZE_ENABLED;Haze Removal -HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only +HISTORY_MSG_DEHAZE_SATURATION;Dehaze - Saturation HISTORY_MSG_DEHAZE_SHOW_DEPTH_MAP;Dehaze - Show depth map HISTORY_MSG_DEHAZE_STRENGTH;Dehaze - Strength HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST;Dual demosaic - Auto threshold HISTORY_MSG_DUALDEMOSAIC_CONTRAST;Dual demosaic - Contrast threshold HISTORY_MSG_EDGEFFECT;Edge Attenuation response +HISTORY_MSG_FILMNEGATIVE_BALANCE;FN - Reference output +HISTORY_MSG_FILMNEGATIVE_COLORSPACE;Film negative color space HISTORY_MSG_FILMNEGATIVE_ENABLED;Film Negative -HISTORY_MSG_FILMNEGATIVE_FILMBASE;Film base color +HISTORY_MSG_FILMNEGATIVE_REF_SPOT;FN - Reference input HISTORY_MSG_FILMNEGATIVE_VALUES;Film negative values HISTORY_MSG_HISTMATCHING;Auto-matched tone curve +HISTORY_MSG_HLBL;Color propagation - blur HISTORY_MSG_ICM_OUTPUT_PRIMARIES;Output - Primaries HISTORY_MSG_ICM_OUTPUT_TEMP;Output - ICC-v4 illuminant D HISTORY_MSG_ICM_OUTPUT_TYPE;Output - Type @@ -1251,9 +1388,9 @@ HISTORY_MSG_WAVCHROMCO;Chroma coarse HISTORY_MSG_WAVCHROMFI;Chroma fine HISTORY_MSG_WAVCLARI;Clarity HISTORY_MSG_WAVDENLH;Level 5 +HISTORY_MSG_WAVDENMET;Local equalizer HISTORY_MSG_WAVDENOISE;Local contrast HISTORY_MSG_WAVDENOISEH;High levels Local contrast -HISTORY_MSG_WAVDENMET;Local equalizer HISTORY_MSG_WAVDETEND;Details soft HISTORY_MSG_WAVEDGS;Edge stopping HISTORY_MSG_WAVGUIDH;Local contrast-Hue equalizer @@ -1271,14 +1408,14 @@ HISTORY_MSG_WAVQUAMET;Denoise mode HISTORY_MSG_WAVRADIUS;Radius shadows-highlights HISTORY_MSG_WAVSCALE;Scale HISTORY_MSG_WAVSHOWMASK;Show wavelet mask -HISTORY_MSG_WAVSIGMA;Attenuation response HISTORY_MSG_WAVSIGM;Sigma +HISTORY_MSG_WAVSIGMA;Attenuation response +HISTORY_MSG_WAVSLIMET;Method HISTORY_MSG_WAVSOFTRAD;Soft radius clarity HISTORY_MSG_WAVSOFTRADEND;Soft radius final -HISTORY_MSG_WAVSLIMET;Method +HISTORY_MSG_WAVSTREND;Strength soft HISTORY_MSG_WAVTHRDEN;Threshold local contrast HISTORY_MSG_WAVTHREND;Threshold local contrast -HISTORY_MSG_WAVSTREND;Strength soft HISTORY_MSG_WAVUSHAMET;Clarity method HISTORY_NEWSNAPSHOT;Add HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s @@ -1301,7 +1438,7 @@ ICCPROFCREATOR_ILL_65;D65 ICCPROFCREATOR_ILL_80;D80 ICCPROFCREATOR_ILL_DEF;Default ICCPROFCREATOR_ILL_INC;StdA 2856K -ICCPROFCREATOR_ILL_TOOLTIP;You can only set the illuminant for ICC v4 profiles. +ICCPROFCREATOR_ILL_TOOLTIP;You can set the illuminant for ICC v4 profiles and also for ICC v2 profiles. ICCPROFCREATOR_PRIMARIES;Primaries: ICCPROFCREATOR_PRIM_ACESP0;ACES AP0 ICCPROFCREATOR_PRIM_ACESP1;ACES AP1 @@ -1318,13 +1455,13 @@ ICCPROFCREATOR_PRIM_REC2020;Rec2020 ICCPROFCREATOR_PRIM_REDX;Red X ICCPROFCREATOR_PRIM_REDY;Red Y ICCPROFCREATOR_PRIM_SRGB;sRGB -ICCPROFCREATOR_PRIM_TOOLTIP;You can only set custom primaries for ICC v4 profiles. +ICCPROFCREATOR_PRIM_TOOLTIP;You can set custom primaries for ICC v4 profiles and also for ICC v2 profiles. ICCPROFCREATOR_PRIM_WIDEG;Widegamut ICCPROFCREATOR_PROF_V2;ICC v2 ICCPROFCREATOR_PROF_V4;ICC v4 ICCPROFCREATOR_SAVEDIALOG_TITLE;Save ICC profile as... ICCPROFCREATOR_SLOPE;Slope -ICCPROFCREATOR_TRC_PRESET;Tone response curve: +ICCPROFCREATOR_TRC_PRESET;Tone response curve IPTCPANEL_CATEGORY;Category IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. IPTCPANEL_CITY;City @@ -1469,7 +1606,7 @@ PARTIALPASTE_CACORRECTION;Chromatic aberration correction PARTIALPASTE_CHANNELMIXER;Channel mixer PARTIALPASTE_CHANNELMIXERBW;Black-and-white PARTIALPASTE_COARSETRANS;Coarse rotation/flipping -PARTIALPASTE_COLORAPP;CIECAM02 +PARTIALPASTE_COLORAPP;CIECAM02/16 PARTIALPASTE_COLORGROUP;Color Related Settings PARTIALPASTE_COLORTONING;Color toning PARTIALPASTE_COMMONTRANSFORMPARAMS;Auto-fill @@ -1489,7 +1626,7 @@ PARTIALPASTE_EQUALIZER;Wavelet levels PARTIALPASTE_EVERYTHING;Everything PARTIALPASTE_EXIFCHANGES;Exif PARTIALPASTE_EXPOSURE;Exposure -PARTIALPASTE_FILMNEGATIVE;Film Negative +PARTIALPASTE_FILMNEGATIVE;Film negative PARTIALPASTE_FILMSIMULATION;Film simulation PARTIALPASTE_FLATFIELDAUTOSELECT;Flat-field auto-selection PARTIALPASTE_FLATFIELDBLURRADIUS;Flat-field blur radius @@ -1634,6 +1771,7 @@ PREFERENCES_HISTOGRAM_TOOLTIP;If enabled, the working profile is used for render PREFERENCES_HLTHRESHOLD;Threshold for clipped highlights PREFERENCES_ICCDIR;Directory containing color profiles PREFERENCES_IMPROCPARAMS;Default Processing Profile +PREFERENCES_INSPECTORWINDOW;Open inspector in own window or fullscreen PREFERENCES_INSPECT_LABEL;Inspect PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. @@ -1726,6 +1864,7 @@ PREFERENCES_TP_LABEL;Tool panel: PREFERENCES_TP_VSCROLLBAR;Hide vertical scrollbar PREFERENCES_USEBUNDLEDPROFILES;Use bundled profiles PREFERENCES_WORKFLOW;Layout +PREFERENCES_ZOOMONSCROLL;Zoom images by scrolling PROFILEPANEL_COPYPPASTE;Parameters to copy PROFILEPANEL_GLOBALPROFILES;Bundled profiles PROFILEPANEL_LABEL;Processing Profiles @@ -1818,7 +1957,7 @@ TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen the tool is active:\n- TOOLBAR_TOOLTIP_CROP;Crop selection.\nShortcut: c\nMove the crop using Shift+mouse drag. TOOLBAR_TOOLTIP_HAND;Hand tool.\nShortcut: h TOOLBAR_TOOLTIP_PERSPECTIVE;Perspective Correction\n\nEdit control lines to correct perspective distortion. Click this button again to apply correction. -TOOLBAR_TOOLTIP_STRAIGHTEN;Straighten / fine rotation.\nShortcut: s\n\nIndicate the vertical or horizontal by drawing a guide line over the image preview. Angle of rotation will be shown next to the guide line. Center of rotation is the geometrical center of the image. +TOOLBAR_TOOLTIP_STRAIGHTEN;Straighten / fine rotation.\nShortcut: s\n\nIndicate the vertical or horizontal by drawing a guide line over the image. Angle of rotation will be shown next to the guide line. Center of rotation is the geometrical center of the image. TOOLBAR_TOOLTIP_WB;Spot white balance.\nShortcut: w TP_BWMIX_ALGO;Algorithm OYCPM TP_BWMIX_ALGO_LI;Linear @@ -1894,6 +2033,7 @@ TP_COARSETRAF_TOOLTIP_ROTLEFT;Rotate left.\n\nShortcuts:\n[ - Multiple Ed TP_COARSETRAF_TOOLTIP_ROTRIGHT;Rotate right.\n\nShortcuts:\n] - Multiple Editor Tabs Mode,\nAlt-] - Single Editor Tab Mode. TP_COARSETRAF_TOOLTIP_VFLIP;Flip vertically. TP_COLORAPP_ABSOLUTELUMINANCE;Absolute luminance +TP_COLORAPP_ADAPSCEN_TOOLTIP;Corresponds to the luminance in candelas per m2 at the time of shooting, calculated automatically from the exif data. TP_COLORAPP_ALGO;Algorithm TP_COLORAPP_ALGO_ALL;All TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1903,32 +2043,41 @@ TP_COLORAPP_ALGO_TOOLTIP;Lets you choose between parameter subsets or all parame TP_COLORAPP_BADPIXSL;Hot/bad pixel filter TP_COLORAPP_BADPIXSL_TOOLTIP;Suppression of hot/bad (brightly colored) pixels.\n0 = No effect\n1 = Median\n2 = Gaussian.\nAlternatively, adjust the image to avoid very dark shadows.\n\nThese artifacts are due to limitations of CIECAM02. TP_COLORAPP_BRIGHT;Brightness (Q) -TP_COLORAPP_BRIGHT_TOOLTIP;Brightness in CIECAM02 takes into account the white's luminosity and differs from L*a*b* and RGB brightness. +TP_COLORAPP_BRIGHT_TOOLTIP;Brightness in CIECAM02/16 is the amount of perceived light emanating from a stimulus and differs from L*a*b* and RGB brightness. TP_COLORAPP_CAT02ADAPTATION_TOOLTIP;When setting manually, values above 65 are recommended. +TP_COLORAPP_CATMET_TOOLTIP;Classic - traditional CIECAM operation. The chromatic adaptation transforms are applied separately on ‘Scene conditions’ and basic illuminant on the one hand, and on basic illuminant and ‘Viewing conditions’ on the other.\n\nSymmetric – The chromatic adaptation is based on the white balance. The ‘Scene conditions’, ‘Image adjustments’ and ‘Viewing conditions’ settings are neutralized.\n\nMixed – Same as the ‘Classic’ option but in this case, the chromatic adaptation is based on the white balance. +TP_COLORAPP_CATMOD;Cat02/16 mode +TP_COLORAPP_CATCLASSIC;Classic +TP_COLORAPP_CATSYMGEN;Automatic Symmetric +TP_COLORAPP_CATSYMSPE;Mixed TP_COLORAPP_CHROMA;Chroma (C) TP_COLORAPP_CHROMA_M;Colorfulness (M) -TP_COLORAPP_CHROMA_M_TOOLTIP;Colorfulness in CIECAM02 differs from L*a*b* and RGB colorfulness. +TP_COLORAPP_CHROMA_M_TOOLTIP;Colorfulness in CIECAM02/16 is the perceived amount of hue in relation to gray, an indicator that a stimulus appears to be more or less colored. TP_COLORAPP_CHROMA_S;Saturation (S) -TP_COLORAPP_CHROMA_S_TOOLTIP;Saturation in CIECAM02 differs from L*a*b* and RGB saturation. -TP_COLORAPP_CHROMA_TOOLTIP;Chroma in CIECAM02 differs from L*a*b* and RGB chroma. -TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation -TP_COLORAPP_CONTRAST;Contrast (J) +TP_COLORAPP_CHROMA_S_TOOLTIP;Saturation in CIECAM02/16 corresponds to the color of a stimulus in relation to its own brightness, differs from L*a*b* and RGB saturation. +TP_COLORAPP_CHROMA_TOOLTIP;Chroma in CIECAM02/16 corresponds to the color of a stimulus relative to the clarity of a stimulus that appears white under identical conditions, differs from L*a*b* and RGB chroma. +TP_COLORAPP_CIECAT_DEGREE;CAT02/16 adaptation +TP_COLORAPP_CONTRAST;Contrast (J) TP_COLORAPP_CONTRAST_Q;Contrast (Q) -TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. -TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. +TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast (Q) in CIECAM02/16 is based on brightness, differs from L*a*b* and RGB contrast. +TP_COLORAPP_CONTRAST_TOOLTIP;Contrast (J) in CIECAM02/16 is based on lightness, differs from L*a*b* and RGB contrast. TP_COLORAPP_CURVEEDITOR1;Tone curve 1 -TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. +TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02/16.\nIf the "CIECAM02/16 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02/16.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. TP_COLORAPP_CURVEEDITOR2;Tone curve 2 TP_COLORAPP_CURVEEDITOR2_TOOLTIP;Same usage as with the second exposure tone curve. TP_COLORAPP_CURVEEDITOR3;Color curve -TP_COLORAPP_CURVEEDITOR3_TOOLTIP;Adjust either chroma, saturation or colorfulness.\n\nShows the histogram of chromaticity (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of C, s or M after CIECAM02.\n\nC, s and M are not shown in the main histogram panel.\nFor final output refer to the main histogram panel. -TP_COLORAPP_DATACIE;CIECAM02 output histograms in curves -TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. -TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +TP_COLORAPP_CURVEEDITOR3_TOOLTIP;Adjust either chroma, saturation or colorfulness.\n\nShows the histogram of chromaticity (L*a*b*) before CIECAM02/16.\nIf the "CIECAM02/16 output histograms in curves" checkbox is enabled, shows the histogram of C, S or M after CIECAM02/16.\n\nC, S and M are not shown in the main histogram panel.\nFor final output refer to the main histogram panel. +TP_COLORAPP_DATACIE;CIECAM02/16 output histograms in curves +TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02/16 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02/16 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02/16 curves show L*a*b* values before CIECAM02/16 adjustments. +TP_COLORAPP_DEGREE_TOOLTIP;CAT02/16 is a chromatic adaptation, it converts the values of an image whose white point is that of a given illuminant (for example D65), into new values whose white point is that of the new illuminant - see WP Model (for example D50 or D55). +TP_COLORAPP_DEGREOUT_TOOLTIP;CAT02/16 is a chromatic adaptation, it converts the values of an image whose white point is that of a given illuminant (for example D50), into new values whose white point is that of the new illuminant - see WP model (for example D75). +TP_COLORAPP_FREE;Free temp + tint + CAT02/16 +[output] TP_COLORAPP_GAMUT;Gamut control (L*a*b*) TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. +TP_COLORAPP_GEN;Settings - Preset +TP_COLORAPP_GEN_TOOLTIP;This module is based on the CIECAM color appearance model, which was designed to better simulate how human vision perceives colors under different lighting conditions, e.g., against different backgrounds.\nIt takes into account the environment of each color and modifies its appearance to get as close as possible to human perception.\nIt also adapts the output to the intended viewing conditions (monitor, TV, projector, printer, etc.) so that the chromatic appearance is preserved across the scene and display environments. TP_COLORAPP_HUE;Hue (h) -TP_COLORAPP_HUE_TOOLTIP;Hue (h) - angle between 0° and 360°. +TP_COLORAPP_HUE_TOOLTIP;Hue (h) is the degree to which a stimulus can be described as similar to a color described as red, green, blue and yellow. TP_COLORAPP_IL41;D41 TP_COLORAPP_IL50;D50 TP_COLORAPP_IL55;D55 @@ -1938,28 +2087,35 @@ TP_COLORAPP_IL75;D75 TP_COLORAPP_ILA;Incandescent StdA 2856K TP_COLORAPP_ILFREE;Free TP_COLORAPP_ILLUM;Illuminant -TP_COLORAPP_ILLUM_TOOLTIP;Select the illuminant closest to the shooting conditions.\nIn general D50, but it can change depending on the time and lattitude. -TP_COLORAPP_LABEL;CIE Color Appearance Model 2002 +TP_COLORAPP_ILLUM_TOOLTIP;Select the illuminant closest to the shooting conditions.\nIn general D50, but it can change depending on the time and latitude. +TP_COLORAPP_LABEL;Color Appearance & Lighting (CIECAM02/16) TP_COLORAPP_LABEL_CAM02;Image Adjustments TP_COLORAPP_LABEL_SCENE;Scene Conditions TP_COLORAPP_LABEL_VIEWING;Viewing Conditions TP_COLORAPP_LIGHT;Lightness (J) -TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. +TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02/16 is the clarity of a stimulus relative to the clarity of a stimulus that appears white under similar viewing conditions, differs from L*a*b* and RGB lightness. TP_COLORAPP_MEANLUMINANCE;Mean luminance (Yb%) TP_COLORAPP_MODEL;WP Model -TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected by the user, the output device's white balance is set in Viewing Conditions. +TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02/16 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02/16] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp + tint + CAT02/16 + [output]: temp and tint are selected by the user, the output device's white balance is set in Viewing Conditions. +TP_COLORAPP_MODELCAT;CAM Model +TP_COLORAPP_MODELCAT_TOOLTIP;Allows you to choose between CIECAM02 or CIECAM16.\n CIECAM02 will sometimes be more accurate.\n CIECAM16 should generate fewer artifacts +TP_COLORAPP_MOD02;CIECAM02 +TP_COLORAPP_MOD16;CIECAM16 TP_COLORAPP_NEUTRAL;Reset TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values -TP_COLORAPP_PRESETCAT02;Preset cat02 automatic -TP_COLORAPP_PRESETCAT02_TIP;Set combobox, sliders, temp, green so that Cat02 automatic is preset.\nYou can change illuminant shooting conditions.\nYou must change Cat02 adaptation Viewing conditions if need.\nYou can change Temperature and Tint Viewing conditions if need, and other settings if need. +TP_COLORAPP_PRESETCAT02;Preset cat02/16 automatic - Symmetric mode +TP_COLORAPP_PRESETCAT02_TIP;Set combobox, sliders, temp, green so that Cat02/16 automatic is preset.\nYou can change illuminant shooting conditions.\nYou must change Cat02/16 adaptation Viewing conditions if needed.\nYou can change Temperature and Tint Viewing conditions if needed, and other settings if needed.\nAll auto checkbox are disabled TP_COLORAPP_RSTPRO;Red & skin-tones protection TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. +TP_COLORAPP_SOURCEF_TOOLTIP;Corresponds to the shooting conditions and how to bring the conditions and data back to a "normal" area. Normal" means average or standard conditions and data, i.e. without taking into account CIECAM corrections. TP_COLORAPP_SURROUND;Surround +TP_COLORAPP_SURROUNDSRC;Surround - Scene Lighting TP_COLORAPP_SURROUND_AVER;Average TP_COLORAPP_SURROUND_DARK;Dark TP_COLORAPP_SURROUND_DIM;Dim TP_COLORAPP_SURROUND_EXDARK;Extremly Dark (Cutsheet) TP_COLORAPP_SURROUND_TOOLTIP;Changes tones and colors to take into account the viewing conditions of the output device.\n\nAverage: Average light environment (standard). The image will not change.\n\nDim: Dim environment (TV). The image will become slightly dark.\n\nDark: Dark environment (projector). The image will become more dark.\n\nExtremly Dark: Extremly dark environment (cutsheet). The image will become very dark. +TP_COLORAPP_SURSOURCE_TOOLTIP;Changes tones and colors to take into account the Scene conditions.\n\nAverage: Average light environment (standard). The image will not change.\n\nDim: Dim environment. The image will become slightly bright.\n\nDark: Dark environment. The image will become more bright.\n\nExtremly Dark: Extremly dark environment. The image will become very bright. TP_COLORAPP_TCMODE_BRIGHTNESS;Brightness TP_COLORAPP_TCMODE_CHROMA;Chroma TP_COLORAPP_TCMODE_COLORF;Colorfulness @@ -1971,17 +2127,20 @@ TP_COLORAPP_TCMODE_SATUR;Saturation TP_COLORAPP_TEMP2_TOOLTIP;Either symmetrical mode temp = White balance.\nEither select illuminant always set Tint=1.\n\nA temp=2856\nD41 temp=4100\nD50 temp=5003\nD55 temp=5503\nD60 temp=6000\nD65 temp=6504\nD75 temp=7504 TP_COLORAPP_TEMPOUT_TOOLTIP;Disable to change temperature and tint TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant, always set Tint=1.\n\nA temp=2856\nD41 temp=4100\nD50 temp=5003\nD55 temp=5503\nD60 temp=6000\nD65 temp=6504\nD75 temp=7504 -TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 +TP_COLORAPP_TONECIE;Tone mapping using CIECAM02/16 TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. +TP_COLORAPP_VIEWINGF_TOOLTIP;Takes into account the support on which the final image will be viewed (monitor, TV, projector, printer, ...), as well as its environment. This process will take the data coming from process "Image Adjustments" and "bring" it to the support in such a way that the viewing conditions and its environment are taken into account. TP_COLORAPP_VIEWING_ABSOLUTELUMINANCE_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16 cd/m²). -TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] +TP_COLORAPP_WBCAM;WB [RT+CAT02/16] + [output] TP_COLORAPP_WBRT;WB [RT] + [output] +TP_COLORAPP_YBOUT_TOOLTIP;Yb is the relative luminance of the background, expressed in % of gray. A gray at 18% corresponds to a background luminance expressed in CIE L of 50%.\nThis data must take into account the average luminance of the image +TP_COLORAPP_YBSCEN_TOOLTIP;Yb is the relative luminance of the background, expressed in % of gray. A gray at 18% corresponds to a background luminance expressed in CIE L of 50%.\nThis data is calculated from the average luminance of the image TP_COLORTONING_AB;o C/L TP_COLORTONING_AUTOSAT;Automatic TP_COLORTONING_BALANCE;Balance TP_COLORTONING_BY;o C/L TP_COLORTONING_CHROMAC;Opacity -TP_COLORTONING_COLOR;Color +TP_COLORTONING_COLOR;Color: TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP;Chroma opacity as a function of luminance oC=f(L) TP_COLORTONING_HIGHLIGHT;Highlights TP_COLORTONING_HUE;Hue @@ -2016,7 +2175,7 @@ TP_COLORTONING_METHOD_TOOLTIP;"L*a*b* blending", "RGB sliders" and "RGB curves" TP_COLORTONING_MIDTONES;Midtones TP_COLORTONING_NEUTRAL;Reset sliders TP_COLORTONING_NEUTRAL_TIP;Reset all values (Shadows, Midtones, Highlights) to default. -TP_COLORTONING_OPACITY;Opacity +TP_COLORTONING_OPACITY;Opacity: TP_COLORTONING_RGBCURVES;RGB - Curves TP_COLORTONING_RGBSLIDERS;RGB - Sliders TP_COLORTONING_SA;Saturation Protection @@ -2059,7 +2218,7 @@ TP_DEFRINGE_RADIUS;Radius TP_DEFRINGE_THRESHOLD;Threshold TP_DEHAZE_DEPTH;Depth TP_DEHAZE_LABEL;Haze Removal -TP_DEHAZE_LUMINANCE;Luminance only +TP_DEHAZE_SATURATION;Saturation TP_DEHAZE_SHOW_DEPTH_MAP;Show depth map TP_DEHAZE_STRENGTH;Strength TP_DIRPYRDENOISE_CHROMINANCE_AMZ;Auto multi-zones @@ -2096,7 +2255,7 @@ TP_DIRPYRDENOISE_MAIN_GAMMA_TOOLTIP;Gamma varies noise reduction strength across TP_DIRPYRDENOISE_MAIN_MODE;Mode TP_DIRPYRDENOISE_MAIN_MODE_AGGRESSIVE;Aggressive TP_DIRPYRDENOISE_MAIN_MODE_CONSERVATIVE;Conservative -TP_DIRPYRDENOISE_MAIN_MODE_TOOLTIP;"Conservative" preserves low frequency chroma patterns, while "aggressive" obliterates them. +TP_DIRPYRDENOISE_MAIN_MODE_TOOLTIP;Conservative preserves low frequency chroma patterns, while aggressive obliterates them. TP_DIRPYRDENOISE_MEDIAN_METHOD;Median method TP_DIRPYRDENOISE_MEDIAN_METHOD_CHROMINANCE;Chroma only TP_DIRPYRDENOISE_MEDIAN_METHOD_LAB;L*a*b* @@ -2169,12 +2328,19 @@ TP_EXPOSURE_TCMODE_WEIGHTEDSTD;Weighted Standard TP_EXPOS_BLACKPOINT_LABEL;Raw Black Points TP_EXPOS_WHITEPOINT_LABEL;Raw White Points TP_FILMNEGATIVE_BLUE;Blue ratio -TP_FILMNEGATIVE_FILMBASE_PICK;Pick film base color -TP_FILMNEGATIVE_FILMBASE_TOOLTIP;Pick a spot of unexposed film (eg. the border between frames), to get the actual film base color values, and save them in the processing profile.\nThis makes it easy to get a more consistent color balance when batch-processing multiple pictures from the same roll.\nAlso use this when the converted image is extremely dark, bright, or color-unbalanced. -TP_FILMNEGATIVE_FILMBASE_VALUES;Film base RGB: -TP_FILMNEGATIVE_GREEN;Reference exponent (contrast) -TP_FILMNEGATIVE_GUESS_TOOLTIP;Automatically set the red and blue ratios by picking two patches which had a neutral hue (no color) in the original scene. The patches should differ in brightness. Set the white balance afterwards. +TP_FILMNEGATIVE_BLUEBALANCE;Cool/Warm +TP_FILMNEGATIVE_COLORSPACE;Inversion color space: +TP_FILMNEGATIVE_COLORSPACE_INPUT;Input color space +TP_FILMNEGATIVE_COLORSPACE_TOOLTIP;Select the color space used to perform the negative inversion:\nInput color space : perform inversion before the input profile is applied, as in the previous versions of RT.\nWorking color space : perform inversion after input profile, using the currently selected working profile. +TP_FILMNEGATIVE_COLORSPACE_WORKING;Working color space +TP_FILMNEGATIVE_REF_LABEL;Input RGB: %1 +TP_FILMNEGATIVE_REF_PICK;Pick white balance spot +TP_FILMNEGATIVE_REF_TOOLTIP;Pick a gray patch for white-balancing the output, positive image. +TP_FILMNEGATIVE_GREEN;Reference exponent +TP_FILMNEGATIVE_GREENBALANCE;Magenta/Green +TP_FILMNEGATIVE_GUESS_TOOLTIP;Automatically set the red and blue ratios by picking two patches which had a neutral hue (no color) in the original scene. The patches should differ in brightness. TP_FILMNEGATIVE_LABEL;Film Negative +TP_FILMNEGATIVE_OUT_LEVEL;Output level TP_FILMNEGATIVE_PICK;Pick neutral spots TP_FILMNEGATIVE_RED;Red ratio TP_FILMSIMULATION_LABEL;Film Simulation @@ -2207,6 +2373,7 @@ TP_GRADIENT_STRENGTH_TOOLTIP;Filter strength in stops. TP_HLREC_BLEND;Blend TP_HLREC_CIELAB;CIELab Blending TP_HLREC_COLOR;Color Propagation +TP_HLREC_HLBLUR;Blur TP_HLREC_ENA_TOOLTIP;Could be activated by Auto Levels. TP_HLREC_LABEL;Highlight reconstruction TP_HLREC_LUMINANCE;Luminance Recovery @@ -2258,7 +2425,7 @@ TP_ICM_WORKING_TRC_TOOLTIP;Only for built-in profiles. TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction TP_IMPULSEDENOISE_THRESH;Threshold TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift -TP_LABCURVE_AVOIDCOLORSHIFT_TOOLTIP;Fit colors into gamut of the working color space and apply Munsell correction. +TP_LABCURVE_AVOIDCOLORSHIFT_TOOLTIP;Fit colors into gamut of the working color space and apply Munsell correction (Uniform Perceptual Lab). TP_LABCURVE_BRIGHTNESS;Lightness TP_LABCURVE_CHROMATICITY;Chromaticity TP_LABCURVE_CHROMA_TOOLTIP;To apply B&W toning, set Chromaticity to -100. @@ -2316,37 +2483,39 @@ TP_LOCALCONTRAST_LIGHTNESS;Lightness level TP_LOCALCONTRAST_RADIUS;Radius TP_LOCALLAB_ACTIV;Luminance only TP_LOCALLAB_ACTIVSPOT;Enable Spot -TP_LOCALLAB_ADJ;Equalizer Blue-Yellow/Red-Green +TP_LOCALLAB_ADJ;Equalizer Color TP_LOCALLAB_ALL;All rubrics TP_LOCALLAB_AMOUNT;Amount TP_LOCALLAB_ARTIF;Shape detection TP_LOCALLAB_ARTIF_TOOLTIP;ΔE scope threshold increases the range of deltaE scope. High values are for very wide gamut images.\nIncreasing deltaE decay can improve shape detection, but can also reduce the scope. -TP_LOCALLAB_AUTOGRAY;Automatic +TP_LOCALLAB_AUTOGRAY;Auto mean luminance (Yb%) TP_LOCALLAB_AVOID;Avoid color shift +TP_LOCALLAB_AVOIDRAD;Soft radius +TP_LOCALLAB_AVOIDMUN;Munsell correction only TP_LOCALLAB_BALAN;ab-L balance (ΔE) TP_LOCALLAB_BALANEXP;Laplacian balance TP_LOCALLAB_BALANH;C-H balance (ΔE) TP_LOCALLAB_BALAN_TOOLTIP;Changes the ΔE algorithm parameters.\nTakes into account more or less a*b* or L*, or more or less C or H.\nNot for Denoise -TP_LOCALLAB_BASELOG;Logarithm base +TP_LOCALLAB_BASELOG;Shadows range (logarithm base) TP_LOCALLAB_BILATERAL;Bilateral filter TP_LOCALLAB_BLACK_EV;Black Ev TP_LOCALLAB_BLCO;Chrominance only TP_LOCALLAB_BLENDMASKCOL;Blend -TP_LOCALLAB_BLENDMASKMASK;Add/subtract luminance mask -TP_LOCALLAB_BLENDMASKMASKAB;Add/subtract chrominance mask -TP_LOCALLAB_BLENDMASK_TOOLTIP;If blend = 0 only shape detection is improved.\nIf blend > 0 the mask is added to the image. If blend < 0 the mask is subtracted from the image +TP_LOCALLAB_BLENDMASKMASK;Add/subtract luma mask +TP_LOCALLAB_BLENDMASKMASKAB;Add/subtract chroma mask TP_LOCALLAB_BLENDMASKMASK_TOOLTIP;If this slider = 0 no action.\nAdd or subtract the mask from the original image +TP_LOCALLAB_BLENDMASK_TOOLTIP;If blend = 0 only shape detection is improved.\nIf blend > 0 the mask is added to the image. If blend < 0 the mask is subtracted from the image TP_LOCALLAB_BLGUID;Guided Filter TP_LOCALLAB_BLINV;Inverse TP_LOCALLAB_BLLC;Luminance & Chrominance TP_LOCALLAB_BLLO;Luminance only TP_LOCALLAB_BLMED;Median -TP_LOCALLAB_BLMETHOD_TOOLTIP;Normal - direct blur and noise with all settings.\nInverse blur and noise with all settings. Be careful some results may be curious +TP_LOCALLAB_BLMETHOD_TOOLTIP;Normal: direct blur and noise with all settings.\nInverse: blur and noise with all settings. Warning, some settings may give curious results. TP_LOCALLAB_BLNOI_EXP;Blur & Noise TP_LOCALLAB_BLNORM;Normal TP_LOCALLAB_BLSYM;Symmetric TP_LOCALLAB_BLUFR;Blur/Grain & Denoise -TP_LOCALLAB_BLUMETHOD_TOOLTIP;To blur the background and isolate the foreground:\n-blur the background by completely covering the image with an an RT-spot (high values for scope and transition and ‘Normal’ or ‘Inverse’ in checkbox).\n-Isolate the foreground by using one or more ‘Excluding’ RT-spot(s) and increase the scope.\n\nThis module (including the "median" and "Guided filter") can be used in addition to the main-menu noise reduction. +TP_LOCALLAB_BLUMETHOD_TOOLTIP;To blur the background and isolate the foreground:\n-blur the background by completely covering the image with an an RT-spot (high values for scope and transition and ‘Normal’ or ‘Inverse’ in checkbox).\n-Isolate the foreground by using one or more ‘Excluding’ RT-spot(s) and increase the scope.\n\nThis module (including the ‘median’ and ‘Guided filter’) can be used in addition to the main-menu noise reduction TP_LOCALLAB_BLUR;Gaussian Blur - Noise - Grain TP_LOCALLAB_BLURCBDL;Blur levels 0-1-2-3-4 TP_LOCALLAB_BLURCOL;Radius @@ -2355,9 +2524,9 @@ TP_LOCALLAB_BLURDE;Blur shape detection TP_LOCALLAB_BLURLC;Luminance only TP_LOCALLAB_BLURLEVELFRA;Blur levels TP_LOCALLAB_BLURMASK_TOOLTIP;Uses a large-radius blur to create a mask that allows you to vary the contrast of the image and/or darken/lighten parts of it. -TP_LOCALLAB_BLURRMASK_TOOLTIP;Allows you to vary the "radius" of the Gaussian blur (0 to 1000) TP_LOCALLAB_BLURRESIDFRA;Blur Residual -TP_LOCALLAB_BLUR_TOOLNAME;Blur/Grain & Denoise - 1 +TP_LOCALLAB_BLURRMASK_TOOLTIP;Allows you to vary the "radius" of the Gaussian blur (0 to 1000) +TP_LOCALLAB_BLUR_TOOLNAME;Blur/Grain & Denoise TP_LOCALLAB_BLWH;All changes forced in Black-and-White TP_LOCALLAB_BLWH_TOOLTIP;Force color components "a" and "b" to zero.\nUseful for black and white processing, or film simulation. TP_LOCALLAB_BUTTON_ADD;Add @@ -2365,14 +2534,15 @@ TP_LOCALLAB_BUTTON_DEL;Delete TP_LOCALLAB_BUTTON_DUPL;Duplicate TP_LOCALLAB_BUTTON_REN;Rename TP_LOCALLAB_BUTTON_VIS;Show/Hide +TP_LOCALLAB_CATAD;Chromatic adaptation/Cat16 TP_LOCALLAB_CBDL;Contrast by Detail Levels TP_LOCALLAB_CBDLCLARI_TOOLTIP;Enhances local contrast of the midtones. TP_LOCALLAB_CBDL_ADJ_TOOLTIP;Same as wavelets.\nThe first level (0) acts on 2x2 pixel details.\nThe last level (5) acts on 64x64 pixel details. TP_LOCALLAB_CBDL_THRES_TOOLTIP;Prevents the sharpening of noise -TP_LOCALLAB_CBDL_TOOLNAME;CBDL - 2 +TP_LOCALLAB_CBDL_TOOLNAME;Contrast by Detail Levels TP_LOCALLAB_CENTER_X;Center X TP_LOCALLAB_CENTER_Y;Center Y -TP_LOCALLAB_CH;Curves CL - LC +TP_LOCALLAB_CH;CL - LC TP_LOCALLAB_CHROMA;Chrominance TP_LOCALLAB_CHROMABLU;Chroma levels TP_LOCALLAB_CHROMABLU_TOOLTIP;Increases or reduces the effect depending on the luma settings.\nValues under 1 reduce the effect. Values greater than 1 increase the effect. @@ -2381,47 +2551,50 @@ TP_LOCALLAB_CHROMACB_TOOLTIP;Increases or reduces the effect depending on the lu TP_LOCALLAB_CHROMALEV;Chroma levels TP_LOCALLAB_CHROMASKCOL;Chroma TP_LOCALLAB_CHROMASK_TOOLTIP;Changes the chroma of the mask if one exists (i.e. C(C) or LC(H) is activated). -TP_LOCALLAB_CHROMASK_TOOLTIP;You can use this slider to desaturated background (inverse mask - curve near 0).\nAlso to attenuate or enhance the action of a mask on the chroma TP_LOCALLAB_CHRRT;Chroma +TP_LOCALLAB_CIEC;Use Ciecam environment parameters +TP_LOCALLAB_CIECAMLOG_TOOLTIP;This module is based on the CIECAM color appearance model which was designed to better simulate how human vision perceives colors under different lighting conditions.\nThe first Ciecam process 'Scene conditions' is carried out by Log encoding, it also uses 'Absolute luminance' at the time of shooting.\nThe second Ciecam process 'Image adjustments' is simplified and uses only 3 variables (local contrast, contrast J, saturation s).\nThe third Ciecam process 'Viewing conditions' adapts the output to the intended viewing conditions (monitor, TV, projector, printer, etc.) so that the chromatic and contrast appearance is preserved across the display environment. TP_LOCALLAB_CIRCRADIUS;Spot size -TP_LOCALLAB_CIRCRAD_TOOLTIP;Contains the references of the RT-spot, useful for shape detection (hue, luma, chroma, Sobel).\nLow values may be useful for treating foliage.\nHigh values may be useful for treating skin +TP_LOCALLAB_CIRCRAD_TOOLTIP;Contains the references of the RT-spot, useful for shape detection (hue, luma, chroma, Sobel).\nLow values may be useful for processing foliage.\nHigh values may be useful for processing skin. TP_LOCALLAB_CLARICRES;Merge chroma -TP_LOCALLAB_CLARIFRA;Clarity & Sharp mask - Blend & Soften Images +TP_LOCALLAB_CLARIFRA;Clarity & Sharp mask/Blend & Soften Images TP_LOCALLAB_CLARILRES;Merge luma TP_LOCALLAB_CLARISOFT;Soft radius -TP_LOCALLAB_CLARISOFT_TOOLTIP;The "Soft radius" slider (guided filter algorithm) reduces halos and irregularities for both Clarity and Sharp Mask and for all pyramid wavelet processes. To deactivate, set slider to zero. +TP_LOCALLAB_CLARISOFT_TOOLTIP;The ‘Soft radius’ slider (guided filter algorithm) reduces halos and irregularities for both Clarity and Sharp Mask and for all pyramid wavelet processes. To deactivate, set slider to zero. TP_LOCALLAB_CLARITYML;Clarity TP_LOCALLAB_CLARI_TOOLTIP;Levels 0 to 4 (included): ‘Sharp mask’ is enabled\nLevels 5 and above: 'Clarity' is enabled.\nUseful if you use 'Wavelet level tone mapping' TP_LOCALLAB_CLIPTM;Clip restored data (gain) TP_LOCALLAB_COFR;Color & Light TP_LOCALLAB_COLORDE;ΔE preview color - intensity -TP_LOCALLAB_COLORDE_TOOLTIP;Show a blue color-preview for ΔE selection if negative and green if positive.\n\nMask and modifications (show modified areas without mask): show actual modifications if positive, show enhanced modifications (luminance only) with blue and yellow if negative. -TP_LOCALLAB_COLORDEPREV_TOOLTIP;Preview ΔE button will only work if you have activated one (and only one) of the tools in "Add tool to current spot" menu.\nTo be able to preview ΔE with several tools enabled, use Mask and modifications - Preview ΔE +TP_LOCALLAB_COLORDEPREV_TOOLTIP;Preview ΔE button will only work if you have activated one (and only one) of the tools in ‘Add tool to current spot’ menu.\nTo be able to preview ΔE with several tools enabled, use Mask and modifications - Preview ΔE. +TP_LOCALLAB_COLORDE_TOOLTIP;Show a blue color preview for ΔE selection if negative and green if positive.\n\nMask and modifications (show modified areas without mask): show actual modifications if positive, show enhanced modifications (luminance only) with blue and yellow if negative. TP_LOCALLAB_COLORSCOPE;Scope (color tools) TP_LOCALLAB_COLORSCOPE_TOOLTIP;Common Scope slider for Color and Light, Shadows/Highlights, Vibrance.\nOther tools have their own scope controls. -TP_LOCALLAB_COLOR_TOOLNAME;Color & Light - 11 +TP_LOCALLAB_COLOR_TOOLNAME;Color & Light TP_LOCALLAB_COL_NAME;Name TP_LOCALLAB_COL_VIS;Status TP_LOCALLAB_COMPFRA;Directional contrast -TP_LOCALLAB_COMPFRAME_TOOLTIP;Allows special effects. You can reduce artifacts with 'Clarity & Sharp mask - Blend & Soften Images".\nUses a lot of resources +TP_LOCALLAB_COMPFRAME_TOOLTIP;Allows you to create special effects. You can reduce artifacts with 'Clarity and Sharp mask - Blend and Soften Images’.\nUses a lot of resources. TP_LOCALLAB_COMPLEX_METHOD;Software Complexity -TP_LOCALLAB_COMPLEX_TOOLTIP; Allow user to select Local adjustments rubrics. +TP_LOCALLAB_COMPLEX_TOOLTIP; Allow user to select Local adjustments complexity. TP_LOCALLAB_COMPREFRA;Wavelet level tone mapping -TP_LOCALLAB_COMPRESS_TOOLTIP;Use if necessary the module 'Clarity & Sharp mask and Blend & Soften Images' by adjusting 'Soft radius' to reduce artifacts. +TP_LOCALLAB_COMPRESS_TOOLTIP;If necessary, use the module 'Clarity and Sharp mask and Blend and Soften Images' by adjusting 'Soft radius' to reduce artifacts. TP_LOCALLAB_CONTCOL;Contrast threshold TP_LOCALLAB_CONTFRA;Contrast by level -TP_LOCALLAB_CONTTHMASK_TOOLTIP;Allows you to determine which parts of the image will be impacted based on the texture. +TP_LOCALLAB_CONTL;Contrast (J) TP_LOCALLAB_CONTRAST;Contrast -TP_LOCALLAB_CONTRASTCURVMASK1_TOOLTIP;Allows you to freely modify the contrast of the mask (gamma & slope), instead of using a continuous & progressive curve. However it can create artifacts that have to be dealt with using the “Smooth radius” or “Laplacian threshold sliders”. +TP_LOCALLAB_CONTRASTCURVMASK1_TOOLTIP;Allows you to freely modify the contrast of the mask (gamma and slope), instead of using a continuous and progressive curve. However it can create artifacts that have to be dealt with using the ‘Smooth radius’ or ‘Laplacian threshold sliders’. +TP_LOCALLAB_CONTRASTCURVMASK_TOOLTIP;Allows you to freely change the contrast of the mask.\n Has a similar function to the Gamma and Slope sliders.\n It allows you to target certain parts of the image (usually the lightest parts of the mask by using the curve to exclude the darker parts).May create artifacts. TP_LOCALLAB_CONTRESID;Contrast +TP_LOCALLAB_CONTTHMASK_TOOLTIP;Allows you to determine which parts of the image will be impacted based on the texture. TP_LOCALLAB_CONTTHR;Contrast Threshold TP_LOCALLAB_CONTWFRA;Local contrast -TP_LOCALLAB_CSTHRESHOLD;Ψ Wavelet levels -TP_LOCALLAB_CSTHRESHOLDBLUR;Ψ Wavelet level selection +TP_LOCALLAB_CSTHRESHOLD;Wavelet levels +TP_LOCALLAB_CSTHRESHOLDBLUR;Wavelet level selection TP_LOCALLAB_CURV;Lightness - Contrast - Chrominance "Super" TP_LOCALLAB_CURVCURR;Normal +TP_LOCALLAB_CURVEEDITORM_CC_TOOLTIP;If the curves are at the top, the mask is completely black and no changes are made to the image.\nAs you lower the curve, the mask gradually becomes more colorful and bright, progressively changing the image.\n\nIt is recommended (but not mandatory) to position the top of the curves on the gray boundary line which represents the reference values of chroma, luma, hue for the RT-spot. TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP;If curves are at the top, the mask is completely black and no changes are made to the image.\nAs you lower the curve, the mask gradually becomes more colorful and bright, progressively changing the image.\n\nIt is recommended (but not mandatory) to position the top of the curves on the gray boundary line which represents the reference values of chroma, luma, hue for the RT-spot. -TP_LOCALLAB_CURVEEDITORM_CC_TOOLTIP;If curves at the top, mask is completely black no transformation is made by the mask on the image.\nAs you go down the curve, the mask gradually more colorful and brilliant, the image is changing more and more.\n\nThe gray transition line which represents the references (chroma, luma, hue).\nYou can choose or not to position the top of the curves on this transition. TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP;To activate the curves, set the ‘Curve type’ combobox to ‘Normal’ TP_LOCALLAB_CURVEEDITOR_TONES_LABEL;Tone curve TP_LOCALLAB_CURVEEDITOR_TONES_TOOLTIP;L=f(L), can be used with L(H) in Color and Light @@ -2434,26 +2607,30 @@ TP_LOCALLAB_CURVNONE;Disable curves TP_LOCALLAB_DARKRETI;Darkness TP_LOCALLAB_DEHAFRA;Dehaze TP_LOCALLAB_DEHAZ;Strength -TP_LOCALLAB_DEHAZ_TOOLTIP;Negative values add haze TP_LOCALLAB_DEHAZFRAME_TOOLTIP;Removes atmospheric haze. Increases overall saturation and detail.\nCan remove color casts, but may also introduce a blue cast which can be corrected with other tools. +TP_LOCALLAB_DEHAZ_TOOLTIP;Negative values add haze TP_LOCALLAB_DELTAD;Delta balance TP_LOCALLAB_DELTAEC;ΔE Image mask -TP_LOCALLAB_DENOIS;Ψ Denoise -TP_LOCALLAB_DENOI_EXP;Denoise -TP_LOCALLAB_DENOIQUA_TOOLTIP;Conservative mode preserves low frequency detail. “Aggressive” mode removes low frequency detail. -TP_LOCALLAB_DENOIEQUAL_TOOLTIP;Allows you to carry out more or less noise reduction in either the shadows or the highlights. -TP_LOCALLAB_DENOI_TOOLTIP;This module can be used for noise reduction either on its own (at the end of the processing pipeline) or in addition to the Noise Reduction module in the Detail tab (which works at the beginning of the pipeline).\n Scope allows you to differentiate the action based on color (deltaE).\n\n You can refine the result with a "Median filter" or a "Guided Filter" (Soft radius). -TP_LOCALLAB_DENOILUMDETAIL_TOOLTIP;Allows you to recover luminance detail by progressively applying a Fourier transform (DCT). -TP_LOCALLAB_DENOICHROF_TOOLTIP;Allows you to adjust fine-detail chrominance noise +TP_LOCALLAB_DENOIBILAT_TOOLTIP;Allows you to reduce impulse or ‘salt & pepper’ noise. TP_LOCALLAB_DENOICHROC_TOOLTIP;Allows you to deal with blotches and packets of noise. TP_LOCALLAB_DENOICHRODET_TOOLTIP;Allows you to recover chrominance detail by progressively applying a Fourier transform (DCT). -TP_LOCALLAB_DENOITHR_TOOLTIP;Adjusts edge detection to help reduce noise in uniform, low-contrast areas. +TP_LOCALLAB_DENOICHROF_TOOLTIP;Allows you to adjust fine-detail chrominance noise TP_LOCALLAB_DENOIEQUALCHRO_TOOLTIP;Allows you to direct the chroma noise reduction towards either the blue-yellow or red-green colors. -TP_LOCALLAB_DENOIBILAT_TOOLTIP;Allows you to reduce impulse or ‘salt & pepper’ noise. +TP_LOCALLAB_DENOIEQUAL_TOOLTIP;Allows you to carry out more or less noise reduction in either the shadows or the highlights. +TP_LOCALLAB_DENOI1_EXP;Denoise based on luminance mask +TP_LOCALLAB_DENOI2_EXP;Recovery based on luminance mask +TP_LOCALLAB_DENOILUMDETAIL_TOOLTIP;Allows you to recover luminance detail by progressively applying a Fourier transform (DCT). +TP_LOCALLAB_DENOIQUA_TOOLTIP;Conservative mode preserves low frequency detail. Aggressive mode removes low frequency detail.\nConservative and Aggressive modes use wavelets and DCT and can be used in conjunction with ‘Non-local Means – Luminance’. +TP_LOCALLAB_DENOIS;Denoise +TP_LOCALLAB_DENOITHR_TOOLTIP;Adjusts edge detection to help reduce noise in uniform, low-contrast areas. +TP_LOCALLAB_DENOI_EXP;Denoise +TP_LOCALLAB_DENOI_TOOLTIP;This module can be used for noise reduction either on its own (at the end of the processing pipeline) or in addition to the Noise Reduction module in the Detail tab (which works at the beginning of the pipeline).\n Scope allows you to differentiate the action based on color (deltaE). TP_LOCALLAB_DEPTH;Depth TP_LOCALLAB_DETAIL;Local contrast +TP_LOCALLAB_DETAILFRA;Edge detection - DCT TP_LOCALLAB_DETAILSH;Details -TP_LOCALLAB_DETAILTHR;Luminance & chroma detail threshold (DCT ƒ) +TP_LOCALLAB_DETAILTHR;Luma-chro detail threshold +TP_LOCALLAB_DIVGR;Gamma TP_LOCALLAB_DUPLSPOTNAME;Copy TP_LOCALLAB_EDGFRA;Edge sharpness TP_LOCALLAB_EDGSHOW;Show all tools @@ -2461,7 +2638,7 @@ TP_LOCALLAB_ELI;Ellipse TP_LOCALLAB_ENABLE_AFTER_MASK;Use Tone Mapping TP_LOCALLAB_ENABLE_MASK;Enable mask TP_LOCALLAB_ENABLE_MASKAFT;Use all algorithms Exposure -TP_LOCALLAB_ENARETIMASKTMAP_TOOLTIP;If enabled Mask uses Restored Datas after Transmission Map instead of Original datas +TP_LOCALLAB_ENARETIMASKTMAP_TOOLTIP;If enabled the Mask uses Restored Data after Transmission Map instead of Original data. TP_LOCALLAB_ENH;Enhanced TP_LOCALLAB_ENHDEN;Enhanced + chroma denoise TP_LOCALLAB_EPSBL;Detail @@ -2476,18 +2653,19 @@ TP_LOCALLAB_EV_VIS_ALL;Show all TP_LOCALLAB_EXCLUF;Excluding TP_LOCALLAB_EXCLUF_TOOLTIP;‘Excluding’ mode prevents adjacent spots from influencing certain parts of the image. Adjusting ‘Scope’ will extend the range of colors.\n You can also add tools to an Excluding spot and use them in the same way as for a normal spot. TP_LOCALLAB_EXCLUTYPE;Spot method -TP_LOCALLAB_EXCLUTYPE_TOOLTIP;Normal spot uses recursive data.\n\nExcluding spot reinitializes all local adjustment data.\nCan be used to totally or partially cancel a previous action or to carry out operations in Inverse mode +TP_LOCALLAB_EXCLUTYPE_TOOLTIP;Normal spot uses recursive data.\n\nExcluding spot reinitializes all local adjustment data.\nCan be used to totally or partially cancel a previous action or to carry out operations in Inverse mode.\n\n‘Full image’ allows you to use the local adjustment tools on the whole image.\n The RT Spot delimiters are set beyond the image preview boundaries.\n The transition is set to 100.\nNote, you may have to reposition the RT Spot slightly and adjust the Spot size to get the desired effect.\nPlease note: using Denoise or Wavelet or FFTW in full-image mode uses large amounts of memory and may cause the application to crash on lower capacity systems. TP_LOCALLAB_EXECLU;Excluding spot TP_LOCALLAB_EXNORM;Normal spot +TP_LOCALLAB_EXFULL;Full image TP_LOCALLAB_EXPCBDL_TOOLTIP;Can be used to remove marks on the sensor or lens by reducing the contrast on the appropriate detail level(s). TP_LOCALLAB_EXPCHROMA;Chroma compensation TP_LOCALLAB_EXPCHROMA_TOOLTIP;Use in association with ‘Exposure compensation f’ and ‘Contrast Attenuator f’ to avoid desaturating colors. TP_LOCALLAB_EXPCOLOR_TOOLTIP;Adjust color, lightness, contrast and correct small defects such as red-eye, sensor dust etc. TP_LOCALLAB_EXPCOMP;Exposure compensation ƒ TP_LOCALLAB_EXPCOMPINV;Exposure compensation -TP_LOCALLAB_EXPCOMP_TOOLTIP;For portraits or images with a low color gradient. You can change "Shape detection" in "Settings":\n\nIncrease 'ΔE scope threshold'\nReduce 'ΔE decay'\nIncrease 'ab-L balance (ΔE)’ +TP_LOCALLAB_EXPCOMP_TOOLTIP;For portraits or images with a low color gradient. You can change ‘Shape detection’ in "Settings":\n\nIncrease 'ΔE scope threshold'\nReduce 'ΔE decay'\nIncrease 'ab-L balance (ΔE)’ TP_LOCALLAB_EXPCONTRASTPYR_TOOLTIP;See the documentation for Wavelet Levels.\nThere are some differences in the Locallab version: more tools and more possibilities for working on individual detail levels.\ne.g. Wavelet-level tone mapping. -TP_LOCALLAB_EXPCONTRAST_TOOLTIP;Avoid spots that are too small ( < 32x32 pixels).\nUse low ‘Transition value’ and high ‘Transition decay’ and ‘Scope’ to simulate small RT-spots and deal wth defects.\nUse 'Clarity & Sharp mask and Blend & Soften Images' if necessary by adjusting 'Soft radius' to reduce artifacts. +TP_LOCALLAB_EXPCONTRAST_TOOLTIP;Avoid spots that are too small ( < 32x32 pixels).\nUse low ‘Transition value’ and high ‘Transition decay’ and ‘Scope’ to simulate small RT-spots and deal with defects.\nUse 'Clarity and Sharp mask and Blend and Soften Images' if necessary by adjusting 'Soft radius' to reduce artifacts. TP_LOCALLAB_EXPCURV;Curves TP_LOCALLAB_EXPGRAD;Graduated Filter TP_LOCALLAB_EXPGRADCOL_TOOLTIP;A graduated filter is available in Color and Light (luminance, chrominance & hue gradients, and "Merge file") Exposure (luminance grad.), Exposure Mask (luminance grad.), Shadows/Highlights (luminance grad.), Vibrance (luminance, chrominance & hue gradients), Local contrast & wavelet pyramid (local contrast grad.).\nFeather is located in Settings. @@ -2495,16 +2673,16 @@ TP_LOCALLAB_EXPLAPBAL_TOOLTIP;Changes the transformed/original image blend TP_LOCALLAB_EXPLAPGAMM_TOOLTIP;Changes the behaviour for images with too much or too little contrast by adding a gamma curve before and after the Laplace transform TP_LOCALLAB_EXPLAPLIN_TOOLTIP;Changes the behaviour for underexposed images by adding a linear component prior to applying the Laplace transform TP_LOCALLAB_EXPLAP_TOOLTIP;Moving the slider to the right progressively reduces the contrast. -TP_LOCALLAB_EXPMERGEFILE_TOOLTIP;Allows you to use GIMP or Photoshop (c) layer blend modes i.e. Difference, Multiply, Soft Light, Overlay etc., with opacity control.\nOriginal Image : merge current RT-spot with Original.\nPrevious spot : merge current Rt-spot with previous - if there is only one spot previous = original.\nBackground : merge current RT-spot with a color and luminance background (fewer possibilties) +TP_LOCALLAB_EXPMERGEFILE_TOOLTIP;Allows you to use GIMP or Photoshop (c) layer blend modes i.e. Difference, Multiply, Soft Light, Overlay etc., with opacity control.\nOriginal Image : merge current RT-Spot with Original.\nPrevious spot : merge current Rt-Spot with previous - if there is only one spot, previous = original.\nBackground : merge current RT-Spot with a color and luminance background (fewer possibilties). TP_LOCALLAB_EXPMETHOD_TOOLTIP;Standard : use an algorithm similar as main Exposure but in L*a*b* and taking account of deltaE.\n\nContrast attenuator : use another algorithm also with deltaE and with Poisson equation to solve Laplacian in Fourier space.\nContrast attenuator, Dynamic range compression and Standard can be combined.\nFFTW Fourier Transform is optimized in size to reduce processing time.\nReduce artifacts and noise. -TP_LOCALLAB_EXPNOISEMETHOD_TOOLTIP;Applies a median filter before the Laplace transform to prevent artifacts (noise).\nYou can also use the "Denoise" tool. +TP_LOCALLAB_EXPNOISEMETHOD_TOOLTIP;Applies a median filter before the Laplace transform to prevent artifacts (noise).\nYou can also use the ‘Denoise’ tool. TP_LOCALLAB_EXPOSE;Dynamic Range & Exposure TP_LOCALLAB_EXPOSURE_TOOLTIP;Modify exposure in L*a*b space using Laplacian PDE algorithms to take into account dE and minimize artifacts. TP_LOCALLAB_EXPRETITOOLS;Advanced Retinex Tools -TP_LOCALLAB_EXPSHARP_TOOLTIP;RT-Spot minimum 39*39.\nUse low transition values and high ‘Transition decay’ and ‘Scope’ values to simulate smaller RT-spots. +TP_LOCALLAB_EXPSHARP_TOOLTIP;RT-Spot minimum 39*39.\nUse low transition values and high ‘Transition decay’ and ‘Scope’ values to simulate smaller RT-Spots. TP_LOCALLAB_EXPTOOL;Exposure Tools TP_LOCALLAB_EXPTRC;Tone Response Curve - TRC -TP_LOCALLAB_EXP_TOOLNAME;Dynamic Range & Exposure - 10 +TP_LOCALLAB_EXP_TOOLNAME;Dynamic Range & Exposure TP_LOCALLAB_FATAMOUNT;Amount TP_LOCALLAB_FATANCHOR;Anchor TP_LOCALLAB_FATANCHORA;Offset @@ -2515,19 +2693,19 @@ TP_LOCALLAB_FATLEVEL;Sigma TP_LOCALLAB_FATRES;Amount Residual Image TP_LOCALLAB_FATSHFRA;Dynamic Range Compression Mask ƒ TP_LOCALLAB_FEATH_TOOLTIP;Gradient width as a percentage of the Spot diagonal\nUsed by all graduated filters in all tools.\nNo action if a graduated filter hasn’t been activated. -TP_LOCALLAB_FEATVALUE;Feather gradient (Graduated Filters) +TP_LOCALLAB_FEATVALUE;Feather gradient (Grad. Filters) TP_LOCALLAB_FFTCOL_MASK;FFTW ƒ +TP_LOCALLAB_FFTMASK_TOOLTIP;Use a Fourier transform for better quality (increased processing time and memory requirements) TP_LOCALLAB_FFTW;ƒ - Use Fast Fourier Transform TP_LOCALLAB_FFTW2;ƒ - Use Fast Fourier Transform (TIF, JPG,..) -TP_LOCALLAB_FFTMASK_TOOLTIP;Use a Fourier transform for better quality (increased processing time and memory requirements) TP_LOCALLAB_FFTWBLUR;ƒ - Always Use Fast Fourier Transform -TP_LOCALLAB_FULLIMAGE;Calculate the dark-Ev & white-Ev values for the entire image -TP_LOCALLAB_FULLIMAGELOG_TOOLTIP;Calculates the Ev levels for the entire image. +TP_LOCALLAB_FULLIMAGE;Black-Ev and White-Ev for whole image +TP_LOCALLAB_FULLIMAGELOG_TOOLTIP;Calculates the Ev levels for the whole image. TP_LOCALLAB_GAM;Gamma TP_LOCALLAB_GAMFRA;Tone response curve (TRC) TP_LOCALLAB_GAMM;Gamma TP_LOCALLAB_GAMMASKCOL;Gamma -TP_LOCALLAB_GAMMASK_TOOLTIP;Gamma and Slope allow a soft and artifact-free transformation of the mask by progressively modifying “L” to avoid any discontinuities. +TP_LOCALLAB_GAMMASK_TOOLTIP;Adjusting Gamma and Slope can provide a soft and artifact-free transformation of the mask by progressively modifying ‘L’ to avoid any discontinuities. TP_LOCALLAB_GAMSH;Gamma TP_LOCALLAB_GRADANG;Gradient angle TP_LOCALLAB_GRADANG_TOOLTIP;Rotation angle in degrees : -180 0 +180 @@ -2536,19 +2714,20 @@ TP_LOCALLAB_GRADGEN_TOOLTIP;Adjusts luminance gradient strength TP_LOCALLAB_GRADLOGFRA;Graduated Filter Luminance TP_LOCALLAB_GRADSTR;Gradient strength TP_LOCALLAB_GRADSTRAB_TOOLTIP;Adjusts chroma gradient strength -TP_LOCALLAB_GRADSTRCHRO;Chrominance gradient strength +TP_LOCALLAB_GRADSTRCHRO;Chroma gradient strength TP_LOCALLAB_GRADSTRHUE;Hue gradient strength TP_LOCALLAB_GRADSTRHUE2;Hue gradient strength TP_LOCALLAB_GRADSTRHUE_TOOLTIP;Adjusts hue gradient strength -TP_LOCALLAB_GRADSTRLUM;Luminance gradient strength +TP_LOCALLAB_GRADSTRLUM;Luma gradient strength TP_LOCALLAB_GRADSTR_TOOLTIP;Filter strength in stops -TP_LOCALLAB_GRAIN_TOOLTIP;Adds film-like grain to the image TP_LOCALLAB_GRAINFRA;Film Grain 1:1 +TP_LOCALLAB_GRAINFRA2;Coarseness +TP_LOCALLAB_GRAIN_TOOLTIP;Adds film-like grain to the image TP_LOCALLAB_GRALWFRA;Graduated filter (local contrast) -TP_LOCALLAB_GRIDFRAME_TOOLTIP;You can use this tool as a brush. Use small spot and adapt transition and transition decay\nOnly mode NORMAL and eventually Hue, Saturation, Color, Luminosity are concerned by Merge background (ΔE) +TP_LOCALLAB_GRIDFRAME_TOOLTIP;You can use this tool as a brush. Use a small spot and adapt the ‘Transition value’ and ‘Transition decay’\nOnly 'Normal' mode and possibly Hue, Saturation, Color, Luminosity are concerned by Merge background (ΔE) +TP_LOCALLAB_GRIDMETH_TOOLTIP;Color toning: the luminance is taken into account when varying chroma. Equivalent to H=f(H) if the "white dot" on the grid remains at zero and you only vary the "black dot". Equivalent to "Color toning" if you vary the 2 dots.\n\nDirect: acts directly on the chroma TP_LOCALLAB_GRIDONE;Color Toning TP_LOCALLAB_GRIDTWO;Direct -TP_LOCALLAB_GRIDMETH_TOOLTIP;Color toning: the luminance is taken into account when varying chroma. Equivalent to H=f(H) if the "white dot" on the grid remains at zero and you only vary the "black dot". Equivalent to "Color toning" if you vary the 2 dots.\n\nDirect: acts directly on the chroma TP_LOCALLAB_GUIDBL;Soft radius TP_LOCALLAB_GUIDBL_TOOLTIP;Applies a guided filter with adjustable radius. Allows you to reduce artifacts or blur the image. TP_LOCALLAB_GUIDEPSBL_TOOLTIP;Changes the distribution function of the guided filter. Negative values simulate a Gaussian blur. @@ -2557,14 +2736,15 @@ TP_LOCALLAB_GUIDFILTER_TOOLTIP;Can reduce or increase artifacts. TP_LOCALLAB_GUIDSTRBL_TOOLTIP;Intensity of the guided filter TP_LOCALLAB_HHMASK_TOOLTIP;Fine hue adjustments for example for the skin. TP_LOCALLAB_HIGHMASKCOL;Highlights -TP_LOCALLAB_HLH;Curves H +TP_LOCALLAB_HLH;H TP_LOCALLAB_IND;Independent (mouse) TP_LOCALLAB_INDSL;Independent (mouse + sliders) -TP_LOCALLAB_INVERS;Inverse TP_LOCALLAB_INVBL;Inverse -TP_LOCALLAB_INVERS_TOOLTIP;Fewer possibilities if selected (Inverse).\n\nAlternative: use two spots\nFirst Spot:\n full image - delimiter outside preview\n RT-spot shape: rectangle. Transition 100\n\nSecond spot: Excluding spot -TP_LOCALLAB_INVBL_TOOLTIP;Alternative to ‘Inverse’ mode: use two spots\nFirst Spot:\n full image - delimiter outside preview\n RT-spot shape: rectangle. Transition 100\n\nSecond spot : Excluding spot -TP_LOCALLAB_ISOGR;Coarseness (ISO) +TP_LOCALLAB_INVBL_TOOLTIP;Alternative to ‘Inverse’ mode: use two spots\nFirst Spot:\n Full Image\n\nSecond spot : Excluding spot +TP_LOCALLAB_INVERS;Inverse +TP_LOCALLAB_INVERS_TOOLTIP;Fewer possibilities if selected (Inverse).\n\nAlternative: use two spots\nFirst Spot:\n Full Image\n \nSecond spot: Excluding spot +TP_LOCALLAB_INVMASK;Inverse algorithm +TP_LOCALLAB_ISOGR;Distribution (ISO) TP_LOCALLAB_LABBLURM;Blur Mask TP_LOCALLAB_LABEL;Local Adjustments TP_LOCALLAB_LABGRID;Color correction grid @@ -2575,13 +2755,14 @@ TP_LOCALLAB_LAPLACC;ΔØ Mask Laplacian solve PDE TP_LOCALLAB_LAPLACE;Laplacian threshold ΔE TP_LOCALLAB_LAPLACEXP;Laplacian threshold TP_LOCALLAB_LAPMASKCOL;Laplacian threshold -TP_LOCALLAB_LAPRAD_TOOLTIP;Avoid using “Smooth radius” and “Laplacian threshold” (advanced) together.\nSmooth radius uses a guided filter to decrease artifacts and smooth out the transition -TP_LOCALLAB_LAPRAD1_TOOLTIP;Avoid using “Smooth radius” and “Laplacian threshold” (advanced) together.\nTransforms the mask to eliminate values lower than the threshold.\nReduces artifacts and noise, and allows local contrast to be modified. -TP_LOCALLAB_LAP_MASK_TOOLTIP;Solve PDE for all Laplacian masks.\nIf enabled Laplacian threshold mask reduce artifacts and smooth result.\nIf disabled linear response. +TP_LOCALLAB_LAPRAD1_TOOLTIP;Increases the contrast of the mask by increasing the luminance values of the lighter areas. Can be used in conjunction with the L(L) and LC(H) curves. +TP_LOCALLAB_LAPRAD2_TOOLTIP;Smooth radius uses a guided filter to decrease artifacts and smooth out the transition +TP_LOCALLAB_LAPRAD_TOOLTIP;Smooth radius uses a guided filter to decrease artifacts and smooth out the transition +TP_LOCALLAB_LAP_MASK_TOOLTIP;Solves PDEs for all Laplacian masks.\nIf enabled the Laplacian threshold mask reduces artifacts and smooths the result.\nIf disabled the response is linear. TP_LOCALLAB_LC_FFTW_TOOLTIP;FFT improves quality and allows the use of large radii, but increases processing time (depends on the area to be processed). Preferable to use only for large radii. The size of the area can be reduced by a few pixels to optimize the FFTW. This can reduce the processing time by a factor of 1.5 to 10. -TP_LOCALLAB_LC_TOOLNAME;Local Contrast & Wavelets - 7 +TP_LOCALLAB_LC_TOOLNAME;Local Contrast & Wavelets TP_LOCALLAB_LEVELBLUR;Maximum blur levels -TP_LOCALLAB_LEVELWAV;Ψ Wavelet levels +TP_LOCALLAB_LEVELWAV;Wavelet levels TP_LOCALLAB_LEVELWAV_TOOLTIP;The Level is automatically adapted to the size of the spot and the preview.\nFrom level 9 size max 512 to level 1 size max = 4 TP_LOCALLAB_LEVFRA;Levels TP_LOCALLAB_LIGHTNESS;Lightness @@ -2589,50 +2770,123 @@ TP_LOCALLAB_LIGHTN_TOOLTIP;In inverse mode: selection = -100 forces luminance to TP_LOCALLAB_LIGHTRETI;Lightness TP_LOCALLAB_LINEAR;Linearity TP_LOCALLAB_LIST_NAME;Add tool to current spot... -TP_LOCALLAB_LIST_TOOLTIP;You can select 3 levels of complexity for each tool: Basic, Standard & Advanced.\nThe default setting for all tools is Basic but this can be changed in the Preferences window.\nYou can also change the level of complexity on a per-tool basis while you are editing -TP_LOCALLAB_LMASK_LEVEL_TOOLTIP;Give priority to action on midtones and high lights and by choosing the concerned wavelet levels -TP_LOCALLAB_LMASK_LL_TOOLTIP;Allows you to freely change the contrast of the mask. May create artifacts. +TP_LOCALLAB_LIST_TOOLTIP;You can select 3 levels of complexity for each tool: Basic, Standard and Advanced.\nThe default setting for all tools is Basic but this can be changed in the Preferences window.\nYou can also change the level of complexity on a per-tool basis while you are editing +TP_LOCALLAB_LMASK_LEVEL_TOOLTIP;Allows you to decrease or increase the effect on particular levels of detail in the mask by targeting certain luminance zones (in general the lightest). +TP_LOCALLAB_LMASK_LL_TOOLTIP;Allows you to freely change the contrast of the mask.\n Has a similar function to the Gamma and Slope sliders.\n It allows you to target certain parts of the image (usually the lightest parts of the mask by using the curve to exclude the darker parts). May create artifacts. TP_LOCALLAB_LOCCONT;Unsharp Mask TP_LOCALLAB_LOC_CONTRAST;Local Contrast & Wavelets -TP_LOCALLAB_LOC_CONTRASTPYR;Ψ Pyramid 1: -TP_LOCALLAB_LOC_CONTRASTPYR2;Ψ Pyramid 2: -TP_LOCALLAB_LOC_CONTRASTPYR2LAB; Contrast by level- Tone Mapping - Dir.Contrast -TP_LOCALLAB_LOC_CONTRASTPYRLAB; Graduated Filter - Edge Sharpness - Blur +TP_LOCALLAB_LOC_CONTRASTPYR;Pyramid 1: +TP_LOCALLAB_LOC_CONTRASTPYR2;Pyramid 2: +TP_LOCALLAB_LOC_CONTRASTPYR2LAB; Contrast by level/TM/Directional contrast +TP_LOCALLAB_LOC_CONTRASTPYRLAB; Graduated Filter/Edge Sharpness/Blur TP_LOCALLAB_LOC_RESIDPYR;Residual image (Main) TP_LOCALLAB_LOG;Log Encoding +TP_LOCALLAB_LOG1FRA;Image Adjustments +TP_LOCALLAB_LOG2FRA;Viewing Conditions TP_LOCALLAB_LOGAUTO;Automatic -TP_LOCALLAB_LOGAUTO_TOOLTIP;Pressing this button will calculate the dynamic range and Source Gray Point (if "Automatic Source Gray Point” enabled).\nPress the button again to adjust the automatically calculated values. +TP_LOCALLAB_LOGAUTOGRAY_TOOLTIP;Automatically calculates the 'Mean luminance' for the scene conditions when the ‘Automatic’ button in Relative Exposure Levels is pressed. +TP_LOCALLAB_LOGAUTO_TOOLTIP;Pressing this button will calculate the dynamic range and 'Mean luminance' for the scene conditions if the "Auto mean luminance (Yb%)” is checked).\nAlso calculates the absolute luminance at the time of shooting.\nPress the button again to adjust the automatically calculated values. TP_LOCALLAB_LOGBASE_TOOLTIP;Default = 2.\nValues less than 2 reduce the action of the algorithm making the shadows darker and the highlights brighter.\nWith values greater than 2, the shadows are grayer and the highlights become more washed out. -TP_LOCALLAB_LOGBLACKWHEV_TOOLTIP;Estimated values of Dynamic Range i.e. Black Ev and White Ev +TP_LOCALLAB_LOGBLACKWHEV_TOOLTIP;Estimated values of dynamic range i.e. Black Ev and White Ev +TP_LOCALLAB_LOGCATAD_TOOLTIP;The chromatic adaptation allows us to interpret a color according to its spatio-temporal environment.\nUseful when the white balance deviates significantly from the D50 reference.\nAdapts colors to the illuminant of the output device. +TP_LOCALLAB_LOGCOLORFL;Colorfulness (M) +TP_LOCALLAB_LOGCOLORF_TOOLTIP;Perceived amount of hue in relation to gray.\nIndicator that a stimulus appears more or less colored. +TP_LOCALLAB_LOGCONQL;Contrast (Q) +TP_LOCALLAB_LOGCONTL;Contrast (J) +TP_LOCALLAB_LOGCONTHRES;Contrast threshold (J & Q) +TP_LOCALLAB_LOGCONTL_TOOLTIP;Contrast (J) in CIECAM16 takes into account the increase in perceived coloration with luminance. +TP_LOCALLAB_LOGCONTQ_TOOLTIP;Contrast (Q) in CIECAM16 takes into account the increase in perceived coloration with brightness. +TP_LOCALLAB_LOGCONTTHRES_TOOLTIP;Adjusts the mid-tone contrast range (J & Q).\nPositive values progressively reduce the effect of the Contrast sliders (J & Q). Negative values progressively increase the effect of the Contrast sliders. +TP_LOCALLAB_LOGDETAIL_TOOLTIP;Acts mainly on high frequencies. TP_LOCALLAB_LOGENCOD_TOOLTIP;Tone Mapping with Logarithmic encoding (ACES).\nUseful for underexposed images or images with high dynamic range.\n\nTwo-step process : 1) Dynamic Range calculation 2) Manual adjustment -TP_LOCALLAB_LOGFRA;Source Gray Point -TP_LOCALLAB_LOGFRAME_TOOLTIP;Allows you to calculate and adjust the Ev levels and the Source Gray Point for the spot area. The resulting values will be used by all Lab operations and most RGB operations in the pipeline.\n Takes into account exposure compensation in the main-menu Exposure tab. +TP_LOCALLAB_LOGEXP;All tools +TP_LOCALLAB_LOGFRA;Scene Conditions +TP_LOCALLAB_LOGFRAME_TOOLTIP;Allows you to calculate and adjust the Ev levels and the 'Mean luminance Yb%' (source gray point) for the spot area. The resulting values will be used by all Lab operations and most RGB operations in the pipeline.\nTakes into account exposure compensation in the main-menu Exposure tab.\nAlso calculates the absolute luminance at the time of shooting. +TP_LOCALLAB_LOGIMAGE_TOOLTIP;Takes into account corresponding Ciecam variables (mainly Contrast 'J' and Saturation 's', and also Contrast (Q) , Brightness (Q), Lightness (J), Colorfulness (M) in Advanced mode). +TP_LOCALLAB_LOGLIGHTL;Lightness (J) +TP_LOCALLAB_LOGLIGHTL_TOOLTIP;Close to lightness (L*a*b*), takes into account the increase in perceived coloration. +TP_LOCALLAB_LOGLIGHTQ;Brightness (Q) +TP_LOCALLAB_LOGLIGHTQ_TOOLTIP;Perceived amount of light emanating from a stimulus.\nIndicator that a stimulus appears to be more or less bright, clear. TP_LOCALLAB_LOGLIN;Logarithm mode TP_LOCALLAB_LOGPFRA;Relative Exposure Levels +TP_LOCALLAB_LOGREPART;Strength +TP_LOCALLAB_LOGREPART_TOOLTIP;Allows you to adjust the relative strength of the log-encoded image with respect to the original image.\nDoes not affect the Ciecam component. +TP_LOCALLAB_LOGSATURL_TOOLTIP;Saturation (s) in CIECAM16 corresponds to the color of a stimulus in relation to its own brightness.\nActs mainly on medium and highlights tones +TP_LOCALLAB_LOGSCENE_TOOLTIP;Corresponds to the shooting conditions. TP_LOCALLAB_LOGSRCGREY_TOOLTIP;Estimated gray point value of the image. +TP_LOCALLAB_LOGSURSOUR_TOOLTIP;Changes tones and colors to take into account the Scene conditions.\n\nAverage: Average light environment (standard). The image will not change.\n\nDim: Dim environment. The image will become slightly brighter. TP_LOCALLAB_LOGTARGGREY_TOOLTIP;You can adjust this value to suit. -TP_LOCALLAB_LOG_TOOLNAME;Log Encoding - 0 -TP_LOCALLAB_LUM;Curves LL - CC +TP_LOCALLAB_LOGVIEWING_TOOLTIP;Corresponds to the medium on which the final image will be viewed (monitor, TV, projector, printer,..), as well as its environment. +TP_LOCALLAB_LOG_TOOLNAME;Log Encoding +TP_LOCALLAB_LUM;LL - CC TP_LOCALLAB_LUMADARKEST;Darkest -TP_LOCALLAB_LUMASK;Background color for luminance and color masks +TP_LOCALLAB_LUMASK;Background color/luma mask TP_LOCALLAB_LUMASK_TOOLTIP;Adjusts the shade of gray or color of the mask background in Show Mask (Mask and modifications) TP_LOCALLAB_LUMAWHITESEST;Lightest TP_LOCALLAB_LUMFRA;L*a*b* standard TP_LOCALLAB_LUMONLY;Luminance only -TP_LOCALLAB_MASKCOM;Common Color Mask -TP_LOCALLAB_MASKCOM_TOOLTIP;A tool in its own right.\nCan be used to adjust the image appearance (chrominance, luminance, contrast) and texture as a function of Scope. TP_LOCALLAB_MASFRAME;Mask and Merge -TP_LOCALLAB_MASFRAME_TOOLTIP;For all masks.\nTakes into account the deltaE image to avoid modifying the selection area when the following Mask Tools are used: Gamma , Slope , Chroma, Contrast curve , Local contrast (by wavelet level), Blur Mask and Structure Mask (if enabled ) .\nDisabled when Inverse mode is used -TP_LOCALLAB_MASK;Mask +TP_LOCALLAB_MASFRAME_TOOLTIP;For all masks.\nTakes into account the deltaE image to avoid modifying the selection area when the following Mask Tools are used: Gamma, Slope, Chroma, Contrast curve, Local contrast (by wavelet level), Blur Mask and Structure Mask (if enabled ).\nDisabled when Inverse mode is used. +TP_LOCALLAB_MASK;Curves TP_LOCALLAB_MASK2;Contrast curve -TP_LOCALLAB_MASKCOL;Mask Curves +TP_LOCALLAB_MASKCOL; +TP_LOCALLAB_MASKCOM;Common Color Mask +TP_LOCALLAB_MASKCOM_TOOLNAME;Common Color Mask +TP_LOCALLAB_MASKCOM_TOOLTIP;A tool in its own right.\nCan be used to adjust the image appearance (chrominance, luminance, contrast) and texture as a function of Scope. TP_LOCALLAB_MASKCURVE_TOOLTIP;The 3 curves are set to 1 (maximum) by default:\nC=f(C) the chroma varies according to the chrominance. You can decrease the chroma to improve the selection. By setting this curve close to zero (with a low value of C to activate the curve) you can desaturate the background in Inverse mode.\nL=f(L) the luminance varies according to the luminance, so you can decrease the brightness to improve the selection.\nL and C = f(H) luminance and chroma vary with hue, so you can decrease luminance and chroma to improve selection +TP_LOCALLAB_MASKDDECAY;Decay strength +TP_LOCALLAB_MASKDECAY_TOOLTIP;Manages the rate of decay for the gray levels in the mask.\n Decay = 1 linear, Decay > 1 sharper parabolic transitions, Decay < 1 more gradual transitions TP_LOCALLAB_MASKH;Hue curve +TP_LOCALLAB_MASKLC_TOOLTIP;This allows you to target the denoise based on the image luminance information contained in the L(L) or LC(H) mask (Mask and Modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n 'Dark area luminance threshold'. If 'Reinforce denoise in dark and light areas' > 1 the denoise is progressively increased from 0% at the threshold setting to 100% at the maximum black value (determined by mask).\n 'Light area luminance threshold'. The denoise is progressively decreased from 100% at the threshold setting to 0% at the maximum white value (determined by mask).\n In the area between the two thresholds, the denoise settings are not affected by the mask. +TP_LOCALLAB_MASKDE_TOOLTIP;Used to target the denoise as a function of the image luminance information contained in the L(L) or LC(H) masks (Mask and modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n If the mask is below the ‘dark’ threshold, then the Denoise will be applied progressively.\n if the mask is above the ‘light’ threshold, then the Denoise will be applied progressively.\n Between the two, the image settings without the Denoise will be maintained, unless you adjust the sliders "Gray area luminance denoise" or "Gray area chrominance denoise". +TP_LOCALLAB_MASKGF_TOOLTIP;Used to target the Guided Filter as a function of the image luminance information contained in the L(L) or LC(H) masks (Mask and modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n If the mask is below the ‘dark’ threshold, then the GF will be applied progressively.\n if the mask is above the ‘light’ threshold, then the GF will be applied progressively.\n Between the two, the image settings without the GF will be maintained. +TP_LOCALLAB_MASKRECOL_TOOLTIP;Used to modulate the effect of the Color and Light settings based on the image luminance information contained in the L(L) or LC(H) masks (Mask and modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n The ‘dark’ and ‘light’ areas below the dark threshold and above the light threshold will be restored progressively to their original values prior to being modified by the Color and Light settings \n In between these two areas, the full value of the Color and Light settings will be applied +TP_LOCALLAB_MASKREEXP_TOOLTIP;Used to modulate the effect of the 'Dynamic range and Exposure' settings based on the image luminance information contained in the L(L) or LC(H) masks (Mask and modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n The ‘dark’ and ‘light’ areas below the dark threshold and above the light threshold will be restored progressively to their original values prior to being modified by the 'Dynamic range and Exposure' settings \n In between these two areas, the full value of the 'Dynamic range and Exposure' settings will be applied +TP_LOCALLAB_MASKRESH_TOOLTIP;Used to modulate the effect of the Shadows Highlights settings based on the image luminance information contained in the L(L) or LC(H) masks (Mask and modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n The ‘dark’ and ‘light’ areas below the dark threshold and above the light threshold will be restored progressively to their original values prior to being modified by the Shadows Highlights settings \n In between these two areas, the full value of the Shadows Highlights settings will be applied +TP_LOCALLAB_MASKRESCB_TOOLTIP;Used to modulate the effect of the CBDL (Luminance only) settings based on the image luminance information contained in the L(L) or LC(H) masks (Mask and modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n The ‘dark’ and ‘light’ areas below the dark threshold and above the light threshold will be restored progressively to their original values prior to being modified by the CBDL settings \n In between these two areas, the full value of the CBDL settings will be applied +TP_LOCALLAB_MASKRESRETI_TOOLTIP;Used to modulate the effect of the Retinex (Luminance only) settings based on the image luminance information contained in the L(L) or LC(H) masks (Mask and modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n The ‘dark’ and ‘light’ areas below the dark threshold and above the light threshold will be restored progressively to their original values prior to being modified by the Retinex settings \n In between these two areas, the full value of the Retinex settings will be applied +TP_LOCALLAB_MASKRESTM_TOOLTIP;Used to modulate the effect of the Tone Mapping settings based on the image luminance information contained in the L(L) or LC(H) masks (Mask and modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n The ‘dark’ and ‘light’ areas below the dark threshold and above the light threshold will be restored progressively to their original values prior to being modified by the Tone Mapping settings \n In between these two areas, the full value of the Tone Mapping settings will be applied +TP_LOCALLAB_MASKRESVIB_TOOLTIP;Used to modulate the effect of the Vibrance and Warm Cool settings based on the image luminance information contained in the L(L) or LC(H) masks (Mask and modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n The ‘dark’ and ‘light’ areas below the dark threshold and above the light threshold will be restored progressively to their original values prior to being modified by the Vibrance and Warm Cool settings \n In between these two areas, the full value of the Vibrance and Warm Cool settings will be applied +TP_LOCALLAB_MASKRESWAV_TOOLTIP;Used to modulate the effect of the Local contrast and Wavelet settings based on the image luminance information contained in the L(L) or LC(H) masks (Mask and modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n The ‘dark’ and ‘light’ areas below the dark threshold and above the light threshold will be restored progressively to their original values prior to being modified by the Local contrast and Wavelet settings \n In between these two areas, the full value of the Local contrast and Wavelet settings will be applied +TP_LOCALLAB_MASKRELOG_TOOLTIP;Used to modulate the effect of the Log encoding settings based on the image luminance information contained in the L(L) or LC(H) masks (Mask and modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n The ‘dark’ and ‘light’ areas below the dark threshold and above the light threshold will be restored progressively to their original values prior to being modified by the Log encoding settings - can be used to restore highlights reconstructed by Color propagation \n In between these two areas, the full value of the Log encoding settings will be applied +TP_LOCALLAB_MASKDEINV_TOOLTIP;Reverses the way the algorithm interprets the mask.\nIf checked black and very light areas will be decreased. +TP_LOCALLAB_MASKHIGTHRESC_TOOLTIP;Lighter-tone limit above which the parameters will be restored progressively to their original values prior to being modified by the Color and Light settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Structure mask’, 'Blur mask', ‘Smooth radius’, Gamma and Slope, ‘Contrast curve’, ‘Local contrast’ (wavelets).\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Make sure you set ‘Background color mask’ = 0 in Settings. +TP_LOCALLAB_MASKHIGTHRESS_TOOLTIP;Lighter-tone limit above which the parameters will be restored progressively to their original values prior to being modified by the Shadows Highlights settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Smooth radius’, Gamma and Slope, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Make sure you set ‘Background color mask’ = 0 in Settings. +TP_LOCALLAB_MASKHIGTHRESCB_TOOLTIP;Lighter-tone limit above which CBDL (Luminance only) parameters will be restored progressively to their original values prior to being modified by the CBDL settings .\n You can use certain tools in ‘Mask and modifications’ to change the gray levels:‘Smooth radius’, Gamma and Slope, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Make sure you set ‘Background color mask’ = 0 in Settings. +TP_LOCALLAB_MASKHIGTHRESRETI_TOOLTIP;Lighter-tone limit above which Retinex (Luminance only) parameters will be restored progressively to their original values prior to being modified by the Retinex settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Smooth radius’, Gamma and Slope, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Make sure you set ‘Background color mask’ = 0 in Settings. +TP_LOCALLAB_MASKHIGTHRESTM_TOOLTIP;Lighter-tone limit above which the parameters will be restored progressively to their original values prior to being modified by the Tone Mapping settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Smooth radius’, Gamma and Slope, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Make sure you set ‘Background color mask’ = 0 in Settings. +TP_LOCALLAB_MASKHIGTHRESVIB_TOOLTIP;Lighter-tone limit above which the parameters will be restored progressively to their original values prior to being modified by the Vibrance and Warm Cool settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels:‘Smooth radius’, Gamma and Slope, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Make sure you set ‘Background color mask’ = 0 in Settings. +TP_LOCALLAB_MASKHIGTHRESWAV_TOOLTIP;Lighter-tone limit above which the parameters will be restored progressively to their original values prior to being modified by the Local contrast and Wavelet settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Smooth radius’, Gamma and Slope, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Make sure you set ‘Background color mask’ = 0 in Settings. +TP_LOCALLAB_MASKHIGTHRESE_TOOLTIP;Lighter-tone limit above which the parameters will be restored progressively to their original values prior to being modified by the 'Dynamic range and Exposure' settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Smooth radius’, Gamma and Slope, ‘Contrast curve’.\n Use a ‘lockable colorpicker’ on the mask to see which areas will be affected. Make sure you set ‘Background color mask’ = 0 in Settings. +TP_LOCALLAB_MASKHIGTHRESL_TOOLTIP;Lighter-tone limit above which the parameters will be restored progressively to their original values prior to being modified by the Log encoding settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels:‘Smooth radius’, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Make sure you set ‘Background color mask’ = 0 in Settings. +TP_LOCALLAB_MASKHIGTHRESD_TOOLTIP; The denoise is progressively decreased from 100% at the threshold setting to 0% at the maximum white value (as determined by the mask).\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Structure mask’, ‘Smooth radius’, Gamma and Slope, ‘Contrast curve’, ‘Local contrast’ (wavelets).\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Make sure you set ‘Background color mask'=0 in Settings. +TP_LOCALLAB_MASKHIGTHRES_TOOLTIP; The Guided Filter is progressively decreased from 100% at the threshold setting to 0% at the maximum white value (as determined by the mask).\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘structure mask’, ‘Smooth radius’, ‘Gamma and slope’, ‘Contrast curve’, ‘Local contrast wavelet’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Be carefull in 'settings' to Background color mask = 0 +TP_LOCALLAB_MASKLCTHR;Light area luminance threshold +TP_LOCALLAB_MASKLCTHR2;Light area luma threshold +TP_LOCALLAB_MASKLCTHRLOW;Dark area luminance threshold +TP_LOCALLAB_MASKLCTHRLOW2;Dark area luma threshold +TP_LOCALLAB_MASKLNOISELOW;Reinforce dark/light areas +TP_LOCALLAB_MASKLOWTHRES_TOOLTIP;The Guided Filter is progressively increased from 0% at the threshold setting to 100% at the maximum black value (as determined by the mask).\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Structure mask’, ‘Smooth radius’, Gamma and Slope, ‘Contrast curve’, ‘Local contrast’ (wavelets).\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Make sure you set ‘Background color mask’ = 0 in Settings. +TP_LOCALLAB_MASKLOWTHRESD_TOOLTIP;The denoise is progressively increased from 0% at the threshold setting to 100% at the maximum black value (as determined by the mask).\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Structure mask’, ‘Smooth radius’, Gamma and Slope, ‘Contrast curve’, ‘Local contrast’ (wavelets).\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Make sure you set ‘Background color mask’ = 0 in Settings. +TP_LOCALLAB_MASKLOWTHRESC_TOOLTIP;Dark-tone limit below which the parameters will be restored progressively to their original values prior to being modified by the Color and Light settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Structure mask’, 'blur mask', ‘Smooth radius’, Gamma and Slope, ‘Contrast curve’, ‘Local contrast’ (wavelets).\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Make sure you set ‘Background color mask’ = 0 in Settings. +TP_LOCALLAB_MASKLOWTHRESL_TOOLTIP;Dark-tone limit below which the parameters will be restored progressively to their original values prior to being modified by the Log encoding settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels:‘Smooth radius’, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Make sure you set ‘Background color mask’ = 0 in Settings. +TP_LOCALLAB_MASKLOWTHRESE_TOOLTIP;Dark-tone limit below which the parameters will be restored progressively to their original values prior to being modified by the 'Dynamic range and Exposure' settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Smooth radius’, Gamma and Slope, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Make sure you set ‘Background color mask’ = 0 in Settings. +TP_LOCALLAB_MASKLOWTHRESS_TOOLTIP;Dark-tone limit below which the parameters will be restored progressively to their original values prior to being modified by the Shadows Highlights settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Smooth radius’, Gamma and Slope, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Make sure you set ‘Background color mask’ = 0 in Settings. +TP_LOCALLAB_MASKLOWTHRESCB_TOOLTIP;Dark-tone limit below which the CBDL parameters (Luminance only) will be restored progressively to their original values prior to being modified by the CBDL settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Smooth radius’, Gamma and Slope, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Make sure you set ‘Background color mask’ = 0 in Settings. +TP_LOCALLAB_MASKLOWTHRESRETI_TOOLTIP;Dark-tone limit below which the Retinex (Luminance only) parameters will be restored progressively to their original values prior to being modified by the Retinex settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Smooth radius’, Gamma and Slope, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Make sure you set ‘Background color mask’ = 0 in Settings. +TP_LOCALLAB_MASKLOWTHRESTM_TOOLTIP;Dark-tone limit below which the parameters will be restored progressively to their original values prior to being modified by the Tone Mapping settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Smooth radius’, Gamma and Slope, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Make sure you set ‘Background color mask’ = 0 in Settings. +TP_LOCALLAB_MASKLOWTHRESVIB_TOOLTIP;Dark-tone limit below which the parameters will be restored progressively to their original values prior to being modified by the Vibrance and Warm Cool settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Smooth radius’, Gamma and Slope, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Make sure you set ‘Background color mask’ = 0 in Settings. +TP_LOCALLAB_MASKLOWTHRESWAV_TOOLTIP;Dark-tone limit below which the parameters will be restored progressively to their original values prior to being modified by the Local contrast and Wavelet settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Smooth radius’, Gamma and Slope, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Make sure you set ‘Background color mask’ = 0 in Settings. +TP_LOCALLAB_MASKLCTHRMID;Gray area luma denoise +TP_LOCALLAB_MASKLCTHRMIDCH;Gray area chroma denoise +TP_LOCALLAB_MASKUSABLE;Mask enabled (Mask & modifications) +TP_LOCALLAB_MASKUNUSABLE;Mask disabled (Mask & modifications) +TP_LOCALLAB_MASKRECOTHRES;Recovery threshold TP_LOCALLAB_MASK_TOOLTIP;You can enable multiple masks for a tool by activating another tool and using only the mask (set the tool sliders to 0 ).\n\nYou can also duplicate the RT-spot and place it close to the first spot. The small variations in the spot references allows you to make fine adjustments. TP_LOCALLAB_MED;Medium TP_LOCALLAB_MEDIAN;Median Low -TP_LOCALLAB_MEDIAN_TOOLTIP;You can choose a median value in the range 3x3 to 9x9 pixels. Higher values increase noise reduction and blur. TP_LOCALLAB_MEDIANITER_TOOLTIP;The number of successive iterations carried out by the median filter. +TP_LOCALLAB_MEDIAN_TOOLTIP;You can choose a median value in the range 3x3 to 9x9 pixels. Higher values increase noise reduction and blur. TP_LOCALLAB_MEDNONE;None TP_LOCALLAB_MERCOL;Color TP_LOCALLAB_MERDCOL;Merge background (ΔE) @@ -2640,19 +2894,19 @@ TP_LOCALLAB_MERELE;Lighten only TP_LOCALLAB_MERFIV;Addition TP_LOCALLAB_MERFOR;Color Dodge TP_LOCALLAB_MERFOU;Multiply -TP_LOCALLAB_MERGE1COLFRA;Merge with Original or Previous or Background -TP_LOCALLAB_MERGECOLFRA;Mask: LCH & Structure -TP_LOCALLAB_MERGECOLFRMASK_TOOLTIP;Allows you to create masks based on the 3 LCH curves and/or a structure-detection algorithm -TP_LOCALLAB_MERGEFIV;Previous Spot(Mask 7) + Mask LCH +TP_LOCALLAB_MERGE1COLFRA;Merge with Original/Previous/Background +TP_LOCALLAB_MERGECOLFRA;Mask: LCh & Structure +TP_LOCALLAB_MERGECOLFRMASK_TOOLTIP;Allows you to create masks based on the 3 LCh curves and/or a structure-detection algorithm +TP_LOCALLAB_MERGEFIV;Previous Spot(Mask 7) + Mask LCh TP_LOCALLAB_MERGEFOU;Previous Spot(Mask 7) TP_LOCALLAB_MERGEMER_TOOLTIP;Takes ΔE into account when merging files (equivalent of scope in this case) TP_LOCALLAB_MERGENONE;None TP_LOCALLAB_MERGEONE;Short Curves 'L' Mask TP_LOCALLAB_MERGEOPA_TOOLTIP;Opacity = % of current spot to be merged with original or previous Spot.\nContrast threshold : adjusts result as a function of contrast in original image. -TP_LOCALLAB_MERGETHR;Original(Mask 7) + Mask LCH -TP_LOCALLAB_MERGETWO;Original(Mask 7) +TP_LOCALLAB_MERGETHR;Original + Mask LCh +TP_LOCALLAB_MERGETWO;Original TP_LOCALLAB_MERGETYPE;Merge image and mask -TP_LOCALLAB_MERGETYPE_TOOLTIP;None, use all mask in LCH mode.\nShort curves 'L' mask, use a short circuit for mask 2, 3, 4, 6, 7.\nOriginal mask 8, blend current image with original +TP_LOCALLAB_MERGETYPE_TOOLTIP;None, use all mask in LCh mode.\nShort curves 'L' mask, use a short circuit for mask 2, 3, 4, 6, 7.\nOriginal mask 8, blend current image with original TP_LOCALLAB_MERHEI;Overlay TP_LOCALLAB_MERHUE;Hue TP_LOCALLAB_MERLUCOL;Luminance @@ -2671,7 +2925,7 @@ TP_LOCALLAB_MERTHR;Difference TP_LOCALLAB_MERTWE;Exclusion TP_LOCALLAB_MERTWO;Subtract TP_LOCALLAB_METHOD_TOOLTIP;'Enhanced + chroma denoise' significantly increases processing times.\nBut reduce artifacts. -TP_LOCALLAB_MLABEL;Restored data Min=%1 Max=%2 (Clip - Offset) +TP_LOCALLAB_MLABEL;Restored data Min=%1 Max=%2 TP_LOCALLAB_MLABEL_TOOLTIP;The values should be close to Min=0 Max=32768 (log mode) but other values are possible.You can adjust ‘Clip restored data (gain)’ and ‘Offset’ to normalize.\nRecovers image data without blending. TP_LOCALLAB_MODE_EXPERT;Advanced TP_LOCALLAB_MODE_NORMAL;Standard @@ -2683,19 +2937,30 @@ TP_LOCALLAB_MRTHR;Original Image TP_LOCALLAB_MRTWO;Short Curves 'L' Mask TP_LOCALLAB_MULTIPL_TOOLTIP;Wide-range tone adjustment: -18EV to +4EV. The first slider acts on very dark tones between -18EV and -6EV. The last slider acts on light tones up to 4EV TP_LOCALLAB_NEIGH;Radius -TP_LOCALLAB_NOISE_TOOLTIP;Adds luminance noise +TP_LOCALLAB_NLDENOISE_TOOLTIP;“Detail recovery” acts on a Laplacian transform to target uniform areas rather than areas with detail. +TP_LOCALLAB_NLDENOISENLPAT_TOOLTIP;Use this slider to adapt the amount of denoise to the size of the objects to be processed. +TP_LOCALLAB_NLDENOISENLRAD_TOOLTIP;Higher values increase denoise at the expense of processing time. +TP_LOCALLAB_NLDENOISENLGAM_TOOLTIP;Lower values preserve details and texture, higher values increase denoise. +TP_LOCALLAB_NLFRA;Non-local Means - Luminance +TP_LOCALLAB_NLFRAME_TOOLTIP;Non-local means denoising takes a mean of all pixels in the image, weighted by how similar they are to the target pixel.\nReduces loss of detail compared with local mean algorithms.\nOnly luminance noise is taken into account. Chrominance noise is best processed using wavelets and Fourier transforms (DCT).\nCan be used in conjunction with 'Luminance denoise by level' or on its own. +TP_LOCALLAB_NLLUM;Strength +TP_LOCALLAB_NLDET;Detail recovery +TP_LOCALLAB_NLGAM;Gamma +TP_LOCALLAB_NLPAT;Maximum patch size +TP_LOCALLAB_NLRAD;Maximum radius size TP_LOCALLAB_NOISECHROCOARSE;Coarse chroma (Wav) TP_LOCALLAB_NOISECHROC_TOOLTIP;If superior to zero, high quality algorithm is enabled.\nCoarse is for slider >=0.02 -TP_LOCALLAB_NOISECHRODETAIL;Chroma detail recovery (DCT ƒ) +TP_LOCALLAB_NOISECHRODETAIL;Chroma detail recovery TP_LOCALLAB_NOISECHROFINE;Fine chroma (Wav) TP_LOCALLAB_NOISEDETAIL_TOOLTIP;Disabled if slider = 100 TP_LOCALLAB_NOISELEQUAL;Equalizer white-black TP_LOCALLAB_NOISELUMCOARSE;Luminance coarse (Wav) -TP_LOCALLAB_NOISELUMDETAIL;Luminance detail recovery (DCT ƒ) +TP_LOCALLAB_NOISELUMDETAIL;Luma detail recovery TP_LOCALLAB_NOISELUMFINE;Luminance fine 1 (Wav) TP_LOCALLAB_NOISELUMFINETWO;Luminance fine 2 (Wav) TP_LOCALLAB_NOISELUMFINEZERO;Luminance fine 0 (Wav) TP_LOCALLAB_NOISEMETH;Denoise +TP_LOCALLAB_NOISE_TOOLTIP;Adds luminance noise TP_LOCALLAB_NONENOISE;None TP_LOCALLAB_NUL_TOOLTIP;. TP_LOCALLAB_OFFS;Offset @@ -2708,12 +2973,16 @@ TP_LOCALLAB_PASTELS2;Vibrance TP_LOCALLAB_PDE;Contrast Attenuator - Dynamic Range compression TP_LOCALLAB_PDEFRA;Contrast Attenuator ƒ TP_LOCALLAB_PDEFRAME_TOOLTIP;PDE IPOL algorithm adapted for Rawtherapee : gives different results and requires different settings compared to main-menu ‘Exposure’.\nMay be useful for under-exposed or high dynamic range images. -TP_LOCALLAB_PREVIEW;Preview ΔE TP_LOCALLAB_PREVHIDE;Hide additional settings +TP_LOCALLAB_PREVIEW;Preview ΔE TP_LOCALLAB_PREVSHOW;Show additional settings TP_LOCALLAB_PROXI;ΔE decay TP_LOCALLAB_QUALCURV_METHOD;Curve type TP_LOCALLAB_QUAL_METHOD;Global quality +TP_LOCALLAB_QUACONSER;Conservative +TP_LOCALLAB_QUAAGRES;Aggressive +TP_LOCALLAB_QUANONEWAV;Non-local means only +TP_LOCALLAB_QUANONEALL;Off TP_LOCALLAB_RADIUS;Radius TP_LOCALLAB_RADIUS_TOOLTIP;Uses a Fast Fourier Transform for radius > 30 TP_LOCALLAB_RADMASKCOL;Smooth radius @@ -2744,13 +3013,14 @@ TP_LOCALLAB_RETI_LIMDOFFS_TOOLTIP;Adjusts the internal parameters to optimize th TP_LOCALLAB_RETI_LOGLIN_TOOLTIP;Logarithm mode introduces more contrast but will also generate more halos. TP_LOCALLAB_RETI_NEIGH_VART_TOOLTIP;The radius and variance sliders allow you adjust haze and target either the foreground or the background. TP_LOCALLAB_RETI_SCALE_TOOLTIP;If Scale=1, Retinex behaves like local contrast with additional possibilities.\nIncreasing the value of Scale increases the intensity of the recursive action at the expense of processing time. -TP_LOCALLAB_RET_TOOLNAME;Dehaze & Retinex - 9 +TP_LOCALLAB_RET_TOOLNAME;Dehaze & Retinex TP_LOCALLAB_REWEI;Reweighting iterates TP_LOCALLAB_RGB;RGB Tone Curve TP_LOCALLAB_RGBCURVE_TOOLTIP;In RGB mode you have 4 choices : Standard, Weighted standard, Luminance & Film-like. TP_LOCALLAB_ROW_NVIS;Not visible TP_LOCALLAB_ROW_VIS;Visible TP_LOCALLAB_SATUR;Saturation +TP_LOCALLAB_SATURV;Saturation (s) TP_LOCALLAB_SAVREST;Save - Restore Current Image TP_LOCALLAB_SCALEGR;Scale TP_LOCALLAB_SCALERETI;Scale @@ -2760,18 +3030,18 @@ TP_LOCALLAB_SCOPEMASK_TOOLTIP;Enabled if DeltaE Image Mask is enabled.\nLow valu TP_LOCALLAB_SENSI;Scope TP_LOCALLAB_SENSIEXCLU;Scope TP_LOCALLAB_SENSIEXCLU_TOOLTIP;Adjust the colors to be excluded +TP_LOCALLAB_SENSIMASK_TOOLTIP;Scope adjustment specific to common mask tool.\nActs on the difference between the original image and the mask.\nUses the luma, chroma and hue references from the center of the RT-spot\n\nYou can also adjust the deltaE of the mask itself by using 'Scope (deltaE image mask)' in 'Settings' > ‘Mask and Merge’ TP_LOCALLAB_SENSI_TOOLTIP;Adjusts the scope of the action:\nSmall values limit the action to colors similar to those in the center of the spot.\nHigh values let the tool act on a wider range of colors -TP_LOCALLAB_SENSIMASK_TOOLTIP;Scope adjustment specific to common mask tool.\nActs on the difference between the original image and the mask.\nUses the luma, chroma & hue references from the center of the RT-spot\n\nYou can also adjust the deltaE of the mask itself by using 'Scope (deltaE image mask)' in 'Settings' > ‘Mask & Merge’ TP_LOCALLAB_SETTINGS;Settings TP_LOCALLAB_SH1;Shadows Highlights TP_LOCALLAB_SH2;Equalizer TP_LOCALLAB_SHADEX;Shadows -TP_LOCALLAB_SHADEXCOMP;Shadow compression & tonal width -TP_LOCALLAB_SHADHIGH;Shadows/Highlights & Tone equalizer -TP_LOCALLAB_SHADOWHIGHLIGHT_TOOLTIP;Adjust shadows & highlights either with shadows & highlights sliders or with a tone equalizer.\nCan be used instead of, or in conjunction with the Exposure module.\nCan also be used as a graduated filter. -TP_LOCALLAB_SHAMASKCOL;Shadows -TP_LOCALLAB_SHADMASK_TOOLTIP;Lifts the shadows of the mask in the same way as the shadows/highlights algorithm +TP_LOCALLAB_SHADEXCOMP;Shadow compression +TP_LOCALLAB_SHADHIGH;Shadows/Highlights & Tone Equalizer TP_LOCALLAB_SHADHMASK_TOOLTIP;Lowers the highlights of the mask in the same way as the shadows/highlights algorithm +TP_LOCALLAB_SHADMASK_TOOLTIP;Lifts the shadows of the mask in the same way as the shadows/highlights algorithm +TP_LOCALLAB_SHADOWHIGHLIGHT_TOOLTIP;Adjust shadows and highlights either with shadows & highlights sliders or with a tone equalizer.\nCan be used instead of, or in conjunction with the Exposure module.\nCan also be used as a graduated filter. +TP_LOCALLAB_SHAMASKCOL;Shadows TP_LOCALLAB_SHAPETYPE;RT-spot shape TP_LOCALLAB_SHAPE_TOOLTIP;”Ellipse” is the normal mode.\n “Rectangle” can be used in certain cases, for example to work in full-image mode by placing the delimiters outside the preview area. In this case, set transition = 100.\n\nFuture developments will include polygon shapes and Bezier curves. TP_LOCALLAB_SHARAMOUNT;Amount @@ -2780,7 +3050,7 @@ TP_LOCALLAB_SHARDAMPING;Damping TP_LOCALLAB_SHARFRAME;Modifications TP_LOCALLAB_SHARITER;Iterations TP_LOCALLAB_SHARP;Sharpening -TP_LOCALLAB_SHARP_TOOLNAME;Sharpening - 8 +TP_LOCALLAB_SHARP_TOOLNAME;Sharpening TP_LOCALLAB_SHARRADIUS;Radius TP_LOCALLAB_SHORTC;Short Curves 'L' Mask TP_LOCALLAB_SHORTCMASK_TOOLTIP;Short circuit the 2 curves L(L) and L(H).\nAllows you to mix the current image with the original image modified by the mask job.\nUsable with masks 2, 3, 4, 6, 7 @@ -2798,9 +3068,11 @@ TP_LOCALLAB_SHOWMASKSOFT_TOOLTIP;Allows you to visualize the different stages of TP_LOCALLAB_SHOWMASKTYP1;Blur & Noise TP_LOCALLAB_SHOWMASKTYP2;Denoise TP_LOCALLAB_SHOWMASKTYP3;Blur & Noise + Denoise -TP_LOCALLAB_SHOWMASKTYP_TOOLTIP;Mask and modifications can be chosen.\nBlur and noise : in this case it is not used for 'denoise'.\nDenoise : in this case it is not used for 'blur and noise'.\n\nBlur and noise + denoise : mask is shared, be carefull to 'show modifications' and 'scope' +//TP_LOCALLAB_SHOWMASKTYP_TOOLTIP;Mask and modifications can be chosen.\nBlur and noise : in this case it is not used for 'denoise'.\nDenoise : in this case it is not used for 'blur and noise'.\n\nBlur and noise + denoise : mask is shared, be carefull to 'show modifications' and 'scope' +TP_LOCALLAB_SHOWMASKTYP_TOOLTIP;Can be used with ‘Mask and modifications’.\nIf ‘Blur and noise’ is selected, the mask cannot be used for Denoise.\nIf Denoise is selected, the mask cannot be used for ‘Blur and noise’.\nIf ‘Blur and noise + Denoise’ is selected, the mask is shared. Note that in this case, the Scope sliders for both ‘Blur and noise’ and Denoise will be active so it is advisable to use the option ‘Show modifications with mask’ when making any adjustments. TP_LOCALLAB_SHOWMNONE;Show modified image TP_LOCALLAB_SHOWMODIF;Show modified areas without mask +TP_LOCALLAB_SHOWMODIF2;Show modified areas TP_LOCALLAB_SHOWMODIFMASK;Show modified areas with mask TP_LOCALLAB_SHOWNORMAL;No luminance normalization TP_LOCALLAB_SHOWPLUS;Mask and modifications (Blur & Denoise) @@ -2808,17 +3080,17 @@ TP_LOCALLAB_SHOWPOISSON;Poisson (pde ƒ) TP_LOCALLAB_SHOWR;Mask and modifications TP_LOCALLAB_SHOWREF;Preview ΔE TP_LOCALLAB_SHOWS;Mask and modifications -TP_LOCALLAB_SHOWSTRUC;Show spot structure(advanced) -TP_LOCALLAB_SHOWSTRUCEX;Show spot structure(advanced) +TP_LOCALLAB_SHOWSTRUC;Show spot structure(Advanced) +TP_LOCALLAB_SHOWSTRUCEX;Show spot structure(Advanced) TP_LOCALLAB_SHOWT;Mask and modifications TP_LOCALLAB_SHOWVI;Mask and modifications TP_LOCALLAB_SHRESFRA;Shadows/Highlights -TP_LOCALLAB_SHTRC_TOOLTIP;Modifies the tones of the image by acting on a TRC (Tone Response Curve).\nGamma acts mainly on light tones.\nSlope acts mainly on dark tones -TP_LOCALLAB_SH_TOOLNAME;Shadows/Highlights & Tone Equalizer - 5 +TP_LOCALLAB_SHTRC_TOOLTIP;Based on 'working profile' (only those provided), modifies the tones of the image by acting on a TRC (Tone Response Curve).\nGamma acts mainly on light tones.\nSlope acts mainly on dark tones.\nIt is recommended that the TRC of both devices (monitor and output profile) be sRGB (default). +TP_LOCALLAB_SH_TOOLNAME;Shadows/Highlights & Tone Equalizer TP_LOCALLAB_SIGMAWAV;Attenuation response TP_LOCALLAB_SIM;Simple TP_LOCALLAB_SLOMASKCOL;Slope -TP_LOCALLAB_SLOMASK_TOOLTIP;Gamma and Slope allow a soft and artifact-free transformation of the mask by progressively modifying “L” to avoid any discontinuities. +TP_LOCALLAB_SLOMASK_TOOLTIP;Adjusting Gamma and Slope can provide a soft and artifact-free transformation of the mask by progressively modifying ‘L’ to avoid any discontinuities. TP_LOCALLAB_SLOSH;Slope TP_LOCALLAB_SOFT;Soft Light & Original Retinex TP_LOCALLAB_SOFTM;Soft Light @@ -2827,11 +3099,12 @@ TP_LOCALLAB_SOFTRADIUSCOL;Soft radius TP_LOCALLAB_SOFTRADIUSCOL_TOOLTIP;Applies a guided filter to the output image to reduce possible artifacts. TP_LOCALLAB_SOFTRETI;Reduce ΔE artifacts TP_LOCALLAB_SOFTRETI_TOOLTIP;Take into account deltaE to improve Transmission map -TP_LOCALLAB_SOFT_TOOLNAME;Soft Light & Original Retinex - 6 -TP_LOCALLAB_SOURCE_GRAY;Value +TP_LOCALLAB_SOFT_TOOLNAME;Soft Light & Original Retinex +TP_LOCALLAB_SOURCE_ABS;Absolute luminance +TP_LOCALLAB_SOURCE_GRAY;Mean luminance (Yb%) TP_LOCALLAB_SPECCASE;Specific cases TP_LOCALLAB_SPECIAL;Special use of RGB curves -TP_LOCALLAB_SPECIAL_TOOLTIP;The checkbox allows you to remove all other actions i.e. “Scope”, masks, sliders etc., (except for transitions) and use just the effect of the RGB tone-curve. +TP_LOCALLAB_SPECIAL_TOOLTIP;The checkbox allows you to remove all other actions i.e. ‘Scope’, masks, sliders etc., (except for transitions) and use just the effect of the RGB tone-curve. TP_LOCALLAB_SPOTNAME;New Spot TP_LOCALLAB_STD;Standard TP_LOCALLAB_STR;Strength @@ -2839,42 +3112,43 @@ TP_LOCALLAB_STRBL;Strength TP_LOCALLAB_STREN;Compression strength TP_LOCALLAB_STRENG;Strength TP_LOCALLAB_STRENGR;Strength -TP_LOCALLAB_STRENGTH;Noise TP_LOCALLAB_STRENGRID_TOOLTIP;You can adjust the desired effect with "strength", but you can also use the "scope" function which allows you to delimit the action (e.g. to isolate a particular color). +TP_LOCALLAB_STRENGTH;Noise TP_LOCALLAB_STRGRID;Strength TP_LOCALLAB_STRRETI_TOOLTIP;if Strength Retinex < 0.2 only Dehaze is enabled.\nif Strength Retinex >= 0.1 Dehaze is in luminance mode. TP_LOCALLAB_STRUC;Structure TP_LOCALLAB_STRUCCOL;Spot structure TP_LOCALLAB_STRUCCOL1;Spot structure -TP_LOCALLAB_STRUCT_TOOLTIP;Uses the Sobel algorithm to take into account structure for shape detection.\nActivate "Mask and modifications” > “Show spot structure" (advanced mode) to see a preview of the mask (without modifications).\n\nCan be used in conjunction with the Structure Mask, Blur Mask and “Local contrast (by wavelet level)” to improve edge detection.\n\nEffects of adjustments using Lightness, Contrast, Chrominance, Exposure or other non-mask-related tools visible using either ‘Show modified image” or “Show modified areas with mask ”. +TP_LOCALLAB_STRUCT_TOOLTIP;Uses the Sobel algorithm to take into account structure for shape detection.\nActivate ‘Mask and modifications’ > ‘Show spot structure’ (Advanced mode) to see a preview of the mask (without modifications).\n\nCan be used in conjunction with the Structure Mask, Blur Mask and ‘Local contrast’ (by wavelet level) to improve edge detection.\n\nEffects of adjustments using Lightness, Contrast, Chrominance, Exposure or other non-mask-related tools visible using either ‘Show modified image’ or ‘Show modified areas with mask’. TP_LOCALLAB_STRUMASKCOL;Structure mask strength -TP_LOCALLAB_STRUMASK_TOOLTIP;Structure mask (slider) with the checkbox "Structure mask as tool" unchecked: In this case a mask showing the structure will be generated even if none of the 3 curves is activated. Structure masks are available for mask 1 (Blur and denoise") and mask 7 (Color & Light). +TP_LOCALLAB_STRUMASK_TOOLTIP;Structure mask (slider) with the checkbox 'Structure mask as tool' unchecked: In this case a mask showing the structure will be generated even if none of the 3 curves is activated. Structure masks are available for mask (Blur and denoise") and mask(Color & Light). TP_LOCALLAB_STRUSTRMASK_TOOLTIP;Moderate use of this slider is recommended! TP_LOCALLAB_STYPE;Shape method TP_LOCALLAB_STYPE_TOOLTIP;You can choose between:\nSymmetrical - left handle linked to right, top handle linked to bottom.\nIndependent - all handles are independent. TP_LOCALLAB_SYM;Symmetrical (mouse) TP_LOCALLAB_SYMSL;Symmetrical (mouse + sliders) -TP_LOCALLAB_TARGET_GRAY;Target gray point +TP_LOCALLAB_TARGET_GRAY;Mean luminance (Yb%) TP_LOCALLAB_THRES;Threshold structure TP_LOCALLAB_THRESDELTAE;ΔE scope threshold TP_LOCALLAB_THRESRETI;Threshold TP_LOCALLAB_THRESWAV;Balance threshold -TP_LOCALLAB_TLABEL;TM Data Min=%1 Max=%2 Mean=%3 Sigma=%4 (Threshold) +TP_LOCALLAB_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sig=%4 TP_LOCALLAB_TLABEL2;TM Effective Tm=%1 TM=%2 TP_LOCALLAB_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nTm=Min TM=Max of Transmission Map.\nYou can normalize the results with the threshold slider. TP_LOCALLAB_TM;Tone Mapping TP_LOCALLAB_TM_MASK;Use transmission map -TP_LOCALLAB_TOOLMASK_TOOLTIP;Structure mask (slider) with the checkbox "Structure mask as tool" checked: in this case a mask showing the structure will be generated after one or more of the 2 curves L(L) or LC(H) has been modified.\n Here, the "Structure mask" behaves like the other Mask tools : Gamma, Slope, etc.\n It allows you to vary the action on the mask according to the structure of the image. TP_LOCALLAB_TONEMAPESTOP_TOOLTIP;This slider affects edge sensitivity.\n The greater the value, the more likely a change in contrast will be interpreted as an "edge".\n If set to zero the tone mapping will have an effect similar to unsharp masking. TP_LOCALLAB_TONEMAPGAM_TOOLTIP;The Gamma slider shifts the tone-mapping effect towards either the shadows or the highlights. TP_LOCALLAB_TONEMAPREWEI_TOOLTIP;In some cases tone mapping may result in a cartoonish appearance, and in some rare cases soft but wide halos may appear.\n Increasing the number of reweighting iterates will help fight some of these problems. TP_LOCALLAB_TONEMAP_TOOLTIP;Same as the tone mapping tool in the main menu.\nThe main-menu tool must be deactivated if this tool is used. TP_LOCALLAB_TONEMASCALE_TOOLTIP;This slider allows you to adjust the transition between "local" and "global" contrast.\nThe greater the value, the larger a detail needs to be for it to be boosted -TP_LOCALLAB_TONE_TOOLNAME;Tone Mapping - 4 +TP_LOCALLAB_TONE_TOOLNAME;Tone Mapping TP_LOCALLAB_TOOLCOL;Structure mask as tool TP_LOCALLAB_TOOLCOLFRMASK_TOOLTIP;Allows you to modify the mask, if one exists -TP_LOCALLAB_TRANSIT;Transition Gradient TP_LOCALLAB_TOOLMASK;Mask Tools +TP_LOCALLAB_TOOLMASK_2;Wavelets +TP_LOCALLAB_TOOLMASK_TOOLTIP;Structure mask (slider) with the checkbox ‘Structure mask as tool’ checked: in this case a mask showing the structure will be generated after one or more of the 2 curves L(L) or LC(H) has been modified.\n Here, the ‘Structure mask’ behaves like the other Mask tools : Gamma, Slope, etc.\n It allows you to vary the action on the mask according to the structure of the image. +TP_LOCALLAB_TRANSIT;Transition Gradient TP_LOCALLAB_TRANSITGRAD;Transition differentiation XY TP_LOCALLAB_TRANSITGRAD_TOOLTIP;Allows you to vary the y-axis transition TP_LOCALLAB_TRANSITVALUE;Transition value @@ -2884,51 +3158,42 @@ TP_LOCALLAB_TRANSIT_TOOLTIP;Adjust smoothness of transition between affected and TP_LOCALLAB_TRANSMISSIONGAIN;Transmission gain TP_LOCALLAB_TRANSMISSIONMAP;Transmission map TP_LOCALLAB_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positive values (max).\nOrdinate: amplification or reduction.\nYou can adjust this curve to change the Transmission and reduce artifacts -TP_LOCALLAB_USEMASK;Use mask +TP_LOCALLAB_USEMASK;Laplacian TP_LOCALLAB_VART;Variance (contrast) TP_LOCALLAB_VIBRANCE;Vibrance & Warm/Cool TP_LOCALLAB_VIBRA_TOOLTIP;Adjusts vibrance (essentially the same as the global adjustment).\nCarries out the equivalent of a white-balance adjustment using a CIECAM algorithm. -TP_LOCALLAB_VIB_TOOLNAME;Vibrance & Warm/Cool - 3 -TP_LOCALLAB_SOFT_TOOLNAME;Soft Light & Original Retinex - 6 -TP_LOCALLAB_BLUR_TOOLNAME;Blur/Grain & Denoise - 1 -TP_LOCALLAB_TONE_TOOLNAME;Tone Mapping - 4 -TP_LOCALLAB_RET_TOOLNAME;Dehaze & Retinex - 9 -TP_LOCALLAB_SHARP_TOOLNAME;Sharpening - 8 -TP_LOCALLAB_LC_TOOLNAME;Local Contrast & Wavelets - 7 -TP_LOCALLAB_CBDL_TOOLNAME;CBDL - 2 -TP_LOCALLAB_LOG_TOOLNAME;Log Encoding - 0 -TP_LOCALLAB_MASKCOM_TOOLNAME;Common Color Mask - 13 +TP_LOCALLAB_VIB_TOOLNAME;Vibrance & Warm/Cool TP_LOCALLAB_VIS_TOOLTIP;Click to show/hide selected Control Spot.\nCtrl+click to show/hide all Control Spot. -TP_LOCALLAB_WAMASKCOL;Ψ Mask Wavelet level +TP_LOCALLAB_WAMASKCOL;Mask Wavelet level TP_LOCALLAB_WARM;Warm/Cool & Color artifacts TP_LOCALLAB_WARM_TOOLTIP;This slider uses the CIECAM algorithm and acts as a White Balance control to make the color temperature of the selected area warmer or cooler.\nIt can also reduce color artifacts in some cases. -TP_LOCALLAB_WASDEN_TOOLTIP;Luminance noise reduction: the left-hand side of the curve corresponds to the first 3 levels 0,1 &2 (fine detail). The right hand side of the curve corresponds to the coarser details (level 3 and beyond). -TP_LOCALLAB_WAT_WAVSHAPE_TOOLTIP;Low to high local contrast from left to right on the x-axis\nIncrease or decrease local contrast on the y-axis. -TP_LOCALLAB_WAT_LEVELLOCCONTRAST_TOOLTIP;Low to high local contrast from left to right on the x-axis.\nIncrease or decrease local contrast on the y-axis. -TP_LOCALLAB_WAT_SIGMALC_TOOLTIP;The effect of the local contrast adjustment is stronger for medium-contrast details, and weaker for high and low-contrast details.\n This slider controls how quickly the effect dampens towards the extreme contrasts.\nThe higher the value of the slider, the wider the range of contrasts that will receive the full effect of the local contrast adjustment, and the higher the risk of generating artifacts.\nThe lower the value, the more the effect will be pinpointed towards a narrow range of contrast values. -TP_LOCALLAB_WAT_BLURLC_TOOLTIP;The default blur setting affects all 3 L*a* b* components (luminance and colour).\nWhen checked, only luminance is blurred. -TP_LOCALLAB_WAT_THRESHOLDWAV_TOOLTIP;Range of wavelet levels used throughout the "Wavelets" module. -TP_LOCALLAB_WAT_EXPRESID_TOOLTIP;The residual image behaves in the same way as the main image when making adjustments to contrast, chroma etc. -TP_LOCALLAB_WAT_CLARIL_TOOLTIP;“Merge luma” is used to select the intensity of the desired effect on luminance. -TP_LOCALLAB_WAT_CLARIC_TOOLTIP;“Merge chroma” is used to select the intensity of the desired effect on chrominance. -TP_LOCALLAB_WAT_ORIGLC_TOOLTIP;“Merge only with original image”, prevents the “Wavelet Pyramid” settings from interfering with “Clarity” and “Sharp mask”. -TP_LOCALLAB_WAT_STRWAV_TOOLTIP;Allows the local contrast to be varied according to a chosen gradient and angle. The variation of the luminance signal is taken into account and not the luminance. -TP_LOCALLAB_WAT_CONTOFFSET_TOOLTIP;Offset modifies the balance between low-contrast and high-contrast details.\nHigh values will amplify contrast changes to the higher-contrast details, whereas low values will amplify contrast changes to low-contrast details.\nBy using a low “Attenuation response” value you can select which contrast values will be enhanced. -TP_LOCALLAB_WAT_CONTCHROMALEV_TOOLTIP;“Chroma levels”: adjusts the “a” and “b” components of Lab* as a proportion of the luminance value. -TP_LOCALLAB_WAT_WAVCBDL_TOOLTIP;Similar to Contrast By Detail Levels. Fine to coarse detail levels from left to right on the x-axis. -TP_LOCALLAB_WAT_STRENGTHW_TOOLTIP;Intensity of edge-effect detection. -TP_LOCALLAB_WAT_LOCCONTRASTEDG_TOOLTIP;You can adjust the distribution of local contrast by wavelet level based on the initial intensity of the contrast. This will modify the effects of perspective and relief in the image, and/or reduce the contrast values for very low initial contrast levels. -TP_LOCALLAB_WAT_GRADW_TOOLTIP;The more you move the slider to the right, the more effective the detection algorithm will be and the less noticeable the effects of local contrast. -TP_LOCALLAB_WAT_WAVESHOW_TOOLTIP;Shows all of the "Edge sharpness" tools. It is advisable to read the Wavelet Levels documentation. -TP_LOCALLAB_WAT_WAVLEVELBLUR_TOOLTIP;Allows you to adjust the maximum effect of blurring on the levels. -TP_LOCALLAB_WAT_WAVBLURCURV_TOOLTIP;Allows you to blur each level of decomposition.\nThe finest to coarsest levels of decomposition are from left to right. -TP_LOCALLAB_WAT_RESIDBLUR_TOOLTIP;Blurs the residual image, independent of the levels. -TP_LOCALLAB_WAT_WAVTM_TOOLTIP;The lower (negative) part compresses each level of decomposition creating a tone mapping effect.\nThe upper (positive) part attenuates the contrast by level.\nThe finest to coarsest levels of decomposition are from left to right on the x-axis. +TP_LOCALLAB_WASDEN_TOOLTIP;Luminance noise reduction: the left-hand side of the curve including the dark-gray/light-gray boundary corresponds to the first 3 levels 0, 1, 2 (fine detail). The right hand side of the curve corresponds to the coarser details (level 3, 4, 5, 6). TP_LOCALLAB_WAT_BALTHRES_TOOLTIP;Balances the action within each level. -TP_LOCALLAB_WAT_RESIDCOMP_TOOLTIP;Compresses the residual image to increase or reduce contrast. +TP_LOCALLAB_WAT_BLURLC_TOOLTIP;The default blur setting affects all 3 L*a* b* components (luminance and colour).\nWhen checked, only luminance is blurred. +TP_LOCALLAB_WAT_CLARIC_TOOLTIP;“Merge chroma” is used to select the intensity of the desired effect on chrominance. +TP_LOCALLAB_WAT_CLARIL_TOOLTIP;“Merge luma” is used to select the intensity of the desired effect on luminance. +TP_LOCALLAB_WAT_CONTCHROMALEV_TOOLTIP;‘Chroma levels’: adjusts the “a” and “b” components of Lab* as a proportion of the luminance value. +TP_LOCALLAB_WAT_CONTOFFSET_TOOLTIP;Offset modifies the balance between low-contrast and high-contrast details.\nHigh values will amplify contrast changes to the higher-contrast details, whereas low values will amplify contrast changes to low-contrast details.\nBy using a low ‘Attenuation response’ value you can select which contrast values will be enhanced. TP_LOCALLAB_WAT_DELTABAL_TOOLTIP;By moving the slider to the left, the lower levels are accentuated. To the right, the lower levels are reduced and the higher levels accentuated. +TP_LOCALLAB_WAT_EXPRESID_TOOLTIP;The residual image behaves in the same way as the main image when making adjustments to contrast, chroma etc. +TP_LOCALLAB_WAT_GRADW_TOOLTIP;The more you move the slider to the right, the more effective the detection algorithm will be and the less noticeable the effects of local contrast. +TP_LOCALLAB_WAT_LEVELLOCCONTRAST_TOOLTIP;Low to high local contrast from left to right on the x-axis.\nIncrease or decrease local contrast on the y-axis. +TP_LOCALLAB_WAT_LOCCONTRASTEDG_TOOLTIP;You can adjust the distribution of local contrast by wavelet level based on the initial intensity of the contrast. This will modify the effects of perspective and relief in the image, and/or reduce the contrast values for very low initial contrast levels. +TP_LOCALLAB_WAT_ORIGLC_TOOLTIP;‘Merge only with original image’, prevents the ‘Wavelet Pyramid’ settings from interfering with ‘Clarity’ and ‘Sharp mask’. +TP_LOCALLAB_WAT_RESIDBLUR_TOOLTIP;Blurs the residual image, independent of the levels. +TP_LOCALLAB_WAT_RESIDCOMP_TOOLTIP;Compresses the residual image to increase or reduce contrast. +TP_LOCALLAB_WAT_SIGMALC_TOOLTIP;The effect of the local contrast adjustment is stronger for medium-contrast details, and weaker for high and low-contrast details.\n This slider controls how quickly the effect dampens towards the extreme contrasts.\nThe higher the value of the slider, the wider the range of contrasts that will receive the full effect of the local contrast adjustment, and the higher the risk of generating artifacts.\nThe lower the value, the more the effect will be pinpointed towards a narrow range of contrast values. +TP_LOCALLAB_WAT_STRENGTHW_TOOLTIP;Intensity of edge-effect detection. +TP_LOCALLAB_WAT_STRWAV_TOOLTIP;Allows the local contrast to be varied according to a chosen gradient and angle. The variation of the luminance signal is taken into account and not the luminance. +TP_LOCALLAB_WAT_THRESHOLDWAV_TOOLTIP;Range of wavelet levels used throughout the ‘Wavelets’ module. +TP_LOCALLAB_WAT_WAVBLURCURV_TOOLTIP;Allows you to blur each level of decomposition.\nThe finest to coarsest levels of decomposition are from left to right. +TP_LOCALLAB_WAT_WAVCBDL_TOOLTIP;Similar to Contrast By Detail Levels. Fine to coarse detail levels from left to right on the x-axis. TP_LOCALLAB_WAT_WAVDELTABAL_TOOLTIP;Acts on the balance of the three directions (horizontal, vertical and diagonal) based on the luminance of the image.\nBy default the shadows or highlights are reduced to avoid artifacts. -TP_LOCALLAB_WAV;Local contrast by level +TP_LOCALLAB_WAT_WAVESHOW_TOOLTIP;Shows all of the ‘Edge sharpness’ tools. It is advisable to read the Wavelet Levels documentation. +TP_LOCALLAB_WAT_WAVLEVELBLUR_TOOLTIP;Allows you to adjust the maximum effect of blurring on the levels. +TP_LOCALLAB_WAT_WAVSHAPE_TOOLTIP;Low to high local contrast from left to right on the x-axis\nIncrease or decrease local contrast on the y-axis. +TP_LOCALLAB_WAT_WAVTM_TOOLTIP;The lower (negative) part compresses each level of decomposition creating a tone mapping effect.\nThe upper (positive) part attenuates the contrast by level.\nThe finest to coarsest levels of decomposition are from left to right on the x-axis. +TP_LOCALLAB_WAV;Local contrast TP_LOCALLAB_WAVBLUR_TOOLTIP;Allows you to blur each level of the decomposition, as well as the residual image. TP_LOCALLAB_WAVCOMP;Compression by level TP_LOCALLAB_WAVCOMPRE;Compression by level @@ -2936,18 +3201,20 @@ TP_LOCALLAB_WAVCOMPRE_TOOLTIP;Allows you to apply tone mapping or reduce local c TP_LOCALLAB_WAVCOMP_TOOLTIP;Allows you to apply local contrast based on the direction of the wavelet decomposition : horizontal, vertical, diagonal TP_LOCALLAB_WAVCON;Contrast by level TP_LOCALLAB_WAVCONTF_TOOLTIP;Similar to Contrast By Detail Levels. Fine to coarse detail levels from left to right on the x-axis. -TP_LOCALLAB_WAVDEN;Luminance denoise by level -TP_LOCALLAB_WAVE;Ψ Wavelets +TP_LOCALLAB_WAVDEN;Luminance denoise +TP_LOCALLAB_WAVE;Wavelets TP_LOCALLAB_WAVEDG;Local contrast TP_LOCALLAB_WAVEEDG_TOOLTIP;Improves sharpness by targeting the action of local contrast on the edges. It has the same functions as the corresponding module in Wavelet Levels and uses the same settings. +TP_LOCALLAB_WAVEMASK_LEVEL_TOOLTIP;Range of wavelet levels used in ‘Local contrast’ (by wavelet level). TP_LOCALLAB_WAVGRAD_TOOLTIP;Allows the local contrast to be varied according to a chosen gradient and angle. The variation of the luminance signal is taken into account and not the luminance. -TP_LOCALLAB_WAVHIGH;Ψ Wavelet high +TP_LOCALLAB_WAVHIGH;Wavelet high +TP_LOCALLAB_WAVHUE_TOOLTIP;Allows you to reduce or increase the denoise based on hue. TP_LOCALLAB_WAVLEV;Blur by level -TP_LOCALLAB_WAVLOW;Ψ Wavelet low -TP_LOCALLAB_WAVMASK;Ψ Local contrast (by wavelet level) +TP_LOCALLAB_WAVLOW;Wavelet low +TP_LOCALLAB_WAVMASK;Local contrast TP_LOCALLAB_WAVMASK_TOOLTIP;Uses wavelets to modify the local contrast of the mask and reinforce or reduce the structure (skin, buildings...) -TP_LOCALLAB_WAVEMASK_LEVEL_TOOLTIP;Range of wavelet levels used in “Local contrast (by wavelet level)” -TP_LOCALLAB_WAVMED;Ψ Wavelet normal +//TP_LOCALLAB_WAVMED;Ψ Wavelet normal +TP_LOCALLAB_WAVMED;Wavelet normal TP_LOCALLAB_WEDIANHI;Median Hi TP_LOCALLAB_WHITE_EV;White Ev TP_LOCAL_HEIGHT;Bottom @@ -3041,9 +3308,9 @@ TP_RAW_AMAZEBILINEAR;AMaZE+Bilinear TP_RAW_AMAZEVNG4;AMaZE+VNG4 TP_RAW_BORDER;Border TP_RAW_DCB;DCB +TP_RAW_DCBBILINEAR;DCB+Bilinear TP_RAW_DCBENHANCE;DCB enhancement TP_RAW_DCBITERATIONS;Number of DCB iterations -TP_RAW_DCBBILINEAR;DCB+Bilinear TP_RAW_DCBVNG4;DCB+VNG4 TP_RAW_DMETHOD;Method TP_RAW_DMETHOD_PROGRESSBAR;%1 demosaicing... @@ -3291,10 +3558,9 @@ TP_WAVELET_BACKGROUND;Background TP_WAVELET_BACUR;Curve TP_WAVELET_BALANCE;Contrast balance d/v-h TP_WAVELET_BALANCE_TOOLTIP;Alters the balance between the wavelet directions: vertical-horizontal and diagonal.\nIf contrast, chroma or residual tone mapping are activated, the effect due to balance is amplified. -TP_WAVELET_BALANCE_TOOLTIP;Alters the balance between the vertical, horizontal and diagonal wavelet directions: .\nActivating contrast, chroma or residual tone mapping amplifies the effect due to balance TP_WAVELET_BALCHRO;Chroma balance +TP_WAVELET_BALCHROM;Equalizer Color TP_WAVELET_BALCHRO_TOOLTIP;If enabled, the 'Contrast balance' curve or slider also modifies chroma balance. -TP_WAVELET_BALCHROM;Denoise equalizer Blue-Yellow/Red-Green TP_WAVELET_BALLUM;Denoise equalizer White-Black TP_WAVELET_BANONE;None TP_WAVELET_BASLI;Slider @@ -3325,12 +3591,12 @@ TP_WAVELET_CLA;Clarity TP_WAVELET_CLARI;Sharp-mask and Clarity TP_WAVELET_COLORT;Opacity red-green TP_WAVELET_COMPCONT;Contrast +TP_WAVELET_COMPEXPERT;Advanced TP_WAVELET_COMPGAMMA;Compression gamma TP_WAVELET_COMPGAMMA_TOOLTIP;Adjusting the gamma of the residual image allows you to equilibrate the data and histogram. TP_WAVELET_COMPLEXLAB;Complexity TP_WAVELET_COMPLEX_TOOLTIP;Standard: shows a reduced set of tools suitable for most processing operations.\nAdvanced: shows the complete set of tools for advanced processing operations TP_WAVELET_COMPNORMAL;Standard -TP_WAVELET_COMPEXPERT;Advanced TP_WAVELET_COMPTM;Tone mapping TP_WAVELET_CONTEDIT;'After' contrast curve TP_WAVELET_CONTFRAME;Contrast - Compression @@ -3358,32 +3624,29 @@ TP_WAVELET_DAUB10;D10 - medium TP_WAVELET_DAUB14;D14 - high TP_WAVELET_DAUBLOCAL;Wavelet Edge performance TP_WAVELET_DAUB_TOOLTIP;Changes Daubechies coefficients:\nD4 = Standard,\nD14 = Often best performance, 10% more time-intensive.\n\nAffects edge detection as well as the general quality of the first levels. However the quality is not strictly related to this coefficient and can vary depending on image and use. +TP_WAVELET_DEN5THR;Guided threshold +TP_WAVELET_DEN12LOW;1 2 Low +TP_WAVELET_DEN12PLUS;1 2 High +TP_WAVELET_DEN14LOW;1 4 Low +TP_WAVELET_DEN14PLUS;1 4 High +TP_WAVELET_DENCONTRAST;Local contrast Equalizer +TP_WAVELET_DENCURV;Curve +TP_WAVELET_DENEQUAL;1 2 3 4 Equal +TP_WAVELET_DENH;Threshold +TP_WAVELET_DENL;Correction structure +TP_WAVELET_DENLH;Guided threshold levels 1-4 +TP_WAVELET_DENLOCAL_TOOLTIP;Use a curve in order to guide the denoising according to the local contrast.\nThe areas are denoised, the structures are maintained +TP_WAVELET_DENMIX_TOOLTIP;The local-contrast reference value used by the guided filter.\nDepending on the image, results can vary depending on whether the noise is measured before or after the noise reduction. These four choices allow you to take into account various combinations of the original and modified (denoised) images to find the best compromise. TP_WAVELET_DENOISE;Guide curve based on Local contrast TP_WAVELET_DENOISEGUID;Guided threshold based on hue TP_WAVELET_DENOISEH;High levels Curve Local contrast -TP_WAVELET_DENOISEHUE;Denoise equalizer Hue -TP_WAVELET_DENCONTRAST;Local contrast Equalizer -TP_WAVELET_DENEQUAL;1 2 3 4 Equal -TP_WAVELET_DEN14PLUS;1 4 High -TP_WAVELET_DEN14LOW;1 4 Low -TP_WAVELET_DEN12PLUS;1 2 High -TP_WAVELET_DEN12LOW;1 2 Low -TP_WAVELET_DEN5THR;Guided threshold -//TP_WAVELET_DENH;Low levels (1234)- Finest details -//TP_WAVELET_DENLH;Guided threshold by detail levels 1-4 -//TP_WAVELET_DENL;High levels - Coarsest details -TP_WAVELET_DENH;Threshold -TP_WAVELET_DENLH;Guided threshold by detail levels 1-4 -TP_WAVELET_DENL;Correction structure -TP_WAVELET_DENLOCAL_TOOLTIP;Use a curve in order to guide the denoising according to the local contrast.\nThe areas are denoised, the structures are maintained -TP_WAVELET_DENMIX_TOOLTIP;Balances the action of the guide taking into account the original image and the denoised image +TP_WAVELET_DENOISEHUE;Denoise hue equalizer TP_WAVELET_DENQUA;Mode -TP_WAVELET_DENSLILAB;Method -TP_WAVELET_DENSLI;Slider -TP_WAVELET_DENCURV;Curve TP_WAVELET_DENSIGMA_TOOLTIP;Adapts the shape of the guide -TP_WAVELET_DENWAVHUE_TOOLTIP;Amplify or reduce denoising depending on the color +TP_WAVELET_DENSLI;Slider +TP_WAVELET_DENSLILAB;Method TP_WAVELET_DENWAVGUID_TOOLTIP;Uses hue to reduce or increase the action of the guided filter +TP_WAVELET_DENWAVHUE_TOOLTIP;Amplify or reduce denoising depending on the color TP_WAVELET_DETEND;Details TP_WAVELET_DIRFRAME;Directional contrast TP_WAVELET_DONE;Vertical @@ -3433,19 +3696,19 @@ TP_WAVELET_LEVDIR_ALL;All levels, in all directions TP_WAVELET_LEVDIR_INF;Finer detail levels, including selected level TP_WAVELET_LEVDIR_ONE;One level TP_WAVELET_LEVDIR_SUP;Coarser detail levels, excluding selected level -TP_WAVELET_LEVELS;Wavelet levels -TP_WAVELET_LEVELLOW;Radius 1-4 TP_WAVELET_LEVELHIGH;Radius 5-6 +TP_WAVELET_LEVELLOW;Radius 1-4 +TP_WAVELET_LEVELS;Wavelet levels TP_WAVELET_LEVELSIGM;Radius TP_WAVELET_LEVELS_TOOLTIP;Choose the number of wavelet decomposition levels for the image.\nMore levels require more RAM and require a longer processing time. TP_WAVELET_LEVF;Contrast -TP_WAVELET_LEVLABEL;Preview maximum possible levels = %1 TP_WAVELET_LEVFOUR;Level 5-6 denoise and guided threshold +TP_WAVELET_LEVLABEL;Preview maximum possible levels = %1 TP_WAVELET_LEVONE;Level 2 TP_WAVELET_LEVTHRE;Level 4 TP_WAVELET_LEVTWO;Level 3 TP_WAVELET_LEVZERO;Level 1 -TP_WAVELET_LIMDEN;Interaction levels 56 on levels 14 +TP_WAVELET_LIMDEN;Interaction levels 5-6 on levels 1-4 TP_WAVELET_LINKEDG;Link to Edge Sharpness Strength TP_WAVELET_LIPST;Enhanced algoritm TP_WAVELET_LOWLIGHT;Coarser levels luminance range @@ -3456,15 +3719,15 @@ TP_WAVELET_MEDILEV;Edge detection TP_WAVELET_MEDILEV_TOOLTIP;When you enable Edge Detection, it is recommanded:\n- to disabled low contrast levels to avoid artifacts,\n- to use high values of gradient sensitivity.\n\nYou can modulate the strength with 'refine' from Denoise and Refine. TP_WAVELET_MERGEC;Merge chroma TP_WAVELET_MERGEL;Merge luma -TP_WAVELET_NEUTRAL;Neutral -TP_WAVELET_MIXCONTRAST;Reference local contrast +TP_WAVELET_MIXCONTRAST;Reference TP_WAVELET_MIXDENOISE;Denoise -TP_WAVELET_MIXNOISE;Noise TP_WAVELET_MIXMIX;Mixed 50% noise - 50% denoise TP_WAVELET_MIXMIX70;Mixed 30% noise - 70% denoise +TP_WAVELET_MIXNOISE;Noise +TP_WAVELET_NEUTRAL;Neutral TP_WAVELET_NOIS;Denoise TP_WAVELET_NOISE;Denoise and Refine -TP_WAVELET_NOISE_TOOLTIP;If level 4 luminance denoise superior to 50, mode Agressive is used.\nIf chrominance coarse superior to 20, mode Agressive is used. +TP_WAVELET_NOISE_TOOLTIP;If level 4 luminance denoise superior to 50, mode Aggressive is used.\nIf chrominance coarse superior to 20, mode Aggressive is used. TP_WAVELET_NPHIGH;High TP_WAVELET_NPLOW;Low TP_WAVELET_NPNONE;None @@ -3479,7 +3742,8 @@ TP_WAVELET_OPACITYWL_TOOLTIP;Modify the final local contrast at the end of the w TP_WAVELET_PASTEL;Pastel chroma TP_WAVELET_PROC;Process TP_WAVELET_PROTAB;Protection -TP_WAVELET_QUAAGRES;Agressive +TP_WAVELET_QUAAGRES;Aggressive +TP_WAVELET_QUANONE;Off TP_WAVELET_QUACONSER;Conservative TP_WAVELET_RADIUS;Radius shadows - highlight TP_WAVELET_RANGEAB;Range a and b % @@ -3498,8 +3762,8 @@ TP_WAVELET_SETTINGS;Wavelet Settings TP_WAVELET_SHA;Sharp mask TP_WAVELET_SHFRAME;Shadows/Highlights TP_WAVELET_SHOWMASK;Show wavelet 'mask' -TP_WAVELET_SIGMA;Attenuation response TP_WAVELET_SIGM;Radius +TP_WAVELET_SIGMA;Attenuation response TP_WAVELET_SIGMAFIN;Attenuation response TP_WAVELET_SIGMA_TOOLTIP;The effect of the contrast sliders is stronger in medium contrast details, and weaker in high and low contrast details.\n With this slider you can control how quickly the effect dampens towards the extreme contrasts.\n The higher the slider is set, the wider the range of contrasts which will get a strong change, and the higher the risk to generate artifacts.\n .The lower it is, the more the effect will be pinpointed towards a narrow range of contrast values TP_WAVELET_SKIN;Skin targetting/protection @@ -3512,9 +3776,8 @@ TP_WAVELET_STREND;Strength TP_WAVELET_STRENGTH;Strength TP_WAVELET_SUPE;Extra TP_WAVELET_THR;Shadows threshold +TP_WAVELET_THRDEN_TOOLTIP;Generates a stepped curve used to guide the noise reduction as a function of local contrast. The denoise will be applied to uniform low local-contrast areas. Areas with detail (higher local contrast) will be preserved. TP_WAVELET_THREND;Local contrast threshold -TP_WAVELET_THRDEN_TOOLTIP;Generates a stepped curve in order to guide the denoising according to the local contrast.\nThe areas are denoised, the structures are maintained -TP_WAVELET_THRDEN_TOOLTIP;Generates a stepped denoise curve based on local contrast.\nReduces noise in uniform areas and preserves image structure TP_WAVELET_THRESHOLD;Finer levels TP_WAVELET_THRESHOLD2;Coarser levels TP_WAVELET_THRESHOLD2_TOOLTIP;Only levels from the chosen value to the selected number of ‘wavelet levels’ will be affected by the Shadow luminance range. @@ -3600,4 +3863,7 @@ ZOOMPANEL_ZOOMFITCROPSCREEN;Fit crop to screen\nShortcut: f ZOOMPANEL_ZOOMFITSCREEN;Fit whole image to screen\nShortcut: Alt-f ZOOMPANEL_ZOOMIN;Zoom In\nShortcut: + ZOOMPANEL_ZOOMOUT;Zoom Out\nShortcut: - - +//TP_LOCALLAB_CIECAMLOG_TOOLTIP;This module is based on the CIECAM color appearance model which was designed to better simulate how human vision perceives colors under different lighting conditions.\nOnly the third Ciecam process (Viewing conditions - Target) is taken into account, as well as part of the second (contrast J, saturation s) , as well as some data from the first process (Scene conditions - Source) which is used for the Log encoding.\nIt also adapts the output to the intended viewing conditions (monitor, TV, projector, printer, etc.) so that the chromatic and contrast appearance is preserved across the display environment. +//TP_WAVELET_DENH;Low levels (1234)- Finest details +//TP_WAVELET_DENL;High levels - Coarsest details +//TP_WAVELET_DENLH;Guided threshold for detail levels 1-4 diff --git a/rtdata/options/options.lin b/rtdata/options/options.lin index 580390b28..fbd8bc6cb 100644 --- a/rtdata/options/options.lin +++ b/rtdata/options/options.lin @@ -12,8 +12,8 @@ MultiUser=true [File Browser] # Image filename extensions to be looked for, and their corresponding search state (0/1 -> skip/include) -ParseExtensions=3fr;arw;arq;cr2;cr3;crf;crw;dcr;dng;fff;iiq;jpg;jpeg;kdc;mef;mos;mrw;nef;nrw;orf;pef;png;raf;raw;rw2;rwl;rwz;sr2;srf;srw;tif;tiff;x3f; -ParseExtensionsEnabled=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;1;1;1;1;1;1;1;1;1;1;1; +ParseExtensions=3fr;arw;arq;cr2;cr3;crf;crw;dcr;dng;fff;iiq;jpg;jpeg;kdc;mef;mos;mrw;nef;nrw;orf;ori;pef;png;raf;raw;rw2;rwl;rwz;sr2;srf;srw;tif;tiff;x3f; +ParseExtensionsEnabled=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;1;0;1;1;1;1;1;1;1;1;1;1;1; [Output] PathTemplate=%p1/converted/%f diff --git a/rtdata/options/options.osx b/rtdata/options/options.osx index c83aea179..cf31210e6 100644 --- a/rtdata/options/options.osx +++ b/rtdata/options/options.osx @@ -13,8 +13,8 @@ UseSystemTheme=false [File Browser] # Image filename extensions to be looked for, and their corresponding search state (0/1 -> skip/include) -ParseExtensions=3fr;arw;arq;cr2;cr3;crf;crw;dcr;dng;fff;iiq;jpg;jpeg;kdc;mef;mos;mrw;nef;nrw;orf;pef;png;raf;raw;rw2;rwl;rwz;sr2;srf;srw;tif;tiff;x3f; -ParseExtensionsEnabled=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;1;1;1;1;1;1;1;1;1;1;1; +ParseExtensions=3fr;arw;arq;cr2;cr3;crf;crw;dcr;dng;fff;iiq;jpg;jpeg;kdc;mef;mos;mrw;nef;nrw;orf;ori;pef;png;raf;raw;rw2;rwl;rwz;sr2;srf;srw;tif;tiff;x3f; +ParseExtensionsEnabled=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;1;0;1;1;1;1;1;1;1;1;1;1;1; [Output] PathTemplate=%p1/converted/%f diff --git a/rtdata/options/options.win b/rtdata/options/options.win index a54e021b1..00b74d07f 100644 --- a/rtdata/options/options.win +++ b/rtdata/options/options.win @@ -14,8 +14,8 @@ UseSystemTheme=false [File Browser] # Image filename extensions to be looked for, and their corresponding search state (0/1 -> skip/include) -ParseExtensions=3fr;arw;arq;cr2;cr3;crf;crw;dcr;dng;fff;iiq;jpg;jpeg;kdc;mef;mos;mrw;nef;nrw;orf;pef;png;raf;raw;rw2;rwl;rwz;sr2;srf;srw;tif;tiff;x3f; -ParseExtensionsEnabled=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;1;1;1;1;1;1;1;1;1;1;1; +ParseExtensions=3fr;arw;arq;cr2;cr3;crf;crw;dcr;dng;fff;iiq;jpg;jpeg;kdc;mef;mos;mrw;nef;nrw;orf;ori;pef;png;raf;raw;rw2;rwl;rwz;sr2;srf;srw;tif;tiff;x3f; +ParseExtensionsEnabled=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;1;0;1;1;1;1;1;1;1;1;1;1;1; [Output] PathTemplate=%p1/converted/%f diff --git a/rtdata/profiles/Film Negative.pp3 b/rtdata/profiles/Film Negative.pp3 new file mode 100644 index 000000000..0ecac1d33 --- /dev/null +++ b/rtdata/profiles/Film Negative.pp3 @@ -0,0 +1,38 @@ +[Exposure] +Auto=false +Compensation=0 +HistogramMatching=false +CurveFromHistogramMatching=false +ClampOOG=false +CurveMode=Standard +CurveMode2=Standard +Curve=1;0;0;0.88544601940051371;1; +Curve2=1;0;0;0.0397505754145333;0.020171771436200074;0.54669745433149319;0.69419974733677647;1;1; + +[HLRecovery] +Enabled=false +Method=Blend + +[Crop] +FixedRatio=false + +[Color Management] +InputProfile=(camera) +ToneCurve=false +ApplyLookTable=false +ApplyHueSatMap=false +WorkingProfile=Rec2020 +WorkingTRC=none + +[RAW Bayer] +Method=rcd + +[Film Negative] +Enabled=true +RedRatio=1.360 +GreenExponent=1.5 +BlueRatio=0.86 +ColorSpace=1 +RefInput=0;0;0; +RefOutput=0;0;0; +BackCompat=0 diff --git a/rtdata/rawtherapee.desktop.in b/rtdata/rawtherapee.desktop.in index 350afc45e..8db182587 100644 --- a/rtdata/rawtherapee.desktop.in +++ b/rtdata/rawtherapee.desktop.in @@ -8,6 +8,7 @@ GenericName[fr]=Éditeur d'images raw GenericName[pl]=Edytor zdjęć raw Comment=An advanced raw photo development program Comment[cs]=Program pro konverzi a zpracování digitálních raw fotografií +Comment[de]=Programm zur Konvertierung und Verarbeitung digitaler RAW-Fotos Comment[fr]=Logiciel de conversion et de traitement de photos numériques de format raw (but de capteur) Comment[pl]=Zaawansowany program do wywoływania zdjęć typu raw Icon=rawtherapee diff --git a/rtdata/themes/RawTherapee - Legacy-GTK3-20_.css b/rtdata/themes/RawTherapee - Legacy-GTK3-20_.css new file mode 100644 index 000000000..dd7be3bfd --- /dev/null +++ b/rtdata/themes/RawTherapee - Legacy-GTK3-20_.css @@ -0,0 +1,1398 @@ +/* + This file is part of RawTherapee. + + Copyright (c) 2015-2017 DrSlony + Copyright (c) 2016-2019 Hombre + Copyright (c) 2016-2019 TooWaBoo + + 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 . +*/ + +/***************************/ +/**/ @import "size - Legacy.css"; /**/ +/***************************/ + +/* text-shadow causes a serious performance degradation in rendering the UI, + * at least in comboboxes with many entries (i.e. Profiled Lens Correction). +*/ + +* { + color: #AAAAAA; + text-shadow: none; +} + +*:disabled { + color: #666666; + opacity: 0.7; +} + +.view:selected:not(check):not(radio) { + color: #262626; + background-color: #AAAAAA +} + +/* The Places and Dir browser panels */ +textview.view, treeview.view { + padding: 0; + margin: 0; +} +.view, .textview, textview, textview.view { + background-color: #262626; +} +/* The headers of these panels */ +.view .button { + background-color: #363636; + /*padding: 0.1666666666666666em;*/ +} + +window > box { + padding: 0.416666666666666666em; +} +window.background { + background-color: #484848; +} + +/*** Window decoration *********************************************************/ +@define-color winHeaderbar rgb(50,50,50); + +.csd:not(.popup):not(tooltip) > decoration { + background-color: #484848; + background-image: none; + box-shadow: 0 0.25em 0.75em 0.083333333333333333em rgba(0, 0, 0, 0.5), 0 0 0 0.083333333333333333em #242424; +} +headerbar { + background-color: shade(@winHeaderbar,1.12); + box-shadow: inset 0 0.083333333333333333em rgba(200,200,200,.13); + background-image: linear-gradient(shade(@winHeaderbar,1.14), shade(@winHeaderbar,.86)); + border-bottom-color: #242424; +} +dialog > box { + padding: 0.666666666666666666em; +} +dialog.csd #PrefNotebook > header, +dialog.csd #AboutNotebook > header, +window.csd:not(.fullscreen) #MainNotebook > header.top { + border-top-color: #484848; +} + +/* Window state */ +.maximized > headerbar { + border-radius: 0; +} +/**/ + +/*** End Window decoration *****************************************************/ + +arrow { + min-width: 1.333333333333333333em; + min-height: 1.333333333333333333em; +} +cellview { + margin: -1px 0; +} + +overshoot, +undershoot { + background-image: none; /* removes the dashed scrollbar line */ +} + +dialog.background { + background-color: #484848; +} + +box, grid { + border-width: 0; + border-style: none; + border-radius: 0; + margin: 0.083333333333333333em; + padding: 0; + min-height: 0.4166666666666666em; + min-width: 0.4166666666666666em; +} +label { + padding: 0.083333333333333333em 0; + margin: 0.19em; + min-height: 1.333333333333333333em; +} + +/* Affects all frames except in the toolbox */ +frame { + border-width: 0; + border-color: #303030; + border-radius: 0; + border-style: solid; + /*border-style: none none none solid;*/ + padding: 0; + margin: 0; + background-color: rgba(0,0,0,0.); + min-height: 0; + min-width: 0; +} + +/* Create space between frame contents and frame border */ +frame border { + border-width: 0.083333333333333333em; + padding: 0.3333333333333333em; + border-radius: 0.3333333333333333em; + background-color: #383838; + margin: 0; + min-height: 0; + min-width: 0; +} + +frame > label { + margin: 0 0 0 0.3333333333333333em; + color: #D8D8D8; + padding: 0.416666666666666666em 0; +} + +/* affects selection list*/ +entry > window > frame { + margin: 0; +} + +tooltip { + border-radius: 0.416666666666666666em; + background-color: rgba(0,0,0,0.95); + border-style: none; + box-shadow: none; + padding: 0; + margin: 0; +} + +treeview header button { + background-image: linear-gradient(#343434, #2E2E2E, #292929); +} + +/*** Separator *********************************************************************************/ +separator, +.separator { + border: none; + min-width: 0.083333333333333333em; + min-height: 0.083333333333333333em; +} +grid separator, box separator { + background-color: rgba(0, 0, 0, 0.17); +} +grid separator.horizontal, box separator.horizontal { + margin: 0.5em 0.25em; +} +grid separator.vertical, box separator.vertical { + margin: 0.25em 0.5em; +} + +popover separator:not(:only-child) { + margin: 0 0.5em; +} + +paned.horizontal > separator { + margin: 0 0.16666666666666666em; +} +/* Double line separator */ +paned.vertical > separator { + margin: 0.25em 0; +} + +dialog paned.horizontal > separator { + min-width: 0.333333333333333333em; +} + +menu separator { + margin: 0.25em 0.5em; +} + +#Navigator separator { + margin: 0; +} + +.scrollableToolbar separator.vertical { + margin: 0.19em; +} + +#MyExpander separator.horizontal { + margin: 0.25em 0.19em; +} +#MyFileChooserButton separator { +} + +#PlacesPaned .view.separator { +} + +#MetaPanelNotebook separator { + margin: 0.19em 0; +} +/*** end****************************************************************************************/ + +#FileBrowser { + padding: 0.1666666666666666em; + margin: 0; +} + +#FileCatalog { + background-color: #393939; +} +#FileCatalog:selected { + background-color: #565656; +} + +#BeforeAfterContainer frame { + background-color: #262626; + padding: 0; + margin: 0.0833333333333333em; +} + +#BeforeAfterContainer frame border { + border-radius: 0; + margin: 0; + padding: 0; +} + + +/* Frames in the toolbox. Not MyExpander frames. */ +eventbox.frame { + border-color: #565656; +} + +/*** Load - Save dialog ************************************************************************/ +filechooser { +margin-bottom: 0.25em; +} + +filechooser box > box box > button { +margin-top: 0.5em; +margin-right: 0; +} + +filechooser #pathbarbox { + padding: 0.5em; +} + +/* Right side */ +filechooser > box > paned > box:nth-child(3) { + border-width: 0.083333333333333333em; + padding: 0; + margin: 0; +} +filechooser > box > paned > box:nth-child(3) > box > * > * > * > frame { + padding: 0; + margin: -0.6666666666666666em -0.083333333333333333em; +} +/**/ +filechooser placessidebar viewport.frame { + padding: 0; + margin: -0.3333333333333333em 0 -0.083333333333333333em; + border-width: 0.083333333333333333em; +} +filechooser placessidebar list row image { + min-width: 1.333333333333333333em; + min-height: 1.333333333333333333em; +} +filechooser placessidebar list row { + margin: 0; + padding: 0 0.5em 0 0.83333333333333333em; + min-height: calc(1.416666666666666666em + 8px); +} +filechooser placessidebar list row label{ + margin: 0 0 0 0.583333333333333333em; +} + +/*** end ***************************************************************************************/ + +/*** Scrollbar ***************************************/ +scrollbar { + border: none; + margin: 0; + padding: 0; + background-color: #303030; +} +scrollbar slider { + padding: 0; + margin: 0; + background-color: #808080; +} +scrollbar slider:hover { + background-color: #999999; +} + +scrollbar:not(.overlay-indicator).horizontal { + border-width: 0 0.083333333333333333em 0.083333333333333333em 0.083333333333333333em; +} +scrollbar:not(.overlay-indicator).vertical { + border-width: 0.083333333333333333em 0.083333333333333333em 0.083333333333333333em 0; +} +scrollbar:not(.overlay-indicator).horizontal slider, +scrollbar.horizontal.hovering slider { + min-height: 0.5em; + min-width: 2em; + border-width: 0.25em; +} +scrollbar:not(.overlay-indicator).horizontal.fine-tune slider, +scrollbar.horizontal.hovering.fine-tune slider { + min-height: calc(0.5em - 2px); + border-width: calc(0.25em + 1px); + margin: 0 -1px; + /* + min-height: 0.3333333333333333em; + border-width: 0.3333333333333333em; + margin: 0 -0.0833333333333333em; + */ +} +scrollbar.horizontal.overlay-indicator:not(.hovering) slider { + min-width: 2em; + min-height: 0.25em; + border-width: 0; + border-radius: 0.25em; + margin: 0.166666666666666666em 0.25em; + /*margin: 0 0.1666666666666666em;*/ +} + +scrollbar:not(.overlay-indicator).vertical slider, +scrollbar.vertical.hovering slider { + min-height: 2em; + min-width: 0.5em; + border-width: 0.25em; +} +scrollbar:not(.overlay-indicator).vertical.fine-tune slider, +scrollbar.vertical.hovering.fine-tune slider { + min-width: calc(0.5em - 2px); + border-width: calc(0.25em + 1px); + margin: -0.0833333333333333em 0; + /* + min-width: 0.3333333333333333em; + border-width: 0.3333333333333333em; + margin: -0.0833333333333333em 0; + */ +} +scrollbar.vertical.overlay-indicator:not(.hovering) slider { + min-width: 0.25em; + min-height: 2em; + border-width: 0; + border-radius: 0.25em; + margin: 0.1666666666666666em 0; + /*margin: 0.25em 0.166666666666666666em;*/ +} + +/* Scrollbar stuck workaround */ +scrollbar:not(.overlay-indicator):hover { + min-width: 1px; +} + +/* Toolbar stuck workaround */ +.scrollableToolbar > scrollbar:not(.dummy), +.scrollableToolbar > scrollbar:not(.dummy) > contents:not(.dummy), +.scrollableToolbar > scrollbar:not(.dummy) > contents:not(.dummy) > trough:not(.dummy), +.scrollableToolbar > scrollbar:not(.dummy) > contents:not(.dummy) > trough:not(.dummy) > slider:not(.dummy) { + padding: 0; + margin: 0; + min-height: 0; + min-width: 0; + border: none; +} + +/**************************************************/ + +button { + padding: 0; + box-shadow: none; + min-height: 0.4166666666666666em; + min-width: 0.4166666666666666em; + background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3)); +} + +button:disabled { + opacity: 1; +} + +button.flat { + background-image: none; +} + +button.flat:checked { + background-image: linear-gradient(#343434, #2E2E2E, #292929); +} + +checkbutton > check { + background-image: linear-gradient(#343434, #2E2E2E, #292929); +} + +radiobutton > radio { + background-image: linear-gradient(#343434, #2E2E2E, #292929); +} + +button.flat:hover, checkbutton:hover > check, radiobutton:hover > radio { + background-image: linear-gradient(shade(#343434,1.3), shade(#2E2E2E,1.3), shade(#292929,1.3)); +} + +button.popupbutton-arrow { + min-width: 1.5em; +} + +button:hover { + background-image: linear-gradient(to bottom, rgba(150,150,150,.3), rgba(80,80,80,.3)); +} + +button:active { + background-image: linear-gradient(to bottom, rgba(30,30,30,.3), rgba(0,0,0,.3)); +} + +button:checked { + background-image: linear-gradient(to bottom, rgba(30,30,30,.8), rgba(0,0,0,.8)); +} + +button:checked:hover { + background-image: linear-gradient(to bottom, rgba(60,60,60,1), rgba(30,30,30,1)); +} + +/* Save, Cancel, OK ... buttons */ +.dialog-action-area button { + min-height: 2em; + margin-top: 0.5em; +} +/**/ + +/*** Scale**************************************************************************************/ +scale { + padding: 0; + min-height: 0.4166666666666666em; + margin: 0 0.5833333333333333em 0 0; +} + +scale slider { + /* Slider size is min-width x min-height ; margin have to be half of those values, but negative */ + min-width: 0; + min-height: 0; + margin: -0.583333333333333333em; + padding: 0.583333333333333333em; + border-radius: 1.166666666666666666em; + border-width: 0.083333333333333333em; + background-image: linear-gradient(#343434, #2E2E2E, #292929); +} +scale slider:hover { + background-image: linear-gradient(#444444, #3E3E3E, #393939); +} +scale:disabled slider { + background-image: none; + background-color: #444; + border-color: #282828; +} +scale trough { + margin: 0.5em 0.5em; /* have to be half of "scale slider / min-width min-height" */ + min-height: 0.2em; + min-width: 0.2em; + padding: 0 0.583333333333333333em; + border-width: 0.083333333333333333em; + border-radius: 0.333333333333333333em; + background-color: #2A2A2A; +} +scale:disabled trough { + background-color: #444; + border-color: #282828; +} +scale.color trough { + border-width: 0.083333333333333333em; + min-height: 0.333333333333333333em; + min-width: 0.333333333333333333em; + border-radius: 0; + padding: 0; +} + +scale trough highlight { + border: none; + margin: 0 -0.583333333333333333em; + border-radius: 0.2em; + min-height: 0; + min-width: 0; + padding: 0.1em 0.1em 0 0; /*height of trough */ +} + +scale.fine-tune trough highlight { + padding: 0.5em 0.5em 0 0; + border-radius: 0.5em; +} +/*** end ***************************************************************************************/ + + +/*.EditorTopPanel .button, .ToolBarPanelFileBrowser .button, .EditorZoomPanel .button {*/ +.button { + padding: 0.0833333333333333em; + margin: 0.0833333333333333em; + padding: 0; + min-height: 0.4166666666666666em; + min-width: 0.4166666666666666em; + border-radius: 0.25em; +} + +/* Adjusters */ +.text-button { + padding: 0; +} + +/* Any text-button which is a real button, unlike Slider label */ +.text-button.button { + padding: 0.3333333333333333em; +} + +/* Better on/off state separation for text toggle buttons, e.g. auto-levels or histogram matching. */ +button.text-button.toggle { + background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3)); +} + +button.text-button.toggle:hover { + background-image: linear-gradient(to bottom, rgba(128,128,128,.3), rgba(64,64,64,.3)); +} + +button.text-button.toggle:checked { + background-image: linear-gradient(to bottom, rgba(30,30,30,.3), rgba(0,0,0,.4)); +} + +button.text-button.toggle:hover:checked { + background-image: linear-gradient(to bottom, rgba(48,48,48,.3), rgba(0,0,0,.3)); +} + +/* */ + +.drawingarea { + border-radius: 0; + background-color: #2A2A2A; + border: 0.0833333333333333em solid #888888; +} +.drawingarea:disabled { + background-color: #444; + border-color: #282828; +} + +.drawingarea:selected { + background-color: #565656; + border-radius: 0.8333333333333333em; +} + +image { + padding: 0.0833333333333333em; +} + +/* Vertical group of buttons in 1 column */ +button.Top { + border-radius: 0.25em 0.25em 0 0; + border-style: solid solid none solid; + margin-bottom: 0; +} +button.MiddleV { + border-radius: 0; + border-style: none solid none solid; + margin-top: 0; + margin-bottom: 0; +} +button.Bottom { + border-radius: 0 0 0.25em 0.25em; + border-style: none solid solid solid; + margin-top: 0; +} +/* end */ + +/* Horizontal group of buttons in 1 row */ +#MetaPanelNotebook scrolledwindow + grid > button.Left, +#MetaPanelNotebook scrolledwindow + grid + grid > button.Left, +#ProfilePanel button.Left, +button.Left { + border-radius: 0.25em 0 0 0.25em; + border-style: solid none solid solid; + margin-right: 0; +} +#MetaPanelNotebook scrolledwindow + grid > button.MiddleH, +#MetaPanelNotebook scrolledwindow + grid + grid > button.MiddleH, +#ProfilePanel button.MiddleH, +button.MiddleH { + border-radius: 0; + border-style: solid none solid none; + margin-left: 0; + margin-right: 0; +} +#MetaPanelNotebook scrolledwindow + grid > button.Right, +#MetaPanelNotebook scrolledwindow + grid + grid > button.Right, +#ProfilePanel button.Right, +button.Right { + border-radius: 0 0.25em 0.25em 0; + border-style: solid solid solid none; + margin-left: 0; +} +/* end */ + +/* [1.23[-][+]] */ +entry, spinbutton { + min-height: 0.8333333333333333em; + background-color: #262626; + border-radius: 0.2em; +} + +spinbutton entry { + padding-right: 0.25em; +} +spinbutton button { + margin: 0; + padding: 0; + border-radius: 0; +} +spinbutton button.up { + border-radius: 0 0.16666666666666666666em 0.16666666666666666666em 0; +} + +entry:disabled, spinbutton:disabled { + background-color: #363636; +} + +entry:hover, spinbutton:hover { + background-color: #565656; +} + +entry:selected { + color: #262626; + background-color: #AAAAAA; +} + +/* Context menus */ +menu { + background-color: #262626; + color: #909090; +} + +/* Context menu item */ +menuitem { + padding: 0.1666666666666666em; + margin: 0; + min-height: 0.8333333333333333em; +} + +/* FlowBoxChild */ +flowboxchild:selected { + background-color: inherit; +} + +/*** Histogram *********************************************************************************/ +#HistogramPanel { + min-height: 0; + margin: 0; + padding: 0; + border: none; +} + +#HistogramPanel > :nth-child(2) { + border: none; + border-left-width: 0.083333333333333333em; +} + +#HistogramPanel > :nth-child(1) { + border: none; +} + +#EditorLeftPaned #HistogramPanel > :nth-child(1) { + border: none; + border-right-width: 0.083333333333333333em; +} + +#EditorLeftPaned #HistogramPanel > :nth-child(2) { + border: none; +} + +#HistogramArea, +#HistogramRGBArea { + border-width: 0.083333333333333333em; +} + +#histButton { + padding: 0.25em 0.25em 0; + margin: 0 0 -1px 0; + min-height: 1.333333333333333333em; + min-width: 1.333333333333333333em; +} +#histButton:last-child { + padding-bottom: 0.25em; + margin: 0; +} + +/* Vertical version of slider. */ +#histScale { + min-height: 4em; + min-width: 0.4166666666666666em; + margin: 0.5833333333333333em 0 0 0; +} +#histScale trough { + padding: 0.583333333333333333em 0; +} +#histScale trough highlight { + margin: -0.583333333333333333em 0; + padding: 0.1em 0 0 0.1em; +} +#histScale.fine-tune trough highlight { + padding: 0.5em 0 0 0.5em; +} + +/* Copied from button.flat style. */ +button.radio#histButton { + background-image: none; +} + +button.radio#histButton:checked { + background-image: linear-gradient(#343434, #2E2E2E, #292929); +} + +button.radio#histButton:hover { + background-image: linear-gradient(shade(#343434,1.3), shade(#2E2E2E,1.3), shade(#292929,1.3)); +} + +/*** end ***************************************************************************************/ + +#MyExpander { + margin: 0; + padding: 0; +} +#MyExpander.withScrollbar { + margin-right: 0.25em; +} + +/* Tool background */ +#ExpanderBox > box, #ExpanderBox > grid { + background-color: #363636; + border-width: 0.0833333333333333em; + border-style: solid; + border-radius: 0.3333333333333333em; + border-color: #252525; + margin: 0; + padding: 0.25em; +} + +#ExpanderBox drawingarea { + background-color: #363636; +} + +#LocallabToolPanel frame, +#ExpanderBox frame, +#ExpanderBox2 frame, +#ExpanderBox3 frame { + padding: 0.1666666666666666em 0 0 0; + border-style: none; +} +#ExpanderBox frame > border { + background-color: #3B3B3B; + border-style: solid; + border-width: 0.0833333333333333em; + border-radius: 0.3333333333333333em; + border-color: #313131; + margin: 0.25em; + padding: 0.25em; +} + +#LocallabToolPanel frame > label, #LocallabToolPanel frame frame > label, +#ExpanderBox frame > label, #ExpanderBox frame frame > label, +#ExpanderBox2 frame > label, #ExpanderBox2 frame frame > label, +#ExpanderBox3 frame > label, #ExpanderBox3 frame frame > label { + margin-left: 7pt; + margin-top: 0; +} + +#LocallabToolPanel frame > box, #LocallabToolPanel frame frame > box, #LocallabToolPanel frame > grid, #LocallabToolPanel frame frame > grid, +#ExpanderBox frame > box, #ExpanderBox frame frame > box, #ExpanderBox frame > grid, #ExpanderBox frame frame > grid, +#ExpanderBox2 frame > box, #ExpanderBox2 frame frame > box, #ExpanderBox2 frame > grid, #ExpanderBox2 frame frame > grid, +#ExpanderBox3 frame > box, #ExpanderBox3 frame frame > box, #ExpanderBox3 frame > grid, #ExpanderBox3 frame frame > grid { + margin: 0.1666666666666666em; +} + +#LocallabToolPanel > box > checkbutton, #LocallabToolPanel > box > box, #LocallabToolPanel > grid > checkbutton, #LocallabToolPanel > box > grid, #LocallabToolPanel > grid > grid, #LocallabToolPanel frame > box > grid, #LocallabToolPanel frame > grid > grid, #LocallabToolPanel frame > grid > box, +#ExpanderBox > box > checkbutton, #ExpanderBox > box > box, #ExpanderBox > grid > checkbutton, #ExpanderBox > box > grid, #ExpanderBox > grid > grid, #ExpanderBox frame > box > grid, #ExpanderBox frame > grid > grid, #ExpanderBox frame > grid > box, +#ExpanderBox2 > box > checkbutton, #ExpanderBox2 > box > box, #ExpanderBox2 > grid > checkbutton, #ExpanderBox2 > box > grid, #ExpanderBox2 > grid > grid, #ExpanderBox2 frame > box > grid, #ExpanderBox2 frame > grid > grid, #ExpanderBox2 frame > grid > box, +#ExpanderBox3 > box > checkbutton, #ExpanderBox3 > box > box, #ExpanderBox3 > grid > checkbutton, #ExpanderBox3 > box > grid, #ExpanderBox3 > grid > grid, #ExpanderBox3 frame > box > grid, #ExpanderBox3 frame > grid > grid, #ExpanderBox3 frame > grid > box { + margin-top: 0.1666666666666666em; +} + +#ExpanderBox frame drawingarea { + background-color: #3B3B3B; +} + +#ExpanderBox frame frame > border { + background-color: #414141; + border: 0.0833333333333333em solid #373737; + border-radius: 0.3333333333333333em; + margin: 0.25em; + padding: 0.25em; +} + +#ExpanderBox frame frame drawingarea { + background-color: #414141; +} + +/* Sub-tool (MyExpander) background */ +#LocallabToolPanel > box, #LocallabToolPanel > grid, +#ExpanderBox2 > box, #ExpanderBox2 > grid { + background-color: #3B3B3B; + border: 0.0833333333333333em solid #2A2A2A; + border-radius: 0.3333333333333333em; + margin: 0; + padding: 0.25em; +} + +#LocallabToolPanel drawingarea, +#ExpanderBox2 drawingarea { + background-color: #3B3B3B; +} + +#LocallabToolPanel frame > border, +#ExpanderBox2 frame > border { + background-color: #414141; + border: 0.0833333333333333em solid #373737; + border-radius: 0.3333333333333333em; + margin: 0.25em; + padding: 0.25em; +} + +#LocallabToolPanel frame drawingarea, +#ExpanderBox2 frame drawingarea { + background-color: #414141; +} + +#LocallabToolPanel frame frame > border, +#ExpanderBox2 frame frame > border { + background-color: #474747; + border: 0.0833333333333333em solid #3D3D3D; + border-radius: 0.3333333333333333em; + margin: 0.25em; + padding: 0.25em; +} + +#LocallabToolPanel frame frame drawingarea, +#ExpanderBox2 frame frame drawingarea { + background-color: #474747; +} + +#MyExpanderTitle > box { + margin: 0.1666666666666667em 0; + padding: 0.1666666666666667em 0; +} + +#MyExpanderTitle label { + color: #CCCCCC; + padding: 0; + margin: 0 0.25em 0 0.25em; + font-size: 1.1em; + font-weight: bold; +} +#MyExpanderTitle:hover { + background-color: #202020; +} +#MyExpanderTitle eventbox:hover image { + background-color: #202020; + border-radius: 0.25em; +} +#MyExpanderTitle:hover label { + color: #D8D8D8; +} + +#LocallabToolPanel separator, #ExpanderBox2 separator, #ExpanderBox3 separator { + color: #292929; +} + +/* Editor tab button */ +#MainNotebook grid label, #MainNotebook grid image { + padding: 0.0833333333333333em; +} + +/* File Browser right side tabs - Toolbox, Inspector, Fast Export, Filter */ +notebook { + padding: 0; + margin: 0; + border-style: none; +} + +notebook header { + box-shadow: none; + background-color: #383838; + border-width: 0.0833333333333333em; + border-style: none; + border-color: #262626; + border-radius: 0; + padding: 0.1666666666666666em; + margin: 0; +} + +notebook tabs { + padding: 0.0833333333333333em; + margin: 0; +} + +notebook tab { + padding: 0.0833333333333333em; + margin: 0.1666666666666666em; + min-height: 1.25em; + min-width: 1.25em; +} + +notebook tab:hover { + background-color: #505050; +} + +notebook tab button { + padding: 0 0; + margin: 0 0.25em; +} + +/* Get rid of shitty notebook header shadow */ +notebook header.top { + border-bottom-style: solid; + padding-bottom: 0.25em; +} +notebook header.right { + border-left-style: solid; + padding-left: 0.25em; +} +notebook header.bottom { + border-top-style: solid; + padding-top: 0.25em; +} +notebook header.left { + border-right-style: solid; + padding-right: 0.25em; +} + +notebook.frame { + /* OK */ + border-radius: 0; + border-style: none; +} + +/* Pad notebooks, makes the other borders look nicer */ +notebook stack { + /* OK */ + background-color: #484848; + padding: 0; + margin: 0; +} + +paned box, paned grid { + padding: 0; + margin: 0; + border-style: none; +} + +paned > separator { + border-width: 0.0833333333333333em 0.0833333333333333em 0 0; + border-style: solid; + border-color: #404040; + padding: 0; + margin: 0.3333333333333333em; +} +fontchooser scrolledwindow, +#PlacesPaned scrolledwindow, +#HistoryPanel scrolledwindow, +#Snapshots scrolledwindow { + border-width: 0.083333333333333333em; +} + +#PlacesPaned { + margin: 0; + padding: 0 0.4166666666666666em 0 0; +} +#PlacesPaned > box:nth-child(1) scrolledwindow + grid { + margin: 0; + border-top-width: 0.083333333333333333em; +} +#PlacesPaned > box:nth-child(3) treeview { + padding: 0; +} + +#MainNotebook > header.left tab image { + margin: 0.5em 0 0 0; +} +#MainNotebook > header.top tab image { + margin: 0 0.5em 0 0; +} +#MainNotebook > header.left tab { + margin: 0.5em 0 0.5em 0; +} +#MainNotebook > header.top tab { + margin: 0 0.5em 0 0.5em; +} + +#MainNotebook header { + /* OK */ + background-color: #2A2A2A; + border: 0; + padding: 0; +} +#MainNotebook tabs { + /* OK */ + background-color: #2A2A2A; +} +#MainNotebook tab:hover { + /* OK */ + background-color: #505050; +} +#MainNotebook tab:active { + /* OK */ + border-color: #989898; +} +#MainNotebook tab:checked { + background-color: #505050; +} + +#RightNotebook > stack > :nth-child(1) checkbutton + scrolledwindow { + min-height: calc(6em + 43px); +} +#RightNotebook > stack > scrolledwindow frame, +#BatchQueueButtonsMainContainer frame, +#MyExpander frame, +dialog frame { + margin: 0; + padding: 0.19em 0.583333333333333333em; +} +#RightNotebook > stack > scrolledwindow frame > border, +#BatchQueueButtonsMainContainer > frame > border, +#MyExpander frame > border, +dialog frame > border { + padding: 0 0.333333333333333333em 0.333333333333333333em; + border-width: 0.083333333333333333em; + margin: 0 -0.583333333333333333em; +} +#RightNotebook > stack > scrolledwindow frame > label:not(.dummy), +#BatchQueueButtonsMainContainer frame > label:not(.dummy), +#ToolPanelNotebook frame > label:not(.dummy), +dialog frame > label:not(.dummy) { + padding: 0.25em 0.5em; +} +#BatchQueueButtonsMainContainer frame > border { + margin-bottom: 0.833333333333333333em; +} +#BatchQueueButtonsMainContainer frame:nth-child(3) > border { + padding-left: 0.916666666666666666em; +} + +#RightNotebook header { + background-color: #2A2A2A; +} +#RightNotebook tabs { + background-color: #2A2A2A; + padding-bottom: 0.083333333333333333em; +} +#RightNotebook tab:hover { + background-color: #505050; + color: #D6D6D6; +} +#RightNotebook tab:active { + border-color: #A5A5A5; +} + +#LabelRightNotebook { + padding: 0.4166666666666666em; + margin: 0.1666666666666666em; + font-size: 1.25em; +} + +#ToolPanelNotebook { + min-width: 25em; +} + +#ToolPanelNotebook header { + background-color: #383838; + border-color: #262626; + padding: 0; + margin: 0; +} + +#ToolPanelNotebook header tabs { + background-color: #2A2A2A; + margin: 0; +} + +#ToolPanelNotebook header tab { + padding: 0.25em; + margin: 0; +} + +/* All tool panels have a frame except for Meta which unlike the rest is a notebook itself. + * So we use CSS to make it look like a frame. */ +#MetaPanelNotebook > stack > box { + border: 0.0833333333333333em solid #262626; + background-color: #363636; + border-radius: 0 0 0.3333333333333333em 0.3333333333333333em; + border-top-style: none; + padding: 0 0.25em 0.25em 0.25em; + margin: 0 0.4166666666666666em 0.4166666666666666em 0.4166666666666666em; +} + +#MetaPanelNotebook header { + border: 0.0833333333333333em solid #262626; + background-color: #363636; + border-radius: 0.3333333333333333em 0.3333333333333333em 0 0; + border-bottom-style: none; + padding: 0.4166666666666666em; + margin: 0.4166666666666666em 0.4166666666666666em 0 0.4166666666666666em; +} + +#MetaPanelNotebook > header > tabs { + background-color: #363636; +} + +#MetaPanelNotebook > header tab { + margin: 0 0.4166666666666666em; + padding: 0.4166666666666666em; +} + +#MetaPanelNotebook textview { + border-radius: 0.25em; +} + +#MetaPanelNotebook entry, #MetaPanelNotebook scrolledwindow, #MetaPanelNotebook combobox { + margin: 0.1666666666666666em 0 0.1666666666666666em 0; +} + +#MetaPanelNotebook entry { + padding: 0 0.0833333333333333em; +} + +#MetaPanelNotebook label { + padding: 0 0.4166666666666666em; +} + +#MetaPanelNotebook text { + border-color: #202020; + background-color: #262626; + border-style: solid; + border-width: 0.0833333333333333em; + border-radius: 0.25em; +} + +#MetaPanelNotebook stack > box > scrolledwindow > viewport { + margin-left: 1.25em; +} + +#PreviewWindow { + border-style: solid; +} + +/* Decently sized tabs */ +#PrefNotebook tab, #AboutNotebook tab { + padding: 0.8em; +} + +#PrefNotebook, #AboutNotebook { + padding: 0; + margin: 0 0 3pt 0; +} + +#PrefNotebook header, #AboutNotebook header { + padding: 0; + margin: 0; +} + +#PrefNotebook header tabs, #AboutNotebook header tabs { + padding: 0; + margin: 0; +} + +#PrefNotebook stack, #AboutNotebook stack { + padding: 3pt; + margin: 0; +} +#PrefNotebook box > frame > border { + padding-top: 0; + padding-bottom: 0.25em; +} +#PrefNotebook scrolledwindow scrolledwindow { + border-width: 0.083333333333333333em; +} + +/* Add space between bottom panel and window edge */ +#IopsPanel { + padding: 0 0.1666666666666666em 0.1666666666666666em; +} + +#EditorLeftPaned:last-child { + padding: 0.8333333333333333em 0 0 0.8333333333333333em; +} + +#EditorRightPaned:last-child { + padding: 0; +} + +#MainNotebook > header #CloseButton { + padding: 0; + margin: 0 0 0 0.3em; +} +#MainNotebook > header #CloseButton image { + padding: 0; + margin: 0; +} + +#RightNotebook #ToolPanelNotebook stack { + margin: 0; +} + +#RightNotebook #HistoryPanel { + min-width: 17.5em; + margin-top: 0.333333333333333333em; +} + +#RightNotebook scrolledwindow { + padding: 0; +} +#HistoryPanel { + margin-top: 0.25em; +} +#HistoryPanel > border { + margin-top: 1.75em; +} +#HistoryPanel > label { + margin: 0 0 -1.5em 0; + padding: 0 0 0 0.083333333333333333em; +} +#Snapshots { + margin-top: 0.166666666666666666em; +} +#Snapshots > border { + min-height: calc(6em + 36px); +} +#Snapshots > label { + margin-bottom: -4px; +} +#Snapshots scrolledwindow + box { + margin: -8px 0 -4px ; + border-top-width: 0.083333333333333333em; +} +#Navigator { + padding-top: 0.25em; + padding-bottom: 0.25em; +} +#Navigator label { + padding: 0; + margin: 0.083333333333333333em 0; +} + +/*** PartialPaste ******************************************************************************/ +#PartialPaste { + border-width: 0.083333333333333333em; + padding-top: 0.5em; + padding-bottom: 0.5em; +} + +#PartialPaste separator.vertical { + margin: 0 0.333333333333333333em; + padding: 0; +} + +#PartialPaste separator { /* Struggles with #PartialPasteHeaderSep */ + margin: 0.166666666666666666em 0.5em 0.166666666666666666em 1.166666666666666666em; +} +#PartialPasteHeaderSep.horizontal { + margin: 0.166666666666666666em 0.5em; +} + +/* +#PartialPasteHeader label { +} +*/ + +/* make the "partial profile" dialog a little bit more readable */ +#PartialPasteHeader { + margin: 1.5em 0 0 0; + padding: 0; + font-weight: bold; +} + +#PartialPasteHeaderSep { + background-color: #D8D8D8; +} + +/*** end ***************************************************************************************/ + + +/* All MyFileChooserButtons */ +button#MyFileChooserButton { + padding: 0.1666666666666666em; + margin: 0.1666666666666666em; +} + +#ToolPanelNotebook button { + margin: 0; +} + +button.flat { + background: none; + border: none; + outline: none; +} + +button.flat:checked { + background: #262626; +} + +.text-button, .image-button, .independent { + box-shadow: none; + min-height: 2em; + min-width: 2em; + padding: 0; +} + +/* Makes image-comboboxes (e.g. tone curve types) have same size as image buttons */ +combobox, .popupbutton-arrow { + min-height: 2em; +} + +/* Makes image-combobox small icons centered */ +button.toggle > grid > image { + padding: 0.3333333333333333em; +} + +#histButton { + background: none; + min-height: 1.3333333333333333em; + min-width: 1.3333333333333333em; +} + +/* -gtk-icon-shadow looks buggy on the small histogram icons */ +#histButton:hover { + -gtk-icon-shadow: none; +} + +.narrowbutton { + min-width: 0.8333333333333333em; +} + + +.smallbuttonbox button { + min-width: 1.3333333333333333em; + min-height: 1.3333333333333333em; +} + + +/* Adds gap between combobox contents and combobox edges */ +button.combo, .image-combo .toggle, #MyFileChooserButton { + padding-left: 0.3333333333333333em; + padding-right: 0.3333333333333333em; +} + +/*** Progressbar *******************************************************************************/ +progressbar trough { + background-color: #383838; + border: none; +} + +progressbar progress { + border-color: #363636; + /*border-radius: 0.25em;*/ + background-color: #215d9c; +} +/*** end ***************************************************************************************/ + +/* Add padding to grid cells */ + +.grid-spacing > * { + margin: 0.1666666666666666em; +} \ No newline at end of file diff --git a/rtdata/themes/RawTherapee-GTK3-20_.css b/rtdata/themes/RawTherapee-GTK3-20_.css index 76f0004ee..57c6db148 100644 --- a/rtdata/themes/RawTherapee-GTK3-20_.css +++ b/rtdata/themes/RawTherapee-GTK3-20_.css @@ -1,9 +1,8 @@ /* This file is part of RawTherapee. - Copyright (c) 2015-2017 DrSlony - Copyright (c) 2016-2019 Hombre - Copyright (c) 2016-2019 TooWaBoo + Copyright (c) 2015-2020 RawTherapee + Contributions by DrSlony, Hombre, TooWaBoo, Thanatomanic RawTherapee is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,26 +19,24 @@ */ /***************************/ -/**/ @import "size.css"; /**/ +/**/ @import "size.css"; /**/ /* TODO: Remove this weird dependency */ /***************************/ -/* text-shadow causes a serious performance degradation in rendering the UI, - * at least in comboboxes with many entries (i.e. Profiled Lens Correction). -*/ - +/** Set style defaults **/ * { - color: #AAAAAA; - text-shadow: none; + color: #BBBBBB; + text-shadow: none; /* Keep at none, or suffer serious performance issues */ + font-size: 1em; } *:disabled { - color: #666666; - opacity: 0.7; + color: rgba(255,255,255,0.25); + opacity: 0.8; } .view:selected:not(check):not(radio) { color: #262626; - background-color: #AAAAAA + background-color: #AAAAAA; } /* The Places and Dir browser panels */ @@ -53,7 +50,6 @@ textview.view, treeview.view { /* The headers of these panels */ .view .button { background-color: #363636; - /*padding: 0.1666666666666666em;*/ } window > box { @@ -64,17 +60,15 @@ window.background { } /*** Window decoration *********************************************************/ -@define-color winHeaderbar rgb(50,50,50); - .csd:not(.popup):not(tooltip) > decoration { background-color: #484848; background-image: none; box-shadow: 0 0.25em 0.75em 0.083333333333333333em rgba(0, 0, 0, 0.5), 0 0 0 0.083333333333333333em #242424; } headerbar { - background-color: shade(@winHeaderbar,1.12); + background-color: shade(rgb(50,50,50),1.12); box-shadow: inset 0 0.083333333333333333em rgba(200,200,200,.13); - background-image: linear-gradient(shade(@winHeaderbar,1.14), shade(@winHeaderbar,.86)); + background-image: linear-gradient(shade(rgb(50,50,50),1.14), shade(rgb(50,50,50),.86)); border-bottom-color: #242424; } dialog > box { @@ -90,7 +84,6 @@ window.csd:not(.fullscreen) #MainNotebook > header.top { .maximized > headerbar { border-radius: 0; } -/**/ /*** End Window decoration *****************************************************/ @@ -128,33 +121,20 @@ label { /* Affects all frames except in the toolbox */ frame { - border-width: 0; - border-color: #303030; - border-radius: 0; - border-style: solid; - /*border-style: none none none solid;*/ padding: 0; - margin: 0; - background-color: rgba(0,0,0,0.); - min-height: 0; - min-width: 0; + margin-bottom: 0.75em; } /* Create space between frame contents and frame border */ frame border { - border-width: 0.083333333333333333em; - padding: 0.3333333333333333em; + border: 1px solid #262626; border-radius: 0.3333333333333333em; - background-color: #383838; - margin: 0; - min-height: 0; - min-width: 0; + padding: 0.083333333333333333em; } frame > label { - margin: 0 0 0 0.3333333333333333em; color: #D8D8D8; - padding: 0.416666666666666666em 0; + padding: 0.416666666666666666em 0.25em; } /* affects selection list*/ @@ -199,7 +179,7 @@ popover separator:not(:only-child) { paned.horizontal > separator { margin: 0 0.16666666666666666em; } -/* Double line separator */ + paned.vertical > separator { margin: 0.25em 0; } @@ -419,19 +399,19 @@ button.flat { } button.flat:checked { - background-image: linear-gradient(#343434, #2E2E2E, #292929); + background-image: linear-gradient(#545454, #4E4E34, #494949); } checkbutton > check { - background-image: linear-gradient(#343434, #2E2E2E, #292929); + background-image: linear-gradient(#545454, #4E4E4E, #494949); } radiobutton > radio { - background-image: linear-gradient(#343434, #2E2E2E, #292929); + background-image: linear-gradient(#545454, #4E4E4E, #494949); } button.flat:hover, checkbutton:hover > check, radiobutton:hover > radio { - background-image: linear-gradient(shade(#343434,1.3), shade(#2E2E2E,1.3), shade(#292929,1.3)); + background-image: linear-gradient(shade(#545454,1.3), shade(#4E4E4E,1.3), shade(#494949,1.3)); } button.popupbutton-arrow { @@ -476,10 +456,10 @@ scale slider { padding: 0.583333333333333333em; border-radius: 1.166666666666666666em; border-width: 0.083333333333333333em; - background-image: linear-gradient(#343434, #2E2E2E, #292929); + background-image: linear-gradient(#444444, #3E3E3E, #393939); } scale slider:hover { - background-image: linear-gradient(#444444, #3E3E3E, #393939); + background-image: linear-gradient(#545454, #4E4E4E, #494949); } scale:disabled slider { background-image: none; @@ -493,7 +473,7 @@ scale trough { padding: 0 0.583333333333333333em; border-width: 0.083333333333333333em; border-radius: 0.333333333333333333em; - background-color: #2A2A2A; + background-color: rgba(0,0,0,0.15); } scale:disabled trough { background-color: #444; @@ -574,7 +554,7 @@ button.text-button.toggle:hover:checked { .drawingarea:selected { background-color: #565656; - border-radius: 0.8333333333333333em; + border-radius: 1.8333333333333333em; } image { @@ -631,7 +611,7 @@ button.Right { /* [1.23[-][+]] */ entry, spinbutton { min-height: 0.8333333333333333em; - background-color: #262626; + background-color: rgba(0,0,0,0.075); border-radius: 0.2em; } @@ -720,151 +700,150 @@ flowboxchild:selected { margin: 0; } +/* Vertical version of slider. */ +#histScale { + min-height: 4em; + min-width: 0.4166666666666666em; + margin: 0.5833333333333333em 0 0 0; +} +#histScale trough { + padding: 0.583333333333333333em 0; +} +#histScale trough highlight { + margin: -0.583333333333333333em 0; + padding: 0.1em 0 0 0.1em; +} +#histScale.fine-tune trough highlight { + padding: 0.5em 0 0 0.5em; +} + +/* Copied from button.flat style. */ +button.radio#histButton { + background-image: none; +} + +button.radio#histButton:checked { + background-image: linear-gradient(#343434, #2E2E2E, #292929); +} + +button.radio#histButton:hover { + background-image: linear-gradient(shade(#343434,1.3), shade(#2E2E2E,1.3), shade(#292929,1.3)); +} + /*** end ***************************************************************************************/ +/*** Modules ***********************************************************************************/ +#EditorModules > box { + margin: 0; + padding: 0; +} + #MyExpander { margin: 0; padding: 0; } -#MyExpander.withScrollbar { - margin-right: 0.25em; + +#MyExpander.withScrollbar { /* This margin is always added */ + margin-right: 1em; } +#MyExpander.withScrollbar #MyExpander { /* No margin for nested expanders */ + margin-right: 0; +} + +/* Borders around tools and subtools */ +#MyExpander { + border-top: 0.0833333333333333em solid rgba(0,0,0,0.3); +} +#MyExpander:first-child { + border-top: none; +} +#MyExpander:nth-last-child(2), +#MyExpander #MyExpander:nth-last-child(1) { + border-bottom: 0.0833333333333333em solid rgba(0,0,0,0.3); +} +#MyExpander #MyExpander:nth-last-child(2) { + border-bottom: none; +} + + /* Tool background */ -#ExpanderBox > box, #ExpanderBox > grid { - background-color: #363636; - border-width: 0.0833333333333333em; - border-style: solid; - border-radius: 0.3333333333333333em; - border-color: #252525; - margin: 0; - padding: 0.25em; +#ExpanderBox > box, +#ExpanderBox > grid { + background-color: rgba(255,255,255,0.075); + padding: 0.3em 0.5em 0.6em 0.5em; + border-top: 0.0833333333333333em solid rgba(255,255,255,0.1); + border-bottom: none; } -#ExpanderBox drawingarea { - background-color: #363636; +/* Not all combinations below are used, but this makes sure + also some of the more exotic box and frame layouts are + treated properly. */ +#ExpanderBox frame > box, +#ExpanderBox frame frame > box, +#ExpanderBox2 frame > box, +#ExpanderBox2 frame frame > box, +#ExpanderBox3 frame > box, +#ExpanderBox3 frame frame > box, +#ExpanderBox frame > grid, +#ExpanderBox frame frame > grid, +#ExpanderBox2 frame > grid, +#ExpanderBox2 frame frame > grid, +#ExpanderBox3 frame > grid, +#ExpanderBox3 frame frame > grid { + padding: 0 0.5em 0.5em 0.5em; } -#LocallabToolPanel frame, -#ExpanderBox frame, -#ExpanderBox2 frame, -#ExpanderBox3 frame { - padding: 0.1666666666666666em 0 0 0; - border-style: none; -} -#ExpanderBox frame > border { - background-color: #3B3B3B; - border-style: solid; - border-width: 0.0833333333333333em; - border-radius: 0.3333333333333333em; - border-color: #313131; - margin: 0.25em; - padding: 0.25em; -} - -#LocallabToolPanel frame > label, #LocallabToolPanel frame frame > label, -#ExpanderBox frame > label, #ExpanderBox frame frame > label, -#ExpanderBox2 frame > label, #ExpanderBox2 frame frame > label, -#ExpanderBox3 frame > label, #ExpanderBox3 frame frame > label { - margin-left: 7pt; - margin-top: 0; -} - -#LocallabToolPanel frame > box, #LocallabToolPanel frame frame > box, #LocallabToolPanel frame > grid, #LocallabToolPanel frame frame > grid, -#ExpanderBox frame > box, #ExpanderBox frame frame > box, #ExpanderBox frame > grid, #ExpanderBox frame frame > grid, -#ExpanderBox2 frame > box, #ExpanderBox2 frame frame > box, #ExpanderBox2 frame > grid, #ExpanderBox2 frame frame > grid, -#ExpanderBox3 frame > box, #ExpanderBox3 frame frame > box, #ExpanderBox3 frame > grid, #ExpanderBox3 frame frame > grid { - margin: 0.1666666666666666em; -} - -#LocallabToolPanel > box > checkbutton, #LocallabToolPanel > box > box, #LocallabToolPanel > grid > checkbutton, #LocallabToolPanel > box > grid, #LocallabToolPanel > grid > grid, #LocallabToolPanel frame > box > grid, #LocallabToolPanel frame > grid > grid, #LocallabToolPanel frame > grid > box, -#ExpanderBox > box > checkbutton, #ExpanderBox > box > box, #ExpanderBox > grid > checkbutton, #ExpanderBox > box > grid, #ExpanderBox > grid > grid, #ExpanderBox frame > box > grid, #ExpanderBox frame > grid > grid, #ExpanderBox frame > grid > box, -#ExpanderBox2 > box > checkbutton, #ExpanderBox2 > box > box, #ExpanderBox2 > grid > checkbutton, #ExpanderBox2 > box > grid, #ExpanderBox2 > grid > grid, #ExpanderBox2 frame > box > grid, #ExpanderBox2 frame > grid > grid, #ExpanderBox2 frame > grid > box, -#ExpanderBox3 > box > checkbutton, #ExpanderBox3 > box > box, #ExpanderBox3 > grid > checkbutton, #ExpanderBox3 > box > grid, #ExpanderBox3 > grid > grid, #ExpanderBox3 frame > box > grid, #ExpanderBox3 frame > grid > grid, #ExpanderBox3 frame > grid > box { - margin-top: 0.1666666666666666em; -} - -#ExpanderBox frame drawingarea { - background-color: #3B3B3B; -} - -#ExpanderBox frame frame > border { - background-color: #414141; - border: 0.0833333333333333em solid #373737; - border-radius: 0.3333333333333333em; - margin: 0.25em; - padding: 0.25em; -} - -#ExpanderBox frame frame drawingarea { - background-color: #414141; +/* Necessary hack for extra margin in Wavelets and some other locations */ +#ExpanderBox box > box, +#ExpanderBox2 box > box { + margin: 0.16666666666666em 0; } /* Sub-tool (MyExpander) background */ -#LocallabToolPanel > box, #LocallabToolPanel > grid, -#ExpanderBox2 > box, #ExpanderBox2 > grid { - background-color: #3B3B3B; - border: 0.0833333333333333em solid #2A2A2A; - border-radius: 0.3333333333333333em; +#LocallabToolPanel > box, +#LocallabToolPanel > grid, +#ExpanderBox2 > box, +#ExpanderBox2 > grid { + background-color: rgba(255,255,255,0.075); margin: 0; - padding: 0.25em; -} - -#LocallabToolPanel drawingarea, -#ExpanderBox2 drawingarea { - background-color: #3B3B3B; -} - -#LocallabToolPanel frame > border, -#ExpanderBox2 frame > border { - background-color: #414141; - border: 0.0833333333333333em solid #373737; - border-radius: 0.3333333333333333em; - margin: 0.25em; - padding: 0.25em; -} - -#LocallabToolPanel frame drawingarea, -#ExpanderBox2 frame drawingarea { - background-color: #414141; -} - -#LocallabToolPanel frame frame > border, -#ExpanderBox2 frame frame > border { - background-color: #474747; - border: 0.0833333333333333em solid #3D3D3D; - border-radius: 0.3333333333333333em; - margin: 0.25em; - padding: 0.25em; -} - -#LocallabToolPanel frame frame drawingarea, -#ExpanderBox2 frame frame drawingarea { - background-color: #474747; -} - -#MyExpanderTitle > box { - margin: 0.1666666666666666em 0; - padding: 0.1666666666666666em 0; + padding: 0.25em 0.5em 0.5em 0.25em; + border-top: 0.0833333333333333em solid rgba(255,255,255,0.1); + border-bottom: none; } #MyExpanderTitle label { - color: #CCCCCC; + color: #AAAAAA; padding: 0; - margin: 0 0.25em 0 0.25em; - font-size: 1.1em; + margin: 0; + font-size: 1.1em; /* TODO: Does not work? */ + font-weight: bold; } + +#MyExpander.Fold > #MyExpanderTitle label, +#MyExpander.OnOff.enabledTool > #MyExpanderTitle label { + color: #DDDDDD; +} + #MyExpanderTitle:hover { background-color: #202020; } #MyExpanderTitle eventbox:hover image { background-color: #202020; - border-radius: 0.25em; + margin: 0; + padding: 0; } #MyExpanderTitle:hover label { color: #D8D8D8; } +/* Alignment of tool headers is controlled by the image */ +#MyExpander.Fold > #MyExpanderTitle box > image, +#MyExpander.OnOff > #MyExpanderTitle #MyExpanderStatus image { + padding: 0.3em; + margin: 0.25em 0.25em 0.25em 0; +} + #LocallabToolPanel separator, #ExpanderBox2 separator, #ExpanderBox3 separator { color: #292929; } @@ -873,6 +852,7 @@ flowboxchild:selected { #MainNotebook grid label, #MainNotebook grid image { padding: 0.0833333333333333em; } +/*** end ***************************************************************************************/ /* File Browser right side tabs - Toolbox, Inspector, Fast Export, Filter */ notebook { @@ -888,7 +868,7 @@ notebook header { border-style: none; border-color: #262626; border-radius: 0; - padding: 0.1666666666666666em; + padding: 0; margin: 0; } @@ -932,14 +912,12 @@ notebook header.left { } notebook.frame { - /* OK */ border-radius: 0; border-style: none; } /* Pad notebooks, makes the other borders look nicer */ notebook stack { - /* OK */ background-color: #484848; padding: 0; margin: 0; @@ -952,12 +930,14 @@ paned box, paned grid { } paned > separator { - border-width: 0.0833333333333333em 0.0833333333333333em 0 0; - border-style: solid; - border-color: #404040; + background: rgba(0,0,0,0.075); + border: none; + min-width: 0.25em; + min-height: 0.25em; padding: 0; - margin: 0.3333333333333333em; + margin: 0; } + fontchooser scrolledwindow, #PlacesPaned scrolledwindow, #HistoryPanel scrolledwindow, @@ -991,21 +971,17 @@ fontchooser scrolledwindow, } #MainNotebook header { - /* OK */ background-color: #2A2A2A; border: 0; padding: 0; } #MainNotebook tabs { - /* OK */ background-color: #2A2A2A; } #MainNotebook tab:hover { - /* OK */ background-color: #505050; } #MainNotebook tab:active { - /* OK */ border-color: #989898; } #MainNotebook tab:checked { @@ -1017,18 +993,16 @@ fontchooser scrolledwindow, } #RightNotebook > stack > scrolledwindow frame, #BatchQueueButtonsMainContainer frame, -#MyExpander frame, dialog frame { margin: 0; - padding: 0.19em 0.583333333333333333em; + padding: 0; } #RightNotebook > stack > scrolledwindow frame > border, #BatchQueueButtonsMainContainer > frame > border, -#MyExpander frame > border, dialog frame > border { - padding: 0 0.333333333333333333em 0.333333333333333333em; + padding: 0; border-width: 0.083333333333333333em; - margin: 0 -0.583333333333333333em; + margin: 0; } #RightNotebook > stack > scrolledwindow frame > label:not(.dummy), #BatchQueueButtonsMainContainer frame > label:not(.dummy), @@ -1068,21 +1042,18 @@ dialog frame > label:not(.dummy) { min-width: 25em; } -#ToolPanelNotebook header { - background-color: #383838; - border-color: #262626; - padding: 0; - margin: 0; +#ToolPanelNotebook viewport { + padding: 0; } #ToolPanelNotebook header tabs { + padding: 0.0833333333333333em; background-color: #2A2A2A; - margin: 0; } #ToolPanelNotebook header tab { - padding: 0.25em; margin: 0; + padding: 0.3333333333333333em; } /* All tool panels have a frame except for Meta which unlike the rest is a notebook itself. @@ -1204,44 +1175,31 @@ dialog frame > label:not(.dummy) { margin: 0; } -#RightNotebook #HistoryPanel { - min-width: 17.5em; - margin-top: 0.333333333333333333em; -} - #RightNotebook scrolledwindow { padding: 0; } -#HistoryPanel { - margin-top: 0.25em; -} -#HistoryPanel > border { - margin-top: 1.75em; -} -#HistoryPanel > label { - margin: 0 0 -1.5em 0; - padding: 0 0 0 0.083333333333333333em; -} -#Snapshots { - margin-top: 0.166666666666666666em; -} -#Snapshots > border { - min-height: calc(6em + 36px); + +#Navigator border, +#HistoryPanel border, +#Snapshots border { + border: none; } + +#Navigator > label, +#HistoryPanel > label, #Snapshots > label { - margin-bottom: -4px; + margin: 0; + padding: 0 0 0.25em 0; } + #Snapshots scrolledwindow + box { - margin: -8px 0 -4px ; + margin: -8px 0 -4px; border-top-width: 0.083333333333333333em; } -#Navigator { - padding-top: 0.25em; - padding-bottom: 0.25em; -} -#Navigator label { + +#Navigator box label { + margin: 0; padding: 0; - margin: 0.083333333333333333em 0; } /*** PartialPaste ******************************************************************************/ diff --git a/rtdata/themes/TooWaBlue-GTK3-20_.css b/rtdata/themes/TooWaBlue-GTK3-20_.css index ce4bb8d28..4e7e192ad 100644 --- a/rtdata/themes/TooWaBlue-GTK3-20_.css +++ b/rtdata/themes/TooWaBlue-GTK3-20_.css @@ -318,12 +318,12 @@ fontchooser scrolledwindow, /*** end ***************************************************************************************/ /*** Navigator *********************************************************************************/ -#Navigator { +#Navigator box { padding-top: 0.75em; padding-bottom: 0.25em; background-color: @bg-dark-grey; } -#Navigator label { +#Navigator box label { padding: 0; margin: 0.083333333333333333em 0 0; } @@ -454,6 +454,47 @@ filechooser placessidebar list row:selected { margin: 0; } +/* Vertical version of slider. */ +#histScale { + min-height: 4em; + min-width: 1.833333333333333333em; + margin: -0.333333333333333333em 0; +} +#histScale trough { + padding: 0.583333333333333333em 0; +} +#histScale highlight { + background-image: linear-gradient(to right, shade (@accent-color2,1.22), shade(@accent-color2,.88)); + margin: -0.583333333333333333em 0; + padding: 0.333333333333333333em 0 0 0.333333333333333333em; +} +#histScale slider { +} +#histScale.fine-tune highlight { + padding: 0.5em 0 0 0.5em; +} + +/* Copied from button.flat style. */ +button.radio#histButton { + border: 0.083333333333333333em solid transparent; + box-shadow: none; + background-image: none; + background-color: transparent; +} +button.radio#histButton:hover { + border-color: @bg-button-border; + box-shadow: inset 0 0.083333333333333333em rgba(242, 242, 242, 0.1); + background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3)); + background-color: @bg-button-hover; +} +button.radio#histButton:active, +button.radio#histButton:checked { + border-color: @bg-button-border; + box-shadow: inset 0 0.1em rgba(242, 242, 242, 0.08); + background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3)); + background-color: @bg-button-active; +} + /*** end ***************************************************************************************/ /*** Separator *********************************************************************************/ @@ -1182,6 +1223,7 @@ window.csd:not(.fullscreen) #MainNotebook > header.top { color: @headline-big; padding: 0; margin: 0.083333333333333333em 0.25em 0 0.166666666666666666em; + font-weight: bold; } #MyExpanderTitle:hover label { diff --git a/rtdata/themes/size - Legacy.css b/rtdata/themes/size - Legacy.css new file mode 100644 index 000000000..08c39f973 --- /dev/null +++ b/rtdata/themes/size - Legacy.css @@ -0,0 +1,1032 @@ +* { + min-width: 0; + min-height: 0; + padding: 0; + margin: 0; +} + +progressbar.vertical { + min-width: 0; + min-height: 9em; +} +progressbar trough { + border-width: 0.083333333333333333em; + border-radius: 0.3em; +} + +progressbar trough progress { + border-width: 0.083333333333333333em; + border-radius: 0.3em; +} + +progressbar.vertical trough { + min-width: 0.6em; +} +progressbar.vertical trough progress { + min-width: 0.6em; + margin: 0; +} + +progressbar.horizontal trough { + min-height: 0.6em; + margin-top: 0; +} +#IopsPanel progressbar.horizontal trough { + margin-top: 0; +} + +progressbar.horizontal trough progress { + min-height: 0.6em; + margin: 0; +} + +/* #IopsPanel progressbar trough.empty, */ +progressbar trough.empty progress { +} + +/*** Notebook **********************************************************************************/ +notebook, +notebook header, +notebook tabs, +notebook tab, +notebook stack { + border-radius: 0; + border: none; + padding: 0; + margin: 0; + min-width: 0; + min-height: 0; +} +notebook > header { + padding: 0 0.416666666666666666em; +} +notebook > header.left { + padding: 0.416666666666666666em 0; +} +notebook > header tab { + margin: 0.416666666666666666em 0.25em; + padding: 0 0.333333333333333333em; +} +notebook > header.left tab { + margin: 0.2em; + padding: 0.333333333333333333em; +} +notebook > header.left tabs { + margin: 0; + padding: 0; +} +notebook > header tab > grid > image { + min-height: 2em; + min-width: 2em; + padding: 0.25em; + margin: 0; +} + +notebook > header > tabs > arrow { + border-radius: 0.2em; + padding: 0 0.166666666666666666em; + margin: 0.5em 0; +} +notebook > header.left > tabs > arrow { + padding: 0.166666666666666666em 0; + margin: 0 0.5em; +} + +/*?win*/ +#MainNotebook > stack { + padding: 0.25em; +} + +#MainNotebook > stack > :nth-child(2) > box:nth-child(3) { + margin-top: 0.416666666666666666em; +} + + +/* Adds a line on top of the notebook as a separtor for the titlebar (only on CSD) */ +dialog.csd #PrefNotebook > header, +dialog.csd #AboutNotebook > header, +window.csd:not(.fullscreen) #MainNotebook > header.top { + border-top-width: 0.083333333333333333em; +} +/**/ + + +#RightNotebook > stack > scrolledwindow > viewport > box > box:last-child > image, +#ToolPanelNotebook > stack > scrolledwindow > viewport > box > box:last-child > image { + min-height: 5em; +} + +#ToolPanelNotebook > header { + border-bottom-width: 0.083333333333333333em; + margin-left: 0.083333333333333333em; + margin-right: 0.083333333333333333em; + padding: 0 0.19em; +} +#ToolPanelNotebook > header tabs { + margin: 0; +} +#ToolPanelNotebook > header tab { + padding: 0; +} +#ToolPanelNotebook > header tab image{ + min-height: 2em; + min-width: 2em; + margin: 0.19em 0.25em 0.333333333333333333em; + padding: 0; +} +#ToolPanelNotebook > stack { + padding: 0; +} + +#RightNotebook > header { + margin: 0 0.2em 0 0; +} +#RightNotebook > stack { + padding: 0; +} +#RightNotebook > header tab label { + padding-left: 0.25em; + padding-right: 0.25em; +} + +#RightNotebook > stack > :nth-child(1) > * > box, +#RightNotebook > stack > :nth-child(4) > * > box { + padding: 0.5em; + border-width: 0.083333333333333333em; +} + +#PrefNotebook > header { + margin: -0.666666666666666666em -0.666666666666666666em 0.333333333333333333em; +} +#PrefNotebook > stack { + margin: 0 -0.666666666666666666em; +} +#PrefNotebook > stack > scrolledwindow > viewport { + padding: 0 0.333333333333333333em; +} + +#AboutNotebook > header { + margin: -0.666666666666666666em -0.666666666666666666em 0.666666666666666666em; +} + +#AboutNotebook > stack text, +#AboutNotebook > stack textview { + padding: 0.75em 0; +} +/* Meta panel notebook */ +#MetaPanelNotebook > header { + padding: 0.333333333333333333em; + margin: 0 0.5em 0; +} +#MetaPanelNotebook > header > tabs { + padding-left: 0.333333333333333333em; +} +#MetaPanelNotebook > stack { + padding: 0 0 0.5em 0; +} + +#MetaPanelNotebook > stack > box { + border: none; + border-radius: 0; + border-top-style: none; + padding: 0 0.333333333333333333em 0.25em; + margin:0 0.5em -0.5em; +} +#MetaPanelNotebook > stack > box:nth-child(1) > scrolledwindow { + margin: 0 0 0.333333333333333333em; + padding: 0; +} + +#MetaPanelNotebook > stack > box:nth-child(2) > scrolledwindow > viewport.frame { + padding: 0; +} + +#MetaPanelNotebook entry { + padding: 0 0.333333333333333333em; + border-radius: 0; + margin-left: 0; + margin-right: 0; +} + +#MetaPanelNotebook .view { + border-width: 0.083333333333333333em; + padding: 0.083333333333333333em 0.25em; +} + +#MetaPanelNotebook stack label { + margin-top: 0; + margin-bottom: 0; + padding: 0; +} + +/*** end ***************************************************************************************/ + +/*** File Browser ******************************************************************************/ +#FileCatalog { + border-width: 0.083333333333333333em; +} + +/*?win*/ +#FileBrowser { + padding: 0; + margin: 0; +} + +#ToolBarPanelFileBrowser { + margin: 0 0 0.416666666666666666em 0; + min-height: 0; + min-width: 0; + padding: 0; +} +#FileBrowserQueryToolbar > viewport > box { + margin: 0 0 0.416666666666666666em 0; + min-height: 0; + min-width: 0; + padding: 0; +} + +/*** end ***************************************************************************************/ + +/*** Image Editor ******************************************************************************/ +#EditorRightPaned { + margin: 0; +} + +#BeforeAfterContainer { + border-width: 0.083333333333333333em; + border-radius: 0; + padding: 0; + margin: calc(0.416666666666666666em - 2px) 0 0.416666666666666666em; +} +#BeforeAfterContainer > box:nth-child(2) > box:nth-child(2), +#BeforeAfterContainer > box:nth-child(1) > box:nth-child(2){ + border-top: 0.083333333333333333em solid @bg-dark-grey; +} +#BeforeAfterContainer > box:nth-child(2){ + border-left: 0.083333333333333333em solid @bg-dark-grey; +} + +/* !!! Must be same height as "Small Lock Button" */ +#BeforeAfterContainer label { + padding: 0 0.5em; + min-height: 2em; + min-width: 2em; + margin: 0.25em 0; + border-width: 0.083333333333333333em; +} + +#EditorToolbarTop { + margin: 0 -1px 0 -1px; + padding: 0; + min-height: 0; +} + +#IopsPanel { + margin: 0; + padding: 0; + min-height: 0; +} + +#EditorZoomPanel label { + min-width: 4em; + margin: 0; +} +/*** end ***************************************************************************************/ + +/*** Toolbox ***********************************************************************************/ +#MyExpander image { + min-width: 1.333333333333333333em; + min-height: 0; + margin: -0.083333333333333333em 0.125em; +} + +#MyExpander .drawingarea:not(.slider) { + border-width: 0.083333333333333333em; +} +#MyExpander .slider, +#MyExpander #CurveSHCSelector { + border-width: 0.083333333333333333em; +} +#MyExpander .drawingarea:disabled { +} +#ThresholdAdjuster { + margin: 0.083333333333333333em 0 0.166666666666666666em 0; +} + +#ToolPanelNotebook > stack > scrolledwindow > viewport.frame { + padding: 0 0.25em; +} + +#MyExpander { + margin: 0; + padding: 0; +} +#ExpanderBox > box, #ExpanderBox > grid { + border-width: 0.083333333333333333em; + border-radius: 0.416666666666666666em; + margin: 0; + padding: 0.5em 0.333333333333333333em; +} + +/* Sub-tool (MyExpander) */ +#ExpanderBox2 > box, #ExpanderBox2 > grid { + border-width: 0.083333333333333333em; + border-radius: 0.416666666666666666em; + margin: 0 0.19em; + padding: 0.333333333333333333em; +} + +#MyExpanderTitle > box { + margin: 0; + padding: 0.25em 0; +} + +#MyExpanderTitle label { + padding: 0; + margin: 0.083333333333333333em 0.25em 0 0.166666666666666666em; +} +/*** end ***************************************************************************************/ + +/*** Context & popups menus *****************************************************************************/ +.csd.popup > decoration { + border-radius: 0; + border: none; + padding: 0; + margin: 0; +} + +menu { + border-width: 0.083333333333333333em; + padding: 0.083333333333333333em; + margin: 0; + border-radius: 0; +} +menu > arrow.top, +menu > arrow.top:hover, +menu > arrow.bottom, +menu > arrow.bottom:hover { + border: none; + padding: 0.5em; + min-height: 1.5em; +} + +menuitem { + padding: 0 0.333333333333333333em; + margin: 0.083333333333333333em; + min-height: 2em; +} + +menu arrow { + min-width: 1.333333333333333333em; + margin: 0 -0.19em; + padding: 0; + margin: 0 -0.25em 0 0; +} + +menu image:not(.dummy), +#MyExpander menu image:not(.dummy) { + min-height: 2em; + min-width: 1.5em; + padding: 0; + margin: 0 0 0 -1.333333333333333333em; +} + +/*** Selection popup list (used in filechooser) ***/ +entry > window > frame:not(.dummy) { + padding: 0; +} +entry > window > frame > border:not(.dummy) { + padding: 0.083333333333333333em; + margin: 0.083333333333333333em; + border-width: 0.083333333333333333em; +} +/* end */ + +/*** end ***************************************************************************************/ + +/*** Popover *** Context menu filechooser ******************************************************/ +popover { + border-width: 0.083333333333333333em; + border-radius: 0; + padding: 0; + margin: 0; +} +popover > box { + padding: 0; + margin: -9px; +} +popover modelbutton { + min-height: 2em; + padding: 0 0.416666666666666666em; + margin: 0; + border-radius: 0; +} + +popover label { + margin-right: 0.5em; +} +/** end ****************************************************************************************/ + +/*** Switch ***********************************************************************************/ +switch { + min-height: 2.333333333333333333em; + min-width: 11em; + margin: 0 0.19em; + padding: 0; + border-radius: 0.2em; + border-width: 0.083333333333333333em; + margin-bottom: 0.5em; +} + +switch slider { + border-width: 0.083333333333333333em; + border-radius: 0.2em 0 0 0.2em; + + /* Needed to cover the total switch */ + margin: -0.083333333333333333em; + padding: 0.083333333333333333em; +} +switch:checked slider{ + border-radius: 0 0.2em 0.2em 0; +} +/** end ****************************************************************************************/ + +/*** Buttons ***********************************************************************************/ +button, +#BeforeAfterContainer button { + min-height: 1.666666666666666666em; + min-width: 1.666666666666666666em;/*x*/ + margin: 0.125em; + border-radius: 0.2em; + border-width: 0.083333333333333333em; +} +button.flat { + border-width: 0.083333333333333333em; +} + +/* Combobox */ +button.combo { + padding: 0 0 0 0.25em; +} +combobox entry.combo + button.combo { + min-width: 1em; + margin-left: 0; + padding: 0; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + border-left: none; +} +#WB-Size-Helper button.combo { + min-width: 0; + margin: 0; +} +#WB-Size-Helper { + min-width: 3.5em; + margin: 0.125em; +} + +combobox arrow { + margin-right: 0.083333333333333333em; +} + +combobox entry.combo + button.combo arrow { + margin-right: 0; +} + +#PlacesPaned button.combo { + margin: 0; +} +#PlacesPaned combobox { + margin-bottom: calc(0.416666666666666666em - 8px); +} + +#ProfilePanel combobox { + margin-right: -0.166666666666666666em; +} + +/* Misc */ +button label { + margin: 0 0.416666666666666666em; +} +button image:not(.dummy), +#MyExpander button image:not(.dummy) { + margin: 0; +} +#MyFileChooserButton label { + margin: 0 0 0 0.416666666666666666em; +} +#MyFileChooserButton image:not(.dummy):last-child { + margin: 0 0.416666666666666666em 0 0; + min-width: 1.333333333333333333em; +} +#MetaPanelNotebook button + button:last-child { + margin-right: 0; +} +#MetaPanelNotebook scrolledwindow + grid > button:first-child, +#MetaPanelNotebook scrolledwindow + grid + grid > button:first-child { + margin-left: 0; +} +#MetaPanelNotebook scrolledwindow + grid > button:last-child, +#MetaPanelNotebook scrolledwindow + grid + grid > button:last-child { + margin-right: 0; +} + +#ProfilePanel { + margin-bottom: 0.35em; +} +#ProfilePanel > grid { + margin-bottom: 0.2em; +} + +/* Reset button */ +scale + button.flat, +spinbutton + button.flat, +scale + image + image + button.flat { + min-height: 1.333333333333333333em; + margin-top:0.095em; + margin-bottom: 0.095em; +} + +/* Color chooser & buttons */ +button.color { + min-width: 3.25em; +} + +button.color colorswatch { + min-height: 0; + min-width: 0; + margin: 1px; + border-radius: 0.2em; +} + +colorchooser colorswatch { + border-width: 1px; +} +colorchooser colorswatch#add-color-button:first-child { + border-radius: 5.5px 0 0 5.5px; +} + +/* Font chooser button */ +button.font label{ + min-height: 0; + min-width: 0; + margin: 0 0.125em; +} + +/* Save, Cancel, OK ... buttons */ +dialog .dialog-action-area button { + min-height: 2.166666666666666666em; + margin: 0.5em 0 0 0.333333333333333333em; + padding: 0; +} +messagedialog .dialog-action-area button { + min-height: 1.833333333333333333em; + margin: 0 0.5em 0.5em; + padding: 0; +} +messagedialog .dialog-action-area button:not(:only-child):nth-child(1) { + margin-right: 0.25em; +} +messagedialog .dialog-action-area button:not(:only-child):nth-child(2) { + margin-left: 0.25em; +} + +/* Big tool buttons */ +#ToolBarPanelFileBrowser button, +#EditorTopPanel button, +#IopsPanel button, +#ProfilePanel button, +#MainNotebook > header > grid > button, +#MyExpander button.independent.toggle:not(.image-button):not(.text-button):first-child:only-child, /* Graduated filter big button */ +.curve-mainbox .curve-buttonbox button.flat, +#BatchQueueButtonsMainContainer + grid + box button, +#RightNotebook > stack > scrolledwindow:last-child button.image-button, /* Fast Export */ +#MetaPanelNotebook scrolledwindow + grid > button, +#MetaPanelNotebook scrolledwindow + grid + grid > button { + min-height: 2.333333333333333333em; + min-width: 2.333333333333333333em; + margin: 0 0.125em; +} +#ToolBarPanelFileBrowser > button:first-child, +#EditorTopPanel > button:first-child, +#IopsPanel > button:nth-child(6), +#ProfilePanel > grid > button:first-child { + margin-left: 0; +} +#ToolBarPanelFileBrowser > button:last-child, +#ToolBarPanelFileBrowser > box:last-child > button:last-child, +#EditorTopPanel > button:last-child, +#EditorTopPanel > box:last-child > button:last-child, +#IopsPanel > button:last-child, +#ProfilePanel > grid > button:last-child, +#BatchQueueButtonsMainContainer + grid + box button { + margin-right: 0; +} +#MyExpander button.independent.toggle:not(.image-button):not(.text-button):first-child:only-child, /* Graduated filter button */ +#MetaPanelNotebook scrolledwindow + grid > button, +#MetaPanelNotebook scrolledwindow + grid + grid > button { + margin: 0.125em; +} + +#EditorTopPanel button.narrowbutton { + min-width: 0.833333333333333333em; + padding: 0 0.13em; +} + +/* Image close button */ +#MainNotebook > header tab #CloseButton { + padding: 0; + margin: 0.333333333333333333em 0 0.416666666666666666em 0.19em; + min-width: 1.5em; + min-height: 0; +} +#MainNotebook > header tab #CloseButton image{ + min-width: 1.333333333333333333em; + min-height: 1.333333333333333333em; +} + +/* Filter buttons*/ +#ToolBarPanelFileBrowser .smallbuttonbox { + min-height: 1.166666666666666666em; + padding: 0; + margin: 0; +} +#ToolBarPanelFileBrowser .smallbuttonbox:nth-child(2) { + margin-top: 0.166666666666666666em; + margin-bottom: -0.166666666666666666em; +} +#ToolBarPanelFileBrowser .smallbuttonbox button.smallbutton image { + margin: -1em 0; + padding: 0; + min-width: 0; + min-height: 0; +} +#ToolBarPanelFileBrowser .smallbuttonbox button.smallbutton { + min-height: 0; + min-width: 1.166666666666666666em; + padding: 0; + margin: 0 0.166666666666666666em; + border: none; + border-radius: 0; +} + +/* Arrow toggle combo button */ +#IopsPanel .image-combo button.Right, +#MyExpander .image-combo button.Right { + border-left: none; + margin-left: 0; + padding: 0; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + min-width: 1.333333333333333333em; +} +#IopsPanel .image-combo button.Right image, +#MyExpander .image-combo button.Right image { + margin: 0 -0.083333333333333333em; +} +#IopsPanel .image-combo button.Left, +#MyExpander .image-combo button.Left { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + min-width: 2.333333333333333333em; + margin-right: 0; +} +#MyExpander .image-combo button.Left { + min-width: 2.75em; +} +#MyExpander .image-combo button.Left label { + margin-right: 0; +} + +/* Search & Query buttons */ +#FileBrowserQueryToolbar entry + button.flat, +#FileBrowserIconToolbar entry + button.flat { + min-height: 1.666666666666666666em;/*x*/ + min-width: 1.666666666666666666em;/*x*/ + margin: 0; + border-radius: 0 0.2em 0.2em 0; + border-width: 0.083333333333333333em; + padding: 0; +} +#FileBrowserQueryToolbar entry + button.flat:not(:hover):not(:active), +#FileBrowserIconToolbar entry + button.flat:not(:hover):not(:active) { + border-left: none; + padding-left: 0.083333333333333333em; +} +#FileBrowserIconToolbar box > entry + button.flat { + margin-top: 0.416666666666666666em; + margin-bottom: 0.416666666666666666em; + min-height: 0; +} + +/* Small Lock Button */ +#BeforeAfterContainer button { + min-height: 2em; + min-width: 2em; + margin: 0.25em 0.25em 0.25em 0; + padding: 0; + border-radius: 0.2em; + border-width: 0.083333333333333333em; +} +#BeforeAfterContainer button image{ + margin: 0 0 0 0.083333333333333333em; +} +#BeforeAfterContainer button:checked image{ + margin: 0.083333333333333333em -0.166666666666666666em 0.083333333333333333em 0.25em; +} + +/* Snapshot & Places buttons */ +#Snapshots button, +#PlacesPaned > box:nth-child(1) scrolledwindow + grid > button { + margin: 0; + padding: 0; + border-width: 0.083333333333333333em; + border-radius: 0; + min-height: 0.5em;/*x*/ +} +/**/ + + +/* View & Filechooser Buttons */ +.view button { + min-height: 2em; + min-width: 1.333333333333333333em; + padding: 0 0.19em; + margin: 0; +} +#pathbarbox button { + min-width: 2em; + margin: 0; + padding: 0; + } +window treeview > header image { + min-width: 1.333333333333333333em; +} + +window .view button { + border: none; + border-bottom-width: 0.083333333333333333em; +} +dialog .view button { + border-width: 0.083333333333333333em; +} + +.view header button:not(:first-child):not(:only-child), +.path-bar button:not(:first-child):not(:only-child) { + border-left: none; +} +.view header button, +.path-bar button { + border-radius: 0; +} + +.path-bar button:first-child { + border-top-left-radius: 0.2em; + border-bottom-left-radius: 0.2em; + margin: 0; + padding: 0; +} +.path-bar button:last-child { + border-top-right-radius: 0.2em; + border-bottom-right-radius: 0.2em; + margin: 0; + padding: 0; +} +#pathbarbox button:not(:first-child):not(:last-child) label { + margin: 0 0.5em; +} + +#pathbarbox button:not(:first-child):not(:last-child) image { + margin: 0 0 0 0.5em; + min-width: 1.333333333333333333em; +} +/**/ + +/* Popover Filechooser (Create folder) */ +popover button.text-button { + border-width: 0.083333333333333333em; +} +popover button.text-button label { + padding: 0; + margin: 0; +} +/* Adds padding around sides of text-buttons */ +button.text-button { + padding: 0 0.6666666666666666em; +} +/**/ + +/*** end ***************************************************************************************/ + +/*** Checkbox & Radio **************************************************************************/ +checkbutton, +radiobutton { + padding: 0.083333333333333333em 0; + margin: 0.125em; + min-height: 1.666666666666666666em;/*x*/ +} + +check, +radio { + border-width: 0.105em; + margin: 0; + padding: 0; + min-height: 1.166666666666666666em; + min-width: 1.166666666666666666em; +} +check { + border-radius: 0.166666666666666666em; +} + +radio{ + border-radius: 1.166666666666666666em; +} + +radiobutton label, +checkbutton label { + margin: 0 0.583333333333333333em 0 0.416666666666666666em; + padding: 0; +} + +frame > checkbutton check{ + margin-left: 0.5em; +} + +#PartialPaste checkbutton { + padding: 0; + margin: 0.125em 0 0 0.583333333333333333em; +} +#PartialPaste checkbutton:not(#PartialPasteHeader) { + margin: 0 0 0 1.166666666666666666em; +} + +/*** end ***************************************************************************************/ + +/*** Entry & Spinbutton ************************************************************************/ +#MyExpander entry, +entry, +spinbutton { + margin: 0.125em; + padding: 0 0.333333333333333333em; + min-height: 1.666666666666666666em;/*x*/ + min-width: 0; + border-width: 0.083333333333333333em; +} +#FileBrowserQueryToolbar entry, +#FileBrowserIconToolbar entry { + min-height: 1.666666666666666666em;/*x*/ + min-width: 0; + margin: 0; + border-right: none; + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +#FileBrowserIconToolbar box > entry { + margin-top: 0.416666666666666666em; + margin-bottom: 0.416666666666666666em; + margin-left: 0.19em; + min-height: 0; +} +#FileBrowserQueryToolbar box + box > label + entry { + margin-left: 0.19em; +} +spinbutton { + padding: 0; +} + +#MyExpander spinbutton { + margin: 0.125em; + padding: 0; + min-height: 1.333333333333333333em; + min-width: 0; + border-width: 0.083333333333333333em; +} +/* Needed for Reset & and Auto button height*/ +#MyExpander button + label + spinbutton { + margin-top: 0.333333333333333333em; + margin-bottom: 0.333333333333333333em; +} +#MyExpander checkbutton + label + spinbutton { + margin-top: 0.416666666666666666em; + margin-bottom: 0.416666666666666666em; +} +/**/ + +#MyExpander spinbutton button, +spinbutton button { + padding: 0; + min-height: 1.333333333333333333em; + min-width: 1.666666666666666666em; + border: none; +} + +#MyExpander spinbutton entry, +spinbutton entry { + padding: 0 0.333333333333333333em; + margin: 0; + min-height: 0; + min-width: 0; + border: none; +} +#MyExpander spinbutton entry { + padding: 0 0.333333333333333333em 0 0.833333333333333333em; +} + +#MyExpander spinbutton button:hover, +spinbutton button:hover { + border: none; +} +#MyExpander spinbutton button:active, +spinbutton button:active { + border: none; +} + +/* Text selection */ +.view entry { + margin: 0 -2px; + border-width: 0.083333333333333333em; +} +/* end*/ + +/*** end ***************************************************************************************/ + +/* Curves **************************************************************************************/ +.curve-mainbox { + margin: 0.19em; + border-width: 0.083333333333333333em; +} +.curve-mainbox .curve-curvebox { + margin: 0; + padding: 0.416666666666666666em; +} +.curve-mainbox .curve-spinbuttonbox { + margin: 0; + padding: 0.25em; + border-width: 0.083333333333333333em; +} +.curve-mainbox .curve-sliderbox { + margin: 0; + padding: 0.25em; + border-width: 0.083333333333333333em; +} +.curve-mainbox .curve-buttonbox { + padding: 0.25em; +} +.curve-mainbox.left .curve-buttonbox { + border-width: 0.083333333333333333em; +} +.curve-mainbox.right .curve-buttonbox { + border-width: 0.083333333333333333em; +} +.curve-mainbox.top .curve-buttonbox { + border-width: 0.083333333333333333em; +} +.curve-mainbox.bottom .curve-buttonbox { + border-width: 0.083333333333333333em; +} +.curve-mainbox .curve-buttonbox button.flat { + margin: 0.095em; +} +/*** end ***************************************************************************************/ + +/*** Window Layout *****************************************************************************/ +.csd:not(.popup):not(tooltip) > decoration { + border-radius: 0.416666666666666666em 0.416666666666666666em 0 0; + border: none; + padding: 0; + margin: 0.833333333333333333em; +} +headerbar { + border-bottom-width: 0.083333333333333333em; + border-radius: 0.416666666666666666em 0.416666666666666666em 0 0; + min-height: 2em; + padding: 0.083333333333333333em 0.416666666666666666em 0; + margin: 0; +} + +/* Window state */ +.maximized > headerbar { + border-radius: 0; +} +/**/ + +/* Titlebar buttons*/ + +headerbar button.titlebutton image { + padding: 0; + margin: 0; +} +headerbar button.titlebutton { + margin: 0 0 0 0.333333333333333333em; + border-width: 0.083333333333333333em; + min-width: 1.5em; + min-height: 1.5em; + padding: 0; +} +messagedialog headerbar button.titlebutton { + min-width: 1.25em; + min-height: 1.25em; + margin: 0; +} +/*** end ***************************************************************************************/ \ No newline at end of file diff --git a/rtdata/themes/size.css b/rtdata/themes/size.css index e3a22f337..2d23bf860 100644 --- a/rtdata/themes/size.css +++ b/rtdata/themes/size.css @@ -313,38 +313,6 @@ window.csd:not(.fullscreen) #MainNotebook > header.top { margin: 0.083333333333333333em 0 0.166666666666666666em 0; } -#ToolPanelNotebook > stack > scrolledwindow > viewport.frame { - padding: 0 0.25em; -} - -#MyExpander { - margin: 0; - padding: 0; -} -#ExpanderBox > box, #ExpanderBox > grid { - border-width: 0.083333333333333333em; - border-radius: 0.416666666666666666em; - margin: 0; - padding: 0.5em 0.333333333333333333em; -} - -/* Sub-tool (MyExpander) */ -#ExpanderBox2 > box, #ExpanderBox2 > grid { - border-width: 0.083333333333333333em; - border-radius: 0.416666666666666666em; - margin: 0 0.19em; - padding: 0.333333333333333333em; -} - -#MyExpanderTitle > box { - margin: 0; - padding: 0.25em 0; -} - -#MyExpanderTitle label { - padding: 0; - margin: 0.083333333333333333em 0.25em 0 0.166666666666666666em; -} /*** end ***************************************************************************************/ /*** Context & popups menus *****************************************************************************/ @@ -366,8 +334,8 @@ menu > arrow.top:hover, menu > arrow.bottom, menu > arrow.bottom:hover { border: none; - padding: 0.5em; - min-height: 1.5em; + padding: 0.25em; + min-height: 1em; } menuitem { diff --git a/rtengine/CMakeLists.txt b/rtengine/CMakeLists.txt index 43d658e66..c50abb88c 100644 --- a/rtengine/CMakeLists.txt +++ b/rtengine/CMakeLists.txt @@ -60,6 +60,10 @@ link_directories( "${RSVG_LIBRARY_DIRS}" ) +if(OpenMP_FOUND) + include_directories(${OpenMP_CXX_INCLUDE_DIRS}) +endif() + set(CAMCONSTSFILE "camconst.json") set(RTENGINESOURCEFILES @@ -97,7 +101,6 @@ set(RTENGINESOURCEFILES fast_demo.cc ffmanager.cc filmnegativeproc.cc - filmnegativethumb.cc flatcurves.cc FTblockDN.cc gamutwarning.cc @@ -228,4 +231,8 @@ target_link_libraries(rtengine ${EXIV2_LIBRARIES} ) +if(OpenMP_FOUND) + target_link_libraries(rtengine ${OpenMP_CXX_LIBRARIES}) +endif() + install(FILES ${CAMCONSTSFILE} DESTINATION "${DATADIR}" PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) diff --git a/rtengine/EdgePreservingDecomposition.cc b/rtengine/EdgePreservingDecomposition.cc index 34ac2440b..5ae023122 100644 --- a/rtengine/EdgePreservingDecomposition.cc +++ b/rtengine/EdgePreservingDecomposition.cc @@ -4,6 +4,7 @@ #ifdef _OPENMP #include #endif +#include "rt_algo.h" #include "sleef.h" #define DIAGONALS 5 @@ -42,21 +43,13 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl //s is preconditionment of r. Without, direct to r. float *s = r; - double rs = 0.0; // use double precision for large summations if(Preconditioner != nullptr) { s = new float[n]; - Preconditioner(s, r, Pass); } -#ifdef _OPENMP - #pragma omp parallel for reduction(+:rs) // removed schedule(dynamic,10) -#endif - - for(int ii = 0; ii < n; ii++) { - rs += static_cast(r[ii]) * static_cast(s[ii]); - } + double rs = rtengine::accumulateProduct(r, s, n); //Search direction d. float *d = (buffer + n + 32); @@ -77,16 +70,9 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl for(iterate = 0; iterate < MaximumIterates; iterate++) { //Get step size alpha, store ax while at it. - double ab = 0.0; // use double precision for large summations Ax(ax, d, Pass); -#ifdef _OPENMP - #pragma omp parallel for reduction(+:ab) -#endif - - for(int ii = 0; ii < n; ii++) { - ab += static_cast(d[ii]) * static_cast(ax[ii]); - } + double ab = rtengine::accumulateProduct(d, ax, n); if(ab == 0.0) { break; //So unlikely. It means perfectly converged or singular, stop either way. } @@ -118,22 +104,7 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl //Get beta. ab = rs; - rs = 0.0f; - -#ifdef _OPENMP - #pragma omp parallel -#endif - { -#ifdef _OPENMP - #pragma omp for reduction(+:rs) -#endif - - for(int ii = 0; ii < n; ii++) { - rs += static_cast(r[ii]) * static_cast(s[ii]); - } - - } - + rs = rtengine::accumulateProduct(r, s, n); ab = rs / ab; abf = ab; //Update search direction p. diff --git a/rtengine/FTblockDN.cc b/rtengine/FTblockDN.cc index bef60e59a..474196843 100644 --- a/rtengine/FTblockDN.cc +++ b/rtengine/FTblockDN.cc @@ -436,6 +436,7 @@ void ImProcFunctions::Median_Denoise(float **src, float **dst, float upperBound, } + void ImProcFunctions::Tile_calc(int tilesize, int overlap, int kall, int imwidth, int imheight, int &numtiles_W, int &numtiles_H, int &tilewidth, int &tileheight, int &tileWskip, int &tileHskip) { @@ -2377,6 +2378,7 @@ bool ImProcFunctions::WaveletDenoiseAll_BiShrinkL(wavelet_decomposition& Wavelet bool ImProcFunctions::WaveletDenoiseAll_BiShrinkAB(wavelet_decomposition& WaveletCoeffs_L, wavelet_decomposition& WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float *variC, int local, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, int denoiseNestedLevels) { int maxlvl = WaveletCoeffs_L.maxlevel(); + printf("Ftblockdn ab bishrink\n"); if (local == 1) { maxlvl = 6; //for local denoise @@ -2458,6 +2460,7 @@ bool ImProcFunctions::WaveletDenoiseAll_BiShrinkAB(wavelet_decomposition& Wavele float* const* WavCoeffs_ab = WaveletCoeffs_ab.level_coeffs(lvl); if (lvl == maxlvl - 1) { + //printf("Shrink ab bis\n"); ShrinkAllAB(WaveletCoeffs_L, WaveletCoeffs_ab, buffer, lvl, dir, noisevarchrom, noisevar_ab, useNoiseCCurve, autoch, denoiseMethodRgb, madL[lvl], nullptr, 0, madab[lvl], true); } else { //simple wavelet shrinkage @@ -2617,7 +2620,6 @@ bool ImProcFunctions::WaveletDenoiseAllAB(wavelet_decomposition& WaveletCoeffs_L float *noisevarchrom, float madL[8][3], float *variC, int local, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, int denoiseNestedLevels)//mod JD { - int maxlvl = WaveletCoeffs_L.maxlevel(); if (local == 1) { diff --git a/rtengine/LUT.h b/rtengine/LUT.h index 416ae689a..b1dc4d26c 100644 --- a/rtengine/LUT.h +++ b/rtengine/LUT.h @@ -110,7 +110,7 @@ public: /// The user have to handle it itself, even if some method can (re)initialize it bool dirty; - LUT(int s, int flags = LUT_CLIP_BELOW | LUT_CLIP_ABOVE, bool initZero = false) + explicit LUT(int s, int flags = LUT_CLIP_BELOW | LUT_CLIP_ABOVE, bool initZero = false) { #ifndef NDEBUG @@ -141,7 +141,7 @@ public: } } - LUT(const std::vector& input, int flags = LUT_CLIP_BELOW | LUT_CLIP_ABOVE) : + explicit LUT(const std::vector& input, int flags = LUT_CLIP_BELOW | LUT_CLIP_ABOVE) : maxs(input.size() - 2), maxsf(maxs), data(new T[input.size() + 3]), // Add a few extra elements so [](vfloat) won't access out-of-bounds memory. @@ -362,11 +362,11 @@ public: // of [values[0][0] ... values[3][0]] and the second [values[0][1] ... values[3][1]]. __m128i temp0 = _mm_unpacklo_epi32(values[0], values[1]); __m128i temp1 = _mm_unpacklo_epi32(values[2], values[3]); - vfloat lower = _mm_castsi128_ps(_mm_unpacklo_epi64(temp0, temp1)); - vfloat upper = _mm_castsi128_ps(_mm_unpackhi_epi64(temp0, temp1)); + vfloat lowerVal = _mm_castsi128_ps(_mm_unpacklo_epi64(temp0, temp1)); + vfloat upperVal = _mm_castsi128_ps(_mm_unpackhi_epi64(temp0, temp1)); vfloat diff = vmaxf(ZEROV, indexv) - _mm_cvtepi32_ps(indexes); - return vintpf(diff, upper, lower); + return vintpf(diff, upperVal, lowerVal); } // NOTE: This version requires LUTs which clip at upper and lower bounds @@ -394,11 +394,11 @@ public: // of [values[0][0] ... values[3][0]] and the second [values[0][1] ... values[3][1]]. __m128i temp0 = _mm_unpacklo_epi32(values[0], values[1]); __m128i temp1 = _mm_unpacklo_epi32(values[2], values[3]); - vfloat lower = _mm_castsi128_ps(_mm_unpacklo_epi64(temp0, temp1)); - vfloat upper = _mm_castsi128_ps(_mm_unpackhi_epi64(temp0, temp1)); + vfloat lowerVal = _mm_castsi128_ps(_mm_unpacklo_epi64(temp0, temp1)); + vfloat upperVal = _mm_castsi128_ps(_mm_unpackhi_epi64(temp0, temp1)); vfloat diff = vclampf(indexv, ZEROV, sizev) - _mm_cvtepi32_ps(indexes); // this automagically uses ZEROV in case indexv is NaN - return vintpf(diff, upper, lower); + return vintpf(diff, upperVal, lowerVal); } // NOTE: This version requires LUTs which do not clip at upper and lower bounds @@ -425,11 +425,11 @@ public: // of [values[0][0] ... values[3][0]] and the second [values[0][1] ... values[3][1]]. __m128i temp0 = _mm_unpacklo_epi32(values[0], values[1]); __m128i temp1 = _mm_unpacklo_epi32(values[2], values[3]); - vfloat lower = _mm_castsi128_ps(_mm_unpacklo_epi64(temp0, temp1)); - vfloat upper = _mm_castsi128_ps(_mm_unpackhi_epi64(temp0, temp1)); + vfloat lowerVal = _mm_castsi128_ps(_mm_unpacklo_epi64(temp0, temp1)); + vfloat upperVal = _mm_castsi128_ps(_mm_unpackhi_epi64(temp0, temp1)); vfloat diff = indexv - _mm_cvtepi32_ps(indexes); - return vintpf(diff, upper, lower); + return vintpf(diff, upperVal, lowerVal); } // vectorized LUT access with integer indices. Clips at lower and upper bounds diff --git a/rtengine/array2D.h b/rtengine/array2D.h index 512f7bcc1..10d797999 100644 --- a/rtengine/array2D.h +++ b/rtengine/array2D.h @@ -64,8 +64,7 @@ constexpr unsigned int ARRAY2D_BYREFERENCE = 2; template -class array2D : - public rtengine::NonCopyable +class array2D { private: @@ -125,6 +124,45 @@ public: } } + // creator type 3 + array2D(int w, int h, int startx, int starty, T ** source, unsigned int flags = 0) : width(w) + { + rows.resize(h); + if (!(flags & ARRAY2D_BYREFERENCE)) { + buffer.resize(h * width); + T* start = buffer.data(); + for (ssize_t i = 0; i < h; ++i) { + rows[i] = start + i * width; + for (ssize_t j = 0; j < width; ++j) { + rows[i][j] = source[i + starty][j + startx]; + } + } + } else { + for (ssize_t i = 0; i < h; ++i) { + rows[i] = source[i + starty] + startx; + } + } + } + + array2D(const array2D& other) : + width(other.width), + buffer(other.buffer) + { + initRows(other.rows.size()); + } + + array2D& operator =(const array2D& other) + { + if (this != &other) { + free(); + width = other.width; + buffer = other.buffer; + initRows(other.rows.size()); + } + + return *this; + } + void fill(const T val, bool multiThread = false) { const ssize_t height = rows.size(); @@ -140,18 +178,19 @@ public: { buffer.clear(); rows.clear(); + width = 0; } // use with indices T * operator[](int index) { - assert((index >= 0) && (index < rows.size())); + assert((index >= 0) && (std::size_t(index) < rows.size())); return rows[index]; } const T * operator[](int index) const { - assert((index >= 0) && (index < rows.size())); + assert((index >= 0) && (std::size_t(index) < rows.size())); return rows[index]; } @@ -192,6 +231,24 @@ public: } } + array2D& operator+=(const array2D& rhs) + { + if (rhs.getWidth() == this->getWidth() && rhs.getHeight() == this->getHeight()) { + for (int i = 0; i < getHeight(); ++i) { +#ifdef _OPENMP + #pragma omp simd +#endif + + for (int j = 0; j < getWidth(); ++j) { + rows[i][j] += rhs[i][j]; + } + } + } + + return *this; + } + + int getWidth() const { return width; diff --git a/rtengine/ashift_dt.c b/rtengine/ashift_dt.c index c7cd01ef1..4aa7d815c 100644 --- a/rtengine/ashift_dt.c +++ b/rtengine/ashift_dt.c @@ -1656,7 +1656,7 @@ static int fact(const int n) // original RANSAC works on linear optimization problems. Our model is nonlinear. We // take advantage of the fact that lines interesting for our model are vantage lines // that meet in one vantage point for each subset of lines (vertical/horizontal). -// Stragegy: we construct a model by (random) sampling within the subset of lines and +// Strategy: we construct a model by (random) sampling within the subset of lines and // calculate the vantage point. Then we check the "distance" of all other lines to the // vantage point. The model that gives highest number of lines combined with the highest // total weight and lowest overall "distance" wins. @@ -1754,7 +1754,7 @@ static void ransac(const dt_iop_ashift_line_t *lines, int *index_set, int *inout const float *L3 = lines[index_set[n]].L; // we take the absolute value of the dot product of V and L as a measure - // of the "distance" between point and line. Note that this is not the real euclidian + // of the "distance" between point and line. Note that this is not the real euclidean // distance but - with the given normalization - just a pragmatically selected number // that goes to zero if V lies on L and increases the more V and L are apart const float d = fabs(vec3scalar(V, L3)); diff --git a/rtengine/ashift_lsd.c b/rtengine/ashift_lsd.c index 3a0ec5aba..29bdf8bed 100644 --- a/rtengine/ashift_lsd.c +++ b/rtengine/ashift_lsd.c @@ -21,7 +21,7 @@ * Changes versus the original code: * do not include "lsd.h" (not needed) * make all interface functions static - * comment out unsused interface functions + * comment out unused interface functions * catch (unlikely) division by zero near line 2035 * rename rad1 and rad2 to radius1 and radius2 in reduce_region_radius() * to avoid naming conflict in windows build diff --git a/rtengine/cache.h b/rtengine/cache.h index 6c1dacf43..77a2017f3 100644 --- a/rtengine/cache.h +++ b/rtengine/cache.h @@ -65,7 +65,7 @@ public: virtual void onDestroy() = 0; }; - Cache(unsigned long _size, Hook* _hook = nullptr) : + explicit Cache(unsigned long _size, Hook* _hook = nullptr) : store_size(_size), hook(_hook) { diff --git a/rtengine/camconst.json b/rtengine/camconst.json index 22270bfe2..7c3e2818d 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -400,6 +400,13 @@ Camera constants: ] } }, + + { // Quality C, initial data by @agriggio, white frame samples provided by @noirsabb in #5862, color charts not processed yet + "make_model" : "CANON EOS-1D X MARK III", + "raw_crop": [ 72, 38, 5496, 3670 ], + "masked_areas" : [ 40, 10, 5534, 70 ], + "ranges" : { "white" : 16382 } + }, { // Quality A "make_model": "Canon EOS 5D Mark III", @@ -519,8 +526,8 @@ Camera constants: } }, - { // Quality B, some missing scaling factors are safely guessed - "make_model": "Canon EOS 6D Mark II", + { // Quality B, some missing scaling factors are safely guessed; assuming the RP is the same as the 6DII because they share sensors + "make_model": [ "Canon EOS 6D Mark II", "Canon EOS RP" ], "dcraw_matrix": [ 6875,-970,-932,-4691,12459,2501,-874,1953,5809 ], // DNG v_9.12 D65 "raw_crop": [ 120, 44, 6264, 4180 ], // fullraw size 6384x4224 useful 120,44,6264x4180 // "raw_crop": [ 128, 52, 6248, 4168 ], // official jpeg crop 120+12,44+12,6240x4160 @@ -866,8 +873,8 @@ Camera constants: } }, - { // 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" ], + { // Quality A, only one scaling factor missing and guessed safely, EOS 700D not tested but available samples look same as 650D, EOS 100D shares sensor and came out the same time as the 700D + "make_model": [ "Canon EOS 650D", "Canon EOS Rebel T4i", "Canon EOS Kiss X6i", "Canon EOS 700D", "Canon EOS Rebel T5i", "Canon EOS Kiss X7i", "Canon EOS 100D", "Canon EOS Rebel SL1", "Canon EOS Kiss X7" ], "dcraw_matrix": [ 6602,-841,-939,-4472,12458,2247,-975,2039,6148 ], "ranges": { "white": [ @@ -1014,6 +1021,14 @@ Camera constants: ] } }, + + { // Quality C, samples provided by falket #5495 + "make_model": [ "Canon EOS 2000D", "Canon EOS Rebel T7", "Canon EOS Kiss X90" ], + // raw_crop is handled by dcraw + // "dcraw_matrix": [ 8532, -701, -1167, -4095, 11879, 2508, -797, 2424, 7010 ], // Adobe DNG v.10.3 + "dcraw_matrix": [ 8300, -2110, -1120, -4917, 12694, 2482, -938, 2141, 5666 ], // Adobe DNG v.10.3 (v2) + "ranges": { "white": 15300 } // typical value, very non-linear behavior near clipping + }, // Canon MILC (mirrorless interchangeable-lens camera) @@ -1293,8 +1308,8 @@ Camera constants: }, { // Quality C - "make_model": "FUJIFILM GFX 100", - "dcraw_matrix" : [16212, -8423, -1583, -4336, 12583, 1937, -195, 726, 6199], // taken from ART + "make_model": [ "FUJIFILM GFX 100", "FUJIFILM GFX100S" ], + "dcraw_matrix" : [ 16212, -8423, -1583, -4336, 12583, 1937, -195, 726, 6199 ], // taken from ART "raw_crop": [ 0, 2, 11664, 8734 ] }, @@ -1408,6 +1423,11 @@ Camera constants: "ranges": { "white": 16100 } }, + { // Quality C + "make_model": "FUJIFILM X-E4", + "raw_crop": [ 0, 5, 6252, 4126 ] + }, + { // Quality B, samples provided by Daniel Catalina #5824 "make_model": "FUJIFILM X-T2", "dcraw_matrix": [ 11434,-4948,-1210,-3746,12042,1903,-666,1479,5235 ], // DNG_v9.4 D65 @@ -1420,7 +1440,7 @@ Camera constants: "make_model": "FUJIFILM X-PRO2", "dcraw_matrix": [ 11434,-4948,-1210,-3746,12042,1903,-666,1479,5235 ], // DNG_v9.4 D65 "raw_crop": [ 0, 5, 6032, 4026 ], // see X-T2 - "ranges": { "white": [ 16105, 16270, 16082 ] } // These values are the lowest pixel values >16000 for all ISOs. LENR has a negligble effect. + "ranges": { "white": [ 16105, 16270, 16082 ] } // These values are the lowest pixel values >16000 for all ISOs. LENR has a negligible effect. // No aperture scaling data provided, but likely negligible }, @@ -1433,7 +1453,7 @@ Camera constants: }, { // Quality B - "make_model": [ "FUJIFILM X-T30", "FUJIFILM X100V", "FUJIFILM X-T4" ], + "make_model": [ "FUJIFILM X-T30", "FUJIFILM X100V", "FUJIFILM X-T4", "FUJIFILM X-S10" ], "dcraw_matrix": [ 13426,-6334,-1177,-4244,12136,2371,-580,1303,5980 ], // DNG_v11, standard_v2 d65 "raw_crop": [ 0, 5, 6252, 4176] }, @@ -1477,6 +1497,11 @@ Camera constants: "raw_crop": [ 0, 0, 0, -18 ] // 18 rows at bottom are garbage }, + { // Quality C, only raw crop + "make_model": "Leica SL2-S", + "raw_crop": [ 0, 2, 6024, 4042 ] // 2 rows at top and 4 rows at bottom are black + }, + { // Quality B, Matrix from ART "make_model" : "LEICA V-LUX 5", "dcraw_matrix" : [9803, -4185, -992, -4066, 12578, 1628, -838, 1824, 5288] @@ -1595,6 +1620,22 @@ Camera constants: } // No significant influence of ISO // No aperture scaling reported }, + + { // Quality B, samples provided by arvindpgh (#6066) + // Sensor shows some non-uniformity, need other sample to verify + // There seems to be some aperture scaling, but insufficient data to accurately determine + "make_model": "Nikon COOLPIX P950", + "dcraw_matrix": [ 13307,-5641,-1290,-2048,10581,1689,-64,1222,5176 ], // ColorMatrix2 from Adobe DNG Converter 13.1 + "ranges": { + "black": 200, + "white": [ + { "iso": [ 100 ], "levels": [ 3994, 4093, 3963 ] }, // LENR can be quite aggressive at higher ISO + { "iso": [ 200 ], "levels": [ 3993, 4092, 3962 ] }, + { "iso": [ 400 ], "levels": [ 3992, 4091, 3961 ] }, + { "iso": [ 800, 1600, 3200, 6400 ], "levels": [ 3996, 4095, 3965 ] } + ] + } + }, { // Quality B, no LENR samples "make_model": "Nikon D5", diff --git a/rtengine/canon_cr3_decoder.cc b/rtengine/canon_cr3_decoder.cc index e3097ad2e..ddd4b6172 100644 --- a/rtengine/canon_cr3_decoder.cc +++ b/rtengine/canon_cr3_decoder.cc @@ -843,7 +843,7 @@ inline void crxFillBuffer(CrxBitstream* bitStrm) #endif if (bitStrm->curBufSize < 1) { // nothing read - throw std::exception(); + throw std::runtime_error("Unexpected end of file in CRX bitstream"); } bitStrm->mdatSize -= bitStrm->curBufSize; diff --git a/rtengine/ciecam02.cc b/rtengine/ciecam02.cc index c591bcb2c..da452c89b 100644 --- a/rtengine/ciecam02.cc +++ b/rtengine/ciecam02.cc @@ -2,7 +2,7 @@ * This file is part of RawTherapee. * * Copyright (c) 2004-2010 Gabor Horvath - * + * Changes in Ciecam02 with Ciecam16 Jacques Desmis jdesmis@gmail.com 12/2020 * 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 @@ -48,7 +48,7 @@ void Ciecam02::curvecolorfloat (float satind, float satval, float &sres, float p } } -void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf & outCurve) +void Ciecam02::curveJfloat (float br, float contr, float thr, const LUTu & histogram, LUTf & outCurve) { // check if brightness curve is needed @@ -97,7 +97,6 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf outCurve.makeIdentity (32767.f); } - if (contr > 0.00001f || contr < -0.00001f) { // compute mean luminance of the image with the curve applied @@ -110,6 +109,9 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf } avg /= sum; + float thrmin = (thr - contr / 250.0f); + float thrmax = (thr + contr / 250.0f); + std::vector contrastcurvePoints (9); contrastcurvePoints[0] = double (DCT_NURBS); @@ -117,11 +119,11 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf contrastcurvePoints[1] = 0.f; // black point. Value in [0 ; 1] range contrastcurvePoints[2] = 0.f; // black point. Value in [0 ; 1] range - contrastcurvePoints[3] = avg - avg * (0.6f - contr / 250.0f); // toe point - contrastcurvePoints[4] = avg - avg * (0.6f + contr / 250.0f); // value at toe point + contrastcurvePoints[3] = avg - avg * thrmin; // toe point + contrastcurvePoints[4] = avg - avg * thrmax;// value at toe point - contrastcurvePoints[5] = avg + (1 - avg) * (0.6f - contr / 250.0f); // shoulder point - contrastcurvePoints[6] = avg + (1 - avg) * (0.6f + contr / 250.0f); // value at shoulder point + contrastcurvePoints[5] = avg + (1.f - avg) * thrmin; // shoulder point + contrastcurvePoints[6] = avg + (1.f - avg) * thrmax; // value at shoulder point contrastcurvePoints[7] = 1.f; // white point contrastcurvePoints[8] = 1.f; // value at white point @@ -182,26 +184,30 @@ float Ciecam02::calculate_fl_from_la_ciecam02float ( float la ) return (0.2f * k * la5) + (0.1f * (1.0f - k) * (1.0f - k) * std::cbrt (la5)); } -float Ciecam02::achromatic_response_to_whitefloat ( float x, float y, float z, float d, float fl, float nbb ) +float Ciecam02::achromatic_response_to_whitefloat ( float x, float y, float z, float d, float fl, float nbb, int c16) { float r, g, b; float rc, gc, bc; float rp, gp, bp; float rpa, gpa, bpa; // gamu = 1; - xyz_to_cat02float ( r, g, b, x, y, z); + xyz_to_cat02float ( r, g, b, x, y, z, c16); rc = r * (((y * d) / r) + (1.0f - d)); gc = g * (((y * d) / g) + (1.0f - d)); bc = b * (((y * d) / b) + (1.0f - d)); - cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc); -// if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk - rp = MAXR (rp, 0.0f); - gp = MAXR (gp, 0.0f); - bp = MAXR (bp, 0.0f); -// } + if(c16 == 1) { + cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc, c16); + rp = MAXR (rp, 0.0f); + gp = MAXR (gp, 0.0f); + bp = MAXR (bp, 0.0f); + } else { + rp = MAXR (rc, 0.0f); + gp = MAXR (gc, 0.0f); + bp = MAXR (bc, 0.0f); + } rpa = nonlinear_adaptationfloat ( rp, fl ); gpa = nonlinear_adaptationfloat ( gp, fl ); @@ -210,97 +216,121 @@ float Ciecam02::achromatic_response_to_whitefloat ( float x, float y, float z, f return ((2.0f * rpa) + gpa + ((1.0f / 20.0f) * bpa) - 0.305f) * nbb; } -void Ciecam02::xyz_to_cat02float ( float &r, float &g, float &b, float x, float y, float z) +void Ciecam02::xyz_to_cat02float ( float &r, float &g, float &b, float x, float y, float z, int c16) { -// gamu = 1; -// -// if (gamu == 0) { -// r = ( 0.7328f * x) + (0.4296f * y) - (0.1624f * z); -// g = (-0.7036f * x) + (1.6975f * y) + (0.0061f * z); -// b = ( 0.0030f * x) + (0.0136f * y) + (0.9834f * z); -// } else if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk + //original cat02 //r = ( 0.7328 * x) + (0.4296 * y) - (0.1624 * z); //g = (-0.7036 * x) + (1.6975 * y) + (0.0061 * z); //b = ( 0.0000 * x) + (0.0000 * y) + (1.0000 * z); - r = ( 1.007245f * x) + (0.011136f * y) - (0.018381f * z); //Changjun Li - g = (-0.318061f * x) + (1.314589f * y) + (0.003471f * z); - b = ( 0.0000f * x) + (0.0000f * y) + (1.0000f * z); -// } + if(c16 == 1) {//cat02 + r = ( 1.007245f * x) + (0.011136f * y) - (0.018381f * z); //Changjun Li + g = (-0.318061f * x) + (1.314589f * y) + (0.003471f * z); + b = ( 0.0000f * x) + (0.0000f * y) + (1.0000f * z); + } else {//cat16 + r = ( 0.401288f * x) + (0.650173f * y) - (0.051461f * z); //cat16 + g = (-0.250268f * x) + (1.204414f * y) + (0.045854f * z); + b = ( -0.002079f * x) + (0.048952f * y) + (0.953127f * z); + } + } #ifdef __SSE2__ -void Ciecam02::xyz_to_cat02float ( vfloat &r, vfloat &g, vfloat &b, vfloat x, vfloat y, vfloat z ) +void Ciecam02::xyz_to_cat02float ( vfloat &r, vfloat &g, vfloat &b, vfloat x, vfloat y, vfloat z, int c16) { //gamut correction M.H.Brill S.Susstrunk - r = ( F2V (1.007245f) * x) + (F2V (0.011136f) * y) - (F2V (0.018381f) * z); //Changjun Li - g = (F2V (-0.318061f) * x) + (F2V (1.314589f) * y) + (F2V (0.003471f) * z); - b = z; + if(c16 == 1) { + r = ( F2V (1.007245f) * x) + (F2V (0.011136f) * y) - (F2V (0.018381f) * z); //Changjun Li + g = (F2V (-0.318061f) * x) + (F2V (1.314589f) * y) + (F2V (0.003471f) * z); + b = z; + } else { + //cat16 + r = ( F2V (0.401288f) * x) + (F2V (0.650173f) * y) - (F2V (0.051461f) * z); //Changjun Li + g = -(F2V (0.250268f) * x) + (F2V (1.204414f) * y) + (F2V (0.045854f) * z); + b = -(F2V(0.002079f) * x) + (F2V(0.048952f) * y) + (F2V(0.953127f) * z); + } } #endif -void Ciecam02::cat02_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b) +void Ciecam02::cat02_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b, int c16) { -// gamu = 1; -// -// if (gamu == 0) { -// x = ( 1.096124f * r) - (0.278869f * g) + (0.182745f * b); -// y = ( 0.454369f * r) + (0.473533f * g) + (0.072098f * b); -// z = (-0.009628f * r) - (0.005698f * g) + (1.015326f * b); -// } else if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk + //original cat02 //x = ( 1.0978566 * r) - (0.277843 * g) + (0.179987 * b); //y = ( 0.455053 * r) + (0.473938 * g) + (0.0710096* b); //z = ( 0.000000 * r) - (0.000000 * g) + (1.000000 * b); - x = ( 0.99015849f * r) - (0.00838772f * g) + (0.018229217f * b); //Changjun Li - y = ( 0.239565979f * r) + (0.758664642f * g) + (0.001770137f * b); - z = ( 0.000000f * r) - (0.000000f * g) + (1.000000f * b); -// } + if(c16 == 1) { + x = ( 0.99015849f * r) - (0.00838772f * g) + (0.018229217f * b); //Changjun Li + y = ( 0.239565979f * r) + (0.758664642f * g) + (0.001770137f * b); + z = ( 0.000000f * r) - (0.000000f * g) + (1.000000f * b); + } else {//cat16 + x = ( 1.86206786f * r) - (1.01125463f * g) + (0.14918677f * b); //Cat16 + y = ( 0.38752654f * r) + (0.62144744f * g) + (-0.00897398f * b); + z = ( -0.0158415f * r) - (0.03412294f * g) + (1.04996444f * b); + } + } #ifdef __SSE2__ -void Ciecam02::cat02_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ) +void Ciecam02::cat02_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b, int c16 ) { //gamut correction M.H.Brill S.Susstrunk - x = ( F2V (0.99015849f) * r) - (F2V (0.00838772f) * g) + (F2V (0.018229217f) * b); //Changjun Li - y = ( F2V (0.239565979f) * r) + (F2V (0.758664642f) * g) + (F2V (0.001770137f) * b); - z = b; + if(c16 == 1) {//cat02 + x = ( F2V (0.99015849f) * r) - (F2V (0.00838772f) * g) + (F2V (0.018229217f) * b); //Changjun Li + y = ( F2V (0.239565979f) * r) + (F2V (0.758664642f) * g) + (F2V (0.001770137f) * b); + z = b; + } else { + //cat16 + x = ( F2V (1.86206786f) * r) - (F2V (1.01125463f) * g) + (F2V (0.14918677f) * b); + y = ( F2V (0.38752654f) * r) + (F2V (0.621447744f) * g) - (F2V (0.00897398f) * b); + z = -(F2V(0.0158415f) * r) - (F2V(0.03412294f) * g) + (F2V(1.04996444f) * b); + } } #endif -void Ciecam02::hpe_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b ) +void Ciecam02::hpe_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b, int c16) { - x = (1.910197f * r) - (1.112124f * g) + (0.201908f * b); - y = (0.370950f * r) + (0.629054f * g) - (0.000008f * b); - z = b; + x = (1.910197f * r) - (1.112124f * g) + (0.201908f * b); + y = (0.370950f * r) + (0.629054f * g) - (0.000008f * b); + z = b; } #ifdef __SSE2__ -void Ciecam02::hpe_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ) +void Ciecam02::hpe_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b, int c16) { - x = (F2V (1.910197f) * r) - (F2V (1.112124f) * g) + (F2V (0.201908f) * b); - y = (F2V (0.370950f) * r) + (F2V (0.629054f) * g) - (F2V (0.000008f) * b); - z = b; + x = (F2V (1.910197f) * r) - (F2V (1.112124f) * g) + (F2V (0.201908f) * b); + y = (F2V (0.370950f) * r) + (F2V (0.629054f) * g) - (F2V (0.000008f) * b); + z = b; } #endif -void Ciecam02::cat02_to_hpefloat ( float &rh, float &gh, float &bh, float r, float g, float b) +void Ciecam02::cat02_to_hpefloat ( float &rh, float &gh, float &bh, float r, float g, float b, int c16) { -// gamu = 1; -// -// if (gamu == 0) { +// original cat02 // rh = ( 0.7409792f * r) + (0.2180250f * g) + (0.0410058f * b); // gh = ( 0.2853532f * r) + (0.6242014f * g) + (0.0904454f * b); // bh = (-0.0096280f * r) - (0.0056980f * g) + (1.0153260f * b); -// } else if (gamu == 1) { //Changjun Li - rh = ( 0.550930835f * r) + (0.519435987f * g) - ( 0.070356303f * b); - gh = ( 0.055954056f * r) + (0.89973132f * g) + (0.044315524f * b); - bh = (0.0f * r) - (0.0f * g) + (1.0f * b); -// } + if(c16 == 1) {//cat02 + rh = ( 0.550930835f * r) + (0.519435987f * g) - ( 0.070356303f * b); + gh = ( 0.055954056f * r) + (0.89973132f * g) + (0.044315524f * b); + bh = (0.0f * r) - (0.0f * g) + (1.0f * b); + } else {//cat16 + rh = ( 1.f * r) + (0.f * g) + ( 0.f * b); + gh = ( 0.f * r) + (1.f * g) + (0.f * b); + bh = (0.0f * r) + (0.0f * g) + (1.0f * b); + } + } #ifdef __SSE2__ -void Ciecam02::cat02_to_hpefloat ( vfloat &rh, vfloat &gh, vfloat &bh, vfloat r, vfloat g, vfloat b) +void Ciecam02::cat02_to_hpefloat ( vfloat &rh, vfloat &gh, vfloat &bh, vfloat r, vfloat g, vfloat b, int c16) { + if(c16 == 1) { //Changjun Li - rh = ( F2V (0.550930835f) * r) + (F2V (0.519435987f) * g) - ( F2V (0.070356303f) * b); - gh = ( F2V (0.055954056f) * r) + (F2V (0.89973132f) * g) + (F2V (0.044315524f) * b); - bh = b; + rh = ( F2V (0.550930835f) * r) + (F2V (0.519435987f) * g) - ( F2V (0.070356303f) * b); + gh = ( F2V (0.055954056f) * r) + (F2V (0.89973132f) * g) + (F2V (0.044315524f) * b); + bh = b; + } else {//cat16 + rh = ( F2V (1.f) * r) + (F2V (0.f) * g) + ( F2V (0.f) * b); + gh = ( F2V (0.f) * r) + (F2V (1.f) * g) + (F2V (0.f) * b); + bh = b; + + } } #endif @@ -399,7 +429,7 @@ void Ciecam02::calculate_abfloat ( vfloat &aa, vfloat &bb, vfloat h, vfloat e, v #endif void Ciecam02::initcam1float (float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, - float &cz, float &aw, float &wh, float &pfl, float &fl, float c) + float &cz, float &aw, float &wh, float &pfl, float &fl, float c, int c16) { n = yb / yw; @@ -412,13 +442,13 @@ void Ciecam02::initcam1float (float yb, float pilotd, float f, float la, float x fl = calculate_fl_from_la_ciecam02float ( la ); nbb = ncb = 0.725f * pow_F ( 1.0f / n, 0.2f ); cz = 1.48f + sqrt ( n ); - aw = achromatic_response_to_whitefloat ( xw, yw, zw, d, fl, nbb); + aw = achromatic_response_to_whitefloat ( xw, yw, zw, d, fl, nbb, c16); wh = ( 4.0f / c ) * ( aw + 4.0f ) * pow_F ( fl, 0.25f ); pfl = pow_F ( fl, 0.25f ); } void Ciecam02::initcam2float (float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, - float &cz, float &aw, float &fl) + float &cz, float &aw, float &fl, int c16) { n = yb / yw; @@ -432,12 +462,12 @@ void Ciecam02::initcam2float (float yb, float pilotd, float f, float la, float x fl = calculate_fl_from_la_ciecam02float ( la ); nbb = ncb = 0.725f * pow_F ( 1.0f / n, 0.2f ); cz = 1.48f + sqrt ( n ); - aw = achromatic_response_to_whitefloat ( xw, yw, zw, d, fl, nbb); + aw = achromatic_response_to_whitefloat ( xw, yw, zw, d, fl, nbb, c16); } void Ciecam02::xyz2jchqms_ciecam02float ( float &J, float &C, float &h, float &Q, float &M, float &s, float aw, float fl, float wh, float x, float y, float z, float xw, float yw, float zw, - float c, float nc, float pow1, float nbb, float ncb, float pfl, float cz, float d) + float c, float nc, float pow1, float nbb, float ncb, float pfl, float cz, float d, int c16) { float r, g, b; @@ -448,20 +478,23 @@ void Ciecam02::xyz2jchqms_ciecam02float ( float &J, float &C, float &h, float &Q float a, ca, cb; float e, t; float myh; -// gamu = 1; - xyz_to_cat02float ( r, g, b, x, y, z); - xyz_to_cat02float ( rw, gw, bw, xw, yw, zw); + xyz_to_cat02float ( r, g, b, x, y, z, c16); + xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, c16); rc = r * (((yw * d) / rw) + (1.f - d)); gc = g * (((yw * d) / gw) + (1.f - d)); bc = b * (((yw * d) / bw) + (1.f - d)); - cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc); + cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc, c16); -// if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk - rp = MAXR (rp, 0.0f); - gp = MAXR (gp, 0.0f); - bp = MAXR (bp, 0.0f); -// } + if(c16 == 1) {//cat02 + rp = MAXR (rp, 0.0f); + gp = MAXR (gp, 0.0f); + bp = MAXR (bp, 0.0f); + } else {//cat16 + rp = MAXR (rc, 0.0f); + gp = MAXR (gc, 0.0f); + bp = MAXR (bc, 0.0f); + } rpa = nonlinear_adaptationfloat ( rp, fl ); gpa = nonlinear_adaptationfloat ( gp, fl ); @@ -478,9 +511,7 @@ void Ciecam02::xyz2jchqms_ciecam02float ( float &J, float &C, float &h, float &Q a = ((2.0f * rpa) + gpa + (0.05f * bpa) - 0.305f) * nbb; -// if (gamu == 1) { a = MAXR (a, 0.0f); //gamut correction M.H.Brill S.Susstrunk -// } J = pow_F ( a / aw, c * cz * 0.5f); @@ -499,7 +530,7 @@ void Ciecam02::xyz2jchqms_ciecam02float ( float &J, float &C, float &h, float &Q #ifdef __SSE2__ void Ciecam02::xyz2jchqms_ciecam02float ( vfloat &J, vfloat &C, vfloat &h, vfloat &Q, vfloat &M, vfloat &s, vfloat aw, vfloat fl, vfloat wh, vfloat x, vfloat y, vfloat z, vfloat xw, vfloat yw, vfloat zw, - vfloat c, vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d) + vfloat c, vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d, int c16) { vfloat r, g, b; @@ -510,18 +541,26 @@ void Ciecam02::xyz2jchqms_ciecam02float ( vfloat &J, vfloat &C, vfloat &h, vfloa vfloat a, ca, cb; vfloat e, t; - xyz_to_cat02float ( r, g, b, x, y, z); - xyz_to_cat02float ( rw, gw, bw, xw, yw, zw); + xyz_to_cat02float ( r, g, b, x, y, z, c16); + xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, c16); vfloat onev = F2V (1.f); rc = r * (((yw * d) / rw) + (onev - d)); gc = g * (((yw * d) / gw) + (onev - d)); bc = b * (((yw * d) / bw) + (onev - d)); - cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc); + cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc, c16); + //gamut correction M.H.Brill S.Susstrunk - rp = vmaxf (rp, ZEROV); - gp = vmaxf (gp, ZEROV); - bp = vmaxf (bp, ZEROV); + if(c16 == 1) {//cat02 + rp = vmaxf (rp, ZEROV); + gp = vmaxf (gp, ZEROV); + bp = vmaxf (bp, ZEROV); + } else {//cat16 + rp = vmaxf (rc, ZEROV); + gp = vmaxf (gc, ZEROV); + bp = vmaxf (bc, ZEROV); + } + rpa = nonlinear_adaptationfloat ( rp, fl ); gpa = nonlinear_adaptationfloat ( gp, fl ); bpa = nonlinear_adaptationfloat ( bp, fl ); @@ -556,7 +595,7 @@ void Ciecam02::xyz2jchqms_ciecam02float ( vfloat &J, vfloat &C, vfloat &h, vfloa void Ciecam02::xyz2jch_ciecam02float ( float &J, float &C, float &h, float aw, float fl, float x, float y, float z, float xw, float yw, float zw, - float c, float nc, float pow1, float nbb, float ncb, float cz, float d) + float c, float nc, float pow1, float nbb, float ncb, float cz, float d, int c16) { float r, g, b; @@ -567,20 +606,24 @@ void Ciecam02::xyz2jch_ciecam02float ( float &J, float &C, float &h, float aw, f float a, ca, cb; float e, t; float myh; -// int gamu = 1; - xyz_to_cat02float ( r, g, b, x, y, z); - xyz_to_cat02float ( rw, gw, bw, xw, yw, zw); + xyz_to_cat02float ( r, g, b, x, y, z, c16); + xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, c16); rc = r * (((yw * d) / rw) + (1.f - d)); gc = g * (((yw * d) / gw) + (1.f - d)); bc = b * (((yw * d) / bw) + (1.f - d)); - cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc); + cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc, c16); + + if(c16 == 1) {//cat02 + rp = MAXR (rp, 0.0f); + gp = MAXR (gp, 0.0f); + bp = MAXR (bp, 0.0f); + } else {//cat16 + rp = MAXR (rc, 0.0f); + gp = MAXR (gc, 0.0f); + bp = MAXR (bc, 0.0f); + } -// if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk - rp = MAXR (rp, 0.0f); - gp = MAXR (gp, 0.0f); - bp = MAXR (bp, 0.0f); -// } #ifdef __SSE2__ vfloat pv = _mm_setr_ps(rp, gp, bp, 1.f); @@ -606,9 +649,7 @@ void Ciecam02::xyz2jch_ciecam02float ( float &J, float &C, float &h, float aw, f a = ((2.0f * rpa) + gpa + (0.05f * bpa) - 0.305f) * nbb; -// if (gamu == 1) { a = MAXR (a, 0.0f); //gamut correction M.H.Brill S.Susstrunk -// } J = pow_F ( a / aw, c * cz * 0.5f); @@ -623,7 +664,7 @@ void Ciecam02::xyz2jch_ciecam02float ( float &J, float &C, float &h, float aw, f void Ciecam02::jch2xyz_ciecam02float ( float &x, float &y, float &z, float J, float C, float h, float xw, float yw, float zw, - float c, float nc, float pow1, float nbb, float ncb, float fl, float cz, float d, float aw) + float c, float nc, float pow1, float nbb, float ncb, float fl, float cz, float d, float aw, int c16) { float r, g, b; float rc, gc, bc; @@ -632,8 +673,7 @@ void Ciecam02::jch2xyz_ciecam02float ( float &x, float &y, float &z, float J, fl float rw, gw, bw; float a, ca, cb; float e, t; -// gamu = 1; - xyz_to_cat02float(rw, gw, bw, xw, yw, zw); + xyz_to_cat02float(rw, gw, bw, xw, yw, zw, c16); e = ((961.53846f) * nc * ncb) * (xcosf(h * rtengine::RT_PI_F_180 + 2.0f) + 3.8f); #ifdef __SSE2__ @@ -662,20 +702,27 @@ void Ciecam02::jch2xyz_ciecam02float ( float &x, float &y, float &z, float J, fl gp = inverse_nonlinear_adaptationfloat(gpa, fl); bp = inverse_nonlinear_adaptationfloat(bpa, fl); #endif - hpe_to_xyzfloat(x, y, z, rp, gp, bp); - xyz_to_cat02float(rc, gc, bc, x, y, z); - r = rc / (((yw * d) / rw) + (1.0f - d)); - g = gc / (((yw * d) / gw) + (1.0f - d)); - b = bc / (((yw * d) / bw) + (1.0f - d)); + if(c16 == 1) {//cat02 + hpe_to_xyzfloat(x, y, z, rp, gp, bp, c16); + xyz_to_cat02float(rc, gc, bc, x, y, z, c16); - cat02_to_xyzfloat(x, y, z, r, g, b); + r = rc / (((yw * d) / rw) + (1.0f - d)); + g = gc / (((yw * d) / gw) + (1.0f - d)); + b = bc / (((yw * d) / bw) + (1.0f - d)); + } else {//cat16 + r = rp / (((yw * d) / rw) + (1.0f - d)); + g = gp / (((yw * d) / gw) + (1.0f - d)); + b = bp / (((yw * d) / bw) + (1.0f - d)); + } + + cat02_to_xyzfloat(x, y, z, r, g, b, c16); } #ifdef __SSE2__ void Ciecam02::jch2xyz_ciecam02float ( vfloat &x, vfloat &y, vfloat &z, vfloat J, vfloat C, vfloat h, vfloat xw, vfloat yw, vfloat zw, - vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz) + vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz, int c16) { vfloat r, g, b; vfloat rc, gc, bc; @@ -684,7 +731,7 @@ void Ciecam02::jch2xyz_ciecam02float ( vfloat &x, vfloat &y, vfloat &z, vfloat J vfloat rw, gw, bw; vfloat a, ca, cb; vfloat e, t; - xyz_to_cat02float ( rw, gw, bw, xw, yw, zw); + xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, c16); e = ((F2V (961.53846f)) * nc * ncb) * (xcosf ( ((h * F2V (rtengine::RT_PI)) / F2V (180.0f)) + F2V (2.0f) ) + F2V (3.8f)); a = pow_F ( J / F2V (100.0f), reccmcz ) * aw; t = pow_F ( F2V (10.f) * C / (vsqrtf ( J ) * pow1), F2V (1.1111111f) ); @@ -696,14 +743,20 @@ void Ciecam02::jch2xyz_ciecam02float ( vfloat &x, vfloat &y, vfloat &z, vfloat J gp = inverse_nonlinear_adaptationfloat ( gpa, fl ); bp = inverse_nonlinear_adaptationfloat ( bpa, fl ); - hpe_to_xyzfloat ( x, y, z, rp, gp, bp ); - xyz_to_cat02float ( rc, gc, bc, x, y, z ); + if(c16 == 1) {//cat02 + hpe_to_xyzfloat ( x, y, z, rp, gp, bp, c16); + xyz_to_cat02float ( rc, gc, bc, x, y, z, c16 ); - r = rc / (((yw * d) / rw) + (F2V (1.0f) - d)); - g = gc / (((yw * d) / gw) + (F2V (1.0f) - d)); - b = bc / (((yw * d) / bw) + (F2V (1.0f) - d)); + r = rc / (((yw * d) / rw) + (F2V (1.0f) - d)); + g = gc / (((yw * d) / gw) + (F2V (1.0f) - d)); + b = bc / (((yw * d) / bw) + (F2V (1.0f) - d)); + } else {//cat16 + r = rp / (((yw * d) / rw) + (F2V (1.0f) - d)); + g = gp / (((yw * d) / gw) + (F2V (1.0f) - d)); + b = bp / (((yw * d) / bw) + (F2V (1.0f) - d)); + } - cat02_to_xyzfloat ( x, y, z, r, g, b ); + cat02_to_xyzfloat ( x, y, z, r, g, b, c16 ); } #endif @@ -761,6 +814,4 @@ vfloat Ciecam02::inverse_nonlinear_adaptationfloat ( vfloat c, vfloat fl ) return (F2V (100.0f) / fl) * pow_F ( (F2V (27.13f) * c) / (F2V (400.0f) - c), F2V (2.38095238f) ); } #endif -//end CIECAM Billy Bigg - } diff --git a/rtengine/ciecam02.h b/rtengine/ciecam02.h index 75ccfaa8c..cd140a702 100644 --- a/rtengine/ciecam02.h +++ b/rtengine/ciecam02.h @@ -33,17 +33,17 @@ namespace rtengine { class Ciecam02 -{ +{//also used with Ciecam16 private: static float d_factorfloat ( float f, float la ); static float calculate_fl_from_la_ciecam02float ( float la ); - static float achromatic_response_to_whitefloat ( float x, float y, float z, float d, float fl, float nbb); - static void xyz_to_cat02float ( float &r, float &g, float &b, float x, float y, float z); - static void cat02_to_hpefloat ( float &rh, float &gh, float &bh, float r, float g, float b); + static float achromatic_response_to_whitefloat ( float x, float y, float z, float d, float fl, float nbb, int c16); + static void xyz_to_cat02float ( float &r, float &g, float &b, float x, float y, float z, int c16); + static void cat02_to_hpefloat ( float &rh, float &gh, float &bh, float r, float g, float b, int c16); #ifdef __SSE2__ - static void xyz_to_cat02float ( vfloat &r, vfloat &g, vfloat &b, vfloat x, vfloat y, vfloat z ); - static void cat02_to_hpefloat ( vfloat &rh, vfloat &gh, vfloat &bh, vfloat r, vfloat g, vfloat b ); + static void xyz_to_cat02float ( vfloat &r, vfloat &g, vfloat &b, vfloat x, vfloat y, vfloat z, int c16); + static void cat02_to_hpefloat ( vfloat &rh, vfloat &gh, vfloat &bh, vfloat r, vfloat g, vfloat b, int c16); static vfloat nonlinear_adaptationfloat ( vfloat c, vfloat fl ); #endif @@ -52,20 +52,20 @@ private: static float inverse_nonlinear_adaptationfloat ( float c, float fl ); static void calculate_abfloat ( float &aa, float &bb, float h, float e, float t, float nbb, float a ); static void Aab_to_rgbfloat ( float &r, float &g, float &b, float A, float aa, float bb, float nbb ); - static void hpe_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b ); - static void cat02_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b); + static void hpe_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b, int c16); + static void cat02_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b, int c16); #ifdef __SSE2__ static vfloat inverse_nonlinear_adaptationfloat ( vfloat c, vfloat fl ); static void calculate_abfloat ( vfloat &aa, vfloat &bb, vfloat h, vfloat e, vfloat t, vfloat nbb, vfloat a ); static void Aab_to_rgbfloat ( vfloat &r, vfloat &g, vfloat &b, vfloat A, vfloat aa, vfloat bb, vfloat nbb ); - static void hpe_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ); - static void cat02_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ); + static void hpe_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b, int c16); + static void cat02_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b, int c16); #endif public: Ciecam02 () {} static void curvecolorfloat (float satind, float satval, float &sres, float parsat); - static void curveJfloat (float br, float contr, const LUTu & histogram, LUTf & outCurve ) ; + static void curveJfloat (float br, float contr, float thr, const LUTu & histogram, LUTf & outCurve ) ; /** * Inverse transform from CIECAM02 JCh to XYZ. @@ -73,40 +73,40 @@ public: static void jch2xyz_ciecam02float ( float &x, float &y, float &z, float J, float C, float h, float xw, float yw, float zw, - float c, float nc, float n, float nbb, float ncb, float fl, float cz, float d, float aw ); + float c, float nc, float n, float nbb, float ncb, float fl, float cz, float d, float aw, int c16); #ifdef __SSE2__ static void jch2xyz_ciecam02float ( vfloat &x, vfloat &y, vfloat &z, vfloat J, vfloat C, vfloat h, vfloat xw, vfloat yw, vfloat zw, - vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz ); + vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz, int c16 ); #endif /** * Forward transform from XYZ to CIECAM02 JCh. */ static void initcam1float (float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, - float &cz, float &aw, float &wh, float &pfl, float &fl, float c); + float &cz, float &aw, float &wh, float &pfl, float &fl, float c, int c16); static void initcam2float (float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, - float &cz, float &aw, float &fl); + float &cz, float &aw, float &fl, int c16); static void xyz2jch_ciecam02float ( float &J, float &C, float &h, float aw, float fl, float x, float y, float z, float xw, float yw, float zw, - float c, float nc, float n, float nbb, float ncb, float cz, float d ); + float c, float nc, float n, float nbb, float ncb, float cz, float d, int c16); static void xyz2jchqms_ciecam02float ( float &J, float &C, float &h, float &Q, float &M, float &s, float aw, float fl, float wh, float x, float y, float z, float xw, float yw, float zw, - float c, float nc, float n, float nbb, float ncb, float pfl, float cz, float d ); + float c, float nc, float n, float nbb, float ncb, float pfl, float cz, float d, int c16); #ifdef __SSE2__ static void xyz2jchqms_ciecam02float ( vfloat &J, vfloat &C, vfloat &h, vfloat &Q, vfloat &M, vfloat &s, vfloat aw, vfloat fl, vfloat wh, vfloat x, vfloat y, vfloat z, vfloat xw, vfloat yw, vfloat zw, - vfloat c, vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d ); + vfloat c, vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d, int c16); #endif diff --git a/rtengine/color.cc b/rtengine/color.cc index 5761733f0..3fcd44eb8 100644 --- a/rtengine/color.cc +++ b/rtengine/color.cc @@ -1015,23 +1015,6 @@ void Color::xyz2r (float x, float y, float z, float &r, const double rgb_xyz[3][ r = ((rgb_xyz[0][0] * x + rgb_xyz[0][1] * y + rgb_xyz[0][2] * z)) ; } -// same for float -void Color::xyz2rgb (float x, float y, float z, float &r, float &g, float &b, const float rgb_xyz[3][3]) -{ - r = ((rgb_xyz[0][0] * x + rgb_xyz[0][1] * y + rgb_xyz[0][2] * z)) ; - g = ((rgb_xyz[1][0] * x + rgb_xyz[1][1] * y + rgb_xyz[1][2] * z)) ; - b = ((rgb_xyz[2][0] * x + rgb_xyz[2][1] * y + rgb_xyz[2][2] * z)) ; -} - -#ifdef __SSE2__ -void Color::xyz2rgb (vfloat x, vfloat y, vfloat z, vfloat &r, vfloat &g, vfloat &b, const vfloat rgb_xyz[3][3]) -{ - r = ((rgb_xyz[0][0] * x + rgb_xyz[0][1] * y + rgb_xyz[0][2] * z)) ; - g = ((rgb_xyz[1][0] * x + rgb_xyz[1][1] * y + rgb_xyz[1][2] * z)) ; - b = ((rgb_xyz[2][0] * x + rgb_xyz[2][1] * y + rgb_xyz[2][2] * z)) ; -} -#endif // __SSE2__ - #ifdef __SSE2__ void Color::trcGammaBW (float &r, float &g, float &b, float gammabwr, float gammabwg, float gammabwb) { @@ -1570,6 +1553,9 @@ void Color::calcGamma (double pwr, double ts, GammaValues &gamma) gamma[4] = g[4]; gamma[5] = g[5]; gamma[6] = 0.; + // if (rtengine::settings->verbose) { + // printf("g0=%f g1=%f g2=%f g3=%f g4=%f g5=%f\n", g[0], g[1], g[2], g[3], g[4], g[5]); + // } } void Color::gammaf2lut (LUTf &gammacurve, float gamma, float start, float slope, float divisor, float factor) { @@ -1646,19 +1632,6 @@ void Color::gammanf2lut (LUTf &gammacurve, float gamma, float divisor, float fac #endif } -void Color::Lab2XYZ(float L, float a, float b, float &x, float &y, float &z) -{ - float LL = L / 327.68f; - float aa = a / 327.68f; - float bb = b / 327.68f; - float fy = (c1By116 * LL) + c16By116; // (L+16)/116 - float fx = (0.002f * aa) + fy; - float fz = fy - (0.005f * bb); - x = 65535.0f * f2xyz(fx) * D50x; - z = 65535.0f * f2xyz(fz) * D50z; - y = (LL > epskap) ? 65535.0f * fy * fy * fy : 65535.0f * LL / kappa; -} - float Color::L2Y(float L) { const float LL = L / 327.68f; @@ -1676,27 +1649,6 @@ void Color::L2XYZ(float L, float &x, float &y, float &z) // for black & white y = (LL > epskap) ? 65535.0f * fy * fy * fy : 65535.0f * LL / kappa; } - -#ifdef __SSE2__ -void Color::Lab2XYZ(vfloat L, vfloat a, vfloat b, vfloat &x, vfloat &y, vfloat &z) -{ - vfloat c327d68 = F2V(327.68f); - L /= c327d68; - a /= c327d68; - b /= c327d68; - vfloat fy = F2V(c1By116) * L + F2V(c16By116); - vfloat fx = F2V(0.002f) * a + fy; - vfloat fz = fy - (F2V(0.005f) * b); - vfloat c65535 = F2V(65535.f); - x = c65535 * f2xyz(fx) * F2V(D50x); - z = c65535 * f2xyz(fz) * F2V(D50z); - vfloat res1 = fy * fy * fy; - vfloat res2 = L / F2V(kappa); - y = vself(vmaskf_gt(L, F2V(epskap)), res1, res2); - y *= c65535; -} -#endif // __SSE2__ - inline float Color::computeXYZ2Lab(float f) { if (f < 0.f) { @@ -2231,7 +2183,6 @@ void Color::gamutLchonly (float HH, float &Lprov1, float &Chprov1, float &R, flo const float ClipLevel = 65535.0f; bool inGamut; float2 sincosval = xsincosf(HH); - do { inGamut = true; @@ -2399,7 +2350,8 @@ void Color::gamutLchonly (float HH, float2 sincosval, float &Lprov1, float &Chpr } } - Chprov1 *= higherCoef; // decrease the chromaticity value + Chprov1 *= higherCoef; // decrease the chromaticity value + if (Chprov1 <= 3.0f) { Lprov1 += lowerCoef; diff --git a/rtengine/color.h b/rtengine/color.h index 704871d39..0fae99a5d 100644 --- a/rtengine/color.h +++ b/rtengine/color.h @@ -206,6 +206,11 @@ public: return static_cast(r) * workingspace[1][0] + static_cast(g) * workingspace[1][1] + static_cast(b) * workingspace[1][2]; } + static float rgbLuminance(float r, float g, float b, const float workingspace[3]) + { + return r * workingspace[0] + g * workingspace[1] + b * workingspace[2]; + } + #ifdef __SSE2__ static vfloat rgbLuminance(vfloat r, vfloat g, vfloat b, const vfloat workingspace[3]) { @@ -570,9 +575,20 @@ public: */ static void xyz2rgb (float x, float y, float z, float &r, float &g, float &b, const double rgb_xyz[3][3]); static void xyz2r (float x, float y, float z, float &r, const double rgb_xyz[3][3]); - static void xyz2rgb (float x, float y, float z, float &r, float &g, float &b, const float rgb_xyz[3][3]); + static inline void xyz2rgb (float x, float y, float z, float &r, float &g, float &b, const float rgb_xyz[3][3]) + { + r = ((rgb_xyz[0][0] * x + rgb_xyz[0][1] * y + rgb_xyz[0][2] * z)) ; + g = ((rgb_xyz[1][0] * x + rgb_xyz[1][1] * y + rgb_xyz[1][2] * z)) ; + b = ((rgb_xyz[2][0] * x + rgb_xyz[2][1] * y + rgb_xyz[2][2] * z)) ; + } + #ifdef __SSE2__ - static void xyz2rgb (vfloat x, vfloat y, vfloat z, vfloat &r, vfloat &g, vfloat &b, const vfloat rgb_xyz[3][3]); + static inline void xyz2rgb (vfloat x, vfloat y, vfloat z, vfloat &r, vfloat &g, vfloat &b, const vfloat rgb_xyz[3][3]) + { + r = ((rgb_xyz[0][0] * x + rgb_xyz[0][1] * y + rgb_xyz[0][2] * z)) ; + g = ((rgb_xyz[1][0] * x + rgb_xyz[1][1] * y + rgb_xyz[1][2] * z)) ; + b = ((rgb_xyz[2][0] * x + rgb_xyz[2][1] * y + rgb_xyz[2][2] * z)) ; + } #endif @@ -603,12 +619,40 @@ public: * @param y Y coordinate [0 ; 65535] ; can be negative! (return value) * @param z Z coordinate [0 ; 65535] ; can be negative! (return value) */ - static void Lab2XYZ(float L, float a, float b, float &x, float &y, float &z); + static inline void Lab2XYZ(float L, float a, float b, float &x, float &y, float &z) + { + float LL = L / 327.68f; + float aa = a / 327.68f; + float bb = b / 327.68f; + float fy = (c1By116 * LL) + c16By116; // (L+16)/116 + float fx = (0.002f * aa) + fy; + float fz = fy - (0.005f * bb); + x = 65535.f * f2xyz(fx) * D50x; + z = 65535.f * f2xyz(fz) * D50z; + y = (LL > epskapf) ? 65535.f * fy * fy * fy : 65535.f * LL / kappaf; + } + static void L2XYZ(float L, float &x, float &y, float &z); static float L2Y(float L); #ifdef __SSE2__ - static void Lab2XYZ(vfloat L, vfloat a, vfloat b, vfloat &x, vfloat &y, vfloat &z); +static inline void Lab2XYZ(vfloat L, vfloat a, vfloat b, vfloat &x, vfloat &y, vfloat &z) +{ + vfloat c327d68 = F2V(327.68f); + L /= c327d68; + a /= c327d68; + b /= c327d68; + vfloat fy = F2V(c1By116) * L + F2V(c16By116); + vfloat fx = F2V(0.002f) * a + fy; + vfloat fz = fy - (F2V(0.005f) * b); + vfloat c65535 = F2V(65535.f); + x = c65535 * f2xyz(fx) * F2V(D50x); + z = c65535 * f2xyz(fz) * F2V(D50z); + vfloat res1 = fy * fy * fy; + vfloat res2 = L / F2V(kappa); + y = vself(vmaskf_gt(L, F2V(epskap)), res1, res2); + y *= c65535; +} #endif // __SSE2__ /** diff --git a/rtengine/curves.cc b/rtengine/curves.cc index 640074075..c6bf86954 100644 --- a/rtengine/curves.cc +++ b/rtengine/curves.cc @@ -3460,11 +3460,12 @@ void PerceptualToneCurve::BatchApply(const size_t start, const size_t end, float Color::Prophotoxyz(r, g, b, x, y, z); float J, C, h; + int c16 = 1; Ciecam02::xyz2jch_ciecam02float(J, C, h, aw, fl, x * 0.0015259022f, y * 0.0015259022f, z * 0.0015259022f, xw, yw, zw, - c, nc, pow1, nbb, ncb, cz, d); + c, nc, pow1, nbb, ncb, cz, d, c16); if (!isfinite(J) || !isfinite(C) || !isfinite(h)) { @@ -3579,11 +3580,10 @@ void PerceptualToneCurve::BatchApply(const size_t start, const size_t end, float } C *= cmul; - Ciecam02::jch2xyz_ciecam02float(x, y, z, J, C, h, xw, yw, zw, - c, nc, pow1, nbb, ncb, fl, cz, d, aw); + c, nc, pow1, nbb, ncb, fl, cz, d, aw, c16); if (!isfinite(x) || !isfinite(y) || !isfinite(z)) { // can happen for colours on the rim of being outside gamut, that worked without chroma scaling but not with. Then we return only the curve's result. @@ -3698,9 +3698,9 @@ void PerceptualToneCurve::init() f = 1.00f; c = 0.69f; nc = 1.00f; - + int c16 = 1;//with cat02 for compatibility Ciecam02::initcam1float(yb, 1.f, f, la, xw, yw, zw, n, d, nbb, ncb, - cz, aw, wh, pfl, fl, c); + cz, aw, wh, pfl, fl, c, c16); pow1 = pow_F(1.64f - pow_F(0.29f, n), 0.73f); { diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index ed2eea212..275b35d81 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -1399,7 +1399,7 @@ void CLASS nikon_load_raw() void CLASS nikon_yuv_load_raw() { - int row, col, yuv[4], rgb[3], b, c; + int row, col, yuv[4] = {}, rgb[3], b, c; UINT64 bitbuf=0; for (row=0; row < raw_height; row++) @@ -5620,7 +5620,7 @@ nf: order = 0x4949; if (tag == 2 && strstr(make,"NIKON") && !iso_speed) iso_speed = (get2(),get2()); if ((tag == 0x25 || tag == 0x28) && strstr(make,"NIKON") && !iso_speed) { // Nikon ISOInfo Tags/ISO & ISO2 - uchar iso[1]; + uchar iso[1] = {}; fread (iso, 1, 1, ifp); iso_speed = 100 * pow(2,(float)iso[0]/12.0-5); } @@ -9568,7 +9568,7 @@ void CLASS identify() apply_tiff(); if (!strcmp(model, "X-T3")) { height = raw_height - 2; - } else if (!strcmp(model, "GFX 100")) { + } else if (!strcmp(model, "GFX 100") || !strcmp(model, "GFX100S")) { load_flags = 0; } if (!load_raw) { @@ -10045,7 +10045,7 @@ canon_a5: } else if (!strncmp(model, "X-A3", 4) || !strncmp(model, "X-A5", 4)) { width = raw_width = 6016; height = raw_height = 4014; - } else if (!strcmp(model, "X-Pro3") || !strcmp(model, "X-T3") || !strcmp(model, "X-T30") || !strcmp(model, "X-T4") || !strcmp(model, "X100V")) { + } else if (!strcmp(model, "X-Pro3") || !strcmp(model, "X-T3") || !strcmp(model, "X-T30") || !strcmp(model, "X-T4") || !strcmp(model, "X100V") || !strcmp(model, "X-S10")) { width = raw_width = 6384; height = raw_height = 4182; } @@ -10108,7 +10108,6 @@ konica_400z: } } else if (!strcmp(model,"*ist D")) { load_raw = &CLASS unpacked_load_raw; - data_error = -1; } else if (!strcmp(model,"*ist DS")) { height -= 2; } else if (!strcmp(make,"Samsung") && raw_width == 4704) { diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index ae183ba63..d644d2d1e 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -646,7 +646,8 @@ void Crop::update(int todo) parent->adnListener->noiseChanged(0.f, 0.f); } - if (todo & M_LINDENOISE) { + if (todo & (M_INIT | M_LINDENOISE | M_HDR)) { + if (skip == 1 && denoiseParams.enabled) { float nresi, highresi; @@ -669,8 +670,16 @@ void Crop::update(int todo) } } + if (params.filmNegative.enabled && params.filmNegative.colorSpace == FilmNegativeParams::ColorSpace::INPUT) { + parent->ipf.filmNegativeProcess(baseCrop, baseCrop, params.filmNegative); + } + parent->imgsrc->convertColorSpace(origCrop, params.icm, parent->currWB); + if (params.filmNegative.enabled && params.filmNegative.colorSpace != FilmNegativeParams::ColorSpace::INPUT) { + parent->ipf.filmNegativeProcess(baseCrop, baseCrop, params.filmNegative); + } + delete [] min_r; delete [] min_b; delete [] lumL; @@ -802,12 +811,335 @@ void Crop::update(int todo) } + + if ((todo & (M_AUTOEXP | M_RGBCURVE)) && params.locallab.enabled && !params.locallab.spots.empty()) { + + //I made a little change here. Rather than have luminanceCurve (and others) use in/out lab images, we can do more if we copy right here. + parent->ipf.rgb2lab(*baseCrop, *laboCrop, params.icm.workingProfile); + + + labnCrop->CopyFrom(laboCrop); + + const std::unique_ptr reservCrop(new LabImage(*laboCrop, true)); + const std::unique_ptr lastorigCrop(new LabImage(*laboCrop, true)); + std::unique_ptr savenormtmCrop; + std::unique_ptr savenormretiCrop; + auto& lllocalcurve2 = parent->lllocalcurve; + auto& cllocalcurve2 = parent->cllocalcurve; + auto& lclocalcurve2 = parent->lclocalcurve; + auto& cclocalcurve2 = parent->cclocalcurve; + auto& rgblocalcurve2 = parent->rgblocalcurve; + auto& exlocalcurve2 = parent->exlocalcurve; + auto& lmasklocalcurve2 = parent->lmasklocalcurve; + auto& lmaskexplocalcurve2 = parent->lmaskexplocalcurve; + auto& lmaskSHlocalcurve2 = parent->lmaskSHlocalcurve; + auto& lmaskviblocalcurve2 = parent->lmaskviblocalcurve; + auto& lmasktmlocalcurve2 = parent->lmasktmlocalcurve; + auto& lmaskretilocalcurve2 = parent->lmaskretilocalcurve; + auto& lmaskcblocalcurve2 = parent->lmaskcblocalcurve; + auto& lmaskbllocalcurve2 = parent->lmaskbllocalcurve; + auto& lmasklclocalcurve2 = parent->lmasklclocalcurve; + auto& lmaskloglocalcurve2 = parent->lmaskloglocalcurve; + auto& hltonecurveloc2 = parent->hltonecurveloc; + auto& shtonecurveloc2 = parent->shtonecurveloc; + auto& tonecurveloc2 = parent->tonecurveloc; + auto& lightCurveloc2 = parent->lightCurveloc; + auto& locRETgainCurve = parent->locRETgainCurve; + auto& locRETtransCurve = parent->locRETtransCurve; + auto& loclhCurve = parent->loclhCurve; + auto& lochhCurve = parent->lochhCurve; + auto& locchCurve = parent->locchCurve; + auto& locccmasCurve = parent->locccmasCurve; + auto& locllmasCurve = parent->locllmasCurve; + auto& lochhmasCurve = parent->lochhmasCurve; + auto& lochhhmasCurve = parent->lochhhmasCurve; + auto& locccmasexpCurve = parent->locccmasexpCurve; + auto& locllmasexpCurve = parent->locllmasexpCurve; + auto& lochhmasexpCurve = parent->lochhmasexpCurve; + auto& locccmasSHCurve = parent->locccmasSHCurve; + auto& locllmasSHCurve = parent->locllmasSHCurve; + auto& lochhmasSHCurve = parent->lochhmasSHCurve; + auto& locccmasvibCurve = parent->locccmasvibCurve; + auto& locllmasvibCurve = parent->locllmasvibCurve; + auto& lochhmasvibCurve = parent->lochhmasvibCurve; + auto& locccmaslcCurve = parent->locccmaslcCurve; + auto& locllmaslcCurve = parent->locllmaslcCurve; + auto& lochhmaslcCurve = parent->lochhmaslcCurve; + auto& locccmascbCurve = parent->locccmascbCurve; + auto& locllmascbCurve = parent->locllmascbCurve; + auto& lochhmascbCurve = parent->lochhmascbCurve; + auto& locccmasretiCurve = parent->locccmasretiCurve; + auto& locllmasretiCurve = parent->locllmasretiCurve; + auto& lochhmasretiCurve = parent->lochhmasretiCurve; + auto& locccmastmCurve = parent->locccmastmCurve; + auto& locllmastmCurve = parent->locllmastmCurve; + auto& lochhmastmCurve = parent->lochhmastmCurve; + auto& locccmasblCurve = parent->locccmasblCurve; + auto& locllmasblCurve = parent->locllmasblCurve; + auto& lochhmasblCurve = parent->lochhmasblCurve; + auto& locccmaslogCurve = parent->locccmaslogCurve; + auto& locllmaslogCurve = parent->locllmaslogCurve; + auto& lochhmaslogCurve = parent->lochhmaslogCurve; + + auto& locccmas_Curve = parent->locccmas_Curve; + auto& locllmas_Curve = parent->locllmas_Curve; + auto& lochhmas_Curve = parent->lochhmas_Curve; + auto& lochhhmas_Curve = parent->lochhhmas_Curve; + auto& locwavCurve = parent->locwavCurve; + auto& loclmasCurveblwav = parent->loclmasCurveblwav; + auto& loclmasCurvecolwav = parent->loclmasCurvecolwav; + auto& loclevwavCurve = parent->loclevwavCurve; + auto& locconwavCurve = parent->locconwavCurve; + auto& loccompwavCurve = parent->loccompwavCurve; + auto& loccomprewavCurve = parent->loccomprewavCurve; + auto& locedgwavCurve = parent->locedgwavCurve; + auto& locwavCurvehue = parent->locwavCurvehue; + auto& locwavCurveden = parent->locwavCurveden; + auto& lmasklocal_curve2 = parent->lmasklocal_curve; + auto& loclmasCurve_wav = parent->loclmasCurve_wav; + + for (int sp = 0; sp < (int)params.locallab.spots.size(); sp++) { + locRETgainCurve.Set(params.locallab.spots.at(sp).localTgaincurve); + locRETtransCurve.Set(params.locallab.spots.at(sp).localTtranscurve); + const bool LHutili = loclhCurve.Set(params.locallab.spots.at(sp).LHcurve); + const bool HHutili = lochhCurve.Set(params.locallab.spots.at(sp).HHcurve); + const bool CHutili = locchCurve.Set(params.locallab.spots.at(sp).CHcurve); + const bool lcmasutili = locccmasCurve.Set(params.locallab.spots.at(sp).CCmaskcurve); + const bool llmasutili = locllmasCurve.Set(params.locallab.spots.at(sp).LLmaskcurve); + const bool lhmasutili = lochhmasCurve.Set(params.locallab.spots.at(sp).HHmaskcurve); + const bool lhhmasutili = lochhhmasCurve.Set(params.locallab.spots.at(sp).HHhmaskcurve); + const bool lcmasexputili = locccmasexpCurve.Set(params.locallab.spots.at(sp).CCmaskexpcurve); + const bool llmasexputili = locllmasexpCurve.Set(params.locallab.spots.at(sp).LLmaskexpcurve); + const bool lhmasexputili = lochhmasexpCurve.Set(params.locallab.spots.at(sp).HHmaskexpcurve); + const bool lcmasSHutili = locccmasSHCurve.Set(params.locallab.spots.at(sp).CCmaskSHcurve); + const bool llmasSHutili = locllmasSHCurve.Set(params.locallab.spots.at(sp).LLmaskSHcurve); + const bool lhmasSHutili = lochhmasSHCurve.Set(params.locallab.spots.at(sp).HHmaskSHcurve); + const bool lcmasvibutili = locccmasvibCurve.Set(params.locallab.spots.at(sp).CCmaskvibcurve); + const bool llmasvibutili = locllmasvibCurve.Set(params.locallab.spots.at(sp).LLmaskvibcurve); + const bool lhmasvibutili = lochhmasvibCurve.Set(params.locallab.spots.at(sp).HHmaskvibcurve); + const bool lcmascbutili = locccmascbCurve.Set(params.locallab.spots.at(sp).CCmaskcbcurve); + const bool llmascbutili = locllmascbCurve.Set(params.locallab.spots.at(sp).LLmaskcbcurve); + const bool lhmascbutili = lochhmascbCurve.Set(params.locallab.spots.at(sp).HHmaskcbcurve); + const bool lcmasretiutili = locccmasretiCurve.Set(params.locallab.spots.at(sp).CCmaskreticurve); + const bool llmasretiutili = locllmasretiCurve.Set(params.locallab.spots.at(sp).LLmaskreticurve); + const bool lhmasretiutili = lochhmasretiCurve.Set(params.locallab.spots.at(sp).HHmaskreticurve); + const bool lcmastmutili = locccmastmCurve.Set(params.locallab.spots.at(sp).CCmasktmcurve); + const bool llmastmutili = locllmastmCurve.Set(params.locallab.spots.at(sp).LLmasktmcurve); + const bool lhmastmutili = lochhmastmCurve.Set(params.locallab.spots.at(sp).HHmasktmcurve); + const bool lcmasblutili = locccmasblCurve.Set(params.locallab.spots.at(sp).CCmaskblcurve); + const bool llmasblutili = locllmasblCurve.Set(params.locallab.spots.at(sp).LLmaskblcurve); + const bool lhmasblutili = lochhmasblCurve.Set(params.locallab.spots.at(sp).HHmaskblcurve); + const bool lcmaslogutili = locccmaslogCurve.Set(params.locallab.spots.at(sp).CCmaskcurveL); + const bool llmaslogutili = locllmaslogCurve.Set(params.locallab.spots.at(sp).LLmaskcurveL); + const bool lhmaslogutili = lochhmaslogCurve.Set(params.locallab.spots.at(sp).HHmaskcurveL); + + const bool lcmas_utili = locccmas_Curve.Set(params.locallab.spots.at(sp).CCmask_curve); + const bool llmas_utili = locllmas_Curve.Set(params.locallab.spots.at(sp).LLmask_curve); + const bool lhmas_utili = lochhmas_Curve.Set(params.locallab.spots.at(sp).HHmask_curve); + const bool lhhmas_utili = lochhhmas_Curve.Set(params.locallab.spots.at(sp).HHhmask_curve); + const bool lmasutili_wav = loclmasCurve_wav.Set(params.locallab.spots.at(sp).LLmask_curvewav); + const bool lmasutiliblwav = loclmasCurveblwav.Set(params.locallab.spots.at(sp).LLmaskblcurvewav); + const bool lmasutilicolwav = loclmasCurvecolwav.Set(params.locallab.spots.at(sp).LLmaskcolcurvewav); + const bool lcmaslcutili = locccmaslcCurve.Set(params.locallab.spots.at(sp).CCmasklccurve); + const bool llmaslcutili = locllmaslcCurve.Set(params.locallab.spots.at(sp).LLmasklccurve); + const bool lhmaslcutili = lochhmaslcCurve.Set(params.locallab.spots.at(sp).HHmasklccurve); + const bool locwavutili = locwavCurve.Set(params.locallab.spots.at(sp).locwavcurve); + const bool locwavhueutili = locwavCurvehue.Set(params.locallab.spots.at(sp).locwavcurvehue); + const bool locwavdenutili = locwavCurveden.Set(params.locallab.spots.at(sp).locwavcurveden); + const bool loclevwavutili = loclevwavCurve.Set(params.locallab.spots.at(sp).loclevwavcurve); + const bool locconwavutili = locconwavCurve.Set(params.locallab.spots.at(sp).locconwavcurve); + const bool loccompwavutili = loccompwavCurve.Set(params.locallab.spots.at(sp).loccompwavcurve); + const bool loccomprewavutili = loccomprewavCurve.Set(params.locallab.spots.at(sp).loccomprewavcurve); + const bool locedgwavutili = locedgwavCurve.Set(params.locallab.spots.at(sp).locedgwavcurve); + const bool locallutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).llcurve, lllocalcurve2, skip); + const bool localclutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).clcurve, cllocalcurve2, skip); + const bool locallcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).lccurve, lclocalcurve2, skip); + const bool localrgbutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).rgbcurve, rgblocalcurve2, skip); + const bool localcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).cccurve, cclocalcurve2, skip); + const bool localexutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).excurve, exlocalcurve2, skip); + const bool localmaskutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskcurve, lmasklocalcurve2, skip); + const bool localmaskexputili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskexpcurve, lmaskexplocalcurve2, skip); + const bool localmaskSHutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).LmaskSHcurve, lmaskSHlocalcurve2, skip); + const bool localmaskvibutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskvibcurve, lmaskviblocalcurve2, skip); + const bool localmasktmutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmasktmcurve, lmasktmlocalcurve2, skip); + const bool localmaskretiutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskreticurve, lmaskretilocalcurve2, skip); + const bool localmaskcbutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskcbcurve, lmaskcblocalcurve2, skip); + const bool localmasklcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmasklccurve, lmasklclocalcurve2, skip); + const bool localmaskblutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskblcurve, lmaskbllocalcurve2, skip); + const bool localmasklogutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).LmaskcurveL, lmaskloglocalcurve2, skip); + const bool localmask_utili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmask_curve, lmasklocal_curve2, skip); + + double ecomp = params.locallab.spots.at(sp).expcomp; + double black = params.locallab.spots.at(sp).black; + double hlcompr = params.locallab.spots.at(sp).hlcompr; + double hlcomprthresh = params.locallab.spots.at(sp).hlcomprthresh; + double shcompr = params.locallab.spots.at(sp).shcompr; + double br = params.locallab.spots.at(sp).lightness; + if(black < 0. && params.locallab.spots.at(sp).expMethod == "pde" ) { + black *= 1.5; + } + + double cont = params.locallab.spots.at(sp).contrast; + double huere, chromare, lumare, huerefblu, chromarefblu, lumarefblu, sobelre; + huerefblu = parent->huerefblurs[sp]; + chromarefblu = parent->chromarefblurs[sp]; + lumarefblu = parent->lumarefblurs[sp]; + huere = parent->huerefs[sp]; + chromare = parent->chromarefs[sp]; + lumare = parent->lumarefs[sp]; + sobelre = parent->sobelrefs[sp]; + const float avge = parent->avgs[sp]; + float meantme = parent->meantms[sp]; + float stdtme = parent->stdtms[sp]; + float meanretie = parent->meanretis[sp]; + float stdretie = parent->stdretis[sp]; + + float minCD; + float maxCD; + float mini; + float maxi; + float Tmean; + float Tsigma; + float Tmin; + float Tmax; + int lastsav; + CurveFactory::complexCurvelocal(ecomp, black / 65535., hlcompr, hlcomprthresh, shcompr, br, cont, lumare, + hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, avge, + skip); + // Locallab mask are only shown for selected spot + if (sp == params.locallab.selspot) { + parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop.get(), savenormtmCrop.get(), savenormretiCrop.get(), lastorigCrop.get(), cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, locRETtransCurve, + lllocalcurve2,locallutili, + cllocalcurve2, localclutili, + lclocalcurve2, locallcutili, + loclhCurve, lochhCurve, locchCurve, + lmasklocalcurve2, localmaskutili, + lmaskexplocalcurve2, localmaskexputili, + lmaskSHlocalcurve2, localmaskSHutili, + lmaskviblocalcurve2, localmaskvibutili, + lmasktmlocalcurve2, localmasktmutili, + lmaskretilocalcurve2, localmaskretiutili, + lmaskcblocalcurve2, localmaskcbutili, + lmaskbllocalcurve2, localmaskblutili, + lmasklclocalcurve2, localmasklcutili, + lmaskloglocalcurve2, localmasklogutili, + lmasklocal_curve2, localmask_utili, + + locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, + locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, + locccmasvibCurve, lcmasvibutili, locllmasvibCurve, llmasvibutili, lochhmasvibCurve, lhmasvibutili, + locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, + locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili, + locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili, + locccmasblCurve, lcmasblutili, locllmasblCurve, llmasblutili, lochhmasblCurve, lhmasblutili, + locccmaslcCurve, lcmaslcutili, locllmaslcCurve, llmaslcutili, lochhmaslcCurve, lhmaslcutili, + locccmaslogCurve, lcmaslogutili, locllmaslogCurve, llmaslogutili, lochhmaslogCurve, lhmaslogutili, + + locccmas_Curve, lcmas_utili, locllmas_Curve, llmas_utili, lochhmas_Curve, lhmas_utili, + lochhhmas_Curve, lhhmas_utili, + loclmasCurveblwav,lmasutiliblwav, + loclmasCurvecolwav,lmasutilicolwav, + locwavCurve, locwavutili, + loclevwavCurve, loclevwavutili, + locconwavCurve, locconwavutili, + loccompwavCurve, loccompwavutili, + loccomprewavCurve, loccomprewavutili, + locwavCurvehue, locwavhueutili, + locwavCurveden, locwavdenutili, + locedgwavCurve, locedgwavutili, + loclmasCurve_wav,lmasutili_wav, + LHutili, HHutili, CHutili, cclocalcurve2, localcutili, rgblocalcurve2, localrgbutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, + huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav, + parent->previewDeltaE, parent->locallColorMask, parent->locallColorMaskinv, parent->locallExpMask, parent->locallExpMaskinv, parent->locallSHMask, parent->locallSHMaskinv, parent->locallvibMask, parent->localllcMask, parent->locallsharMask, parent->locallcbMask, parent->locallretiMask, parent->locallsoftMask, parent->localltmMask, parent->locallblMask, + parent->localllogMask, parent->locall_Mask, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, + meantme, stdtme, meanretie, stdretie); + if(parent->previewDeltaE || parent->locallColorMask == 5 || parent->locallvibMask == 4 || parent->locallExpMask == 5 || parent->locallSHMask == 4 || parent->localllcMask == 4 || parent->localltmMask == 4 || parent->localllogMask == 4 || parent->locallsoftMask == 6 || parent->localllcMask == 4) { + params.blackwhite.enabled = false; + params.colorToning.enabled = false; + params.rgbCurves.enabled = false; + params.chmixer.enabled = false; + params.hsvequalizer.enabled = false; + params.filmSimulation.enabled = false; + params.toneCurve.black = 0.f; + params.toneCurve.saturation = 0.f; + params.toneCurve.brightness= 0.f; + params.toneCurve.contrast = 0.f; + params.toneCurve.hlcompr = 0.f; + //these 3 are "before" LA + //params.toneCurve.expcomp = 0; + //params.toneCurve.curve = { 0 }; + //params.toneCurve.curve2 = { 0 }; + params.colorappearance.enabled = false; + params.vibrance.enabled = false; + params.labCurve.enabled = false; + params.wavelet.enabled = false; + params.epd.enabled = false; + params.softlight.enabled = false; + } + } else { + parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop.get(), savenormtmCrop.get(), savenormretiCrop.get(), lastorigCrop.get(), cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, locRETtransCurve, + lllocalcurve2,locallutili, + cllocalcurve2, localclutili, + lclocalcurve2, locallcutili, + loclhCurve, lochhCurve, locchCurve, + lmasklocalcurve2, localmaskutili, + lmaskexplocalcurve2, localmaskexputili, + lmaskSHlocalcurve2, localmaskSHutili, + lmaskviblocalcurve2, localmaskvibutili, + lmasktmlocalcurve2, localmasktmutili, + lmaskretilocalcurve2, localmaskretiutili, + lmaskcblocalcurve2, localmaskcbutili, + lmaskbllocalcurve2, localmaskblutili, + lmasklclocalcurve2, localmasklcutili, + lmaskloglocalcurve2, localmasklogutili, + lmasklocal_curve2, localmask_utili, + + locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili,lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, + locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, + locccmasvibCurve, lcmasvibutili, locllmasvibCurve, llmasvibutili, lochhmasvibCurve, lhmasvibutili, + locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, + locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili, + locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili, + locccmasblCurve, lcmasblutili, locllmasblCurve, llmasblutili, lochhmasblCurve, lhmasblutili, + locccmaslcCurve, lcmaslcutili, locllmaslcCurve, llmaslcutili, lochhmaslcCurve, lhmaslcutili, + locccmaslogCurve, lcmaslogutili, locllmaslogCurve, llmaslogutili, lochhmaslogCurve, lhmaslogutili, + + locccmas_Curve, lcmas_utili, locllmas_Curve, llmas_utili, lochhmas_Curve, lhmas_utili, + lochhhmas_Curve, lhhmas_utili, + + loclmasCurveblwav,lmasutiliblwav, + loclmasCurvecolwav,lmasutilicolwav, + locwavCurve, locwavutili, + loclevwavCurve, loclevwavutili, + locconwavCurve, locconwavutili, + loccompwavCurve, loccompwavutili, + loccomprewavCurve, loccomprewavutili, + locwavCurvehue, locwavhueutili, + locwavCurveden, locwavdenutili, + locedgwavCurve, locedgwavutili, + loclmasCurve_wav,lmasutili_wav, + LHutili, HHutili, CHutili, cclocalcurve2, localcutili, rgblocalcurve2, localrgbutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, + huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, + meantme, stdtme, meanretie, stdretie); + } + if (sp + 1u < params.locallab.spots.size()) { + // do not copy for last spot as it is not needed anymore + lastorigCrop->CopyFrom(labnCrop); + } + + if (skip <= 2) { + Glib::usleep(settings->cropsleep); //wait to avoid crash when crop 100% and move window + } + } + parent->ipf.lab2rgb(*labnCrop, *baseCrop, params.icm.workingProfile); + } + if (todo & M_RGBCURVE) { Imagefloat *workingCrop = baseCrop; /* if (params.icm.workingTRC == "Custom") { //exec TRC IN free const Glib::ustring profile = params.icm.workingProfile; - if (profile == "sRGB" || profile == "Adobe RGB" || profile == "ProPhoto" || profile == "WideGamut" || profile == "BruceRGB" || profile == "Beta RGB" || profile == "BestRGB" || profile == "Rec2020" || profile == "ACESp0" || profile == "ACESp1") { const int cw = baseCrop->getWidth(); const int ch = baseCrop->getHeight(); @@ -834,292 +1166,11 @@ void Crop::update(int todo) } } - /*xref=000;yref=000; - if (colortest && cropw>115 && croph>115) - for(int j=1;j<5;j++){ - xref+=j*30;yref+=j*30; - if (settings->verbose) { - printf("after rgbProc RGB Xr%i Yr%i Skip=%d R=%f G=%f B=%f \n",xref,yref,skip, - baseCrop->r[(int)(xref/skip)][(int)(yref/skip)]/256, - baseCrop->g[(int)(xref/skip)][(int)(yref/skip)]/256, - baseCrop->b[(int)(xref/skip)][(int)(yref/skip)]/256); - printf("after rgbProc Lab Xr%i Yr%i Skip=%d l=%f a=%f b=%f \n",xref,yref,skip, - laboCrop->L[(int)(xref/skip)][(int)(yref/skip)]/327, - laboCrop->a[(int)(xref/skip)][(int)(yref/skip)]/327, - laboCrop->b[(int)(xref/skip)][(int)(yref/skip)]/327); - } - }*/ - // apply luminance operations if (todo & (M_LUMINANCE + M_COLOR)) { // //I made a little change here. Rather than have luminanceCurve (and others) use in/out lab images, we can do more if we copy right here. labnCrop->CopyFrom(laboCrop); - if (params.locallab.enabled && !params.locallab.spots.empty()) { - const std::unique_ptr reservCrop(new LabImage(*laboCrop, true)); - const std::unique_ptr lastorigCrop(new LabImage(*laboCrop, true)); - auto& lllocalcurve2 = parent->lllocalcurve; - auto& cllocalcurve2 = parent->cllocalcurve; - auto& lclocalcurve2 = parent->lclocalcurve; - auto& cclocalcurve2 = parent->cclocalcurve; - auto& rgblocalcurve2 = parent->rgblocalcurve; - auto& exlocalcurve2 = parent->exlocalcurve; - auto& lmasklocalcurve2 = parent->lmasklocalcurve; - auto& lmaskexplocalcurve2 = parent->lmaskexplocalcurve; - auto& lmaskSHlocalcurve2 = parent->lmaskSHlocalcurve; - auto& lmaskviblocalcurve2 = parent->lmaskviblocalcurve; - auto& lmasktmlocalcurve2 = parent->lmasktmlocalcurve; - auto& lmaskretilocalcurve2 = parent->lmaskretilocalcurve; - auto& lmaskcblocalcurve2 = parent->lmaskcblocalcurve; - auto& lmaskbllocalcurve2 = parent->lmaskbllocalcurve; - auto& lmasklclocalcurve2 = parent->lmasklclocalcurve; - auto& hltonecurveloc2 = parent->hltonecurveloc; - auto& shtonecurveloc2 = parent->shtonecurveloc; - auto& tonecurveloc2 = parent->tonecurveloc; - auto& lightCurveloc2 = parent->lightCurveloc; - auto& locRETgainCurve = parent->locRETgainCurve; - auto& locRETtransCurve = parent->locRETtransCurve; - auto& loclhCurve = parent->loclhCurve; - auto& lochhCurve = parent->lochhCurve; - auto& locchCurve = parent->locchCurve; - auto& locccmasCurve = parent->locccmasCurve; - auto& locllmasCurve = parent->locllmasCurve; - auto& lochhmasCurve = parent->lochhmasCurve; - auto& lochhhmasCurve = parent->lochhhmasCurve; - auto& locccmasexpCurve = parent->locccmasexpCurve; - auto& locllmasexpCurve = parent->locllmasexpCurve; - auto& lochhmasexpCurve = parent->lochhmasexpCurve; - auto& locccmasSHCurve = parent->locccmasSHCurve; - auto& locllmasSHCurve = parent->locllmasSHCurve; - auto& lochhmasSHCurve = parent->lochhmasSHCurve; - auto& locccmasvibCurve = parent->locccmasvibCurve; - auto& locllmasvibCurve = parent->locllmasvibCurve; - auto& lochhmasvibCurve = parent->lochhmasvibCurve; - auto& locccmaslcCurve = parent->locccmaslcCurve; - auto& locllmaslcCurve = parent->locllmaslcCurve; - auto& lochhmaslcCurve = parent->lochhmaslcCurve; - auto& locccmascbCurve = parent->locccmascbCurve; - auto& locllmascbCurve = parent->locllmascbCurve; - auto& lochhmascbCurve = parent->lochhmascbCurve; - auto& locccmasretiCurve = parent->locccmasretiCurve; - auto& locllmasretiCurve = parent->locllmasretiCurve; - auto& lochhmasretiCurve = parent->lochhmasretiCurve; - auto& locccmastmCurve = parent->locccmastmCurve; - auto& locllmastmCurve = parent->locllmastmCurve; - auto& lochhmastmCurve = parent->lochhmastmCurve; - auto& locccmasblCurve = parent->locccmasblCurve; - auto& locllmasblCurve = parent->locllmasblCurve; - auto& lochhmasblCurve = parent->lochhmasblCurve; - auto& locccmas_Curve = parent->locccmas_Curve; - auto& locllmas_Curve = parent->locllmas_Curve; - auto& lochhmas_Curve = parent->lochhmas_Curve; - auto& lochhhmas_Curve = parent->lochhhmas_Curve; - auto& locwavCurve = parent->locwavCurve; - auto& loclmasCurveblwav = parent->loclmasCurveblwav; - auto& loclmasCurvecolwav = parent->loclmasCurvecolwav; - auto& loclevwavCurve = parent->loclevwavCurve; - auto& locconwavCurve = parent->locconwavCurve; - auto& loccompwavCurve = parent->loccompwavCurve; - auto& loccomprewavCurve = parent->loccomprewavCurve; - auto& locedgwavCurve = parent->locedgwavCurve; - auto& locwavCurveden = parent->locwavCurveden; - auto& lmasklocal_curve2 = parent->lmasklocal_curve; - auto& loclmasCurve_wav = parent->loclmasCurve_wav; - - for (int sp = 0; sp < (int)params.locallab.spots.size(); sp++) { - locRETgainCurve.Set(params.locallab.spots.at(sp).localTgaincurve); - locRETtransCurve.Set(params.locallab.spots.at(sp).localTtranscurve); - const bool LHutili = loclhCurve.Set(params.locallab.spots.at(sp).LHcurve); - const bool HHutili = lochhCurve.Set(params.locallab.spots.at(sp).HHcurve); - const bool CHutili = locchCurve.Set(params.locallab.spots.at(sp).CHcurve); - const bool lcmasutili = locccmasCurve.Set(params.locallab.spots.at(sp).CCmaskcurve); - const bool llmasutili = locllmasCurve.Set(params.locallab.spots.at(sp).LLmaskcurve); - const bool lhmasutili = lochhmasCurve.Set(params.locallab.spots.at(sp).HHmaskcurve); - const bool lhhmasutili = lochhhmasCurve.Set(params.locallab.spots.at(sp).HHhmaskcurve); - const bool lcmasexputili = locccmasexpCurve.Set(params.locallab.spots.at(sp).CCmaskexpcurve); - const bool llmasexputili = locllmasexpCurve.Set(params.locallab.spots.at(sp).LLmaskexpcurve); - const bool lhmasexputili = lochhmasexpCurve.Set(params.locallab.spots.at(sp).HHmaskexpcurve); - const bool lcmasSHutili = locccmasSHCurve.Set(params.locallab.spots.at(sp).CCmaskSHcurve); - const bool llmasSHutili = locllmasSHCurve.Set(params.locallab.spots.at(sp).LLmaskSHcurve); - const bool lhmasSHutili = lochhmasSHCurve.Set(params.locallab.spots.at(sp).HHmaskSHcurve); - const bool lcmasvibutili = locccmasvibCurve.Set(params.locallab.spots.at(sp).CCmaskvibcurve); - const bool llmasvibutili = locllmasvibCurve.Set(params.locallab.spots.at(sp).LLmaskvibcurve); - const bool lhmasvibutili = lochhmasvibCurve.Set(params.locallab.spots.at(sp).HHmaskvibcurve); - const bool lcmascbutili = locccmascbCurve.Set(params.locallab.spots.at(sp).CCmaskcbcurve); - const bool llmascbutili = locllmascbCurve.Set(params.locallab.spots.at(sp).LLmaskcbcurve); - const bool lhmascbutili = lochhmascbCurve.Set(params.locallab.spots.at(sp).HHmaskcbcurve); - const bool lcmasretiutili = locccmasretiCurve.Set(params.locallab.spots.at(sp).CCmaskreticurve); - const bool llmasretiutili = locllmasretiCurve.Set(params.locallab.spots.at(sp).LLmaskreticurve); - const bool lhmasretiutili = lochhmasretiCurve.Set(params.locallab.spots.at(sp).HHmaskreticurve); - const bool lcmastmutili = locccmastmCurve.Set(params.locallab.spots.at(sp).CCmasktmcurve); - const bool llmastmutili = locllmastmCurve.Set(params.locallab.spots.at(sp).LLmasktmcurve); - const bool lhmastmutili = lochhmastmCurve.Set(params.locallab.spots.at(sp).HHmasktmcurve); - const bool lcmasblutili = locccmasblCurve.Set(params.locallab.spots.at(sp).CCmaskblcurve); - const bool llmasblutili = locllmasblCurve.Set(params.locallab.spots.at(sp).LLmaskblcurve); - const bool lhmasblutili = lochhmasblCurve.Set(params.locallab.spots.at(sp).HHmaskblcurve); - const bool lcmas_utili = locccmas_Curve.Set(params.locallab.spots.at(sp).CCmask_curve); - const bool llmas_utili = locllmas_Curve.Set(params.locallab.spots.at(sp).LLmask_curve); - const bool lhmas_utili = lochhmas_Curve.Set(params.locallab.spots.at(sp).HHmask_curve); - const bool lhhmas_utili = lochhhmas_Curve.Set(params.locallab.spots.at(sp).HHhmask_curve); - const bool lmasutili_wav = loclmasCurve_wav.Set(params.locallab.spots.at(sp).LLmask_curvewav); - const bool lmasutiliblwav = loclmasCurveblwav.Set(params.locallab.spots.at(sp).LLmaskblcurvewav); - const bool lmasutilicolwav = loclmasCurvecolwav.Set(params.locallab.spots.at(sp).LLmaskcolcurvewav); - const bool lcmaslcutili = locccmaslcCurve.Set(params.locallab.spots.at(sp).CCmasklccurve); - const bool llmaslcutili = locllmaslcCurve.Set(params.locallab.spots.at(sp).LLmasklccurve); - const bool lhmaslcutili = lochhmaslcCurve.Set(params.locallab.spots.at(sp).HHmasklccurve); - const bool locwavutili = locwavCurve.Set(params.locallab.spots.at(sp).locwavcurve); - const bool locwavdenutili = locwavCurveden.Set(params.locallab.spots.at(sp).locwavcurveden); - const bool loclevwavutili = loclevwavCurve.Set(params.locallab.spots.at(sp).loclevwavcurve); - const bool locconwavutili = locconwavCurve.Set(params.locallab.spots.at(sp).locconwavcurve); - const bool loccompwavutili = loccompwavCurve.Set(params.locallab.spots.at(sp).loccompwavcurve); - const bool loccomprewavutili = loccomprewavCurve.Set(params.locallab.spots.at(sp).loccomprewavcurve); - const bool locedgwavutili = locedgwavCurve.Set(params.locallab.spots.at(sp).locedgwavcurve); - const bool locallutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).llcurve, lllocalcurve2, skip); - const bool localclutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).clcurve, cllocalcurve2, skip); - const bool locallcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).lccurve, lclocalcurve2, skip); - const bool localrgbutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).rgbcurve, rgblocalcurve2, skip); - const bool localcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).cccurve, cclocalcurve2, skip); - const bool localexutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).excurve, exlocalcurve2, skip); - const bool localmaskutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskcurve, lmasklocalcurve2, skip); - const bool localmaskexputili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskexpcurve, lmaskexplocalcurve2, skip); - const bool localmaskSHutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).LmaskSHcurve, lmaskSHlocalcurve2, skip); - const bool localmaskvibutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskvibcurve, lmaskviblocalcurve2, skip); - const bool localmasktmutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmasktmcurve, lmasktmlocalcurve2, skip); - const bool localmaskretiutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskreticurve, lmaskretilocalcurve2, skip); - const bool localmaskcbutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskcbcurve, lmaskcblocalcurve2, skip); - const bool localmasklcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmasklccurve, lmasklclocalcurve2, skip); - const bool localmaskblutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskblcurve, lmaskbllocalcurve2, skip); - const bool localmask_utili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmask_curve, lmasklocal_curve2, skip); - - double ecomp = params.locallab.spots.at(sp).expcomp; - double black = params.locallab.spots.at(sp).black; - double hlcompr = params.locallab.spots.at(sp).hlcompr; - double hlcomprthresh = params.locallab.spots.at(sp).hlcomprthresh; - double shcompr = params.locallab.spots.at(sp).shcompr; - double br = params.locallab.spots.at(sp).lightness; - if(black < 0. && params.locallab.spots.at(sp).expMethod == "pde" ) { - black *= 1.5; - } - - double cont = params.locallab.spots.at(sp).contrast; - double huere, chromare, lumare, huerefblu, chromarefblu, lumarefblu, sobelre; - huerefblu = parent->huerefblurs[sp]; - chromarefblu = parent->chromarefblurs[sp]; - lumarefblu = parent->lumarefblurs[sp]; - huere = parent->huerefs[sp]; - chromare = parent->chromarefs[sp]; - lumare = parent->lumarefs[sp]; - sobelre = parent->sobelrefs[sp]; - const float avge = parent->avgs[sp]; - - float minCD; - float maxCD; - float mini; - float maxi; - float Tmean; - float Tsigma; - float Tmin; - float Tmax; - int lastsav; - CurveFactory::complexCurvelocal(ecomp, black / 65535., hlcompr, hlcomprthresh, shcompr, br, cont, lumare, - hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, avge, - skip); - // Locallab mask are only shown for selected spot - if (sp == params.locallab.selspot) { - parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop.get(), lastorigCrop.get(), cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, locRETtransCurve, - lllocalcurve2,locallutili, - cllocalcurve2, localclutili, - lclocalcurve2, locallcutili, - loclhCurve, lochhCurve, locchCurve, - lmasklocalcurve2, localmaskutili, - lmaskexplocalcurve2, localmaskexputili, - lmaskSHlocalcurve2, localmaskSHutili, - lmaskviblocalcurve2, localmaskvibutili, - lmasktmlocalcurve2, localmasktmutili, - lmaskretilocalcurve2, localmaskretiutili, - lmaskcblocalcurve2, localmaskcbutili, - lmaskbllocalcurve2, localmaskblutili, - lmasklclocalcurve2, localmasklcutili, - lmasklocal_curve2, localmask_utili, - - locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, - locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, - locccmasvibCurve, lcmasvibutili, locllmasvibCurve, llmasvibutili, lochhmasvibCurve, lhmasvibutili, - locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, - locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili, - locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili, - locccmasblCurve, lcmasblutili, locllmasblCurve, llmasblutili, lochhmasblCurve, lhmasblutili, - locccmaslcCurve, lcmaslcutili, locllmaslcCurve, llmaslcutili, lochhmaslcCurve, lhmaslcutili, - locccmas_Curve, lcmas_utili, locllmas_Curve, llmas_utili, lochhmas_Curve, lhmas_utili, - lochhhmas_Curve, lhhmas_utili, - loclmasCurveblwav,lmasutiliblwav, - loclmasCurvecolwav,lmasutilicolwav, - locwavCurve, locwavutili, - loclevwavCurve, loclevwavutili, - locconwavCurve, locconwavutili, - loccompwavCurve, loccompwavutili, - loccomprewavCurve, loccomprewavutili, - locwavCurveden, locwavdenutili, - locedgwavCurve, locedgwavutili, - loclmasCurve_wav,lmasutili_wav, - LHutili, HHutili, CHutili, cclocalcurve2, localcutili, rgblocalcurve2, localrgbutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, - huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav, - parent->previewDeltaE, parent->locallColorMask, parent->locallColorMaskinv, parent->locallExpMask, parent->locallExpMaskinv, parent->locallSHMask, parent->locallSHMaskinv, parent->locallvibMask, parent->localllcMask, parent->locallsharMask, parent->locallcbMask, parent->locallretiMask, parent->locallsoftMask, parent->localltmMask, parent->locallblMask, - parent->locall_Mask, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax); - } else { - parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop.get(), lastorigCrop.get(), cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, locRETtransCurve, - lllocalcurve2,locallutili, - cllocalcurve2, localclutili, - lclocalcurve2, locallcutili, - loclhCurve, lochhCurve, locchCurve, - lmasklocalcurve2, localmaskutili, - lmaskexplocalcurve2, localmaskexputili, - lmaskSHlocalcurve2, localmaskSHutili, - lmaskviblocalcurve2, localmaskvibutili, - lmasktmlocalcurve2, localmasktmutili, - lmaskretilocalcurve2, localmaskretiutili, - lmaskcblocalcurve2, localmaskcbutili, - lmaskbllocalcurve2, localmaskblutili, - lmasklclocalcurve2, localmasklcutili, - lmasklocal_curve2, localmask_utili, - - locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili,lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, - locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, - locccmasvibCurve, lcmasvibutili, locllmasvibCurve, llmasvibutili, lochhmasvibCurve, lhmasvibutili, - locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, - locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili, - locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili, - locccmasblCurve, lcmasblutili, locllmasblCurve, llmasblutili, lochhmasblCurve, lhmasblutili, - locccmaslcCurve, lcmaslcutili, locllmaslcCurve, llmaslcutili, lochhmaslcCurve, lhmaslcutili, - locccmas_Curve, lcmas_utili, locllmas_Curve, llmas_utili, lochhmas_Curve, lhmas_utili, - lochhhmas_Curve, lhhmas_utili, - - loclmasCurveblwav,lmasutiliblwav, - loclmasCurvecolwav,lmasutilicolwav, - locwavCurve, locwavutili, - loclevwavCurve, loclevwavutili, - locconwavCurve, locconwavutili, - loccompwavCurve, loccompwavutili, - loccomprewavCurve, loccomprewavutili, - locwavCurveden, locwavdenutili, - locedgwavCurve, locedgwavutili, - loclmasCurve_wav,lmasutili_wav, - LHutili, HHutili, CHutili, cclocalcurve2, localcutili, rgblocalcurve2, localrgbutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, - huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax); - } - - if (sp + 1u < params.locallab.spots.size()) { - // do not copy for last spot as it is not needed anymore - lastorigCrop->CopyFrom(labnCrop); - } - - if (skip <= 2) { - Glib::usleep(settings->cropsleep); //wait to avoid crash when crop 100% and move window - } - } - } - bool utili = parent->utili; bool autili = parent->autili; bool butili = parent->butili; @@ -1128,6 +1179,16 @@ void Crop::update(int todo) bool cclutili = parent->cclutili; LUTu dummy; + if (params.colorToning.enabled && params.colorToning.method == "LabGrid") { + parent->ipf.colorToningLabGrid(labnCrop, 0,labnCrop->W , 0, labnCrop->H, false); + } + + parent->ipf.shadowsHighlights(labnCrop, params.sh.enabled, params.sh.lab,params.sh.highlights ,params.sh.shadows, params.sh.radius, skip, params.sh.htonalwidth, params.sh.stonalwidth); + + if (params.localContrast.enabled) { + // Alberto's local contrast + parent->ipf.localContrast(labnCrop, labnCrop->L, params.localContrast, false, skip); + } parent->ipf.chromiLuminanceCurve(this, 1, labnCrop, labnCrop, parent->chroma_acurve, parent->chroma_bcurve, parent->satcurve, parent->lhskcurve, parent->clcurve, parent->lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); parent->ipf.vibrance(labnCrop, params.vibrance, params.toneCurve.hrenabled, params.icm.workingProfile); parent->ipf.labColorCorrectionRegions(labnCrop); diff --git a/rtengine/demosaic_algos.cc b/rtengine/demosaic_algos.cc index a31415968..85197d766 100644 --- a/rtengine/demosaic_algos.cc +++ b/rtengine/demosaic_algos.cc @@ -972,11 +972,11 @@ inline void RawImageSource::dcb_initTileLimits(int &colMin, int &rowMin, int &co } if( y0 + TILESIZE + TILEBORDER >= H - border) { - rowMax = TILEBORDER + H - border - y0; + rowMax = std::min(TILEBORDER + H - border - y0, rowMax); } if( x0 + TILESIZE + TILEBORDER >= W - border) { - colMax = TILEBORDER + W - border - x0; + colMax = std::min(TILEBORDER + W - border - x0, colMax); } } diff --git a/rtengine/dynamicprofile.cc b/rtengine/dynamicprofile.cc index c643fa824..c0592e24b 100644 --- a/rtengine/dynamicprofile.cc +++ b/rtengine/dynamicprofile.cc @@ -33,7 +33,7 @@ using namespace rtengine::procparams; namespace { -const int ISO_MAX = 512000; +const int ISO_MAX = 819200; const double FNUMBER_MAX = 100.0; const double FOCALLEN_MAX = 10000.0; const double SHUTTERSPEED_MAX = 1000.0; diff --git a/rtengine/filmnegativeproc.cc b/rtengine/filmnegativeproc.cc index 30d0a052d..ae1813db9 100644 --- a/rtengine/filmnegativeproc.cc +++ b/rtengine/filmnegativeproc.cc @@ -21,550 +21,647 @@ #include "rawimage.h" #include "rawimagesource.h" +#include "improcfun.h" +#include "improccoordinator.h" +#include "imagefloat.h" #include "coord.h" -#include "mytime.h" #include "opthelper.h" #include "pixelsmap.h" #include "procparams.h" #include "rt_algo.h" #include "rtengine.h" +#include "rtthumbnail.h" #include "sleef.h" //#define BENCHMARK -#include "StopWatch.h" +//#include "StopWatch.h" +#include "iccstore.h" +#include "rt_math.h" +#include "color.h" + namespace { -using rtengine::ST_BAYER; -using rtengine::ST_FUJI_XTRANS; using rtengine::settings; +using rtengine::Coord2D; +using rtengine::ColorTemp; +using rtengine::findMinMaxPercentile; +using rtengine::ImageSource; +using rtengine::Imagefloat; +using rtengine::procparams::FilmNegativeParams; +using rtengine::procparams::ColorManagementParams; +using rtengine::procparams::RAWParams; +using rtengine::ICCStore; +using rtengine::MAXVALF; +using rtengine::CLIP; +using rtengine::TMatrix; +using rtengine::Color; +using RGB = rtengine::procparams::FilmNegativeParams::RGB; -bool channelsAvg( - const rtengine::RawImage* ri, - int width, - int height, - const float* cblacksom, - rtengine::Coord spotPos, - int spotSize, - std::array& avgs -) +Coord2D translateCoord(const rtengine::ImProcFunctions& ipf, int fw, int fh, int x, int y) { - avgs = {}; // Channel averages - if (ri->getSensorType() != ST_BAYER && ri->getSensorType() != ST_FUJI_XTRANS) { - return false; - } + const std::vector points = {Coord2D(x, y)}; + + std::vector red; + std::vector green; + std::vector blue; + ipf.transCoord(fw, fh, points, red, green, blue); + + return green[0]; +} + + +void getSpotAvgMax(ImageSource *imgsrc, ColorTemp currWB, const std::unique_ptr ¶ms, + Coord2D p, int tr, int spotSize, RGB &avg, RGB &max) +{ + int x1 = MAX(0, (int)p.x - spotSize / 2); + int y1 = MAX(0, (int)p.y - spotSize / 2); + PreviewProps pp(x1, y1, spotSize, spotSize, 1); if (settings->verbose) { - printf("Spot coord: x=%d y=%d\n", spotPos.x, spotPos.y); + printf("Spot: %d,%d %d,%d\n", x1, y1, x1 + spotSize / 2, y1 + spotSize / 2); } - const int half_spot_size = spotSize / 2; + rtengine::Imagefloat spotImg(spotSize, spotSize); + imgsrc->getImage(currWB, tr, &spotImg, pp, params->toneCurve, params->raw); - const int& x1 = spotPos.x - half_spot_size; - const int& x2 = spotPos.x + half_spot_size; - const int& y1 = spotPos.y - half_spot_size; - const int& y2 = spotPos.y + half_spot_size; + auto avgMax = [spotSize, &spotImg](RGB & avg, RGB & max) -> void { + avg = {}; + max = {}; - if (x1 < 0 || x2 > width || y1 < 0 || y2 > height) { - return false; // Spot goes outside bounds, bail out. - } + for (int i = 0; i < spotSize; ++i) + { + for (int j = 0; j < spotSize; ++j) { - std::array pxCount = {}; // Per-channel sample counts + float r = spotImg.r(i, j); + float g = spotImg.g(i, j); + float b = spotImg.b(i, j); - for (int c = x1; c < x2; ++c) { - for (int r = y1; r < y2; ++r) { - const int ch = ri->getSensorType() == ST_BAYER ? ri->FC(r, c) : ri->XTRANSFC(r, c); - - ++pxCount[ch]; - - // Sample the original unprocessed values from RawImage, subtracting black levels. - // Scaling is irrelevant, as we are only interested in the ratio between two spots. - avgs[ch] += ri->data[r][c] - cblacksom[ch]; - } - } - - for (int ch = 0; ch < 3; ++ch) { - avgs[ch] /= pxCount[ch]; - } - - return true; -} - -void calcMedians( - const rtengine::RawImage* ri, - float** data, - int x1, int y1, int x2, int y2, - std::array& meds -) -{ - - MyTime t1, t2, t3; - t1.set(); - - // Channel vectors to calculate medians - std::array, 3> cvs; - - // Sample one every 5 pixels, and push the value in the appropriate channel vector. - // Choose an odd step, not a multiple of the CFA size, to get a chance to visit each channel. - if (ri->getSensorType() == ST_BAYER) { - for (int row = y1; row < y2; row += 5) { - const int c0 = ri->FC(row, x1 + 0); - const int c1 = ri->FC(row, x1 + 5); - int col = x1; - - for (; col < x2 - 5; col += 10) { - cvs[c0].push_back(data[row][col]); - cvs[c1].push_back(data[row][col + 5]); - } - - if (col < x2) { - cvs[c0].push_back(data[row][col]); + avg.r += r; + avg.g += g; + avg.b += b; + max.r = MAX(max.r, r); + max.g = MAX(max.g, g); + max.b = MAX(max.b, b); } } - } else if (ri->getSensorType() == ST_FUJI_XTRANS) { - for (int row = y1; row < y2; row += 5) { - const std::array cs = { - ri->XTRANSFC(row, x1 + 0), - ri->XTRANSFC(row, x1 + 5), - ri->XTRANSFC(row, x1 + 10), - ri->XTRANSFC(row, x1 + 15), - ri->XTRANSFC(row, x1 + 20), - ri->XTRANSFC(row, x1 + 25) - }; - int col = x1; - for (; col < x2 - 25; col += 30) { - for (int c = 0; c < 6; ++c) { - cvs[cs[c]].push_back(data[row][col + c * 5]); - } - } - - for (int c = 0; col < x2; col += 5, ++c) { - cvs[cs[c]].push_back(data[row][col]); - } - } - } - - t2.set(); - - if (settings->verbose) { - printf("Median vector fill loop time us: %d\n", t2.etime(t1)); - } - - t2.set(); - - for (int c = 0; c < 3; ++c) { - // Find median values for each channel - if (!cvs[c].empty()) { - rtengine::findMinMaxPercentile(cvs[c].data(), cvs[c].size(), 0.5f, meds[c], 0.5f, meds[c], true); - } - } - - t3.set(); - - if (settings->verbose) { - printf("Sample count: R=%zu, G=%zu, B=%zu\n", cvs[0].size(), cvs[1].size(), cvs[2].size()); - printf("Median calc time us: %d\n", t3.etime(t2)); - } - -} - -std::array calcWBMults( - const rtengine::ColorTemp& wb, - const rtengine::ImageMatrices& imatrices, - const rtengine::RawImage *ri, - const float ref_pre_mul[4]) -{ - std::array wb_mul; - double r, g, b; - wb.getMultipliers(r, g, b); - wb_mul[0] = imatrices.cam_rgb[0][0] * r + imatrices.cam_rgb[0][1] * g + imatrices.cam_rgb[0][2] * b; - wb_mul[1] = imatrices.cam_rgb[1][0] * r + imatrices.cam_rgb[1][1] * g + imatrices.cam_rgb[1][2] * b; - wb_mul[2] = imatrices.cam_rgb[2][0] * r + imatrices.cam_rgb[2][1] * g + imatrices.cam_rgb[2][2] * b; - - for (int c = 0; c < 3; ++c) { - wb_mul[c] = ri->get_pre_mul(c) / wb_mul[c] / ref_pre_mul[c]; - } - - // Normalize max channel gain to 1.0 - float mg = rtengine::max(wb_mul[0], wb_mul[1], wb_mul[2]); - - for (int c = 0; c < 3; ++c) { - wb_mul[c] /= mg; - } - - return wb_mul; -} - -} - -bool rtengine::RawImageSource::getFilmNegativeExponents(Coord2D spotA, Coord2D spotB, int tran, const procparams::FilmNegativeParams ¤tParams, std::array& newExps) -{ - newExps = { - static_cast(currentParams.redRatio * currentParams.greenExp), - static_cast(currentParams.greenExp), - static_cast(currentParams.blueRatio * currentParams.greenExp) + avg.r /= (spotSize * spotSize); + avg.g /= (spotSize * spotSize); + avg.b /= (spotSize * spotSize); }; - constexpr int spotSize = 32; // TODO: Make this configurable? + if (params->filmNegative.colorSpace == rtengine::FilmNegativeParams::ColorSpace::INPUT) { + avgMax(avg, max); + } else { + // Convert spot image to current working space + imgsrc->convertColorSpace(&spotImg, params->icm, currWB); - Coord spot; - std::array clearVals; - std::array denseVals; + avgMax(avg, max); - // Get channel averages in the two spots, sampling from the original ri->data buffer. - // NOTE: rawData values might be affected by CA correction, FlatField, etc, so: - // rawData[y][x] == (ri->data[y][x] - cblacksom[c]) * scale_mul[c] - // is not always true. To calculate exponents on the exact values, we should keep - // a copy of the rawData buffer after preprocessing. Worth the memory waste? - - // Sample first spot - transformPosition(spotA.x, spotA.y, tran, spot.x, spot.y); - - if (!channelsAvg(ri, W, H, cblacksom, spot, spotSize, clearVals)) { - return false; + // TODO handle custom color profile ! } - // Sample second spot - transformPosition(spotB.x, spotB.y, tran, spot.x, spot.y); - - if (!channelsAvg(ri, W, H, cblacksom, spot, spotSize, denseVals)) { - return false; - } - - // Detect which one is the dense spot, based on green channel - if (clearVals[1] < denseVals[1]) { - std::swap(clearVals, denseVals); - } + // Clip away zeroes or negative numbers, you never know + avg.r = MAX(avg.r, 1.f); + avg.g = MAX(avg.g, 1.f); + avg.b = MAX(avg.b, 1.f); if (settings->verbose) { - printf("Clear film values: R=%g G=%g B=%g\n", static_cast(clearVals[0]), static_cast(clearVals[1]), static_cast(clearVals[2])); - printf("Dense film values: R=%g G=%g B=%g\n", static_cast(denseVals[0]), static_cast(denseVals[1]), static_cast(denseVals[2])); + printf("Average Spot RGB: %f,%f,%f\n", avg.r, avg.g, avg.b); } +} - const float denseGreenRatio = clearVals[1] / denseVals[1]; - // Calculate logarithms in arbitrary base - const auto logBase = - [](float base, float num) -> float - { - return std::log(num) / std::log(base); - }; +void calcMedians( + const rtengine::Imagefloat* input, + int x1, int y1, int x2, int y2, + float &rmed, float &gmed, float &bmed +) +{ + using rtengine::findMinMaxPercentile; - // Calculate exponents for each channel, based on the ratio between the bright and dark values, - // compared to the ratio in the reference channel (green) - for (int ch = 0; ch < 3; ++ch) { - if (ch == 1) { - newExps[ch] = 1.f; // Green is the reference channel - } else { - newExps[ch] = rtengine::LIM(logBase(clearVals[ch] / denseVals[ch], denseGreenRatio), 0.3f, 4.f); + // Channel vectors to calculate medians + std::vector rv, gv, bv; + + const int sz = (x2 - x1) * (y2 - y1); + rv.reserve(sz); + gv.reserve(sz); + bv.reserve(sz); + + + for (int ii = y1; ii < y2; ii ++) { + for (int jj = x1; jj < x2; jj ++) { + rv.push_back(input->r(ii, jj)); + gv.push_back(input->g(ii, jj)); + bv.push_back(input->b(ii, jj)); } } - if (settings->verbose) { - printf("New exponents: R=%g G=%g B=%g\n", static_cast(newExps[0]), static_cast(newExps[1]), static_cast(newExps[2])); - } - - return true; + // Calculate channel medians of the specified area + findMinMaxPercentile(rv.data(), rv.size(), 0.5f, rmed, 0.5f, rmed, true); + findMinMaxPercentile(gv.data(), gv.size(), 0.5f, gmed, 0.5f, gmed, true); + findMinMaxPercentile(bv.data(), bv.size(), 0.5f, bmed, 0.5f, bmed, true); } -bool rtengine::RawImageSource::getRawSpotValues(Coord2D spotCoord, int spotSize, int tran, const procparams::FilmNegativeParams ¶ms, std::array& rawValues) + +RGB getMedians(const rtengine::Imagefloat* input, int borderPercent) { - Coord spot; - transformPosition(spotCoord.x, spotCoord.y, tran, spot.x, spot.y); + float rmed, gmed, bmed; + // Cut 20% border from medians calculation. It will probably contain outlier values + // from the film holder, which will bias the median result. + const int bW = input->getWidth() * borderPercent / 100; + const int bH = input->getHeight() * borderPercent / 100; + calcMedians(input, bW, bH, + input->getWidth() - bW, input->getHeight() - bH, + rmed, gmed, bmed); if (settings->verbose) { - printf("Transformed coords: %d,%d\n", spot.x, spot.y); + printf("Channel medians: R=%g, G=%g, B=%g\n", rmed, gmed, bmed); } - if (spotSize < 4) { + return { rmed, gmed, bmed }; +} + +/* +// TODO not needed for now +void convertColorSpace(Imagefloat* input, const TMatrix &src2xyz, const TMatrix &xyz2dest) +{ + +#ifdef _OPENMP + #pragma omp parallel for +#endif + + for (int i = 0; i < input->getHeight(); i++) { + for (int j = 0; j < input->getWidth(); j++) { + + float newr = input->r(i, j); + float newg = input->g(i, j); + float newb = input->b(i, j); + + float x, y, z; + Color::rgbxyz (newr, newg, newb, x, y, z, src2xyz); + Color::xyz2rgb (x, y, z, newr, newg, newb, xyz2dest); + + input->r(i, j) = newr; + input->g(i, j) = newg; + input->b(i, j) = newb; + + } + } +} +*/ + + +/** + * Perform actual film negative inversion process. + * Returns true if the input and output reference values are not set in params; refIn/refOut will be updated with median-based estimates. + * Otherwise, use provided values in params and return false + */ +bool doProcess(Imagefloat *input, Imagefloat *output, + const FilmNegativeParams ¶ms, const ColorManagementParams &icmParams, + RGB &refIn, RGB &refOut) +{ + bool refsUpdated = false; + + float rexp = -(params.greenExp * params.redRatio); + float gexp = -params.greenExp; + float bexp = -(params.greenExp * params.blueRatio); + + // In case we are processing a thumbnail, reference values might not be set in params, + // so make an estimate on the fly, using channel medians + if (refIn.g <= 0.f) { + // Calc medians, 20% border cut + refIn = getMedians(input, 20); + refsUpdated = true; + } else { + refIn = params.refInput; + } + + if (refOut.g <= 0.f) { + // Median will correspond to gray, 1/24th of max in the output + refOut = { MAXVALF / 24.f, MAXVALF / 24.f, MAXVALF / 24.f }; + refsUpdated = true; + } else { + refOut = params.refOutput; + } + + // Apply channel exponents to reference input values, and compute suitable multipliers + // in order to reach reference output values. + float rmult = refOut.r / pow_F(rtengine::max(refIn.r, 1.f), rexp); + float gmult = refOut.g / pow_F(rtengine::max(refIn.g, 1.f), gexp); + float bmult = refOut.b / pow_F(rtengine::max(refIn.b, 1.f), bexp); + + +#ifdef __SSE2__ + const vfloat clipv = F2V(MAXVALF); + const vfloat rexpv = F2V(rexp); + const vfloat gexpv = F2V(gexp); + const vfloat bexpv = F2V(bexp); + const vfloat rmultv = F2V(rmult); + const vfloat gmultv = F2V(gmult); + const vfloat bmultv = F2V(bmult); +#endif + + const int rheight = input->getHeight(); + const int rwidth = input->getWidth(); + + for (int i = 0; i < rheight; i++) { + float *rlinein = input->r(i); + float *glinein = input->g(i); + float *blinein = input->b(i); + float *rlineout = output->r(i); + float *glineout = output->g(i); + float *blineout = output->b(i); + int j = 0; +#ifdef __SSE2__ + + for (; j < rwidth - 3; j += 4) { + STVFU(rlineout[j], vminf(rmultv * pow_F(LVFU(rlinein[j]), rexpv), clipv)); + STVFU(glineout[j], vminf(gmultv * pow_F(LVFU(glinein[j]), gexpv), clipv)); + STVFU(blineout[j], vminf(bmultv * pow_F(LVFU(blinein[j]), bexpv), clipv)); + } + +#endif + + for (; j < rwidth; ++j) { + rlineout[j] = CLIP(rmult * pow_F(rlinein[j], rexp)); + glineout[j] = CLIP(gmult * pow_F(glinein[j], gexp)); + blineout[j] = CLIP(bmult * pow_F(blinein[j], bexp)); + } + } + + return refsUpdated; +} + + +} + + + +bool rtengine::ImProcFunctions::filmNegativeProcess( + Imagefloat *input, Imagefloat *output, FilmNegativeParams &fnp, + const RAWParams &rawParams, const ImageSource* imgsrc, const ColorTemp &currWB) +{ + //BENCHFUNMICRO + + if (!fnp.enabled) { return false; } - // Calculate averages of raw unscaled channels - if (!channelsAvg(ri, W, H, cblacksom, spot, spotSize, rawValues)) { - return false; + bool paramsUpdated = false; + + RGB &refIn = fnp.refInput; + RGB &refOut = fnp.refOutput; + + // If we're opening a profile from an older version, apply the proper multiplier + // compensations to make processing backwards compatible. + + if (fnp.backCompat == FilmNegativeParams::BackCompat::V1) { + // Calc medians, no border cut, compensate currWB in+out + refIn = getMedians(input, 0); + refOut = { MAXVALF / 24.f, MAXVALF / 24.f, MAXVALF / 24.f }; + + std::array scale_mul = { 1.f, 1.f, 1.f, 1.f }; + float autoGainComp, rm, gm, bm; + imgsrc->getWBMults(currWB, params->raw, scale_mul, autoGainComp, rm, gm, bm); + + refOut.r *= rm; + refOut.g *= gm; + refOut.b *= bm; + + paramsUpdated = true; + + } else if (fnp.backCompat == FilmNegativeParams::BackCompat::V2) { + + std::array scale_mul = { 1.f, 1.f, 1.f, 1.f }; + float autoGainComp, rm, gm, bm; + imgsrc->getWBMults(currWB, params->raw, scale_mul, autoGainComp, rm, gm, bm); + + float rm2, gm2, bm2; + imgsrc->getWBMults(rtengine::ColorTemp(3500., 1., 1., "Custom"), params->raw, scale_mul, autoGainComp, rm2, gm2, bm2); + float mg = rtengine::max(rm2, gm2, bm2); + rm2 /= mg; + gm2 /= mg; + bm2 /= mg; + + if (fnp.refInput.g == 0.f) { + // Calc medians, 20% border cut + refIn = getMedians(input, 20); + refOut = { MAXVALF / 24.f, MAXVALF / 24.f, MAXVALF / 24.f }; + } else if (fnp.refInput.g > 0.f) { + // Calc refInput + refOutput from base levels, compensate currWB in, 3500 out + refIn = fnp.refInput; + refIn.r *= rm * scale_mul[0]; + refIn.g *= gm * scale_mul[1]; + refIn.b *= bm * scale_mul[2]; + refOut = { MAXVALF / 512.f, MAXVALF / 512.f, MAXVALF / 512.f }; + } + + refOut.r *= rm * autoGainComp / rm2; + refOut.g *= gm * autoGainComp / gm2; + refOut.b *= bm * autoGainComp / bm2; + + paramsUpdated = true; + } - if (settings->verbose) { - printf("Raw spot values: R=%g, G=%g, B=%g\n", rawValues[0], rawValues[1], rawValues[2]); + if (settings->verbose && fnp.backCompat != FilmNegativeParams::BackCompat::CURRENT) { + printf("Upgraded from V%d - refIn: R=%g G=%g B=%g refOut: R=%g G=%g B=%g\n", + (int)fnp.backCompat, + static_cast(refIn.r), static_cast(refIn.g), static_cast(refIn.b), + static_cast(refOut.r), static_cast(refOut.g), static_cast(refOut.b)); } - return true; + // FilmNeg params are now upgraded to the latest version + fnp.backCompat = FilmNegativeParams::BackCompat::CURRENT; + + // Perform actual inversion. Return true if reference values are computed from medians + paramsUpdated |= doProcess(input, output, fnp, this->params->icm, refIn, refOut); + + return paramsUpdated; + } -void rtengine::RawImageSource::filmNegativeProcess(const procparams::FilmNegativeParams ¶ms, std::array& filmBaseValues) +void rtengine::ImProcFunctions::filmNegativeProcess(rtengine::Imagefloat *input, rtengine::Imagefloat *output, + const procparams::FilmNegativeParams ¶ms) { -// BENCHFUNMICRO + //BENCHFUNMICRO if (!params.enabled) { return; } - // Exponents are expressed as positive in the parameters, so negate them in order - // to get the reciprocals. - const std::array exps = { - static_cast(-params.redRatio * params.greenExp), - static_cast(-params.greenExp), - static_cast(-params.blueRatio * params.greenExp) - }; + RGB refIn = params.refInput, refOut = params.refOutput; - constexpr float MAX_OUT_VALUE = 65000.f; + doProcess(input, output, params, this->params->icm, refIn, refOut); - // Get multipliers for a known, fixed WB setting, that will be the starting point - // for balancing the converted image. - const std::array wb_mul = calcWBMults( - ColorTemp(3500., 1., 1., "Custom"), imatrices, ri, ref_pre_mul); +} - if (rtengine::settings->verbose) { - printf("Fixed WB mults: %g %g %g\n", wb_mul[0], wb_mul[1], wb_mul[2]); - } +bool rtengine::ImProcCoordinator::getFilmNegativeSpot(int x, int y, const int spotSize, RGB &refInput, RGB &refOutput) +{ + MyMutex::MyLock lock(mProcessing); - // Compensation factor to restore the non-autoWB initialGain (see RawImageSource::load) - const float autoGainComp = camInitialGain / initialGain; + const int tr = getCoarseBitMask(params->coarse); - std::array mults; // Channel normalization multipliers + const Coord2D p = translateCoord(ipf, fw, fh, x, y); - // If film base values are set in params, use those - if (filmBaseValues[0] <= 0.f) { - // ...otherwise, the film negative tool might have just been enabled on this image, - // without any previous setting. So, estimate film base values from channel medians + // Get the average channel values from the sampled spot + RGB avg, max; + getSpotAvgMax(imgsrc, currWB, params, p, tr, spotSize, avg, max); - std::array medians; + float rexp = -(params->filmNegative.greenExp * params->filmNegative.redRatio); + float gexp = -params->filmNegative.greenExp; + float bexp = -(params->filmNegative.greenExp * params->filmNegative.blueRatio); - // Special value for backwards compatibility with profiles saved by RT 5.7 - const bool oldChannelScaling = filmBaseValues[0] == -1.f; + float rmult = params->filmNegative.refOutput.r / pow_F(rtengine::max(params->filmNegative.refInput.r, 1.f), rexp); + float gmult = params->filmNegative.refOutput.g / pow_F(rtengine::max(params->filmNegative.refInput.g, 1.f), gexp); + float bmult = params->filmNegative.refOutput.b / pow_F(rtengine::max(params->filmNegative.refInput.b, 1.f), bexp); - // If using the old channel scaling method, get medians from the whole current image, - // reading values from the already-scaled rawData buffer. - if (oldChannelScaling) { - calcMedians(ri, rawData, 0, 0, W, H, medians); - } else { - // Cut 20% border from medians calculation. It will probably contain outlier values - // from the film holder, which will bias the median result. - const int bW = W * 20 / 100; - const int bH = H * 20 / 100; - calcMedians(ri, rawData, bW, bH, W - bW, H - bH, medians); - } + refInput = avg; - // Un-scale rawData medians - for (int c = 0; c < 3; ++c) { - medians[c] /= scale_mul[c]; - } + refOutput.r = rmult * pow_F(avg.r, rexp); + refOutput.g = gmult * pow_F(avg.g, gexp); + refOutput.b = bmult * pow_F(avg.b, bexp); - if (settings->verbose) { - printf("Channel medians: R=%g, G=%g, B=%g\n", medians[0], medians[1], medians[2]); - } - - for (int c = 0; c < 3; ++c) { - - // Estimate film base values, so that in the output data, each channel - // median will correspond to 1/24th of MAX. - filmBaseValues[c] = pow_F(24.f / 512.f, 1.f / exps[c]) * medians[c]; - - if (oldChannelScaling) { - // If using the old channel scaling method, apply WB multipliers here to undo their - // effect later, since fixed wb compensation was not used in previous version. - // Also, undo the effect of the autoGainComp factor (see below). - filmBaseValues[c] /= pow_F((wb_mul[c] / autoGainComp), 1.f / exps[c]);// / autoGainComp; - } - - } - } + return true; +} - // Calculate multipliers based on previously obtained film base input values. - // Apply current scaling coefficients to raw, unscaled base values. - std::array fb = { - filmBaseValues[0] * scale_mul[0], - filmBaseValues[1] * scale_mul[1], - filmBaseValues[2] * scale_mul[2] - }; + + + + +// ---------- >>> legacy mode >>> --------------- + + +// For backwards compatibility with profiles saved by RT 5.7 - 5.8 +void rtengine::Thumbnail::processFilmNegative( + const procparams::ProcParams ¶ms, + const Imagefloat* baseImg, + const int rwidth, const int rheight +) +{ + + // Channel exponents + const float rexp = -params.filmNegative.redRatio * params.filmNegative.greenExp; + const float gexp = -params.filmNegative.greenExp; + const float bexp = -params.filmNegative.blueRatio * params.filmNegative.greenExp; + + const float MAX_OUT_VALUE = 65000.f; + + // Channel medians + float rmed, gmed, bmed; + + // If using the old method, calculate medians on the whole image + calcMedians(baseImg, 0, 0, rwidth, rheight, rmed, gmed, bmed); if (settings->verbose) { - printf("Input film base values: %g %g %g\n", fb[0], fb[1], fb[2]); + printf("FilmNeg legacy V1 :: Thumbnail input channel medians: %g %g %g\n", rmed, gmed, bmed); } - for (int c = 0; c < 3; ++c) { - // Apply channel exponents, to obtain the corresponding base values in the output data - fb[c] = pow_F(rtengine::max(fb[c], 1.f), exps[c]); + // Calculate output medians + rmed = powf(rmed, rexp); + gmed = powf(gmed, gexp); + bmed = powf(bmed, bexp); - // Determine the channel multiplier so that the film base value is 1/512th of max. - mults[c] = (MAX_OUT_VALUE / 512.f) / fb[c]; + // Calculate output multipliers so that the median value is 1/24 of the output range. + float rmult, gmult, bmult; + rmult = (MAX_OUT_VALUE / 24.f) / rmed; + gmult = (MAX_OUT_VALUE / 24.f) / gmed; + bmult = (MAX_OUT_VALUE / 24.f) / bmed; - // Un-apply the fixed WB multipliers, to reverse their effect later in the WB tool. - // This way, the output image will be adapted to this fixed WB setting - mults[c] /= wb_mul[c]; - - // Also compensate for the initialGain difference between the default scaling (forceAutoWB=true) - // and the non-autoWB scaling (see camInitialGain). - // This effectively restores camera scaling multipliers, and gives us stable multipliers - // (not depending on image content). - mults[c] *= autoGainComp; + float rsum = 0.f, gsum = 0.f, bsum = 0.f; + for (int i = 0; i < rheight; i++) { + for (int j = 0; j < rwidth; j++) { + rsum += baseImg->r(i, j); + gsum += baseImg->g(i, j); + bsum += baseImg->b(i, j); + } } + const float ravg = rsum / (rheight * rwidth); + const float gavg = gsum / (rheight * rwidth); + const float bavg = bsum / (rheight * rwidth); + + // Shifting current WB multipliers, based on channel averages. + rmult /= gavg / ravg; + // gmult /= gAvg / gAvg; green chosen as reference channel + bmult /= gavg / bavg; + if (settings->verbose) { - printf("Output film base values: %g %g %g\n", static_cast(fb[0]), static_cast(fb[1]), static_cast(fb[2])); - printf("Computed multipliers: %g %g %g\n", static_cast(mults[0]), static_cast(mults[1]), static_cast(mults[2])); + printf("FilmNeg legacy V1 :: Thumbnail computed multipliers: %g %g %g\n", static_cast(rmult), static_cast(gmult), static_cast(bmult)); } - - constexpr float CLIP_VAL = 65535.f; - - MyTime t1, t2, t3; - - t1.set(); - - if (ri->getSensorType() == ST_BAYER) { #ifdef __SSE2__ - const vfloat onev = F2V(1.f); - const vfloat clipv = F2V(CLIP_VAL); + const vfloat clipv = F2V(MAXVALF); + const vfloat rexpv = F2V(rexp); + const vfloat gexpv = F2V(gexp); + const vfloat bexpv = F2V(bexp); + const vfloat rmultv = F2V(rmult); + const vfloat gmultv = F2V(gmult); + const vfloat bmultv = F2V(bmult); #endif -#ifdef _OPENMP - #pragma omp parallel for schedule(dynamic, 16) -#endif - - for (int row = 0; row < H; ++row) { - int col = 0; - // Avoid trouble with zeroes, minimum pixel value is 1. - const float exps0 = exps[FC(row, col)]; - const float exps1 = exps[FC(row, col + 1)]; - const float mult0 = mults[FC(row, col)]; - const float mult1 = mults[FC(row, col + 1)]; + for (int i = 0; i < rheight; i++) { + float *rline = baseImg->r(i); + float *gline = baseImg->g(i); + float *bline = baseImg->b(i); + int j = 0; #ifdef __SSE2__ - const vfloat expsv = _mm_setr_ps(exps0, exps1, exps0, exps1); - const vfloat multsv = _mm_setr_ps(mult0, mult1, mult0, mult1); - for (; col < W - 3; col += 4) { - STVFU(rawData[row][col], vminf(multsv * pow_F(vmaxf(LVFU(rawData[row][col]), onev), expsv), clipv)); - } - -#endif // __SSE2__ - - for (; col < W - 1; col += 2) { - rawData[row][col] = rtengine::min(mult0 * pow_F(rtengine::max(rawData[row][col], 1.f), exps0), CLIP_VAL); - rawData[row][col + 1] = rtengine::min(mult1 * pow_F(rtengine::max(rawData[row][col + 1], 1.f), exps1), CLIP_VAL); - } - - if (col < W) { - rawData[row][col] = rtengine::min(mult0 * pow_F(rtengine::max(rawData[row][col], 1.f), exps0), CLIP_VAL); - } + for (; j < rwidth - 3; j += 4) { + STVFU(rline[j], vminf(rmultv * pow_F(LVFU(rline[j]), rexpv), clipv)); + STVFU(gline[j], vminf(gmultv * pow_F(LVFU(gline[j]), gexpv), clipv)); + STVFU(bline[j], vminf(bmultv * pow_F(LVFU(bline[j]), bexpv), clipv)); } - } else if (ri->getSensorType() == ST_FUJI_XTRANS) { -#ifdef __SSE2__ - const vfloat onev = F2V(1.f); - const vfloat clipv = F2V(CLIP_VAL); + #endif -#ifdef _OPENMP - #pragma omp parallel for schedule(dynamic, 16) -#endif - - for (int row = 0; row < H; row ++) { - int col = 0; - // Avoid trouble with zeroes, minimum pixel value is 1. - const std::array expsc = { - exps[ri->XTRANSFC(row, 0)], - exps[ri->XTRANSFC(row, 1)], - exps[ri->XTRANSFC(row, 2)], - exps[ri->XTRANSFC(row, 3)], - exps[ri->XTRANSFC(row, 4)], - exps[ri->XTRANSFC(row, 5)] - }; - const std::array multsc = { - mults[ri->XTRANSFC(row, 0)], - mults[ri->XTRANSFC(row, 1)], - mults[ri->XTRANSFC(row, 2)], - mults[ri->XTRANSFC(row, 3)], - mults[ri->XTRANSFC(row, 4)], - mults[ri->XTRANSFC(row, 5)] - }; -#ifdef __SSE2__ - const vfloat expsv0 = _mm_setr_ps(expsc[0], expsc[1], expsc[2], expsc[3]); - const vfloat expsv1 = _mm_setr_ps(expsc[4], expsc[5], expsc[0], expsc[1]); - const vfloat expsv2 = _mm_setr_ps(expsc[2], expsc[3], expsc[4], expsc[5]); - const vfloat multsv0 = _mm_setr_ps(multsc[0], multsc[1], multsc[2], multsc[3]); - const vfloat multsv1 = _mm_setr_ps(multsc[4], multsc[5], multsc[0], multsc[1]); - const vfloat multsv2 = _mm_setr_ps(multsc[2], multsc[3], multsc[4], multsc[5]); - - for (; col < W - 11; col += 12) { - STVFU(rawData[row][col], vminf(multsv0 * pow_F(vmaxf(LVFU(rawData[row][col]), onev), expsv0), clipv)); - STVFU(rawData[row][col + 4], vminf(multsv1 * pow_F(vmaxf(LVFU(rawData[row][col + 4]), onev), expsv1), clipv)); - STVFU(rawData[row][col + 8], vminf(multsv2 * pow_F(vmaxf(LVFU(rawData[row][col + 8]), onev), expsv2), clipv)); - } - -#endif // __SSE2__ - - for (; col < W - 5; col += 6) { - for (int c = 0; c < 6; ++c) { - rawData[row][col + c] = rtengine::min(multsc[c] * pow_F(rtengine::max(rawData[row][col + c], 1.f), expsc[c]), CLIP_VAL); - } - } - - for (int c = 0; col < W; col++, c++) { - rawData[row][col + c] = rtengine::min(multsc[c] * pow_F(rtengine::max(rawData[row][col + c], 1.f), expsc[c]), CLIP_VAL); - } + for (; j < rwidth; ++j) { + rline[j] = CLIP(rmult * pow_F(rline[j], rexp)); + gline[j] = CLIP(gmult * pow_F(gline[j], gexp)); + bline[j] = CLIP(bmult * pow_F(bline[j], bexp)); } } - - t2.set(); - - if (settings->verbose) { - printf("Pow loop time us: %d\n", t2.etime(t1)); - } - - t2.set(); - - PixelsMap bitmapBads(W, H); - - int totBP = 0; // Hold count of bad pixels to correct - - if (ri->getSensorType() == ST_BAYER) { -#ifdef _OPENMP - #pragma omp parallel for reduction(+:totBP) schedule(dynamic,16) -#endif - - for (int i = 0; i < H; ++i) { - for (int j = 0; j < W; ++j) { - if (rawData[i][j] >= MAX_OUT_VALUE) { - bitmapBads.set(j, i); - ++totBP; - } - } - } - - if (totBP > 0) { - interpolateBadPixelsBayer(bitmapBads, rawData); - } - - } else if (ri->getSensorType() == ST_FUJI_XTRANS) { -#ifdef _OPENMP - #pragma omp parallel for reduction(+:totBP) schedule(dynamic,16) -#endif - - for (int i = 0; i < H; ++i) { - for (int j = 0; j < W; ++j) { - if (rawData[i][j] >= MAX_OUT_VALUE) { - bitmapBads.set(j, i); - totBP++; - } - } - } - - if (totBP > 0) { - interpolateBadPixelsXtrans(bitmapBads); - } - } - - t3.set(); - - if (settings->verbose) { - printf("Bad pixels count: %d\n", totBP); - printf("Bad pixels interpolation time us: %d\n", t3.etime(t2)); - } } + + +// For backwards compatibility with intermediate dev version (see filmneg_stable_mults branch) +void rtengine::Thumbnail::processFilmNegativeV2( + const procparams::ProcParams ¶ms, + const Imagefloat* baseImg, + const int rwidth, const int rheight +) +{ + + // Channel exponents + const float rexp = -params.filmNegative.redRatio * params.filmNegative.greenExp; + const float gexp = -params.filmNegative.greenExp; + const float bexp = -params.filmNegative.blueRatio * params.filmNegative.greenExp; + + // Calculate output multipliers + float rmult, gmult, bmult; + + const float MAX_OUT_VALUE = 65000.f; + + // If the film base values are not set in params, estimate multipliers from each channel's median value. + if (params.filmNegative.refInput.r <= 0.f) { + + // Channel medians + float rmed, gmed, bmed; + + // The new method cuts out a 20% border from medians calculation. + const int bW = rwidth * 20 / 100; + const int bH = rheight * 20 / 100; + calcMedians(baseImg, bW, bH, rwidth - bW, rheight - bH, rmed, gmed, bmed); + + if (settings->verbose) { + printf("FilmNeg legacy V2 :: Thumbnail input channel medians: %g %g %g\n", rmed, gmed, bmed); + } + + // Calculate output medians + rmed = powf(rmed, rexp); + gmed = powf(gmed, gexp); + bmed = powf(bmed, bexp); + + // Calculate output multipliers so that the median value is 1/24 of the output range. + rmult = (MAX_OUT_VALUE / 24.f) / rmed; + gmult = (MAX_OUT_VALUE / 24.f) / gmed; + bmult = (MAX_OUT_VALUE / 24.f) / bmed; + + } else { + + // Read film-base values from params + float rbase = params.filmNegative.refInput.r; // redBase; + float gbase = params.filmNegative.refInput.g; // greenBase; + float bbase = params.filmNegative.refInput.b; // blueBase; + + // Reconstruct scale_mul coefficients from thumbnail metadata: + // redMultiplier / camwbRed is pre_mul[0] + // pre_mul[0] * scaleGain is scale_mul[0] + // Apply channel scaling to raw (unscaled) input base values, to + // match with actual (scaled) data in baseImg + rbase *= (redMultiplier / camwbRed) * scaleGain; + gbase *= (greenMultiplier / camwbGreen) * scaleGain; + bbase *= (blueMultiplier / camwbBlue) * scaleGain; + + if (settings->verbose) { + printf("FilmNeg legacy V2 :: Thumbnail input film base values: %g %g %g\n", rbase, gbase, bbase); + } + + // Apply exponents to get output film base values + rbase = powf(rbase, rexp); + gbase = powf(gbase, gexp); + bbase = powf(bbase, bexp); + + // Calculate multipliers so that film base value is 1/512th of the output range. + rmult = (MAX_OUT_VALUE / 512.f) / rbase; + gmult = (MAX_OUT_VALUE / 512.f) / gbase; + bmult = (MAX_OUT_VALUE / 512.f) / bbase; + + } + + + // Get and un-apply multipliers to adapt the thumbnail to a known fixed WB setting, + // as in the main image processing. + + double r, g, b; + ColorTemp(3500., 1., 1., "Custom").getMultipliers(r, g, b); + //iColorMatrix is cam_rgb + const double rm = camwbRed / (iColorMatrix[0][0] * r + iColorMatrix[0][1] * g + iColorMatrix[0][2] * b); + const double gm = camwbGreen / (iColorMatrix[1][0] * r + iColorMatrix[1][1] * g + iColorMatrix[1][2] * b); + const double bm = camwbBlue / (iColorMatrix[2][0] * r + iColorMatrix[2][1] * g + iColorMatrix[2][2] * b); + + // Normalize max WB multiplier to 1.f + const double m = max(rm, gm, bm); + rmult /= rm / m; + gmult /= gm / m; + bmult /= bm / m; + + + if (settings->verbose) { + printf("FilmNeg legacy V2 :: Thumbnail computed multipliers: %g %g %g\n", static_cast(rmult), static_cast(gmult), static_cast(bmult)); + } + + +#ifdef __SSE2__ + const vfloat clipv = F2V(MAXVALF); + const vfloat rexpv = F2V(rexp); + const vfloat gexpv = F2V(gexp); + const vfloat bexpv = F2V(bexp); + const vfloat rmultv = F2V(rmult); + const vfloat gmultv = F2V(gmult); + const vfloat bmultv = F2V(bmult); +#endif + + for (int i = 0; i < rheight; i++) { + float *rline = baseImg->r(i); + float *gline = baseImg->g(i); + float *bline = baseImg->b(i); + int j = 0; +#ifdef __SSE2__ + + for (; j < rwidth - 3; j += 4) { + STVFU(rline[j], vminf(rmultv * pow_F(LVFU(rline[j]), rexpv), clipv)); + STVFU(gline[j], vminf(gmultv * pow_F(LVFU(gline[j]), gexpv), clipv)); + STVFU(bline[j], vminf(bmultv * pow_F(LVFU(bline[j]), bexpv), clipv)); + } + +#endif + + for (; j < rwidth; ++j) { + rline[j] = CLIP(rmult * pow_F(rline[j], rexp)); + gline[j] = CLIP(gmult * pow_F(gline[j], gexp)); + bline[j] = CLIP(bmult * pow_F(bline[j], bexp)); + } + } +} + +// ----------------- <<< legacy mode <<< ------------ + + diff --git a/rtengine/filmnegativethumb.cc b/rtengine/filmnegativethumb.cc deleted file mode 100644 index 57f2601f9..000000000 --- a/rtengine/filmnegativethumb.cc +++ /dev/null @@ -1,237 +0,0 @@ -/* - * This file is part of RawTherapee. - * - * Copyright (c) 2019 Alberto Romei - * - * 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 . - */ -#include - -#include "colortemp.h" -#include "LUT.h" -#include "rtengine.h" -#include "rtthumbnail.h" -#include "opthelper.h" -#include "sleef.h" -#include "rt_algo.h" -#include "settings.h" -#include "procparams.h" -#define BENCHMARK -#include "StopWatch.h" - -namespace -{ - -using rtengine::Imagefloat; -using rtengine::findMinMaxPercentile; - - -void calcMedians( - const Imagefloat* baseImg, - const int x1, const int y1, - const int x2, const int y2, - float &rmed, float &gmed, float &bmed -) -{ - // Channel vectors to calculate medians - std::vector rv, gv, bv; - - const int sz = std::max(0, (y2 - y1) * (x2 - x1)); - rv.reserve(sz); - gv.reserve(sz); - bv.reserve(sz); - - for (int i = y1; i < y2; i++) { - for (int j = x1; j < x2; j++) { - rv.push_back(baseImg->r(i, j)); - gv.push_back(baseImg->g(i, j)); - bv.push_back(baseImg->b(i, j)); - } - } - - // Calculate channel medians from whole image - findMinMaxPercentile(rv.data(), rv.size(), 0.5f, rmed, 0.5f, rmed, true); - findMinMaxPercentile(gv.data(), gv.size(), 0.5f, gmed, 0.5f, gmed, true); - findMinMaxPercentile(bv.data(), bv.size(), 0.5f, bmed, 0.5f, bmed, true); -} - -} - -void rtengine::Thumbnail::processFilmNegative( - const procparams::ProcParams ¶ms, - const Imagefloat* baseImg, - const int rwidth, const int rheight -) -{ - - // Channel exponents - const float rexp = -params.filmNegative.redRatio * params.filmNegative.greenExp; - const float gexp = -params.filmNegative.greenExp; - const float bexp = -params.filmNegative.blueRatio * params.filmNegative.greenExp; - - // Calculate output multipliers - float rmult, gmult, bmult; - - const float MAX_OUT_VALUE = 65000.f; - - // For backwards compatibility with profiles saved by RT 5.7 - const bool oldChannelScaling = params.filmNegative.redBase == -1.f; - - // If the film base values are not set in params, estimate multipliers from each channel's median value. - if (params.filmNegative.redBase <= 0.f) { - - // Channel medians - float rmed, gmed, bmed; - - if (oldChannelScaling) { - // If using the old method, calculate nedians on the whole image - calcMedians(baseImg, 0, 0, rwidth, rheight, rmed, gmed, bmed); - } else { - // The new method cuts out a 20% border from medians calculation. - const int bW = rwidth * 20 / 100; - const int bH = rheight * 20 / 100; - calcMedians(baseImg, bW, bH, rwidth - bW, rheight - bH, rmed, gmed, bmed); - } - - if (settings->verbose) { - printf("Thumbnail input channel medians: %g %g %g\n", rmed, gmed, bmed); - } - - // Calculate output medians - rmed = powf(rmed, rexp); - gmed = powf(gmed, gexp); - bmed = powf(bmed, bexp); - - // Calculate output multipliers so that the median value is 1/24 of the output range. - rmult = (MAX_OUT_VALUE / 24.f) / rmed; - gmult = (MAX_OUT_VALUE / 24.f) / gmed; - bmult = (MAX_OUT_VALUE / 24.f) / bmed; - - } else { - - // Read film-base values from params - float rbase = params.filmNegative.redBase; - float gbase = params.filmNegative.greenBase; - float bbase = params.filmNegative.blueBase; - - // Reconstruct scale_mul coefficients from thumbnail metadata: - // redMultiplier / camwbRed is pre_mul[0] - // pre_mul[0] * scaleGain is scale_mul[0] - // Apply channel scaling to raw (unscaled) input base values, to - // match with actual (scaled) data in baseImg - rbase *= (redMultiplier / camwbRed) * scaleGain; - gbase *= (greenMultiplier / camwbGreen) * scaleGain; - bbase *= (blueMultiplier / camwbBlue) * scaleGain; - - if (settings->verbose) { - printf("Thumbnail input film base values: %g %g %g\n", rbase, gbase, bbase); - } - - // Apply exponents to get output film base values - rbase = powf(rbase, rexp); - gbase = powf(gbase, gexp); - bbase = powf(bbase, bexp); - - if (settings->verbose) { - printf("Thumbnail output film base values: %g %g %g\n", rbase, gbase, bbase); - } - - // Calculate multipliers so that film base value is 1/512th of the output range. - rmult = (MAX_OUT_VALUE / 512.f) / rbase; - gmult = (MAX_OUT_VALUE / 512.f) / gbase; - bmult = (MAX_OUT_VALUE / 512.f) / bbase; - - } - - - if (oldChannelScaling) { - // Need to calculate channel averages, to fake the same conditions - // found in rawimagesource, where get_ColorsCoeff is called with - // forceAutoWB=true. - float rsum = 0.f, gsum = 0.f, bsum = 0.f; - - for (int i = 0; i < rheight; i++) { - for (int j = 0; j < rwidth; j++) { - rsum += baseImg->r(i, j); - gsum += baseImg->g(i, j); - bsum += baseImg->b(i, j); - } - } - - const float ravg = rsum / (rheight * rwidth); - const float gavg = gsum / (rheight * rwidth); - const float bavg = bsum / (rheight * rwidth); - - // Shifting current WB multipliers, based on channel averages. - rmult /= gavg / ravg; - // gmult /= gAvg / gAvg; green chosen as reference channel - bmult /= gavg / bavg; - - } else { - - // Get and un-apply multipliers to adapt the thumbnail to a known fixed WB setting, - // as in the main image processing. - - double r, g, b; - ColorTemp(3500., 1., 1., "Custom").getMultipliers(r, g, b); - //iColorMatrix is cam_rgb - const double rm = camwbRed / (iColorMatrix[0][0] * r + iColorMatrix[0][1] * g + iColorMatrix[0][2] * b); - const double gm = camwbGreen / (iColorMatrix[1][0] * r + iColorMatrix[1][1] * g + iColorMatrix[1][2] * b); - const double bm = camwbBlue / (iColorMatrix[2][0] * r + iColorMatrix[2][1] * g + iColorMatrix[2][2] * b); - - // Normalize max WB multiplier to 1.f - const double m = max(rm, gm, bm); - rmult /= rm / m; - gmult /= gm / m; - bmult /= bm / m; - } - - - if (settings->verbose) { - printf("Thumbnail computed multipliers: %g %g %g\n", static_cast(rmult), static_cast(gmult), static_cast(bmult)); - } - - -#ifdef __SSE2__ - const vfloat clipv = F2V(MAXVALF); - const vfloat rexpv = F2V(rexp); - const vfloat gexpv = F2V(gexp); - const vfloat bexpv = F2V(bexp); - const vfloat rmultv = F2V(rmult); - const vfloat gmultv = F2V(gmult); - const vfloat bmultv = F2V(bmult); -#endif - - for (int i = 0; i < rheight; i++) { - float *rline = baseImg->r(i); - float *gline = baseImg->g(i); - float *bline = baseImg->b(i); - int j = 0; -#ifdef __SSE2__ - - for (; j < rwidth - 3; j += 4) { - STVFU(rline[j], vminf(rmultv * pow_F(LVFU(rline[j]), rexpv), clipv)); - STVFU(gline[j], vminf(gmultv * pow_F(LVFU(gline[j]), gexpv), clipv)); - STVFU(bline[j], vminf(bmultv * pow_F(LVFU(bline[j]), bexpv), clipv)); - } - -#endif - - for (; j < rwidth; ++j) { - rline[j] = CLIP(rmult * pow_F(rline[j], rexp)); - gline[j] = CLIP(gmult * pow_F(gline[j], gexp)); - bline[j] = CLIP(bmult * pow_F(bline[j], bexp)); - } - } -} diff --git a/rtengine/fujicompressed.cc b/rtengine/fujicompressed.cc index 45622eb7f..c1c620657 100644 --- a/rtengine/fujicompressed.cc +++ b/rtengine/fujicompressed.cc @@ -25,7 +25,7 @@ int bitDiff (int value1, int value2) int decBits = 0; if ( value2 < value1 ) - while (decBits <= 12 && (value2 << ++decBits) < value1) + while (decBits <= 14 && (value2 << ++decBits) < value1) ; return decBits; @@ -42,7 +42,7 @@ void CLASS init_fuji_compr (struct fuji_compressed_params* info) derror(); } - info->q_table = (char *) malloc (32768); + info->q_table = (char *) malloc (2 << fuji_bits); merror (info->q_table, "init_fuji_compr()"); if (fuji_raw_type == 16) { @@ -83,19 +83,23 @@ void CLASS init_fuji_compr (struct fuji_compressed_params* info) } // populting gradients - if (info->q_point[4] == 0x3FFF) { - info->total_values = 0x4000; - info->raw_bits = 14; - info->max_bits = 56; - info->maxDiff = 256; - } else if (info->q_point[4] == 0xFFF) { - info->total_values = 4096; - info->raw_bits = 12; - info->max_bits = 48; - info->maxDiff = 64; - } else { - derror(); - } + //if (info->q_point[4] == 0x3FFF) { + // info->total_values = 0x4000; + // info->raw_bits = 14; + // info->max_bits = 56; + // info->maxDiff = 256; + //} else if (info->q_point[4] == 0xFFF) { + // info->total_values = 4096; + // info->raw_bits = 12; + // info->max_bits = 48; + // info->maxDiff = 64; + //} else { + // derror(); + //} + info->total_values = (1 << fuji_bits); + info->raw_bits = fuji_bits; + info->max_bits = 4 * info->raw_bits; + info->maxDiff = info->total_values >> 6; } #define FUJI_BUF_SIZE 0x10000u @@ -1017,7 +1021,7 @@ void CLASS parse_fuji_compressed_header() || h_total_lines > 0x800 || h_total_lines == 0 || h_total_lines != h_raw_height / 6 - || (h_raw_bits != 12 && h_raw_bits != 14) + || (h_raw_bits != 12 && h_raw_bits != 14 && h_raw_bits != 16) || (h_raw_type != 16 && h_raw_type != 0)) { xtransCompressed = false; return; diff --git a/rtengine/helperavx.h b/rtengine/helperavx.h index 528760a92..de4ecf880 100644 --- a/rtengine/helperavx.h +++ b/rtengine/helperavx.h @@ -3,6 +3,11 @@ // this code was taken from http://shibatch.sourceforge.net/ // Many thanks to the author: Naoki Shibata // +// Copyright Naoki Shibata and contributors 2010 - 2021. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file sleef_LICENSE.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// //////////////////////////////////////////////////////////////// #ifndef __AVX__ #error Please specify -mavx. diff --git a/rtengine/helpersse2.h b/rtengine/helpersse2.h index e8c489b04..8e87032f0 100644 --- a/rtengine/helpersse2.h +++ b/rtengine/helpersse2.h @@ -3,6 +3,11 @@ // this code was taken from http://shibatch.sourceforge.net/ // Many thanks to the author of original version: Naoki Shibata // +// Copyright Naoki Shibata and contributors 2010 - 2021. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file sleef_LICENSE.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// // This version contains modifications made by Ingo Weyrich // //////////////////////////////////////////////////////////////// diff --git a/rtengine/hilite_recon.cc b/rtengine/hilite_recon.cc index 1a4c4c7f4..a45e5d345 100644 --- a/rtengine/hilite_recon.cc +++ b/rtengine/hilite_recon.cc @@ -32,6 +32,14 @@ #include "opthelper.h" #include "rawimagesource.h" #include "rt_math.h" +//#define BENCHMARK +//#include "StopWatch.h" +#include "guidedfilter.h" +#include "settings.h" +#include "gauss.h" +#include "rescale.h" +#include "iccstore.h" +#include "color.h" namespace { @@ -287,9 +295,13 @@ void boxblur_resamp(const float* const* src, float** dst, float** temp, int H, i namespace rtengine { +extern const Settings *settings; +using namespace procparams; + const ProcParams params; -void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue) -{ +void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue, int blur) +{ + // BENCHFUN double progress = 0.0; if (plistener) { @@ -306,7 +318,7 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue constexpr float threshpct = 0.25f; constexpr float maxpct = 0.95f; constexpr float epsilon = 0.00001f; - //%%%%%%%%%%%%%%%%%%%% + //for blend algorithm: constexpr float blendthresh = 1.0; // Transform matrixes rgb>lab and back @@ -412,11 +424,6 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue return; } - if (plistener) { - progress += 0.05; - plistener->setProgress(progress); - } - constexpr int blurBorder = 256; minx = std::max(0, minx - blurBorder); miny = std::max(0, miny - blurBorder); @@ -430,21 +437,8 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue array2D temp(bufferWidth, blurHeight); // allocate temporary buffer // blur RGB channels - boxblur2(red, channelblur[0], temp, miny, minx, blurHeight, blurWidth, bufferWidth, 4); - - if (plistener) { - progress += 0.07; - plistener->setProgress(progress); - } - boxblur2(green, channelblur[1], temp, miny, minx, blurHeight, blurWidth, bufferWidth, 4); - - if (plistener) { - progress += 0.07; - plistener->setProgress(progress); - } - boxblur2(blue, channelblur[2], temp, miny, minx, blurHeight, blurWidth, bufferWidth, 4); if (plistener) { @@ -458,7 +452,7 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue #endif for (int i = 0; i < blurHeight; ++i) { for (int j = 0; j < blurWidth; ++j) { - channelblur[0][i][j] = fabsf(channelblur[0][i][j] - red[i + miny][j + minx]) + fabsf(channelblur[1][i][j] - green[i + miny][j + minx]) + fabsf(channelblur[2][i][j] - blue[i + miny][j + minx]); + channelblur[0][i][j] = std::fabs(channelblur[0][i][j] - red[i + miny][j + minx]) + std::fabs(channelblur[1][i][j] - green[i + miny][j + minx]) + std::fabs(channelblur[2][i][j] - blue[i + miny][j + minx]); } } @@ -517,7 +511,7 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue } array2D hilite_full4(bufferWidth, blurHeight); - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + //blur highlight data boxblur2(hilite_full[3], hilite_full4, temp, 0, 0, blurHeight, blurWidth, bufferWidth, 1); @@ -554,9 +548,7 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue multi_array2D hilite(hfw + 1, hfh + 1, ARRAY2D_CLEAR_DATA, 48); - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // blur and resample highlight data; range=size of blur, pitch=sample spacing - array2D temp2(blurWidth / pitch + (blurWidth % pitch == 0 ? 0 : 1), blurHeight); for (int m = 0; m < 4; ++m) { @@ -639,11 +631,11 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue } if (hilite[3][2][j] <= epsilon) { - hilite_dir[0 + c][0][j] = hilite_dir0[c][j][2]; + hilite_dir[0 + c][0][j] = hilite_dir0[c][j][2]; } if (hilite[3][3][j] <= epsilon) { - hilite_dir[0 + c][1][j] = hilite_dir0[c][j][3]; + hilite_dir[0 + c][1][j] = hilite_dir0[c][j][3]; } if (hilite[3][hfh - 3][j] <= epsilon) { @@ -926,8 +918,43 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue hilite[c].free(); } - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // now reconstruct clipped channels using color ratios + //using code from ART - thanks to Alberto Griggio + const int W2 = blur > 0 ? blurWidth / 2.f + 0.5f : 0; + const int H2 = blur > 0 ? blurHeight / 2.f + 0.5f : 0; + array2D mask(W2, H2, ARRAY2D_CLEAR_DATA); + array2D rbuf(W2, H2); + array2D gbuf(W2, H2); + array2D bbuf(W2, H2); + array2D guide(W2, H2); + + if (blur > 0) { + array2D rbuffer(blurWidth, blurHeight, minx, miny, red, ARRAY2D_BYREFERENCE); + rescaleNearest(rbuffer, rbuf, true); + array2D gbuffer(blurWidth, blurHeight, minx, miny, green, ARRAY2D_BYREFERENCE); + rescaleNearest(gbuffer, gbuf, true); + array2D bbuffer(blurWidth, blurHeight, minx, miny, blue, ARRAY2D_BYREFERENCE); + rescaleNearest(bbuffer, bbuf, true); + + LUTf gamma(65536); +#ifdef _OPENMP + #pragma omp parallel for +#endif + for (int i = 0; i < 65536; ++i) { + gamma[i] = pow_F(i / 65535.f, 2.2f); + } + + const float xyzcam[3] = {static_cast(imatrices.xyz_cam[1][0]), static_cast(imatrices.xyz_cam[1][1]), static_cast(imatrices.xyz_cam[1][2])}; +#ifdef _OPENMP + #pragma omp parallel for +#endif + for (int y = 0; y < H2; ++y) { + for (int x = 0; x < W2; ++x) { + guide[y][x] = gamma[Color::rgbLuminance(rbuf[y][x], gbuf[y][x], bbuf[y][x], xyzcam)]; + } + } + } +//end adding code ART #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) @@ -1008,21 +1035,20 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue // Copy converted pixel back if (pixel[0] > blendpt) { const float rfrac = LIM01(medFactor[0] * (pixel[0] - blendpt)); - rgb_blend[0] = rfrac * rgb[0] + (1.f - rfrac) * pixel[0]; + rgb_blend[0] = intp(rfrac, rgb[0], pixel[0]); } if (pixel[1] > blendpt) { const float gfrac = LIM01(medFactor[1] * (pixel[1] - blendpt)); - rgb_blend[1] = gfrac * rgb[1] + (1.f - gfrac) * pixel[1]; + rgb_blend[1] = intp(gfrac, rgb[1], pixel[1]); } if (pixel[2] > blendpt) { const float bfrac = LIM01(medFactor[2] * (pixel[2] - blendpt)); - rgb_blend[2] = bfrac * rgb[2] + (1.f - bfrac) * pixel[2]; + rgb_blend[2] = intp(bfrac, rgb[2], pixel[2]); } //end of HLRecovery_blend estimation - //%%%%%%%%%%%%%%%%%%%%%%% //there are clipped highlights //first, determine weighted average of unclipped extensions (weighting is by 'hue' proximity) @@ -1048,7 +1074,7 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue } for (int dir = 0; dir < 2; ++dir) { - const float Yhi2 = 1.f / ( hilite_dir[dir * 4 + 0][i1][j1] + hilite_dir[dir * 4 + 1][i1][j1] + hilite_dir[dir * 4 + 2][i1][j1]); + const float Yhi2 = 1.f / (hilite_dir[dir * 4 + 0][i1][j1] + hilite_dir[dir * 4 + 1][i1][j1] + hilite_dir[dir * 4 + 2][i1][j1]); if (Yhi2 < 2.f) { const float dirwt = 1.f / ((1.f + 65535.f * (SQR(rgb_blend[0] - hilite_dir[dir * 4 + 0][i1][j1] * Yhi2) + @@ -1078,14 +1104,18 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue continue; } + //using code from ART - thanks to Alberto Griggio + float maskval = 1.f; + const int yy = i + miny; + const int xx = j + minx; + //now correct clipped channels if (pixel[0] > max_f[0] && pixel[1] > max_f[1] && pixel[2] > max_f[2]) { //all channels clipped - const float mult = whitept / (0.299f * clipfix[0] + 0.587f * clipfix[1] + 0.114f * clipfix[2]); - red[i + miny][j + minx] = clipfix[0] * mult; - green[i + miny][j + minx] = clipfix[1] * mult; - blue[i + miny][j + minx] = clipfix[2] * mult; + red[yy][xx] = clipfix[0] * mult; + green[yy][xx] = clipfix[1] * mult; + blue[yy][xx] = clipfix[2] * mult; } else {//some channels clipped const float notclipped[3] = { pixel[0] <= max_f[0] ? 1.f : 0.f, @@ -1094,29 +1124,98 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue }; if (notclipped[0] == 0.f) { //red clipped - red[i + miny][j + minx] = max(pixel[0], clipfix[0] * ((notclipped[1] * pixel[1] + notclipped[2] * pixel[2]) / + red[yy][xx] = max(pixel[0], clipfix[0] * ((notclipped[1] * pixel[1] + notclipped[2] * pixel[2]) / (notclipped[1] * clipfix[1] + notclipped[2] * clipfix[2] + epsilon))); } if (notclipped[1] == 0.f) { //green clipped - green[i + miny][j + minx] = max(pixel[1], clipfix[1] * ((notclipped[2] * pixel[2] + notclipped[0] * pixel[0]) / + green[yy][xx] = max(pixel[1], clipfix[1] * ((notclipped[2] * pixel[2] + notclipped[0] * pixel[0]) / (notclipped[2] * clipfix[2] + notclipped[0] * clipfix[0] + epsilon))); } if (notclipped[2] == 0.f) { //blue clipped - blue[i + miny][j + minx] = max(pixel[2], clipfix[2] * ((notclipped[0] * pixel[0] + notclipped[1] * pixel[1]) / + blue[yy][xx] = max(pixel[2], clipfix[2] * ((notclipped[0] * pixel[0] + notclipped[1] * pixel[1]) / (notclipped[0] * clipfix[0] + notclipped[1] * clipfix[1] + epsilon))); } + + maskval = 1.f - (notclipped[0] + notclipped[1] + notclipped[2]) / 5.f; } - Y = 0.299f * red[i + miny][j + minx] + 0.587f * green[i + miny][j + minx] + 0.114f * blue[i + miny][j + minx]; + Y = 0.299f * red[yy][xx] + 0.587f * green[yy][xx] + 0.114f * blue[yy][xx]; if (Y > whitept) { const float mult = whitept / Y; + red[yy][xx] *= mult; + green[yy][xx] *= mult; + blue[yy][xx] *= mult; + } - red[i + miny][j + minx] *= mult; - green[i + miny][j + minx] *= mult; - blue[i + miny][j + minx] *= mult; + if (blur > 0) { + const int ii = i / 2; + const int jj = j / 2; + rbuf[ii][jj] = red[yy][xx]; + gbuf[ii][jj] = green[yy][xx]; + bbuf[ii][jj] = blue[yy][xx]; + mask[ii][jj] = maskval; + } + } + } + + if (blur > 0) { + if (plistener) { + progress += 0.05; + plistener->setProgress(progress); + } + blur = rtengine::LIM(blur - 1, 0, 3); + + constexpr float vals[4][3] = {{4.0f, 0.3f, 0.3f}, + // {3.5f, 0.5f, 0.2f}, + {3.0f, 1.0f, 0.1f}, + {3.0f, 2.0f, 0.01f}, + {2.0f, 3.0f, 0.001f} + }; + + const float rad1 = vals[blur][0]; + const float rad2 = vals[blur][1]; + const float th = vals[blur][2]; + + guidedFilter(guide, mask, mask, rad1, th, true, 1); + if (plistener) { + progress += 0.03; + plistener->setProgress(progress); + } + if (blur > 0) { //no use of 2nd guidedFilter if Blur = 0 (slider to 1)..speed-up and very small differences. + guidedFilter(guide, rbuf, rbuf, rad2, 0.01f * 65535.f, true, 1); + if (plistener) { + progress += 0.03; + plistener->setProgress(progress); + } + guidedFilter(guide, gbuf, gbuf, rad2, 0.01f * 65535.f, true, 1); + if (plistener) { + progress += 0.03; + plistener->setProgress(progress); + } + guidedFilter(guide, bbuf, bbuf, rad2, 0.01f * 65535.f, true, 1); + if (plistener) { + progress += 0.03; + plistener->setProgress(progress); + } + } +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) +#endif + for (int y = 0; y < blurHeight; ++y) { + const float fy = y * 0.5f; + const int yy = y / 2; + for (int x = 0; x < blurWidth; ++x) { + const int xx = x / 2; + const float m = mask[yy][xx]; + if (m > 0.f) { + const float fx = x * 0.5f; + red[y + miny][x + minx] = intp(m, getBilinearValue(rbuf, fx, fy), red[y + miny][x + minx]); + green[y + miny][x + minx] = intp(m, getBilinearValue(gbuf, fx, fy), green[y + miny][x + minx]); + blue[y + miny][x + minx] = intp(m, getBilinearValue(bbuf, fx, fy), blue[y + miny][x + minx]); + } } } } diff --git a/rtengine/histmatching.cc b/rtengine/histmatching.cc index db8863862..386c6faec 100644 --- a/rtengine/histmatching.cc +++ b/rtengine/histmatching.cc @@ -278,8 +278,8 @@ void RawImageSource::getAutoMatchedToneCurve(const ColorManagementParams &cp, st std::unique_ptr source; { eSensorType sensor_type; - int w, h; - const std::unique_ptr thumb(Thumbnail::loadQuickFromRaw(getFileName(), sensor_type, w, h, 1, false, true, true)); + int w = 0, h = 0; + std::unique_ptr thumb(Thumbnail::loadQuickFromRaw(getFileName(), rml, sensor_type, w, h, 1, false, true, true)); if (!thumb) { if (settings->verbose) { std::cout << "histogram matching: no thumbnail found, generating a neutral curve" << std::endl; diff --git a/rtengine/iccjpeg.cc b/rtengine/iccjpeg.cc index 5e652296f..69771df02 100644 --- a/rtengine/iccjpeg.cc +++ b/rtengine/iccjpeg.cc @@ -18,7 +18,7 @@ */ #include "iccjpeg.h" -#include /* define malloc() */ +#include /* @@ -155,12 +155,9 @@ marker_is_icc (jpeg_saved_marker_ptr marker) * If TRUE is returned, *icc_data_ptr is set to point to the * returned data, and *icc_data_len is set to its length. * - * IMPORTANT: the data at **icc_data_ptr has been allocated with malloc() - * and must be freed by the caller with free() when the caller no longer - * needs it. (Alternatively, we could write this routine to use the - * IJG library's memory allocator, so that the data would be freed implicitly - * at jpeg_finish_decompress() time. But it seems likely that many apps - * will prefer to have the data stick around after decompression finishes.) + * IMPORTANT: the data at **icc_data_ptr has been allocated with new + * and must be freed by the caller with delete[] when the caller no longer + * needs it. * * NOTE: if the file contains invalid ICC APP2 markers, we just silently * return FALSE. You might want to issue an error message instead. @@ -235,7 +232,7 @@ read_icc_profile (j_decompress_ptr cinfo, } /* Allocate space for assembled data */ - icc_data = (JOCTET *) malloc(total_length * sizeof(JOCTET)); + icc_data = new (std::nothrow) JOCTET[total_length]; if (icc_data == nullptr) { return FALSE; /* oops, out of memory */ diff --git a/rtengine/iimage.h b/rtengine/iimage.h index 663795238..984b98a6f 100644 --- a/rtengine/iimage.h +++ b/rtengine/iimage.h @@ -220,7 +220,7 @@ public: #endif return ptrs[row][col]; } - const T operator() (size_t row, size_t col) const + const T& operator() (size_t row, size_t col) const { #if CHECK_BOUNDS assert (row < height_ && col < width_); @@ -1274,7 +1274,7 @@ public: #endif return ptr[3 * (row * width + col)]; } - const T operator() (size_t row, size_t col) const + const T& operator() (size_t row, size_t col) const { #if CHECK_BOUNDS assert (row < height_ && col < width_); diff --git a/rtengine/imageio.cc b/rtengine/imageio.cc index 4975a6854..f95d5db24 100644 --- a/rtengine/imageio.cc +++ b/rtengine/imageio.cc @@ -24,6 +24,8 @@ #include #include #include +#include +#include #include "rt_math.h" #include "procparams.h" #include "utils.h" @@ -125,7 +127,6 @@ ImageIO::ImageIO() : embProfile(nullptr), profileLength(0), loadedProfileData(nullptr), - loadedProfileDataJpg(false), loadedProfileLength(0), sampleFormat(IIOSF_UNKNOWN), sampleArrangement(IIOSA_UNKNOWN) @@ -442,7 +443,6 @@ int ImageIO::loadJPEGFromMemory (const char* buffer, int bufsize) jpeg_read_header(&cinfo, TRUE); deleteLoadedProfileData(); - loadedProfileDataJpg = true; bool hasprofile = read_icc_profile (&cinfo, (JOCTET**)&loadedProfileData, (unsigned int*)&loadedProfileLength); if (hasprofile) { @@ -527,7 +527,6 @@ int ImageIO::loadJPEG (const Glib::ustring &fname) cinfo.out_color_space = JCS_RGB; deleteLoadedProfileData(); - loadedProfileDataJpg = true; bool hasprofile = read_icc_profile (&cinfo, (JOCTET**)&loadedProfileData, (unsigned int*)&loadedProfileLength); if (hasprofile) { @@ -603,14 +602,17 @@ int ImageIO::getTIFFSampleFormat (const Glib::ustring &fname, IIOSampleFormat &s return IMIO_VARIANTNOTSUPPORTED; } - if (!TIFFGetField(in, TIFFTAG_SAMPLEFORMAT, &sampleformat)) + if (!TIFFGetField(in, TIFFTAG_SAMPLEFORMAT, &sampleformat)) { /* * WARNING: This is a dirty hack! * We assume that files which doesn't contain the TIFFTAG_SAMPLEFORMAT tag * (which is the case with uncompressed TIFFs produced by RT!) are RGB files, * but that may be not true. --- Hombre */ - { + sampleformat = SAMPLEFORMAT_UINT; + } else if (sampleformat == SAMPLEFORMAT_VOID) { + // according to https://www.awaresystems.be/imaging/tiff/tifftags/sampleformat.html + // we assume SAMPLEFORMAT_UINT if SAMPLEFORMAT_VOID is set sampleformat = SAMPLEFORMAT_UINT; } @@ -718,6 +720,8 @@ int ImageIO::loadTIFF (const Glib::ustring &fname) if (!hasTag) { // These are needed TIFFClose(in); + fprintf(stderr, "Error 1 loading %s\n", fname.c_str()); + fflush(stderr); return IMIO_VARIANTNOTSUPPORTED; } @@ -726,6 +730,8 @@ int ImageIO::loadTIFF (const Glib::ustring &fname) if (config != PLANARCONFIG_CONTIG) { TIFFClose(in); + fprintf(stderr, "Error 2 loading %s\n", fname.c_str()); + fflush(stderr); return IMIO_VARIANTNOTSUPPORTED; } @@ -773,7 +779,6 @@ int ImageIO::loadTIFF (const Glib::ustring &fname) char* profdata; deleteLoadedProfileData(); - loadedProfileDataJpg = false; if (TIFFGetField(in, TIFFTAG_ICCPROFILE, &loadedProfileLength, &profdata)) { embProfile = cmsOpenProfileFromMem (profdata, loadedProfileLength); @@ -785,32 +790,33 @@ int ImageIO::loadTIFF (const Glib::ustring &fname) allocate (width, height); - unsigned char* linebuffer = new unsigned char[TIFFScanlineSize(in) * (samplesperpixel == 1 ? 3 : 1)]; + std::unique_ptr linebuffer(new unsigned char[TIFFScanlineSize(in) * (samplesperpixel == 1 ? 3 : 1)]); for (int row = 0; row < height; row++) { - if (TIFFReadScanline(in, linebuffer, row, 0) < 0) { + if (TIFFReadScanline(in, linebuffer.get(), row, 0) < 0) { TIFFClose(in); - delete [] linebuffer; + fprintf(stderr, "Error 3 loading %s\n", fname.c_str()); + fflush(stderr); return IMIO_READERROR; } if (samplesperpixel > 3) { for (int i = 0; i < width; i++) { - memcpy (linebuffer + i * 3 * bitspersample / 8, linebuffer + i * samplesperpixel * bitspersample / 8, 3 * bitspersample / 8); + memcpy(linebuffer.get() + i * 3 * bitspersample / 8, linebuffer.get() + i * samplesperpixel * bitspersample / 8, 3 * bitspersample / 8); } } else if (samplesperpixel == 1) { const size_t bytes = bitspersample / 8; for (int i = width - 1; i >= 0; --i) { - const unsigned char* const src = linebuffer + i * bytes; - unsigned char* const dest = linebuffer + i * 3 * bytes; + const unsigned char* const src = linebuffer.get() + i * bytes; + unsigned char* const dest = linebuffer.get() + i * 3 * bytes; memcpy(dest + 2 * bytes, src, bytes); memcpy(dest + 1 * bytes, src, bytes); memcpy(dest + 0 * bytes, src, bytes); } } - setScanline (row, linebuffer, bitspersample); + setScanline (row, linebuffer.get(), bitspersample); if (pl && !(row % 100)) { pl->setProgress ((double)(row + 1) / height); @@ -818,7 +824,6 @@ int ImageIO::loadTIFF (const Glib::ustring &fname) } TIFFClose(in); - delete [] linebuffer; if (pl) { pl->setProgressStr ("PROGRESSBAR_READY"); @@ -1371,11 +1376,7 @@ MyMutex& ImageIO::mutex () void ImageIO::deleteLoadedProfileData( ) { if(loadedProfileData) { - if(loadedProfileDataJpg) { - free(loadedProfileData); - } else { - delete[] loadedProfileData; - } + delete[] loadedProfileData; } loadedProfileData = nullptr; diff --git a/rtengine/imageio.h b/rtengine/imageio.h index 468c3401c..3283d5816 100644 --- a/rtengine/imageio.h +++ b/rtengine/imageio.h @@ -80,7 +80,6 @@ protected: std::string profileData; int profileLength; char* loadedProfileData; - bool loadedProfileDataJpg; int loadedProfileLength; MyMutex imutex; IIOSampleFormat sampleFormat; diff --git a/rtengine/imagesource.h b/rtengine/imagesource.h index 87ec9cdb6..67bec48dd 100644 --- a/rtengine/imagesource.h +++ b/rtengine/imagesource.h @@ -92,16 +92,12 @@ public: ~ImageSource () override {} virtual int load (const Glib::ustring &fname) = 0; virtual void preprocess (const procparams::RAWParams &raw, const procparams::LensProfParams &lensProf, const procparams::CoarseTransformParams& coarse, bool prepareDenoise = true) {}; - virtual void filmNegativeProcess (const procparams::FilmNegativeParams ¶ms, std::array& filmBaseValues) {}; - virtual bool getFilmNegativeExponents (Coord2D spotA, Coord2D spotB, int tran, const procparams::FilmNegativeParams& currentParams, std::array& newExps) { return false; }; - virtual bool getRawSpotValues (Coord2D spot, int spotSize, int tran, const procparams::FilmNegativeParams ¶ms, std::array& rawValues) { return false; }; virtual void demosaic (const procparams::RAWParams &raw, bool autoContrast, double &contrastThreshold, bool cache = false) {}; virtual void retinex (const procparams::ColorManagementParams& cmp, const procparams::RetinexParams &deh, const procparams::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 (const procparams::RetinexParams &retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) {}; virtual void retinexPrepareBuffers (const procparams::ColorManagementParams& cmp, const procparams::RetinexParams &retinexParams, multi_array2D &conversionBuffer, LUTu &lhist16RETI) {}; virtual void flush () = 0; virtual void HLRecovery_Global (const procparams::ToneCurveParams &hrp) {}; - virtual void HLRecovery_inpaint (float** red, float** green, float** blue) {}; virtual bool isRGBSourceModified () const = 0; // tracks whether cached rgb output of demosaic has been modified @@ -110,6 +106,7 @@ public: virtual int getFrameCount () = 0; virtual int getFlatFieldAutoClipValue () = 0; + virtual void getWBMults (const ColorTemp &ctemp, const procparams::RAWParams &raw, std::array& scale_mul, float &autoGainComp, float &rm, float &gm, float &bm) const = 0; // use right after demosaicing image, add coarse transformation and put the result in the provided Imagefloat* virtual void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const procparams::ToneCurveParams &hlp, const procparams::RAWParams &raw) = 0; diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 9a6c2e1b2..128420359 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -17,16 +17,14 @@ * along with RawTherapee. If not, see . */ #include -#include -#include #include #include "improccoordinator.h" +#include "array2D.h" #include "cieimage.h" #include "color.h" #include "colortemp.h" -#include "jaggedarray.h" #include "curves.h" #include "dcp.h" #include "iccstore.h" @@ -47,18 +45,8 @@ namespace { -using rtengine::Coord2D; -Coord2D translateCoord(const rtengine::ImProcFunctions& ipf, int fw, int fh, int x, int y) { - const std::vector points = {Coord2D(x, y)}; - - std::vector red; - std::vector green; - std::vector blue; - ipf.transCoord(fw, fh, points, red, green, blue); - - return green[0]; -} +constexpr int VECTORSCOPE_SIZE = 128; } @@ -129,6 +117,21 @@ ImProcCoordinator::ImProcCoordinator() : histLRETI(256), + hist_lrgb_dirty(false), + hist_raw_dirty(false), + + vectorscopeScale(0), + vectorscope_hc_dirty(false), + vectorscope_hs_dirty(false), + vectorscope_hc(VECTORSCOPE_SIZE, VECTORSCOPE_SIZE), + vectorscope_hs(VECTORSCOPE_SIZE, VECTORSCOPE_SIZE), + waveformScale(0), + waveform_dirty(false), + waveformRed(0, 0), + waveformGreen(0, 0), + waveformBlue(0, 0), + waveformLuma(0, 0), + CAMBrightCurveJ(), CAMBrightCurveQ(), rCurve(), @@ -206,6 +209,7 @@ ImProcCoordinator::ImProcCoordinator() : lmaskcblocalcurve(65536, LUT_CLIP_OFF), lmaskbllocalcurve(65536, LUT_CLIP_OFF), lmasklclocalcurve(65536, LUT_CLIP_OFF), + lmaskloglocalcurve(65536, LUT_CLIP_OFF), lmasklocal_curve(65536, LUT_CLIP_OFF), lastspotdup(false), previewDeltaE(false), @@ -223,6 +227,7 @@ ImProcCoordinator::ImProcCoordinator() : localltmMask(0), locallblMask(0), locallsharMask(0), + localllogMask(0), locall_Mask(0), retistrsav(nullptr) { @@ -348,28 +353,9 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) } imgsrc->getRAWHistogram(histRedRaw, histGreenRaw, histBlueRaw); + hist_raw_dirty = !(hListener && hListener->updateHistogramRaw()); highDetailPreprocessComputed = highDetailNeeded; - - // After preprocess, run film negative processing if enabled - if ( - (todo & M_RAW) - && ( - imgsrc->getSensorType() == ST_BAYER - || imgsrc->getSensorType() == ST_FUJI_XTRANS - ) - && params->filmNegative.enabled - ) { - std::array filmBaseValues = { - static_cast(params->filmNegative.redBase), - static_cast(params->filmNegative.greenBase), - static_cast(params->filmNegative.blueBase) - }; - imgsrc->filmNegativeProcess(params->filmNegative, filmBaseValues); - if (filmNegListener && params->filmNegative.redBase <= 0.f) { - filmNegListener->filmBaseValuesChanged(filmBaseValues); - } - } } /* @@ -641,7 +627,27 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) } } */ - imgsrc->convertColorSpace(orig_prev, params->icm, currWB); + + if (params->filmNegative.enabled) { + + // Process film negative AFTER colorspace conversion + if (params->filmNegative.colorSpace != FilmNegativeParams::ColorSpace::INPUT) { + imgsrc->convertColorSpace(orig_prev, params->icm, currWB); + } + + // Perform negative inversion. If needed, upgrade filmNegative params for backwards compatibility with old profiles + if (ipf.filmNegativeProcess(orig_prev, orig_prev, params->filmNegative, params->raw, imgsrc, currWB) && filmNegListener) { + filmNegListener->filmRefValuesChanged(params->filmNegative.refInput, params->filmNegative.refOutput); + } + + // Process film negative BEFORE colorspace conversion (legacy mode) + if (params->filmNegative.colorSpace == FilmNegativeParams::ColorSpace::INPUT) { + imgsrc->convertColorSpace(orig_prev, params->icm, currWB); + } + + } else { + imgsrc->convertColorSpace(orig_prev, params->icm, currWB); + } ipf.firstAnalysis(orig_prev, *params, vhist16); } @@ -728,6 +734,8 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) float *sourceg = nullptr; sourceg = new float[sizespot]; + float *sourceab = nullptr; + sourceab = new float[sizespot]; float *targetg = nullptr; targetg = new float[sizespot]; bool *log = nullptr; @@ -760,6 +768,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) blackev[sp] = params->locallab.spots.at(sp).blackEv; whiteev[sp] = params->locallab.spots.at(sp).whiteEv; sourceg[sp] = params->locallab.spots.at(sp).sourceGray; + sourceab[sp] = params->locallab.spots.at(sp).sourceabs; Autogr[sp] = params->locallab.spots.at(sp).Autogray; targetg[sp] = params->locallab.spots.at(sp).targetGray; locx[sp] = params->locallab.spots.at(sp).loc.at(0) / 2000.0; @@ -789,14 +798,15 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) xend = 1.f; } - ipf.getAutoLogloc(sp, imgsrc, sourceg, blackev, whiteev, Autogr, fw, fh, xsta, xend, ysta, yend, SCALE); - + ipf.getAutoLogloc(sp, imgsrc, sourceg, blackev, whiteev, Autogr, sourceab, fw, fh, xsta, xend, ysta, yend, SCALE); + //printf("sg=%f sab=%f\n", sourceg[sp], sourceab[sp]); params->locallab.spots.at(sp).blackEv = blackev[sp]; params->locallab.spots.at(sp).whiteEv = whiteev[sp]; params->locallab.spots.at(sp).sourceGray = sourceg[sp]; + params->locallab.spots.at(sp).sourceabs = sourceab[sp]; if (locallListener) { - locallListener->logencodChanged(blackev[sp], whiteev[sp], sourceg[sp], targetg[sp]); + locallListener->logencodChanged(blackev[sp], whiteev[sp], sourceg[sp], sourceab[sp], targetg[sp]); } } } @@ -812,6 +822,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) delete [] whiteev; delete [] blackev; delete [] targetg; + delete [] sourceab; delete [] sourceg; delete [] log; delete [] autocomput; @@ -851,7 +862,354 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) */ } + // if ((todo & (M_LUMINANCE + M_COLOR)) || (todo & M_AUTOEXP)) { + // if (todo & M_RGBCURVE) { + if (((todo & (M_AUTOEXP | M_RGBCURVE)) || (todo & M_CROP)) && params->locallab.enabled && !params->locallab.spots.empty()) { + + ipf.rgb2lab(*oprevi, *oprevl, params->icm.workingProfile); + nprevl->CopyFrom(oprevl); + // int maxspot = 1; + //************************************************************* + // locallab + //************************************************************* + + /* + * This file is part of RawTherapee. + * + * Copyright (c) 2004-2010 Gabor Horvath + * + * 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 . + * 2017 2018 Jacques Desmis + * 2019 Pierre Cabrera + */ + const std::unique_ptr reserv(new LabImage(*oprevl, true)); + const std::unique_ptr lastorigimp(new LabImage(*oprevl, true)); + std::unique_ptr savenormdr; + std::unique_ptr savenormtm; + std::unique_ptr savenormreti; + float **shbuffer = nullptr; + int sca = 1; + double huere, chromare, lumare, huerefblu, chromarefblu, lumarefblu, sobelre; + float avge, meantme, stdtme, meanretie, stdretie; + std::vector locallref; + std::vector locallretiminmax; + huerefs.resize(params->locallab.spots.size()); + huerefblurs.resize(params->locallab.spots.size()); + chromarefblurs.resize(params->locallab.spots.size()); + lumarefblurs.resize(params->locallab.spots.size()); + chromarefs.resize(params->locallab.spots.size()); + lumarefs.resize(params->locallab.spots.size()); + sobelrefs.resize(params->locallab.spots.size()); + avgs.resize(params->locallab.spots.size()); + meantms.resize(params->locallab.spots.size()); + stdtms.resize(params->locallab.spots.size()); + meanretis.resize(params->locallab.spots.size()); + stdretis.resize(params->locallab.spots.size()); + + for (int sp = 0; sp < (int)params->locallab.spots.size(); sp++) { + + if(params->locallab.spots.at(sp).equiltm && params->locallab.spots.at(sp).exptonemap) { + savenormtm.reset(new LabImage(*oprevl, true)); + } + + if(params->locallab.spots.at(sp).equilret && params->locallab.spots.at(sp).expreti) { + savenormreti.reset(new LabImage(*oprevl, true)); + } + // Set local curves of current spot to LUT + locRETgainCurve.Set(params->locallab.spots.at(sp).localTgaincurve); + locRETtransCurve.Set(params->locallab.spots.at(sp).localTtranscurve); + const bool LHutili = loclhCurve.Set(params->locallab.spots.at(sp).LHcurve); + const bool HHutili = lochhCurve.Set(params->locallab.spots.at(sp).HHcurve); + const bool CHutili = locchCurve.Set(params->locallab.spots.at(sp).CHcurve); + const bool lcmasutili = locccmasCurve.Set(params->locallab.spots.at(sp).CCmaskcurve); + const bool llmasutili = locllmasCurve.Set(params->locallab.spots.at(sp).LLmaskcurve); + const bool lhmasutili = lochhmasCurve.Set(params->locallab.spots.at(sp).HHmaskcurve); + const bool lhhmasutili = lochhhmasCurve.Set(params->locallab.spots.at(sp).HHhmaskcurve); + const bool llmasexputili = locllmasexpCurve.Set(params->locallab.spots.at(sp).LLmaskexpcurve); + const bool lcmasexputili = locccmasexpCurve.Set(params->locallab.spots.at(sp).CCmaskexpcurve); + const bool lhmasexputili = lochhmasexpCurve.Set(params->locallab.spots.at(sp).HHmaskexpcurve); + const bool llmasSHutili = locllmasSHCurve.Set(params->locallab.spots.at(sp).LLmaskSHcurve); + const bool lcmasSHutili = locccmasSHCurve.Set(params->locallab.spots.at(sp).CCmaskSHcurve); + const bool lhmasSHutili = lochhmasSHCurve.Set(params->locallab.spots.at(sp).HHmaskSHcurve); + const bool llmasvibutili = locllmasvibCurve.Set(params->locallab.spots.at(sp).LLmaskvibcurve); + const bool lcmasvibutili = locccmasvibCurve.Set(params->locallab.spots.at(sp).CCmaskvibcurve); + const bool lhmasvibutili = lochhmasvibCurve.Set(params->locallab.spots.at(sp).HHmaskvibcurve); + const bool llmascbutili = locllmascbCurve.Set(params->locallab.spots.at(sp).LLmaskcbcurve); + const bool lcmascbutili = locccmascbCurve.Set(params->locallab.spots.at(sp).CCmaskcbcurve); + const bool lhmascbutili = lochhmascbCurve.Set(params->locallab.spots.at(sp).HHmaskcbcurve); + const bool llmaslcutili = locllmaslcCurve.Set(params->locallab.spots.at(sp).LLmasklccurve); + const bool lcmaslcutili = locccmaslcCurve.Set(params->locallab.spots.at(sp).CCmasklccurve); + const bool lhmaslcutili = lochhmaslcCurve.Set(params->locallab.spots.at(sp).HHmasklccurve); + const bool llmasretiutili = locllmasretiCurve.Set(params->locallab.spots.at(sp).LLmaskreticurve); + const bool lcmasretiutili = locccmasretiCurve.Set(params->locallab.spots.at(sp).CCmaskreticurve); + const bool lhmasretiutili = lochhmasretiCurve.Set(params->locallab.spots.at(sp).HHmaskreticurve); + const bool llmastmutili = locllmastmCurve.Set(params->locallab.spots.at(sp).LLmasktmcurve); + const bool lcmastmutili = locccmastmCurve.Set(params->locallab.spots.at(sp).CCmasktmcurve); + const bool lhmastmutili = lochhmastmCurve.Set(params->locallab.spots.at(sp).HHmasktmcurve); + const bool llmasblutili = locllmasblCurve.Set(params->locallab.spots.at(sp).LLmaskblcurve); + const bool lcmasblutili = locccmasblCurve.Set(params->locallab.spots.at(sp).CCmaskblcurve); + const bool lhmasblutili = lochhmasblCurve.Set(params->locallab.spots.at(sp).HHmaskblcurve); + const bool llmaslogutili = locllmaslogCurve.Set(params->locallab.spots.at(sp).LLmaskcurveL); + const bool lcmaslogutili = locccmaslogCurve.Set(params->locallab.spots.at(sp).CCmaskcurveL); + const bool lhmaslogutili = lochhmaslogCurve.Set(params->locallab.spots.at(sp).HHmaskcurveL); + + const bool lcmas_utili = locccmas_Curve.Set(params->locallab.spots.at(sp).CCmask_curve); + const bool llmas_utili = locllmas_Curve.Set(params->locallab.spots.at(sp).LLmask_curve); + const bool lhmas_utili = lochhmas_Curve.Set(params->locallab.spots.at(sp).HHmask_curve); + const bool lhhmas_utili = lochhhmas_Curve.Set(params->locallab.spots.at(sp).HHhmask_curve); + const bool lmasutiliblwav = loclmasCurveblwav.Set(params->locallab.spots.at(sp).LLmaskblcurvewav); + const bool lmasutilicolwav = loclmasCurvecolwav.Set(params->locallab.spots.at(sp).LLmaskcolcurvewav); + const bool locwavutili = locwavCurve.Set(params->locallab.spots.at(sp).locwavcurve); + const bool loclevwavutili = loclevwavCurve.Set(params->locallab.spots.at(sp).loclevwavcurve); + const bool locconwavutili = locconwavCurve.Set(params->locallab.spots.at(sp).locconwavcurve); + const bool loccompwavutili = loccompwavCurve.Set(params->locallab.spots.at(sp).loccompwavcurve); + const bool loccomprewavutili = loccomprewavCurve.Set(params->locallab.spots.at(sp).loccomprewavcurve); + const bool locwavhueutili = locwavCurvehue.Set(params->locallab.spots.at(sp).locwavcurvehue); + const bool locwavdenutili = locwavCurveden.Set(params->locallab.spots.at(sp).locwavcurveden); + const bool locedgwavutili = locedgwavCurve.Set(params->locallab.spots.at(sp).locedgwavcurve); + const bool lmasutili_wav = loclmasCurve_wav.Set(params->locallab.spots.at(sp).LLmask_curvewav); + const bool locallutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).llcurve, lllocalcurve, sca); + const bool localclutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).clcurve, cllocalcurve, sca); + const bool locallcutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).lccurve, lclocalcurve, sca); + const bool localcutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).cccurve, cclocalcurve, sca); + const bool localrgbutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).rgbcurve, rgblocalcurve, sca); + const bool localexutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).excurve, exlocalcurve, sca); + const bool localmaskutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmaskcurve, lmasklocalcurve, sca); + const bool localmaskexputili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmaskexpcurve, lmaskexplocalcurve, sca); + const bool localmaskSHutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).LmaskSHcurve, lmaskSHlocalcurve, sca); + const bool localmaskvibutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmaskvibcurve, lmaskviblocalcurve, sca); + const bool localmasktmutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmasktmcurve, lmasktmlocalcurve, sca); + const bool localmaskretiutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmaskreticurve, lmaskretilocalcurve, sca); + const bool localmaskcbutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmaskcbcurve, lmaskcblocalcurve, sca); + const bool localmaskblutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmaskblcurve, lmaskbllocalcurve, sca); + const bool localmasklcutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmasklccurve, lmasklclocalcurve, sca); + const bool localmasklogutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).LmaskcurveL, lmaskloglocalcurve, sca); + const bool localmask_utili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmask_curve, lmasklocal_curve, sca); + double ecomp = params->locallab.spots.at(sp).expcomp; + double black = params->locallab.spots.at(sp).black; + double hlcompr = params->locallab.spots.at(sp).hlcompr; + double hlcomprthresh = params->locallab.spots.at(sp).hlcomprthresh; + double shcompr = params->locallab.spots.at(sp).shcompr; + double br = params->locallab.spots.at(sp).lightness; + double cont = params->locallab.spots.at(sp).contrast; + + if (black < 0. && params->locallab.spots.at(sp).expMethod == "pde") { + black *= 1.5; + } + + // Reference parameters computation + if (params->locallab.spots.at(sp).spotMethod == "exc") { + ipf.calc_ref(sp, reserv.get(), reserv.get(), 0, 0, pW, pH, scale, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili); + } else { + ipf.calc_ref(sp, nprevl, nprevl, 0, 0, pW, pH, scale, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili); + } + // + meantme = 0.f; + stdtme = 0.f; + meanretie = 0.f; + stdretie = 0.f; + + bool istm = params->locallab.spots.at(sp).equiltm && params->locallab.spots.at(sp).exptonemap; + bool isreti = params->locallab.spots.at(sp).equilret && params->locallab.spots.at(sp).expreti; + //preparation for mean and sigma on current RT-spot + float locx = 0.f; + float locy = 0.f; + float locxl = 0.f; + float locyt = 0.f; + float centx = 0.f; + float centy = 0.f; + float ysta = 0.f; + float yend = 1.f; + float xsta = 0.f; + float xend = 1.f; + if(istm || isreti) { + locx = params->locallab.spots.at(sp).loc.at(0) / 2000.0; + locy = params->locallab.spots.at(sp).loc.at(2) / 2000.0; + locxl= params->locallab.spots.at(sp).loc.at(1) / 2000.0; + locyt = params->locallab.spots.at(sp).loc.at(3) / 2000.0; + centx = params->locallab.spots.at(sp).centerX / 2000.0 + 0.5; + centy = params->locallab.spots.at(sp).centerY / 2000.0 + 0.5; + ysta = std::max(static_cast(centy - locyt), 0.f); + yend = std::min(static_cast(centy + locy), 1.f); + xsta = std::max(static_cast(centx - locxl), 0.f); + xend = std::min(static_cast(centx + locx), 1.f); + // printf("xsta=%f xend=%f ysta=%f yend=%f \n", xsta, xend, ysta, yend); + } + int ww = nprevl->W; + int hh = nprevl->H; + int xxs = xsta * ww; + int xxe = xend * ww; + int yys = ysta * hh; + int yye = yend * hh; + + if(istm) { //calculate mean and sigma on full image for RT-spot use by normalize_mean_dt + ipf.mean_sig (nprevl->L, meantme, stdtme, xxs, xxe, yys, yye); + } + if(isreti) { //calculate mean and sigma on full image for RT-spot use by normalize_mean_dt + ipf.mean_sig (nprevl->L, meanretie, stdretie,xxs, xxe, yys, yye) ; + } + + double huerblu = huerefblurs[sp] = huerefblu; + double chromarblu = chromarefblurs[sp] = chromarefblu; + double lumarblu = lumarefblurs[sp] = lumarefblu; + double huer = huerefs[sp] = huere; + double chromar = chromarefs[sp] = chromare; + double lumar = lumarefs[sp] = lumare ; + double sobeler = sobelrefs[sp] = sobelre; + float avg = avgs[sp] = avge; + float meantm = meantms[sp] = meantme; + float stdtm = stdtms[sp] = stdtme; + float meanreti = meanretis[sp] = meanretie; + float stdreti = stdretis[sp] = stdretie; + + CurveFactory::complexCurvelocal(ecomp, black / 65535., hlcompr, hlcomprthresh, shcompr, br, cont, lumar, + hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, avg, + sca); + + // Save Locallab mask curve references for current spot + LocallabListener::locallabRef spotref; + spotref.huer = huer; + spotref.lumar = lumar; + spotref.chromar = chromar; + locallref.push_back(spotref); + // Locallab tools computation + /* Notes: + * - shbuffer is used as nullptr + */ + + // Locallab mask is only showed in detailed image + float minCD; + float maxCD; + float mini; + float maxi; + float Tmean; + float Tsigma; + float Tmin; + float Tmax; + int lastsav; + ipf.Lab_Local(3, sp, (float**)shbuffer, nprevl, nprevl, reserv.get(), savenormtm.get(), savenormreti.get(), lastorigimp.get(), 0, 0, pW, pH, scale, locRETgainCurve, locRETtransCurve, + lllocalcurve, locallutili, + cllocalcurve, localclutili, + lclocalcurve, locallcutili, + loclhCurve, lochhCurve, locchCurve, + lmasklocalcurve, localmaskutili, + lmaskexplocalcurve, localmaskexputili, + lmaskSHlocalcurve, localmaskSHutili, + lmaskviblocalcurve, localmaskvibutili, + lmasktmlocalcurve, localmasktmutili, + lmaskretilocalcurve, localmaskretiutili, + lmaskcblocalcurve, localmaskcbutili, + lmaskbllocalcurve, localmaskblutili, + lmasklclocalcurve, localmasklcutili, + lmaskloglocalcurve, localmasklogutili, + lmasklocal_curve, localmask_utili, + + locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, + locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, + locccmasvibCurve, lcmasvibutili, locllmasvibCurve, llmasvibutili, lochhmasvibCurve, lhmasvibutili, + locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, + locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili, + locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili, + locccmasblCurve, lcmasblutili, locllmasblCurve, llmasblutili, lochhmasblCurve, lhmasblutili, + locccmaslcCurve, lcmaslcutili, locllmaslcCurve, llmaslcutili, lochhmaslcCurve, lhmaslcutili, + locccmaslogCurve, lcmaslogutili, locllmaslogCurve, llmaslogutili, lochhmaslogCurve, lhmaslogutili, + + locccmas_Curve, lcmas_utili, locllmas_Curve, llmas_utili, lochhmas_Curve, lhmas_utili, + lochhhmas_Curve, lhhmas_utili, + loclmasCurveblwav, lmasutiliblwav, + loclmasCurvecolwav, lmasutilicolwav, + locwavCurve, locwavutili, + loclevwavCurve, loclevwavutili, + locconwavCurve, locconwavutili, + loccompwavCurve, loccompwavutili, + loccomprewavCurve, loccomprewavutili, + locwavCurvehue, locwavhueutili, + locwavCurveden, locwavdenutili, + locedgwavCurve, locedgwavutili, + loclmasCurve_wav, lmasutili_wav, + LHutili, HHutili, CHutili, cclocalcurve, localcutili, rgblocalcurve, localrgbutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, + huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, + meantm, stdtm, meanreti, stdreti); + + + + if(istm) { //calculate mean and sigma on full image for use by normalize_mean_dt + float meanf = 0.f; + float stdf = 0.f; + ipf.mean_sig (savenormtm.get()->L, meanf, stdf, xxs, xxe, yys, yye); + + //using 2 unused variables noiselumc and softradiustm + params->locallab.spots.at(sp).noiselumc = (int) meanf; + params->locallab.spots.at(sp).softradiustm = stdf ; + } + + if(isreti) { //calculate mean and sigma on full image for use by normalize_mean_dt + float meanf = 0.f; + float stdf = 0.f; + ipf.mean_sig (savenormreti.get()->L, meanf, stdf,xxs, xxe, yys, yye ); + //using 2 unused variables sensihs and sensiv + params->locallab.spots.at(sp).sensihs = (int) meanf; + params->locallab.spots.at(sp).sensiv = (int) stdf; + } + + + if (sp + 1u < params->locallab.spots.size()) { + // do not copy for last spot as it is not needed anymore + lastorigimp->CopyFrom(nprevl); + } + + // Save Locallab Retinex min/max for current spot + LocallabListener::locallabRetiMinMax retiMinMax; + retiMinMax.cdma = maxCD; + retiMinMax.cdmin = minCD; + retiMinMax.mini = mini; + retiMinMax.maxi = maxi; + retiMinMax.Tmean = Tmean; + retiMinMax.Tsigma = Tsigma; + retiMinMax.Tmin = Tmin; + retiMinMax.Tmax = Tmax; + locallretiminmax.push_back(retiMinMax); + + // Recalculate references after + if (params->locallab.spots.at(sp).spotMethod == "exc") { + ipf.calc_ref(sp, reserv.get(), reserv.get(), 0, 0, pW, pH, scale, huerefblu, chromarefblu, lumarefblu, huer, chromar, lumar, sobeler, avg, locwavCurveden, locwavdenutili); + } else { + ipf.calc_ref(sp, nprevl, nprevl, 0, 0, pW, pH, scale, huerefblu, chromarefblu, lumarefblu, huer, chromar, lumar, sobeler, avg, locwavCurveden, locwavdenutili); + } + + // Update Locallab reference values according to recurs parameter + if (params->locallab.spots.at(sp).recurs) { + locallref.at(sp).chromar = chromar; + locallref.at(sp).lumar = lumar; + locallref.at(sp).huer = huer; + } + } + + // Transmit Locallab reference values and Locallab Retinex min/max to LocallabListener + if (locallListener) { + locallListener->refChanged(locallref, params->locallab.selspot); + locallListener->minmaxChanged(locallretiminmax, params->locallab.selspot); + } + ipf.lab2rgb(*nprevl, *oprevi, params->icm.workingProfile); + //************************************************************* + // end locallab + //************************************************************* + + } + if ((todo & M_RGBCURVE) || (todo & M_CROP)) { //complexCurve also calculated pre-curves histogram depending on crop CurveFactory::complexCurve(params->toneCurve.expcomp, params->toneCurve.black / 65535.0, @@ -1014,252 +1372,18 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) if ((todo & (M_LUMINANCE + M_COLOR)) || (todo & M_AUTOEXP)) { nprevl->CopyFrom(oprevl); - - // int maxspot = 1; - //************************************************************* - // locallab - //************************************************************* - - if (params->locallab.enabled && !params->locallab.spots.empty()) { - /* - * This file is part of RawTherapee. - * - * Copyright (c) 2004-2010 Gabor Horvath - * - * 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 . - * 2017 2018 Jacques Desmis - * 2019 Pierre Cabrera - */ - const std::unique_ptr reserv(new LabImage(*oprevl, true)); - const std::unique_ptr lastorigimp(new LabImage(*oprevl, true)); - float **shbuffer = nullptr; - int sca = 1; - double huere, chromare, lumare, huerefblu, chromarefblu, lumarefblu, sobelre; - float avge; - std::vector locallref; - std::vector locallretiminmax; - huerefs.resize(params->locallab.spots.size()); - huerefblurs.resize(params->locallab.spots.size()); - chromarefblurs.resize(params->locallab.spots.size()); - lumarefblurs.resize(params->locallab.spots.size()); - chromarefs.resize(params->locallab.spots.size()); - lumarefs.resize(params->locallab.spots.size()); - sobelrefs.resize(params->locallab.spots.size()); - avgs.resize(params->locallab.spots.size()); - - for (int sp = 0; sp < (int)params->locallab.spots.size(); sp++) { - // Set local curves of current spot to LUT - locRETgainCurve.Set(params->locallab.spots.at(sp).localTgaincurve); - locRETtransCurve.Set(params->locallab.spots.at(sp).localTtranscurve); - const bool LHutili = loclhCurve.Set(params->locallab.spots.at(sp).LHcurve); - const bool HHutili = lochhCurve.Set(params->locallab.spots.at(sp).HHcurve); - const bool CHutili = locchCurve.Set(params->locallab.spots.at(sp).CHcurve); - const bool lcmasutili = locccmasCurve.Set(params->locallab.spots.at(sp).CCmaskcurve); - const bool llmasutili = locllmasCurve.Set(params->locallab.spots.at(sp).LLmaskcurve); - const bool lhmasutili = lochhmasCurve.Set(params->locallab.spots.at(sp).HHmaskcurve); - const bool lhhmasutili = lochhhmasCurve.Set(params->locallab.spots.at(sp).HHhmaskcurve); - const bool llmasexputili = locllmasexpCurve.Set(params->locallab.spots.at(sp).LLmaskexpcurve); - const bool lcmasexputili = locccmasexpCurve.Set(params->locallab.spots.at(sp).CCmaskexpcurve); - const bool lhmasexputili = lochhmasexpCurve.Set(params->locallab.spots.at(sp).HHmaskexpcurve); - const bool llmasSHutili = locllmasSHCurve.Set(params->locallab.spots.at(sp).LLmaskSHcurve); - const bool lcmasSHutili = locccmasSHCurve.Set(params->locallab.spots.at(sp).CCmaskSHcurve); - const bool lhmasSHutili = lochhmasSHCurve.Set(params->locallab.spots.at(sp).HHmaskSHcurve); - const bool llmasvibutili = locllmasvibCurve.Set(params->locallab.spots.at(sp).LLmaskvibcurve); - const bool lcmasvibutili = locccmasvibCurve.Set(params->locallab.spots.at(sp).CCmaskvibcurve); - const bool lhmasvibutili = lochhmasvibCurve.Set(params->locallab.spots.at(sp).HHmaskvibcurve); - const bool llmascbutili = locllmascbCurve.Set(params->locallab.spots.at(sp).LLmaskcbcurve); - const bool lcmascbutili = locccmascbCurve.Set(params->locallab.spots.at(sp).CCmaskcbcurve); - const bool lhmascbutili = lochhmascbCurve.Set(params->locallab.spots.at(sp).HHmaskcbcurve); - const bool llmaslcutili = locllmaslcCurve.Set(params->locallab.spots.at(sp).LLmasklccurve); - const bool lcmaslcutili = locccmaslcCurve.Set(params->locallab.spots.at(sp).CCmasklccurve); - const bool lhmaslcutili = lochhmaslcCurve.Set(params->locallab.spots.at(sp).HHmasklccurve); - const bool llmasretiutili = locllmasretiCurve.Set(params->locallab.spots.at(sp).LLmaskreticurve); - const bool lcmasretiutili = locccmasretiCurve.Set(params->locallab.spots.at(sp).CCmaskreticurve); - const bool lhmasretiutili = lochhmasretiCurve.Set(params->locallab.spots.at(sp).HHmaskreticurve); - const bool llmastmutili = locllmastmCurve.Set(params->locallab.spots.at(sp).LLmasktmcurve); - const bool lcmastmutili = locccmastmCurve.Set(params->locallab.spots.at(sp).CCmasktmcurve); - const bool lhmastmutili = lochhmastmCurve.Set(params->locallab.spots.at(sp).HHmasktmcurve); - const bool llmasblutili = locllmasblCurve.Set(params->locallab.spots.at(sp).LLmaskblcurve); - const bool lcmasblutili = locccmasblCurve.Set(params->locallab.spots.at(sp).CCmaskblcurve); - const bool lhmasblutili = lochhmasblCurve.Set(params->locallab.spots.at(sp).HHmaskblcurve); - const bool lcmas_utili = locccmas_Curve.Set(params->locallab.spots.at(sp).CCmask_curve); - const bool llmas_utili = locllmas_Curve.Set(params->locallab.spots.at(sp).LLmask_curve); - const bool lhmas_utili = lochhmas_Curve.Set(params->locallab.spots.at(sp).HHmask_curve); - const bool lhhmas_utili = lochhhmas_Curve.Set(params->locallab.spots.at(sp).HHhmask_curve); - const bool lmasutiliblwav = loclmasCurveblwav.Set(params->locallab.spots.at(sp).LLmaskblcurvewav); - const bool lmasutilicolwav = loclmasCurvecolwav.Set(params->locallab.spots.at(sp).LLmaskcolcurvewav); - const bool locwavutili = locwavCurve.Set(params->locallab.spots.at(sp).locwavcurve); - const bool loclevwavutili = loclevwavCurve.Set(params->locallab.spots.at(sp).loclevwavcurve); - const bool locconwavutili = locconwavCurve.Set(params->locallab.spots.at(sp).locconwavcurve); - const bool loccompwavutili = loccompwavCurve.Set(params->locallab.spots.at(sp).loccompwavcurve); - const bool loccomprewavutili = loccomprewavCurve.Set(params->locallab.spots.at(sp).loccomprewavcurve); - const bool locwavdenutili = locwavCurveden.Set(params->locallab.spots.at(sp).locwavcurveden); - const bool locedgwavutili = locedgwavCurve.Set(params->locallab.spots.at(sp).locedgwavcurve); - const bool lmasutili_wav = loclmasCurve_wav.Set(params->locallab.spots.at(sp).LLmask_curvewav); - const bool locallutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).llcurve, lllocalcurve, sca); - const bool localclutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).clcurve, cllocalcurve, sca); - const bool locallcutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).lccurve, lclocalcurve, sca); - const bool localcutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).cccurve, cclocalcurve, sca); - const bool localrgbutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).rgbcurve, rgblocalcurve, sca); - const bool localexutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).excurve, exlocalcurve, sca); - const bool localmaskutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmaskcurve, lmasklocalcurve, sca); - const bool localmaskexputili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmaskexpcurve, lmaskexplocalcurve, sca); - const bool localmaskSHutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).LmaskSHcurve, lmaskSHlocalcurve, sca); - const bool localmaskvibutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmaskvibcurve, lmaskviblocalcurve, sca); - const bool localmasktmutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmasktmcurve, lmasktmlocalcurve, sca); - const bool localmaskretiutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmaskreticurve, lmaskretilocalcurve, sca); - const bool localmaskcbutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmaskcbcurve, lmaskcblocalcurve, sca); - const bool localmaskblutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmaskblcurve, lmaskbllocalcurve, sca); - const bool localmasklcutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmasklccurve, lmasklclocalcurve, sca); - const bool localmask_utili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmask_curve, lmasklocal_curve, sca); - double ecomp = params->locallab.spots.at(sp).expcomp; - double black = params->locallab.spots.at(sp).black; - double hlcompr = params->locallab.spots.at(sp).hlcompr; - double hlcomprthresh = params->locallab.spots.at(sp).hlcomprthresh; - double shcompr = params->locallab.spots.at(sp).shcompr; - double br = params->locallab.spots.at(sp).lightness; - double cont = params->locallab.spots.at(sp).contrast; - - if (black < 0. && params->locallab.spots.at(sp).expMethod == "pde") { - black *= 1.5; - } - - // Reference parameters computation - if (params->locallab.spots.at(sp).spotMethod == "exc") { - ipf.calc_ref(sp, reserv.get(), reserv.get(), 0, 0, pW, pH, scale, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili); - } else { - ipf.calc_ref(sp, nprevl, nprevl, 0, 0, pW, pH, scale, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili); - } - - double huerblu = huerefblurs[sp] = huerefblu; - double chromarblu = chromarefblurs[sp] = chromarefblu; - double lumarblu = lumarefblurs[sp] = lumarefblu; - double huer = huerefs[sp] = huere; - double chromar = chromarefs[sp] = chromare; - double lumar = lumarefs[sp] = lumare ; - double sobeler = sobelrefs[sp] = sobelre; - float avg = avgs[sp] = avge; - CurveFactory::complexCurvelocal(ecomp, black / 65535., hlcompr, hlcomprthresh, shcompr, br, cont, lumar, - hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, avg, - sca); - - // Save Locallab mask curve references for current spot - LocallabListener::locallabRef spotref; - spotref.huer = huer; - spotref.lumar = lumar; - spotref.chromar = chromar; - locallref.push_back(spotref); - - // Locallab tools computation - /* Notes: - * - shbuffer is used as nullptr - */ - // Locallab mask is only showed in detailed image - float minCD; - float maxCD; - float mini; - float maxi; - float Tmean; - float Tsigma; - float Tmin; - float Tmax; - int lastsav; - ipf.Lab_Local(3, sp, (float**)shbuffer, nprevl, nprevl, reserv.get(), lastorigimp.get(), 0, 0, pW, pH, scale, locRETgainCurve, locRETtransCurve, - lllocalcurve, locallutili, - cllocalcurve, localclutili, - lclocalcurve, locallcutili, - loclhCurve, lochhCurve, locchCurve, - lmasklocalcurve, localmaskutili, - lmaskexplocalcurve, localmaskexputili, - lmaskSHlocalcurve, localmaskSHutili, - lmaskviblocalcurve, localmaskvibutili, - lmasktmlocalcurve, localmasktmutili, - lmaskretilocalcurve, localmaskretiutili, - lmaskcblocalcurve, localmaskcbutili, - lmaskbllocalcurve, localmaskblutili, - lmasklclocalcurve, localmasklcutili, - lmasklocal_curve, localmask_utili, - - locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, - locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, - locccmasvibCurve, lcmasvibutili, locllmasvibCurve, llmasvibutili, lochhmasvibCurve, lhmasvibutili, - locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, - locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili, - locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili, - locccmasblCurve, lcmasblutili, locllmasblCurve, llmasblutili, lochhmasblCurve, lhmasblutili, - locccmaslcCurve, lcmaslcutili, locllmaslcCurve, llmaslcutili, lochhmaslcCurve, lhmaslcutili, - locccmas_Curve, lcmas_utili, locllmas_Curve, llmas_utili, lochhmas_Curve, lhmas_utili, - lochhhmas_Curve, lhhmas_utili, - loclmasCurveblwav, lmasutiliblwav, - loclmasCurvecolwav, lmasutilicolwav, - locwavCurve, locwavutili, - loclevwavCurve, loclevwavutili, - locconwavCurve, locconwavutili, - loccompwavCurve, loccompwavutili, - loccomprewavCurve, loccomprewavutili, - locwavCurveden, locwavdenutili, - locedgwavCurve, locedgwavutili, - loclmasCurve_wav, lmasutili_wav, - LHutili, HHutili, CHutili, cclocalcurve, localcutili, rgblocalcurve, localrgbutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, - huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax); - - if (sp + 1u < params->locallab.spots.size()) { - // do not copy for last spot as it is not needed anymore - lastorigimp->CopyFrom(nprevl); - } - - // Save Locallab Retinex min/max for current spot - LocallabListener::locallabRetiMinMax retiMinMax; - retiMinMax.cdma = maxCD; - retiMinMax.cdmin = minCD; - retiMinMax.mini = mini; - retiMinMax.maxi = maxi; - retiMinMax.Tmean = Tmean; - retiMinMax.Tsigma = Tsigma; - retiMinMax.Tmin = Tmin; - retiMinMax.Tmax = Tmax; - locallretiminmax.push_back(retiMinMax); - - // Recalculate references after - if (params->locallab.spots.at(sp).spotMethod == "exc") { - ipf.calc_ref(sp, reserv.get(), reserv.get(), 0, 0, pW, pH, scale, huerefblu, chromarefblu, lumarefblu, huer, chromar, lumar, sobeler, avg, locwavCurveden, locwavdenutili); - } else { - ipf.calc_ref(sp, nprevl, nprevl, 0, 0, pW, pH, scale, huerefblu, chromarefblu, lumarefblu, huer, chromar, lumar, sobeler, avg, locwavCurveden, locwavdenutili); - } - - // Update Locallab reference values according to recurs parameter - if (params->locallab.spots.at(sp).recurs) { - locallref.at(sp).chromar = chromar; - locallref.at(sp).lumar = lumar; - locallref.at(sp).huer = huer; - } - } - - // Transmit Locallab reference values and Locallab Retinex min/max to LocallabListener - if (locallListener) { - locallListener->refChanged(locallref, params->locallab.selspot); - locallListener->minmaxChanged(locallretiminmax, params->locallab.selspot); - } - } - - //************************************************************* - // end locallab - //************************************************************* - histCCurve.clear(); histLCurve.clear(); + if (params->colorToning.enabled && params->colorToning.method == "LabGrid") { + ipf.colorToningLabGrid(nprevl, 0, nprevl->W, 0, nprevl->H, false); + } + + ipf.shadowsHighlights(nprevl, params->sh.enabled, params->sh.lab,params->sh.highlights ,params->sh.shadows, params->sh.radius, scale, params->sh.htonalwidth, params->sh.stonalwidth); + + if (params->localContrast.enabled) { + // Alberto's local contrast + ipf.localContrast(nprevl, nprevl->L, params->localContrast, false, scale); + } ipf.chromiLuminanceCurve(nullptr, pW, nprevl, nprevl, chroma_acurve, chroma_bcurve, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, histCCurve, histLCurve); ipf.vibrance(nprevl, params->vibrance, params->toneCurve.hrenabled, params->icm.workingProfile); ipf.labColorCorrectionRegions(nprevl); @@ -1560,10 +1684,11 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) acListener->ybCamChanged((int) yb); //real value Yb scene } - if (params->colorappearance.enabled && params->colorappearance.presetcat02 && params->colorappearance.autotempout) { + // if (params->colorappearance.enabled && params->colorappearance.presetcat02 && params->colorappearance.autotempout) { + // if (params->colorappearance.enabled && params->colorappearance.presetcat02) { // acListener->wbCamChanged(params->wb.temperature, params->wb.green); //real temp and tint - acListener->wbCamChanged(params->wb.temperature, 1.f); //real temp and tint = 1. - } + // acListener->wbCamChanged(params->wb.temperature, 1.f); //real temp and tint = 1. + // } } else { // CIECAM is disabled, we free up its image buffer to save some space @@ -1608,8 +1733,10 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) // Computing the internal image for analysis, i.e. conversion from WCS->Output profile delete workimg; + workimg = nullptr; + workimg = ipf.lab2rgb(nprevl, 0, 0, pW, pH, params->icm); - } catch (char * str) { + } catch (std::exception&) { return; } } @@ -1628,9 +1755,21 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) imageListener->imageReady(params->crop); } + hist_lrgb_dirty = vectorscope_hc_dirty = vectorscope_hs_dirty = waveform_dirty = true; if (hListener) { - updateLRGBHistograms(); - hListener->histogramChanged(histRed, histGreen, histBlue, histLuma, histToneCurve, histLCurve, histCCurve, /*histCLurve, histLLCurve,*/ histLCAM, histCCAM, histRedRaw, histGreenRaw, histBlueRaw, histChroma, histLRETI); + if (hListener->updateHistogram()) { + updateLRGBHistograms(); + } + if (hListener->updateVectorscopeHC()) { + updateVectorscopeHC(); + } + if (hListener->updateVectorscopeHS()) { + updateVectorscopeHS(); + } + if (hListener->updateWaveform()) { + updateWaveforms(); + } + notifyHistogramChanged(); } } @@ -1672,6 +1811,7 @@ void ImProcCoordinator::freeAll() } delete workimg; + workimg = nullptr; } @@ -1731,8 +1871,42 @@ void ImProcCoordinator::setScale(int prevscale) } -void ImProcCoordinator::updateLRGBHistograms() +void ImProcCoordinator::notifyHistogramChanged() { + if (hListener) { + hListener->histogramChanged( + histRed, + histGreen, + histBlue, + histLuma, + histToneCurve, + histLCurve, + histCCurve, + histLCAM, + histCCAM, + histRedRaw, + histGreenRaw, + histBlueRaw, + histChroma, + histLRETI, + vectorscopeScale, + vectorscope_hc, + vectorscope_hs, + waveformScale, + waveformRed, + waveformGreen, + waveformBlue, + waveformLuma + ); + } +} + +bool ImProcCoordinator::updateLRGBHistograms() +{ + + if (!hist_lrgb_dirty) { + return false; + } int x1, y1, x2, y2; params->crop.mapToResized(pW, pH, scale, x1, x2, y1, y2); @@ -1790,6 +1964,159 @@ void ImProcCoordinator::updateLRGBHistograms() } } + hist_lrgb_dirty = false; + return true; + +} + +bool ImProcCoordinator::updateVectorscopeHC() +{ + if (!workimg || !vectorscope_hc_dirty) { + return false; + } + + int x1, y1, x2, y2; + params->crop.mapToResized(pW, pH, scale, x1, x2, y1, y2); + + constexpr int size = VECTORSCOPE_SIZE; + constexpr float norm_factor = size / (128.f * 655.36f); + vectorscope_hc.fill(0); + + vectorscopeScale = (x2 - x1) * (y2 - y1); + + const std::unique_ptr a(new float[vectorscopeScale]); + const std::unique_ptr b(new float[vectorscopeScale]); + const std::unique_ptr L(new float[vectorscopeScale]); + ipf.rgb2lab(*workimg, x1, y1, x2 - x1, y2 - y1, L.get(), a.get(), b.get(), params->icm); +#ifdef _OPENMP + #pragma omp parallel +#endif + { + array2D vectorscopeThr(size, size, ARRAY2D_CLEAR_DATA); +#ifdef _OPENMP + #pragma omp for nowait +#endif + for (int i = y1; i < y2; ++i) { + for (int j = x1, ofs_lab = (i - y1) * (x2 - x1); j < x2; ++j, ++ofs_lab) { + const int col = norm_factor * a[ofs_lab] + size / 2 + 0.5f; + const int row = norm_factor * b[ofs_lab] + size / 2 + 0.5f; + if (col >= 0 && col < size && row >= 0 && row < size) { + vectorscopeThr[row][col]++; + } + } + } +#ifdef _OPENMP + #pragma omp critical +#endif + { + vectorscope_hc += vectorscopeThr; + } + } + + vectorscope_hc_dirty = false; + return true; +} + +bool ImProcCoordinator::updateVectorscopeHS() +{ + if (!workimg || !vectorscope_hs_dirty) { + return false; + } + + int x1, y1, x2, y2; + params->crop.mapToResized(pW, pH, scale, x1, x2, y1, y2); + + constexpr int size = VECTORSCOPE_SIZE; + vectorscope_hs.fill(0); + + vectorscopeScale = (x2 - x1) * (y2 - y1); + +#ifdef _OPENMP + #pragma omp parallel +#endif + { + array2D vectorscopeThr(size, size, ARRAY2D_CLEAR_DATA); +#ifdef _OPENMP + #pragma omp for nowait +#endif + for (int i = y1; i < y2; ++i) { + int ofs = (i * pW + x1) * 3; + for (int j = x1; j < x2; ++j) { + const float red = 257.f * workimg->data[ofs++]; + const float green = 257.f * workimg->data[ofs++]; + const float blue = 257.f * workimg->data[ofs++]; + float h, s, l; + Color::rgb2hslfloat(red, green, blue, h, s, l); + const auto sincosval = xsincosf(2.f * RT_PI_F * h); + const int col = s * sincosval.y * (size / 2) + size / 2; + const int row = s * sincosval.x * (size / 2) + size / 2; + if (col >= 0 && col < size && row >= 0 && row < size) { + vectorscopeThr[row][col]++; + } + } + } +#ifdef _OPENMP + #pragma omp critical +#endif + { + vectorscope_hs += vectorscopeThr; + } + } + + vectorscope_hs_dirty = false; + return true; +} + +bool ImProcCoordinator::updateWaveforms() +{ + if (!workimg) { + // free memory + waveformRed.free(); + waveformGreen.free(); + waveformBlue.free(); + waveformLuma.free(); + return true; + } + + if (!waveform_dirty) { + return false; + } + + int x1, y1, x2, y2; + params->crop.mapToResized(pW, pH, scale, x1, x2, y1, y2); + int waveform_width = waveformRed.getWidth(); + + if (waveform_width != x2 - x1) { + // Resize waveform arrays. + waveform_width = x2 - x1; + waveformRed(waveform_width, 256); + waveformGreen(waveform_width, 256); + waveformBlue(waveform_width, 256); + waveformLuma(waveform_width, 256); + } + + // Start with zero. + waveformRed.fill(0); + waveformGreen.fill(0); + waveformBlue.fill(0); + waveformLuma.fill(0); + + constexpr float luma_factor = 255.f / 32768.f; + for (int i = y1; i < y2; i++) { + int ofs = (i * pW + x1) * 3; + float* L_row = nprevl->L[i] + x1; + + for (int j = 0; j < waveform_width; j++) { + waveformRed[workimg->data[ofs++]][j]++; + waveformGreen[workimg->data[ofs++]][j]++; + waveformBlue[workimg->data[ofs++]][j]++; + waveformLuma[LIM(L_row[j] * luma_factor, 0, 255)][j]++; + } + } + + waveformScale = y2 - y1; + waveform_dirty = false; + return true; } bool ImProcCoordinator::getAutoWB(double& temp, double& green, double equal, double tempBias) @@ -1875,25 +2202,7 @@ void ImProcCoordinator::getSpotWB(int x, int y, int rect, double& temp, double& } } -bool ImProcCoordinator::getFilmNegativeExponents(int xA, int yA, int xB, int yB, std::array& newExps) -{ - MyMutex::MyLock lock(mProcessing); - const int tr = getCoarseBitMask(params->coarse); - - const Coord2D p1 = translateCoord(ipf, fw, fh, xA, yA); - const Coord2D p2 = translateCoord(ipf, fw, fh, xB, yB); - - return imgsrc->getFilmNegativeExponents(p1, p2, tr, params->filmNegative, newExps); -} - -bool ImProcCoordinator::getRawSpotValues(int x, int y, int spotSize, std::array& rawValues) -{ - MyMutex::MyLock lock(mProcessing); - - return imgsrc->getRawSpotValues(translateCoord(ipf, fw, fh, x, y), spotSize, - getCoarseBitMask(params->coarse), params->filmNegative, rawValues); -} void ImProcCoordinator::getAutoCrop(double ratio, int &x, int &y, int &w, int &h) { @@ -2164,6 +2473,7 @@ void ImProcCoordinator::process() || params->dirpyrequalizer != nextParams->dirpyrequalizer || params->dehaze != nextParams->dehaze || params->pdsharpening != nextParams->pdsharpening + || params->filmNegative != nextParams->filmNegative || sharpMaskChanged; sharpMaskChanged = false; @@ -2234,4 +2544,61 @@ void ImProcCoordinator::setHighQualComputed() highQualityComputed = true; } +void ImProcCoordinator::requestUpdateWaveform() +{ + if (!hListener) { + return; + } + bool updated = updateWaveforms(); + if (updated) { + notifyHistogramChanged(); + } +} + +void ImProcCoordinator::requestUpdateHistogram() +{ + if (!hListener) { + return; + } + bool updated = updateLRGBHistograms(); + if (updated) { + notifyHistogramChanged(); + } +} + +void ImProcCoordinator::requestUpdateHistogramRaw() +{ + if (!hListener) { + return; + } + // Don't need to actually update histogram because it is always + // up-to-date. + if (hist_raw_dirty) { + hist_raw_dirty = false; + notifyHistogramChanged(); + } +} + +void ImProcCoordinator::requestUpdateVectorscopeHC() +{ + if (!hListener) { + return; + } + bool updated = updateVectorscopeHC(); + if (updated) { + notifyHistogramChanged(); + } +} + +void ImProcCoordinator::requestUpdateVectorscopeHS() +{ + if (!hListener) { + return; + } + bool updated = updateVectorscopeHS(); + if (updated) { + notifyHistogramChanged(); + } +} + } diff --git a/rtengine/improccoordinator.h b/rtengine/improccoordinator.h index d90ee68ae..9735f8be8 100644 --- a/rtengine/improccoordinator.h +++ b/rtengine/improccoordinator.h @@ -54,7 +54,7 @@ class Crop; * but using this class' LUT and other precomputed parameters. The main preview area is displaying a non framed Crop object, * while detail windows are framed Crop objects. */ -class ImProcCoordinator final : public StagedImageProcessor +class ImProcCoordinator final : public StagedImageProcessor, public HistogramObservable { friend class Crop; @@ -126,6 +126,16 @@ protected: LUTu histBlue, histBlueRaw; LUTu histLuma, histToneCurve, histToneCurveBW, histLCurve, histCCurve; LUTu histLLCurve, histLCAM, histCCAM, histClad, bcabhist, histChroma, histLRETI; + bool hist_lrgb_dirty; + /// Used to simulate a lazy update of the raw histogram. + bool hist_raw_dirty; + int vectorscopeScale; + bool vectorscope_hc_dirty, vectorscope_hs_dirty; + array2D vectorscope_hc, vectorscope_hs; + /// Waveform's intensity. Same as height of reference image. + int waveformScale; + bool waveform_dirty; + array2D waveformRed, waveformGreen, waveformBlue, waveformLuma; LUTf CAMBrightCurveJ, CAMBrightCurveQ; @@ -195,8 +205,16 @@ protected: MyMutex minit; // to gain mutually exclusive access to ... to what exactly? + void notifyHistogramChanged(); void reallocAll(); - void updateLRGBHistograms(); + /// Updates L, R, G, and B histograms. Returns true unless not updated. + bool updateLRGBHistograms(); + /// Updates the H-C vectorscope. Returns true unless not updated. + bool updateVectorscopeHC(); + /// Updates the H-S vectorscope. Returns true unless not updated. + bool updateVectorscopeHS(); + /// Updates all waveforms. Returns true unless not updated. + bool updateWaveforms(); void setScale(int prevscale); void updatePreviewImage (int todo, bool panningRelatedChange); @@ -256,6 +274,7 @@ protected: LUTf lmaskcblocalcurve; LUTf lmaskbllocalcurve; LUTf lmasklclocalcurve; + LUTf lmaskloglocalcurve; LUTf lmasklocal_curve; LocretigainCurve locRETgainCurve; @@ -296,6 +315,9 @@ protected: LocLLmaskCurve locllmas_Curve; LocHHmaskCurve lochhmas_Curve; LocHHmaskCurve lochhhmas_Curve; + LocCCmaskCurve locccmaslogCurve; + LocLLmaskCurve locllmaslogCurve; + LocHHmaskCurve lochhmaslogCurve; LocwavCurve locwavCurve; LocwavCurve loclmasCurveblwav; @@ -307,6 +329,7 @@ protected: LocwavCurve locwavCurveden; LocwavCurve locedgwavCurve; LocwavCurve loclmasCurve_wav; + LocwavCurve locwavCurvehue; std::vector huerefs; std::vector huerefblurs; @@ -316,6 +339,10 @@ protected: std::vector lumarefs; std::vector sobelrefs; std::vector avgs; + std::vector meantms; + std::vector stdtms; + std::vector meanretis; + std::vector stdretis; bool lastspotdup; bool previewDeltaE; int locallColorMask; @@ -332,6 +359,7 @@ protected: int localltmMask; int locallblMask; int locallsharMask; + int localllogMask; int locall_Mask; public: @@ -384,8 +412,7 @@ public: bool getAutoWB (double& temp, double& green, double equal, double tempBias) override; void getCamWB (double& temp, double& green) override; void getSpotWB (int x, int y, int rectSize, double& temp, double& green) override; - bool getFilmNegativeExponents(int xA, int yA, int xB, int yB, std::array& newExps) override; - bool getRawSpotValues(int x, int y, int spotSize, std::array& rawValues) override; + bool getFilmNegativeSpot(int x, int y, int spotSize, FilmNegativeParams::RGB &refInput, FilmNegativeParams::RGB &refOutput) override; void getAutoCrop (double ratio, int &x, int &y, int &w, int &h) override; bool getHighQualComputed() override; void setHighQualComputed() override; @@ -403,7 +430,7 @@ public: updaterThreadStart.unlock(); } - void setLocallabMaskVisibility(bool previewDeltaE, int locallColorMask, int locallColorMaskinv, int locallExpMask, int locallExpMaskinv, int locallSHMask, int locallSHMaskinv, int locallvibMask, int locallsoftMask, int locallblMask, int localltmMask, int locallretiMask, int locallsharMask, int localllcMask, int locallcbMask, int locall_Mask) override + void setLocallabMaskVisibility(bool previewDeltaE, int locallColorMask, int locallColorMaskinv, int locallExpMask, int locallExpMaskinv, int locallSHMask, int locallSHMaskinv, int locallvibMask, int locallsoftMask, int locallblMask, int localltmMask, int locallretiMask, int locallsharMask, int localllcMask, int locallcbMask, int localllogMask, int locall_Mask) override { this->previewDeltaE = previewDeltaE; this->locallColorMask = locallColorMask; @@ -420,6 +447,7 @@ public: this->locallsharMask = locallsharMask; this->localllcMask = localllcMask; this->locallcbMask = locallcbMask; + this->localllogMask = localllogMask; this->locall_Mask = locall_Mask; } @@ -449,7 +477,13 @@ public: } void setHistogramListener (HistogramListener *h) override { + if (hListener) { + hListener->setObservable(nullptr); + } hListener = h; + if (h) { + h->setObservable(this); + } } void setAutoCamListener (AutoCamListener* acl) override { @@ -550,6 +584,11 @@ public: } denoiseInfoStore; + void requestUpdateHistogram() override; + void requestUpdateHistogramRaw() override; + void requestUpdateVectorscopeHC() override; + void requestUpdateVectorscopeHS() override; + void requestUpdateWaveform() override; }; } diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 862939b66..a5bf9ddd4 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -51,6 +51,9 @@ #include "../rtgui/editcallbacks.h" +#pragma GCC diagnostic warning "-Wextra" +#pragma GCC diagnostic warning "-Wdouble-promotion" + namespace { using namespace rtengine; @@ -952,12 +955,19 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb float cz, wh, pfl; - Ciecam02::initcam1float (yb, pilot, f, la, xw, yw, zw, n, d, nbb, ncb, cz, aw, wh, pfl, fl, c); + int c16 = 1; + if (params->colorappearance.modelmethod == "02") { + c16 = 1; + }else if (params->colorappearance.modelmethod == "16") { + c16 = 16; + } + + Ciecam02::initcam1float (yb, pilot, f, la, xw, yw, zw, n, d, nbb, ncb, cz, aw, wh, pfl, fl, c, c16); //printf ("wh=%f \n", wh); const float pow1 = pow_F(1.64f - pow_F(0.29f, n), 0.73f); float nj, nbbj, ncbj, czj, awj, flj; - Ciecam02::initcam2float (yb2, pilotout, f2, la2, xw2, yw2, zw2, nj, dj, nbbj, ncbj, czj, awj, flj); + Ciecam02::initcam2float (yb2, pilotout, f2, la2, xw2, yw2, zw2, nj, dj, nbbj, ncbj, czj, awj, flj, c16); #ifdef __SSE2__ const float reccmcz = 1.f / (c2 * czj); #endif @@ -981,7 +991,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb } if (CAMBrightCurveJ.dirty) { - Ciecam02::curveJfloat(params->colorappearance.jlight, params->colorappearance.contrast, hist16J, CAMBrightCurveJ); //lightness and contrast J + Ciecam02::curveJfloat(params->colorappearance.jlight, params->colorappearance.contrast, 0.6f, hist16J, CAMBrightCurveJ); //lightness and contrast J CAMBrightCurveJ /= 327.68f; CAMBrightCurveJ.dirty = false; } @@ -993,7 +1003,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb } if (CAMBrightCurveQ.dirty) { - Ciecam02::curveJfloat(params->colorappearance.qbright, params->colorappearance.qcontrast, hist16Q, CAMBrightCurveQ); //brightness and contrast Q + Ciecam02::curveJfloat(params->colorappearance.qbright, params->colorappearance.qcontrast, 0.6f, hist16Q, CAMBrightCurveQ); //brightness and contrast Q // CAMBrightCurveQ /= coefQ; CAMBrightCurveQ.dirty = false; } @@ -1048,7 +1058,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb Q, M, s, F2V(aw), F2V(fl), F2V(wh), x, y, z, F2V(xw1), F2V(yw1), F2V(zw1), - F2V(c), F2V(nc), F2V(pow1), F2V(nbb), F2V(ncb), F2V(pfl), F2V(cz), F2V(d)); + F2V(c), F2V(nc), F2V(pow1), F2V(nbb), F2V(ncb), F2V(pfl), F2V(cz), F2V(d), c16); STVF(Jbuffer[k], J); STVF(Cbuffer[k], C); STVF(hbuffer[k], h); @@ -1072,7 +1082,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb Q, M, s, aw, fl, wh, x, y, z, xw1, yw1, zw1, - c, nc, pow1, nbb, ncb, pfl, cz, d); + c, nc, pow1, nbb, ncb, pfl, cz, d, c16); Jbuffer[k] = J; Cbuffer[k] = C; hbuffer[k] = h; @@ -1110,7 +1120,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb Q, M, s, aw, fl, wh, x, y, z, xw1, yw1, zw1, - c, nc, pow1, nbb, ncb, pfl, cz, d); + c, nc, pow1, nbb, ncb, pfl, cz, d, c16); #endif float Jpro, Cpro, hpro, Qpro, Mpro, spro; Jpro = J; @@ -1521,7 +1531,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb Ciecam02::jch2xyz_ciecam02float(xx, yy, zz, J, C, h, xw2, yw2, zw2, - c2, nc2, pow1n, nbbj, ncbj, flj, czj, dj, awj); + c2, nc2, pow1n, nbbj, ncbj, flj, czj, dj, awj, c16); float x, y, z; x = xx * 655.35f; y = yy * 655.35f; @@ -1573,7 +1583,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb Ciecam02::jch2xyz_ciecam02float(x, y, z, LVF(Jbuffer[k]), LVF(Cbuffer[k]), LVF(hbuffer[k]), F2V(xw2), F2V(yw2), F2V(zw2), - F2V(nc2), F2V(pow1n), F2V(nbbj), F2V(ncbj), F2V(flj), F2V(dj), F2V(awj), F2V(reccmcz)); + F2V(nc2), F2V(pow1n), F2V(nbbj), F2V(ncbj), F2V(flj), F2V(dj), F2V(awj), F2V(reccmcz), c16); STVF(xbuffer[k], x * c655d35); STVF(ybuffer[k], y * c655d35); STVF(zbuffer[k], z * c655d35); @@ -1830,7 +1840,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb Ciecam02::jch2xyz_ciecam02float(xx, yy, zz, ncie->J_p[i][j], ncie_C_p, ncie->h_p[i][j], xw2, yw2, zw2, - c2, nc2, pow1n, nbbj, ncbj, flj, czj, dj, awj); + c2, nc2, pow1n, nbbj, ncbj, flj, czj, dj, awj, c16); float x = (float)xx * 655.35f; float y = (float)yy * 655.35f; float z = (float)zz * 655.35f; @@ -1878,7 +1888,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb Ciecam02::jch2xyz_ciecam02float(x, y, z, LVF(Jbuffer[k]), LVF(Cbuffer[k]), LVF(hbuffer[k]), F2V(xw2), F2V(yw2), F2V(zw2), - F2V(nc2), F2V(pow1n), F2V(nbbj), F2V(ncbj), F2V(flj), F2V(dj), F2V(awj), F2V(reccmcz)); + F2V(nc2), F2V(pow1n), F2V(nbbj), F2V(ncbj), F2V(flj), F2V(dj), F2V(awj), F2V(reccmcz), c16); x *= c655d35; y *= c655d35; z *= c655d35; @@ -2221,41 +2231,11 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } bool hasColorToning = params->colorToning.enabled && bool (ctOpacityCurve) && bool (ctColorCurve) && params->colorToning.method != "LabGrid"; - bool hasColorToningLabGrid = params->colorToning.enabled && params->colorToning.method == "LabGrid"; +// bool hasColorToningLabGrid = params->colorToning.enabled && params->colorToning.method == "LabGrid"; // float satLimit = float(params->colorToning.satProtectionThreshold)/100.f*0.7f+0.3f; // float satLimitOpacity = 1.f-(float(params->colorToning.saturatedOpacity)/100.f); float strProtect = pow_F((float (params->colorToning.strength) / 100.f), 0.4f); - /* - // Debug output - Color LUTf points - if (ctColorCurve) { - printf("\nColor curve:"); - for (size_t i=0; i<501; i++) { - if (i==0 || i==250 || i==500) - printf("\n(%.1f)[", float(i)/500.f); - printf("%.3f ", ctColorCurve.lutHueCurve[float(i)]); - if (i==0 || i==250 || i==500) - printf("]\n"); - } - printf("\n"); - } - */ - - /* - // Debug output - Opacity LUTf points - if (ctOpacityCurve) { - printf("\nOpacity curve:"); - for (size_t i=0; i<501; i++) { - if (i==0 || i==250 || i==500) - printf("\n(%.1f)[", float(i)/500.f); - printf("%.3f ", ctOpacityCurve.lutOpacityCurve[float(i)]); - if (i==0 || i==250 || i==500) - printf("]\n"); - } - printf("\n"); - } - */ - float RedLow = params->colorToning.redlow / 100.0; float GreenLow = params->colorToning.greenlow / 100.0; float BlueLow = params->colorToning.bluelow / 100.0; @@ -2798,7 +2778,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer //colortoning with shift color XYZ or Lch else if (params->colorToning.method == "Lab" && opautili) { - int algm = 0; + int algo = 0; bool twocol = true;//true=500 color false=2 color int metchrom = 0; @@ -2832,19 +2812,19 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } if (params->colorToning.method == "Lab") { - algm = 1; + algo = 1; } else if (params->colorToning.method == "Lch") { - algm = 2; //in case of + algo = 2; //in case of } - if (algm <= 2) { + if (algo <= 2) { for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { float r = rtemp[ti * TS + tj]; float g = gtemp[ti * TS + tj]; float b = btemp[ti * TS + tj]; float ro, go, bo; - labtoning(r, g, b, ro, go, bo, algm, metchrom, twoc, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, clToningcurve, cl2Toningcurve, iplow, iphigh, wp, wip); + labtoning(r, g, b, ro, go, bo, algo, metchrom, twoc, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, clToningcurve, cl2Toningcurve, iplow, iphigh, wp, wip); setUnlessOOG(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj], ro, go, bo); } } @@ -3204,9 +3184,9 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer Color::RGB2Lab(&rtemp[ti * TS], >emp[ti * TS], &btemp[ti * TS], &(lab->L[i][jstart]), &(lab->a[i][jstart]), &(lab->b[i][jstart]), toxyz, tW - jstart); } - if (hasColorToningLabGrid) { - colorToningLabGrid(lab, jstart, tW, istart, tH, false); - } + // if (hasColorToningLabGrid) { + // colorToningLabGrid(lab, jstart, tW, istart, tH, false); + // } } else { // black & white // Auto channel mixer needs whole image, so we now copy to tmpImage and close the tiled processing for (int i = istart, ti = 0; i < tH; i++, ti++) { @@ -3459,7 +3439,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer //colortoning with shift color Lab else if (params->colorToning.method == "Lab" && opautili) { - int algm = 0; + int algo = 0; bool twocol = true; int metchrom = 0; @@ -3494,12 +3474,12 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } if (params->colorToning.method == "Lab") { - algm = 1; + algo = 1; } else if (params->colorToning.method == "Lch") { - algm = 2; //in case of + algo = 2; //in case of } - if (algm <= 2) { + if (algo <= 2) { #ifdef _OPENMP #pragma omp parallel for schedule(dynamic, 5) #endif @@ -3510,7 +3490,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float g = tmpImage->g(i, j); float b = tmpImage->b(i, j); float ro, bo, go; - labtoning(r, g, b, ro, go, bo, algm, metchrom, twoc, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, clToningcurve, cl2Toningcurve, iplow, iphigh, wp, wip); + labtoning(r, g, b, ro, go, bo, algo, metchrom, twoc, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, clToningcurve, cl2Toningcurve, iplow, iphigh, wp, wip); setUnlessOOG(tmpImage->r(i, j), tmpImage->g(i, j), tmpImage->b(i, j), ro, go, bo); } } @@ -3585,9 +3565,9 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer for (int i = 0; i < tH; i++) { Color::RGB2Lab(tmpImage->r(i), tmpImage->g(i), tmpImage->b(i), lab->L[i], lab->a[i], lab->b[i], toxyz, tW); - if (hasColorToningLabGrid) { - colorToningLabGrid(lab, 0, tW, i, i + 1, false); - } + // if (hasColorToningLabGrid) { + // colorToningLabGrid(lab, 0, tW, i, i + 1, false); + // } } @@ -3610,12 +3590,13 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } // shadowsHighlights(lab); - shadowsHighlights(lab, params->sh.enabled, params->sh.lab,params->sh.highlights ,params->sh.shadows, params->sh.radius, scale, params->sh.htonalwidth, params->sh.stonalwidth); - + // shadowsHighlights(lab, params->sh.enabled, params->sh.lab,params->sh.highlights ,params->sh.shadows, params->sh.radius, scale, params->sh.htonalwidth, params->sh.stonalwidth); +/* if (params->localContrast.enabled) { // Alberto's local contrast localContrast(lab, lab->L, params->localContrast, false, scale); } + */ } /** @@ -4304,36 +4285,17 @@ void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBuffer, int pW const bool avoidColorShift = (params->labCurve.avoidcolorshift || (params->colorappearance.gamut && params->colorappearance.enabled)) && !bwToning ; const float protectRed = (float)settings->protectred; const double protectRedH = settings->protectredh; - float protect_red, protect_redh; - protect_red = protectRed;//default=60 chroma: one can put more or less if necessary...in 'option' 40...160 + const float protect_red = rtengine::LIM(protectRed, 20.f, 180.f); //default=60 chroma: one can put more or less if necessary...in 'option' 40...160 - if (protect_red < 20.0f) { - protect_red = 20.0; // avoid too low value - } + // default=0.4 rad : one can put more or less if necessary...in 'option' 0.2 ..1.0 + // avoid divide by 0 and negatives values + // avoid too big values + const float protect_redh = rtengine::LIM(protectRedH, 0.1f, 1.f); - if (protect_red > 180.0f) { - protect_red = 180.0; // avoid too high value - } - - protect_redh = float (protectRedH); //default=0.4 rad : one can put more or less if necessary...in 'option' 0.2 ..1.0 - - if (protect_redh < 0.1f) { - protect_redh = 0.1f; //avoid divide by 0 and negatives values - } - - if (protect_redh > 1.0f) { - protect_redh = 1.0f; //avoid too big values - } - - float protect_redhcur = protectRedH;//default=0.4 rad : one can put more or less if necessary...in 'option' 0.2 ..1 - - if (protect_redhcur < 0.1f) { - protect_redhcur = 0.1f; //avoid divide by 0 and negatives values:minimal protection for transition - } - - if (protect_redhcur > 3.5f) { - protect_redhcur = 3.5f; //avoid too big values - } + // default=0.4 rad : one can put more or less if necessary...in 'option' 0.2 ..1 + // avoid divide by 0 and negatives values:minimal protection for transition + // avoid too big values + const float protect_redhcurg = rtengine::LIM(protectRedH, 0.1f, 3.5f); //increase saturation after denoise : ...approximation float factnoise = 1.f; @@ -4593,21 +4555,21 @@ void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBuffer, int pW } if (!bwToning) { - float factorskin, factorsat, factorskinext; + float factorskinc, factorsatc, factorskinextc; if (chromapro > 1.f) { float scale = scaleConst;//reduction in normal zone float scaleext = 1.f;//reduction in transition zone Color::scalered(rstprotection, chromapro, 0.0, HH, protect_redh, scale, scaleext); //1.0 float interm = (chromapro - 1.f); - factorskin = 1.f + (interm * scale); - factorskinext = 1.f + (interm * scaleext); + factorskinc = 1.f + (interm * scale); + factorskinextc = 1.f + (interm * scaleext); } else { - factorskin = chromapro ; // +(chromapro)*scale; - factorskinext = chromapro ;// +(chromapro)*scaleext; + factorskinc = chromapro ; // +(chromapro)*scale; + factorskinextc = chromapro ;// +(chromapro)*scaleext; } - factorsat = chromapro * factnoise; + factorsatc = chromapro * factnoise; //simulate very approximative gamut f(L) : with pyramid transition float dred /*=55.f*/;//C red value limit @@ -4627,9 +4589,9 @@ void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBuffer, int pW // end pyramid // Test if chroma is in the normal range first - Color::transitred(HH, Chprov1, dred, factorskin, protect_red, factorskinext, protect_redh, factorsat, factorsat); - atmp *= factorsat; - btmp *= factorsat; + Color::transitred(HH, Chprov1, dred, factorskinc, protect_red, factorskinextc, protect_redh, factorsatc, factorsatc); + atmp *= factorsatc; + btmp *= factorsatc; if (editPipette && editID == EUID_Lab_CLCurve) { editWhatever->v(i, j) = LIM01 (LL / 100.f); // Lab C=f(L) pipette @@ -4768,7 +4730,7 @@ void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBuffer, int pW const float xx = 0.25f; //soft : between 0.2 and 0.4 float skdeltaHH; - skdeltaHH = protect_redhcur; //transition hue + skdeltaHH = protect_redhcurg; //transition hue float skbeg = -0.05f; //begin hue skin float skend = 1.60f; //end hue skin @@ -5169,9 +5131,9 @@ void ImProcFunctions::EPDToneMaplocal(int sp, LabImage *lab, LabImage *tmp1, uns float *L = lab->L[0]; float *a = lab->a[0]; float *b = lab->b[0]; - unsigned int i, N = lab->W * lab->H; + std::size_t N = static_cast(lab->W) * static_cast(lab->H); int WW = lab->W ; -// int HH = lab->H ; + EdgePreservingDecomposition epd(lab->W, lab->H); //Due to the taking of logarithms, L must be nonnegative. Further, scale to 0 to 1 using nominal range of L, 0 to 15 bit. @@ -5181,7 +5143,7 @@ void ImProcFunctions::EPDToneMaplocal(int sp, LabImage *lab, LabImage *tmp1, uns #ifdef _OPENMP #pragma omp parallel for reduction(max:maxL) reduction(min:minL) schedule(dynamic,16) #endif - for (i = 0; i < N; i++) { + for (std::size_t i = 0; i < N; i++) { minL = rtengine::min(minL, L[i]); maxL = rtengine::max(maxL, L[i]); } @@ -5193,14 +5155,14 @@ void ImProcFunctions::EPDToneMaplocal(int sp, LabImage *lab, LabImage *tmp1, uns if (maxL == 0.f) { // avoid division by zero maxL = 1.f; } - + + const float mult = gamm / maxL; #ifdef _OPENMP #pragma omp parallel for #endif - for (i = 0; i < N; i++) + for (std::size_t i = 0; i < N; i++) { - L[i] = (L[i] - minL) / maxL; - L[i] *= gamm; + L[i] = (L[i] - minL) * mult; } //Some interpretations. @@ -5660,14 +5622,8 @@ double ImProcFunctions::getAutoDistor(const Glib::ustring &fname, int thumb_size rawGray = raw->getGrayscaleHistEQ(width); if (!thumbGray || !rawGray) { - if (thumbGray) { - delete thumbGray; - } - - if (rawGray) { - delete rawGray; - } - + delete[] thumbGray; + delete[] rawGray; delete thumb; delete raw; return 0.0; @@ -5680,8 +5636,8 @@ double ImProcFunctions::getAutoDistor(const Glib::ustring &fname, int thumb_size calcDistortion(thumbGray, rawGray, width, h_thumb, 4, dist_amount); } - delete thumbGray; - delete rawGray; + delete[] thumbGray; + delete[] rawGray; delete thumb; delete raw; return dist_amount; @@ -5716,6 +5672,116 @@ void ImProcFunctions::rgb2lab(const Imagefloat &src, LabImage &dst, const Glib:: } } +void ImProcFunctions::rgb2lab(const Image8 &src, int x, int y, int w, int h, float L[], float a[], float b[], const procparams::ColorManagementParams &icm, bool consider_histogram_settings) const +{ // Adapted from ImProcFunctions::lab2rgb + const int src_width = src.getWidth(); + const int src_height = src.getHeight(); + + if (x < 0) { + x = 0; + } + + if (y < 0) { + y = 0; + } + + if (x + w > src_width) { + w = src_width - x; + } + + if (y + h > src_height) { + h = src_height - y; + } + + Glib::ustring profile; + + cmsHPROFILE oprof = nullptr; + + if (settings->HistogramWorking && consider_histogram_settings) { + profile = icm.workingProfile; + } else { + profile = icm.outputProfile; + + if (icm.outputProfile.empty() || icm.outputProfile == ColorManagementParams::NoICMString) { + profile = "sRGB"; + } + oprof = ICCStore::getInstance()->getProfile(profile); + } + + if (oprof) { + cmsUInt32Number flags = cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE; // NOCACHE is important for thread safety + + if (icm.outputBPC) { + flags |= cmsFLAGS_BLACKPOINTCOMPENSATION; + } + + lcmsMutex->lock(); + cmsHPROFILE LabIProf = cmsCreateLab4Profile(nullptr); + cmsHTRANSFORM hTransform = cmsCreateTransform (oprof, TYPE_RGB_8, LabIProf, TYPE_Lab_FLT, icm.outputIntent, flags); + cmsCloseProfile(LabIProf); + lcmsMutex->unlock(); + + // cmsDoTransform is relatively expensive +#ifdef _OPENMP + #pragma omp parallel +#endif + { + AlignedBuffer oBuf(3 * w); + float *outbuffer = oBuf.data; + int condition = y + h; + +#ifdef _OPENMP + #pragma omp for schedule(dynamic,16) +#endif + + for (int i = y; i < condition; i++) { + const int ix = 3 * (x + i * src_width); + int iy = 0; + float* rL = L + (i - y) * w; + float* ra = a + (i - y) * w; + float* rb = b + (i - y) * w; + + cmsDoTransform (hTransform, src.data + ix, outbuffer, w); + + for (int j = 0; j < w; j++) { + rL[j] = outbuffer[iy++] * 327.68f; + ra[j] = outbuffer[iy++] * 327.68f; + rb[j] = outbuffer[iy++] * 327.68f; + } + } + } // End of parallelization + + cmsDeleteTransform(hTransform); + } else { + TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix(profile); + const 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])} + }; + + const int x2 = x + w; + const int y2 = y + h; + constexpr float rgb_factor = 65355.f / 255.f; + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + + for (int i = y; i < y2; i++) { + int offset = (i - y) * w; + for (int j = x; j < x2; j++) { + float X, Y, Z; + // lab2rgb uses gamma2curve, which is gammatab_srgb. + const auto& igamma = Color::igammatab_srgb; + Color::rgbxyz(igamma[rgb_factor * src.r(i, j)], igamma[rgb_factor * src.g(i, j)], igamma[rgb_factor * src.b(i, j)], X, Y, Z, wp); + Color::XYZ2Lab(X, Y, Z, L[offset], a[offset], b[offset]); + offset++; + } + } + } +} + void ImProcFunctions::lab2rgb(const LabImage &src, Imagefloat &dst, const Glib::ustring &workingSpace) { TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix(workingSpace); @@ -5796,7 +5862,7 @@ void ImProcFunctions::colorToningLabGrid(LabImage *lab, int xstart, int xend, in float b_base = params->colorToning.labgridBLow / scaling; #ifdef _OPENMP - #pragma omp parallel for if (multiThread) + #pragma omp parallel for if (MultiThread) #endif for (int y = ystart; y < yend; ++y) { diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 8672c7159..f21e9d7be 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -87,6 +87,7 @@ struct DehazeParams; struct FattalToneMappingParams; struct ColorManagementParams; struct DirPyrDenoiseParams; +struct FilmNegativeParams; struct LocalContrastParams; struct LocallabParams; struct SharpeningParams; @@ -134,13 +135,18 @@ public: TYPE_7X7, TYPE_9X9 }; +enum class BlurType { + OFF, + BOX, + GAUSS +}; double lumimul[3]; explicit ImProcFunctions(const procparams::ProcParams* iparams, bool imultiThread = true) : monitorTransform(nullptr), params(iparams), scale(1), multiThread(imultiThread), lumimul{} {} ~ImProcFunctions(); - bool needsLuminanceOnly() + bool needsLuminanceOnly() const { return !(needsCA() || needsDistortion() || needsRotation() || needsPerspective() || needsLCP() || needsLensfun()) && (needsVignetting() || needsPCVignetting() || needsGradient()); } @@ -148,6 +154,12 @@ public: bool needsTransform(int oW, int oH, int rawRotationDeg, const FramesMetaData *metadata) const; bool needsPCVignetting() const; + + bool filmNegativeProcess(rtengine::Imagefloat *input, rtengine::Imagefloat *output, procparams::FilmNegativeParams &fnp, + const procparams::RAWParams &rawParams, const rtengine::ImageSource* imgsrc, const rtengine::ColorTemp &currWB); + + void filmNegativeProcess(rtengine::Imagefloat *input, rtengine::Imagefloat *output, const procparams::FilmNegativeParams ¶ms); + float calcGradientFactor (const struct grad_params& gp, int x, int y); void firstAnalysis(const Imagefloat* const working, const procparams::ProcParams ¶ms, LUTu & vhist16); void updateColorProfiles(const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck); @@ -174,7 +186,7 @@ public: void moyeqt(Imagefloat* working, float &moyS, float &eqty); void luminanceCurve(LabImage* lold, LabImage* lnew, const LUTf &curve); - void ciecamloc_02float(int sp, LabImage* lab); + void ciecamloc_02float(int sp, LabImage* lab, int call); void ciecam_02float(CieImage* ncie, float adap, int pW, int pwb, LabImage* lab, const procparams::ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3, @@ -237,15 +249,21 @@ public: const LocwavCurve & loclmasCurvecolwav, bool lmasutilicolwav, int level_bl, int level_hl, int level_br, int level_hr, int shortcu, bool delt, const float hueref, const float chromaref, const float lumaref, float maxdE, float mindE, float maxdElim, float mindElim, float iterat, float limscope, int scope, bool fftt, float blu_ma, float cont_ma, int indic); - + + void avoidcolshi(const struct local_params& lp, int sp, LabImage * original, LabImage *transformed, int cy, int cx, int sk); + void deltaEforMask(float **rdE, int bfw, int bfh, LabImage* bufcolorig, const float hueref, const float chromaref, const float lumaref, float maxdE, float mindE, float maxdElim, float mindElim, float iterat, float limscope, int scope, float balance, float balanceh); void discrete_laplacian_threshold(float * data_out, const float * data_in, size_t nx, size_t ny, float t); + void laplacian(const array2D &src, array2D &dst, int bfw, int bfh, float threshold, float ceiling, float factor, bool multiThread); + void detail_mask(const array2D &src, array2D &mask, int bfw, int bfh, float scaling, float threshold, float ceiling, float factor, BlurType blur_type, float blur, bool multithread); + void NLMeans(float **img, int strength, int detail_thresh, int patch, int radius, float gam, int bfw, int bfh, float scale, bool multithread); + void rex_poisson_dct(float * data, size_t nx, size_t ny, double m); void mean_dt(const float * data, size_t size, double& mean_p, double& dt_p); float *cos_table(size_t size); - void normalize_mean_dt(float *data, const float *ref, size_t size, float mod, float sigm); + void normalize_mean_dt(float *data, const float *ref, size_t size, float mod, float sigm, float mdef, float sdef, float mdef2, float sdef2); void retinex_pde(const float *datain, float * dataout, int bfw, int bfh, float thresh, float multy, float *dE, int show, int dEenable, int normalize); void exposure_pde(float *dataor, float *datain, float * dataout, int bfw, int bfh, float thresh, float mod); void fftw_convol_blur(float *input, float *output, int bfw, int bfh, float radius, int fftkern, int algo); @@ -256,16 +274,16 @@ public: const LocCCmaskCurve & locccmasretiCurve, bool lcmasretiutili, const LocLLmaskCurve & locllmasretiCurve, bool llmasretiutili, const LocHHmaskCurve & lochhmasretiCurve, bool lhmasretiutili, int llretiMask, bool retiMasktmap, bool retiMask, float rad, float lap, bool pde, float gamm, float slop, float chro, float blend, const LUTf & lmaskretilocalcurve, bool localmaskretiutili, - LabImage * bufreti, LabImage * bufmask, LabImage * buforig, LabImage * buforigmas, bool multiThread, + LabImage * bufreti, LabImage * bufmask, LabImage * buforig, LabImage * buforigmas, LabImage * bufmaskorigreti, bool multiThread, bool delt, const float hueref, const float chromaref, const float lumaref, float maxdE, float mindE, float maxdElim, float mindElim, float iterat, float limscope, int scope, float balance, float balanceh, float lumask); //3 functions from Alberto Griggio, adapted J.Desmis 2019 - void filmGrain(Imagefloat *rgb, int isogr, int strengr, int scalegr, int bfw, int bfh); - void log_encode(Imagefloat *rgb, const struct local_params & lp, bool multiThread, int bfw, int bfh); - void getAutoLogloc(int sp, ImageSource *imgsrc, float *sourceg, float *blackev, float *whiteev, bool *Autogr, int fw, int fh, float xsta, float xend, float ysta, float yend, int SCALE); + void filmGrain(Imagefloat *rgb, int isogr, int strengr, int scalegr,float divgr, int bfw, int bfh); + void log_encode(Imagefloat *rgb, struct local_params & lp, bool multiThread, int bfw, int bfh); + void getAutoLogloc(int sp, ImageSource *imgsrc, float *sourceg, float *blackev, float *whiteev, bool *Autogr, float *sourceab, int fw, int fh, float xsta, float xend, float ysta, float yend, int SCALE); - void MSRLocal(int call, int sp, bool fftw, int lum, float** reducDE, LabImage * bufreti, LabImage * bufmask, LabImage * buforig, LabImage * buforigmas, float** luminance, const float* const *originalLuminance, + void MSRLocal(int call, int sp, bool fftw, int lum, float** reducDE, LabImage * bufreti, LabImage * bufmask, LabImage * buforig, LabImage * buforigmas, LabImage * bufmaskorigreti, float** luminance, const float* const *originalLuminance, const int width, const int height, int bfwr, int bfhr, const procparams::LocallabParams &loc, const int skip, const LocretigainCurve &locRETgainCcurve, const LocretitransCurve &locRETtransCcurve, const int chrome, const int scall, const float krad, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, const LocCCmaskCurve & locccmasretiCurve, bool lcmasretiutili, const LocLLmaskCurve & locllmasretiCurve, bool llmasretiutili, const LocHHmaskCurve & lochhmasretiCurve, bool lhmasretiutili, int llretiMask, @@ -274,11 +292,12 @@ public: bool delt, const float hueref, const float chromaref, const float lumaref, float maxdE, float mindE, float maxdElim, float mindElim, float iterat, float limscope, int scope, float balance, float balanceh, float lumask); + void mean_sig (const float* const * const savenormL, float &meanf, float &stdf, int xStart, int xEnd, int yStart, int yEnd) const; void calc_ref(int sp, LabImage* original, LabImage* transformed, int cx, int cy, int oW, int oH, int sk, double &huerefblur, double &chromarefblur, double &lumarefblur, double &hueref, double &chromaref, double &lumaref, double &sobelref, float &avg, const LocwavCurve & locwavCurveden, bool locwavdenutili); void copy_ref(LabImage* spotbuffer, LabImage* original, LabImage* transformed, int cx, int cy, int sk, const struct local_params & lp, double &huerefspot, double &chromarefspot, double &lumarefspot); void paste_ref(LabImage* spotbuffer, LabImage* transformed, int cx, int cy, int sk, const struct local_params & lp); - void Lab_Local(int call, int sp, float** shbuffer, LabImage* original, LabImage* transformed, LabImage* reserved, LabImage* lastorig, int cx, int cy, int oW, int oH, int sk, const LocretigainCurve& locRETgainCcurve, const LocretitransCurve &locRETtransCcurve, + void Lab_Local(int call, int sp, float** shbuffer, LabImage* original, LabImage* transformed, LabImage* reserved, LabImage * savenormtm, LabImage * savenormreti, LabImage* lastorig, int cx, int cy, int oW, int oH, int sk, const LocretigainCurve& locRETgainCcurve, const LocretitransCurve &locRETtransCcurve, const LUTf& lllocalcurve, bool locallutili, const LUTf& cllocalcurve, bool localclutili, const LUTf& lclocalcurve, bool locallcutili, @@ -292,9 +311,10 @@ public: const LUTf& lmaskcblocalcurve, bool localmaskcbutili, const LUTf& lmaskbllocalcurve, bool localmaskblutili, const LUTf& lmasklclocalcurve, bool localmasklcutili, + const LUTf& lmaskloglocalcurve, bool localmasklogutili, const LUTf& lmasklocal_curve, bool localmask_utili, - const LocCCmaskCurve& locccmasCurve, bool lcmasutili, const LocLLmaskCurve& locllmasCurve, bool llmasutili, const LocHHmaskCurve& lochhmasCurve, bool lhmasutili, const LocHHmaskCurve& lochhhmasCurve, bool lhhmasutili, + const LocCCmaskCurve& locccmasCurve, bool lcmasutili, const LocLLmaskCurve& locllmasCurve, bool llmasutili, const LocHHmaskCurve& lochhmasCurve, bool lhmasutili, const LocHHmaskCurve& llochhhmasCurve, bool lhhmasutili, const LocCCmaskCurve& locccmasexpCurve, bool lcmasexputili, const LocLLmaskCurve& locllmasexpCurve, bool llmasexputili, const LocHHmaskCurve& lochhmasexpCurve, bool lhmasexputili, const LocCCmaskCurve& locccmasSHCurve, bool lcmasSHutili, const LocLLmaskCurve& locllmasSHCurve, bool llmasSHutili, const LocHHmaskCurve& lochhmasSHCurve, bool lhmasSHutili, const LocCCmaskCurve& locccmasvibCurve, bool lcmasvibutili, const LocLLmaskCurve& locllmasvibCurve, bool llmasvibutili, const LocHHmaskCurve& lochhmasvibCurve, bool lhmasvibutili, @@ -303,6 +323,7 @@ public: const LocCCmaskCurve& locccmastmCurve, bool lcmastmutili, const LocLLmaskCurve& locllmastmCurve, bool llmastmutili, const LocHHmaskCurve& lochhmastmCurve, bool lhmastmutili, const LocCCmaskCurve& locccmasblCurve, bool lcmasblutili, const LocLLmaskCurve& locllmasblCurve, bool llmasblutili, const LocHHmaskCurve& lochhmasblCurve, bool lhmasblutili, const LocCCmaskCurve& locccmaslcCurve, bool lcmaslcutili, const LocLLmaskCurve& locllmaslcCurve, bool llmaslcutili, const LocHHmaskCurve& lochhmaslcCurve, bool lhmaslcutili, + const LocCCmaskCurve& locccmaslogCurve, bool lcmaslogutili, const LocLLmaskCurve& locllmaslogCurve, bool llmaslogutili, const LocHHmaskCurve& lochhmaslogCurve, bool lhmaslogutili, const LocCCmaskCurve& locccmas_Curve, bool lcmas_utili, const LocLLmaskCurve& locllmas_Curve, bool llmas_utili, const LocHHmaskCurve& lochhmas_Curve, bool lhmas_utili, const LocHHmaskCurve& lochhhmas_Curve, bool lhhmas_utili, @@ -313,19 +334,21 @@ public: const LocwavCurve& locconwavCurve, bool locconwavutili, const LocwavCurve& loccompwavCurve, bool loccompwavutili, const LocwavCurve& loccomprewavCurve, bool loccomprewavutili, + const LocwavCurve& locwavCurvehue, bool locwavhueutili, const LocwavCurve& locwavCurveden, bool locwavdenutili, const LocwavCurve& locedgwavCurve, bool locedgwavutili, const LocwavCurve& loclmasCurve_wav, bool lmasutili_wav, bool LHutili, bool HHutili, bool CHutili, const LUTf& cclocalcurve, bool localcutili, const LUTf& rgblocalcurve, bool localrgbutili, bool localexutili, const LUTf& exlocalcurve, const LUTf& hltonecurveloc, const LUTf& shtonecurveloc, const LUTf& tonecurveloc, const LUTf& lightCurveloc, double& huerefblur, double &chromarefblur, double& lumarefblur, double &hueref, double &chromaref, double &lumaref, double &sobelref, int &lastsav, - bool prevDeltaE, int llColorMask, int llColorMaskinv, int llExpMask, int llExpMaskinv, int llSHMask, int llSHMaskinv, int llvibMask, int lllcMask, int llsharMask, int llcbMask, int llretiMask, int llsoftMask, int lltmMask, int llblMask, int ll_Mask, - float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax); + bool prevDeltaE, int llColorMask, int llColorMaskinv, int llExpMask, int llExpMaskinv, int llSHMask, int llSHMaskinv, int llvibMask, int lllcMask, int llsharMask, int llcbMask, int llretiMask, int llsoftMask, int lltmMask, int llblMask, int lllogMask, int ll_Mask, + float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, + float& meantm, float& stdtm, float& meanreti, float& stdreti); void addGaNoise(LabImage *lab, LabImage *dst, const float mean, const float variance, const int sk); void BlurNoise_Localold(int call, const struct local_params& lp, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy); - void InverseBlurNoise_Local(LabImage * originalmask, float **bufchro, const struct local_params& lp, const float hueref, const float chromaref, const float lumaref, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy, int sk); + void InverseBlurNoise_Local(LabImage * originalmask, const struct local_params& lp, const float hueref, const float chromaref, const float lumaref, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy, int sk); void InverseReti_Local(const struct local_params& lp, const float hueref, const float chromaref, const float lumaref, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy, int chro, int sk); - void BlurNoise_Local(LabImage* tmp1, LabImage * originalmask, float **bufchro, const float hueref, const float chromaref, const float lumaref, local_params& lp, LabImage* original, LabImage* transformed, int cx, int cy, int sk); + void BlurNoise_Local(LabImage* tmp1, LabImage * originalmask, const float hueref, const float chromaref, const float lumaref, local_params& lp, LabImage* original, LabImage* transformed, int cx, int cy, int sk); static void strcurv_data(std::string retistr, int *s_datc, int &siz); void blendstruc(int bfw, int bfh, LabImage* bufcolorig, float radius, float stru, array2D & blend2, int sk, bool multiThread); @@ -335,7 +358,7 @@ public: const LocwavCurve & loccompwavCurve, bool loccompwavutili, bool wavcurvecomp, const LocwavCurve & loccomprewavCurve, bool loccomprewavutili, bool wavcurvecompre, const LocwavCurve & locedgwavCurve, bool locedgwavutili, - float sigm, float offs,int & maxlvl, float fatdet, float fatanch, float chromalev, float chromablu, bool blurlc, bool blurena, bool levelena, bool comprena, bool compreena, float compress, float thres); + float sigm, float offs,int & maxlvl, float sigmadc, float deltad, float chromalev, float chromablu, bool blurlc, bool blurena, bool levelena, bool comprena, bool compreena, float compress, float thres); void wavcont(const struct local_params& lp, float ** tmp, wavelet_decomposition &wdspot, int level_bl, int maxlvl, const LocwavCurve & loclevwavCurve, bool loclevwavutili, @@ -346,18 +369,20 @@ public: void wavcbd(wavelet_decomposition &wdspot, int level_bl, int maxlvl, const LocwavCurve& locconwavCurve, bool locconwavutili, float sigm, float offs, float chromalev, int sk); - void transit_shapedetect2(int call, int senstype, const LabImage * bufexporig, const LabImage * bufexpfin, LabImage * originalmask, const float hueref, const float chromaref, const float lumaref, float sobelref, float meansobel, float ** blend2, struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk); + void transit_shapedetect2(int sp, float meantm, float stdtm, int call, int senstype, const LabImage * bufexporig, const LabImage * bufexpfin, LabImage * originalmask, const float hueref, const float chromaref, const float lumaref, float sobelref, float meansobel, float ** blend2, struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk); - void transit_shapedetect_retinex(int call, int senstype, LabImage * bufexporig, LabImage * bufmask, LabImage * buforigmas, float **buflight, float **bufchro, const float hueref, const float chromaref, const float lumaref, const struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk); + void transit_shapedetect_retinex(int call, int senstype, LabImage * bufexporig, LabImage * bufexpfin, LabImage * bufmask, LabImage * buforigmas, float **buflight, float **bufchro, const float hueref, const float chromaref, const float lumaref, struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk); void transit_shapedetect(int senstype, const LabImage *bufexporig, LabImage * originalmask, float **bufchro, bool HHutili, const float hueref, const float chromaref, const float lumaref, float sobelref, float meansobel, float ** blend2, const struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk); - void exlabLocal(local_params& lp, int bfh, int bfw, int bfhr, int bfwr, LabImage* bufexporig, LabImage* lab, const LUTf& hltonecurve, const LUTf& shtonecurve, const LUTf& tonecurve, const float hueref, const float lumaref, const float chromaref); + void exlabLocal(local_params& lp, float strlap, int bfh, int bfw, int bfhr, int bfwr, LabImage* bufexporig, LabImage* lab, const LUTf& hltonecurve, const LUTf& shtonecurve, const LUTf& tonecurve, const float hueref, const float lumaref, const float chromaref); void Exclude_Local(float **deltaso, float hueref, float chromaref, float lumaref, float sobelref, float meansobel, const struct local_params & lp, const LabImage * original, LabImage * transformed, const LabImage * rsv, const LabImage * reserv, int cx, int cy, int sk); void DeNoise_Local(int call, const struct local_params& lp, LabImage* originalmask, int levred, float hueref, float lumaref, float chromaref, LabImage* original, LabImage* transformed, const LabImage &tmp1, int cx, int cy, int sk); - void DeNoise(int call, int del, float * slidL, float * slida, float * slidb, int aut, bool noiscfactiv, const struct local_params& lp, LabImage* originalmaskbl, int levred, float huerefblur, float lumarefblur, float chromarefblur, LabImage* original, LabImage* transformed, int cx, int cy, int sk); + void DeNoise_Local2(const struct local_params& lp, LabImage* originalmask, int levred, float hueref, float lumaref, float chromaref, LabImage* original, LabImage* transformed, const LabImage &tmp1, int cx, int cy, int sk); + + void DeNoise(int call, float * slidL, float * slida, float * slidb, int aut, bool noiscfactiv, const struct local_params& lp, LabImage* originalmaskbl, LabImage * bufmaskblurbl, int levred, float huerefblur, float lumarefblur, float chromarefblur, LabImage* original, LabImage* transformed, int cx, int cy, int sk, const LocwavCurve& locwavCurvehue, bool locwavhueutili); - void fftw_denoise(int GW, int GH, int max_numblox_W, int min_numblox_W, float **tmp1, array2D *Lin, int numThreads, const struct local_params & lp, int chrom); + void fftw_denoise(int sk, int GW, int GH, int max_numblox_W, int min_numblox_W, float **tmp1, array2D *Lin, int numThreads, const struct local_params & lp, int chrom); void ColorLight_Local(float moddE, float powdE, int call, LabImage * bufcolorig, LabImage * originalmask, float **buflight, float **bufchro, float **bufchroslid, float ** bufhh, float ** buflightslid, bool &LHutili, bool &HHutili, const float hueplus, const float huemoins, const float hueref, const float dhue, const float chromaref, const float lumaref, float sobelref, float ** blend2, LUTf & lllocalcurve, const LocLHCurve & loclhCurve, const LocHHCurve & lochhCurve, LUTf & lightCurveloc, const local_params& lp, LabImage* original, LabImage* transformed, int cx, int cy, int sk); void InverseColorLight_Local(bool tonequ, bool tonecurv, int sp, int senstype, struct local_params& lp, LabImage * originalmask, const LUTf& lightCurveloc, const LUTf& hltonecurveloc, const LUTf& shtonecurveloc, const LUTf& tonecurveloc, const LUTf& exlocalcurve, const LUTf& cclocalcurve, float adjustr, bool localcutili, const LUTf& lllocalcurve, bool locallutili, LabImage* original, LabImage* transformed, int cx, int cy, const float hueref, const float chromaref, const float lumaref, int sk); @@ -448,6 +473,7 @@ public: void labColorCorrectionRegions(LabImage *lab); Image8* lab2rgb(LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool consider_histogram_settings = true); + void rgb2lab(const Image8 &src, int x, int y, int w, int h, float L[], float a[], float b[], const procparams::ColorManagementParams &icm, bool consider_histogram_settings = true) const; Imagefloat* lab2rgbOut(LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm); // CieImage *ciec; void workingtrc(const Imagefloat* src, Imagefloat* dst, int cw, int ch, int mul, const Glib::ustring &profile, double gampos, double slpos, cmsHTRANSFORM &transform, bool normalizeIn = true, bool normalizeOut = true, bool keepTransForm = false) const; diff --git a/rtengine/impulse_denoise.cc b/rtengine/impulse_denoise.cc index 20229e714..8e1143c09 100644 --- a/rtengine/impulse_denoise.cc +++ b/rtengine/impulse_denoise.cc @@ -322,7 +322,7 @@ void ImProcFunctions::impulse_nrcam (CieImage* ncie, double thresh, float **buff hfnbrave += fabs(ncie->sh_p[i1][j1] - lpf[i1][j1]); } - impish[i][j] = (hpfabs > ((hfnbrave - hpfabs) * impthrDiv24)); + impish[i][j] = static_cast(hpfabs > ((hfnbrave - hpfabs) * impthrDiv24)); } #ifdef __SSE2__ @@ -353,7 +353,7 @@ void ImProcFunctions::impulse_nrcam (CieImage* ncie, double thresh, float **buff hfnbrave += fabs(ncie->sh_p[i1][j1] - lpf[i1][j1]); } - impish[i][j] = (hpfabs > ((hfnbrave - hpfabs) * impthrDiv24)); + impish[i][j] = static_cast(hpfabs > ((hfnbrave - hpfabs) * impthrDiv24)); } for (; j < width; j++) { @@ -365,7 +365,7 @@ void ImProcFunctions::impulse_nrcam (CieImage* ncie, double thresh, float **buff hfnbrave += fabs(ncie->sh_p[i1][j1] - lpf[i1][j1]); } - impish[i][j] = (hpfabs > ((hfnbrave - hpfabs) * impthrDiv24)); + impish[i][j] = static_cast(hpfabs > ((hfnbrave - hpfabs) * impthrDiv24)); } } } diff --git a/rtengine/ipdehaze.cc b/rtengine/ipdehaze.cc index 6526d0d1e..6ae8be27b 100644 --- a/rtengine/ipdehaze.cc +++ b/rtengine/ipdehaze.cc @@ -313,10 +313,6 @@ void ImProcFunctions::dehaze(Imagefloat *img, const DehazeParams &dehazeParams) const int H = img->getHeight(); const float strength = LIM01(float(dehazeParams.strength) / 100.f * 0.9f); - if (settings->verbose) { - std::cout << "dehaze: strength = " << strength << std::endl; - } - array2D dark(W, H); int patchsize = max(int(5 / scale), 2); @@ -384,14 +380,15 @@ void ImProcFunctions::dehaze(Imagefloat *img, const DehazeParams &dehazeParams) const float depth = -float(dehazeParams.depth) / 100.f; const float t0 = max(1e-3f, std::exp(depth * maxDistance)); - const float teps = 1e-3f; + constexpr float teps = 1.f + 1e-3f; - const bool luminance = dehazeParams.luminance; + const float satBlend = dehazeParams.saturation / 100.f; const TMatrix ws = ICCStore::getInstance()->workingSpaceMatrix(params->icm.workingProfile); #ifdef __SSE2__ const vfloat wsv[3] = {F2V(ws[1][0]), F2V(ws[1][1]),F2V(ws[1][2])}; #endif const float ambientY = Color::rgbLuminance(ambient[0], ambient[1], ambient[2], ws); + #ifdef _OPENMP #pragma omp parallel for if (multiThread) #endif @@ -407,30 +404,27 @@ void ImProcFunctions::dehaze(Imagefloat *img, const DehazeParams &dehazeParams) const vfloat t0v = F2V(t0); const vfloat tepsv = F2V(teps); const vfloat cmaxChannelv = F2V(maxChannel); + const vfloat satBlendv = F2V(satBlend); for (; x < W - 3; x += 4) { // ensure that the transmission is such that to avoid clipping... const vfloat r = LVFU(img->r(y, x)); const vfloat g = LVFU(img->g(y, x)); const vfloat b = LVFU(img->b(y, x)); // ... t >= tl to avoid negative values - const vfloat tlv = onev - vminf(r / ambient0v, vminf(g / ambient1v, b / ambient2v)); - const vfloat mtv = vmaxf(LVFU(dark[y][x]), vmaxf(tlv + tepsv, t0v)); + const vfloat tlv = tepsv - vminf(r / ambient0v, vminf(g / ambient1v, b / ambient2v)); + const vfloat mtv = vmaxf(LVFU(dark[y][x]), vmaxf(tlv, t0v)); if (dehazeParams.showDepthMap) { const vfloat valv = vclampf(onev - mtv, ZEROV, onev) * cmaxChannelv; STVFU(img->r(y, x), valv); STVFU(img->g(y, x), valv); STVFU(img->b(y, x), valv); - } else if (luminance) { + } else { const vfloat Yv = Color::rgbLuminance(r, g, b, wsv); const vfloat YYv = (Yv - ambientYv) / mtv + ambientYv; const vfloat fv = vself(vmaskf_gt(Yv, epsYv), cmaxChannelv * YYv / Yv, cmaxChannelv); - STVFU(img->r(y, x), r * fv); - STVFU(img->g(y, x), g * fv); - STVFU(img->b(y, x), b * fv); - } else { - STVFU(img->r(y, x), ((r - ambient0v) / mtv + ambient0v) * cmaxChannelv); - STVFU(img->g(y, x), ((g - ambient1v) / mtv + ambient1v) * cmaxChannelv); - STVFU(img->b(y, x), ((b - ambient2v) / mtv + ambient2v) * cmaxChannelv); + STVFU(img->r(y, x), vintpf(satBlendv, ((r - ambient0v) / mtv + ambient0v) * cmaxChannelv, r * fv)); + STVFU(img->g(y, x), vintpf(satBlendv, ((g - ambient1v) / mtv + ambient1v) * cmaxChannelv, g * fv)); + STVFU(img->b(y, x), vintpf(satBlendv, ((b - ambient2v) / mtv + ambient2v) * cmaxChannelv, b * fv)); } } #endif @@ -440,39 +434,31 @@ void ImProcFunctions::dehaze(Imagefloat *img, const DehazeParams &dehazeParams) const float g = img->g(y, x); const float b = img->b(y, x); // ... t >= tl to avoid negative values - const float tl = 1.f - min(r / ambient[0], g / ambient[1], b / ambient[2]); - const float mt = max(dark[y][x], t0, tl + teps); + const float tl = teps - min(r / ambient[0], g / ambient[1], b / ambient[2]); + const float mt = max(dark[y][x], t0, tl); if (dehazeParams.showDepthMap) { img->r(y, x) = img->g(y, x) = img->b(y, x) = LIM01(1.f - mt) * maxChannel; - } else if (luminance) { + } else { const float Y = Color::rgbLuminance(img->r(y, x), img->g(y, x), img->b(y, x), ws); const float YY = (Y - ambientY) / mt + ambientY; const float f = Y > 1e-5f ? maxChannel * YY / Y : maxChannel; - img->r(y, x) *= f; - img->g(y, x) *= f; - img->b(y, x) *= f; - } else { - img->r(y, x) = ((r - ambient[0]) / mt + ambient[0]) * maxChannel; - img->g(y, x) = ((g - ambient[1]) / mt + ambient[1]) * maxChannel; - img->b(y, x) = ((b - ambient[2]) / mt + ambient[2]) * maxChannel; + img->r(y, x) = intp(satBlend, ((r - ambient[0]) / mt + ambient[0]) * maxChannel, r * f); + img->g(y, x) = intp(satBlend, ((g - ambient[1]) / mt + ambient[1]) * maxChannel, g * f); + img->b(y, x) = intp(satBlend, ((b - ambient[2]) / mt + ambient[2]) * maxChannel, b * f); } } } } - - void ImProcFunctions::dehazeloc(Imagefloat *img, const DehazeParams &dehazeParams) { //J.Desmis 12 2019 - this version derived from ART, is slower than the main from maximum 10% - probably use of SSE //Probably Ingo could solved this problem in some times - BENCHFUN + if (!dehazeParams.enabled || dehazeParams.strength == 0.0) { return; } - - const float maxChannel = normalize(img, multiThread); const int W = img->getWidth(); @@ -480,10 +466,6 @@ void ImProcFunctions::dehazeloc(Imagefloat *img, const DehazeParams &dehazeParam const float strength = LIM01(float(std::abs(dehazeParams.strength)) / 100.f * 0.9f); const bool add_haze = dehazeParams.strength < 0; - if (settings->verbose) { - std::cout << "dehaze: strength = " << strength << std::endl; - } - array2D dark(W, H); int patchsize = max(int(5 / scale), 2); @@ -553,10 +535,11 @@ void ImProcFunctions::dehazeloc(Imagefloat *img, const DehazeParams &dehazeParam } const float depth = -float(dehazeParams.depth) / 100.f; - const float teps = 1e-6f; + constexpr float teps = 1e-6f; const float t0 = max(teps, std::exp(depth * maxDistance)); - const bool luminance = dehazeParams.luminance; + const float satBlend = dehazeParams.saturation / 100.f; + const TMatrix ws = ICCStore::getInstance()->workingSpaceMatrix(params->icm.workingProfile); const float ambientY = Color::rgbLuminance(ambient[0], ambient[1], ambient[2], ws); @@ -565,56 +548,43 @@ void ImProcFunctions::dehazeloc(Imagefloat *img, const DehazeParams &dehazeParam #endif for (int y = 0; y < H; ++y) { - int x = 0; - for (; x < W; ++x) { + for (int x = 0; x < W; ++x) { // ensure that the transmission is such that to avoid clipping... - float rgb[3] = { img->r(y, x), img->g(y, x), img->b(y, x) }; + const float rIn = img->r(y, x); + const float gIn = img->g(y, x); + const float bIn = img->b(y, x); // ... t >= tl to avoid negative values - float tl = 1.f - min(rgb[0] / ambient[0], rgb[1] / ambient[1], rgb[2] / ambient[2]); - // // ... t >= tu to avoid values > 1 - // float tu = t0 - teps; - // for (int c = 0; c < 3; ++c) { - // if (ambient[c] < 1) { - // tu = max(tu, (rgb[c] - ambient[c])/(1.f - ambient[c])); - // } - // } - float &ir = img->r(y, x); - float &ig = img->g(y, x); - float &ib = img->b(y, x); - const float mt = max(dark[y][x], t0, tl + teps); + const float tl = 1.f + teps - min(rIn / ambient[0], gIn / ambient[1], bIn / ambient[2]); + const float mt = max(dark[y][x], t0, tl); if (dehazeParams.showDepthMap) { img->r(y, x) = img->g(y, x) = img->b(y, x) = LIM01(1.f - mt) * maxChannel; - } else if (luminance) { - float Y = Color::rgbLuminance(img->r(y, x), img->g(y, x), img->b(y, x), ws); - float YY = (Y - ambientY) / mt + ambientY; - + } else { + float f = 1.f; + const float Y = Color::rgbLuminance(rIn, gIn, bIn, ws); if (Y > 1e-5f) { + float YY = (Y - ambientY) / mt + ambientY; if (add_haze) { YY = Y + Y - YY; } - - float f = YY / Y; - ir = rgb[0] * f; - ig = rgb[1] * f; - ib = rgb[2] * f; - + f = YY / Y; } - } else { - float r = ((rgb[0] - ambient[0]) / mt + ambient[0]); - float g = ((rgb[1] - ambient[1]) / mt + ambient[1]); - float b = ((rgb[2] - ambient[2]) / mt + ambient[2]); + const float r1 = rIn * f; + const float g1 = gIn * f; + const float b1 = bIn * f; + + float r2 = ((rIn - ambient[0]) / mt + ambient[0]); + float g2 = ((gIn - ambient[1]) / mt + ambient[1]); + float b2 = ((bIn - ambient[2]) / mt + ambient[2]); if (add_haze) { - ir += (ir - r); - ig += (ig - g); - ib += (ib - b); - } else { - ir = r; - ig = g; - ib = b; + r2 = rIn + rIn - r2; + g2 = gIn + gIn - g2; + b2 = bIn + bIn - b2; } - + img->r(y, x) = intp(satBlend, r2, r1); + img->g(y, x) = intp(satBlend, g2, g1); + img->b(y, x) = intp(satBlend, b2, b1); } } } diff --git a/rtengine/ipgrain.cc b/rtengine/ipgrain.cc index b9079606a..d03a3ba33 100644 --- a/rtengine/ipgrain.cc +++ b/rtengine/ipgrain.cc @@ -24,6 +24,7 @@ /* This file is part of darktable, copyright (c) 2010-2012 Henrik Andersson. + adaptation to Rawtherapee 2021 Jacques Desmis jdesmis@gmail.com darktable is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -88,7 +89,7 @@ const int permutation[] class GrainEvaluator { public: - GrainEvaluator(int offset_x, int offset_y, int full_width, int full_height, double scale): + GrainEvaluator(int offset_x, int offset_y, int full_width, int full_height, double scale, float divgr): ox(offset_x), oy(offset_y), fw(full_width), @@ -96,18 +97,18 @@ public: scale(scale) { simplex_noise_init(); - constexpr float mb = 100.f; - evaluate_grain_lut(mb); + constexpr float mb = 100.f;// * divgr; + evaluate_grain_lut(mb, divgr); } - void operator()(int isogr, int strengr, int scalegr, Imagefloat *lab, bool multithread) + void operator()(int isogr, int strengr, int scalegr, float divgr, Imagefloat *lab, bool multithread) { const double strength = (strengr / 100.0); - const double octaves = 3; + const double octaves = 3.; const double wd = std::min(fw, fh); const double zoom = (1.0 + 8 * (double(isogr) / GRAIN_SCALE_FACTOR) / 100.0) / 800.0; const double s = std::max(scale / 3.0, 1.0) / (double(std::max(scalegr, 1)) / 100.0); - + // printf("s=%f \n", s); const int W = lab->getWidth(); const int H = lab->getHeight(); float **lab_L = lab->g.ptrs; @@ -298,29 +299,38 @@ private: return total; } - float paper_resp(float exposure, float mb, float gp) - { - const float delta = GRAIN_LUT_DELTA_MAX * expf((mb / 100.0f) * logf(GRAIN_LUT_DELTA_MIN)); + float paper_resp(float exposure, float mb, float gp, float divgr) + { + float dived = 1.f; + if(divgr > 1.8f) { + dived = 1.f + (divgr - 1.8f); + } + const float delta = dived * GRAIN_LUT_DELTA_MAX * expf((mb / 100.0f) * logf(GRAIN_LUT_DELTA_MIN / dived)); const float density = (1.0f + 2.0f * delta) / (1.0f + expf( (4.0f * gp * (0.5f - exposure)) / (1.0f + 2.0f * delta) )) - delta; return density; } - float paper_resp_inverse(float density, float mb, float gp) + float paper_resp_inverse(float density, float mb, float gp, float divgr) { - const float delta = GRAIN_LUT_DELTA_MAX * expf((mb / 100.0f) * logf(GRAIN_LUT_DELTA_MIN)); + float dived = 1.f; + if(divgr > 1.8f) { + dived = 1.f + (divgr - 1.8f); + } + const float delta = dived * GRAIN_LUT_DELTA_MAX * expf((mb / 100.0f) * logf(GRAIN_LUT_DELTA_MIN / dived)); const float exposure = -logf((1.0f + 2.0f * delta) / (density + delta) - 1.0f) * (1.0f + 2.0f * delta) / (4.0f * gp) + 0.5f; return exposure; } - void evaluate_grain_lut(const float mb) + void evaluate_grain_lut(const float mb, float divgr) { for(int i = 0; i < GRAIN_LUT_SIZE; i++) { for(int j = 0; j < GRAIN_LUT_SIZE; j++) { - const float gu = (float)i / (GRAIN_LUT_SIZE - 1) - 0.5; - const float l = (float)j / (GRAIN_LUT_SIZE - 1); - grain_lut[j * GRAIN_LUT_SIZE + i] = 32768.f * (paper_resp(gu + paper_resp_inverse(l, mb, GRAIN_LUT_PAPER_GAMMA), mb, GRAIN_LUT_PAPER_GAMMA) - l); + float gu = (float)i / (GRAIN_LUT_SIZE - 1) - 0.5; + float l = (float)j / (GRAIN_LUT_SIZE - 1); + float divg = divgr; //1.f + grain_lut[j * GRAIN_LUT_SIZE + i] = 32768.f * (paper_resp(gu + paper_resp_inverse(l, mb, divg * GRAIN_LUT_PAPER_GAMMA, divgr), mb, divg * GRAIN_LUT_PAPER_GAMMA, divgr) - l); } } } @@ -361,11 +371,14 @@ private: } // namespace -void ImProcFunctions::filmGrain(Imagefloat *rgb, int isogr, int strengr, int scalegr, int bfw, int bfh) +void ImProcFunctions::filmGrain(Imagefloat *rgb, int isogr, int strengr, int scalegr, float divgr, int bfw, int bfh) { + if (settings->verbose) { + printf("iso=%i strength=%i scale=%i gamma=%f\n", isogr, strengr, scalegr, divgr); + } - GrainEvaluator ge(0, 0, bfw, bfh, scale); - ge(isogr, strengr, scalegr, rgb, multiThread); + GrainEvaluator ge(0, 0, bfw, bfh, scale, divgr); + ge(isogr, strengr, scalegr, divgr, rgb, multiThread); } } // namespace rtengine diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index af7c454a3..81a304fd3 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -32,8 +32,6 @@ namespace rtengine { -extern void filmlike_clip(float *r, float *g, float *b); - namespace { inline void copyAndClampLine(const float *src, unsigned char *dst, const int W) @@ -46,9 +44,26 @@ inline void copyAndClampLine(const float *src, unsigned char *dst, const int W) inline void copyAndClamp(const LabImage *src, unsigned char *dst, const double rgb_xyz[3][3], bool multiThread) { - int W = src->W; - int H = src->H; + const int W = src->W; + const int H = src->H; + float rgb_xyzf[3][3]; + + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 3; j++) { + rgb_xyzf[i][j] = rgb_xyz[i][j]; + } + } + +#ifdef __SSE2__ + vfloat rgb_xyzv[3][3]; + + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 3; j++) { + rgb_xyzv[i][j] = F2V(rgb_xyzf[i][j]); + } + } +#endif #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread) #endif @@ -58,17 +73,48 @@ inline void copyAndClamp(const LabImage *src, unsigned char *dst, const double r float* rb = src->b[i]; int ix = i * 3 * W; - float R, G, B; - float x_, y_, z_; - - for (int j = 0; j < W; ++j) { +#ifdef __SSE2__ + float rbuffer[W] ALIGNED16; + float gbuffer[W] ALIGNED16; + float bbuffer[W] ALIGNED16; + int j = 0; + for (; j < W - 3; j += 4) { + vfloat R, G, B; + vfloat x_, y_, z_; + Color::Lab2XYZ(LVFU(rL[j]), LVFU(ra[j]), LVFU(rb[j]), x_, y_, z_ ); + Color::xyz2rgb(x_, y_, z_, R, G, B, rgb_xyzv); + STVF(rbuffer[j], Color::gamma2curve[R]); + STVF(gbuffer[j], Color::gamma2curve[G]); + STVF(bbuffer[j], Color::gamma2curve[B]); + } + for (; j < W; ++j) { + float R, G, B; + float x_, y_, z_; Color::Lab2XYZ(rL[j], ra[j], rb[j], x_, y_, z_ ); - Color::xyz2rgb(x_, y_, z_, R, G, B, rgb_xyz); + Color::xyz2rgb(x_, y_, z_, R, G, B, rgb_xyzf); + rbuffer[j] = Color::gamma2curve[R]; + gbuffer[j] = Color::gamma2curve[G]; + bbuffer[j] = Color::gamma2curve[B]; + } + + for (j = 0; j < W; ++j) { + dst[ix++] = uint16ToUint8Rounded(rbuffer[j]); + dst[ix++] = uint16ToUint8Rounded(gbuffer[j]); + dst[ix++] = uint16ToUint8Rounded(bbuffer[j]); + } + +#else + for (int j = 0; j < W; ++j) { + float R, G, B; + float x_, y_, z_; + Color::Lab2XYZ(rL[j], ra[j], rb[j], x_, y_, z_ ); + Color::xyz2rgb(x_, y_, z_, R, G, B, rgb_xyzf); dst[ix++] = uint16ToUint8Rounded(Color::gamma2curve[R]); dst[ix++] = uint16ToUint8Rounded(Color::gamma2curve[G]); dst[ix++] = uint16ToUint8Rounded(Color::gamma2curve[B]); } +#endif } } @@ -151,8 +197,6 @@ void ImProcFunctions::lab2monitorRgb(LabImage* lab, Image8* image) // otherwise divide by 327.68, convert to xyz and apply the RGB transform, before converting with gamma2curve Image8* ImProcFunctions::lab2rgb(LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool consider_histogram_settings) { - //gamutmap(lab); - if (cx < 0) { cx = 0; } diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index bfa148304..7ff84b632 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -36,7 +36,6 @@ #include "rt_algo.h" #include "settings.h" #include "../rtgui/options.h" - #include "utils.h" #ifdef _OPENMP #include @@ -50,10 +49,12 @@ #define BENCHMARK #include "StopWatch.h" #include "guidedfilter.h" - +#include "boxblur.h" +#include "rescale.h" #pragma GCC diagnostic warning "-Wall" #pragma GCC diagnostic warning "-Wextra" +#pragma GCC diagnostic warning "-Wdouble-promotion" namespace { @@ -150,6 +151,26 @@ constexpr float exclusion(float a, float b) return a + b - 2.f * a * b; } +void calcdif(float lmr, float &lmrc) +{ //approximative change between gamma sRGB g=2.4 s=12.92 and gamma LAB g=3.0 s=9.03 + //useful to calculate action with dark and light area mask + //differences in 3 parts linear...very small diffrences with real... + float a0 = 7.6f / 11.6f;//11.6 sRGB - 7.6 Lab...11.6 max difference + float a01 = 62.f - 7.6f; //60 sRGB 62 Lab 60 max difference + float a11 = 60.f - 11.6f; + float a1 = a01 / a11; + float b1 = 62.f - a1 * 60.f; + float a2 = (100.f - 62.f) / (100.f - 60.f); + float b2 = 100.f - a2 * 100.f; + if(lmr < 11.6f) { + lmrc = a0 * lmr; + } else if (lmr < 60.f) { + lmrc = a1 * lmr + b1; + } else { + lmrc = a2 * lmr + b2; + } +} + void calcGammaLut(double gamma, double ts, LUTf &gammaLut) { double pwr = 1.0 / gamma; @@ -251,6 +272,8 @@ float calcreducdE(float dE, float maxdE, float mindE, float maxdElim, float mind } } + + void deltaEforLaplace(float *dE, const float lap, int bfw, int bfh, rtengine::LabImage* bufexporig, const float hueref, const float chromaref, const float lumaref) { @@ -276,14 +299,16 @@ void deltaEforLaplace(float *dE, const float lap, int bfw, int bfh, rtengine::La } const float ade = 1.f / (maxdE - maxC); - const float bde = -ade * maxC; + // const float bde = -ade * maxC; #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) #endif for (int y = 0; y < bfh; y++) { for (int x = 0; x < bfw; x++) { - dE[y * bfw + x] = dE[y * bfw + x] >= maxdE ? ade * dE[y * bfw + x] + bde : 1.f; + // dE[y * bfw + x] = dE[y * bfw + x] >= maxdE ? ade * dE[y * bfw + x] + bde : 1.f; + dE[y * bfw + x] = dE[y * bfw + x] >= maxdE ? ade * (dE[y * bfw + x] - maxC) : 1.f; + } } } @@ -367,6 +392,29 @@ void SobelCannyLuma(float **sobelL, float **luma, int bfw, int bfh, float radius } } +float igammalog(float x, float p, float s, float g2, float g4) +{ + return x <= g2 ? x / s : pow_F((x + g4) / (1.f + g4), p);//continuous +} + +#ifdef __SSE2__ +vfloat igammalog(vfloat x, vfloat p, vfloat s, vfloat g2, vfloat g4) +{ + return x <= g2 ? x / s : pow_F((x + g4) / (1.f + g4), p);//continuous +} +#endif + +float gammalog(float x, float p, float s, float g3, float g4) +{ + return x <= g3 ? x * s : (1.f + g4) * xexpf(xlogf(x) / p) - g4;//continuous +} + +#ifdef __SSE2__ +vfloat gammalog(vfloat x, vfloat p, vfloat s, vfloat g3, vfloat g4) +{ + return x <= g3 ? x * s : (1.f + g4) * xexpf(xlogf(x) / p) - g4;//continuous +} +#endif } namespace rtengine @@ -387,6 +435,7 @@ struct local_params { float balanceh; int colorde; int cir; + bool recur; float thr; float stru; int chro, cont, sens, sensh, senscb, sensbn, senstm, sensex, sensexclu, sensden, senslc, senssf, senshs, senscolor; @@ -426,6 +475,9 @@ struct local_params { float angvib; float angwav; float strwav; + float blendmaL; + float radmaL; + float chromaL; float strengthw; float radiusw; @@ -496,6 +548,7 @@ struct local_params { float trans; float feath; int dehaze; + int dehazeSaturation; int depth; bool inv; bool invex; @@ -528,6 +581,7 @@ struct local_params { int showmasksoftmet; int showmasktmmet; int showmaskblmet; + int showmasklogmet; int showmask_met; bool fftbl; float laplacexp; @@ -537,6 +591,8 @@ struct local_params { int softmet; int blurmet; int blmet; + bool invmaskd; + bool invmask; int smasktyp; int chromet; int quamet; @@ -548,10 +604,63 @@ struct local_params { float noiself2; float noiseldetail; int detailthr; + float recothr; + float lowthr; + float higthr; + float recothrd; + float lowthrd; + float midthrd; + float midthrdch; + float higthrd; + float decayd; + float recothrc; + float lowthrc; + float higthrc; + float decayc; + float recothre; + float lowthre; + float higthre; + float decaye; + float recothrv; + float lowthrv; + float higthrv; + float decayv; + float recothrcb; + float lowthrcb; + float higthrcb; + float decaycb; + float recothrt; + float lowthrt; + float higthrt; + float decayt; + float recothrw; + float lowthrw; + float higthrw; + float decayw; + float recothrr; + float lowthrr; + float higthrr; + float decayr; + float recothrs; + float lowthrs; + float higthrs; + float decays; + float recothrl; + float lowthrl; + float higthrl; + float decayl; int noiselequal; float noisechrodetail; float bilat; + int nlstr; + int nldet; + int nlpat; + int nlrad; + float nlgam; float noiselc; + float noiselc4; + float noiselc5; + float noiselc6; float noisecf; float noisecc; float mulloc[6]; @@ -574,11 +683,13 @@ struct local_params { bool sfena; bool cbdlena; bool denoiena; + bool wavcurvedenoi; bool expvib; bool exposena; bool hsena; bool vibena; bool logena; + bool islocal; bool maskena; bool cut_past; float past; @@ -614,6 +725,7 @@ struct local_params { bool enaretiMasktmap; bool enatmMask; bool enablMask; + bool enaLMask; bool ena_Mask; int highlihs; int shadowhs; @@ -649,14 +761,19 @@ struct local_params { float blurma; float contma; bool activspot; + float thrlow; + float thrhigh; + bool usemask; + float lnoiselow; }; -static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locallab, struct local_params& lp, bool prevDeltaE, int llColorMask, int llColorMaskinv, int llExpMask, int llExpMaskinv, int llSHMask, int llSHMaskinv, int llvibMask, int lllcMask, int llsharMask, int llcbMask, int llretiMask, int llsoftMask, int lltmMask, int llblMask, int ll_Mask, const LocwavCurve & locwavCurveden, bool locwavdenutili) +static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locallab, struct local_params& lp, bool prevDeltaE, int llColorMask, int llColorMaskinv, int llExpMask, int llExpMaskinv, int llSHMask, int llSHMaskinv, int llvibMask, int lllcMask, int llsharMask, int llcbMask, int llretiMask, int llsoftMask, int lltmMask, int llblMask, int lllogMask, int ll_Mask, const LocwavCurve & locwavCurveden, bool locwavdenutili) { int w = oW; int h = oH; int circr = locallab.spots.at(sp).circrad; + bool recur = locallab.spots.at(sp).recurs; float streng = ((float)locallab.spots.at(sp).stren); float gam = ((float)locallab.spots.at(sp).gamma); float est = ((float)locallab.spots.at(sp).estop); @@ -668,9 +785,10 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall float laplac = ((float)locallab.spots.at(sp).laplace); float thre = locallab.spots.at(sp).thresh; - if (thre > 8.f || thre < 0.f) {//to avoid artifacts if user does not clear cache with new settings. Can be suppressed after - thre = 2.f; - } +// if (thre > 8.f || thre < 0.f) {//to avoid artifacts if user does not clear cache with new settings. Can be suppressed after +// thre = 2.f; +// } + thre = LIM(thre, 0.f, 10.0f); double local_x = locallab.spots.at(sp).loc.at(0) / 2000.0; double local_y = locallab.spots.at(sp).loc.at(2) / 2000.0; @@ -683,9 +801,10 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall float balanch = (float) locallab.spots.at(sp).balanh; int colorde = (int) locallab.spots.at(sp).colorde; - if (iterati > 4.f || iterati < 0.2f) {//to avoid artifacts if user does not clear cache with new settings Can be suppressed after - iterati = 2.f; - } +// if (iterati > 4.f || iterati < 0.2f) {//to avoid artifacts if user does not clear cache with new settings Can be suppressed after +// iterati = 2.f; +// } + iterati = LIM(iterati, 0.2f, 10.0f); float neigh = float (locallab.spots.at(sp).neigh); float chromaPastel = float (locallab.spots.at(sp).pastels) / 100.0f; @@ -746,23 +865,30 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.showmasktmmet = lltmMask; lp.showmaskblmet = llblMask; + lp.showmasklogmet = lllogMask; lp.showmask_met = ll_Mask; - // printf("mask=%i \n", lp.showmask_met); - - lp.enaColorMask = locallab.spots.at(sp).enaColorMask && llsoftMask == 0 && llColorMask == 0 && lllcMask == 0 && llsharMask == 0 && llExpMask == 0 && llSHMask == 0 && llcbMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0 && ll_Mask == 0;// Exposure mask is deactivated if Color & Light mask is visible - lp.enaColorMaskinv = locallab.spots.at(sp).enaColorMask && llColorMaskinv == 0 && llsoftMask == 0 && lllcMask == 0 && llsharMask == 0 && llExpMask == 0 && llSHMask == 0 && llcbMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0 && ll_Mask == 0;// Exposure mask is deactivated if Color & Light mask is visible - lp.enaExpMask = locallab.spots.at(sp).enaExpMask && llExpMask == 0 && llColorMask == 0 && llsoftMask == 0 && lllcMask == 0 && llsharMask == 0 && llSHMask == 0 && llcbMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0 && ll_Mask == 0;// Exposure mask is deactivated if Color & Light mask is visible - lp.enaExpMaskinv = locallab.spots.at(sp).enaExpMask && llExpMaskinv == 0 && llColorMask == 0 && llsoftMask == 0 && lllcMask == 0 && llsharMask == 0 && llSHMask == 0 && llcbMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0 && ll_Mask == 0;// Exposure mask is deactivated if Color & Light mask is visible - lp.enaSHMask = locallab.spots.at(sp).enaSHMask && llSHMask == 0 && llColorMask == 0 && llsoftMask == 0 && lllcMask == 0 && llsharMask == 0 && llExpMask == 0 && llcbMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0 && ll_Mask == 0; - lp.enaSHMaskinv = locallab.spots.at(sp).enaSHMask && llSHMaskinv == 0 && lllcMask == 0 && llsoftMask == 0 && llsharMask == 0 && llColorMask == 0 && llExpMask == 0 && llcbMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0 && ll_Mask == 0; - lp.enacbMask = locallab.spots.at(sp).enacbMask && llcbMask == 0 && lllcMask == 0 && llsoftMask == 0 && llsharMask == 0 && llColorMask == 0 && llExpMask == 0 && llSHMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0 && ll_Mask == 0; - lp.enaretiMask = locallab.spots.at(sp).enaretiMask && lllcMask == 0 && llsharMask == 0 && llsoftMask == 0 && llretiMask == 0 && llColorMask == 0 && llExpMask == 0 && llSHMask == 0 && llcbMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0 && ll_Mask == 0; - lp.enatmMask = locallab.spots.at(sp).enatmMask && lltmMask == 0 && lllcMask == 0 && llsoftMask == 0 && llsharMask == 0 && llColorMask == 0 && llExpMask == 0 && llSHMask == 0 && llcbMask == 0 && llretiMask == 0 && llblMask == 0 && llvibMask == 0 && ll_Mask == 0; - lp.enablMask = locallab.spots.at(sp).enablMask && llblMask == 0 && lllcMask == 0 && llsoftMask == 0 && llsharMask == 0 && llColorMask == 0 && llExpMask == 0 && llSHMask == 0 && llcbMask == 0 && llretiMask == 0 && lltmMask == 0 && llvibMask == 0 && ll_Mask == 0; - lp.enavibMask = locallab.spots.at(sp).enavibMask && llvibMask == 0 && lllcMask == 0 && llsoftMask == 0 && llsharMask == 0 && llColorMask == 0 && llExpMask == 0 && llcbMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llSHMask == 0 && ll_Mask == 0; - lp.enalcMask = locallab.spots.at(sp).enalcMask && lllcMask == 0 && llcbMask == 0 && llsoftMask == 0 && llsharMask == 0 && llColorMask == 0 && llExpMask == 0 && llSHMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0 && ll_Mask == 0 ; - lp.enasharMask = lllcMask == 0 && llcbMask == 0 && llsharMask == 0 && llsoftMask == 0 && llColorMask == 0 && llExpMask == 0 && llSHMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0 && ll_Mask == 0; - lp.ena_Mask = locallab.spots.at(sp).enamask && lllcMask == 0 && llcbMask == 0 && llsoftMask == 0 && llsharMask == 0 && llColorMask == 0 && llExpMask == 0 && llSHMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0; + + lp.enaColorMask = locallab.spots.at(sp).enaColorMask && llsoftMask == 0 && llColorMask == 0 && lllcMask == 0 && llsharMask == 0 && llExpMask == 0 && llSHMask == 0 && llcbMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0 && lllogMask == 0 && ll_Mask == 0;// Exposure mask is deactivated if Color & Light mask is visible + lp.enaColorMaskinv = locallab.spots.at(sp).enaColorMask && llColorMaskinv == 0 && llsoftMask == 0 && lllcMask == 0 && llsharMask == 0 && llExpMask == 0 && llSHMask == 0 && llcbMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0 && lllogMask == 0 && ll_Mask == 0;// Exposure mask is deactivated if Color & Light mask is visible + lp.enaExpMask = locallab.spots.at(sp).enaExpMask && llExpMask == 0 && llColorMask == 0 && llsoftMask == 0 && lllcMask == 0 && llsharMask == 0 && llSHMask == 0 && llcbMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0 && lllogMask == 0 && ll_Mask == 0;// Exposure mask is deactivated if Color & Light mask is visible + lp.enaExpMaskinv = locallab.spots.at(sp).enaExpMask && llExpMaskinv == 0 && llColorMask == 0 && llsoftMask == 0 && lllcMask == 0 && llsharMask == 0 && llSHMask == 0 && llcbMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0 && lllogMask == 0 && ll_Mask == 0;// Exposure mask is deactivated if Color & Light mask is visible + lp.enaSHMask = locallab.spots.at(sp).enaSHMask && llSHMask == 0 && llColorMask == 0 && llsoftMask == 0 && lllcMask == 0 && llsharMask == 0 && llExpMask == 0 && llcbMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0 && lllogMask == 0 && ll_Mask == 0; + lp.enaSHMaskinv = locallab.spots.at(sp).enaSHMask && llSHMaskinv == 0 && lllcMask == 0 && llsoftMask == 0 && llsharMask == 0 && llColorMask == 0 && llExpMask == 0 && llcbMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0 && lllogMask == 0 && ll_Mask == 0; + lp.enacbMask = locallab.spots.at(sp).enacbMask && llcbMask == 0 && lllcMask == 0 && llsoftMask == 0 && llsharMask == 0 && llColorMask == 0 && llExpMask == 0 && llSHMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0 && lllogMask == 0 && ll_Mask == 0; + lp.enaretiMask = locallab.spots.at(sp).enaretiMask && lllcMask == 0 && llsharMask == 0 && llsoftMask == 0 && llretiMask == 0 && llColorMask == 0 && llExpMask == 0 && llSHMask == 0 && llcbMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0 && lllogMask == 0 && ll_Mask == 0; + lp.enatmMask = locallab.spots.at(sp).enatmMask && lltmMask == 0 && lllcMask == 0 && llsoftMask == 0 && llsharMask == 0 && llColorMask == 0 && llExpMask == 0 && llSHMask == 0 && llcbMask == 0 && llretiMask == 0 && llblMask == 0 && llvibMask == 0&& lllogMask == 0 && ll_Mask == 0; + lp.enablMask = locallab.spots.at(sp).enablMask && llblMask == 0 && lllcMask == 0 && llsoftMask == 0 && llsharMask == 0 && llColorMask == 0 && llExpMask == 0 && llSHMask == 0 && llcbMask == 0 && llretiMask == 0 && lltmMask == 0 && llvibMask == 0 && lllogMask == 0 && ll_Mask == 0; + lp.enavibMask = locallab.spots.at(sp).enavibMask && llvibMask == 0 && lllcMask == 0 && llsoftMask == 0 && llsharMask == 0 && llColorMask == 0 && llExpMask == 0 && llcbMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llSHMask == 0 && lllogMask == 0 && ll_Mask == 0; + lp.enalcMask = locallab.spots.at(sp).enalcMask && lllcMask == 0 && llcbMask == 0 && llsoftMask == 0 && llsharMask == 0 && llColorMask == 0 && llExpMask == 0 && llSHMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0 && lllogMask == 0 && ll_Mask == 0 ; + lp.enasharMask = lllcMask == 0 && llcbMask == 0 && llsharMask == 0 && llsoftMask == 0 && llColorMask == 0 && llExpMask == 0 && llSHMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0 && lllogMask == 0 && ll_Mask == 0; + lp.ena_Mask = locallab.spots.at(sp).enamask && lllcMask == 0 && llcbMask == 0 && llsoftMask == 0 && llsharMask == 0 && llColorMask == 0 && llExpMask == 0 && llSHMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && lllogMask == 0 && llvibMask == 0; + lp.enaLMask = locallab.spots.at(sp).enaLMask && lllogMask == 0 && llColorMask == 0 && lllcMask == 0 && llsharMask == 0 && llExpMask == 0 && llSHMask == 0 && llcbMask == 0 && llretiMask == 0 && lltmMask == 0 && llblMask == 0 && llvibMask == 0 && ll_Mask == 0;// Exposure mask is deactivated if Color & Light mask is visible + + + lp.thrlow = locallab.spots.at(sp).levelthrlow; + lp.thrhigh = locallab.spots.at(sp).levelthr; + lp.usemask = locallab.spots.at(sp).usemask; + lp.lnoiselow = locallab.spots.at(sp).lnoiselow; // printf("llColorMask=%i lllcMask=%i llExpMask=%i llSHMask=%i llcbMask=%i llretiMask=%i lltmMask=%i llblMask=%i llvibMask=%i\n", llColorMask, lllcMask, llExpMask, llSHMask, llcbMask, llretiMask, lltmMask, llblMask, llvibMask); if (locallab.spots.at(sp).softMethod == "soft") { @@ -787,11 +913,19 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.chromet = 2; } + + + if (locallab.spots.at(sp).quamethod == "cons") { lp.quamet = 0; } else if (locallab.spots.at(sp).quamethod == "agre") { lp.quamet = 1; + } else if (locallab.spots.at(sp).quamethod == "nlmean") { + lp.quamet = 2; + } else if (locallab.spots.at(sp).quamethod == "none") { + lp.quamet = 3; } +// printf("lpqualmet=%i\n", lp.quamet); if (locallab.spots.at(sp).shMethod == "std") { lp.shmeth = 0; @@ -824,6 +958,19 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.blurmet = 1; } + if (locallab.spots.at(sp).invmask == false) { + lp.invmask = false; + } else if (locallab.spots.at(sp).invmask == true) { + lp.invmask = true; + } + + if (locallab.spots.at(sp).invmaskd == false) { + lp.invmaskd = false; + } else if (locallab.spots.at(sp).invmaskd == true) { + lp.invmaskd = true; + } + + if (locallab.spots.at(sp).showmaskblMethodtyp == "blur") { lp.smasktyp = 0; } else if (locallab.spots.at(sp).showmaskblMethodtyp == "nois") { @@ -837,6 +984,8 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.excmet = 0; } else if (locallab.spots.at(sp).spotMethod == "exc") { lp.excmet = 1; + } else if (locallab.spots.at(sp).spotMethod == "full") { + lp.excmet = 2; } if (locallab.spots.at(sp).merMethod == "mone") { @@ -945,6 +1094,9 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall float local_noiself0 = 0.f; float local_noiself2 = 0.f; float local_noiselc = 0.f; + float lnoiselc4 = 0.f; + float lnoiselc5 = 0.f; + float lnoiselc6 = 0.f; if (locwavCurveden && locwavdenutili) { if (lp.denoiena) { @@ -959,17 +1111,73 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall if (wavcurveden) { if (lp.denoiena) { local_noiself0 = 250.f * locwavCurveden[0]; - local_noiself = 250.f * locwavCurveden[166]; - local_noiself2 = 250.f * locwavCurveden[323]; - local_noiselc = 200.f * locwavCurveden[500]; - } + local_noiself = 250.f * locwavCurveden[83]; + local_noiself2 = 250.f * locwavCurveden[166]; + local_noiselc = 200.f * locwavCurveden[250]; + lnoiselc4 = 250.f * locwavCurveden[333]; + lnoiselc5 = 250.f * locwavCurveden[416]; + lnoiselc6 = 250.f * locwavCurveden[500]; + } } - + lp.wavcurvedenoi = wavcurveden; float local_noiseldetail = (float)locallab.spots.at(sp).noiselumdetail; int local_noiselequal = locallab.spots.at(sp).noiselequal; float local_noisechrodetail = (float)locallab.spots.at(sp).noisechrodetail; int local_sensiden = locallab.spots.at(sp).sensiden; float local_detailthr = (float)locallab.spots.at(sp).detailthr; + float local_recothr = (float)locallab.spots.at(sp).recothres; + float local_lowthr = (float)locallab.spots.at(sp).lowthres; + float local_higthr = (float)locallab.spots.at(sp).higthres; + float local_recothrd = (float)locallab.spots.at(sp).recothresd; + float local_lowthrd = (float)locallab.spots.at(sp).lowthresd; + float local_midthrd = (float)locallab.spots.at(sp).midthresd; + float local_midthrdch = (float)locallab.spots.at(sp).midthresdch; + float local_higthrd = (float)locallab.spots.at(sp).higthresd; + float local_decayd = (float)locallab.spots.at(sp).decayd; + float local_recothrc = (float)locallab.spots.at(sp).recothresc; + float local_lowthrc = (float)locallab.spots.at(sp).lowthresc; + float local_higthrc = (float)locallab.spots.at(sp).higthresc; + float local_decayc = (float)locallab.spots.at(sp).decayc; + + float local_recothre = (float)locallab.spots.at(sp).recothrese; + float local_lowthre = (float)locallab.spots.at(sp).lowthrese; + float local_higthre = (float)locallab.spots.at(sp).higthrese; + float local_decaye = (float)locallab.spots.at(sp).decaye; + + float local_recothrv = (float)locallab.spots.at(sp).recothresv; + float local_lowthrv = (float)locallab.spots.at(sp).lowthresv; + float local_higthrv = (float)locallab.spots.at(sp).higthresv; + float local_decayv = (float)locallab.spots.at(sp).decayv; + + float local_recothrcb = (float)locallab.spots.at(sp).recothrescb; + float local_lowthrcb = (float)locallab.spots.at(sp).lowthrescb; + float local_higthrcb = (float)locallab.spots.at(sp).higthrescb; + float local_decaycb = (float)locallab.spots.at(sp).decaycb; + + float local_recothrr = (float)locallab.spots.at(sp).recothresr; + float local_lowthrr = (float)locallab.spots.at(sp).lowthresr; + float local_higthrr = (float)locallab.spots.at(sp).higthresr; + float local_decayr = (float)locallab.spots.at(sp).decayr; + + float local_recothrt = (float)locallab.spots.at(sp).recothrest; + float local_lowthrt = (float)locallab.spots.at(sp).lowthrest; + float local_higthrt = (float)locallab.spots.at(sp).higthrest; + float local_decayt = (float)locallab.spots.at(sp).decayt; + + float local_recothrw = (float)locallab.spots.at(sp).recothresw; + float local_lowthrw = (float)locallab.spots.at(sp).lowthresw; + float local_higthrw = (float)locallab.spots.at(sp).higthresw; + float local_decayw = (float)locallab.spots.at(sp).decayw; + + float local_recothrs = (float)locallab.spots.at(sp).recothress; + float local_lowthrs = (float)locallab.spots.at(sp).lowthress; + float local_higthrs = (float)locallab.spots.at(sp).higthress; + float local_decays = (float)locallab.spots.at(sp).decays; + + float local_recothrl = (float)locallab.spots.at(sp).recothresl; + float local_lowthrl = (float)locallab.spots.at(sp).lowthresl; + float local_higthrl = (float)locallab.spots.at(sp).higthresl; + float local_decayl = (float)locallab.spots.at(sp).decayl; float local_noisecf = ((float)locallab.spots.at(sp).noisechrof) / 10.f; float local_noisecc = ((float)locallab.spots.at(sp).noisechroc) / 10.f; @@ -999,6 +1207,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall int local_sensih = locallab.spots.at(sp).sensih; int local_dehaze = locallab.spots.at(sp).dehaz; int local_depth = locallab.spots.at(sp).depth; + int local_dehazeSaturation = locallab.spots.at(sp).dehazeSaturation; int local_sensicb = locallab.spots.at(sp).sensicb; float local_clarityml = (float) locallab.spots.at(sp).clarityml; float local_contresid = (float) locallab.spots.at(sp).contresid; @@ -1096,6 +1305,10 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall bool fftwlc = locallab.spots.at(sp).fftwlc; bool fftwreti = locallab.spots.at(sp).fftwreti; + float blendmaskL = ((float) locallab.spots.at(sp).blendmaskL) / 100.f ; + float radmaskL = ((float) locallab.spots.at(sp).radmaskL); + float chromaskL = ((float) locallab.spots.at(sp).chromaskL); + bool equilret = locallab.spots.at(sp).equilret; bool inverserad = false; // Provision bool inverseret = locallab.spots.at(sp).inversret; @@ -1146,6 +1359,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.deltaem = locallab.spots.at(sp).deltae; lp.scalereti = scaleret; lp.cir = circr; + lp.recur = recur; lp.actsp = acti; lp.xc = w * local_center_x; lp.yc = h * local_center_y; @@ -1217,6 +1431,9 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.gammatm = gammasktm; lp.slomatm = slomasktm; lp.wavgradl = wavgradl; + lp.blendmaL = blendmaskL; + lp.radmaL = radmaskL; + lp.chromaL = chromaskL; lp.strengthw = ((float) locallab.spots.at(sp).strengthw); lp.radiusw = ((float) locallab.spots.at(sp).radiusw); @@ -1247,6 +1464,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.sens = local_sensi; lp.sensh = local_sensih; lp.dehaze = local_dehaze; + lp.dehazeSaturation = local_dehazeSaturation; lp.depth = local_depth; lp.senscb = local_sensicb; lp.clarityml = local_clarityml; @@ -1308,13 +1526,68 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.noiself2 = local_noiself2; lp.noiseldetail = local_noiseldetail; lp.detailthr = local_detailthr; + lp.recothr = local_recothr; + lp.lowthr = local_lowthr; + lp.higthr = local_higthr; + lp.recothrd = local_recothrd; + lp.midthrd = local_midthrd; + lp.midthrdch = local_midthrdch; + lp.lowthrd = local_lowthrd; + lp.higthrd = local_higthrd; + lp.decayd = local_decayd; + lp.recothrc = local_recothrc; + lp.lowthrc = local_lowthrc; + lp.higthrc = local_higthrc; + lp.decayc = local_decayc; + lp.recothre = local_recothre; + lp.lowthre = local_lowthre; + lp.higthre = local_higthre; + lp.decaye = local_decaye; + lp.recothrs = local_recothrs; + lp.lowthrs = local_lowthrs; + lp.higthrs = local_higthrs; + lp.decays = local_decays; + lp.recothrv = local_recothrv; + lp.lowthrv = local_lowthrv; + lp.higthrv = local_higthrv; + lp.decayv = local_decayv; + lp.recothrw = local_recothrw; + lp.lowthrw = local_lowthrw; + lp.higthrw = local_higthrw; + lp.decayw = local_decayw; + lp.recothrt = local_recothrt; + lp.lowthrt = local_lowthrt; + lp.higthrt = local_higthrt; + lp.decayt = local_decayt; + lp.recothrcb = local_recothrcb; + lp.lowthrcb = local_lowthrcb; + lp.higthrcb = local_higthrcb; + lp.decaycb = local_decaycb; + lp.recothrr = local_recothrr; + lp.lowthrr = local_lowthrr; + lp.higthrr = local_higthrr; + lp.decayr = local_decayr; + + lp.recothrl = local_recothrl; + lp.lowthrl = local_lowthrl; + lp.higthrl = local_higthrl; + lp.decayl = local_decayl; lp.noiselequal = local_noiselequal; lp.noisechrodetail = local_noisechrodetail; lp.noiselc = local_noiselc; + lp.noiselc4 = lnoiselc4; + lp.noiselc5 = lnoiselc5; + lp.noiselc6 = lnoiselc6; + lp.noisecf = local_noisecf; lp.noisecc = local_noisecc; lp.sensden = local_sensiden; lp.bilat = locallab.spots.at(sp).bilateral; + lp.nldet = locallab.spots.at(sp).nldet; + lp.nlstr = locallab.spots.at(sp).nlstr; + lp.nlpat = locallab.spots.at(sp).nlpat; + lp.nlrad = locallab.spots.at(sp).nlrad; + lp.nlgam = locallab.spots.at(sp).nlgam; lp.adjch = (float) locallab.spots.at(sp).adjblur; lp.strengt = streng; lp.gamm = gam; @@ -1336,24 +1609,26 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall } lp.activspot = locallab.spots.at(sp).activ; - lp.logena = locallab.spots.at(sp).explog && lp.activspot; - lp.detailsh = locallab.spots.at(sp).detailSH; + lp.detailsh = locallab.spots.at(sp).detailSH; lp.threshol = thresho; lp.chromacb = chromcbdl; lp.expvib = locallab.spots.at(sp).expvibrance && lp.activspot ; - lp.colorena = locallab.spots.at(sp).expcolor && lp.activspot && llExpMask == 0 && llsoftMask == 0 && llSHMask == 0 && llcbMask == 0 && lllcMask == 0 && llsharMask == 0 && llretiMask == 0 && lltmMask == 0 && llvibMask == 0 && ll_Mask == 0; // Color & Light tool is deactivated if Exposure mask is visible or SHMask - lp.blurena = locallab.spots.at(sp).expblur && lp.activspot && llExpMask == 0 && llsoftMask == 0 && llSHMask == 0 && llcbMask == 0 && lllcMask == 0 && llsharMask == 0 && llretiMask == 0 && llColorMask == 0 && lltmMask == 0 && llvibMask == 0 && ll_Mask == 0; - lp.tonemapena = locallab.spots.at(sp).exptonemap && lp.activspot && llExpMask == 0 && llsoftMask == 0 && llSHMask == 0 && llcbMask == 0 && lllcMask == 0 && llsharMask == 0 && llretiMask == 0 && llColorMask == 0 && llvibMask == 0 && ll_Mask == 0; - lp.retiena = locallab.spots.at(sp).expreti && lp.activspot && llExpMask == 0 && llsoftMask == 0 && llSHMask == 0 && llcbMask == 0 && lllcMask == 0 && llsharMask == 0 && llColorMask == 0 && lltmMask == 0 && llvibMask == 0 && llSHMask == 0 && ll_Mask == 0; - lp.lcena = locallab.spots.at(sp).expcontrast && lp.activspot && llExpMask == 0 && llsoftMask == 0 && llSHMask == 0 && llcbMask == 0 && llsharMask == 0 && llColorMask == 0 && lltmMask == 0 && llvibMask == 0 && llSHMask == 0 && ll_Mask == 0; - lp.cbdlena = locallab.spots.at(sp).expcbdl && lp.activspot && llExpMask == 0 && llsoftMask == 0 && llSHMask == 0 && llretiMask == 0 && lllcMask == 0 && llsharMask == 0 && lllcMask == 0 && llColorMask == 0 && lltmMask == 0 && llvibMask == 0 && ll_Mask == 0; - lp.exposena = locallab.spots.at(sp).expexpose && lp.activspot && llColorMask == 0 && llsoftMask == 0 && llSHMask == 0 && lllcMask == 0 && llsharMask == 0 && llcbMask == 0 && llretiMask == 0 && lltmMask == 0 && llvibMask == 0 && ll_Mask == 0; // Exposure tool is deactivated if Color & Light mask SHmask is visible - lp.hsena = locallab.spots.at(sp).expshadhigh && lp.activspot && llColorMask == 0 && llsoftMask == 0 && llExpMask == 0 && llcbMask == 0 && lllcMask == 0 && llsharMask == 0 && llretiMask == 0 && lltmMask == 0 && llvibMask == 0 && ll_Mask == 0;// Shadow Highlight tool is deactivated if Color & Light mask or SHmask is visible - lp.vibena = locallab.spots.at(sp).expvibrance && lp.activspot && llColorMask == 0 && llsoftMask == 0 && llExpMask == 0 && llcbMask == 0 && lllcMask == 0 && llsharMask == 0 && llretiMask == 0 && llcbMask == 0 && lltmMask == 0 && llSHMask == 0 && ll_Mask == 0;// vibrance tool is deactivated if Color & Light mask or SHmask is visible - lp.sharpena = locallab.spots.at(sp).expsharp && lp.activspot && llColorMask == 0 && llsoftMask == 0 && llExpMask == 0 && llcbMask == 0 && lllcMask == 0 && llretiMask == 0 && llcbMask == 0 && lltmMask == 0 && llSHMask == 0 && llvibMask == 0 && ll_Mask == 0; - lp.sfena = locallab.spots.at(sp).expsoft && lp.activspot && llColorMask == 0 && llExpMask == 0 && llcbMask == 0 && lllcMask == 0 && llretiMask == 0 && llcbMask == 0 && lltmMask == 0 && llSHMask == 0 && llvibMask == 0 && ll_Mask == 0; - lp.maskena = locallab.spots.at(sp).expmask && lp.activspot && llColorMask == 0 && llsoftMask == 0 && llExpMask == 0 && llcbMask == 0 && lllcMask == 0 && llsharMask == 0 && llretiMask == 0 && llcbMask == 0 && lltmMask == 0 && llSHMask == 0;// vibrance tool is deactivated if Color & Light mask or SHmask is visible + lp.colorena = locallab.spots.at(sp).expcolor && lp.activspot && llExpMask == 0 && llsoftMask == 0 && llSHMask == 0 && llcbMask == 0 && lllcMask == 0 && llsharMask == 0 && llretiMask == 0 && lltmMask == 0 && llvibMask == 0 && lllogMask == 0 && ll_Mask == 0; // Color & Light tool is deactivated if Exposure mask is visible or SHMask + lp.blurena = locallab.spots.at(sp).expblur && lp.activspot && llExpMask == 0 && llsoftMask == 0 && llSHMask == 0 && llcbMask == 0 && lllcMask == 0 && llsharMask == 0 && llretiMask == 0 && llColorMask == 0 && lltmMask == 0 && llvibMask == 0 && lllogMask == 0 && ll_Mask == 0; + lp.tonemapena = locallab.spots.at(sp).exptonemap && lp.activspot && llExpMask == 0 && llsoftMask == 0 && llSHMask == 0 && llcbMask == 0 && lllcMask == 0 && llsharMask == 0 && llretiMask == 0 && llColorMask == 0 && llvibMask == 0 && lllogMask == 0 && ll_Mask == 0; + lp.retiena = locallab.spots.at(sp).expreti && lp.activspot && llExpMask == 0 && llsoftMask == 0 && llSHMask == 0 && llcbMask == 0 && lllcMask == 0 && llsharMask == 0 && llColorMask == 0 && lltmMask == 0 && llvibMask == 0 && llSHMask == 0 && lllogMask == 0 && ll_Mask == 0; + lp.lcena = locallab.spots.at(sp).expcontrast && lp.activspot && llExpMask == 0 && llsoftMask == 0 && llSHMask == 0 && llcbMask == 0 && llsharMask == 0 && llColorMask == 0 && lltmMask == 0 && llvibMask == 0 && llSHMask == 0 && lllogMask == 0 && ll_Mask == 0; + lp.cbdlena = locallab.spots.at(sp).expcbdl && lp.activspot && llExpMask == 0 && llsoftMask == 0 && llSHMask == 0 && llretiMask == 0 && lllcMask == 0 && llsharMask == 0 && lllcMask == 0 && llColorMask == 0 && lltmMask == 0 && llvibMask == 0 && lllogMask == 0 && ll_Mask == 0; + lp.exposena = locallab.spots.at(sp).expexpose && lp.activspot && llColorMask == 0 && llsoftMask == 0 && llSHMask == 0 && lllcMask == 0 && llsharMask == 0 && llcbMask == 0 && llretiMask == 0 && lltmMask == 0 && llvibMask == 0 && lllogMask == 0 && ll_Mask == 0; // Exposure tool is deactivated if Color & Light mask SHmask is visible + lp.hsena = locallab.spots.at(sp).expshadhigh && lp.activspot && llColorMask == 0 && llsoftMask == 0 && llExpMask == 0 && llcbMask == 0 && lllcMask == 0 && llsharMask == 0 && llretiMask == 0 && lltmMask == 0 && llvibMask == 0 && lllogMask == 0 && ll_Mask == 0;// Shadow Highlight tool is deactivated if Color & Light mask or SHmask is visible + lp.vibena = locallab.spots.at(sp).expvibrance && lp.activspot && llColorMask == 0 && llsoftMask == 0 && llExpMask == 0 && llcbMask == 0 && lllcMask == 0 && llsharMask == 0 && llretiMask == 0 && llcbMask == 0 && lltmMask == 0 && llSHMask == 0 && lllogMask == 0 && ll_Mask == 0;// vibrance tool is deactivated if Color & Light mask or SHmask is visible + lp.sharpena = locallab.spots.at(sp).expsharp && lp.activspot && llColorMask == 0 && llsoftMask == 0 && llExpMask == 0 && llcbMask == 0 && lllcMask == 0 && llretiMask == 0 && llcbMask == 0 && lltmMask == 0 && llSHMask == 0 && llvibMask == 0 && lllogMask == 0 && ll_Mask == 0; + lp.sfena = locallab.spots.at(sp).expsoft && lp.activspot && llColorMask == 0 && llExpMask == 0 && llcbMask == 0 && lllcMask == 0 && llretiMask == 0 && llcbMask == 0 && lltmMask == 0 && llSHMask == 0 && llvibMask == 0 && lllogMask == 0 && ll_Mask == 0; + lp.maskena = locallab.spots.at(sp).expmask && lp.activspot && llColorMask == 0 && llsoftMask == 0 && llExpMask == 0 && llcbMask == 0 && lllcMask == 0 && llsharMask == 0 && llretiMask == 0 && llcbMask == 0 && lltmMask == 0 && lllogMask == 0 && llSHMask == 0;// vibrance tool is deactivated if Color & Light mask or SHmask is visible + lp.logena = locallab.spots.at(sp).explog && lp.activspot && llColorMask == 0 && llsoftMask == 0 && llExpMask == 0 && llcbMask == 0 && lllcMask == 0 && llsharMask == 0 && llretiMask == 0 && llcbMask == 0 && lltmMask == 0 && llSHMask == 0;// vibrance tool is deactivated if Color & Light mask or SHmask is visible + + lp.islocal = (lp.expvib || lp.colorena || lp.blurena || lp.tonemapena || lp.retiena || lp.lcena || lp.cbdlena || lp.exposena || lp.hsena || lp.vibena || lp.sharpena || lp.sfena || lp.maskena || lp.logena); lp.sensv = local_sensiv; lp.past = chromaPastel; @@ -1557,11 +1832,32 @@ float find_gray(float source_gray, float target_gray) return 0.f; // not found } +void ImProcFunctions::mean_sig (const float* const * const savenormL, float &meanf, float &stdf, int xStart, int xEnd, int yStart, int yEnd) const { + const int size = (yEnd - yStart) * (xEnd - xStart); + // use double precision for large accumulations + double meand = 0.0; + double stdd = 0.0; +#ifdef _OPENMP + #pragma omp parallel for reduction(+:meand, stdd) if(multiThread) +#endif + for (int y = yStart; y < yEnd; ++y) { + for (int x = xStart; x < xEnd; ++x) { + meand += static_cast(savenormL[y][x]); + stdd += SQR(static_cast(savenormL[y][x])); + } + } + meand /= size; + stdd /= size; + stdd -= SQR(meand); + stdf = std::sqrt(stdd); + meanf = meand; +} + // basic log encoding taken from ACESutil.Lin_to_Log2, from // https://github.com/ampas/aces-dev // (as seen on pixls.us) -void ImProcFunctions::log_encode(Imagefloat *rgb, const struct local_params & lp, bool multiThread, int bfw, int bfh) +void ImProcFunctions::log_encode(Imagefloat *rgb, struct local_params & lp, bool multiThread, int bfw, int bfh) { /* J.Desmis 12 2019 small adaptations to local adjustments @@ -1570,9 +1866,14 @@ void ImProcFunctions::log_encode(Imagefloat *rgb, const struct local_params & lp // BENCHFUN const float gray = lp.sourcegray / 100.f; const float shadows_range = lp.blackev; - const float dynamic_range = lp.whiteev - lp.blackev; + + float dynamic_range = lp.whiteev - lp.blackev; + if (dynamic_range < 0.5f) { + dynamic_range = 0.5f; + } const float noise = pow_F(2.f, -16.f); - const float log2 = xlogf(lp.baselog); + // const float log2 = xlogf(lp.baselog); + const float log2 = xlogf(2.f); const float base = lp.targetgray > 1 && lp.targetgray < 100 && dynamic_range > 0 ? find_gray(std::abs(lp.blackev) / dynamic_range, lp.targetgray / 100.f) : 0.f; const float linbase = rtengine::max(base, 0.f); TMatrix ws = ICCStore::getInstance()->workingSpaceMatrix(params->icm.workingProfile); @@ -1648,9 +1949,14 @@ void ImProcFunctions::log_encode(Imagefloat *rgb, const struct local_params & lp if (m > noise) { float mm = apply(m); float f = mm / m; + f = min(f, 1000000.f); + r *= f; b *= f; g *= f; + r = CLIP(r); + g = CLIP(g); + b = CLIP(b); } assert(r == r); @@ -1704,20 +2010,25 @@ void ImProcFunctions::log_encode(Imagefloat *rgb, const struct local_params & lp // float t2 = norm(r, g, b); float f2 = apply(t2) / t2; f = intp(blend, f, f2); - assert(std::isfinite(f)); + f = min(f, 1000000.f); + + // assert(std::isfinite(f)); r *= f; g *= f; b *= f; - assert(std::isfinite(r)); - assert(std::isfinite(g)); - assert(std::isfinite(b)); + r = CLIP(r); + g = CLIP(g); + b = CLIP(b); + // assert(std::isfinite(r)); + // assert(std::isfinite(g)); + // assert(std::isfinite(b)); } } } } } -void ImProcFunctions::getAutoLogloc(int sp, ImageSource *imgsrc, float *sourceg, float *blackev, float *whiteev, bool *Autogr, int fw, int fh, float xsta, float xend, float ysta, float yend, int SCALE) +void ImProcFunctions::getAutoLogloc(int sp, ImageSource *imgsrc, float *sourceg, float *blackev, float *whiteev, bool *Autogr, float *sourceab, int fw, int fh, float xsta, float xend, float ysta, float yend, int SCALE) { //BENCHFUN //adpatation to local adjustments Jacques Desmis 12 2019 @@ -1729,7 +2040,10 @@ void ImProcFunctions::getAutoLogloc(int sp, ImageSource *imgsrc, float *sourceg, imgsrc->convertColorSpace(&img, params->icm, imgsrc->getWB()); float minVal = RT_INFINITY; float maxVal = -RT_INFINITY; - const float ec = std::pow(2.f, params->toneCurve.expcomp); + float ec = 1.f; + if(params->toneCurve.autoexp) {//take into account exposure, only if autoexp, in other cases now it's after LA + ec = std::pow(2.f, params->toneCurve.expcomp); + } constexpr float noise = 1e-5; const int h = fh / SCALE; @@ -1740,7 +2054,7 @@ void ImProcFunctions::getAutoLogloc(int sp, ImageSource *imgsrc, float *sourceg, const int wsta = xsta * w; const int wend = xend * w; - + double mean = 0.0; int nc = 0; for (int y = hsta; y < hend; ++y) { @@ -1757,7 +2071,7 @@ void ImProcFunctions::getAutoLogloc(int sp, ImageSource *imgsrc, float *sourceg, } } } - + maxVal *= 1.2f; //or 1.5f;slightly increase max //approximation sourcegray yb source = 0.4 * yb if (maxVal > minVal) { @@ -1766,7 +2080,7 @@ void ImProcFunctions::getAutoLogloc(int sp, ImageSource *imgsrc, float *sourceg, if (settings->verbose) { std::cout << "AutoLog: min = " << minVal << ", max = " << maxVal - << ", DR = " << dynamic_range << std::endl; + << ", Dynamic Range = " << dynamic_range << std::endl; } if (Autogr[sp]) { @@ -1823,14 +2137,48 @@ void ImProcFunctions::getAutoLogloc(int sp, ImageSource *imgsrc, float *sourceg, } } } + constexpr float MIN_WHITE = 2.f; + constexpr float MAX_BLACK = -3.5f; const float gray = sourceg[sp] / 100.f; - whiteev[sp] = xlogf(maxVal / gray) / log2; - blackev[sp] = whiteev[sp] - dynamic_range; + whiteev[sp] = rtengine::max(xlogf(maxVal / gray) / log2, MIN_WHITE); + blackev[sp] = rtengine::min(whiteev[sp] - dynamic_range, MAX_BLACK); + + + //calculate La - Absolute luminance shooting + + const FramesMetaData* metaData = imgsrc->getMetaData(); + int imgNum = 0; + + if (imgsrc->isRAW()) { + if (imgsrc->getSensorType() == ST_BAYER) { + imgNum = rtengine::LIM(params->raw.bayersensor.imageNum, 0, metaData->getFrameCount() - 1); + } else if (imgsrc->getSensorType() == ST_FUJI_XTRANS) { + //imgNum = rtengine::LIM(params->raw.xtranssensor.imageNum, 0, metaData->getFrameCount() - 1); + } + } + + float fnum = metaData->getFNumber(imgNum); // F number + float fiso = metaData->getISOSpeed(imgNum) ; // ISO + float fspeed = metaData->getShutterSpeed(imgNum) ; // Speed + double fcomp = metaData->getExpComp(imgNum); // Compensation +/- + double adap; + + if (fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) { //if no exif data or wrong + adap = 2000.; + } else { + double E_V = fcomp + std::log2(double ((fnum * fnum) / fspeed / (fiso / 100.f))); + E_V += params->toneCurve.expcomp;// exposure compensation in tonecurve ==> direct EV + E_V += std::log2(params->raw.expos); // exposure raw white point ; log2 ==> linear to EV + adap = pow(2.0, E_V - 3.0); // cd / m2 + // end calculation adaptation scene luminosity + } + + sourceab[sp] = adap; } } -void tone_eq(array2D &R, array2D &G, array2D &B, const struct local_params & lp, const Glib::ustring &workingProfile, double scale, bool multithread) +void tone_eq(array2D &R, array2D &G, array2D &B, const struct local_params & lp, const Glib::ustring &workingProfile, double scale, bool multithread) // adapted from the tone equalizer of darktable /* Copyright 2019 Alberto Griggio @@ -2058,11 +2406,13 @@ void tone_eq(array2D &R, array2D &G, array2D &B, const stru } -void ImProcFunctions::ciecamloc_02float(int sp, LabImage* lab) +void ImProcFunctions::ciecamloc_02float(int sp, LabImage* lab, int call) { - //be careful quasi duplicate with branch cat02wb //BENCHFUN - + bool ciec = false; + if (params->locallab.spots.at(sp).ciecam && params->locallab.spots.at(sp).explog && call == 1) { + ciec = true; + } int width = lab->W, height = lab->H; float Yw; Yw = 1.0f; @@ -2074,12 +2424,121 @@ void ImProcFunctions::ciecamloc_02float(int sp, LabImage* lab) double Xwout, Zwout; double Xwsc, Zwsc; - int tempo; + LUTu hist16J(32768, LUT_CLIP_BELOW | LUT_CLIP_ABOVE, true); + LUTu hist16Q(32768, LUT_CLIP_BELOW | LUT_CLIP_ABOVE, true); + //for J light and contrast + LUTf CAMBrightCurveJ(32768, LUT_CLIP_BELOW | LUT_CLIP_ABOVE); + LUTf CAMBrightCurveQ(32768, LUT_CLIP_BELOW | LUT_CLIP_ABOVE); - if (params->locallab.spots.at(sp).warm > 0) { - tempo = 5000 - 30 * params->locallab.spots.at(sp).warm; - } else { - tempo = 5000 - 49 * params->locallab.spots.at(sp).warm; +#ifdef _OPENMP + const int numThreads = min(max(width * height / 65536, 1), omp_get_max_threads()); + #pragma omp parallel num_threads(numThreads) if(numThreads>1) +#endif + { + LUTu hist16Jthr(hist16J.getSize(), LUT_CLIP_BELOW | LUT_CLIP_ABOVE, true); + LUTu hist16Qthr(hist16Q.getSize(), LUT_CLIP_BELOW | LUT_CLIP_ABOVE, true); + +#ifdef _OPENMP + #pragma omp for +#endif + + for (int i = 0; i < height; i++) { + for (int j = 0; j < width; j++) { //rough correspondence between L and J + float currL = lab->L[i][j] / 327.68f; + float koef; //rough correspondence between L and J + + if (currL > 50.f) { + if (currL > 70.f) { + if (currL > 80.f) { + if (currL > 85.f) { + koef = 0.97f; + } else { + koef = 0.93f; + } + } else { + koef = 0.87f; + } + } else { + if (currL > 60.f) { + koef = 0.85f; + } else { + koef = 0.8f; + } + } + } else { + if (currL > 10.f) { + if (currL > 20.f) { + if (currL > 40.f) { + koef = 0.75f; + } else { + koef = 0.7f; + } + } else { + koef = 0.9f; + } + } else { + koef = 1.0; + } + } + + hist16Jthr[(int)((koef * lab->L[i][j]))]++; //evaluate histogram luminance L # J + hist16Qthr[CLIP((int)(32768.f * sqrt((koef * (lab->L[i][j])) / 32768.f)))]++; //for brightness Q : approximation for Q=wh*sqrt(J/100) J not equal L + } + } + +#ifdef _OPENMP + #pragma omp critical +#endif + { + hist16J += hist16Jthr; + hist16Q += hist16Qthr; + } + } +#ifdef _OPENMP + static_cast(numThreads); // to silence cppcheck warning +#endif + + //evaluate lightness, contrast + + if (ciec) { + const float contL = 0.6 * params->locallab.spots.at(sp).contl; //0.6 less effect, no need 1. + const float lightL = 0.4 * params->locallab.spots.at(sp).lightl; //0.4 less effect, no need 1. + const float contQ = 0.5 * params->locallab.spots.at(sp).contq; //0.5 less effect, no need 1. + const float lightQ = 0.4 * params->locallab.spots.at(sp).lightq; //0.4 less effect, no need 1. + + float contthresL = params->locallab.spots.at(sp).contthres; + float contthresQ = contthresL; + if(contL < 0.f) { + contthresL *= -1; + } + float thL = 0.6f; + thL = 0.3f * contthresL + 0.6f; + + if(contQ < 0.f) { + contthresQ *= -1; + } + float thQ = 0.6f; + thQ = 0.3f * contthresQ + 0.6f; + Ciecam02::curveJfloat(lightL, contL, thL, hist16J, CAMBrightCurveJ); //lightness J and contrast J + CAMBrightCurveJ /= 327.68f; + + Ciecam02::curveJfloat(lightQ, contQ, thQ, hist16Q, CAMBrightCurveQ); //brightness Q and contrast Q + } + int tempo = 5000; + if(params->locallab.spots.at(sp).expvibrance && call == 2) { + if (params->locallab.spots.at(sp).warm > 0) { + tempo = 5000 - 30 * params->locallab.spots.at(sp).warm; + } else if (params->locallab.spots.at(sp).warm < 0){ + tempo = 5000 - 70 * params->locallab.spots.at(sp).warm; + } + } + + if(ciec) { + if (params->locallab.spots.at(sp).catad > 0) { + tempo = 5000 - 30 * params->locallab.spots.at(sp).catad; + } else if (params->locallab.spots.at(sp).catad < 0){ + tempo = 5000 - 70 * params->locallab.spots.at(sp).catad; + } } ColorTemp::temp2mulxyz(params->wb.temperature, params->wb.method, Xw, Zw); //compute white Xw Yw Zw : white current WB @@ -2092,9 +2551,33 @@ void ImProcFunctions::ciecamloc_02float(int sp, LabImage* lab) nc = 1.00f; //viewing condition for surround f2 = 1.0f, c2 = 0.69f, nc2 = 1.0f; - //with which algorithm - // alg = 0; + if(ciec) { + //surround source with only 2 choices (because Log encoding before) + if (params->locallab.spots.at(sp).sursour == "Average") { + f = 1.0f, c = 0.69f, nc = 1.0f; + } else if (params->locallab.spots.at(sp).sursour == "Dim") { + f = 0.9f; + c = 0.59f; + nc = 0.9f; + } + //viewing condition for surround + if (params->locallab.spots.at(sp).surround == "Average") { + f2 = 1.0f, c2 = 0.69f, nc2 = 1.0f; + } else if (params->locallab.spots.at(sp).surround == "Dim") { + f2 = 0.9f; + c2 = 0.59f; + nc2 = 0.9f; + } else if (params->locallab.spots.at(sp).surround == "Dark") { + f2 = 0.8f; + c2 = 0.525f; + nc2 = 0.8f; + } else if (params->locallab.spots.at(sp).surround == "ExtremelyDark") { + f2 = 0.8f; + c2 = 0.41f; + nc2 = 0.8f; + } + } xwd = 100.0 * Xwout; zwd = 100.0 * Zwout; @@ -2105,18 +2588,51 @@ void ImProcFunctions::ciecamloc_02float(int sp, LabImage* lab) yws = 100.f; - yb2 = 18; //La and la2 = ambiant luminosity scene and viewing la = 400.f; - const float la2 = 400.f; + float la2 = 400.f; + if(ciec) { + la = params->locallab.spots.at(sp).sourceabs; + + la2 = params->locallab.spots.at(sp).targabs; + } + const float pilot = 2.f; const float pilotout = 2.f; //algoritm's params - // const float rstprotection = 100. ;//- params->colorappearance.rstprotection; - LUTu hist16J; - LUTu hist16Q; float yb = 18.f; + yb2 = 18; + if(ciec) { + yb = params->locallab.spots.at(sp).targetGray;//target because we are after Log encoding + + yb2 = params->locallab.spots.at(sp).targetGray; + } + + float schr = 0.f; + float mchr = 0.f; + + if (ciec) { + schr = params->locallab.spots.at(sp).saturl; + + if (schr > 0.f) { + schr = schr / 2.f; //divide sensibility for saturation + } + + if (schr == -100.f) { + schr = -99.8f; + } + + mchr = params->locallab.spots.at(sp).colorfl; + + if (mchr == -100.0f) { + mchr = -99.8f ; + } + if (mchr == 100.0f) { + mchr = 99.9f; + } + } + float d, dj; // const int gamu = 0; //(params->colorappearance.gamut) ? 1 : 0; @@ -2124,17 +2640,20 @@ void ImProcFunctions::ciecamloc_02float(int sp, LabImage* lab) yw = 100.f * Yw; zw = 100.0 * Zw; float xw1 = xws, yw1 = yws, zw1 = zws, xw2 = xwd, yw2 = ywd, zw2 = zwd; - float cz, wh, pfl; - Ciecam02::initcam1float(yb, pilot, f, la, xw, yw, zw, n, d, nbb, ncb, cz, aw, wh, pfl, fl, c); -// const float chr = 0.f; + int c16 = 16;//always cat16 + Ciecam02::initcam1float(yb, pilot, f, la, xw, yw, zw, n, d, nbb, ncb, cz, aw, wh, pfl, fl, c, c16); const float pow1 = pow_F(1.64f - pow_F(0.29f, n), 0.73f); float nj, nbbj, ncbj, czj, awj, flj; - Ciecam02::initcam2float(yb2, pilotout, f2, la2, xw2, yw2, zw2, nj, dj, nbbj, ncbj, czj, awj, flj); + Ciecam02::initcam2float(yb2, pilotout, f2, la2, xw2, yw2, zw2, nj, dj, nbbj, ncbj, czj, awj, flj, c16); #ifdef __SSE2__ const float reccmcz = 1.f / (c2 * czj); #endif + const float epsil = 0.0001f; + const float coefQ = 32767.f / wh; const float pow1n = pow_F(1.64f - pow_F(0.29f, nj), 0.73f); + const float coe = pow_F(fl, 0.25f); + const float QproFactor = (0.4f / c) * (aw + 4.0f) ; #ifdef __SSE2__ int bufferLength = ((width + 3) / 4) * 4; // bufferLength has to be a multiple of 4 @@ -2159,21 +2678,20 @@ void ImProcFunctions::ciecamloc_02float(int sp, LabImage* lab) #ifdef __SSE2__ // vectorized conversion from Lab to jchqms int k; - vfloat x, y, z; - vfloat J, C, h, Q, M, s; - vfloat c655d35 = F2V(655.35f); for (k = 0; k < width - 3; k += 4) { + vfloat x, y, z; Color::Lab2XYZ(LVFU(lab->L[i][k]), LVFU(lab->a[i][k]), LVFU(lab->b[i][k]), x, y, z); x = x / c655d35; y = y / c655d35; z = z / c655d35; + vfloat J, C, h, Q, M, s; Ciecam02::xyz2jchqms_ciecam02float(J, C, h, Q, M, s, F2V(aw), F2V(fl), F2V(wh), x, y, z, F2V(xw1), F2V(yw1), F2V(zw1), - F2V(c), F2V(nc), F2V(pow1), F2V(nbb), F2V(ncb), F2V(pfl), F2V(cz), F2V(d)); + F2V(c), F2V(nc), F2V(pow1), F2V(nbb), F2V(ncb), F2V(pfl), F2V(cz), F2V(d), c16); STVF(Jbuffer[k], J); STVF(Cbuffer[k], C); STVF(hbuffer[k], h); @@ -2197,7 +2715,7 @@ void ImProcFunctions::ciecamloc_02float(int sp, LabImage* lab) Q, M, s, aw, fl, wh, x, y, z, xw1, yw1, zw1, - c, nc, pow1, nbb, ncb, pfl, cz, d); + c, nc, pow1, nbb, ncb, pfl, cz, d, c16); Jbuffer[k] = J; Cbuffer[k] = C; hbuffer[k] = h; @@ -2235,7 +2753,7 @@ void ImProcFunctions::ciecamloc_02float(int sp, LabImage* lab) Q, M, s, aw, fl, wh, x, y, z, xw1, yw1, zw1, - c, nc, pow1, nbb, ncb, pfl, cz, d); + c, nc, pow1, nbb, ncb, pfl, cz, d, c16); #endif float Jpro, Cpro, hpro, Qpro, Mpro, spro; Jpro = J; @@ -2246,7 +2764,40 @@ void ImProcFunctions::ciecamloc_02float(int sp, LabImage* lab) spro = s; /* */ + if(ciec) { + Qpro = CAMBrightCurveQ[(float)(Qpro * coefQ)] / coefQ; //brightness and contrast + float rstprotection = 50.f;//default value to avoid 1 slider + float chr = 0.f;//no use of chroma + float Mp, sres; + Mp = Mpro / 100.0f; + Ciecam02::curvecolorfloat(mchr, Mp, sres, 2.5f); + float dred = 100.f; //in C mode + float protect_red = 80.0f; // in C mode + dred *= coe; //in M mode + protect_red *= coe; //M mode + Color::skinredfloat(Jpro, hpro, sres, Mp, dred, protect_red, 0, rstprotection, 100.f, Mpro); + Jpro = SQR((10.f * Qpro) / wh); + Qpro = (Qpro == 0.f ? epsil : Qpro); // avoid division by zero + spro = 100.0f * sqrtf(Mpro / Qpro); + if (Jpro > 99.9f) { + Jpro = 99.9f; + } + + Jpro = CAMBrightCurveJ[(float)(Jpro * 327.68f)]; //lightness CIECAM02 + contrast + float Sp = spro / 100.0f; + Ciecam02::curvecolorfloat(schr, Sp, sres, 1.5f); + dred = 100.f; // in C mode + protect_red = 80.0f; // in C mode + dred = 100.0f * sqrtf((dred * coe) / Q); + protect_red = 100.0f * sqrtf((protect_red * coe) / Q); + Color::skinredfloat(Jpro, hpro, sres, Sp, dred, protect_red, 0, rstprotection, 100.f, spro); + Qpro = QproFactor * sqrtf(Jpro); + float Cp = (spro * spro * Qpro) / (1000000.f); + Cpro = Cp * 100.f; + Ciecam02::curvecolorfloat(chr, Cp, sres, 1.8f); + Color::skinredfloat(Jpro, hpro, sres, Cp, 55.f, 30.f, 1, rstprotection, 100.f, Cpro); + } //retrieve values C,J...s C = Cpro; @@ -2268,7 +2819,7 @@ void ImProcFunctions::ciecamloc_02float(int sp, LabImage* lab) Ciecam02::jch2xyz_ciecam02float(xx, yy, zz, J, C, h, xw2, yw2, zw2, - c2, nc2, pow1n, nbbj, ncbj, flj, czj, dj, awj); + c2, nc2, pow1n, nbbj, ncbj, flj, czj, dj, awj, c16); x = xx * 655.35f; y = yy * 655.35f; z = zz * 655.35f; @@ -2288,10 +2839,11 @@ void ImProcFunctions::ciecamloc_02float(int sp, LabImage* lab) float *zbuffer = sbuffer; for (k = 0; k < bufferLength; k += 4) { + vfloat x, y, z; Ciecam02::jch2xyz_ciecam02float(x, y, z, LVF(Jbuffer[k]), LVF(Cbuffer[k]), LVF(hbuffer[k]), F2V(xw2), F2V(yw2), F2V(zw2), - F2V(nc2), F2V(pow1n), F2V(nbbj), F2V(ncbj), F2V(flj), F2V(dj), F2V(awj), F2V(reccmcz)); + F2V(nc2), F2V(pow1n), F2V(nbbj), F2V(ncbj), F2V(flj), F2V(dj), F2V(awj), F2V(reccmcz), c16); STVF(xbuffer[k], x * c655d35); STVF(ybuffer[k], y * c655d35); STVF(zbuffer[k], z * c655d35); @@ -2405,9 +2957,9 @@ void ImProcFunctions::softprocess(const LabImage* bufcolorig, array2D &bu } } - double aepsil = (epsilmax - epsilmin) / 90.f; - double bepsil = epsilmax - 100.f * aepsil; - double epsil = aepsil * rad + bepsil; + double aepsil = (epsilmax - epsilmin) / 90.0; + double bepsil = epsilmax - 100.0 * aepsil; + double epsil = aepsil * static_cast(rad) + bepsil; float blur = 1.f / sk * (thres + 0.8f * rad); guidedFilter(guidsoft, buflight, buflight, blur, epsil, multiThread, 4); @@ -2422,7 +2974,7 @@ void ImProcFunctions::softprocess(const LabImage* bufcolorig, array2D &bu } } -void ImProcFunctions::exlabLocal(local_params& lp, int bfh, int bfw, int bfhr, int bfwr, LabImage* bufexporig, LabImage* lab, const LUTf& hltonecurve, const LUTf& shtonecurve, const LUTf& tonecurve, const float hueref, const float lumaref, const float chromaref) +void ImProcFunctions::exlabLocal(local_params& lp, float strlap, int bfh, int bfw, int bfhr, int bfwr, LabImage* bufexporig, LabImage* lab, const LUTf& hltonecurve, const LUTf& shtonecurve, const LUTf& tonecurve, const float hueref, const float lumaref, const float chromaref) { //BENCHFUN //exposure local @@ -2457,10 +3009,10 @@ void ImProcFunctions::exlabLocal(local_params& lp, int bfh, int bfw, int bfhr, i deltaEforLaplace(dE.get(), diffde, bfwr, bfhr, bufexporig, hueref, chromaref, lumaref); - constexpr float alap = 600.f; - constexpr float blap = 100.f; - constexpr float aa = (alap - blap) / 50.f; - constexpr float bb = 100.f - 30.f * aa; + float alap = strlap * 600.f; + float blap = strlap * 100.f; + float aa = (alap - blap) / 50.f; + float bb = blap - 30.f * aa; float lap; if (diffde > 80.f) { @@ -2747,6 +3299,159 @@ void ImProcFunctions::DeNoise_Local(int call, const struct local_params& lp, Lab } } +void ImProcFunctions::DeNoise_Local2(const struct local_params& lp, LabImage* originalmask, int levred, float hueref, float lumaref, float chromaref, LabImage* original, LabImage* transformed, const LabImage &tmp1, int cx, int cy, int sk) +{ + //warning, but I hope used it next + // local denoise and impulse + //simple algo , perhaps we can improve as the others, but noise is here and not good for hue detection + // BENCHFUN + const int ystart = rtengine::max(static_cast(lp.yc - lp.lyT) - cy, 0); + const int yend = rtengine::min(static_cast(lp.yc + lp.ly) - cy, original->H); + const int xstart = rtengine::max(static_cast(lp.xc - lp.lxL) - cx, 0); + const int xend = rtengine::min(static_cast(lp.xc + lp.lx) - cx, original->W); + + + lumaref *= 327.68f; + const float ach = lp.trans / 100.f; + + const float factnoise1 = 1.f + (lp.noisecf) / 500.f; + const float factnoise2 = 1.f + (lp.noisecc) / 500.f; + const float factnoise = factnoise1 * factnoise2; + + const int GW = transformed->W; + const int GH = transformed->H; + + const float colorde = lp.colorde == 0 ? -1.f : lp.colorde; // -1.f to avoid black + const float amplabL = 2.f * colorde; + constexpr float darklim = 5000.f; + + const float refa = chromaref * std::cos(hueref) * 327.68f; + const float refb = chromaref * std::sin(hueref) * 327.68f; + const bool usemaskbl = lp.showmaskblmet == 2 || lp.enablMask || lp.showmaskblmet == 4; + const bool blshow = lp.showmaskblmet == 1 || lp.showmaskblmet == 2; + const bool previewbl = lp.showmaskblmet == 4; + + const std::unique_ptr origblur(new LabImage(GW, GH)); + const float radius = 3.f / sk; + + if (usemaskbl) { +#ifdef _OPENMP + #pragma omp parallel if (multiThread) +#endif + { + gaussianBlur(originalmask->L, origblur->L, GW, GH, radius); + gaussianBlur(originalmask->a, origblur->a, GW, GH, radius); + gaussianBlur(originalmask->b, origblur->b, GW, GH, radius); + } + } else { +#ifdef _OPENMP + #pragma omp parallel if (multiThread) +#endif + { + gaussianBlur(original->L, origblur->L, GW, GH, radius); + gaussianBlur(original->a, origblur->a, GW, GH, radius); + gaussianBlur(original->b, origblur->b, GW, GH, radius); + } + } + + // const int begx = lp.xc - lp.lxL; + // const int begy = lp.yc - lp.lyT; + constexpr float r327d68 = 1.f / 327.68f; + +#ifdef _OPENMP + #pragma omp parallel if (multiThread) +#endif + { + const LabImage* maskptr = origblur.get(); + const float mindE = 2.f + MINSCOPE * lp.sensden * lp.thr; + const float maxdE = 5.f + MAXSCOPE * lp.sensden * (1 + 0.1f * lp.thr); + const float mindElim = 2.f + MINSCOPE * limscope * lp.thr; + const float maxdElim = 5.f + MAXSCOPE * limscope * (1 + 0.1f * lp.thr); + +#ifdef _OPENMP + #pragma omp for schedule(dynamic,16) +#endif + + for (int y = ystart; y < yend; y++) { + const int loy = cy + y; +// const bool isZone0 = loy > lp.yc + lp.ly || loy < lp.yc - lp.lyT; // whole line is zone 0 => we can skip a lot of processing + +// if (isZone0) { // outside selection and outside transition zone => no effect, keep original values +// continue; + // } + + for (int x = xstart, lox = cx + x; x < xend; x++, lox++) { + int zone; + float localFactor = 1.f; + + if (lp.shapmet == 0) { + calcTransition(lox, loy, ach, lp, zone, localFactor); + } else { /*if (lp.shapmet == 1)*/ + calcTransitionrect(lox, loy, ach, lp, zone, localFactor); + } + + if (zone == 0) { // outside selection and outside transition zone => no effect, keep original values + continue; + } + + float reducdEL = 1.f; + float reducdEa = 1.f; + float reducdEb = 1.f; + + if (levred == 7) { + const float dEL = std::sqrt(0.9f * SQR(refa - maskptr->a[y][x]) + 0.9f * SQR(refb - maskptr->b[y][x]) + 1.2f * SQR(lumaref - maskptr->L[y][x])) * r327d68; + const float dEa = std::sqrt(1.2f * SQR(refa - maskptr->a[y][x]) + 1.f * SQR(refb - maskptr->b[y][x]) + 0.8f * SQR(lumaref - maskptr->L[y][x])) * r327d68; + const float dEb = std::sqrt(1.f * SQR(refa - maskptr->a[y][x]) + 1.2f * SQR(refb - maskptr->b[y][x]) + 0.8f * SQR(lumaref - maskptr->L[y][x])) * r327d68; + reducdEL = SQR(calcreducdE(dEL, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, lp.sensden)); + reducdEa = SQR(calcreducdE(dEa, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, lp.sensden)); + reducdEb = SQR(calcreducdE(dEb, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, lp.sensden)); + } + + float difL, difa, difb; + + // if (call == 2 /*|| call == 1 || call == 3 */) { //simpleprocess + // difL = tmp1.L[loy - begy][lox - begx] - original->L[y][x]; + // difa = tmp1.a[loy - begy][lox - begx] - original->a[y][x]; + // difb = tmp1.b[loy - begy][lox - begx] - original->b[y][x]; + // } else { //dcrop + + difL = tmp1.L[y-ystart][x-xstart] - original->L[y][x]; + difa = tmp1.a[y-ystart][x-xstart] - original->a[y][x]; + difb = tmp1.b[y-ystart][x-xstart] - original->b[y][x]; + // } + + difL *= localFactor * reducdEL; + difa *= localFactor * reducdEa; + difb *= localFactor * reducdEb; + transformed->L[y][x] = CLIP(original->L[y][x] + difL); + transformed->a[y][x] = clipC((original->a[y][x] + difa) * factnoise); + transformed->b[y][x] = clipC((original->b[y][x] + difb) * factnoise) ; + + if (blshow) { + transformed->L[y][x] = CLIP(12000.f + amplabL * difL);// * 10.f empirical to can visualize modifications + transformed->a[y][x] = clipC(amplabL * difa);// * 10.f empirical to can visualize modifications + transformed->b[y][x] = clipC(amplabL * difb);// * 10.f empirical to can visualize modifications + } else if (previewbl || lp.prevdE) { + const float difbdisp = (reducdEL + reducdEa + reducdEb) * 10000.f * colorde; + + if (transformed->L[y][x] < darklim) { //enhance dark luminance as user can see! + transformed->L[y][x] = darklim - transformed->L[y][x]; + } + + if (colorde <= 0) { + transformed->a[y][x] = 0.f; + transformed->b[y][x] = difbdisp; + } else { + transformed->a[y][x] = -difbdisp; + transformed->b[y][x] = 0.f; + } + } + } + } + } +} + + void ImProcFunctions::InverseReti_Local(const struct local_params & lp, const float hueref, const float chromaref, const float lumaref, LabImage * original, LabImage * transformed, const LabImage * const tmp1, int cx, int cy, int chro, int sk) { // BENCHFUN @@ -2861,8 +3566,7 @@ void ImProcFunctions::InverseReti_Local(const struct local_params & lp, const fl - -void ImProcFunctions::InverseBlurNoise_Local(LabImage * originalmask, float **bufchro, const struct local_params & lp, const float hueref, const float chromaref, const float lumaref, LabImage * original, LabImage * transformed, const LabImage * const tmp1, int cx, int cy, int sk) +void ImProcFunctions::InverseBlurNoise_Local(LabImage * originalmask, const struct local_params & lp, const float hueref, const float chromaref, const float lumaref, LabImage * original, LabImage * transformed, const LabImage * const tmp1, int cx, int cy, int sk) { // BENCHFUN //inverse local blur and noise @@ -2937,40 +3641,30 @@ void ImProcFunctions::InverseBlurNoise_Local(LabImage * originalmask, float **bu if (lp.shapmet == 0) { calcTransition(lox, loy, ach, lp, zone, localFactor); - } else /*if (lp.shapmet == 1)*/ { + } else { calcTransitionrect(lox, loy, ach, lp, zone, localFactor); } - - const float clc = (previewbl) ? settings->previewselection * 100.f : bufchro[y][x]; - float abdelta2 = SQR(refa - maskptr->a[y][x]) + SQR(refb - maskptr->b[y][x]); - float chrodelta2 = SQR(std::sqrt(SQR(maskptr->a[y][x]) + SQR(maskptr->b[y][x])) - (chromaref * 327.68f)); - float huedelta2 = abdelta2 - chrodelta2; - - float dE = std::sqrt(kab * (kch * chrodelta2 + kH * huedelta2) + kL * SQR(refL - maskptr->L[y][x])); - const float reducdE = calcreducdE(dE, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, lp.sensbn); - const float realstrchdE = reducdE * clc; + float reducdE; + if (zone != 2) { + float abdelta2 = SQR(refa - maskptr->a[y][x]) + SQR(refb - maskptr->b[y][x]); + float chrodelta2 = SQR(std::sqrt(SQR(maskptr->a[y][x]) + SQR(maskptr->b[y][x])) - (chromaref * 327.68f)); + float huedelta2 = abdelta2 - chrodelta2; + float dE = std::sqrt(kab * (kch * chrodelta2 + kH * huedelta2) + kL * SQR(refL - maskptr->L[y][x])); + reducdE = calcreducdE(dE, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, lp.sensbn); + } switch (zone) { case 0: { // outside selection and outside transition zone => full effect, no transition - float difL = tmp1->L[y][x] - original->L[y][x]; - transformed->L[y][x] = CLIP(original->L[y][x] + difL * reducdE); - float difa = tmp1->a[y][x] - original->a[y][x]; - float difb = tmp1->b[y][x] - original->b[y][x]; - float flia = 1.f, flib = 1.f; - flia = flib = ((100.f + realstrchdE) / 100.f); - const float chra = tmp1->a[y][x]; - const float chrb = tmp1->b[y][x]; - - if (!lp.actsp) { - difa = chra * flia - original->a[y][x]; - difb = chrb * flib - original->b[y][x]; - transformed->a[y][x] = clipC(original->a[y][x] + difa); - transformed->b[y][x] = clipC(original->b[y][x] + difb); - } + const float diflc = (tmp1->L[y][x] - original->L[y][x]) * reducdE; + const float difa = (tmp1->a[y][x] - original->a[y][x]) * reducdE; + const float difb = (tmp1->b[y][x] - original->b[y][x]) * reducdE; + transformed->L[y][x] = CLIP(original->L[y][x] + diflc); + transformed->a[y][x] = clipC(original->a[y][x] + difa) ; + transformed->b[y][x] = clipC(original->b[y][x] + difb); if (blshow) { - transformed->L[y][x] = CLIP(12000.f + difL); + transformed->L[y][x] = CLIP(12000.f + diflc); transformed->a[y][x] = clipC(difa); transformed->b[y][x] = clipC(difb); } else if (previewbl || lp.prevdE) { @@ -2982,31 +3676,17 @@ void ImProcFunctions::InverseBlurNoise_Local(LabImage * originalmask, float **bu } case 1: { // inside transition zone - float difL = tmp1->L[y][x] - original->L[y][x]; - float difa = tmp1->a[y][x] - original->a[y][x]; - float difb = tmp1->b[y][x] - original->b[y][x]; - float flia = 1.f, flib = 1.f; - flia = flib = ((100.f + realstrchdE) / 100.f); - const float chra = tmp1->a[y][x]; - const float chrb = tmp1->b[y][x]; + const float factorx = 1.f - localFactor; - float factorx = 1.f - localFactor; - difL *= factorx; - - transformed->L[y][x] = CLIP(original->L[y][x] + difL * reducdE); - - if (!lp.actsp) { - difa = chra * flia - original->a[y][x]; - difb = chrb * flib - original->b[y][x]; - difa *= factorx; - difb *= factorx; - transformed->a[y][x] = clipC(original->a[y][x] + difa); - transformed->b[y][x] = clipC(original->b[y][x] + difb); - - } + const float diflc = (tmp1->L[y][x] - original->L[y][x]) * (reducdE * factorx); + const float difa = (tmp1->a[y][x] - original->a[y][x]) * (reducdE * factorx); + const float difb = (tmp1->b[y][x] - original->b[y][x]) * (reducdE * factorx); + transformed->L[y][x] = CLIP(original->L[y][x] + diflc); + transformed->a[y][x] = clipC(original->a[y][x] + difa) ; + transformed->b[y][x] = clipC(original->b[y][x] + difb); if (blshow) { - transformed->L[y][x] = CLIP(12000.f + difL); + transformed->L[y][x] = CLIP(12000.f + diflc); transformed->a[y][x] = clipC(difa); transformed->b[y][x] = clipC(difb); } else if (previewbl) { @@ -3017,14 +3697,10 @@ void ImProcFunctions::InverseBlurNoise_Local(LabImage * originalmask, float **bu break; } - case 2: { // inside selection => no effect, keep original values + case 2: { // outside selection and outside transition zone => no effect, keep original values transformed->L[y][x] = original->L[y][x]; - - if (!lp.actsp) { - - transformed->a[y][x] = original->a[y][x]; - transformed->b[y][x] = original->b[y][x]; - } + transformed->a[y][x] = original->a[y][x]; + transformed->b[y][x] = original->b[y][x]; } } } @@ -3032,6 +3708,8 @@ void ImProcFunctions::InverseBlurNoise_Local(LabImage * originalmask, float **bu } } + + static void mean_fab(int xstart, int ystart, int bfw, int bfh, LabImage* bufexporig, const LabImage* original, float &fab, float &meanfab, float chrom, bool multiThread) { const int nbfab = bfw * bfh; @@ -3051,12 +3729,12 @@ static void mean_fab(int xstart, int ystart, int bfw, int bfh, LabImage* bufexpo for (int x = 0; x < bfw; x++) { bufexporig->a[y][x] = original->a[y + ystart][x + xstart]; bufexporig->b[y][x] = original->b[y + ystart][x + xstart]; - sumab += std::fabs(bufexporig->a[y][x]); - sumab += std::fabs(bufexporig->b[y][x]); + sumab += static_cast(std::fabs(bufexporig->a[y][x])); + sumab += static_cast(std::fabs(bufexporig->b[y][x])); } } - meanfab = sumab / (2.f * nbfab); + meanfab = sumab / (2.0 * nbfab); double som = 0.0; @@ -3065,7 +3743,7 @@ static void mean_fab(int xstart, int ystart, int bfw, int bfh, LabImage* bufexpo #endif for (int y = 0; y < bfh; y++) { for (int x = 0; x < bfw; x++) { - som += SQR(std::fabs(bufexporig->a[y][x]) - meanfab) + SQR(std::fabs(bufexporig->b[y][x]) - meanfab); + som += static_cast(SQR(std::fabs(bufexporig->a[y][x]) - meanfab) + SQR(std::fabs(bufexporig->b[y][x]) - meanfab)); } } @@ -3157,8 +3835,8 @@ void calclocalGradientParams(const struct local_params& lp, struct grad_params& double gradient_stops = stops; double gradient_center_x = LIM01((lp.xc - xstart) / bfw); double gradient_center_y = LIM01((lp.yc - ystart) / bfh); - double gradient_angle = angs / 180.0 * rtengine::RT_PI; - double varfeath = 0.01 * lp.feath; + double gradient_angle = static_cast(angs) / 180.0 * rtengine::RT_PI; + double varfeath = 0.01f * lp.feath; //printf("xstart=%f ysta=%f lpxc=%f lpyc=%f stop=%f bb=%f cc=%f ang=%f ff=%d gg=%d\n", xstart, ystart, lp.xc, lp.yc, gradient_stops, gradient_center_x, gradient_center_y, gradient_angle, w, h); @@ -3219,11 +3897,11 @@ void calclocalGradientParams(const struct local_params& lp, struct grad_params& gp.ta = tan(gradient_angle); gp.xc = w * gradient_center_x; gp.yc = h * gradient_center_y; - gp.ys = std::sqrt((float)h * h + (float)w * w) * (varfeath / cos(gradient_angle)); - gp.ys_inv = 1.0 / gp.ys; - gp.top_edge_0 = gp.yc - gp.ys / 2.0; + gp.ys = std::sqrt(h * h + w * w) * (varfeath / cos(gradient_angle)); + gp.ys_inv = 1.f / gp.ys; + gp.top_edge_0 = gp.yc - gp.ys / 2.f; - if (gp.ys < 1.0 / h) { + if (gp.ys < 1.f / h) { gp.ys_inv = 0; gp.ys = 0; } @@ -3462,6 +4140,48 @@ static void showmask(int lumask, const local_params& lp, int xstart, int ystart, } } } +//from A.Griggio...very similar to discrete_laplacian_threhold...some differences with ceiling and data format +void ImProcFunctions::laplacian(const array2D &src, array2D &dst, int bfw, int bfh, float threshold, float ceiling, float factor, bool multiThread) +{ + const int W = bfw; + const int H = bfh; + + const auto X = + [W](int x) -> int + { + return x < 0 ? x+2 : (x >= W ? x-2 : x); + }; + + const auto Y = + [H](int y) -> int + { + return y < 0 ? y+2 : (y >= H ? y-2 : y); + }; + + const auto get = + [&src](int y, int x) -> float + { + return std::max(src[y][x], 0.f); + }; + + dst(W, H); + const float f = factor / ceiling; + +#ifdef _OPENMP +# pragma omp parallel for if (multiThread) +#endif + for (int y = 0; y < H; ++y) { + int n = Y(y-1), s = Y(y+1); + for (int x = 0; x < W; ++x) { + int w = X(x-1), e = X(x+1); + float v = -8.f * get(y, x) + get(n, x) + get(s, x) + get(y, w) + get(y, e) + get(n, w) + get(n, e) + get(s, w) + get(s, e); + dst[y][x] = LIM(std::abs(v) - threshold, 0.f, ceiling) * f; + } + } +} + + + void ImProcFunctions::discrete_laplacian_threshold(float * data_out, const float * data_in, size_t nx, size_t ny, float t) { @@ -3600,8 +4320,8 @@ void ImProcFunctions::mean_dt(const float* data, size_t size, double& mean_p, do #pragma omp parallel for reduction(+:mean,dt) if(multiThread) #endif for (size_t i = 0; i < size; i++) { - mean += data[i]; - dt += SQR(data[i]); + mean += static_cast(data[i]); + dt += static_cast(SQR(data[i])); } mean /= size; @@ -3611,7 +4331,7 @@ void ImProcFunctions::mean_dt(const float* data, size_t size, double& mean_p, do dt_p = std::sqrt(dt); } -void ImProcFunctions::normalize_mean_dt(float * data, const float * ref, size_t size, float mod, float sigm) +void ImProcFunctions::normalize_mean_dt(float * data, const float * ref, size_t size, float mod, float sigm, float mdef, float sdef, float mdef2, float sdef2) { /* * Copyright 2009-2011 IPOL Image Processing On Line http://www.ipol.im/ @@ -3621,7 +4341,7 @@ void ImProcFunctions::normalize_mean_dt(float * data, const float * ref, size_t * @brief laplacian, DFT and Poisson routines * * @author Nicolas Limare - * adapted for Rawtherapee - jacques Desmis july 2019 + * adapted for Rawtherapee - jacques Desmis july 2019 - march 2021 */ if (NULL == data || NULL == ref) { @@ -3632,15 +4352,26 @@ void ImProcFunctions::normalize_mean_dt(float * data, const float * ref, size_t double mean_ref, mean_data, dt_ref, dt_data; /* compute mean and variance of the two arrays */ - mean_dt(ref, size, mean_ref, dt_ref); - mean_dt(data, size, mean_data, dt_data); + if(mdef!= 0.f && sdef != 0.f) { + mean_ref = mdef; + dt_ref = sdef; + } else { + mean_dt(ref, size, mean_ref, dt_ref); + } + if(mdef2!= 0.f && sdef2 != 0.f) { + // printf("OK shortcut\n"); + mean_data = mdef2; + dt_data = sdef2; + } else { + mean_dt(data, size, mean_data, dt_data); + } /* compute the normalization coefficients */ const double a = dt_ref / dt_data; const double b = mean_ref - a * mean_data; - const float modma = mod * a; - const float sigmmmodmb = sigm * mod * b; + const float modma = static_cast(mod) * a; + const float sigmmmodmb = static_cast(sigm) * static_cast(mod) * b; const float onesmod = 1.f - mod; /* normalize the array */ @@ -3777,7 +4508,7 @@ void ImProcFunctions::retinex_pde(const float * datain, float * dataout, int bfw fftwf_free(data_fft); if (show != 4 && normalize == 1) { - normalize_mean_dt(data_tmp, datain, bfw * bfh, 1.f, 1.f); + normalize_mean_dt(data_tmp, datain, bfw * bfh, 1.f, 1.f, 0.f, 0.f, 0.f, 0.f); } if (show == 0 || show == 4) { @@ -3933,8 +4664,9 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int if (lochhhmasCurve && lhhmasutili) { for (int i = 0; i < 500; i++) { - if (lochhhmasCurve[i] != 0.5) { + if (lochhhmasCurve[i] != 0.5f) { HHmaskcurve = true; + break; } } } @@ -4021,40 +4753,6 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int kmaskHL = 32768.f * valHH; } - /* - //keep here in case of...but !! - if (lochhhmasCurve && HHmaskcurve) { - - #ifdef __SSE2__ - huemah = atan2BufferH[jr]; - #else - huemah = xatan2f(bufcolorig->b[ir][jr], bufcolorig->a[ir][jr]); - #endif - - float hh = Color::huelab_to_huehsv2(huemah); - hh += 1.f / 6.f; - - if (hh > 1.f) { - hh -= 1.f; - } - - const float val_HH = float (LIM01(((0.5f - lochhhmasCurve[500.f * hh])))); - kmaskHH = 2.f * val_HH; - const float hhro = kmaskHH; - - if (hhro != 0) { - newhr = huemah + hhro; - - if (newhr > rtengine::RT_PI_F) { - newhr -= 2 * rtengine::RT_PI_F; - } else if (newhr < -rtengine::RT_PI_F) { - newhr += 2 * rtengine::RT_PI_F; - } - } - sincosval = xsincosf(newhr); - - } - */ bufmaskblurcol->L[ir][jr] = clipLoc(kmaskL + kmaskHL + kmasstru + kmasblur); bufmaskblurcol->a[ir][jr] = clipC((kmaskC + chromult * kmaskH)); bufmaskblurcol->b[ir][jr] = clipC((kmaskC + chromult * kmaskH)); @@ -4073,6 +4771,32 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int } } } + if (lap > 0.f && pde) { + array2D mask; + mask(bfw, bfh); + float amount = LIM01(float(lap)/100.f); + array2D LL(bfw, bfh, bufcolorig->L, ARRAY2D_BYREFERENCE); + laplacian(LL, mask, bfw, bfh, 25.f, 20000.f, amount, false); +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + for (int i = 0; i < bfh; ++i) { + for (int j = 0; j < bfw; ++j) { + mask[i][j] = LIM01(mask[i][j]); + } + } + for (int i = 0; i < 3; ++i) { + boxblur(static_cast(mask), static_cast(mask), 5 / sk, bfw, bfh, false); + } +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + for (int i = 0; i < bfh; ++i) { + for (int j = 0; j < bfw; ++j) { + bufmaskblurcol->L[i][j] += clipLoc(100000.f * (mask[i][j]));//increase strongly result + } + } + } std::unique_ptr bufprov; if (delt) { @@ -4082,8 +4806,8 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int if (rad != 0.f) { const float tmpblur = rad < 0.f ? -1.f / rad : 1.f + rad; - const int r1 = rtengine::max(4 / sk * tmpblur + 0.5, 1); - const int r2 = rtengine::max(25 / sk * tmpblur + 0.5, 1); + const int r1 = rtengine::max(4 / sk * tmpblur + 0.5f, 1); + const int r2 = rtengine::max(25 / sk * tmpblur + 0.5f, 1); constexpr float epsilmax = 0.005f; constexpr float epsilmin = 0.00001f; @@ -4157,8 +4881,9 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int if (loclmasCurvecolwav && lmasutilicolwav) { for (int i = 0; i < 500; i++) { - if (loclmasCurvecolwav[i] != 0.5) { + if (loclmasCurvecolwav[i] != 0.5f) { wavcurvemask = true; + break; } } } @@ -4353,7 +5078,7 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int } } } - +/* if (lap > 0.f) { const float *datain = bufmaskblurcol->L[0]; const std::unique_ptr data_tmp(new float[bfh * bfw]); @@ -4373,6 +5098,7 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int } } } + */ } const float radiusb = 1.f / sk; @@ -4416,7 +5142,7 @@ void ImProcFunctions::InverseSharp_Local(float **loctemp, const float hueref, co lp.colorde = -1;//to avoid black } - float ampli = 1.f + std::fabs(lp.colorde); + float ampli = 1.0 + std::fabs(lp.colorde); ampli = 2.f + 0.5f * (ampli - 2.f); constexpr float aadark = -1.f; @@ -4549,7 +5275,7 @@ void ImProcFunctions::Sharp_Local(int call, float **loctemp, int senstype, const lp.colorde = -1;//to avoid black } - float ampli = 1.f + std::fabs(lp.colorde); + float ampli = 1.0 + std::fabs(lp.colorde); ampli = 2.f + 0.5f * (ampli - 2.f); float darklim = 5000.f; @@ -4793,8 +5519,10 @@ void ImProcFunctions::Exclude_Local(float **deltaso, float hueref, float chromar } + + -void ImProcFunctions::transit_shapedetect_retinex(int call, int senstype, LabImage * bufexporig, LabImage * bufmask, LabImage * buforigmas, float **buflight, float **bufchro, const float hueref, const float chromaref, const float lumaref, const struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk) +void ImProcFunctions::transit_shapedetect_retinex(int call, int senstype, LabImage * bufexporig, LabImage * bufexpfin, LabImage * bufmask, LabImage * buforigmas, float **buflight, float **bufchro, const float hueref, const float chromaref, const float lumaref, struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk) { //BENCHFUN @@ -4825,7 +5553,17 @@ void ImProcFunctions::transit_shapedetect_retinex(int call, int senstype, LabIma const float kab = balancedeltaE(lp.balance) / SQR(327.68f); const float kH = lp.balanceh; const float kch = balancedeltaE(kH); + if (lp.colorde == 0) { + lp.colorde = -1;//to avoid black + } +/* + float ampli = 1.f + std::fabs(lp.colorde); + ampli = 2.f + 0.5f * (ampli - 2.f); + float darklim = 5000.f; + float aadark = -1.f; + float bbdark = darklim; +*/ const bool showmas = lp.showmaskretimet == 3 ; const std::unique_ptr origblur(new LabImage(GW, GH)); @@ -4833,9 +5571,8 @@ void ImProcFunctions::transit_shapedetect_retinex(int call, int senstype, LabIma const bool usemaskreti = lp.enaretiMask && senstype == 4 && !lp.enaretiMasktmap; float strcli = 0.03f * lp.str; - if (lp.scalereti == 1) - { - strcli = 0.015 * lp.str; + if (lp.scalereti == 1) { + strcli = 0.015f * lp.str; } #ifdef _OPENMP @@ -4856,7 +5593,7 @@ void ImProcFunctions::transit_shapedetect_retinex(int call, int senstype, LabIma const float maxdE = 5.f + MAXSCOPE * varsens * (1 + 0.1f * lp.thr); const float mindElim = 2.f + MINSCOPE * limscope * lp.thr; const float maxdElim = 5.f + MAXSCOPE * limscope * (1 + 0.1f * lp.thr); - const float previewint = settings->previewselection; + float previewint = 0.f; //reducdE * 10000.f * lp.colorde; //settings->previewselection; #ifdef _OPENMP #pragma omp for schedule(dynamic,16) @@ -4908,17 +5645,19 @@ void ImProcFunctions::transit_shapedetect_retinex(int call, int senstype, LabIma } float cli, clc; + const float reducdE = calcreducdE(dE, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, varsens) / 100.f; + previewint = reducdE * 10000.f * lp.colorde; //settings->previewselection; if (call == 2) { cli = buflight[y - ystart][x - xstart]; clc = previewreti ? settings->previewselection * 100.f : bufchro[y - ystart][x - xstart]; } else { cli = buflight[y][x]; - clc = previewreti ? settings->previewselection * 100.f : bufchro[y][x]; + // clc = previewreti ? settings->previewselection * 100.f : bufchro[y][x]; + clc = previewreti ? reducdE * 10000.f * lp.colorde: bufchro[y][x]; } - const float reducdE = calcreducdE(dE, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, varsens) / 100.f; cli *= reducdE; clc *= reducdE; @@ -4992,7 +5731,8 @@ void ImProcFunctions::transit_shapedetect_retinex(int call, int senstype, LabIma transformed->b[y][x] = clipC(difb); } - if (previewreti) { + if (previewreti || lp.prevdE) { + difb = (bufexpfin->b[y][x] - original->b[y][x]) * localFactor; transformed->a[y][x] = 0.f; transformed->b[y][x] = previewint * difb; } @@ -5020,7 +5760,8 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage * bufexpo const int xend = rtengine::min(static_cast(lp.xc + lp.lx) - cx, original->W); const int bfw = xend - xstart; const int bfh = yend - ystart; - // printf("h=%f l=%f c=%f s=%f\n", hueref, lumaref, chromaref, sobelref); +// printf("h=%f l=%f c=%f s=%f\n", hueref, lumaref, chromaref, sobelref); +// printf("bfh=%i bfw=%i\n", bfh, bfw); const float ach = lp.trans / 100.f; float varsens = lp.sensex; @@ -5093,7 +5834,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage * bufexpo data[(y - ystart)* bfw + (x - xstart)] = bufexporig->L[y - ystart][x - xstart]; } - normalize_mean_dt(data, datain, bfh * bfw, 1.f, 1.f); + normalize_mean_dt(data, datain, bfh * bfw, 1.f, 1.f, 0.f, 0.f, 0.f, 0.f); #ifdef _OPENMP #pragma omp parallel for if (multiThread) #endif @@ -5341,7 +6082,7 @@ void ImProcFunctions::InverseColorLight_Local(bool tonequ, bool tonecurv, int sp } } else if (senstype == 1) { //exposure - ImProcFunctions::exlabLocal(lp, GH, GW, GW, GH, original, temp.get(), hltonecurveloc, shtonecurveloc, tonecurveloc, hueref, lumaref, chromaref); + ImProcFunctions::exlabLocal(lp, 1.f, GH, GW, GW, GH, original, temp.get(), hltonecurveloc, shtonecurveloc, tonecurveloc, hueref, lumaref, chromaref); if (exlocalcurve) { #ifdef _OPENMP @@ -5614,7 +6355,7 @@ void ImProcFunctions::calc_ref(int sp, LabImage * original, LabImage * transform if (params->locallab.enabled) { //always calculate hueref, chromaref, lumaref before others operations use in normal mode for all modules exceprt denoise struct local_params lp; - calcLocalParams(sp, oW, oH, params->locallab, lp, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, locwavCurveden, locwavdenutili); + calcLocalParams(sp, oW, oH, params->locallab, lp, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, locwavCurveden, locwavdenutili); int begy = lp.yc - lp.lyT; int begx = lp.xc - lp.lxL; int yEn = lp.yc + lp.ly; @@ -5678,11 +6419,11 @@ void ImProcFunctions::calc_ref(int sp, LabImage * original, LabImage * transform deltasobelL = new LabImage(spotSi, spotSi); bool isdenoise = false; - if ((lp.noiself > 0.f || lp.noiself0 > 0.f || lp.noiself2 > 0.f || lp.noiselc > 0.f || lp.noisecf > 0.f || lp.noisecc > 0.f) && lp.denoiena) { + if ((lp.noiself > 0.f || lp.noiself0 > 0.f || lp.noiself2 > 0.f || lp.wavcurvedenoi || lp.noiselc > 0.f || lp.noisecf > 0.f || lp.noisecc > 0.f) && lp.denoiena) { isdenoise = true; } - if (isdenoise) { + if (isdenoise) { origblur = new LabImage(spotSi, spotSi); blurorig = new LabImage(spotSi, spotSi); @@ -5712,10 +6453,10 @@ void ImProcFunctions::calc_ref(int sp, LabImage * original, LabImage * transform for (int y = 0; y < spotSi; y++) { for (int x = 0; x < spotSi; x++) { - aveLblur += blurorig->L[y][x]; - aveAblur += blurorig->a[y][x]; - aveBblur += blurorig->b[y][x]; - aveChroblur += std::sqrt(SQR(blurorig->b[y - cy][x - cx]) + SQR(blurorig->a[y - cy][x - cx])); + aveLblur += static_cast(blurorig->L[y][x]); + aveAblur += static_cast(blurorig->a[y][x]); + aveBblur += static_cast(blurorig->b[y][x]); + aveChroblur += static_cast(std::sqrt(SQR(blurorig->b[y - cy][x - cx]) + SQR(blurorig->a[y - cy][x - cx]))); nsb++; } @@ -5725,10 +6466,10 @@ void ImProcFunctions::calc_ref(int sp, LabImage * original, LabImage * transform //ref for luma, chroma, hue for (int y = rtengine::max(cy, (int)(lp.yc - spotSize)); y < rtengine::min(transformed->H + cy, (int)(lp.yc + spotSize + 1)); y++) { for (int x = rtengine::max(cx, (int)(lp.xc - spotSize)); x < rtengine::min(transformed->W + cx, (int)(lp.xc + spotSize + 1)); x++) { - aveL += original->L[y - cy][x - cx]; - aveA += original->a[y - cy][x - cx]; - aveB += original->b[y - cy][x - cx]; - aveChro += std::sqrt(SQR(original->b[y - cy][x - cx]) + SQR(original->a[y - cy][x - cx])); + aveL += static_cast(original->L[y - cy][x - cx]); + aveA += static_cast(original->a[y - cy][x - cx]); + aveB += static_cast(original->b[y - cy][x - cx]); + aveChro += static_cast(std::sqrt(SQR(original->b[y - cy][x - cx]) + SQR(original->a[y - cy][x - cx]))); nab++; } } @@ -5754,7 +6495,7 @@ void ImProcFunctions::calc_ref(int sp, LabImage * original, LabImage * transform for (int y = 0; y < spotSi ; y ++) for (int x = 0; x < spotSi ; x ++) { - avesobel += sobelL->L[y][x]; + avesobel += static_cast(sobelL->L[y][x]); nbs++; } @@ -5768,21 +6509,21 @@ void ImProcFunctions::calc_ref(int sp, LabImage * original, LabImage * transform aveA = aveA / nab; aveB = aveB / nab; aveChro = aveChro / nab; - aveChro /= 327.68f; - avA = aveA / 327.68f; - avB = aveB / 327.68f; - avL = aveL / 327.68f; + aveChro /= 327.68; + avA = aveA / 327.68; + avB = aveB / 327.68; + avL = aveL / 327.68; hueref = xatan2f(avB, avA); //mean hue if (isdenoise) { aveLblur = aveLblur / nsb; aveChroblur = aveChroblur / nsb; - aveChroblur /= 327.68f; + aveChroblur /= 327.68; aveAblur = aveAblur / nsb; aveBblur = aveBblur / nsb; - float avAblur = aveAblur / 327.68f; - float avBblur = aveBblur / 327.68f; - float avLblur = aveLblur / 327.68f; + float avAblur = aveAblur / 327.68; + float avBblur = aveBblur / 327.68; + float avLblur = aveLblur / 327.68; huerefblur = xatan2f(avBblur, avAblur); chromarefblur = aveChroblur; lumarefblur = avLblur; @@ -5802,9 +6543,7 @@ void ImProcFunctions::calc_ref(int sp, LabImage * original, LabImage * transform delete blurorig; } - if (lumaref > 95.f) {//to avoid crash - lumaref = 95.f; - } + lumaref = rtengine::min(lumaref, 95.f); //to avoid crash } } //doc fftw3 says optimum is with size 2^a * 3^b * 5^c * 7^d * 11^e * 13^f with e+f = 0 or 1 @@ -5864,7 +6603,7 @@ void optfft(int N_fftwsize, int &bfh, int &bfw, int &bfhr, int &bfwr, struct loc //optimize with size fftw bool reduW = false; bool reduH = false; - + bool exec = true; if (ystart == 0 && yend < H) { lp.ly -= (bfh - ftsizeH); } else if (ystart != 0 && yend == H) { @@ -5876,8 +6615,10 @@ void optfft(int N_fftwsize, int &bfh, int &bfw, int &bfhr, int &bfwr, struct loc lp.ly -= (bfh - ftsizeH); } } else if (ystart == 0 && yend == H) { - bfhr = ftsizeH; + // bfhr = ftsizeH; + bfhr = bfh; reduH = true; + exec = false; } if (xstart == 0 && xend < W) { @@ -5891,8 +6632,10 @@ void optfft(int N_fftwsize, int &bfh, int &bfw, int &bfhr, int &bfwr, struct loc lp.lx -= (bfw - ftsizeW); } } else if (xstart == 0 && xend == W) { - bfwr = ftsizeW; + // bfwr = ftsizeW; + bfwr = bfw; reduW = true; + exec = false; } //new values optimized @@ -5903,21 +6646,20 @@ void optfft(int N_fftwsize, int &bfh, int &bfw, int &bfhr, int &bfwr, struct loc bfh = bfhr = yend - ystart; bfw = bfwr = xend - xstart; - if (reduH) { + if (reduH && exec) { bfhr = ftsizeH; + } else { + bfhr = bfh; } - if (reduW) { + if (reduW && exec) { bfwr = ftsizeW; - } - - if (settings->verbose) { - printf("Nyst=%i Nyen=%i lp.yc=%f lp.lyT=%f lp.ly=%f bfh=%i bfhr=%i origH=%i ftsizeH=%i\n", ystart, yend, lp.yc, lp.lyT, lp.ly, bfh, bfhr, H, ftsizeH); - printf("Nxst=%i Nxen=%i lp.xc=%f lp.lxL=%f lp.lx=%f bfw=%i bfwr=%i origW=%i ftsizeW=%i\n", xstart, xend, lp.xc, lp.lxL, lp.lx, bfw, bfwr, W, ftsizeW); + } else { + bfwr = bfw; } } -void ImProcFunctions::BlurNoise_Local(LabImage *tmp1, LabImage * originalmask, float **bufchro, const float hueref, const float chromaref, const float lumaref, local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk) +void ImProcFunctions::BlurNoise_Local(LabImage *tmp1, LabImage * originalmask, const float hueref, const float chromaref, const float lumaref, local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk) { //local BLUR //BENCHFUN @@ -5946,7 +6688,7 @@ void ImProcFunctions::BlurNoise_Local(LabImage *tmp1, LabImage * originalmask, f lp.colorde = -1;//to avoid black } - const float ampli = 1.5f + 0.5f * std::fabs(lp.colorde); + const float ampli = 1.5f + 0.5f * std::abs(lp.colorde); constexpr float darklim = 5000.f; constexpr float aadark = -1.f; @@ -6015,19 +6757,14 @@ void ImProcFunctions::BlurNoise_Local(LabImage *tmp1, LabImage * originalmask, f const float huedelta2 = abdelta2 - chrodelta2; const float dE = std::sqrt(kab * (kch * chrodelta2 + kH * huedelta2) + kL * SQR(refL - maskptr->L[y][x])); const float reducdE = calcreducdE(dE, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, lp.sensbn); - const float clc = previewbl ? settings->previewselection * 100.f : bufchro[y - ystart][x - xstart]; - const float realstrchdE = reducdE * clc; float difL = (tmp1->L[y - ystart][x - xstart] - original->L[y][x]) * localFactor * reducdE; transformed->L[y][x] = CLIP(original->L[y][x] + difL); - const float fli = (100.f + realstrchdE) / 100.f; - const float difa = tmp1->a[y - ystart][x - xstart] * fli - original->a[y][x] * localFactor; - const float difb = tmp1->b[y - ystart][x - xstart] * fli - original->b[y][x] * localFactor; + const float difa = (tmp1->a[y - ystart][x - xstart] - original->a[y][x]) * localFactor * reducdE; + const float difb = (tmp1->b[y - ystart][x - xstart] - original->b[y][x]) * localFactor * reducdE; - if (!lp.actsp) { - transformed->a[y][x] = clipC(original->a[y][x] + difa); - transformed->b[y][x] = clipC(original->b[y][x] + difb); - } + transformed->a[y][x] = clipC(original->a[y][x] + difa); + transformed->b[y][x] = clipC(original->b[y][x] + difb); const float maxdifab = rtengine::max(std::fabs(difa), std::fabs(difb)); @@ -6066,7 +6803,7 @@ void ImProcFunctions::BlurNoise_Local(LabImage *tmp1, LabImage * originalmask, f } } -void ImProcFunctions::transit_shapedetect2(int call, int senstype, const LabImage * bufexporig, const LabImage * bufexpfin, LabImage * originalmask, const float hueref, const float chromaref, const float lumaref, float sobelref, float meansobel, float ** blend2, struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk) +void ImProcFunctions::transit_shapedetect2(int sp, float meantm, float stdtm, int call, int senstype, const LabImage * bufexporig, const LabImage * bufexpfin, LabImage * originalmask, const float hueref, const float chromaref, const float lumaref, float sobelref, float meansobel, float ** blend2, struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk) { //initialize coordinates int ystart = rtengine::max(static_cast(lp.yc - lp.lyT) - cy, 0); @@ -6132,6 +6869,7 @@ void ImProcFunctions::transit_shapedetect2(int call, int senstype, const LabImag const bool tmshow = ((lp.showmasktmmet == 1 || lp.showmasktmmet == 2) && senstype == 8); const bool lcshow = ((lp.showmasklcmet == 1 || lp.showmasklcmet == 2) && senstype == 10); const bool origshow = ((lp.showmasksoftmet == 5) && senstype == 3 && lp.softmet == 1); + const bool logshow = ((lp.showmasklogmet == 1 || lp.showmasklogmet == 2) && senstype == 11); const bool masshow = ((lp.showmask_met == 1) && senstype == 20); @@ -6143,6 +6881,7 @@ void ImProcFunctions::transit_shapedetect2(int call, int senstype, const LabImag const bool previewlc = ((lp.showmasklcmet == 4) && senstype == 10); const bool previeworig = ((lp.showmasksoftmet == 6) && senstype == 3 && lp.softmet == 1); const bool previewmas = ((lp.showmask_met == 3) && senstype == 20); + const bool previewlog = ((lp.showmasklogmet == 4) && senstype == 11); float radius = 3.f / sk; @@ -6167,7 +6906,7 @@ void ImProcFunctions::transit_shapedetect2(int call, int senstype, const LabImag lp.colorde = -1;//to avoid black } - float ampli = 1.f + std::fabs(lp.colorde); + float ampli = 1.f + std::abs(lp.colorde); ampli = 2.f + 0.5f * (ampli - 2.f); float darklim = 5000.f; @@ -6181,7 +6920,8 @@ void ImProcFunctions::transit_shapedetect2(int call, int senstype, const LabImag const bool usemasktm = (lp.showmasktmmet == 2 || lp.enatmMask || lp.showmasktmmet == 4) && senstype == 8; const bool usemasklc = (lp.showmasklcmet == 2 || lp.enalcMask || lp.showmasklcmet == 4) && senstype == 10; const bool usemaskmas = (lp.showmask_met == 1 || lp.ena_Mask || lp.showmask_met == 3) && senstype == 20; - const bool usemaskall = (usemaskexp || usemaskvib || usemaskcol || usemaskSH || usemasktm || usemasklc || usemaskmas); + const bool usemasklog = (lp.showmasklogmet == 2 || lp.enaLMask || lp.showmasklogmet == 4) && senstype == 11; + const bool usemaskall = (usemaskexp || usemaskvib || usemaskcol || usemaskSH || usemasktm || usemasklc || usemasklog || usemaskmas); //blur a little mask if (usemaskall) { @@ -6209,8 +6949,21 @@ void ImProcFunctions::transit_shapedetect2(int call, int senstype, const LabImag datain[(y - ystart) * bfw + (x - xstart)] = original->L[y][x]; data[(y - ystart)* bfw + (x - xstart)] = bufexpfin->L[y - ystart][x - xstart]; } - - normalize_mean_dt(data, datain, bfh * bfw, 1.f, 1.f); + if(call == 3 || call == 2) {//improccoordinator and simpleprocess + normalize_mean_dt(data, datain, bfw * bfh, 1.f, 1.f, 0.f, 0.f, 0.f, 0.f); + } else if(call == 1) {//dcrop + float ma = meantm; + float sa = stdtm; + float ma2 = (float) params->locallab.spots.at(sp).noiselumc; + float sa2 = (float) params->locallab.spots.at(sp).softradiustm; + //printf("ma=%f sa=%f ma2=%f sa2=%f\n", (double) ma, (double) sa, (double) ma2, (double) sa2); + //use normalize with mean and stdv + normalize_mean_dt(data, datain, bfw * bfh, 1.f, 1.f, ma, sa, ma2, sa2); + } + + + + #ifdef _OPENMP #pragma omp parallel for #endif @@ -6366,13 +7119,13 @@ void ImProcFunctions::transit_shapedetect2(int call, int senstype, const LabImag const float difb = factorx * realstrbdE; float maxdifab = rtengine::max(std::fabs(difa), std::fabs(difb)); - if ((expshow || vibshow || colshow || SHshow || tmshow || lcshow || origshow || masshow) && lp.colorde < 0) { //show modifications with use "b" + if ((expshow || vibshow || colshow || SHshow || tmshow || lcshow || logshow || origshow || masshow) && lp.colorde < 0) { //show modifications with use "b" // (origshow && lp.colorde < 0) { //original Retinex transformed->a[y + ystart][x + xstart] = 0.f; transformed->b[y + ystart][x + xstart] = ampli * 8.f * diflc * reducdE; transformed->L[y + ystart][x + xstart] = CLIP(12000.f + 0.5f * ampli * diflc); - } else if ((expshow || vibshow || colshow || SHshow || tmshow || lcshow || origshow || masshow) && lp.colorde > 0) {//show modifications without use "b" + } else if ((expshow || vibshow || colshow || SHshow || tmshow || lcshow || logshow || origshow || masshow) && lp.colorde > 0) {//show modifications without use "b" if (diflc < 1000.f) {//if too low to be view use ab diflc += 0.5f * maxdifab; } @@ -6380,7 +7133,7 @@ void ImProcFunctions::transit_shapedetect2(int call, int senstype, const LabImag transformed->L[y + ystart][x + xstart] = CLIP(12000.f + 0.5f * ampli * diflc); transformed->a[y + ystart][x + xstart] = clipC(ampli * difa); transformed->b[y + ystart][x + xstart] = clipC(ampli * difb); - } else if (previewexp || previewvib || previewcol || previewSH || previewtm || previewlc || previeworig || previewmas || lp.prevdE) {//show deltaE + } else if (previewexp || previewvib || previewcol || previewSH || previewtm || previewlc || previewlog || previeworig || previewmas || lp.prevdE) {//show deltaE float difbdisp = reducdE * 10000.f * lp.colorde; if (transformed->L[y + ystart][x + xstart] < darklim) { //enhance dark luminance as user can see! @@ -6460,7 +7213,7 @@ void ImProcFunctions::exposure_pde(float * dataor, float * datain, float * datao } #endif - normalize_mean_dt(data, dataor, bfw * bfh, mod, 1.f); + normalize_mean_dt(data, dataor, bfw * bfh, mod, 1.f, 0.f, 0.f, 0.f, 0.f); { #ifdef _OPENMP @@ -6538,7 +7291,7 @@ void ImProcFunctions::fftw_convol_blur(float * input, float * output, int bfw, i } else if (algo == 1) { n_x = 1.f / bfw; //gauss n_y = 1.f / bfh; - radsig = 1.f / (2.f * rtengine::RT_PI * radius * radius);//gauss + radsig = 1.f / (2.f * rtengine::RT_PI_F * radius * radius);//gauss } n_x = n_x * n_x; @@ -6831,7 +7584,7 @@ void ImProcFunctions::fftw_tile_blur(int GW, int GH, int tilssize, int max_numbl } int topproc = (vblk - 1) * offset; - const int numblox_W = ceil((static_cast(GW)) / offset); + const int lnumblox_W = ceil((static_cast(GW)) / offset); const float DCTnorm = 1.0f / (4 * tilssize * tilssize); //for DCT int imin = rtengine::max(0, - topproc); @@ -6839,7 +7592,7 @@ void ImProcFunctions::fftw_tile_blur(int GW, int GH, int tilssize, int max_numbl int imax = bottom - topproc; for (int i = imin; i < imax; ++i) { - for (int hblk = 0; hblk < numblox_W; ++hblk) { + for (int hblk = 0; hblk < lnumblox_W; ++hblk) { int left = (hblk - 1) * offset; int right = rtengine::min(left + tilssize, GW); int jmin = rtengine::max(0, -left); @@ -7221,10 +7974,7 @@ void ImProcFunctions::wavcont(const struct local_params& lp, float ** tmp, wavel #endif for (int dir = 1; dir < 4; dir++) { for (int level = level_bl; level < maxlvl; ++level) { - const int W_L = wdspot.level_W(level); - const int H_L = wdspot.level_H(level); - const auto wav_L = wdspot.level_coeffs(level)[dir]; - madL[level][dir - 1] = Mad(wav_L, W_L * H_L);//evaluate noise by level + madL[level][dir - 1] = Mad(wdspot.level_coeffs(level)[dir], wdspot.level_W(level) * wdspot.level_H(level)); //evaluate noise by level } } @@ -7416,21 +8166,21 @@ void ImProcFunctions::wavcontrast4(struct local_params& lp, float ** tmp, float } } - int W_L = wdspot->level_W(0); - int H_L = wdspot->level_H(0); + int W_Level = wdspot->level_W(0); + int H_Level = wdspot->level_H(0); float *wav_L0 = wdspot->get_coeff0(); if (radblur > 0.f && blurena) { - float* src[H_L]; - for (int i = 0; i < H_L; ++i) { - src[i] = &wav_L0[i * W_L]; + float* src[H_Level]; + for (int i = 0; i < H_Level; ++i) { + src[i] = &wav_L0[i * W_Level]; } #ifdef _OPENMP #pragma omp parallel if (multiThread) #endif { - gaussianBlur(src, src, W_L, H_L, radblur); + gaussianBlur(src, src, W_Level, H_Level, radblur); } } @@ -7438,7 +8188,7 @@ void ImProcFunctions::wavcontrast4(struct local_params& lp, float ** tmp, float const float Compression = expf(-compress); const float DetailBoost = std::max(compress, 0.f); - CompressDR(wav_L0, W_L, H_L, Compression, DetailBoost); + CompressDR(wav_L0, W_Level, H_Level, Compression, DetailBoost); } if ((lp.residsha < 0.f || lp.residhi < 0.f)) { @@ -7460,7 +8210,7 @@ void ImProcFunctions::wavcontrast4(struct local_params& lp, float ** tmp, float #ifdef _OPENMP #pragma omp parallel for if (multiThread) #endif - for (int i = 0; i < W_L * H_L; i++) { + for (int i = 0; i < W_Level * H_Level; i++) { const float LL100 = wav_L0[i] / 327.68f; if (LL100 < lp.residshathr) { @@ -7479,14 +8229,14 @@ void ImProcFunctions::wavcontrast4(struct local_params& lp, float ** tmp, float } if ((lp.residsha > 0.f || lp.residhi > 0.f)) { - const std::unique_ptr temp(new LabImage(W_L, H_L)); + const std::unique_ptr temp(new LabImage(W_Level, H_Level)); #ifdef _OPENMP #pragma omp parallel for if (multiThread) #endif - for (int i = 0; i < H_L; i++) { - for (int j = 0; j < W_L; j++) { - temp->L[i][j] = wav_L0[i * W_L + j]; + for (int i = 0; i < H_Level; i++) { + for (int j = 0; j < W_Level; j++) { + temp->L[i][j] = wav_L0[i * W_Level + j]; } } @@ -7496,25 +8246,25 @@ void ImProcFunctions::wavcontrast4(struct local_params& lp, float ** tmp, float #pragma omp parallel for if (multiThread) #endif - for (int i = 0; i < H_L; i++) { - for (int j = 0; j < W_L; j++) { - wav_L0[i * W_L + j] = temp->L[i][j]; + for (int i = 0; i < H_Level; i++) { + for (int j = 0; j < W_Level; j++) { + wav_L0[i * W_Level + j] = temp->L[i][j]; } } } - if (contrast != 0.) { + if (contrast != 0.f) { double avedbl = 0.0; // use double precision for large summations #ifdef _OPENMP #pragma omp parallel for reduction(+:avedbl) if (multiThread) #endif - for (int i = 0; i < W_L * H_L; i++) { - avedbl += wav_L0[i]; + for (int i = 0; i < W_Level * H_Level; i++) { + avedbl += static_cast(wav_L0[i]); } - const float avg = LIM01(avedbl / (32768.f * W_L * H_L)); - double contreal = 0.6 * contrast; + const double avg = LIM01(avedbl / (32768.0 * W_Level * H_Level)); + double contreal = 0.6f * contrast; DiagonalCurve resid_contrast({ DCT_NURBS, 0, 0, @@ -7525,8 +8275,8 @@ void ImProcFunctions::wavcontrast4(struct local_params& lp, float ** tmp, float #ifdef _OPENMP #pragma omp parallel for if (multiThread) #endif - for (int i = 0; i < W_L * H_L; i++) { - wav_L0[i] = resid_contrast.getVal(LIM01(wav_L0[i] / 32768.f)) * 32768.f; + for (int i = 0; i < W_Level * H_Level; i++) { + wav_L0[i] = resid_contrast.getVal(LIM01(wav_L0[i] / 32768.f)) * 32768.0; } } @@ -7577,19 +8327,17 @@ void ImProcFunctions::wavcontrast4(struct local_params& lp, float ** tmp, float float eddlow = 15.f; float eddlipinfl = 0.005f * lp.edgw + 0.4f; float eddlipampl = 1.f + lp.basew / 50.f; - int W_L = wdspot->level_W(0);//provisory W_L H_L - int H_L = wdspot->level_H(0); float *koeLi[12]; float maxkoeLi[12] = {0.f}; - float *koeLibuffer = new float[12 * H_L * W_L]; //12 + float *koeLibuffer = new float[12 * H_Level * W_Level]; //12 for (int i = 0; i < 12; i++) { - koeLi[i] = &koeLibuffer[i * W_L * H_L]; + koeLi[i] = &koeLibuffer[i * W_Level * H_Level]; } - array2D tmC(W_L, H_L); + array2D tmC(W_Level, H_Level); float gradw = lp.gradw; float tloww = lp.tloww; @@ -7613,8 +8361,8 @@ void ImProcFunctions::wavcontrast4(struct local_params& lp, float ** tmp, float #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) #endif - for (int i = 1; i < H_L - 1; i++) { - for (int j = 1; j < W_L - 1; j++) { + for (int i = 1; i < H_Level - 1; i++) { + for (int j = 1; j < W_Level - 1; j++) { //treatment of koeLi and maxkoeLi if (lp.lip3) {//Sobel Canny algo improve with parameters // comparison between pixel and neighbors @@ -7623,16 +8371,16 @@ void ImProcFunctions::wavcontrast4(struct local_params& lp, float ** tmp, float const auto somm = neigh ? 40.f : 50.f; for (int dir = 1; dir < 4; dir++) { //neighbors proxi - koeLi[lvl * 3 + dir - 1][i * W_L + j] = (kneigh * koeLi[lvl * 3 + dir - 1][i * W_L + j] + - 2.f * koeLi[lvl * 3 + dir - 1][(i - 1) * W_L + j] + 2.f * koeLi[lvl * 3 + dir - 1][(i + 1) * W_L + j] + 2.f * koeLi[lvl * 3 + dir - 1][i * W_L + j + 1] + 2.f * koeLi[lvl * 3 + dir - 1][i * W_L + j - 1] - + koeLi[lvl * 3 + dir - 1][(i - 1) * W_L + j - 1] + koeLi[lvl * 3 + dir - 1][(i - 1) * W_L + j + 1] + koeLi[lvl * 3 + dir - 1][(i + 1) * W_L + j - 1] + koeLi[lvl * 3 + dir - 1][(i + 1) * W_L + j + 1]) / somm; + koeLi[lvl * 3 + dir - 1][i * W_Level + j] = (kneigh * koeLi[lvl * 3 + dir - 1][i * W_Level + j] + + 2.f * koeLi[lvl * 3 + dir - 1][(i - 1) * W_Level + j] + 2.f * koeLi[lvl * 3 + dir - 1][(i + 1) * W_Level + j] + 2.f * koeLi[lvl * 3 + dir - 1][i * W_Level + j + 1] + 2.f * koeLi[lvl * 3 + dir - 1][i * W_Level + j - 1] + + koeLi[lvl * 3 + dir - 1][(i - 1) * W_Level + j - 1] + koeLi[lvl * 3 + dir - 1][(i - 1) * W_Level + j + 1] + koeLi[lvl * 3 + dir - 1][(i + 1) * W_Level + j - 1] + koeLi[lvl * 3 + dir - 1][(i + 1) * W_Level + j + 1]) / somm; } } float interm = 0.f; for (int dir = 1; dir < 4; dir++) { //here I evaluate combination of vert / diag / horiz...we are with multiplicators of the signal - interm += SQR(koeLi[lvl * 3 + dir - 1][i * W_L + j]); + interm += SQR(koeLi[lvl * 3 + dir - 1][i * W_Level + j]); } interm = std::sqrt(interm) * 0.57736721f; @@ -7640,8 +8388,8 @@ void ImProcFunctions::wavcontrast4(struct local_params& lp, float ** tmp, float constexpr float eps = 0.0001f; // I think this double ratio (alph, beta) is better than arctg - float alph = koeLi[lvl * 3][i * W_L + j] / (koeLi[lvl * 3 + 1][i * W_L + j] + eps); //ratio between horizontal and vertical - float beta = koeLi[lvl * 3 + 2][i * W_L + j] / (koeLi[lvl * 3 + 1][i * W_L + j] + eps); //ratio between diagonal and horizontal + float alph = koeLi[lvl * 3][i * W_Level + j] / (koeLi[lvl * 3 + 1][i * W_Level + j] + eps); //ratio between horizontal and vertical + float beta = koeLi[lvl * 3 + 2][i * W_Level + j] / (koeLi[lvl * 3 + 1][i * W_Level + j] + eps); //ratio between diagonal and horizontal //alph evaluate the direction of the gradient regularity Lipschitz // if = 1 we are on an edge @@ -7684,7 +8432,7 @@ void ImProcFunctions::wavcontrast4(struct local_params& lp, float ** tmp, float } //we can change this part of algo==> not equal but ponderate - koeLi[lvl * 3][i * W_L + j] = koeLi[lvl * 3 + 1][i * W_L + j] = koeLi[lvl * 3 + 2][i * W_L + j] = interm; //new value + koeLi[lvl * 3][i * W_Level + j] = koeLi[lvl * 3 + 1][i * W_Level + j] = koeLi[lvl * 3 + 2][i * W_Level + j] = interm; //new value //here KoeLi contains values where gradient is high and coef high, and eliminate low values... } } @@ -7970,7 +8718,7 @@ void ImProcFunctions::wavcontrast4(struct local_params& lp, float ** tmp, float } -void ImProcFunctions::fftw_denoise(int GW, int GH, int max_numblox_W, int min_numblox_W, float **tmp1, array2D *Lin, int numThreads, const struct local_params & lp, int chrom) +void ImProcFunctions::fftw_denoise(int sk, int GW, int GH, int max_numblox_W, int min_numblox_W, float **tmp1, array2D *Lin, int numThreads, const struct local_params & lp, int chrom) { // BENCHFUN @@ -8122,23 +8870,17 @@ void ImProcFunctions::fftw_denoise(int GW, int GH, int max_numblox_W, int min_nu if (chrom == 0) { params_Ldetail = rtengine::min(float(lp.noiseldetail), 99.9f); // max out to avoid div by zero when using noisevar_Ldetail as divisor - noisevar_Ldetail = SQR(static_cast(SQR(100. - params_Ldetail) + 50.*(100. - params_Ldetail)) * TS * 0.5f); + noisevar_Ldetail = SQR(static_cast(SQR(100.f - params_Ldetail) + 50.f * (100.f - params_Ldetail)) * TS * 0.5f); } else if (chrom == 1) { params_Ldetail = rtengine::min(float(lp.noisechrodetail), 99.9f); - // noisevar_Ldetail = 100.f * pow((static_cast(SQR(100. - params_Ldetail) + 50.*(100. - params_Ldetail)) * TS * 0.5f), 2);//to test ??? - noisevar_Ldetail = 100.f * pow((static_cast(SQR(100. - params_Ldetail)) * TS * 0.5f), 2);//to test ??? + noisevar_Ldetail = 100.f * rtengine::SQR((static_cast(SQR(100.f - params_Ldetail)) * TS * 0.5f));//to test ??? } - // float noisevar_Ldetail = SQR(static_cast(SQR(100. - params_Ldetail) + 50.*(100. - params_Ldetail)) * TS * 0.5f); - - - for (int hblk = 0; hblk < numblox_W; ++hblk) { ImProcFunctions::RGBtile_denoise(fLblox, hblk, noisevar_Ldetail); }//end of horizontal block loop - //now perform inverse FT of an entire row of blocks if (numblox_W == max_numblox_W) { fftwf_execute_r2r(plan_backward_blox[0], fLblox, Lblox); //for DCT @@ -8154,30 +8896,52 @@ void ImProcFunctions::fftw_denoise(int GW, int GH, int max_numblox_W, int min_nu }//end of vertical block loop } - //Threshold DCT from Alberto Grigio + //Threshold DCT from Alberto Grigio, adapted to Rawtherapee const int detail_thresh = lp.detailthr; array2D mask; if (detail_thresh > 0) { mask(GW, GH); - float thr = log2lin(float(detail_thresh) / 200.f, 100.f); - buildBlendMask(prov, mask, GW, GH, thr); + if (lp.usemask) {//with Laplacian + float amount = LIM01(float(detail_thresh)/100.f); + float thr = (1.f - amount); + float alph = params_Ldetail / 100.f; + array2D LL(GW, GH, prov, ARRAY2D_BYREFERENCE); + laplacian(LL, mask, GW, GH, 25.f, 20000.f, amount, false); + for (int i = 0; i < GH; ++i) { + for (int j = 0; j < GW; ++j) { + mask[i][j] = LIM01(mask[i][j]+ thr); + } + } + for (int i = 0; i < 3; ++i) { + boxblur(static_cast(mask), static_cast(mask), 10 / sk, GW, GH, false); + + } + for (int i = 0; i < GH; ++i) { + for (int j = 0; j < GW; ++j) { + float k = 1.f - mask[i][j] * alph; + mask[i][j] = 1.f - (k * k); + } + } + } else {//with blend mask + float thr = log2lin(float(detail_thresh) / 200.f, 100.f); + buildBlendMask(prov, mask, GW, GH, thr); #ifdef _OPENMP #pragma omp parallel if (multiThread) #endif - { - gaussianBlur(mask, mask, GW, GH, 20.0); - } - array2D m2(GW, GH); - constexpr float alfa = 0.856f; - const float beta = 1.f + std::sqrt(log2lin(thr, 100.f)); - buildGradientsMask(GW, GH, prov, m2, params_Ldetail / 100.f, 7, 3, alfa, beta, multiThread); - - for (int i = 0; i < GH; ++i) { - for (int j = 0; j < GW; ++j) { - mask[i][j] *= m2[i][j]; + { + gaussianBlur(mask, mask, GW, GH, 20.0 / sk); } - } + array2D m2(GW, GH); + constexpr float alfa = 0.856f; + const float beta = 1.f + std::sqrt(log2lin(thr, 100.f)); + buildGradientsMask(GW, GH, prov, m2, params_Ldetail / 100.f, 7, 3, alfa, beta, multiThread); + for (int i = 0; i < GH; ++i) { + for (int j = 0; j < GW; ++j) { + mask[i][j] *= m2[i][j]; + } + } + } } @@ -8218,9 +8982,9 @@ void ImProcFunctions::fftw_denoise(int GW, int GH, int max_numblox_W, int min_nu } -void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, float * slidb, int aut, bool noiscfactiv, const struct local_params & lp, LabImage * originalmaskbl, int levred, float huerefblur, float lumarefblur, float chromarefblur, LabImage * original, LabImage * transformed, int cx, int cy, int sk) +void ImProcFunctions::DeNoise(int call, float * slidL, float * slida, float * slidb, int aut, bool noiscfactiv, const struct local_params & lp, LabImage * originalmaskbl, LabImage * bufmaskblurbl, int levred, float huerefblur, float lumarefblur, float chromarefblur, LabImage * original, LabImage * transformed, int cx, int cy, int sk, const LocwavCurve& locwavCurvehue, bool locwavhueutili) { - + BENCHFUN //local denoise //all these variables are to prevent use of denoise when non necessary // but with qualmet = 2 (default for best quality) we must denoise chroma with little values to prevent artifacts due to variations of Hue @@ -8230,9 +8994,15 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f bool execdenoi = noiscfactiv && ((lp.colorena && execcolor) || (lp.tonemapena && lp.strengt != 0.f) || (lp.cbdlena && execbdl) || (lp.sfena && lp.strng > 0.f) || (lp.lcena && lp.lcamount > 0.f) || (lp.sharpena && lp.shrad > 0.42) || (lp.retiena && lp.str > 0.f) || (lp.exposena && lp.expcomp != 0.f) || (lp.expvib && lp.past != 0.f)); bool execmaskden = (lp.showmaskblmet == 2 || lp.enablMask || lp.showmaskblmet == 3 || lp.showmaskblmet == 4) && lp.smasktyp != 0; - if (((lp.noiself > 0.f || lp.noiself0 > 0.f || lp.noiself2 > 0.f || lp.noiselc > 0.f || lp.noisecf > 0.f || lp.noisecc > 0.f -// || lp.showmaskblmet == 2 || lp.enablMask || lp.showmaskblmet == 3 || lp.showmaskblmet == 4 || aut == 1 || aut == 2) && lp.denoiena) || execdenoi) { // sk == 1 ?? - || execmaskden || aut == 1 || aut == 2) && lp.denoiena) || execdenoi) { // sk == 1 ?? +// const int ys = rtengine::max(static_cast(lp.yc - lp.lyT) - cy, 0); +// const int ye = rtengine::min(static_cast(lp.yc + lp.ly) - cy, original->H); +// const int xs = rtengine::max(static_cast(lp.xc - lp.lxL) - cx, 0); +// const int xe = rtengine::min(static_cast(lp.xc + lp.lx) - cx, original->W); +// const int hspot = ye - ys; +// const int wspot = xe - xs; + + if (((lp.noiself > 0.f || lp.noiself0 > 0.f || lp.noiself2 > 0.f || lp.nlstr > 0 || lp.wavcurvedenoi || lp.noiselc > 0.f || lp.noisecf > 0.f || lp.noisecc > 0.f + || execmaskden || aut == 1 || aut == 2) && lp.denoiena && lp.quamet != 3) || execdenoi) { // sk == 1 ?? StopWatch Stop1("locallab Denoise called"); @@ -8240,7 +9010,6 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f MyMutex::MyLock lock(*fftwMutex); } - if (lp.noisecf >= 0.01f || lp.noisecc >= 0.01f || aut == 1 || aut == 2) { noiscfactiv = false; levred = 7; @@ -8249,6 +9018,18 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f int GW = transformed->W; int GH = transformed->H; + bool HHhuecurve = false; + + if (locwavCurvehue && locwavhueutili) { + for (int i = 0; i < 500; i++) { + if (locwavCurvehue[i] != 0.5f) { + HHhuecurve = true; + break; + } + } + } + + #ifdef _OPENMP const int numThreads = omp_get_max_threads(); @@ -8256,8 +9037,24 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f const int numThreads = 1; #endif + int minwin = rtengine::min(GW, GH); + int maxlevelspot = 10;//maximum possible + bool isnois = true; + // adap maximum level wavelet to size of crop + while ((1 << maxlevelspot) >= (minwin * sk) && maxlevelspot > 1) { + --maxlevelspot ; + } - if (call == 1 && GW >= mDEN && GH >= mDEN) { + levred = rtengine::min(levred, maxlevelspot); + if(levred < 7) {//If windows preview or detail window too small exit to avoid artifacts + isnois = false; + if(lp.quamet == 2) { + isnois = true; + } + } + + // if (call == 1 && GW >= mDEN && GH >= mDEN) { + if (call == 1 && ((GW >= mDEN && GH >= mDEN && isnois) || lp.quamet == 2)) { LabImage tmp1(transformed->W, transformed->H); @@ -8272,7 +9069,6 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f // calculate min size of numblox_W. int min_numblox_W = ceil((static_cast(GW)) / offset) + 2; - for (int ir = 0; ir < GH; ir++) for (int jr = 0; jr < GW; jr++) { tmp1.L[ir][jr] = original->L[ir][jr]; @@ -8313,20 +9109,20 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f if (aut == 0) { if (levred == 7) { edge = 2; - vari[0] = 0.8f * SQR((lp.noiself0 / 125.0) * (1.0 + lp.noiself0 / 25.0)); - vari[1] = 0.8f * SQR((lp.noiself / 125.0) * (1.0 + lp.noiself / 25.0)); - vari[2] = 0.8f * SQR((lp.noiself2 / 125.0) * (1.0 + lp.noiself2 / 25.0)); + vari[0] = 0.8f * SQR((lp.noiself0 / 125.f) * (1.f + lp.noiself0 / 25.f)); + vari[1] = 0.8f * SQR((lp.noiself / 125.f) * (1.f + lp.noiself / 25.f)); + vari[2] = 0.8f * SQR((lp.noiself2 / 125.f) * (1.f + lp.noiself2 / 25.f)); - vari[3] = 0.8f * SQR((lp.noiselc / 125.0) * (1.0 + lp.noiselc / 25.0)); - vari[4] = 0.8f * SQR((lp.noiselc / 125.0) * (1.0 + lp.noiselc / 25.0)); - vari[5] = 0.8f * SQR((lp.noiselc / 125.0) * (1.0 + lp.noiselc / 25.0)); - vari[6] = 0.8f * SQR((lp.noiselc / 125.0) * (1.0 + lp.noiselc / 25.0)); + vari[3] = 0.8f * SQR((lp.noiselc / 125.f) * (1.f + lp.noiselc / 25.f)); + vari[4] = 0.8f * SQR((lp.noiselc4 / 125.f) * (1.f + lp.noiselc4 / 25.f)); + vari[5] = 0.8f * SQR((lp.noiselc5 / 125.f) * (1.f + lp.noiselc5 / 25.f)); + vari[6] = 0.8f * SQR((lp.noiselc6 / 125.f) * (1.f + lp.noiselc6 / 25.f)); } else if (levred == 4) { edge = 3; - vari[0] = 0.8f * SQR((lp.noiself0 / 125.0) * (1.0 + lp.noiself0 / 25.0)); - vari[1] = 0.8f * SQR((lp.noiself / 125.0) * (1.0 + lp.noiself / 25.0)); - vari[2] = 0.8f * SQR((lp.noiselc / 125.0) * (1.0 + lp.noiselc / 25.0)); - vari[3] = 0.8f * SQR((lp.noiselc / 125.0) * (1.0 + lp.noiselc / 25.0)); + vari[0] = 0.8f * SQR((lp.noiself0 / 125.f) * (1.f + lp.noiself0 / 25.f)); + vari[1] = 0.8f * SQR((lp.noiself / 125.f) * (1.f + lp.noiself / 25.f)); + vari[2] = 0.8f * SQR((lp.noiselc / 125.f) * (1.f + lp.noiselc / 25.f)); + vari[3] = 0.8f * SQR((lp.noiselc / 125.f) * (1.f + lp.noiselc / 25.f)); } } else if (aut == 1 || aut == 2) { @@ -8346,31 +9142,19 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f { float kr3 = 0.f; - float kr4 = 0.f; - float kr5 = 0.f; if (aut == 0 || aut == 1) { if ((lp.noiselc < 30.f && aut == 0) || (mxsl < 30.f && aut == 1)) { kr3 = 0.f; - kr4 = 0.f; - kr5 = 0.f; } else if ((lp.noiselc < 50.f && aut == 0) || (mxsl < 50.f && aut == 1)) { kr3 = 0.5f; - kr4 = 0.3f; - kr5 = 0.2f; } else if ((lp.noiselc < 70.f && aut == 0) || (mxsl < 70.f && aut == 1)) { kr3 = 0.7f; - kr4 = 0.5f; - kr5 = 0.3f; } else { kr3 = 1.f; - kr4 = 1.f; - kr5 = 1.f; } } else if (aut == 2) { kr3 = 1.f; - kr4 = 1.f; - kr5 = 1.f; } vari[0] = rtengine::max(0.000001f, vari[0]); @@ -8379,12 +9163,13 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f vari[3] = rtengine::max(0.000001f, kr3 * vari[3]); if (levred == 7) { - vari[4] = rtengine::max(0.000001f, kr4 * vari[4]); - vari[5] = rtengine::max(0.000001f, kr5 * vari[5]); - vari[6] = rtengine::max(0.000001f, kr5 * vari[6]); + vari[4] = rtengine::max(0.000001f, vari[4]); + vari[5] = rtengine::max(0.000001f, vari[5]); + vari[6] = rtengine::max(0.000001f, vari[6]); } float* noisevarlum = new float[GH * GW]; + float* noisevarhue = new float[GH * GW]; int GW2 = (GW + 1) / 2; float nvlh[13] = {1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 0.7f, 0.5f}; //high value @@ -8412,10 +9197,63 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f } } + if(lp.enablMask && lp.lnoiselow !=1.f && lp.smasktyp != 0) { + //this code has been reviewed by Ingo in september 2020 PR5903 + float higc; + float hig = lp.thrhigh; + calcdif(hig, higc); + float low = lp.thrlow; + float lowc; + calcdif(low, lowc); + + if(higc < lowc) { + higc = lowc + 0.01f; + } + + float alow = -(lp.lnoiselow - 1.f) / lowc; + float blow = lp.lnoiselow; + float ahigh = 0.9999f / (higc - 100.f); + float bhigh = 1.f - higc * ahigh; + +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int ir = 0; ir < GH; ir++) + for (int jr = 0; jr < GW; jr++) { + const float lM = bufmaskblurbl->L[ir][jr]; + const float lmr = lM / 327.68f; + + if (lM < 327.68f * lowc) { + noisevarlum[(ir >> 1) * GW2 + (jr >> 1)] *= alow * lmr + blow; + } else if (lM < 327.68f * higc) { + // do nothing - denoise not change + } else { + noisevarlum[(ir >> 1) * GW2 + (jr >> 1)] *= ahigh * lmr + bhigh; + } + } + } + + + if(HHhuecurve) { + //same code as in wavelet levels + +#ifdef _OPENMP + #pragma omp parallel for +#endif + for (int ir = 0; ir < GH; ir++) + for (int jr = 0; jr < GW; jr++) { + float hueG = xatan2f(tmp1.b[ir][jr], tmp1.a[ir][jr]); + float valparam = 2.f * (locwavCurvehue[500.f * static_cast(Color::huelab_to_huehsv2(hueG))] - 0.5f); //get H=f(H) + noisevarhue[(ir >> 1)*GW2 + (jr >> 1)] = 1.f + valparam; + noisevarlum[(ir >> 1)*GW2 + (jr >> 1)] *= noisevarhue[(ir >> 1)*GW2 + (jr >> 1)]; + } + } + + if ((lp.quamet == 0 && aut == 0) || (mxsl < 1.f && (aut == 1 || aut == 2))) { WaveletDenoiseAllL(Ldecomp, noisevarlum, madL, vari, edge, numThreads); - } else { + } else if (lp.quamet == 1){ WaveletDenoiseAll_BiShrinkL(Ldecomp, noisevarlum, madL, vari, edge, numThreads); @@ -8424,6 +9262,7 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f } delete[] noisevarlum; + delete[] noisevarhue; } } @@ -8492,15 +9331,15 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f } else if (levred == 4) { edge = 3; - variC[0] = SQR(lp.noisecf / 10.0); - variC[1] = SQR(lp.noisecf / 10.0); - variC[2] = SQR(lp.noisecf / 10.0); - variC[3] = SQR(lp.noisecf / 10.0); + variC[0] = SQR(lp.noisecf / 10.f); + variC[1] = SQR(lp.noisecf / 10.f); + variC[2] = SQR(lp.noisecf / 10.f); + variC[3] = SQR(lp.noisecf / 10.f); - variCb[0] = SQR(lp.noisecf / 10.0); - variCb[1] = SQR(lp.noisecf / 10.0); - variCb[2] = SQR(lp.noisecf / 10.0); - variCb[3] = SQR(lp.noisecf / 10.0); + variCb[0] = SQR(lp.noisecf / 10.f); + variCb[1] = SQR(lp.noisecf / 10.f); + variCb[2] = SQR(lp.noisecf / 10.f); + variCb[3] = SQR(lp.noisecf / 10.f); } } else if (aut == 1 || aut == 2) { @@ -8705,7 +9544,7 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f if ((lp.quamet == 0 && aut == 0) || (maxccoarse < 0.1f && (aut == 1 || aut == 2))) { WaveletDenoiseAllAB(Ldecomp, adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, numThreads); WaveletDenoiseAllAB(Ldecomp, bdecomp, noisevarchrom, madL, variCb, edge, noisevarab_r, true, false, false, numThreads); - } else { + } else if (lp.quamet == 1){ WaveletDenoiseAll_BiShrinkAB(Ldecomp, adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, numThreads); WaveletDenoiseAllAB(Ldecomp, adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, numThreads); @@ -8733,8 +9572,8 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f } if (!Ldecomp.memory_allocation_failed() && aut == 0) { - if ((lp.noiself >= 0.01f || lp.noiself0 >= 0.01f || lp.noiself2 >= 0.01f || lp.noiselc >= 0.01f) && levred == 7 && lp.noiseldetail != 100.f) { - fftw_denoise(GW, GH, max_numblox_W, min_numblox_W, tmp1.L, Lin, numThreads, lp, 0); + if ((lp.noiself >= 0.01f || lp.noiself0 >= 0.01f || lp.noiself2 >= 0.01f || lp.wavcurvedenoi || lp.noiselc >= 0.01f) && levred == 7 && lp.noiseldetail != 100.f && lp.quamet < 2) { + fftw_denoise(sk, GW, GH, max_numblox_W, min_numblox_W, tmp1.L, Lin, numThreads, lp, 0); } } @@ -8755,7 +9594,7 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f if (!adecomp.memory_allocation_failed() && aut == 0) { if ((lp.noisecf >= 0.01f || lp.noisecc >= 0.01f) && levred == 7 && lp.noisechrodetail != 100.f) { - fftw_denoise(GW, GH, max_numblox_W, min_numblox_W, tmp1.a, Ain, numThreads, lp, 1); + fftw_denoise(sk, GW, GH, max_numblox_W, min_numblox_W, tmp1.a, Ain, numThreads, lp, 1); } } @@ -8778,22 +9617,106 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f if (!bdecomp.memory_allocation_failed() && aut == 0) { if ((lp.noisecf >= 0.01f || lp.noisecc >= 0.01f) && levred == 7 && lp.noisechrodetail != 100.f) { - fftw_denoise(GW, GH, max_numblox_W, min_numblox_W, tmp1.b, Bin, numThreads, lp, 1); + fftw_denoise(sk, GW, GH, max_numblox_W, min_numblox_W, tmp1.b, Bin, numThreads, lp, 1); } } - // DeNoise_Local(call, lp, originalmaskbl, levred, huerefblur, lumarefblur, chromarefblur, original, transformed, tmp1, cx, cy, sk); + if(lp.nlstr > 0) { + NLMeans(tmp1.L, lp.nlstr, lp.nldet, lp.nlpat, lp.nlrad, lp.nlgam, GW, GH, float (sk), multiThread); + // NLMeans(*nlm, lp.nlstr, lp.nldet, lp.nlpat, lp.nlrad, lp.nlgam, GW + addsiz, GH + addsiz, float (sk), multiThread); + + } if(lp.smasktyp != 0) { + if(lp.enablMask && lp.recothrd != 1.f) { + LabImage tmp3(GW, GH); + + for (int ir = 0; ir < GH; ir++){ + for (int jr = 0; jr < GW; jr++) { + tmp3.L[ir][jr] = original->L[ir][jr]; + tmp3.a[ir][jr] = original->a[ir][jr]; + tmp3.b[ir][jr] = original->b[ir][jr]; + } + } + + array2D masklum(GW, GH); + array2D masklumch(GW, GH); + + float hig = lp.higthrd; + float higc; + calcdif(hig, higc); + float low = lp.lowthrd; + float lowc; + calcdif(low, lowc); + float mid = 0.01f * lp.midthrd; + float midch = 0.01f * lp.midthrdch; + + if(higc < lowc) { + higc = lowc + 0.01f; + } + float th = (lp.recothrd - 1.f); + float ahigh = th / (higc - 100.f); + float bhigh = 1.f - higc * ahigh; + + float alow = th / lowc; + float blow = 1.f - th; +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int ir = 0; ir < GH; ir++) { + for (int jr = 0; jr < GW; jr++) { + const float lmr = bufmaskblurbl->L[ir][jr] / 327.68f; + float k; + float kch; + if (lmr < lowc) { + k = alow * lmr + blow; + kch = alow * lmr + blow; + } else if (lmr < higc) { + k = 1.f - mid; + kch = 1.f - midch; + } else { + k = ahigh * lmr + bhigh; + kch = ahigh * lmr + bhigh; + } + if(lp.invmaskd) { + masklum[ir][jr] = 1.f - pow_F(k, lp.decayd); + masklumch[ir][jr] = 1.f - pow_F(kch, lp.decayd); + } else { + masklum[ir][jr] = pow_F(k, lp.decayd); + masklumch[ir][jr] = pow_F(kch, lp.decayd); + } + } + } + + for (int i = 0; i < 3; ++i) { + boxblur(static_cast(masklum), static_cast(masklum), 10 / sk, GW, GH, multiThread); + boxblur(static_cast(masklumch), static_cast(masklumch), 10 / sk, GW, GH, multiThread); + } +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int i = 0; i < GH; ++i) { + for (int j = 0; j < GW; ++j) { + tmp1.L[i][j] = (tmp3.L[i][j] - tmp1.L[i][j]) * LIM01(masklum[i][j]) + tmp1.L[i][j]; + tmp1.a[i][j] = (tmp3.a[i][j] - tmp1.a[i][j]) * LIM01(masklumch[i][j]) + tmp1.a[i][j]; + tmp1.b[i][j] = (tmp3.b[i][j] - tmp1.b[i][j]) * LIM01(masklumch[i][j]) + tmp1.b[i][j]; + } + } + masklum.free(); + masklumch.free(); + } DeNoise_Local(call, lp, originalmaskbl, levred, huerefblur, lumarefblur, chromarefblur, original, transformed, tmp1, cx, cy, sk); } else { DeNoise_Local(call, lp, original, levred, huerefblur, lumarefblur, chromarefblur, original, transformed, tmp1, cx, cy, sk); } - } else if (call == 2) { //simpleprocess - int bfh = int (lp.ly + lp.lyT) + del; //bfw bfh real size of square zone - int bfw = int (lp.lx + lp.lxL) + del; + const int ystart = rtengine::max(static_cast(lp.yc - lp.lyT) - cy, 0); + const int yend = rtengine::min(static_cast(lp.yc + lp.ly) - cy, original->H); + const int xstart = rtengine::max(static_cast(lp.xc - lp.lxL) - cx, 0); + const int xend = rtengine::min(static_cast(lp.xc + lp.lx) - cx, original->W); + const int bfh = yend - ystart; + const int bfw = xend - xstart; if (bfh >= mDEN && bfw >= mDEN) { LabImage bufwv(bfw, bfh); @@ -8808,10 +9731,10 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f // these are needed only for creation of the plans and will be freed before entering the parallel loop - int begy = lp.yc - lp.lyT; - int begx = lp.xc - lp.lxL; - int yEn = lp.yc + lp.ly; - int xEn = lp.xc + lp.lx; + int begy = ystart; //lp.yc - lp.lyT; + int begx = xstart; //lp.xc - lp.lxL; + int yEn = yend; //lp.yc + lp.ly; + int xEn = xend; //lp.xc + lp.lx; #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread) @@ -8861,20 +9784,20 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f if (aut == 0) { if (levred == 7) { edge = 2; - vari[0] = 0.8f * SQR((lp.noiself0 / 125.0) * (1.0 + lp.noiself0 / 25.0)); - vari[1] = 0.8f * SQR((lp.noiself / 125.0) * (1.0 + lp.noiself / 25.0)); - vari[2] = 0.8f * SQR((lp.noiself2 / 125.0) * (1.0 + lp.noiself2 / 25.0)); + vari[0] = 0.8f * SQR((lp.noiself0 / 125.f) * (1.f + lp.noiself0 / 25.f)); + vari[1] = 0.8f * SQR((lp.noiself / 125.f) * (1.f + lp.noiself / 25.f)); + vari[2] = 0.8f * SQR((lp.noiself2 / 125.f) * (1.f + lp.noiself2 / 25.f)); - vari[3] = 0.8f * SQR((lp.noiselc / 125.0) * (1.0 + lp.noiselc / 25.0)); - vari[4] = 0.8f * SQR((lp.noiselc / 125.0) * (1.0 + lp.noiselc / 25.0)); - vari[5] = 0.8f * SQR((lp.noiselc / 125.0) * (1.0 + lp.noiselc / 25.0)); - vari[6] = 0.8f * SQR((lp.noiselc / 125.0) * (1.0 + lp.noiselc / 25.0)); + vari[3] = 0.8f * SQR((lp.noiselc / 125.f) * (1.f + lp.noiselc / 25.f)); + vari[4] = 0.8f * SQR((lp.noiselc4 / 125.f) * (1.f + lp.noiselc4 / 25.f)); + vari[5] = 0.8f * SQR((lp.noiselc5 / 125.f) * (1.f + lp.noiselc5 / 25.f)); + vari[6] = 0.8f * SQR((lp.noiselc6 / 125.f) * (1.f + lp.noiselc6 / 25.f)); } else if (levred == 4) { edge = 3; - vari[0] = 0.8f * SQR((lp.noiself0 / 125.0) * (1.0 + lp.noiself0 / 25.0)); - vari[1] = 0.8f * SQR((lp.noiself / 125.0) * (1.0 + lp.noiself / 25.0)); - vari[2] = 0.8f * SQR((lp.noiselc / 125.0) * (1.0 + lp.noiselc / 25.0)); - vari[3] = 0.8f * SQR((lp.noiselc / 125.0) * (1.0 + lp.noiselc / 25.0)); + vari[0] = 0.8f * SQR((lp.noiself0 / 125.f) * (1.f + lp.noiself0 / 25.f)); + vari[1] = 0.8f * SQR((lp.noiself / 125.f) * (1.f + lp.noiself / 25.f)); + vari[2] = 0.8f * SQR((lp.noiselc / 125.f) * (1.f + lp.noiselc / 25.f)); + vari[3] = 0.8f * SQR((lp.noiselc / 125.f) * (1.f + lp.noiselc / 25.f)); } } else if (aut == 1 || aut == 2) { @@ -8894,32 +9817,19 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f { float kr3 = 0.f; - float kr4 = 0.f; - float kr5 = 0.f; if (aut == 0 || aut == 1) { if ((lp.noiselc < 30.f && aut == 0) || (mxsl < 30.f && aut == 1)) { kr3 = 0.f; - kr4 = 0.f; - kr5 = 0.f; } else if ((lp.noiselc < 50.f && aut == 0) || (mxsl < 50.f && aut == 1)) { kr3 = 0.5f; - kr4 = 0.3f; - kr5 = 0.2f; } else if ((lp.noiselc < 70.f && aut == 0) || (mxsl < 70.f && aut == 1)) { kr3 = 0.7f; - kr4 = 0.5f; - kr5 = 0.3f; } else { kr3 = 1.f; - kr4 = 1.f; - kr5 = 1.f; } } else if (aut == 2) { kr3 = 1.f; - kr4 = 1.f; - kr5 = 1.f; - } vari[0] = rtengine::max(0.000001f, vari[0]); @@ -8928,13 +9838,14 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f vari[3] = rtengine::max(0.000001f, kr3 * vari[3]); if (levred == 7) { - vari[4] = rtengine::max(0.000001f, kr4 * vari[4]); - vari[5] = rtengine::max(0.000001f, kr5 * vari[5]); - vari[6] = rtengine::max(0.000001f, kr5 * vari[6]); + vari[4] = rtengine::max(0.000001f, vari[4]); + vari[5] = rtengine::max(0.000001f, vari[5]); + vari[6] = rtengine::max(0.000001f, vari[6]); } // float* noisevarlum = nullptr; // we need a dummy to pass it to WaveletDenoiseAllL float* noisevarlum = new float[bfh * bfw]; + float* noisevarhue = new float[bfh * bfw]; int bfw2 = (bfw + 1) / 2; float nvlh[13] = {1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 0.7f, 0.5f}; //high value @@ -8961,16 +9872,69 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f noisevarlum[(ir >> 1)*bfw2 + (jr >> 1)] = nvll[i]; } } + + if(lp.enablMask && lp.lnoiselow != 1.f && lp.smasktyp != 0) { + //this code has been reviewed by Ingo in september 2020 PR5903 + //i just change parameters to better progressivity + float higc; + float hig = lp.thrhigh; + calcdif(hig, higc); + float low = lp.thrlow; + float lowc; + calcdif(low, lowc); + + if(higc < lowc) { + higc = lowc + 0.01f; + } + + float alow = -(lp.lnoiselow - 1.f) / lowc; + float blow = lp.lnoiselow; + float ahigh = 0.9999f / (higc - 100.f); + float bhigh = 1.f - higc * ahigh; + + +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int ir = 0; ir < bfh; ir++) + for (int jr = 0; jr < bfw; jr++) { + const float lM = bufmaskblurbl->L[ir + ystart][jr + xstart]; + const float lmr = lM / 327.68f; + if (lM < 327.68f * lowc) { + noisevarlum[(ir >> 1) * bfw2 + (jr >> 1)] *= alow * lmr + blow; + } else if (lM < 327.68f * higc) { + // do nothing + } else { + noisevarlum[(ir >> 1) * bfw2 + (jr >> 1)] *= ahigh * lmr + bhigh; + } + } + } + + + if(HHhuecurve) { + //same code as in wavelet levels +#ifdef _OPENMP + #pragma omp parallel for +#endif + for (int ir = 0; ir < bfh; ir++) + for (int jr = 0; jr < bfw; jr++) { + float hueG = xatan2f(bufwv.b[ir][jr], bufwv.a[ir][jr]); + float valparam = 2.f * (locwavCurvehue[500.f * static_cast(Color::huelab_to_huehsv2(hueG))] - 0.5f); //get H=f(H) + noisevarhue[(ir >> 1)* bfw2 + (jr >> 1)] = 1.f + valparam; + noisevarlum[(ir >> 1)* bfw2 + (jr >> 1)] *= noisevarhue[(ir >> 1)* bfw2 + (jr >> 1)]; + } + } if ((lp.quamet == 0 && aut == 0) || (mxsl < 1.f && (aut == 1 || aut == 2))) { WaveletDenoiseAllL(Ldecomp, noisevarlum, madL, vari, edge, numThreads); - } else { + } else if (lp.quamet == 1) { WaveletDenoiseAll_BiShrinkL(Ldecomp, noisevarlum, madL, vari, edge, numThreads); WaveletDenoiseAllL(Ldecomp, noisevarlum, madL, vari, edge, numThreads); } delete [] noisevarlum; + delete [] noisevarhue; } } @@ -9041,15 +10005,15 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f } else if (levred == 4) { edge = 3; - variC[0] = SQR(lp.noisecf / 10.0); - variC[1] = SQR(lp.noisecf / 10.0); - variC[2] = SQR(lp.noisecf / 10.0); - variC[3] = SQR(lp.noisecf / 10.0); + variC[0] = SQR(lp.noisecf / 10.f); + variC[1] = SQR(lp.noisecf / 10.f); + variC[2] = SQR(lp.noisecf / 10.f); + variC[3] = SQR(lp.noisecf / 10.f); - variCb[0] = SQR(lp.noisecf / 10.0); - variCb[1] = SQR(lp.noisecf / 10.0); - variCb[2] = SQR(lp.noisecf / 10.0); - variCb[3] = SQR(lp.noisecf / 10.0); + variCb[0] = SQR(lp.noisecf / 10.f); + variCb[1] = SQR(lp.noisecf / 10.f); + variCb[2] = SQR(lp.noisecf / 10.f); + variCb[3] = SQR(lp.noisecf / 10.f); } @@ -9252,7 +10216,7 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f if ((lp.quamet == 0 && aut == 0) || (maxccoarse < 0.1f && (aut == 1 || aut == 2))) { WaveletDenoiseAllAB(Ldecomp, adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, numThreads); WaveletDenoiseAllAB(Ldecomp, bdecomp, noisevarchrom, madL, variCb, edge, noisevarab_r, true, false, false, numThreads); - } else { + } else if (lp.quamet == 1){ WaveletDenoiseAll_BiShrinkAB(Ldecomp, adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, numThreads); WaveletDenoiseAllAB(Ldecomp, adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, numThreads); @@ -9283,8 +10247,8 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f if (!Ldecomp.memory_allocation_failed() && aut == 0) { - if ((lp.noiself >= 0.01f || lp.noiself0 >= 0.01f || lp.noiself2 >= 0.01f || lp.noiselc >= 0.01f) && levred == 7 && lp.noiseldetail != 100.f) { - fftw_denoise(bfw, bfh, max_numblox_W, min_numblox_W, bufwv.L, Lin, numThreads, lp, 0); + if ((lp.noiself >= 0.01f || lp.noiself0 >= 0.01f || lp.noiself2 >= 0.01f || lp.wavcurvedenoi || lp.noiselc >= 0.01f) && levred == 7 && lp.noiseldetail != 100.f && lp.quamet < 2) { + fftw_denoise(sk, bfw, bfh, max_numblox_W, min_numblox_W, bufwv.L, Lin, numThreads, lp, 0); } } @@ -9305,7 +10269,7 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f if (!adecomp.memory_allocation_failed() && aut == 0) { if ((lp.noisecf >= 0.001f || lp.noisecc >= 0.001f) && levred == 7 && lp.noisechrodetail != 100.f) { - fftw_denoise(bfw, bfh, max_numblox_W, min_numblox_W, bufwv.a, Ain, numThreads, lp, 1); + fftw_denoise(sk, bfw, bfh, max_numblox_W, min_numblox_W, bufwv.a, Ain, numThreads, lp, 1); } } @@ -9326,17 +10290,123 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f if (!bdecomp.memory_allocation_failed() && aut == 0) { if ((lp.noisecf >= 0.001f || lp.noisecc >= 0.001f) && levred == 7 && lp.noisechrodetail != 100.f) { - fftw_denoise(bfw, bfh, max_numblox_W, min_numblox_W, bufwv.b, Bin, numThreads, lp, 1); + fftw_denoise(sk, bfw, bfh, max_numblox_W, min_numblox_W, bufwv.b, Bin, numThreads, lp, 1); } } - if(lp.smasktyp != 0) { - DeNoise_Local(call, lp, originalmaskbl, levred, huerefblur, lumarefblur, chromarefblur, original, transformed, bufwv, cx, cy, sk); - } else { - DeNoise_Local(call, lp, original, levred, huerefblur, lumarefblur, chromarefblur, original, transformed, bufwv, cx, cy, sk); + + if(lp.nlstr > 0) { + NLMeans(bufwv.L, lp.nlstr, lp.nldet, lp.nlpat, lp.nlrad, lp.nlgam, bfw, bfh, 1.f, multiThread); + // NLMeans(*nlm, lp.nlstr, lp.nldet, lp.nlpat, lp.nlrad, lp.nlgam, bfw + addsiz, bfh + addsiz, 1.f, multiThread); + + } - // DeNoise_Local(call, lp, originalmaskbl, levred, huerefblur, lumarefblur, chromarefblur, original, transformed, bufwv, cx, cy, sk); + + if (lp.smasktyp != 0) { + if(lp.enablMask && lp.recothrd != 1.f) { + LabImage tmp3(bfw, bfh); +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + for (int y = 0; y < transformed->H ; y++) { + for (int x = 0; x < transformed->W; x++) { + int lox = cx + x; + int loy = cy + y; + + if (lox >= begx && lox < xEn && loy >= begy && loy < yEn) { + tmp3.L[loy - begy][lox - begx] = original->L[y][x]; + tmp3.a[loy - begy][lox - begx] = original->a[y][x]; + tmp3.b[loy - begy][lox - begx] = original->b[y][x]; + } + + } + } + + array2D masklum; + array2D masklumch; + masklum(bfw, bfh); + masklumch(bfw, bfh); + for (int ir = 0; ir < bfh; ir++){ + for (int jr = 0; jr < bfw; jr++) { + masklum[ir][jr] = 1.f; + masklumch[ir][jr] = 1.f; + } + } + + float hig = lp.higthrd; + float higc; + calcdif(hig, higc); + float low = lp.lowthrd; + float lowc; + calcdif(low, lowc); + float mid = 0.01f * lp.midthrd; + float midch = 0.01f * lp.midthrdch; + + if(higc < lowc) { + higc = lowc + 0.01f; + } + float th = (lp.recothrd - 1.f); + float ahigh = th / (higc - 100.f); + float bhigh = 1.f - higc * ahigh; + + float alow = th / lowc; + float blow = 1.f - th; + +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int y = ystart; y < yend; y++) { + for (int x = xstart, lox = cx + x; x < xend; x++, lox++) { + + const float lM = bufmaskblurbl->L[y][x]; + const float lmr = lM / 327.68f; + if (lM < 327.68f * lowc) { + masklum[y-ystart][x-xstart] = alow * lmr + blow; + masklumch[y-ystart][x-xstart] = alow * lmr + blow; + } else if (lM < 327.68f * higc) { + masklum[y-ystart][x-xstart] = 1.f - mid; + masklumch[y-ystart][x-xstart] = 1.f - midch; + + } else { + masklum[y-ystart][x-xstart] = ahigh * lmr + bhigh; + masklumch[y-ystart][x-xstart] = ahigh * lmr + bhigh; + } + float k = masklum[y-ystart][x-xstart]; + float kch = masklumch[y-ystart][x-xstart]; + if(lp.invmaskd == true) { + masklum[y-ystart][x-xstart] = 1.f - pow(k, lp.decayd); + masklumch[y-ystart][x-xstart] = 1.f - pow(kch, lp.decayd); + } else { + masklum[y-ystart][x-xstart] = pow(k, lp.decayd); + masklumch[y-ystart][x-xstart] = pow(kch, lp.decayd); + } + } + } + for (int i = 0; i < 3; ++i) { + boxblur(static_cast(masklum), static_cast(masklum), 10 / sk, bfw, bfh, false); + boxblur(static_cast(masklumch), static_cast(masklumch), 10 / sk, bfw, bfh, false); + } + +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int y = 0; y < bfh; y++) { + for (int x = 0; x < bfw; x++) { + bufwv.L[y][x] = (tmp3.L[y][x] - bufwv.L[y][x]) * LIM01(masklum[y][x]) + bufwv.L[y][x]; + bufwv.a[y][x] = (tmp3.a[y][x] - bufwv.a[y][x]) * LIM01(masklumch[y][x]) + bufwv.a[y][x]; + bufwv.b[y][x] = (tmp3.b[y][x] - bufwv.b[y][x]) * LIM01(masklumch[y][x]) + bufwv.b[y][x]; + } + } + + masklum.free(); + masklumch.free(); + } + + DeNoise_Local2(lp, originalmaskbl, levred, huerefblur, lumarefblur, chromarefblur, original, transformed, bufwv, cx, cy, sk); + } else { + DeNoise_Local2(lp, original, levred, huerefblur, lumarefblur, chromarefblur, original, transformed, bufwv, cx, cy, sk); + } } } } @@ -9502,8 +10572,677 @@ void clarimerge(struct local_params& lp, float &mL, float &mC, bool &exec, LabIm } } +void ImProcFunctions::avoidcolshi(const struct local_params& lp, int sp, LabImage * original, LabImage *transformed, int cy, int cx, int sk) +{ + if (params->locallab.spots.at(sp).avoid && lp.islocal) { + const float ach = lp.trans / 100.f; + + TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix(params->icm.workingProfile); + const double wip[3][3] = {//improve precision with double + {wiprof[0][0], wiprof[0][1], wiprof[0][2]}, + {wiprof[1][0], wiprof[1][1], wiprof[1][2]}, + {wiprof[2][0], wiprof[2][1], wiprof[2][2]} + }; + + const float softr = params->locallab.spots.at(sp).avoidrad;//max softr = 30 + const bool muns = params->locallab.spots.at(sp).avoidmun;//Munsell control with 200 LUT + //improve precision with mint and maxt + const float tr = std::min(2.f, softr); + const float mint = 0.15f - 0.06f * tr;//between 0.15f and 0.03f + const float maxt = 0.98f + 0.008f * tr;//between 0.98f and 0.996f + + const bool highlight = params->toneCurve.hrenabled; + const bool needHH = true; //always Munsell to avoid bad behavior //(lp.chro != 0.f); +#ifdef _OPENMP + #pragma omp parallel if (multiThread) +#endif + { +#ifdef __SSE2__ + float atan2Buffer[transformed->W] ALIGNED16; + float sqrtBuffer[transformed->W] ALIGNED16; + float sincosyBuffer[transformed->W] ALIGNED16; + float sincosxBuffer[transformed->W] ALIGNED16; + vfloat c327d68v = F2V(327.68f); + vfloat onev = F2V(1.f); +#endif + +#ifdef _OPENMP + #pragma omp for schedule(dynamic,16) +#endif + for (int y = 0; y < transformed->H; y++) { + const int loy = cy + y; + const bool isZone0 = loy > lp.yc + lp.ly || loy < lp.yc - lp.lyT; // whole line is zone 0 => we can skip a lot of processing + + if (isZone0) { // outside selection and outside transition zone => no effect, keep original values + continue; + } + +#ifdef __SSE2__ + int i = 0; + + for (; i < transformed->W - 3; i += 4) { + vfloat av = LVFU(transformed->a[y][i]); + vfloat bv = LVFU(transformed->b[y][i]); + + if (needHH) { // only do expensive atan2 calculation if needed + STVF(atan2Buffer[i], xatan2f(bv, av)); + } + + vfloat Chprov1v = vsqrtf(SQRV(bv) + SQRV(av)); + STVF(sqrtBuffer[i], Chprov1v / c327d68v); + vfloat sincosyv = av / Chprov1v; + vfloat sincosxv = bv / Chprov1v; + vmask selmask = vmaskf_eq(Chprov1v, ZEROV); + sincosyv = vself(selmask, onev, sincosyv); + sincosxv = vselfnotzero(selmask, sincosxv); + STVF(sincosyBuffer[i], sincosyv); + STVF(sincosxBuffer[i], sincosxv); + } + + for (; i < transformed->W; i++) { + float aa = transformed->a[y][i]; + float bb = transformed->b[y][i]; + + if (needHH) { // only do expensive atan2 calculation if needed + atan2Buffer[i] = xatan2f(bb, aa); + } + + float Chprov1 = std::sqrt(SQR(bb) + SQR(aa)); + sqrtBuffer[i] = Chprov1 / 327.68f; + + if (Chprov1 == 0.0f) { + sincosyBuffer[i] = 1.f; + sincosxBuffer[i] = 0.0f; + } else { + sincosyBuffer[i] = aa / Chprov1; + sincosxBuffer[i] = bb / Chprov1; + } + } + +#endif + + for (int x = 0; x < transformed->W; x++) { + int lox = cx + x; + int zone; + float localFactor = 1.f; + + if (lp.shapmet == 0) { + calcTransition(lox, loy, ach, lp, zone, localFactor); + } else /*if (lp.shapmet == 1)*/ { + calcTransitionrect(lox, loy, ach, lp, zone, localFactor); + } + + if (zone == 0) { // outside selection and outside transition zone => no effect, keep original values + continue; + } + + float Lprov1 = transformed->L[y][x] / 327.68f; + float2 sincosval; +#ifdef __SSE2__ + float HH = atan2Buffer[x]; // reading HH from line buffer even if line buffer is not filled is faster than branching + float Chprov1 = sqrtBuffer[x]; + sincosval.y = sincosyBuffer[x]; + sincosval.x = sincosxBuffer[x]; + float chr = 0.f; + +#else + const float aa = transformed->a[y][x]; + const float bb = transformed->b[y][x]; + float HH = 0.f, chr = 0.f; + + if (needHH) { // only do expensive atan2 calculation if needed + HH = xatan2f(bb, aa); + } + + float Chprov1 = std::sqrt(SQR(aa) + SQR(bb)) / 327.68f; + + 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 + + Color::pregamutlab(Lprov1, HH, chr); + Chprov1 = rtengine::min(Chprov1, chr); + if(!muns) { + float R, G, B; + Color::gamutLchonly(HH, sincosval, Lprov1, Chprov1, R, G, B, wip, highlight, mint, maxt);//replace for best results + } + transformed->L[y][x] = Lprov1 * 327.68f; + transformed->a[y][x] = 327.68f * Chprov1 * sincosval.y; + transformed->b[y][x] = 327.68f * Chprov1 * sincosval.x; + + if (needHH) { + const float Lprov2 = original->L[y][x] / 327.68f; + float correctionHue = 0.f; // Munsell's correction + float correctlum = 0.f; + const float memChprov = std::sqrt(SQR(original->a[y][x]) + SQR(original->b[y][x])) / 327.68f; + float Chprov = std::sqrt(SQR(transformed->a[y][x]) + SQR(transformed->b[y][x])) / 327.68f; + Color::AllMunsellLch(true, Lprov1, Lprov2, HH, Chprov, memChprov, correctionHue, correctlum); + + if (std::fabs(correctionHue) < 0.015f) { + HH += correctlum; // correct only if correct Munsell chroma very small. + } + + sincosval = xsincosf(HH + correctionHue); + transformed->a[y][x] = 327.68f * Chprov * sincosval.y; // apply Munsell + transformed->b[y][x] = 327.68f * Chprov * sincosval.x; + } + } + } + } + + //Guidedfilter to reduce artifacts in transitions + if (softr != 0.f) {//soft for L a b because we change color... + const float tmpblur = softr < 0.f ? -1.f / softr : 1.f + softr; + const int r1 = rtengine::max(6 / sk * tmpblur + 0.5f, 1); + const int r2 = rtengine::max(10 / sk * tmpblur + 0.5f, 1); + + constexpr float epsilmax = 0.005f; + constexpr float epsilmin = 0.00001f; + + constexpr float aepsil = (epsilmax - epsilmin) / 100.f; + constexpr float bepsil = epsilmin; + const float epsil = softr < 0.f ? 0.001f : aepsil * softr + bepsil; + + const int bw = transformed->W; + const int bh = transformed->H; + array2D ble(bw, bh); + array2D guid(bw, bh); + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + + for (int y = 0; y < bh ; y++) { + for (int x = 0; x < bw; x++) { + ble[y][x] = transformed->L[y][x] / 32768.f; + guid[y][x] = original->L[y][x] / 32768.f; + } + } + rtengine::guidedFilter(guid, ble, ble, r2, 0.2f * epsil, multiThread); +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + for (int y = 0; y < bh; y++) { + for (int x = 0; x < bw; x++) { + transformed->L[y][x] = 32768.f * ble[y][x]; + } + } + + array2D &blechro = ble; // reuse buffer +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + + for (int y = 0; y < bh ; y++) { + for (int x = 0; x < bw; x++) { + blechro[y][x] = std::sqrt(SQR(transformed->b[y][x]) + SQR(transformed->a[y][x])) / 32768.f; + } + } + rtengine::guidedFilter(guid, blechro, blechro, r1, epsil, multiThread); + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + for (int y = 0; y < bh; y++) { + for (int x = 0; x < bw; x++) { + const float Chprov1 = std::sqrt(SQR(transformed->a[y][x]) + SQR(transformed->b[y][x])); + float2 sincosval; + + if (Chprov1 == 0.0f) { + sincosval.y = 1.f; + sincosval.x = 0.0f; + } else { + sincosval.y = transformed->a[y][x] / Chprov1; + sincosval.x = transformed->b[y][x] / Chprov1; + } + + transformed->a[y][x] = 32768.f * blechro[y][x] * sincosval.y; + transformed->b[y][x] = 32768.f * blechro[y][x] * sincosval.x; + } + } + } + } +} + +void maskrecov(const LabImage * bufcolfin, LabImage * original, LabImage * bufmaskblurcol, int bfh, int bfw, int ystart, int xstart, float hig, float low, float recoth, float decay, bool invmask, int sk, bool multiThread) +{ + LabImage tmp3(bfw, bfh); + + for (int y = 0; y < bfh; y++){ + for (int x = 0; x < bfw; x++) { + tmp3.L[y][x] = original->L[y + ystart][x + xstart]; + tmp3.a[y][x] = original->a[y + ystart][x + xstart]; + tmp3.b[y][x] = original->b[y + ystart][x + xstart]; + } + } + array2D masklum; + masklum(bfw, bfh); + for (int ir = 0; ir < bfh; ir++) + for (int jr = 0; jr < bfw; jr++) { + masklum[ir][jr] = 1.f; + } + + float higc; + calcdif(hig, higc); + float lowc; + calcdif(low, lowc); + + if(higc < lowc) { + higc = lowc + 0.01f; + } + float th = (recoth - 1.f); + float ahigh = th / (higc - 100.f); + float bhigh = 1.f - higc * ahigh; + + float alow = th / lowc; + float blow = 1.f - th; +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int ir = 0; ir < bfh; ir++) + for (int jr = 0; jr < bfw; jr++) { + const float lM = bufmaskblurcol->L[ir][jr]; + const float lmr = lM / 327.68f; + if (lM < 327.68f * lowc) { + masklum[ir][jr] = alow * lmr + blow; + } else if (lM < 327.68f * higc) { + //nothing...but we can.. + } else { + masklum[ir][jr] = ahigh * lmr + bhigh; + } + float k = masklum[ir][jr]; + if(invmask == false) { + masklum[ir][jr] = 1 - pow(k, decay); + } else { + masklum[ir][jr] = pow(k, decay); + } + + } + + for (int i = 0; i < 3; ++i) { + boxblur(static_cast(masklum), static_cast(masklum), 10 / sk, bfw, bfh, false); + } + +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int i = 0; i < bfh; ++i) { + for (int j = 0; j < bfw; ++j) { + bufcolfin->L[i][j] = (tmp3.L[i][j] - bufcolfin->L[i][j]) * LIM01(masklum[i][j]) + bufcolfin->L[i][j]; + bufcolfin->a[i][j] = (tmp3.a[i][j] - bufcolfin->a[i][j]) * LIM01(masklum[i][j]) + bufcolfin->a[i][j]; + bufcolfin->b[i][j] = (tmp3.b[i][j] - bufcolfin->b[i][j]) * LIM01(masklum[i][j]) + bufcolfin->b[i][j]; + } + } + masklum.free(); +} + +//thanks to Alberto Griggio +void ImProcFunctions::detail_mask(const array2D &src, array2D &mask, int bfw, int bfh, float scaling, float threshold, float ceiling, float factor, BlurType blur_type, float blur, bool multithread) +{ + const int W = bfw; + const int H = bfh; + mask(W, H); + + array2D L2(W/4, H/4);//ARRAY2D_ALIGNED); + array2D m2(W/4, H/4);//ARRAY2D_ALIGNED) + rescaleBilinear(src, L2, multithread); +#ifdef _OPENMP +# pragma omp parallel for if (multithread) +#endif + for (int y = 0; y < H/4; ++y) { + for (int x = 0; x < W/4; ++x) { + L2[y][x] = xlin2log(L2[y][x]/scaling, 50.f); + } + } + + laplacian(L2, m2, W / 4, H / 4, threshold/scaling, ceiling/scaling, factor, multithread); + + rescaleBilinear(m2, mask, multithread); + + const auto scurve = + [](float x) -> float + { + constexpr float b = 101.f; + constexpr float a = 2.23f; + return xlin2log(pow_F(x, a), b); + }; + + const float thr = 1.f - factor; +#ifdef _OPENMP +# pragma omp parallel for if (multithread) +#endif + + for (int y = 0; y < H; ++y) { + for (int x = 0; x < W; ++x) { + mask[y][x] = scurve(LIM01(mask[y][x] + thr)); + } + } + + if (blur_type == BlurType::GAUSS) { + +#ifdef _OPENMP +# pragma omp parallel if (multithread) +#endif + { + gaussianBlur(mask, mask, W, H, blur); + } + } else if (blur_type == BlurType::BOX) { + if (int(blur) > 0) { + for (int i = 0; i < 3; ++i) { + boxblur(static_cast(mask), static_cast(mask), blur, W, H, multithread); + } + } + } + +} + +// basic idea taken from Algorithm 3 in the paper: +// "Parameter-Free Fast Pixelwise Non-Local Means Denoising" http://www.ipol.im/pub/art/2014/120/ +// by Jacques Froment + +// thanks to Alberto Griggio for this wonderful code +// thanks to Ingo Weyrich for many speedup suggestions! +// adapted to Rawtherapee Local adjustments J.Desmis january 2021 +// + +void ImProcFunctions::NLMeans(float **img, int strength, int detail_thresh, int patch, int radius, float gam, int bfw, int bfh, float scale, bool multithread) +{ + if (!strength) { + return; + } + // printf("Scale=%f\n", scale); + if(scale > 5.f) {//avoid to small values - leads to crash - but enough to evaluate noise + return; + } + + BENCHFUN + const int W = bfw; + const int H = bfh; +// printf("W=%i H=%i\n", W, H); + float gamma = gam; + rtengine::GammaValues g_a; //gamma parameters + double pwr = 1.0 / static_cast(gam);//default 3.0 - gamma Lab + double ts = 9.03296;//always the same 'slope' in the extrem shadows - slope Lab + rtengine::Color::calcGamma(pwr, ts, g_a); // call to calcGamma with selected gamma and slope + + //first change Lab L to pseudo linear with gamma = 3.f slope 9.032...and in range 0...65536, or with gamma slope Lab + +#ifdef _OPENMP +# pragma omp parallel for schedule(dynamic,16) if (multithread) +#endif + for (int y = 0; y < H; ++y) { + int x = 0; +#ifdef __SSE2__ + for (; x < W - 3; x += 4) { + STVFU(img[y][x], F2V(65536.f) * igammalog(LVFU(img[y][x]) / F2V(32768.f), F2V(gamma), F2V(ts), F2V(g_a[2]), F2V(g_a[4]))); + } +#endif + for (;x < W; ++x) { + img[y][x] = 65536.f * igammalog(img[y][x] / 32768.f, gamma, ts, g_a[2], g_a[4]); + } + } + // these two can be changed if needed. increasing max_patch_radius doesn't + // affect performance, whereas max_search_radius *really* does + // (the complexity is O(max_search_radius^2 * W * H)) +// constexpr int max_patch_radius = 2; +// constexpr int max_search_radius = 5; + int max_patch_radius = patch; + int max_search_radius = radius; + + const int search_radius = int(std::ceil(float(max_search_radius) / scale)); + const int patch_radius = int(std::ceil(float(max_patch_radius) / scale)); + + // the strength parameter controls the scaling of the weights + // (called h^2 in the papers) + float eps = 1e-6f;//to avoid too low values and divide near by zero...when scale > 1 + const float h2 = eps + SQR(std::pow(float(strength) / 100.f, 0.9f) / 30.f / scale); +// printf("h2=%f\n", h2); + // this is the main difference between our version and more conventional + // nl-means implementations: instead of varying the patch size, we control + // the detail preservation by using a varying weight scaling for the + // pixels, depending on our estimate of how much details there are in the + // pixel neighborhood. We do this by computing a "detail mask", using a + // laplacian filter with additional averaging and smoothing. The + // detail_thresh parameter controls the degree of detail preservation: the + // (averaged, smoothed) laplacian is first normalized to [0,1], and then + // modified by compression and offseting depending on the detail_thresh + // parameter, i.e. mask[y][x] = mask[y][x] * (1 - f) + f, + // where f = detail_thresh / 100 + float amount = LIM(float(detail_thresh)/100.f, 0.f, 0.99f); + array2D mask(W, H);// ARRAY2D_ALIGNED); + + { + array2D LL(W, H, img, ARRAY2D_BYREFERENCE); + ImProcFunctions::detail_mask(LL, mask, W, H, 1.f, 1e-3f, 1.f, amount, BlurType::GAUSS, 2.f / scale, multithread); + + } + +//allocate dst - same type of datas as img + float** dst; + int wid = W; + int hei = H; + dst = new float*[hei]; + for (int i = 0; i < hei; ++i) { + dst[i] = new float[wid]; + } + const int border = search_radius + patch_radius; + const int WW = W + border * 2; + const int HH = H + border * 2; + + array2D src(WW, HH);//, ARRAY2D_ALIGNED); + +#ifdef _OPENMP +# pragma omp parallel for if (multithread) +#endif + for (int y = 0; y < HH; ++y) { + int yy = y <= border ? 0 : y - border >= H ? H-1 : y - border; + for (int x = 0; x < WW; ++x) { + int xx = x <= border ? 0 : x - border >= W ? W-1 : x - border; + float Y = img[yy][xx] / 65536.f; + src[y][x] = Y; + } + } + +#ifdef _OPENMP +# pragma omp parallel for if (multithread) +#endif + for (int y = 0; y < H; ++y) { + for (int x = 0; x < W; ++x) { + dst[y][x] = 0.f; + } + } + + constexpr int lutsz = 8192; + constexpr float lutfactor = 100.f / float(lutsz-1); + LUTf explut(lutsz); + for (int i = 0; i < lutsz; ++i) { + float x = float(i) * lutfactor; + explut[i] = xexpf(-x); + } + +#ifdef _OPENMP +# pragma omp parallel for if (multithread) +#endif + for (int y = 0; y < H; ++y) { + for (int x = 0; x < W; ++x) { + mask[y][x] = (1.f / (mask[y][x] * h2)) / lutfactor; + } + } + + // process by tiles to avoid numerical accuracy errors in the computation + // of the integral image + const int tile_size = 150; + const int ntiles_x = int(std::ceil(float(WW) / (tile_size-2*border))); + const int ntiles_y = int(std::ceil(float(HH) / (tile_size-2*border))); + const int ntiles = ntiles_x * ntiles_y; + +#ifdef __SSE2__ + const vfloat zerov = F2V(0.0); + const vfloat v1e_5f = F2V(1e-5f); + const vfloat v65536f = F2V(65536.f); +#endif + +#ifdef _OPENMP + #pragma omp parallel if (multithread) +#endif + { + +#ifdef __SSE2__ + // flush denormals to zero to avoid performance penalty + const auto oldMode = _MM_GET_FLUSH_ZERO_MODE(); + _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); +#endif + +#ifdef _OPENMP + #pragma omp for schedule(dynamic, 2) +#endif + for (int tile = 0; tile < ntiles; ++tile) { + const int tile_y = tile / ntiles_x; + const int tile_x = tile % ntiles_x; + + const int start_y = tile_y * (tile_size - 2*border); + const int end_y = std::min(start_y + tile_size, HH); + const int TH = end_y - start_y; + + const int start_x = tile_x * (tile_size - 2*border); + const int end_x = std::min(start_x + tile_size, WW); + const int TW = end_x - start_x; + + const auto Yf = [=](int y) -> int { return LIM(y+start_y, 0, HH-1); }; + const auto Xf = [=](int x) -> int { return LIM(x+start_x, 0, WW-1); }; + + const auto score = + [&](int tx, int ty, int zx, int zy) -> float + { + return SQR(src[Yf(zy)][Xf(zx)] - src[Yf(zy + ty)][Xf(zx + tx)]); + }; + + array2D St(TW, TH);//, ARRAY2D_ALIGNED); + array2D SW(TW, TH, ARRAY2D_CLEAR_DATA);//, ARRAY2D_ALIGNED|ARRAY2D_CLEAR_DATA); + + for (int ty = -search_radius; ty <= search_radius; ++ty) { + for (int tx = -search_radius; tx <= search_radius; ++tx) { + // Step 1 — Compute the integral image St + St[0][0] = 0.f; + for (int xx = 1; xx < TW; ++xx) { + St[0][xx] = St[0][xx-1] + score(tx, ty, xx, 0); + } + for (int yy = 1; yy < TH; ++yy) { + St[yy][0] = St[yy-1][0] + score(tx, ty, 0, yy); + } + for (int yy = 1; yy < TH; ++yy) { + for (int xx = 1; xx < TW; ++xx) { + // operation grouping tuned for performance (empirically) + St[yy][xx] = (St[yy][xx-1] + St[yy-1][xx]) - (St[yy-1][xx-1] - score(tx, ty, xx, yy)); + } + } + // Step 2 — Compute weight and estimate for patches + // V(x), V(y) with y = x + t + for (int yy = start_y+border; yy < end_y-border; ++yy) { + int y = yy - border; + int xx = start_x+border; +#ifdef __SSE2__ + for (; xx < end_x-border-3; xx += 4) { + int x = xx - border; + int sx = xx + tx; + int sy = yy + ty; + + int sty = yy - start_y; + int stx = xx - start_x; + + vfloat dist2 = LVFU(St[sty + patch_radius][stx + patch_radius]) + LVFU(St[sty - patch_radius][stx - patch_radius]) - LVFU(St[sty + patch_radius][stx - patch_radius]) - LVFU(St[sty - patch_radius][stx + patch_radius]); + dist2 = vmaxf(dist2, zerov); + vfloat d = dist2 * LVFU(mask[y][x]); + vfloat weight = explut[d]; + STVFU(SW[y-start_y][x-start_x], LVFU(SW[y-start_y][x-start_x]) + weight); + vfloat Y = weight * LVFU(src[sy][sx]); + STVFU(dst[y][x], LVFU(dst[y][x]) + Y); + } +#endif + for (; xx < end_x-border; ++xx) { + int x = xx - border; + int sx = xx + tx; + int sy = yy + ty; + + int sty = yy - start_y; + int stx = xx - start_x; + + float dist2 = St[sty + patch_radius][stx + patch_radius] + St[sty - patch_radius][stx - patch_radius] - St[sty + patch_radius][stx - patch_radius] - St[sty - patch_radius][stx + patch_radius]; + dist2 = std::max(dist2, 0.f); + float d = dist2 * mask[y][x]; + float weight = explut[d]; + SW[y-start_y][x-start_x] += weight; + float Y = weight * src[sy][sx]; + dst[y][x] += Y; + + assert(!xisinff(dst[y][x])); + assert(!xisnanf(dst[y][x])); + } + } + } + } +// printf("E\n"); + + // Compute final estimate at pixel x = (x1, x2) + for (int yy = start_y+border; yy < end_y-border; ++yy) { + int y = yy - border; + int xx = start_x+border; +#ifdef __SSE2__ + for (; xx < end_x-border-3; xx += 4) { + int x = xx - border; + + const vfloat Y = LVFU(dst[y][x]); + const vfloat f = (v1e_5f + LVFU(SW[y-start_y][x-start_x])); + STVFU(dst[y][x], (Y / f) * v65536f); + } +#endif + for (; xx < end_x-border; ++xx) { + int x = xx - border; + + const float Y = dst[y][x]; + const float f = (1e-5f + SW[y-start_y][x-start_x]); + dst[y][x] = (Y / f) * 65536.f; + + assert(!xisnanf(dst[y][x])); + } + } + } + +#ifdef __SSE2__ + _MM_SET_FLUSH_ZERO_MODE(oldMode); +#endif + + } // omp parallel + +#ifdef _OPENMP +# pragma omp parallel for schedule(dynamic,16) if (multithread) +#endif + for (int y = 0; y < H; ++y) {//apply inverse gamma 3.f and put result in range 32768.f + int x = 0; +#ifdef __SSE2__ + for (; x < W - 3; x += 4) { + STVFU(img[y][x], F2V(32768.f) * gammalog(LVFU(dst[y][x]) / F2V(65536.f), F2V(gamma), F2V(ts), F2V(g_a[3]), F2V(g_a[4]))); + } +#endif + for (; x < W; ++x) { + img[y][x] = 32768.f * gammalog(dst[y][x] / 65536.f, gamma, ts, g_a[3], g_a[4]); + } + } + + for (int i = 0; i < hei; ++i) { + delete[] dst[i]; + } + delete[] dst; + +} + void ImProcFunctions::Lab_Local( - int call, int sp, float** shbuffer, LabImage * original, LabImage * transformed, LabImage * reserved, LabImage * lastorig, int cx, int cy, int oW, int oH, int sk, + int call, int sp, float** shbuffer, LabImage * original, LabImage * transformed, LabImage * reserved, LabImage * savenormtm, LabImage * savenormreti, LabImage * lastorig, int cx, int cy, int oW, int oH, int sk, const LocretigainCurve& locRETgainCcurve, const LocretitransCurve& locRETtransCcurve, const LUTf& lllocalcurve, bool locallutili, const LUTf& cllocalcurve, bool localclutili, @@ -9518,9 +11257,10 @@ void ImProcFunctions::Lab_Local( const LUTf& lmaskcblocalcurve, bool localmaskcbutili, const LUTf& lmaskbllocalcurve, bool localmaskblutili, const LUTf& lmasklclocalcurve, bool localmasklcutili, + const LUTf& lmaskloglocalcurve, bool localmasklogutili, const LUTf& lmasklocal_curve, bool localmask_utili, - const LocCCmaskCurve& locccmasCurve, bool lcmasutili, const LocLLmaskCurve& locllmasCurve, bool llmasutili, const LocHHmaskCurve& lochhmasCurve, bool lhmasutili, const LocHHmaskCurve& lochhhmasCurve, bool lhhmasutili, + const LocCCmaskCurve& locccmasCurve, bool lcmasutili, const LocLLmaskCurve& locllmasCurve, bool llmasutili, const LocHHmaskCurve& lochhmasCurve, bool lhmasutili, const LocHHmaskCurve& llochhhmasCurve, bool lhhmasutili, const LocCCmaskCurve& locccmasexpCurve, bool lcmasexputili, const LocLLmaskCurve& locllmasexpCurve, bool llmasexputili, const LocHHmaskCurve& lochhmasexpCurve, bool lhmasexputili, const LocCCmaskCurve& locccmasSHCurve, bool lcmasSHutili, const LocLLmaskCurve& locllmasSHCurve, bool llmasSHutili, const LocHHmaskCurve& lochhmasSHCurve, bool lhmasSHutili, const LocCCmaskCurve& locccmasvibCurve, bool lcmasvibutili, const LocLLmaskCurve& locllmasvibCurve, bool llmasvibutili, const LocHHmaskCurve& lochhmasvibCurve, bool lhmasvibutili, @@ -9529,6 +11269,7 @@ void ImProcFunctions::Lab_Local( const LocCCmaskCurve& locccmastmCurve, bool lcmastmutili, const LocLLmaskCurve& locllmastmCurve, bool llmastmutili, const LocHHmaskCurve& lochhmastmCurve, bool lhmastmutili, const LocCCmaskCurve& locccmasblCurve, bool lcmasblutili, const LocLLmaskCurve& locllmasblCurve, bool llmasblutili, const LocHHmaskCurve& lochhmasblCurve, bool lhmasblutili, const LocCCmaskCurve& locccmaslcCurve, bool lcmaslcutili, const LocLLmaskCurve& locllmaslcCurve, bool llmaslcutili, const LocHHmaskCurve& lochhmaslcCurve, bool lhmaslcutili, + const LocCCmaskCurve& locccmaslogCurve, bool lcmaslogutili, const LocLLmaskCurve& locllmaslogCurve, bool llmaslogutili, const LocHHmaskCurve& lochhmaslogCurve, bool lhmaslogutili, const LocCCmaskCurve& locccmas_Curve, bool lcmas_utili, const LocLLmaskCurve& locllmas_Curve, bool llmas_utili, const LocHHmaskCurve& lochhmas_Curve, bool lhmas_utili, const LocHHmaskCurve& lochhhmas_Curve, bool lhhmas_utili, const LocwavCurve& loclmasCurveblwav, bool lmasutiliblwav, @@ -9538,14 +11279,16 @@ void ImProcFunctions::Lab_Local( const LocwavCurve& locconwavCurve, bool locconwavutili, const LocwavCurve& loccompwavCurve, bool loccompwavutili, const LocwavCurve& loccomprewavCurve, bool loccomprewavutili, + const LocwavCurve& locwavCurvehue, bool locwavhueutili, const LocwavCurve& locwavCurveden, bool locwavdenutili, const LocwavCurve& locedgwavCurve, bool locedgwavutili, const LocwavCurve& loclmasCurve_wav, bool lmasutili_wav, bool LHutili, bool HHutili, bool CHutili, const LUTf& cclocalcurve, bool localcutili, const LUTf& rgblocalcurve, bool localrgbutili, bool localexutili, const LUTf& exlocalcurve, const LUTf& hltonecurveloc, const LUTf& shtonecurveloc, const LUTf& tonecurveloc, const LUTf& lightCurveloc, double& huerefblur, double& chromarefblur, double& lumarefblur, double& hueref, double& chromaref, double& lumaref, double& sobelref, int &lastsav, - bool prevDeltaE, int llColorMask, int llColorMaskinv, int llExpMask, int llExpMaskinv, int llSHMask, int llSHMaskinv, int llvibMask, int lllcMask, int llsharMask, int llcbMask, int llretiMask, int llsoftMask, int lltmMask, int llblMask, int ll_Mask, - float& minCD, float& maxCD, float& mini, float& maxi, float& Tmean, float& Tsigma, float& Tmin, float& Tmax + bool prevDeltaE, int llColorMask, int llColorMaskinv, int llExpMask, int llExpMaskinv, int llSHMask, int llSHMaskinv, int llvibMask, int lllcMask, int llsharMask, int llcbMask, int llretiMask, int llsoftMask, int lltmMask, int llblMask, int lllogMask, int ll_Mask, + float& minCD, float& maxCD, float& mini, float& maxi, float& Tmean, float& Tsigma, float& Tmin, float& Tmax, + float& meantm, float& stdtm, float& meanreti, float& stdreti ) { //general call of others functions : important return hueref, chromaref, lumaref @@ -9557,9 +11300,11 @@ void ImProcFunctions::Lab_Local( constexpr int del = 3; // to avoid crash with [loy - begy] and [lox - begx] and bfh bfw // with gtk2 [loy - begy-1] [lox - begx -1 ] and del = 1 struct local_params lp; - calcLocalParams(sp, oW, oH, params->locallab, lp, prevDeltaE, llColorMask, llColorMaskinv, llExpMask, llExpMaskinv, llSHMask, llSHMaskinv, llvibMask, lllcMask, llsharMask, llcbMask, llretiMask, llsoftMask, lltmMask, llblMask, ll_Mask, locwavCurveden, locwavdenutili); + calcLocalParams(sp, oW, oH, params->locallab, lp, prevDeltaE, llColorMask, llColorMaskinv, llExpMask, llExpMaskinv, llSHMask, llSHMaskinv, llvibMask, lllcMask, llsharMask, llcbMask, llretiMask, llsoftMask, lltmMask, llblMask, lllogMask, ll_Mask, locwavCurveden, locwavdenutili); - const float radius = lp.rad / (sk * 1.4f); //0 to 70 ==> see skip + avoidcolshi(lp, sp, original, transformed, cy, cx, sk); + + const float radius = lp.rad / (sk * 1.4); //0 to 70 ==> see skip int levred; bool noiscfactiv; @@ -9574,7 +11319,7 @@ void ImProcFunctions::Lab_Local( //lastsav for save restore image lastsav = 0; - if (lp.excmet == 1 && call <= 3) {//exclude + if (lp.excmet == 1 && call <= 3 && lp.activspot) {//exclude const int bfh = int (lp.ly + lp.lyT) + del; //bfw bfh real size of square zone const int bfw = int (lp.lx + lp.lxL) + del; const int begy = lp.yc - lp.lyT; @@ -9633,7 +11378,7 @@ void ImProcFunctions::Lab_Local( for (int ir = 0; ir < bfh; ir++) { for (int jr = 0; jr < bfw; jr++) { const float val = ble[ir][jr] * 32768.f; - sombel += val; + sombel += static_cast(val); deltasobelL[ir][jr] = val; } } @@ -9643,7 +11388,8 @@ void ImProcFunctions::Lab_Local( } //encoding lab at the beginning - if (lp.logena) { + if (lp.logena || lp.showmasklogmet == 2 || lp.enaLMask || lp.showmasklogmet == 3 || lp.showmasklogmet == 4) { + const int ystart = rtengine::max(static_cast(lp.yc - lp.lyT) - cy, 0); const int yend = rtengine::min(static_cast(lp.yc + lp.ly) - cy, original->H); const int xstart = rtengine::max(static_cast(lp.xc - lp.lxL) - cx, 0); @@ -9655,6 +11401,16 @@ void ImProcFunctions::Lab_Local( const std::unique_ptr bufexporig(new LabImage(bfw, bfh)); //buffer for data in zone limit const std::unique_ptr bufexpfin(new LabImage(bfw, bfh)); //buffer for data in zone limit + std::unique_ptr bufmaskblurlog; + std::unique_ptr originalmasklog; + std::unique_ptr bufmaskoriglog; + + if (lp.showmasklogmet == 2 || lp.enaLMask || lp.showmasklogmet == 3 || lp.showmasklogmet == 4) { + bufmaskblurlog.reset(new LabImage(bfw, bfh)); + originalmasklog.reset(new LabImage(bfw, bfh)); + bufmaskoriglog.reset(new LabImage(bfw, bfh)); + } + #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if(multiThread) #endif @@ -9666,32 +11422,139 @@ void ImProcFunctions::Lab_Local( } } - bufexpfin->CopyFrom(bufexporig.get(), multiThread); - std::unique_ptr tmpImage(new Imagefloat(bfw, bfh)); - lab2rgb(*bufexpfin, *tmpImage, params->icm.workingProfile); - log_encode(tmpImage.get(), lp, multiThread, bfw, bfh); - rgb2lab(*(tmpImage.get()), *bufexpfin, params->icm.workingProfile); - tmpImage.reset(); + int inv = 0; + bool showmaske = false; + bool enaMask = false; + bool deltaE = false; + bool modmask = false; + bool zero = false; + bool modif = false; - //here begin graduated filter - //first solution "easy" but we can do other with log_encode...to see the results - if (lp.strlog != 0.f) { - struct grad_params gplog; - calclocalGradientParams(lp, gplog, ystart, xstart, bfw, bfh, 11); + if (lp.showmasklogmet == 3) { + showmaske = true; + } + + if (lp.enaLMask) { + enaMask = true; + } + + if (lp.showmasklogmet == 4) { + deltaE = true; + } + + if (lp.showmasklogmet == 2) { + modmask = true; + } + + if (lp.showmasklogmet == 1) { + modif = true; + } + + if (lp.showmasklogmet == 0) { + zero = true; + } + float chrom = lp.chromaL; + float rad = lp.radmaL; + float blendm = lp.blendmaL; + float gamma = 1.f; + float slope = 0.f; + float lap = 0.f; //params->locallab.spots.at(sp).lapmaskexp; + bool pde = false; //params->locallab.spots.at(sp).laplac; + LocwavCurve dummy; + bool delt = params->locallab.spots.at(sp).deltae; + int sco = params->locallab.spots.at(sp).scopemask; + int shado = 0; + int shortcu = 0;//lp.mergemet; //params->locallab.spots.at(sp).shortc; + const float mindE = 2.f + MINSCOPE * sco * lp.thr; + const float maxdE = 5.f + MAXSCOPE * sco * (1 + 0.1f * lp.thr); + const float mindElim = 2.f + MINSCOPE * limscope * lp.thr; + const float maxdElim = 5.f + MAXSCOPE * limscope * (1 + 0.1f * lp.thr); + float amountcd = 0.f; + float anchorcd = 50.f; + int lumask = params->locallab.spots.at(sp).lumask; + LocHHmaskCurve lochhhmasCurve; + const int highl = 0; + maskcalccol(false, pde, bfw, bfh, xstart, ystart, sk, cx, cy, bufexporig.get(), bufmaskoriglog.get(), originalmasklog.get(), original, reserved, inv, lp, + 0.f, false, + locccmaslogCurve, lcmaslogutili, locllmaslogCurve, llmaslogutili, lochhmaslogCurve, lhmaslogutili, lochhhmasCurve, false, multiThread, + enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmaskloglocalcurve, localmasklogutili, dummy, false, 1, 1, 5, 5, + shortcu, delt, hueref, chromaref, lumaref, + maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco, false, 0.f, 0.f, -1 + ); + + if (lp.showmasklogmet == 3) { + showmask(lumask, lp, xstart, ystart, cx, cy, bfw, bfh, bufexporig.get(), transformed, bufmaskoriglog.get(), 0); + + return; + } + if (lp.showmasklogmet == 0 || lp.showmasklogmet == 1 || lp.showmasklogmet == 2 || lp.showmasklogmet == 4 || lp.enaLMask) { + + bufexpfin->CopyFrom(bufexporig.get(), multiThread); + std::unique_ptr tmpImage(new Imagefloat(bfw, bfh)); + std::unique_ptr tmpImageorig(new Imagefloat(bfw, bfh)); + lab2rgb(*bufexpfin, *tmpImage, params->icm.workingProfile); #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if(multiThread) #endif - for (int ir = 0; ir < bfh; ir++) { - for (int jr = 0; jr < bfw; jr++) { - bufexpfin->L[ir][jr] *= ImProcFunctions::calcGradientFactor(gplog, jr, ir); + for (int y = 0; y < bfh; y++) { + for (int x = 0; x < bfw; x++) { + tmpImageorig->r(y, x) = tmpImage->r(y, x); + tmpImageorig->g(y, x) = tmpImage->g(y, x); + tmpImageorig->b(y, x) = tmpImage->b(y, x); + } + } + + log_encode(tmpImage.get(), lp, multiThread, bfw, bfh); + const float repart = 1.0 - 0.01 * params->locallab.spots.at(sp).repar; + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if(multiThread) +#endif + for (int y = 0; y < bfh; y++) { + for (int x = 0; x < bfw; x++) { + tmpImage->r(y, x) = intp(repart, tmpImageorig->r(y, x), tmpImage->r(y, x)); + tmpImage->g(y, x) = intp(repart, tmpImageorig->g(y, x), tmpImage->g(y, x)); + tmpImage->b(y, x) = intp(repart, tmpImageorig->b(y, x), tmpImage->b(y, x)); + } + } + + rgb2lab(*(tmpImage.get()), *bufexpfin, params->icm.workingProfile); + + tmpImageorig.reset(); + tmpImage.reset(); + if (params->locallab.spots.at(sp).ciecam) { + ImProcFunctions::ciecamloc_02float(sp, bufexpfin.get(), 1); + } + + //here begin graduated filter + //first solution "easy" but we can do other with log_encode...to see the results + if (lp.strlog != 0.f) { + struct grad_params gplog; + calclocalGradientParams(lp, gplog, ystart, xstart, bfw, bfh, 11); +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if(multiThread) +#endif + for (int ir = 0; ir < bfh; ir++) { + for (int jr = 0; jr < bfw; jr++) { + bufexpfin->L[ir][jr] *= ImProcFunctions::calcGradientFactor(gplog, jr, ir); + } } } - } - //end graduated - transit_shapedetect2(call, 11, bufexporig.get(), bufexpfin.get(), nullptr, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); - if (params->locallab.spots.at(sp).recurs) { + + if(lp.enaLMask && lp.recothrl != 1.f) { + float hig = lp.higthrl; + float low = lp.lowthrl; + float recoth = lp.recothrl; + float decay = lp.decayl; + bool invmask = false; + maskrecov(bufexpfin.get(), original, bufmaskoriglog.get(), bfh, bfw, ystart, xstart, hig, low, recoth, decay, invmask, sk, multiThread); + } + transit_shapedetect2(sp, 0.f, 0.f, call, 11, bufexporig.get(), bufexpfin.get(), originalmasklog.get(), hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); + } + + if (lp.recur) { original->CopyFrom(transformed, multiThread); float avge; calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); @@ -9702,125 +11565,120 @@ void ImProcFunctions::Lab_Local( //Prepare mask for Blur and noise and Denoise bool denoiz = false; - if ((lp.noiself > 0.f || lp.noiself0 > 0.f || lp.noiself2 > 0.f || lp.noiselc > 0.f || lp.noisecf > 0.f || lp.noisecc > 0.f || lp.bilat > 0.f) && lp.denoiena) { + if ((lp.noiself > 0.f || lp.noiself0 > 0.f || lp.noiself2 > 0.f || lp.noiselc > 0.f || lp.wavcurvedenoi || lp.noisecf > 0.f || lp.noisecc > 0.f || lp.bilat > 0.f) && lp.denoiena) { denoiz = true; } bool blurz = false; bool delt = params->locallab.spots.at(sp).deltae; - if (((radius > 1.5 * GAUSS_SKIP) || lp.stren > 0.1 || lp.blmet == 1 || lp.guidb > 1 || lp.showmaskblmet == 2 || lp.enablMask || lp.showmaskblmet == 3 || lp.showmaskblmet == 4) && lp.blurena) { + if (((static_cast(radius) > 1.5 * GAUSS_SKIP) || lp.stren > 0.1 || lp.blmet == 1 || lp.guidb > 1 || lp.showmaskblmet == 2 || lp.enablMask || lp.showmaskblmet == 3 || lp.showmaskblmet == 4) && lp.blurena) { blurz = true; } - const int GW = transformed->W; - const int GH = transformed->H; - const std::unique_ptr bufblorig(new LabImage(GW, GH)); + const int TW = transformed->W; + const int TH = transformed->H; + const std::unique_ptr bufblorig(new LabImage(TW, TH)); std::unique_ptr originalmaskbl; std::unique_ptr bufmaskorigbl; std::unique_ptr bufmaskblurbl; - std::unique_ptr bufgb; - std::unique_ptr bufprov(new LabImage(GW, GH)); + std::unique_ptr bufprov(new LabImage(TW, TH)); if (denoiz || blurz || lp.denoiena || lp.blurena) { - bufgb.reset(new LabImage(GW, GH)); - - if (lp.showmaskblmet == 2 || lp.enablMask || lp.showmaskblmet == 3 || lp.showmaskblmet == 4) { - bufmaskorigbl.reset(new LabImage(GW, GH)); - bufmaskblurbl.reset(new LabImage(GW, GH, true)); - originalmaskbl.reset (new LabImage(GW, GH)); - } + if (lp.showmaskblmet == 2 || lp.enablMask || lp.showmaskblmet == 3 || lp.showmaskblmet == 4) { + bufmaskorigbl.reset(new LabImage(TW, TH)); + bufmaskblurbl.reset(new LabImage(TW, TH, true)); + originalmaskbl.reset (new LabImage(TW, TH)); + } #ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) if (multiThread) + #pragma omp parallel for schedule(dynamic,16) if (multiThread) #endif - for (int y = 0; y < GH; y++) { - for (int x = 0; x < GW; x++) { - bufblorig->L[y][x] = original->L[y][x]; - } + for (int y = 0; y < TH; y++) { + for (int x = 0; x < TW; x++) { + bufblorig->L[y][x] = original->L[y][x]; } + } - int inv = 0; - bool showmaske = false; - bool enaMask = false; - bool deltaE = false; - bool modmask = false; - bool zero = false; - bool modif = false; + int inv = 0; + bool showmaske = false; + bool enaMask = false; + bool deltaE = false; + bool modmask = false; + bool zero = false; + bool modif = false; - if (lp.showmaskblmet == 3) { - showmaske = true; - } + if (lp.showmaskblmet == 3) { + showmaske = true; + } - if (lp.enablMask) { - enaMask = true; - } + if (lp.enablMask) { + enaMask = true; + } - if (lp.showmaskblmet == 4) { - deltaE = true; - } + if (lp.showmaskblmet == 4) { + deltaE = true; + } - if (lp.showmaskblmet == 2) { - modmask = true; - } + if (lp.showmaskblmet == 2) { + modmask = true; + } - if (lp.showmaskblmet == 1) { - modif = true; - } + if (lp.showmaskblmet == 1) { + modif = true; + } - if (lp.showmaskblmet == 0) { - zero = true; - } + if (lp.showmaskblmet == 0) { + zero = true; + } - float chrom = lp.chromabl; - float rad = lp.radmabl; - float gamma = lp.gammabl; - float slope = lp.slomabl; - float blendm = lp.blendmabl; - float lap = params->locallab.spots.at(sp).lapmaskbl; - bool pde = params->locallab.spots.at(sp).laplac; - LocwavCurve dummy; - bool delt = params->locallab.spots.at(sp).deltae; - int lumask = params->locallab.spots.at(sp).lumask; - int sco = params->locallab.spots.at(sp).scopemask; - int shortcu = 0; + float chrom = lp.chromabl; + float rad = lp.radmabl; + float gamma = lp.gammabl; + float slope = lp.slomabl; + float blendm = lp.blendmabl; + float lap = params->locallab.spots.at(sp).lapmaskbl; + bool pde = params->locallab.spots.at(sp).laplac; + LocwavCurve dummy; + int lumask = params->locallab.spots.at(sp).lumask; + int sco = params->locallab.spots.at(sp).scopemask; + int shortcu = 0; - const float mindE = 2.f + MINSCOPE * sco * lp.thr; - const float maxdE = 5.f + MAXSCOPE * sco * (1 + 0.1f * lp.thr); - const float mindElim = 2.f + MINSCOPE * limscope * lp.thr; - const float maxdElim = 5.f + MAXSCOPE * limscope * (1 + 0.1f * lp.thr); - const int shado = params->locallab.spots.at(sp).shadmaskblsha; - const int highl = params->locallab.spots.at(sp).shadmaskbl; - constexpr float amountcd = 0.f; - constexpr float anchorcd = 50.f; - LocHHmaskCurve lochhhmasCurve; - constexpr bool lhhmasutili = false; - const float strumask = 0.02f * params->locallab.spots.at(sp).strumaskbl; - bool astool = params->locallab.spots.at(sp).toolbl; + const float mindE = 2.f + MINSCOPE * sco * lp.thr; + const float maxdE = 5.f + MAXSCOPE * sco * (1 + 0.1f * lp.thr); + const float mindElim = 2.f + MINSCOPE * limscope * lp.thr; + const float maxdElim = 5.f + MAXSCOPE * limscope * (1 + 0.1f * lp.thr); + const int shado = params->locallab.spots.at(sp).shadmaskblsha; + const int highl = params->locallab.spots.at(sp).shadmaskbl; + constexpr float amountcd = 0.f; + constexpr float anchorcd = 50.f; + LocHHmaskCurve lochhhmasCurve; + const float strumask = 0.02 * params->locallab.spots.at(sp).strumaskbl; + const bool astool = params->locallab.spots.at(sp).toolbl; - maskcalccol(false, pde, GW, GH, 0, 0, sk, cx, cy, bufblorig.get(), bufmaskblurbl.get(), originalmaskbl.get(), original, reserved, inv, lp, - strumask, astool, - locccmasblCurve, lcmasblutili, locllmasblCurve, llmasblutili, lochhmasblCurve, lhmasblutili, lochhhmasCurve, lhhmasutili, multiThread, - enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmaskbllocalcurve, localmaskblutili, loclmasCurveblwav, lmasutiliblwav, 1, 1, 5, 5, - shortcu, delt, hueref, chromaref, lumaref, + maskcalccol(false, pde, TW, TH, 0, 0, sk, cx, cy, bufblorig.get(), bufmaskblurbl.get(), originalmaskbl.get(), original, reserved, inv, lp, + strumask, astool, locccmasblCurve, lcmasblutili, locllmasblCurve, llmasblutili, lochhmasblCurve, lhmasblutili, lochhhmasCurve, false, multiThread, + enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmaskbllocalcurve, + localmaskblutili, loclmasCurveblwav, lmasutiliblwav, 1, 1, 5, 5, shortcu, params->locallab.spots.at(sp).deltae, hueref, chromaref, lumaref, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco, false, 0.f, 0.f, 0 ); - if (lp.showmaskblmet == 3) { - showmask(lumask, lp, 0, 0, cx, cy, GW, GH, bufblorig.get(), transformed, bufmaskblurbl.get(), inv); - return; - } + if (lp.showmaskblmet == 3) { + showmask(lumask, lp, 0, 0, cx, cy, TW, TH, bufblorig.get(), transformed, bufmaskblurbl.get(), inv); + return; + } } bool execmaskblur = (lp.showmaskblmet == 2 || lp.enablMask || lp.showmaskblmet == 3 || lp.showmaskblmet == 4) && lp.smasktyp != 1; int strengr = params->locallab.spots.at(sp).strengr; - if (((radius > 1.5 * GAUSS_SKIP && lp.rad > 1.6) || lp.stren > 0.1 || lp.blmet == 1 || lp.guidb > 0 || strengr > 0 || execmaskblur) && lp.blurena) { // radius < GAUSS_SKIP means no gauss, just copy of original image - // if (((radius > 1.5 * GAUSS_SKIP && lp.rad > 1.6) || lp.stren > 0.1 || lp.blmet == 1 || lp.guidb > 0 || lp.showmaskblmet == 2 || lp.enablMask || lp.showmaskblmet == 3 || lp.showmaskblmet == 4) && lp.blurena) { // radius < GAUSS_SKIP means no gauss, just copy of original image + if (((static_cast(radius) > 1.5 * GAUSS_SKIP && lp.rad > 1.6) || lp.stren > 0.1 || lp.blmet == 1 || lp.guidb > 0 || strengr > 0 || execmaskblur) && lp.blurena) { // radius < GAUSS_SKIP means no gauss, just copy of original image std::unique_ptr tmp1; std::unique_ptr tmp2; + std::unique_ptr tmp3; + std::unique_ptr maskk; int ystart = rtengine::max(static_cast(lp.yc - lp.lyT) - cy, 0); int yend = rtengine::min(static_cast(lp.yc + lp.ly) - cy, original->H); int xstart = rtengine::max(static_cast(lp.xc - lp.lxL) - cx, 0); @@ -9832,16 +11690,16 @@ void ImProcFunctions::Lab_Local( bool fft = params->locallab.spots.at(sp).fftwbl; int isogr = params->locallab.spots.at(sp).isogr; - int scalegr = 100;//params->locallab.spots.at(sp).scalegr; - + int scalegr = params->locallab.spots.at(sp).scalegr; + float divgr = params->locallab.spots.at(sp).divgr; if (bfw >= mSP && bfh >= mSP) { - if (lp.blurmet == 0 && (fft || lp.rad > 30.f)) { + if (lp.blurmet == 0 && (fft || lp.rad > 30.0)) { optfft(N_fftwsize, bfh, bfw, bfhr, bfwr, lp, original->H, original->W, xstart, ystart, xend, yend, cx, cy); } - const std::unique_ptr bufgbi(new LabImage(GW, GH)); + const std::unique_ptr bufgbi(new LabImage(TW, TH)); //here mask is used with plain image for normal and inverse //if it is possible to optimize with maskcalccol(), I don't to preserve visibility @@ -9850,6 +11708,8 @@ void ImProcFunctions::Lab_Local( if (lp.blurmet == 0) { if (bfw > 0 && bfh > 0) { tmp1.reset(new LabImage(bfw, bfh)); + tmp3.reset(new LabImage(bfw, bfh)); + maskk.reset(new LabImage(bfw, bfh)); #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread) #endif @@ -9864,12 +11724,19 @@ void ImProcFunctions::Lab_Local( } else if (lp.blurmet == 1) { tmp1.reset(new LabImage(transformed->W, transformed->H)); tmp2.reset(new LabImage(transformed->W, transformed->H)); + tmp3.reset(new LabImage(transformed->W, transformed->H)); - for (int y = 0; y < GH ; y++) { - for (int x = 0; x < GW; x++) { + for (int y = 0; y < TH ; y++) { + for (int x = 0; x < TW; x++) { tmp2->L[y][x] = original->L[y][x]; tmp2->a[y][x] = original->a[y][x]; tmp2->b[y][x] = original->b[y][x]; + tmp3->L[y][x] = original->L[y][x]; + tmp3->a[y][x] = original->a[y][x]; + tmp3->b[y][x] = original->b[y][x]; + tmp1->L[y][x] = original->L[y][x]; + tmp1->a[y][x] = original->a[y][x]; + tmp1->b[y][x] = original->b[y][x]; bufgbi->L[y][x] = original->L[y][x]; bufgbi->a[y][x] = original->a[y][x]; bufgbi->b[y][x] = original->b[y][x]; @@ -9879,8 +11746,8 @@ void ImProcFunctions::Lab_Local( } - if (lp.blurmet == 0 && lp.blmet == 0 && radius > (1.5 * GAUSS_SKIP) && lp.rad > 1.6) { - if (fft || lp.rad > 30.f) { + if (lp.blurmet == 0 && lp.blmet == 0 && static_cast(radius) > (1.5 * GAUSS_SKIP) && lp.rad > 1.6) { + if (fft || lp.rad > 30.0) { if (lp.chromet == 0) { ImProcFunctions::fftw_convol_blur2(tmp1->L, tmp1->L, bfwr, bfhr, radius, 0, 0); } else if (lp.chromet == 1) { @@ -9892,22 +11759,16 @@ void ImProcFunctions::Lab_Local( ImProcFunctions::fftw_convol_blur2(tmp1->b, tmp1->b, bfwr, bfhr, radius, 0, 0); } } else { - #ifdef _OPENMP #pragma omp parallel if (multiThread) #endif { - if (lp.chromet == 0) - { + if (lp.chromet == 0) { gaussianBlur(tmp1->L, tmp1->L, bfw, bfh, radius); - } - - else if (lp.chromet == 1) - { + } else if (lp.chromet == 1) { gaussianBlur(tmp1->a, tmp1->a, bfw, bfh, radius); gaussianBlur(tmp1->b, tmp1->b, bfw, bfh, radius); - } else if (lp.chromet == 2) - { + } else if (lp.chromet == 2) { gaussianBlur(tmp1->L, tmp1->L, bfw, bfh, radius); gaussianBlur(tmp1->a, tmp1->a, bfw, bfh, radius); gaussianBlur(tmp1->b, tmp1->b, bfw, bfh, radius); @@ -9915,49 +11776,39 @@ void ImProcFunctions::Lab_Local( } } - } else if (lp.blurmet == 1 && lp.blmet == 0 && radius > (1.5 * GAUSS_SKIP) && lp.rad > 1.6) { - if (fft || lp.rad > 30.f) { + } else if (lp.blurmet == 1 && lp.blmet == 0 && static_cast(radius) > (1.5 * GAUSS_SKIP) && lp.rad > 1.6) { + if (fft || lp.rad > 30.0) { if (lp.chromet == 0) { - ImProcFunctions::fftw_convol_blur2(original->L, tmp1->L, GW, GH, radius, 0, 0); - } - - else if (lp.chromet == 1) { - ImProcFunctions::fftw_convol_blur2(original->a, tmp1->a, GW, GH, radius, 0, 0); - ImProcFunctions::fftw_convol_blur2(original->b, tmp1->b, GW, GH, radius, 0, 0); + ImProcFunctions::fftw_convol_blur2(original->L, tmp1->L, TW, TH, radius, 0, 0); + } else if (lp.chromet == 1) { + ImProcFunctions::fftw_convol_blur2(original->a, tmp1->a, TW, TH, radius, 0, 0); + ImProcFunctions::fftw_convol_blur2(original->b, tmp1->b, TW, TH, radius, 0, 0); } else if (lp.chromet == 2) { - ImProcFunctions::fftw_convol_blur2(original->L, tmp1->L, GW, GH, radius, 0, 0); - ImProcFunctions::fftw_convol_blur2(original->a, tmp1->a, GW, GH, radius, 0, 0); - ImProcFunctions::fftw_convol_blur2(original->b, tmp1->b, GW, GH, radius, 0, 0); + ImProcFunctions::fftw_convol_blur2(original->L, tmp1->L, TW, TH, radius, 0, 0); + ImProcFunctions::fftw_convol_blur2(original->a, tmp1->a, TW, TH, radius, 0, 0); + ImProcFunctions::fftw_convol_blur2(original->b, tmp1->b, TW, TH, radius, 0, 0); } - } else { - #ifdef _OPENMP #pragma omp parallel if (multiThread) #endif { - if (lp.chromet == 0) - { - gaussianBlur(original->L, tmp1->L, GW, GH, radius); - } else if (lp.chromet == 1) - - { - gaussianBlur(original->a, tmp1->a, GW, GH, radius); - gaussianBlur(original->b, tmp1->b, GW, GH, radius); - } else if (lp.chromet == 2) - - { - gaussianBlur(original->L, tmp1->L, GW, GH, radius); - gaussianBlur(original->a, tmp1->a, GW, GH, radius); - gaussianBlur(original->b, tmp1->b, GW, GH, radius); + if (lp.chromet == 0) { + gaussianBlur(original->L, tmp1->L, TW, TH, radius); + } else if (lp.chromet == 1) { + gaussianBlur(original->a, tmp1->a, TW, TH, radius); + gaussianBlur(original->b, tmp1->b, TW, TH, radius); + } else if (lp.chromet == 2) { + gaussianBlur(original->L, tmp1->L, TW, TH, radius); + gaussianBlur(original->a, tmp1->a, TW, TH, radius); + gaussianBlur(original->b, tmp1->b, TW, TH, radius); } } } } - //add noise - if (tmp1.get() && lp.stren > 0.1f && lp.blmet == 0) { + if (tmp1.get() && lp.stren > 0.1 && lp.blmet == 0) { float mean = 0.f;//0 best result float variance = lp.stren ; addGaNoise(tmp1.get(), tmp1.get(), mean, variance, sk) ; @@ -9969,8 +11820,8 @@ void ImProcFunctions::Lab_Local( int he = bfh; if (lp.blurmet == 1) { - wi = GW; - he = GH; + wi = TW; + he = TH; } if (tmp1.get()) { @@ -9986,7 +11837,7 @@ void ImProcFunctions::Lab_Local( } - filmGrain(tmpImage, isogr, strengr, scalegr, wi, he); + filmGrain(tmpImage, isogr, strengr, scalegr, divgr, wi, he); for (int y = 0; y < he ; y++) { for (int x = 0; x < wi; x++) { @@ -10044,8 +11895,8 @@ void ImProcFunctions::Lab_Local( } else if (lp.blurmet == 1 && lp.blmet == 1) { float** tmL; - int wid = GW; - int hei = GH; + int wid = TW; + int hei = TH; tmL = new float*[hei]; for (int i = 0; i < hei; ++i) { @@ -10053,14 +11904,14 @@ void ImProcFunctions::Lab_Local( } if (lp.chromet == 0) { - Median_Denoise(tmp2->L, tmp1->L, GW, GH, medianTypeL, lp.it, multiThread, tmL); + Median_Denoise(tmp2->L, tmp1->L, TW, TH, medianTypeL, lp.it, multiThread, tmL); } else if (lp.chromet == 1) { - Median_Denoise(tmp2->a, tmp1->a, GW, GH, medianTypeAB, lp.it, multiThread, tmL); - Median_Denoise(tmp2->b, tmp1->b, GW, GH, medianTypeAB, lp.it, multiThread, tmL); + Median_Denoise(tmp2->a, tmp1->a, TW, TH, medianTypeAB, lp.it, multiThread, tmL); + Median_Denoise(tmp2->b, tmp1->b, TW, TH, medianTypeAB, lp.it, multiThread, tmL); } else if (lp.chromet == 2) { - Median_Denoise(tmp2->L, tmp1->L, GW, GH, medianTypeL, lp.it, multiThread, tmL); - Median_Denoise(tmp2->a, tmp1->a, GW, GH, medianTypeAB, lp.it, multiThread, tmL); - Median_Denoise(tmp2->b, tmp1->b, GW, GH, medianTypeAB, lp.it, multiThread, tmL); + Median_Denoise(tmp2->L, tmp1->L, TW, TH, medianTypeL, lp.it, multiThread, tmL); + Median_Denoise(tmp2->a, tmp1->a, TW, TH, medianTypeAB, lp.it, multiThread, tmL); + Median_Denoise(tmp2->b, tmp1->b, TW, TH, medianTypeAB, lp.it, multiThread, tmL); } for (int i = 0; i < hei; ++i) { @@ -10081,7 +11932,9 @@ void ImProcFunctions::Lab_Local( tmp1->L[y - ystart][x - xstart] = original->L[y][x]; tmp1->a[y - ystart][x - xstart] = original->a[y][x]; tmp1->b[y - ystart][x - xstart] = original->b[y][x]; - bufgb->L[y - ystart][x - xstart] = original->L[y][x]; + tmp3->L[y - ystart][x - xstart] = original->L[y][x]; + tmp3->a[y - ystart][x - xstart] = original->a[y][x]; + tmp3->b[y - ystart][x - xstart] = original->b[y][x]; } } @@ -10116,7 +11969,7 @@ void ImProcFunctions::Lab_Local( int r = rtengine::max(int(lp.guidb / sk), 1); - const float epsil = 0.001f * std::pow(2, - lp.epsb); + const float epsil = 0.001f * std::pow(2.f, -lp.epsb); if (lp.chromet == 0) { rtengine::guidedFilterLog(guide, 10.f, LL, r, epsil, multiThread); @@ -10157,6 +12010,67 @@ void ImProcFunctions::Lab_Local( } } } + if(lp.enablMask && lp.recothr != 1.f && lp.smasktyp != 1) { + array2D masklum; + masklum(bfw, bfh); + for (int ir = 0; ir < bfh; ir++) + for (int jr = 0; jr < bfw; jr++) { + masklum[ir][jr] = 1.f; + } + + float hig = lp.higthr; + float higc; + calcdif(hig, higc); + float low = lp.lowthr; + float lowc; + calcdif(low, lowc); + + if(higc < lowc) { + higc = lowc + 0.01f; + } + float th = (lp.recothr - 1.f); + float ahigh = th / (higc - 100.f); + float bhigh = 1.f - higc * ahigh; + + float alow = th / lowc; + float blow = 1.f - th; + +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int ir = 0; ir < bfh; ir++) + for (int jr = 0; jr < bfw; jr++) { + const float lM = bufmaskblurbl->L[ir + ystart][jr + xstart]; + const float lmr = lM / 327.68f; + if (lM < 327.68f * lowc) { + masklum[ir][jr] = alow * lmr + blow; + } else if (lM < 327.68f * higc) { + + } else { + masklum[ir][jr] = ahigh * lmr + bhigh; + } + if(lp.invmask == true) { + float k = masklum[ir][jr]; + masklum[ir][jr] = 1 - k*k; + } + } + + for (int i = 0; i < 3; ++i) { + boxblur(static_cast(masklum), static_cast(masklum), 10 / sk, bfw, bfh, false); + } + +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int i = 0; i < bfh; ++i) { + for (int j = 0; j < bfw; ++j) { + tmp1->L[i][j] = (tmp3->L[i][j] - tmp1->L[i][j]) * LIM01(masklum[i][j]) + tmp1->L[i][j]; + tmp1->a[i][j] = (tmp3->a[i][j] - tmp1->a[i][j]) * LIM01(masklum[i][j]) + tmp1->a[i][j]; + tmp1->b[i][j] = (tmp3->b[i][j] - tmp1->b[i][j]) * LIM01(masklum[i][j]) + tmp1->b[i][j]; + } + } + masklum.free(); + } delete tmpImage; } @@ -10167,29 +12081,32 @@ void ImProcFunctions::Lab_Local( #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread) #endif - for (int y = 0; y < GH ; y++) { - for (int x = 0; x < GW; x++) { + for (int y = 0; y < TH ; y++) { + for (int x = 0; x < TW; x++) { tmp1->L[y][x] = original->L[y][x]; tmp1->a[y][x] = original->a[y][x]; tmp1->b[y][x] = original->b[y][x]; tmp2->L[y][x] = original->L[y][x]; + tmp3->L[y][x] = original->L[y][x]; + tmp3->a[y][x] = original->a[y][x]; + tmp3->b[y][x] = original->b[y][x]; } } Imagefloat *tmpImage = nullptr; - tmpImage = new Imagefloat(GW, GH); + tmpImage = new Imagefloat(TW, TH); lab2rgb(*tmp1, *tmpImage, params->icm.workingProfile); - array2D LL(GW, GH); - array2D rr(GW, GH); - array2D gg(GW, GH); - array2D bb(GW, GH); - array2D guide(GW, GH); + array2D LL(TW, TH); + array2D rr(TW, TH); + array2D gg(TW, TH); + array2D bb(TW, TH); + array2D guide(TW, TH); #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread) #endif - for (int y = 0; y < GH ; y++) { - for (int x = 0; x < GW; x++) { + for (int y = 0; y < TH ; y++) { + for (int x = 0; x < TW; x++) { LL[y][x] = tmp1->L[y][x]; float ll = LL[y][x] / 32768.f; guide[y][x] = xlin2log(rtengine::max(ll, 0.f), 10.f); @@ -10200,14 +12117,14 @@ void ImProcFunctions::Lab_Local( } } - array2D iR(GW, GH, rr, 0); - array2D iG(GW, GH, gg, 0); - array2D iB(GW, GH, bb, 0); - array2D iL(GW, GH, LL, 0); + array2D iR(TW, TH, rr, 0); + array2D iG(TW, TH, gg, 0); + array2D iB(TW, TH, bb, 0); + array2D iL(TW, TH, LL, 0); int r = rtengine::max(int(lp.guidb / sk), 1); - const float epsil = 0.001f * std::pow(2, - lp.epsb); + const float epsil = 0.001f * std::pow(2.f, - lp.epsb); if (lp.chromet == 0) { rtengine::guidedFilterLog(guide, 10.f, LL, r, epsil, multiThread); @@ -10223,8 +12140,8 @@ void ImProcFunctions::Lab_Local( #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread) #endif - for (int y = 0; y < GH ; y++) { - for (int x = 0; x < GW; x++) { + for (int y = 0; y < TH ; y++) { + for (int x = 0; x < TW; x++) { rr[y][x] = intp(lp.strbl, rr[y][x] , iR[y][x]); gg[y][x] = intp(lp.strbl, gg[y][x] , iG[y][x]); bb[y][x] = intp(lp.strbl, bb[y][x] , iB[y][x]); @@ -10241,56 +12158,86 @@ void ImProcFunctions::Lab_Local( #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread) #endif - for (int y = 0; y < GH ; y++) { - for (int x = 0; x < GW; x++) { + for (int y = 0; y < TH ; y++) { + for (int x = 0; x < TW; x++) { LL[y][x] = intp(lp.strbl, LL[y][x] , iL[y][x]); tmp1->L[y][x] = LL[y][x]; } } } + if(lp.enablMask && lp.recothr != 1.f && lp.smasktyp != 1) { + array2D masklum; + masklum(TW, TH); + for (int ir = 0; ir < TH; ir++) + for (int jr = 0; jr < TW; jr++) { + masklum[ir][jr] = 1.f; + } + + float hig = lp.higthr; + float higc; + calcdif(hig, higc); + float low = lp.lowthr; + float lowc; + calcdif(low, lowc); + + if(higc < lowc) { + higc = lowc + 0.01f; + } + float th = (lp.recothr - 1.f); + float ahigh = th / (higc - 100.f); + float bhigh = 1.f - higc * ahigh; + + float alow = th / lowc; + float blow = 1.f - th; + +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int ir = 0; ir < TH; ir++) + for (int jr = 0; jr < TW; jr++) { + const float lM = bufmaskblurbl->L[ir][jr]; + const float lmr = lM / 327.68f; + if (lM < 327.68f * lowc) { + masklum[ir][jr] = alow * lmr + blow; + } else if (lM < 327.68f * higc) { + + } else { + masklum[ir][jr] = (ahigh * lmr + bhigh); + } + } + + for (int i = 0; i < 3; ++i) { + boxblur(static_cast(masklum), static_cast(masklum), 10 / sk, TW, TH, false); + } + +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int i = 0; i < TH; ++i) { + for (int j = 0; j < TW; ++j) { + tmp1->L[i][j] = (tmp3->L[i][j] - tmp1->L[i][j]) * LIM01(masklum[i][j]) + tmp1->L[i][j]; + tmp1->a[i][j] = (tmp3->a[i][j] - tmp1->a[i][j]) * LIM01(masklum[i][j]) + tmp1->a[i][j]; + tmp1->b[i][j] = (tmp3->b[i][j] - tmp1->b[i][j]) * LIM01(masklum[i][j]) + tmp1->b[i][j]; + } + } + masklum.free(); + + } + delete tmpImage; } } if (tmp1.get()) { - JaggedArray bufchro(lp.blurmet == 1 ? GW : bfw, lp.blurmet == 1 ? GH : bfh); - float minC = std::sqrt(SQR(tmp1->a[0][0]) + SQR(tmp1->b[0][0])) - std::sqrt(SQR(bufgb->a[0][0]) + SQR(bufgb->b[0][0])); - float maxC = minC; -#ifdef _OPENMP - #pragma omp parallel for reduction(max:maxC) reduction(min:minC) schedule(dynamic,16) if (multiThread) -#endif - for (int ir = 0; ir < bfh; ir++) { - for (int jr = 0; jr < bfw; jr++) { - bufchro[ir][jr] = std::sqrt(SQR(tmp1->a[ir][jr]) + SQR(tmp1->b[ir][jr])) - std::sqrt(SQR(bufgb->a[ir][jr]) + SQR(bufgb->b[ir][jr])); - minC = rtengine::min(minC, bufchro[ir][jr]); - maxC = rtengine::max(maxC, bufchro[ir][jr]); - } - } - - float coefC = 0.01f * rtengine::max(std::fabs(minC), std::fabs(maxC)); - - if (coefC > 0.f) { - coefC = 1.f / coefC; -#ifdef _OPENMP - #pragma omp parallel for if (multiThread) -#endif - for (int y = 0; y < bfh; y++) { - for (int x = 0; x < bfw; x++) { - bufchro[y][x] *= coefC; - } - } - } - if (lp.blurmet == 0) { //blur and noise (center) -// BlurNoise_Local(tmp1.get(), originalmaskbl, bufchro, hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); if(lp.smasktyp != 1) { - BlurNoise_Local(tmp1.get(), originalmaskbl.get(), bufchro, hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); + BlurNoise_Local(tmp1.get(), originalmaskbl.get(), hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); } else { - BlurNoise_Local(tmp1.get(), original, bufchro, hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); + BlurNoise_Local(tmp1.get(), original, hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); } - if (params->locallab.spots.at(sp).recurs) { + if (lp.recur) { original->CopyFrom(transformed, multiThread); float avge; calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); @@ -10298,12 +12245,12 @@ void ImProcFunctions::Lab_Local( } else if (lp.blurmet == 1) { // InverseBlurNoise_Local(originalmaskbl, bufchro, lp, hueref, chromaref, lumaref, original, transformed, tmp1.get(), cx, cy, sk); if(lp.smasktyp != 1) { - InverseBlurNoise_Local(originalmaskbl.get(), bufchro, lp, hueref, chromaref, lumaref, original, transformed, tmp1.get(), cx, cy, sk); + InverseBlurNoise_Local(originalmaskbl.get(), lp, hueref, chromaref, lumaref, original, transformed, tmp1.get(), cx, cy, sk); } else { - InverseBlurNoise_Local(original, bufchro, lp, hueref, chromaref, lumaref, original, transformed, tmp1.get(), cx, cy, sk); + InverseBlurNoise_Local(original, lp, hueref, chromaref, lumaref, original, transformed, tmp1.get(), cx, cy, sk); } - if (params->locallab.spots.at(sp).recurs) { + if (lp.recur) { original->CopyFrom(transformed, multiThread); float avge; calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); @@ -10347,7 +12294,7 @@ void ImProcFunctions::Lab_Local( bufwv->CopyFrom(original, multiThread); } //end dcrop - const double threshold = lp.bilat / 20.0; + const double threshold = lp.bilat / 20.f; if (bfh > 8 && bfw > 8) { ImProcFunctions::impulse_nr(bufwv.get(), threshold); @@ -10355,7 +12302,7 @@ void ImProcFunctions::Lab_Local( DeNoise_Local(call, lp, originalmaskbl.get(), levred, huerefblur, lumarefblur, chromarefblur, original, transformed, *(bufwv.get()), cx, cy, sk); - if (params->locallab.spots.at(sp).recurs) { + if (lp.recur) { original->CopyFrom(transformed, multiThread); float avge; calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); @@ -10363,21 +12310,1002 @@ void ImProcFunctions::Lab_Local( } //local denoise - - if (lp.denoiena) { - float slidL[8] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}; + if (lp.activspot && lp.denoiena && (lp.noiself > 0.f || lp.noiself0 > 0.f || lp.noiself2 > 0.f || lp.wavcurvedenoi || lp.noiselc > 0.f || lp.noisecf > 0.f || lp.noisecc > 0.f )) {//disable denoise if not used + float slidL[8] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}; float slida[8] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}; float slidb[8] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}; constexpr int aut = 0; - DeNoise(call, del, slidL, slida, slidb, aut, noiscfactiv, lp, originalmaskbl.get(), levred, huerefblur, lumarefblur, chromarefblur, original, transformed, cx, cy, sk); + DeNoise(call, slidL, slida, slidb, aut, noiscfactiv, lp, originalmaskbl.get(), bufmaskblurbl.get(), levred, huerefblur, lumarefblur, chromarefblur, original, transformed, cx, cy, sk, locwavCurvehue, locwavhueutili); - if (params->locallab.spots.at(sp).recurs) { + if (lp.recur) { original->CopyFrom(transformed, multiThread); float avge; calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); } } +//Tone mapping + + if ((lp.strengt != 0.f || lp.showmasktmmet == 2 || lp.enatmMask || lp.showmasktmmet == 3 || lp.showmasktmmet == 4 || lp.prevdE) && lp.tonemapena && !params->epd.enabled) { + if (call <= 3) { //simpleprocess dcrop improcc + const int ystart = rtengine::max(static_cast(lp.yc - lp.lyT) - cy, 0); + const int yend = rtengine::min(static_cast(lp.yc + lp.ly) - cy, original->H); + const int xstart = rtengine::max(static_cast(lp.xc - lp.lxL) - cx, 0); + const int xend = rtengine::min(static_cast(lp.xc + lp.lx) - cx, original->W); + const int bfh = yend - ystart; + const int bfw = xend - xstart; + + if (bfw >= mDEN && bfh >= mDEN) { + // printf("OK TM\n"); + array2D buflight(bfw, bfh); + JaggedArray bufchro(bfw, bfh); + std::unique_ptr bufgb(new LabImage(bfw, bfh)); + const std::unique_ptr tmp1(new LabImage(bfw, bfh)); + const std::unique_ptr bufgbm(new LabImage(bfw, bfh)); + const std::unique_ptr tmp1m(new LabImage(bfw, bfh)); + std::unique_ptr bufmaskorigtm; + std::unique_ptr bufmaskblurtm; + std::unique_ptr originalmasktm; + + // if (lp.showmasktmmet == 0 || lp.showmasktmmet == 2 || lp.enatmMask || lp.showmasktmmet == 3 || lp.showmasktmmet == 4) { + if (lp.showmasktmmet == 2 || lp.enatmMask || lp.showmasktmmet == 3 || lp.showmasktmmet == 4) { + bufmaskorigtm.reset(new LabImage(bfw, bfh)); + bufmaskblurtm.reset(new LabImage(bfw, bfh)); + originalmasktm.reset(new LabImage(bfw, bfh)); + } + + // 3 loops to avoid performance penalty on machines with 4-way L1 cache +#ifdef _OPENMP + #pragma omp parallel if (multiThread) + { + #pragma omp for schedule(dynamic,16) nowait +#endif + for (int y = ystart; y < yend; y++) { + for (int x = xstart; x < xend; x++) { + bufgbm->L[y - ystart][x - xstart] = bufgb->L[y - ystart][x - xstart] = original->L[y][x]; + } + } + +#ifdef _OPENMP + #pragma omp for schedule(dynamic,16) nowait +#endif + for (int y = ystart; y < yend; y++) { + for (int x = xstart; x < xend; x++) { + bufgbm->a[y - ystart][x - xstart] = bufgb->a[y - ystart][x - xstart] = original->a[y][x]; + } + } + +#ifdef _OPENMP + #pragma omp for schedule(dynamic,16) +#endif + for (int y = ystart; y < yend; y++) { + for (int x = xstart; x < xend; x++) { + bufgbm->b[y - ystart][x - xstart] = bufgb->b[y - ystart][x - xstart] = original->b[y][x]; + } + } +#ifdef _OPENMP + } +#endif + + int inv = 0; + bool showmaske = false; + bool enaMask = false; + bool deltaE = false; + bool modmask = false; + bool zero = false; + bool modif = false; + + if (lp.showmasktmmet == 3) { + showmaske = true; + } + + if (lp.enatmMask) { + enaMask = true; + } + + if (lp.showmasktmmet == 4) { + deltaE = true; + } + + if (lp.showmasktmmet == 2) { + modmask = true; + } + + if (lp.showmasktmmet == 1) { + modif = true; + } + + if (lp.showmasktmmet == 0) { + zero = true; + } + + float chrom = lp.chromatm;; + float rad = lp.radmatm; + float gamma = lp.gammatm; + float slope = lp.slomatm; + float blendm = lp.blendmatm; + float lap = params->locallab.spots.at(sp).lapmasktm; + bool pde = params->locallab.spots.at(sp).laplac; + int lumask = params->locallab.spots.at(sp).lumask; + + if (!params->locallab.spots.at(sp).enatmMaskaft) { + LocwavCurve dummy; + int sco = params->locallab.spots.at(sp).scopemask; + int shortcu = 0; //lp.mergemet;// params->locallab.spots.at(sp).shortc; + + const float mindE = 2.f + MINSCOPE * sco * lp.thr; + const float maxdE = 5.f + MAXSCOPE * sco * (1 + 0.1f * lp.thr); + const float mindElim = 2.f + MINSCOPE * limscope * lp.thr; + const float maxdElim = 5.f + MAXSCOPE * limscope * (1 + 0.1f * lp.thr); + int shado = 0; + float amountcd = 0.f; + float anchorcd = 50.f; + LocHHmaskCurve lochhhmasCurve; + const int highl = 0; + + maskcalccol(false, pde, bfw, bfh, xstart, ystart, sk, cx, cy, bufgbm.get(), bufmaskorigtm.get(), originalmasktm.get(), original, reserved, inv, lp, + 0.f, false, + locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili, lochhhmasCurve, false, multiThread, + enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmasktmlocalcurve, localmasktmutili, dummy, false, 1, 1, 5, 5, + shortcu, params->locallab.spots.at(sp).deltae, hueref, chromaref, lumaref, + maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco, false, 0.f, 0.f, -1 + ); + + if (lp.showmasktmmet == 3) { + showmask(lumask, lp, xstart, ystart, cx, cy, bfw, bfh, bufgbm.get(), transformed, bufmaskorigtm.get(), 0); + + return; + } + } + + if (lp.showmasktmmet == 0 || lp.showmasktmmet == 1 || lp.showmasktmmet == 2 || lp.showmasktmmet == 4 || lp.showmasktmmet == 3 || lp.enatmMask) { + constexpr int itera = 0; + ImProcFunctions::EPDToneMaplocal(sp, bufgb.get(), tmp1.get(), itera, sk);//iterate to 0 calculate with edgstopping, improve result, call=1 dcrop we can put iterate to 5 + + tmp1m->CopyFrom(tmp1.get(), multiThread); //save current result7 + if(params->locallab.spots.at(sp).equiltm && params->locallab.spots.at(sp).exptonemap) { + if(call == 3) { +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + for (int y = ystart; y < yend; y++) { + for (int x = xstart; x < xend; x++) { + savenormtm->L[y][x] = tmp1->L[y - ystart][x - xstart]; + savenormtm->a[y][x] = tmp1->a[y - ystart][x - xstart]; + savenormtm->b[y][x] = tmp1->b[y - ystart][x - xstart]; + } + } + } + } + bool enatmMasktmap = params->locallab.spots.at(sp).enatmMaskaft; + + if (enatmMasktmap) { + //calculate new values for original, originalmasktm, bufmaskorigtm...in function of tmp1 + LocwavCurve dummy; + int sco = params->locallab.spots.at(sp).scopemask; + int shortcu = 0;//lp.mergemet; //params->locallab.spots.at(sp).shortc; + + const float mindE = 2.f + MINSCOPE * sco * lp.thr; + const float maxdE = 5.f + MAXSCOPE * sco * (1 + 0.1f * lp.thr); + const float mindElim = 2.f + MINSCOPE * limscope * lp.thr; + const float maxdElim = 5.f + MAXSCOPE * limscope * (1 + 0.1f * lp.thr); + int shado = 0; + float amountcd = 0.f; + float anchorcd = 50.f; + LocHHmaskCurve lochhhmasCurve; + const int highl = 0; + + maskcalccol(false, pde, bfw, bfh, xstart, ystart, sk, cx, cy, tmp1.get(), bufmaskorigtm.get(), originalmasktm.get(), original, reserved, inv, lp, + 0.f, false, + locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili, lochhhmasCurve, false, multiThread, + enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmasktmlocalcurve, localmasktmutili, dummy, false, 1, 1, 5, 5, + shortcu, params->locallab.spots.at(sp).deltae, hueref, chromaref, lumaref, + maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco, false, 0.f, 0.f, -1 + ); + + if (lp.showmasktmmet == 3) {//display mask + showmask(params->locallab.spots.at(sp).lumask, lp, xstart, ystart, cx, cy, bfw, bfh, tmp1.get(), transformed, bufmaskorigtm.get(), 0); + return; + } + + } + + tmp1->CopyFrom(tmp1m.get(), multiThread); //restore current result + + + float minL = tmp1->L[0][0] - bufgb->L[0][0]; + float maxL = minL; + float minC = std::sqrt(SQR(tmp1->a[0][0]) + SQR(tmp1->b[0][0])) - std::sqrt(SQR(bufgb->a[0][0]) + SQR(bufgb->b[0][0])); + float maxC = minC; + +#ifdef _OPENMP + #pragma omp parallel for reduction(max:maxL) reduction(min:minL) reduction(max:maxC) reduction(min:minC) schedule(dynamic,16) if (multiThread) +#endif + for (int ir = 0; ir < bfh; ir++) { + for (int jr = 0; jr < bfw; jr++) { + buflight[ir][jr] = tmp1->L[ir][jr] - bufgb->L[ir][jr]; + minL = rtengine::min(minL, buflight[ir][jr]); + maxL = rtengine::max(maxL, buflight[ir][jr]); + bufchro[ir][jr] = std::sqrt(SQR(tmp1->a[ir][jr]) + SQR(tmp1->b[ir][jr])) - std::sqrt(SQR(bufgb->a[ir][jr]) + SQR(bufgb->b[ir][jr])); + minC = rtengine::min(minC, bufchro[ir][jr]); + maxC = rtengine::max(maxC, bufchro[ir][jr]); + } + } + + float coef = 0.01f * rtengine::max(std::fabs(minL), std::fabs(maxL)); + float coefC = 0.01f * rtengine::max(std::fabs(minC), std::fabs(maxC)); + + if (coef == 0.f) { + coef = 1.f; + } else { + coef = 1.f / coef; + } + + if (coefC == 0.f) { + coefC = 1.f; + } else { + coefC = 1.f / coefC; + } + +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int y = 0; y < bfh; y++) { + for (int x = 0; x < bfw; x++) { + buflight[y][x] *= coef; + bufchro[y][x] *= coefC; + } + } + + if(lp.enatmMask && lp.recothrt != 1.f) { + float hig = lp.higthrt; + float low = lp.lowthrt; + float recoth = lp.recothrt; + float decay = lp.decayt; + bool invmask = false; + maskrecov(tmp1.get(), original, bufmaskorigtm.get(), bfh, bfw, ystart, xstart, hig, low, recoth, decay, invmask, sk, multiThread); + } + + // transit_shapedetect_retinex(call, 4, bufgb.get(),bufmaskorigtm.get(), originalmasktm.get(), buflight, bufchro, hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); + transit_shapedetect2(sp, meantm, stdtm, call, 8, bufgb.get(), tmp1.get(), originalmasktm.get(), hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); + + // transit_shapedetect(8, tmp1.get(), originalmasktm.get(), bufchro, false, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); + bufgb.reset(); + + if (lp.recur) { + original->CopyFrom(transformed, multiThread); + float avge; + calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); + } + } + } + } + } + +//end TM + + + if ((lp.dehaze != 0 || lp.prevdE) && lp.retiena ) { + int ystart = rtengine::max(static_cast(lp.yc - lp.lyT) - cy, 0); + int yend = rtengine::min(static_cast(lp.yc + lp.ly) - cy, original->H); + int xstart = rtengine::max(static_cast(lp.xc - lp.lxL) - cx, 0); + int xend = rtengine::min(static_cast(lp.xc + lp.lx) - cx, original->W); + int bfh = yend - ystart; + int bfw = xend - xstart; + + if (bfh >= mSP && bfw >= mSP) { + const std::unique_ptr bufexporig(new LabImage(bfw, bfh)); //buffer for data in zone limit + const std::unique_ptr bufexpfin(new LabImage(bfw, bfh)); //buffer for data in zone limit + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + for (int y = ystart; y < yend; y++) { + for (int x = xstart; x < xend; x++) { + bufexporig->L[y - ystart][x - xstart] = original->L[y][x]; + bufexporig->a[y - ystart][x - xstart] = original->a[y][x]; + bufexporig->b[y - ystart][x - xstart] = original->b[y][x]; + } + } + + bufexpfin->CopyFrom(bufexporig.get(), multiThread); + //calc dehaze + const std::unique_ptr tmpImage(new Imagefloat(bfw, bfh)); + + DehazeParams dehazeParams; + dehazeParams.enabled = true; + dehazeParams.strength = lp.dehaze; + dehazeParams.showDepthMap = false; + dehazeParams.saturation = lp.dehazeSaturation; + dehazeParams.depth = lp.depth; + lab2rgb(*bufexpfin, *tmpImage.get(), params->icm.workingProfile); + dehazeloc(tmpImage.get(), dehazeParams); + rgb2lab(*tmpImage.get(), *bufexpfin, params->icm.workingProfile); + + transit_shapedetect2(sp, 0.f, 0.f, call, 30, bufexporig.get(), bufexpfin.get(), nullptr, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); + + if (lp.recur) { + original->CopyFrom(transformed, multiThread); + float avge; + calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); + } + } + } + + lp.invret = false;//always disabled inverse RETI too complex todo !! + + if (lp.str >= 0.2f && lp.retiena && call != 2) { + LabImage *bufreti = nullptr; + LabImage *bufmask = nullptr; + LabImage *buforig = nullptr; + LabImage *buforigmas = nullptr; + LabImage *bufmaskorigreti = nullptr; + + if (TW >= mSP && TH >= mSP) { + + array2D buflight(TW, TH); + JaggedArray bufchro(TW, TH); + + int Hd, Wd; + Hd = TH; + Wd = TW; + + bufreti = new LabImage(TW, TH); + bufmask = new LabImage(TW, TH); + bufmaskorigreti = new LabImage(TW, TH); + + if (!lp.enaretiMasktmap && lp.enaretiMask) { + buforig = new LabImage(TW, TH); + buforigmas = new LabImage(TW, TH); + // bufmaskorigreti = new LabImage(GW, GH); + } + +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int ir = 0; ir < TH; ir++) //fill with 0 + for (int jr = 0; jr < TW; jr++) { + bufreti->L[ir][jr] = 0.f; + bufreti->a[ir][jr] = 0.f; + bufreti->b[ir][jr] = 0.f; + buflight[ir][jr] = 0.f; + bufchro[ir][jr] = 0.f; + } + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + for (int y = 0; y < transformed->H ; y++) //{ + for (int x = 0; x < transformed->W; x++) { + bufreti->L[y][x] = original->L[y][x]; + bufreti->a[y][x] = original->a[y][x]; + bufreti->b[y][x] = original->b[y][x]; + bufmask->L[y][x] = original->L[y][x]; + bufmask->a[y][x] = original->a[y][x]; + bufmask->b[y][x] = original->b[y][x]; + + + + if (!lp.enaretiMasktmap && lp.enaretiMask) { + buforig->L[y][x] = original->L[y][x]; + buforig->a[y][x] = original->a[y][x]; + buforig->b[y][x] = original->b[y][x]; + + // bufmaskorigreti->L[y][x] = original->L[y][x]; + // bufmaskorigreti->a[y][x] = original->a[y][x]; + // bufmaskorigreti->b[y][x] = original->b[y][x]; + + + } + + } + float raddE = params->locallab.spots.at(sp).softradiusret; + + //calc dE and reduction to use in MSR to reduce artifacts + const float mindE = 4.f + MINSCOPE * lp.sensh * lp.thr; + const float maxdE = 5.f + MAXSCOPE * lp.sensh * (1 + 0.1f * lp.thr); + const float mindElim = 2.f + MINSCOPE * limscope * lp.thr; + const float maxdElim = 5.f + MAXSCOPE * limscope * (1 + 0.1f * lp.thr); + const float refa = chromaref * cos(hueref); + const float refb = chromaref * sin(hueref); + + const std::unique_ptr> reducDEBuffer(new JaggedArray(Wd, Hd)); + float** reducDE = *(reducDEBuffer.get()); + + float ade = 0.01f * raddE; + float bde = 100.f - raddE; + float sensibefore = ade * lp.sensh + bde;//we can change sensitivity 0.1 90 or 0.3 70 or 0.4 60 +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + for (int y = 0; y < transformed->H ; y++) + for (int x = 0; x < transformed->W; x++) { + float dE = std::sqrt(SQR(refa - bufreti->a[y][x] / 327.68f) + SQR(refb - bufreti->b[y][x] / 327.68f) + SQR(static_cast(lumaref) - bufreti->b[y][x] / 327.68f)); + const float reducdE = calcreducdE(dE, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sensibefore); + reducDE[y][x] = clipDE(reducdE); + } + + const std::unique_ptr> origBuffer(new JaggedArray(Wd, Hd)); + float** orig = *(origBuffer.get()); + + const std::unique_ptr> origBuffer1(new JaggedArray(Wd, Hd)); + float** orig1 = *(origBuffer1.get()); + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + for (int ir = 0; ir < Hd; ir += 1) + for (int jr = 0; jr < Wd; jr += 1) { + orig[ir][jr] = bufreti->L[ir][jr]; + orig1[ir][jr] = bufreti->L[ir][jr]; + } + + LabImage *tmpl = new LabImage(Wd, Hd); + + bool fftw = lp.ftwreti; + //for Retinex Mask are incorporated in MSR + int sco = params->locallab.spots.at(sp).scopemask; + float lumask = params->locallab.spots.at(sp).lumask; + + const float mindE2 = 2.f + MINSCOPE * sco * lp.thr; + const float maxdE2 = 5.f + MAXSCOPE * sco * (1 + 0.1f * lp.thr); + const float mindElim2 = 2.f + MINSCOPE * limscope * lp.thr; + const float maxdElim2 = 5.f + MAXSCOPE * limscope * (1 + 0.1f * lp.thr); + ImProcFunctions::MSRLocal(call, sp, fftw, 1, reducDE, bufreti, bufmask, buforig, buforigmas, bufmaskorigreti, orig, orig1, + Wd, Hd, Wd, Hd, params->locallab, sk, locRETgainCcurve, locRETtransCcurve, 0, 4, 1.f, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, + locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili, llretiMask, + lmaskretilocalcurve, localmaskretiutili, + transformed, lp.enaretiMasktmap, lp.enaretiMask, + params->locallab.spots.at(sp).deltae, hueref, chromaref, lumaref, + maxdE2, mindE2, maxdElim2, mindElim2, lp.iterat, limscope, sco, lp.balance, lp.balanceh, lumask); +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int ir = 0; ir < Hd; ir += 1) { + for (int jr = 0; jr < Wd; jr += 1) { + tmpl->L[ir][jr] = orig[ir][jr]; + if(params->locallab.spots.at(sp).equilret && params->locallab.spots.at(sp).expreti) { + if(call == 3) { + savenormreti->L[ir][jr] = tmpl->L[ir][jr]; + } + } + } + } + + if (lp.equret) { //equilibrate luminance before / after MSR + float *datain = new float[Hd * Wd]; + float *data = new float[Hd * Wd]; +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int ir = 0; ir < Hd; ir += 1) + for (int jr = 0; jr < Wd; jr += 1) { + datain[ir * Wd + jr] = orig1[ir][jr]; + data[ir * Wd + jr] = orig[ir][jr]; + } + + if(params->locallab.spots.at(sp).equilret){ + if(call == 3) {//improccoordinator + normalize_mean_dt(data, datain, Hd * Wd, 1.f, 1.f, 0.f, 0.f, 0.f, 0.f); + } else if(call == 1) {//dcrop + float ma = meanreti; + float sa = stdreti; + float ma2 = (float) params->locallab.spots.at(sp).sensihs; + float sa2 = (float) params->locallab.spots.at(sp).sensiv; + //printf("ma=%f sa=%f ma2=%f sa2=%f\n", (double) ma, (double) sa, (double) ma2, (double) sa2); + //use normalize with mean and stdv + normalize_mean_dt(data, datain, Hd * Wd, 1.f, 1.f, ma, sa, ma2, sa2); + + } + } + +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int ir = 0; ir < Hd; ir += 1) + for (int jr = 0; jr < Wd; jr += 1) { + tmpl->L[ir][jr] = data[ir * Wd + jr]; + } + + delete [] datain; + delete [] data; + } + + if(lp.enaretiMask && lp.recothrr != 1.f) { + float hig = lp.higthrr; + float low = lp.lowthrr; + float recoth = lp.recothrr; + float decay = lp.decayr; + bool invmask = false; + maskrecov(tmpl, original, bufmaskorigreti, Hd, Wd, 0, 0, hig, low, recoth, decay, invmask, sk, multiThread); + } + + float minL = tmpl->L[0][0] - bufreti->L[0][0]; + float maxL = minL; +#ifdef _OPENMP + #pragma omp parallel for reduction(min:minL) reduction(max:maxL) schedule(dynamic,16) if (multiThread) +#endif + for (int ir = 0; ir < Hd; ir++) { + for (int jr = 0; jr < Wd; jr++) { + buflight[ir][jr] = tmpl->L[ir][jr] - bufreti->L[ir][jr]; + minL = rtengine::min(minL, buflight[ir][jr]); + maxL = rtengine::max(maxL, buflight[ir][jr]); + } + } + + const float coef = 0.01f * rtengine::max(std::fabs(minL), std::fabs(maxL)); + + for (int ir = 0; ir < Hd; ir++) { + for (int jr = 0; jr < Wd; jr++) { + buflight[ir][jr] /= coef; + } + } + + transit_shapedetect_retinex(call, 4, bufreti, tmpl, bufmask, buforigmas, buflight, bufchro, hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); + + if (lp.recur) { + original->CopyFrom(transformed, multiThread); + float avge; + calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); + } + + if (params->locallab.spots.at(sp).chrrt > 0) { + + if (call == 1) { + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + for (int ir = 0; ir < Hd; ir += 1) + for (int jr = 0; jr < Wd; jr += 1) { + + orig[ir][jr] = std::sqrt(SQR(bufreti->a[ir][jr]) + SQR(bufreti->b[ir][jr])); + orig1[ir][jr] = std::sqrt(SQR(bufreti->a[ir][jr]) + SQR(bufreti->b[ir][jr])); + } + + } + + float maxChro = orig1[0][0]; +#ifdef _OPENMP + #pragma omp parallel for reduction(max:maxChro) schedule(dynamic,16) if (multiThread) +#endif + for (int ir = 0; ir < Hd; ir++) { + for (int jr = 0; jr < Wd; jr++) { + maxChro = rtengine::max(maxChro, orig1[ir][jr]); + } + } + + float divchro = maxChro; + + //first step change saturation without Retinex ==> gain of time and memory + float satreal = lp.str * static_cast(params->locallab.spots.at(sp).chrrt) / 100.f; + + if (params->locallab.spots.at(sp).chrrt <= 0.2) { + satreal /= 10.f; + } + + DiagonalCurve reti_satur({ + DCT_NURBS, + 0, 0, + 0.2, 0.2f + satreal / 250.f, + 0.6, rtengine::min(1.f, 0.6f + satreal / 250.f), + 1, 1 + }); + + if (call == 1) { + +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int ir = 0; ir < Hd; ir += 1) + for (int jr = 0; jr < Wd; jr += 1) { + const float Chprov = orig1[ir][jr]; + float2 sincosval; + sincosval.y = Chprov == 0.0f ? 1.f : bufreti->a[ir][jr] / Chprov; + sincosval.x = Chprov == 0.0f ? 0.f : bufreti->b[ir][jr] / Chprov; + + if (params->locallab.spots.at(sp).chrrt <= 100.0) { //first step + float buf = LIM01(orig[ir][jr] / divchro); + buf = reti_satur.getVal(buf); + buf *= divchro; + orig[ir][jr] = buf; + } + + tmpl->a[ir][jr] = orig[ir][jr] * sincosval.y; + tmpl->b[ir][jr] = orig[ir][jr] * sincosval.x; + } + + float minC = std::sqrt(SQR(tmpl->a[0][0]) + SQR(tmpl->b[0][0])) - orig1[0][0]; + float maxC = minC; +#ifdef _OPENMP + #pragma omp parallel for reduction(min:minC) reduction(max:maxC) schedule(dynamic,16) if (multiThread) +#endif + for (int ir = 0; ir < Hd; ir++) { + for (int jr = 0; jr < Wd; jr++) { + bufchro[ir][jr] = std::sqrt(SQR(tmpl->a[ir][jr]) + SQR(tmpl->b[ir][jr])) - orig1[ir][jr]; + minC = rtengine::min(minC, bufchro[ir][jr]); + maxC = rtengine::max(maxC, bufchro[ir][jr]); + } + } + + float coefC = 0.01f * rtengine::max(std::fabs(minC), std::fabs(maxC)); + + if (coefC > 0.f) { + coefC = 1.f / coefC; +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int ir = 0; ir < Hd; ir++) { + for (int jr = 0; jr < Wd; jr++) { + bufchro[ir][jr] *= coefC; + } + } + } + } + + transit_shapedetect_retinex(call, 5, tmpl, tmpl, bufmask, buforigmas, buflight, bufchro, hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); + + if (lp.recur) { + original->CopyFrom(transformed, multiThread); + float avge; + calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); + } + } + + delete tmpl; + delete bufmask; + delete bufmaskorigreti; + + if (!lp.enaretiMasktmap && lp.enaretiMask) { + if (buforig) { + delete buforig; + } + + if (buforigmas) { + delete buforigmas; + } + } + delete bufreti; + } + } + + + + if (lp.str >= 0.2f && lp.retiena && call == 2) { + int ystart = rtengine::max(static_cast(lp.yc - lp.lyT) - cy, 0); + int yend = rtengine::min(static_cast(lp.yc + lp.ly) - cy, original->H); + int xstart = rtengine::max(static_cast(lp.xc - lp.lxL) - cx, 0); + int xend = rtengine::min(static_cast(lp.xc + lp.lx) - cx, original->W); + int bfh = yend - ystart; + int bfw = xend - xstart; + + LabImage *bufreti = nullptr; + LabImage *bufmask = nullptr; + LabImage *buforig = nullptr; + LabImage *buforigmas = nullptr; + LabImage *bufmaskorigreti = nullptr; + int bfhr = bfh; + int bfwr = bfw; + + if (bfw >= mSP && bfh > mSP) { + if (lp.ftwreti) { + optfft(N_fftwsize, bfh, bfw, bfhr, bfwr, lp, original->H, original->W, xstart, ystart, xend, yend, cx, cy); + } + + array2D buflight(bfw, bfh); + JaggedArray bufchro(bfw, bfh); + + int Hd, Wd; + Hd = TH; + Wd = TW; + + if (!lp.invret && call == 2) { + + Hd = bfh; + Wd = bfw; + bufreti = new LabImage(bfw, bfh); + bufmask = new LabImage(bfw, bfh); + bufmaskorigreti = new LabImage(bfw, bfh); + + if (!lp.enaretiMasktmap && lp.enaretiMask) { + buforig = new LabImage(bfw, bfh); + buforigmas = new LabImage(bfw, bfh); + } + +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int ir = 0; ir < bfh; ir++) //fill with 0 + for (int jr = 0; jr < bfw; jr++) { + bufreti->L[ir][jr] = 0.f; + bufreti->a[ir][jr] = 0.f; + bufreti->b[ir][jr] = 0.f; + buflight[ir][jr] = 0.f; + bufchro[ir][jr] = 0.f; + } + + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + for (int y = ystart; y < yend; y++) { + for (int x = xstart; x < xend; x++) { + bufreti->L[y - ystart][x - xstart] = original->L[y][x]; + bufreti->a[y - ystart][x - xstart] = original->a[y][x]; + bufreti->b[y - ystart][x - xstart] = original->b[y][x]; + bufmask->L[y - ystart][x - xstart] = original->L[y][x]; + bufmask->a[y - ystart][x - xstart] = original->a[y][x]; + bufmask->b[y - ystart][x - xstart] = original->b[y][x]; + + if (!lp.enaretiMasktmap && lp.enaretiMask) { + buforig->L[y - ystart][x - xstart] = original->L[y][x]; + buforig->a[y - ystart][x - xstart] = original->a[y][x]; + buforig->b[y - ystart][x - xstart] = original->b[y][x]; + } + } + } + } + + float raddE = params->locallab.spots.at(sp).softradiusret; + + //calc dE and reduction to use in MSR to reduce artifacts + const float mindE = 4.f + MINSCOPE * lp.sensh * lp.thr; + const float maxdE = 5.f + MAXSCOPE * lp.sensh * (1 + 0.1f * lp.thr); + const float mindElim = 2.f + MINSCOPE * limscope * lp.thr; + const float maxdElim = 5.f + MAXSCOPE * limscope * (1 + 0.1f * lp.thr); + const float refa = chromaref * cos(hueref); + const float refb = chromaref * sin(hueref); + + const std::unique_ptr> reducDEBuffer(new JaggedArray(Wd, Hd)); + float** reducDE = *(reducDEBuffer.get()); + float ade = 0.01f * raddE; + float bde = 100.f - raddE; + float sensibefore = ade * lp.sensh + bde;//we can change sensitivity 0.1 90 or 0.3 70 or 0.4 60 +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + for (int y = ystart; y < yend ; y++) { + for (int x = xstart; x < xend; x++) { + const float dE = std::sqrt(SQR(refa - bufreti->a[y - ystart][x - xstart] / 327.68f) + SQR(refb - bufreti->b[y - ystart][x - xstart] / 327.68f) + SQR(static_cast(lumaref) - bufreti->b[y - ystart][x - xstart] / 327.68f)); + const float reducdE = calcreducdE(dE, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sensibefore); + reducDE[y - ystart][x - xstart] = clipDE(reducdE); + } + } + + const std::unique_ptr> origBuffer(new JaggedArray(Wd, Hd)); + float** orig = *(origBuffer.get()); + + const std::unique_ptr> origBuffer1(new JaggedArray(Wd, Hd)); + float** orig1 = *(origBuffer1.get()); + + LabImage *tmpl = nullptr; + + if (!lp.invret && call == 2) { +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + for (int ir = 0; ir < Hd; ir += 1) { + for (int jr = 0; jr < Wd; jr += 1) { + orig[ir][jr] = bufreti->L[ir][jr]; + orig1[ir][jr] = bufreti->L[ir][jr]; + } + } + + tmpl = new LabImage(Wd, Hd); + } + + // float minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax; + bool fftw = lp.ftwreti; + //for Retinex Mask are incorporated in MSR + int sco = params->locallab.spots.at(sp).scopemask; + float lumask = params->locallab.spots.at(sp).lumask; + + const float mindE2 = 2.f + MINSCOPE * sco * lp.thr; + const float maxdE2 = 5.f + MAXSCOPE * sco * (1 + 0.1f * lp.thr); + const float mindElim2 = 2.f + MINSCOPE * limscope * lp.thr; + const float maxdElim2 = 5.f + MAXSCOPE * limscope * (1 + 0.1f * lp.thr); + + ImProcFunctions::MSRLocal(call, sp, fftw, 1, reducDE, bufreti, bufmask, buforig, buforigmas, bufmaskorigreti, orig, orig1, + Wd, Hd, bfwr, bfhr, params->locallab, sk, locRETgainCcurve, locRETtransCcurve, 0, 4, 1.f, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, + locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili, llretiMask, + lmaskretilocalcurve, localmaskretiutili, + transformed, lp.enaretiMasktmap, lp.enaretiMask, + params->locallab.spots.at(sp).deltae, hueref, chromaref, lumaref, + maxdE2, mindE2, maxdElim2, mindElim2, lp.iterat, limscope, sco, lp.balance, lp.balanceh, lumask); + +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int ir = 0; ir < Hd; ir += 1) + for (int jr = 0; jr < Wd; jr += 1) { + tmpl->L[ir][jr] = orig[ir][jr]; + } + + + if (lp.equret) { //equilibrate luminance before / after MSR + const std::unique_ptr datain(new float[Hd * Wd]); + const std::unique_ptr data(new float[Hd * Wd]); +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int ir = 0; ir < Hd; ir += 1) { + for (int jr = 0; jr < Wd; jr += 1) { + datain[ir * Wd + jr] = orig1[ir][jr]; + data[ir * Wd + jr] = orig[ir][jr]; + } + } + + normalize_mean_dt(data.get(), datain.get(), Hd * Wd, 1.f, 1.f, 0.f, 0.f, 0.f, 0.f); +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int ir = 0; ir < Hd; ir += 1) { + for (int jr = 0; jr < Wd; jr += 1) { + tmpl->L[ir][jr] = data[ir * Wd + jr]; + } + } + } + if(lp.enaretiMask && lp.recothrr != 1.f) { + float hig = lp.higthrr; + float low = lp.lowthrr; + float recoth = lp.recothrr; + float decay = lp.decayr; + bool invmask = false; + maskrecov(tmpl, original, bufmaskorigreti, Hd, Wd, ystart, xstart, hig, low, recoth, decay, invmask, sk, multiThread); + } + + if (!lp.invret) { + float minL = tmpl->L[0][0] - bufreti->L[0][0]; + float maxL = minL; +#ifdef _OPENMP + #pragma omp parallel for reduction(min:minL) reduction(max:maxL) schedule(dynamic,16) if (multiThread) +#endif + for (int ir = 0; ir < Hd; ir++) { + for (int jr = 0; jr < Wd; jr++) { + buflight[ir][jr] = tmpl->L[ir][jr] - bufreti->L[ir][jr]; + minL = rtengine::min(minL, buflight[ir][jr]); + maxL = rtengine::max(maxL, buflight[ir][jr]); + } + } + + float coef = 0.01f * rtengine::max(std::fabs(minL), std::fabs(maxL)); + + if (coef > 0.f) { + coef = 1.f / coef; +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + for (int ir = 0; ir < Hd; ir++) { + for (int jr = 0; jr < Wd; jr++) { + buflight[ir][jr] *= coef; + } + } + } + + transit_shapedetect_retinex(call, 4, bufreti, tmpl, bufmask, buforigmas, buflight, bufchro, hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); + + if (lp.recur) { + original->CopyFrom(transformed, multiThread); + float avge; + calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); + } + } + + if (params->locallab.spots.at(sp).chrrt > 0) { + if (!lp.invret && call == 2) { +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + for (int ir = 0; ir < Hd; ir += 1) { + for (int jr = 0; jr < Wd; jr += 1) { + orig[ir][jr] = std::sqrt(SQR(bufreti->a[ir][jr]) + SQR(bufreti->b[ir][jr])); + orig1[ir][jr] = std::sqrt(SQR(bufreti->a[ir][jr]) + SQR(bufreti->b[ir][jr])); + } + } + } + + float maxChro = orig1[0][0]; +#ifdef _OPENMP + #pragma omp parallel for reduction(max:maxChro) schedule(dynamic,16) if (multiThread) +#endif + for (int ir = 0; ir < Hd; ir++) { + for (int jr = 0; jr < Wd; jr++) { + maxChro = rtengine::max(maxChro, orig1[ir][jr]); + } + } + + //first step change saturation without Retinex ==> gain of time and memory + float satreal = lp.str * static_cast(params->locallab.spots.at(sp).chrrt) / 100.f; + + if (params->locallab.spots.at(sp).chrrt <= 0.2) { + satreal /= 10.f; + } + + DiagonalCurve reti_satur({ + DCT_NURBS, + 0, 0, + 0.2, 0.2f + satreal / 250.f, + 0.6, rtengine::min(1.f, 0.6f + satreal / 250.f), + 1, 1 + }); + + if (!lp.invret && call == 2) { + +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int ir = 0; ir < Hd; ir += 1) { + for (int jr = 0; jr < Wd; jr += 1) { + const float Chprov = orig1[ir][jr]; + float2 sincosval; + sincosval.y = Chprov == 0.0f ? 1.f : bufreti->a[ir][jr] / Chprov; + sincosval.x = Chprov == 0.0f ? 0.f : bufreti->b[ir][jr] / Chprov; + + if (params->locallab.spots.at(sp).chrrt <= 40.0) { //first step + orig[ir][jr] = static_cast(reti_satur.getVal(LIM01(orig[ir][jr] / maxChro))) * maxChro; + } + + tmpl->a[ir][jr] = orig[ir][jr] * sincosval.y; + tmpl->b[ir][jr] = orig[ir][jr] * sincosval.x; + } + } + + float minC = std::sqrt(SQR(tmpl->a[0][0]) + SQR(tmpl->b[0][0])) - orig1[0][0]; + float maxC = minC; +#ifdef _OPENMP + #pragma omp parallel for reduction(min:minC) reduction(max:maxC) schedule(dynamic,16) if (multiThread) +#endif + for (int ir = 0; ir < Hd; ir++) { + for (int jr = 0; jr < Wd; jr++) { + bufchro[ir][jr] = std::sqrt(SQR(tmpl->a[ir][jr]) + SQR(tmpl->b[ir][jr])) - orig1[ir][jr]; + minC = rtengine::min(minC, bufchro[ir][jr]); + maxC = rtengine::max(maxC, bufchro[ir][jr]); + } + } + + float coefC = 0.01f * rtengine::max(std::fabs(minC), std::fabs(maxC)); + + if (coefC > 0.f) { + coefC = 1.f / coefC; +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int ir = 0; ir < Hd; ir++) { + for (int jr = 0; jr < Wd; jr++) { + bufchro[ir][jr] *= coefC; + } + } + } + } + + if (!lp.invret) { + transit_shapedetect_retinex(call, 5, tmpl, tmpl, bufmask, buforigmas, buflight, bufchro, hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); + + if (lp.recur) { + original->CopyFrom(transformed, multiThread); + float avge; + calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); + } + } + } + + delete tmpl; + delete bufmask; + delete bufmaskorigreti; + + if (!lp.enaretiMasktmap && lp.enaretiMask) { + if (buforig) { + delete buforig; + } + + if (buforigmas) { + delete buforigmas; + } + } + delete bufreti; + } + } + //begin cbdl if ((lp.mulloc[0] != 1.f || lp.mulloc[1] != 1.f || lp.mulloc[2] != 1.f || lp.mulloc[3] != 1.f || lp.mulloc[4] != 1.f || lp.mulloc[5] != 1.f || lp.clarityml != 0.f || lp.contresid != 0.f || lp.enacbMask || lp.showmaskcbmet == 2 || lp.showmaskcbmet == 3 || lp.showmaskcbmet == 4 || lp.prevdE) && lp.cbdlena) { @@ -10388,7 +13316,6 @@ void ImProcFunctions::Lab_Local( const int xend = rtengine::min(static_cast(lp.xc + lp.lx) - cx, original->W); int bfh = yend - ystart; int bfw = xend - xstart; - if (bfw > 65 && bfh > 65) { array2D bufsh(bfw, bfh); JaggedArray bufchrom(bfw, bfh, true); @@ -10407,9 +13334,9 @@ void ImProcFunctions::Lab_Local( #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread) #endif - for (int y = 0; y < bfh; y++) { - for (int x = 0; x < bfw; x++) { - loctemp->L[y][x] = original->L[y + ystart][x + xstart]; + for (int y = ystart; y < yend; y++) { + for (int x = xstart; x < xend; x++) { + loctemp->L[y - ystart][x - xstart] = original->L[y][x]; } } @@ -10453,7 +13380,6 @@ void ImProcFunctions::Lab_Local( float lap = params->locallab.spots.at(sp).lapmaskcb; bool pde = params->locallab.spots.at(sp).laplac; LocwavCurve dummy; - bool delt = params->locallab.spots.at(sp).deltae; int sco = params->locallab.spots.at(sp).scopemask; int lumask = params->locallab.spots.at(sp).lumask; int shado = 0; @@ -10461,18 +13387,16 @@ void ImProcFunctions::Lab_Local( const float maxdE = 5.f + MAXSCOPE * sco * (1 + 0.1f * lp.thr); const float mindElim = 2.f + MINSCOPE * limscope * lp.thr; const float maxdElim = 5.f + MAXSCOPE * limscope * (1 + 0.1f * lp.thr); - bool lmasutilicolwav = false; float amountcd = 0.f; float anchorcd = 50.f; int shortcu = 0; //lp.mergemet; //params->locallab.spots.at(sp).shortc; LocHHmaskCurve lochhhmasCurve; - bool lhhmasutili = false; const int highl = 0; maskcalccol(false, pde, bfw, bfh, xstart, ystart, sk, cx, cy, loctemp.get(), bufmaskorigcb.get(), originalmaskcb.get(), original, reserved, inv, lp, 0.f, false, - locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, lochhhmasCurve, lhhmasutili, multiThread, - enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmaskcblocalcurve, localmaskcbutili, dummy, lmasutilicolwav, 1, 1, 5, 5, - shortcu, delt, hueref, chromaref, lumaref, + locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, lochhhmasCurve, false, multiThread, + enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmaskcblocalcurve, localmaskcbutili, dummy, false, 1, 1, 5, 5, + shortcu, params->locallab.spots.at(sp).deltae, hueref, chromaref, lumaref, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco, false, 0.0f, 0.f, -1 ); @@ -10499,31 +13423,43 @@ void ImProcFunctions::Lab_Local( bufsh[y - ystart][x - xstart] = origcbdl->L[y - ystart][x - xstart] = original->L[y][x]; loctemp->a[y - ystart][x - xstart] = origcbdl->a[y - ystart][x - xstart] = original->a[y][x]; loctemp->b[y - ystart][x - xstart] = origcbdl->b[y - ystart][x - xstart] = original->b[y][x]; + loctemp->L[y - ystart][x - xstart] = origcbdl->b[y - ystart][x - xstart] = original->L[y][x]; } } - if (lp.clarityml != 0.f && lp.mulloc[5] == 1.0) { //enabled last level to retrieve level 5 and residual image in case user not select level 5 + if (lp.clarityml != 0.f && lp.mulloc[5] == 1.f) { //enabled last level to retrieve level 5 and residual image in case user not select level 5 lp.mulloc[5] = 1.001f; } - if (lp.contresid != 0.f && lp.mulloc[5] == 1.0) { //enabled last level to retrieve level 5 and residual image in case user not select level 5 + if (lp.contresid != 0.f && lp.mulloc[5] == 1.f) { //enabled last level to retrieve level 5 and residual image in case user not select level 5 lp.mulloc[5] = 1.001f; } ImProcFunctions::cbdl_local_temp(bufsh, loctemp->L, bfw, bfh, lp.mulloc, 1.f, lp.threshol, lp.clarityml, lp.contresid, skinprot, false, b_l, t_l, t_r, b_r, choice, sk, multiThread); + if (lp.softradiuscb > 0.f) { softproc(origcbdl.get(), loctemp.get(), lp.softradiuscb, bfh, bfw, 0.001, 0.00001, 0.5f, sk, multiThread, 1); } - + + if(lp.enacbMask && lp.recothrcb != 1.f) { + float hig = lp.higthrcb; + float low = lp.lowthrcb; + float recoth = lp.recothrcb; + float decay = lp.decaycb; + bool invmask = false; + maskrecov(loctemp.get(), original, bufmaskorigcb.get(), bfh, bfw, ystart, xstart, hig, low, recoth, decay, invmask, sk, multiThread); + } + } transit_shapedetect(6, loctemp.get(), originalmaskcb.get(), bufchrom, false, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); - bool nochroma = (lp.showmaskcbmet == 2 || lp.showmaskcbmet == 1); + const bool nochroma = (lp.showmaskcbmet == 2 || lp.showmaskcbmet == 1); //chroma CBDL begin here if (lp.chromacb > 0.f && !nochroma) { + #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread) #endif @@ -10551,7 +13487,6 @@ void ImProcFunctions::Lab_Local( choice = 1; ImProcFunctions::cbdl_local_temp(bufsh, loctemp->L, bfw, bfh, multc, rtengine::max(lp.chromacb, 1.f), lp.threshol, clarich, 0.f, skinprot, false, b_l, t_l, t_r, b_r, choice, sk, multiThread); - float minC = loctemp->L[0][0] - std::sqrt(SQR(loctemp->a[0][0]) + SQR(loctemp->b[0][0])); float maxC = minC; #ifdef _OPENMP @@ -10580,14 +13515,15 @@ void ImProcFunctions::Lab_Local( } transit_shapedetect(7, loctemp.get(), nullptr, bufchrom, false, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); - bufsh.free(); - - if (params->locallab.spots.at(sp).recurs) { - original->CopyFrom(transformed, multiThread); - float avge; - calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); - } } + bufsh.free(); + + if (lp.recur) { + original->CopyFrom(transformed, multiThread); + float avge; + calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); + } + } } } @@ -10668,8 +13604,6 @@ void ImProcFunctions::Lab_Local( float lap = params->locallab.spots.at(sp).lapmaskvib; bool pde = params->locallab.spots.at(sp).laplac; LocwavCurve dummy; - bool lmasutilicolwav = false; - bool delt = params->locallab.spots.at(sp).deltae; int sco = params->locallab.spots.at(sp).scopemask; int shortcu = 0;//lp.mergemet; //params->locallab.spots.at(sp).shortc; @@ -10680,16 +13614,15 @@ void ImProcFunctions::Lab_Local( int shado = 0; int lumask = params->locallab.spots.at(sp).lumask; LocHHmaskCurve lochhhmasCurve; - bool lhhmasutili = false; float amountcd = 0.f; float anchorcd = 50.f; const int highl = 0; maskcalccol(false, pde, bfw, bfh, xstart, ystart, sk, cx, cy, bufexporig.get(), bufmaskorigvib.get(), originalmaskvib.get(), original, reserved, inv, lp, 0.f, false, - locccmasvibCurve, lcmasvibutili, locllmasvibCurve, llmasvibutili, lochhmasvibCurve, lhmasvibutili, lochhhmasCurve, lhhmasutili, multiThread, - enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmaskviblocalcurve, localmaskvibutili, dummy, lmasutilicolwav, 1, 1, 5, 5, - shortcu, delt, hueref, chromaref, lumaref, + locccmasvibCurve, lcmasvibutili, locllmasvibCurve, llmasvibutili, lochhmasvibCurve, lhmasvibutili, lochhhmasCurve, false, multiThread, + enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmaskviblocalcurve, localmaskvibutili, dummy, false, 1, 1, 5, 5, + shortcu, params->locallab.spots.at(sp).deltae, hueref, chromaref, lumaref, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco, false, 0.f, 0.f, -1 ); @@ -10733,8 +13666,7 @@ void ImProcFunctions::Lab_Local( #endif for (int ir = 0; ir < bfh; ir++) for (int jr = 0; jr < bfw; jr++) { - double factor = 1.0; - factor = ImProcFunctions::calcGradientFactor(gph, jr, ir); + float factor = ImProcFunctions::calcGradientFactor(gph, jr, ir); float aa = bufexpfin->a[ir][jr]; float bb = bufexpfin->b[ir][jr]; float chrm = std::sqrt(SQR(aa) + SQR(bb)); @@ -10769,12 +13701,11 @@ void ImProcFunctions::Lab_Local( #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread) #endif - for (int ir = 0; ir < bfh; ir++) + for (int ir = 0; ir < bfh; ir++) { for (int jr = 0; jr < bfw; jr++) { - double factor = 1.0; - factor = ImProcFunctions::calcGradientFactor(gp, jr, ir); - bufexpfin->L[ir][jr] *= factor; + bufexpfin->L[ir][jr] *= ImProcFunctions::calcGradientFactor(gp, jr, ir); } + } } if (lp.strvibab != 0.f) { @@ -10785,8 +13716,7 @@ void ImProcFunctions::Lab_Local( #endif for (int ir = 0; ir < bfh; ir++) for (int jr = 0; jr < bfw; jr++) { - double factor = 1.0; - factor = ImProcFunctions::calcGradientFactor(gpab, jr, ir); + const float factor = ImProcFunctions::calcGradientFactor(gpab, jr, ir); bufexpfin->a[ir][jr] *= factor; bufexpfin->b[ir][jr] *= factor; } @@ -10795,17 +13725,26 @@ void ImProcFunctions::Lab_Local( ImProcFunctions::vibrance(bufexpfin.get(), vibranceParams, params->toneCurve.hrenabled, params->icm.workingProfile); if (params->locallab.spots.at(sp).warm != 0) { - ImProcFunctions::ciecamloc_02float(sp, bufexpfin.get()); + ImProcFunctions::ciecamloc_02float(sp, bufexpfin.get(), 2); + } + + if(lp.enavibMask && lp.recothrv != 1.f) { + float hig = lp.higthrv; + float low = lp.lowthrv; + float recoth = lp.recothrv; + float decay = lp.decayv; + bool invmask = false; + maskrecov(bufexpfin.get(), original, bufmaskorigvib.get(), bfh, bfw, ystart, xstart, hig, low, recoth, decay, invmask, sk, multiThread); } - transit_shapedetect2(call, 2, bufexporig.get(), bufexpfin.get(), originalmaskvib.get(), hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); + transit_shapedetect2(sp, 0.f, 0.f, call, 2, bufexporig.get(), bufexpfin.get(), originalmaskvib.get(), hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); } - if (params->locallab.spots.at(sp).recurs) { + if (lp.recur) { original->CopyFrom(transformed, multiThread); float avge; calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); @@ -10815,232 +13754,6 @@ void ImProcFunctions::Lab_Local( } -//Tone mapping - - if ((lp.strengt != 0.f || lp.showmasktmmet == 2 || lp.enatmMask || lp.showmasktmmet == 3 || lp.showmasktmmet == 4 || lp.prevdE) && lp.tonemapena && !params->epd.enabled) { - if (call <= 3) { //simpleprocess dcrop improcc - const int ystart = rtengine::max(static_cast(lp.yc - lp.lyT) - cy, 0); - const int yend = rtengine::min(static_cast(lp.yc + lp.ly) - cy, original->H); - const int xstart = rtengine::max(static_cast(lp.xc - lp.lxL) - cx, 0); - const int xend = rtengine::min(static_cast(lp.xc + lp.lx) - cx, original->W); - const int bfh = yend - ystart; - const int bfw = xend - xstart; - - if (bfw >= mSP && bfh >= mSP) { - array2D buflight(bfw, bfh); - JaggedArray bufchro(bfw, bfh); - std::unique_ptr bufgb(new LabImage(bfw, bfh)); - const std::unique_ptr tmp1(new LabImage(bfw, bfh)); - const std::unique_ptr bufgbm(new LabImage(bfw, bfh)); - const std::unique_ptr tmp1m(new LabImage(bfw, bfh)); - std::unique_ptr bufmaskorigtm; - std::unique_ptr bufmaskblurtm; - std::unique_ptr originalmasktm; - - // if (lp.showmasktmmet == 0 || lp.showmasktmmet == 2 || lp.enatmMask || lp.showmasktmmet == 3 || lp.showmasktmmet == 4) { - if (lp.showmasktmmet == 2 || lp.enatmMask || lp.showmasktmmet == 3 || lp.showmasktmmet == 4) { - bufmaskorigtm.reset(new LabImage(bfw, bfh)); - bufmaskblurtm.reset(new LabImage(bfw, bfh)); - originalmasktm.reset(new LabImage(bfw, bfh)); - } - -#ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) if (multiThread) -#endif - for (int y = ystart; y < yend; y++) { - for (int x = xstart; x < xend; x++) { - bufgb->L[y - ystart][x - xstart] = original->L[y][x]; - bufgb->a[y - ystart][x - xstart] = original->a[y][x]; - bufgb->b[y - ystart][x - xstart] = original->b[y][x]; - bufgbm->L[y - ystart][x - xstart] = original->L[y][x]; - bufgbm->a[y - ystart][x - xstart] = original->a[y][x]; - bufgbm->b[y - ystart][x - xstart] = original->b[y][x]; - } - } - - int inv = 0; - bool showmaske = false; - bool enaMask = false; - bool deltaE = false; - bool modmask = false; - bool zero = false; - bool modif = false; - - if (lp.showmasktmmet == 3) { - showmaske = true; - } - - if (lp.enatmMask) { - enaMask = true; - } - - if (lp.showmasktmmet == 4) { - deltaE = true; - } - - if (lp.showmasktmmet == 2) { - modmask = true; - } - - if (lp.showmasktmmet == 1) { - modif = true; - } - - if (lp.showmasktmmet == 0) { - zero = true; - } - - float chrom = lp.chromatm;; - float rad = lp.radmatm; - float gamma = lp.gammatm; - float slope = lp.slomatm; - float blendm = lp.blendmatm; - float lap = params->locallab.spots.at(sp).lapmasktm; - bool pde = params->locallab.spots.at(sp).laplac; - int lumask = params->locallab.spots.at(sp).lumask; - - if (!params->locallab.spots.at(sp).enatmMaskaft) { - LocwavCurve dummy; - bool lmasutilicolwav = false; - bool delt = params->locallab.spots.at(sp).deltae; - int sco = params->locallab.spots.at(sp).scopemask; - int shortcu = 0; //lp.mergemet;// params->locallab.spots.at(sp).shortc; - - const float mindE = 2.f + MINSCOPE * sco * lp.thr; - const float maxdE = 5.f + MAXSCOPE * sco * (1 + 0.1f * lp.thr); - const float mindElim = 2.f + MINSCOPE * limscope * lp.thr; - const float maxdElim = 5.f + MAXSCOPE * limscope * (1 + 0.1f * lp.thr); - int shado = 0; - float amountcd = 0.f; - float anchorcd = 50.f; - LocHHmaskCurve lochhhmasCurve; - bool lhhmasutili = false; - const int highl = 0; - - maskcalccol(false, pde, bfw, bfh, xstart, ystart, sk, cx, cy, bufgbm.get(), bufmaskorigtm.get(), originalmasktm.get(), original, reserved, inv, lp, - 0.f, false, - locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili, lochhhmasCurve, lhhmasutili, multiThread, - enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmasktmlocalcurve, localmasktmutili, dummy, lmasutilicolwav, 1, 1, 5, 5, - shortcu, delt, hueref, chromaref, lumaref, - maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco, false, 0.f, 0.f, -1 - ); - - if (lp.showmasktmmet == 3) { - showmask(lumask, lp, xstart, ystart, cx, cy, bfw, bfh, bufgbm.get(), transformed, bufmaskorigtm.get(), 0); - - return; - } - } - - if (lp.showmasktmmet == 0 || lp.showmasktmmet == 1 || lp.showmasktmmet == 2 || lp.showmasktmmet == 4 || lp.showmasktmmet == 3 || lp.enatmMask) { - constexpr int itera = 0; - ImProcFunctions::EPDToneMaplocal(sp, bufgb.get(), tmp1.get(), itera, sk);//iterate to 0 calculate with edgstopping, improve result, call=1 dcrop we can put iterate to 5 - - tmp1m->CopyFrom(tmp1.get(), multiThread); //save current result - bool enatmMasktmap = params->locallab.spots.at(sp).enatmMaskaft; - - if (enatmMasktmap) { - //calculate new values for original, originalmasktm, bufmaskorigtm...in function of tmp1 - LocwavCurve dummy; - bool lmasutilicolwav = false; - bool delt = params->locallab.spots.at(sp).deltae; - int sco = params->locallab.spots.at(sp).scopemask; - int shortcu = 0;//lp.mergemet; //params->locallab.spots.at(sp).shortc; - int lumask = params->locallab.spots.at(sp).lumask; - - const float mindE = 2.f + MINSCOPE * sco * lp.thr; - const float maxdE = 5.f + MAXSCOPE * sco * (1 + 0.1f * lp.thr); - const float mindElim = 2.f + MINSCOPE * limscope * lp.thr; - const float maxdElim = 5.f + MAXSCOPE * limscope * (1 + 0.1f * lp.thr); - int shado = 0; - float amountcd = 0.f; - float anchorcd = 50.f; - LocHHmaskCurve lochhhmasCurve; - bool lhhmasutili = false; - const int highl = 0; - - maskcalccol(false, pde, bfw, bfh, xstart, ystart, sk, cx, cy, tmp1.get(), bufmaskorigtm.get(), originalmasktm.get(), original, reserved, inv, lp, - 0.f, false, - locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili, lochhhmasCurve, lhhmasutili, multiThread, - enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmasktmlocalcurve, localmasktmutili, dummy, lmasutilicolwav, 1, 1, 5, 5, - shortcu, delt, hueref, chromaref, lumaref, - maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco, false, 0.f, 0.f, -1 - ); - - if (lp.showmasktmmet == 3) {//display mask - showmask(lumask, lp, xstart, ystart, cx, cy, bfw, bfh, tmp1.get(), transformed, bufmaskorigtm.get(), 0); - - return; - } - - } - - tmp1->CopyFrom(tmp1m.get(), multiThread); //restore current result - - - float minL = tmp1->L[0][0] - bufgb->L[0][0]; - float maxL = minL; - float minC = std::sqrt(SQR(tmp1->a[0][0]) + SQR(tmp1->b[0][0])) - std::sqrt(SQR(bufgb->a[0][0]) + SQR(bufgb->b[0][0])); - float maxC = minC; - -#ifdef _OPENMP - #pragma omp parallel for reduction(max:maxL) reduction(min:minL) reduction(max:maxC) reduction(min:minC) schedule(dynamic,16) if (multiThread) -#endif - for (int ir = 0; ir < bfh; ir++) { - for (int jr = 0; jr < bfw; jr++) { - buflight[ir][jr] = tmp1->L[ir][jr] - bufgb->L[ir][jr]; - minL = rtengine::min(minL, buflight[ir][jr]); - maxL = rtengine::max(maxL, buflight[ir][jr]); - bufchro[ir][jr] = std::sqrt(SQR(tmp1->a[ir][jr]) + SQR(tmp1->b[ir][jr])) - std::sqrt(SQR(bufgb->a[ir][jr]) + SQR(bufgb->b[ir][jr])); - minC = rtengine::min(minC, bufchro[ir][jr]); - maxC = rtengine::max(maxC, bufchro[ir][jr]); - } - } - - float coef = 0.01f * rtengine::max(std::fabs(minL), std::fabs(maxL)); - float coefC = 0.01f * rtengine::max(std::fabs(minC), std::fabs(maxC)); - - if (coef == 0.f) { - coef = 1.f; - } else { - coef = 1.f / coef; - } - - if (coefC == 0.f) { - coefC = 1.f; - } else { - coefC = 1.f / coefC; - } - -#ifdef _OPENMP - #pragma omp parallel for if (multiThread) -#endif - for (int y = 0; y < bfh; y++) { - for (int x = 0; x < bfw; x++) { - buflight[y][x] *= coef; - bufchro[y][x] *= coefC; - } - } - - // transit_shapedetect_retinex(call, 4, bufgb.get(),bufmaskorigtm.get(), originalmasktm.get(), buflight, bufchro, hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); - transit_shapedetect2(call, 8, bufgb.get(), tmp1.get(), originalmasktm.get(), hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); - - // transit_shapedetect(8, tmp1.get(), originalmasktm.get(), bufchro, false, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); - bufgb.reset(); - - if (params->locallab.spots.at(sp).recurs) { - original->CopyFrom(transformed, multiThread); - float avge; - calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); - } - } - } - } - } - -//end TM - - //shadow highlight bool tonequ = false; @@ -11049,8 +13762,10 @@ void ImProcFunctions::Lab_Local( } bool tonecurv = false; + const Glib::ustring profile = params->icm.workingProfile; + bool isworking = (profile == "sRGB" || profile == "Adobe RGB" || profile == "ProPhoto" || profile == "WideGamut" || profile == "BruceRGB" || profile == "Beta RGB" || profile == "BestRGB" || profile == "Rec2020" || profile == "ACESp0" || profile == "ACESp1"); - if (params->locallab.spots.at(sp).gamSH != 2.4 || params->locallab.spots.at(sp).sloSH != 12.92) { + if (isworking && (params->locallab.spots.at(sp).gamSH != 2.4 || params->locallab.spots.at(sp).sloSH != 12.92)) { tonecurv = true; } @@ -11126,8 +13841,6 @@ void ImProcFunctions::Lab_Local( float lap = params->locallab.spots.at(sp).lapmaskSH; bool pde = params->locallab.spots.at(sp).laplac; LocwavCurve dummy; - bool lmasutilicolwav = false; - bool delt = params->locallab.spots.at(sp).deltae; int sco = params->locallab.spots.at(sp).scopemask; int shortcu = 0;//lp.mergemet; //params->locallab.spots.at(sp).shortc; @@ -11140,14 +13853,13 @@ void ImProcFunctions::Lab_Local( float anchorcd = params->locallab.spots.at(sp).fatanchorSH; int lumask = params->locallab.spots.at(sp).lumask; LocHHmaskCurve lochhhmasCurve; - bool lhhmasutili = false; const int highl = 0; maskcalccol(false, pde, bfw, bfh, xstart, ystart, sk, cx, cy, bufexporig.get(), bufmaskorigSH.get(), originalmaskSH.get(), original, reserved, inv, lp, 0.f, false, - locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, lochhhmasCurve, lhhmasutili, multiThread, - enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmaskSHlocalcurve, localmaskSHutili, dummy, lmasutilicolwav, 1, 1, 5, 5, - shortcu, delt, hueref, chromaref, lumaref, + locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, lochhhmasCurve, false, multiThread, + enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmaskSHlocalcurve, localmaskSHutili, dummy, false, 1, 1, 5, 5, + shortcu, params->locallab.spots.at(sp).deltae, hueref, chromaref, lumaref, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco, false, 0.f, 0.f, -1 ); @@ -11185,12 +13897,11 @@ void ImProcFunctions::Lab_Local( #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread) #endif - for (int ir = 0; ir < bfh; ir++) + for (int ir = 0; ir < bfh; ir++) { for (int jr = 0; jr < bfw; jr++) { - double factor = 1.0; - factor = ImProcFunctions::calcGradientFactor(gp, jr, ir); - bufexpfin->L[ir][jr] *= factor; + bufexpfin->L[ir][jr] *= ImProcFunctions::calcGradientFactor(gp, jr, ir); } + } } if (lp.shmeth == 1) { @@ -11200,11 +13911,11 @@ void ImProcFunctions::Lab_Local( lab2rgb(*bufexpfin, *tmpImage, params->icm.workingProfile); if (tonecurv) { //Tone response curve : does nothing if gamma=2.4 and slope=12.92 ==> gamma sRGB - float gamtone = params->locallab.spots.at(sp).gamSH; - float slotone = params->locallab.spots.at(sp).sloSH; - cmsHTRANSFORM dummy = nullptr; - workingtrc(tmpImage, tmpImage, bfw, bfh, -5, params->icm.workingProfile, 2.4, 12.92310, dummy, true, false, false); - workingtrc(tmpImage, tmpImage, bfw, bfh, 5, params->icm.workingProfile, gamtone, slotone, dummy, false, true, true); + const float gamtone = params->locallab.spots.at(sp).gamSH; + const float slotone = params->locallab.spots.at(sp).sloSH; + cmsHTRANSFORM dummyTransForm = nullptr; + workingtrc(tmpImage, tmpImage, bfw, bfh, -5, params->icm.workingProfile, 2.4, 12.92310, dummyTransForm, true, false, false); + workingtrc(tmpImage, tmpImage, bfw, bfh, 5, params->icm.workingProfile, gamtone, slotone, dummyTransForm, false, true, true); } if (tonequ) { @@ -11222,9 +13933,18 @@ void ImProcFunctions::Lab_Local( } } - transit_shapedetect2(call, 9, bufexporig.get(), bufexpfin.get(), originalmaskSH.get(), hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); + if(lp.enaSHMask && lp.recothrs != 1.f) { + float hig = lp.higthrs; + float low = lp.lowthrs; + float recoth = lp.recothrs; + float decay = lp.decays; + bool invmask = false; + maskrecov(bufexpfin.get(), original, bufmaskorigSH.get(), bfh, bfw, ystart, xstart, hig, low, recoth, decay, invmask, sk, multiThread); + } - if (params->locallab.spots.at(sp).recurs) { + transit_shapedetect2(sp, 0.f, 0.f, call, 9, bufexporig.get(), bufexpfin.get(), originalmaskSH.get(), hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); + + if (lp.recur) { original->CopyFrom(transformed, multiThread); float avge; calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); @@ -11233,18 +13953,18 @@ void ImProcFunctions::Lab_Local( } else if (lp.invsh && (lp.highlihs > 0.f || lp.shadowhs > 0.f || tonequ || tonecurv || lp.showmaskSHmetinv == 1 || lp.enaSHMaskinv) && call < 3 && lp.hsena) { std::unique_ptr bufmaskblurcol; std::unique_ptr originalmaskSH; - const std::unique_ptr bufcolorig(new LabImage(GW, GH)); + const std::unique_ptr bufcolorig(new LabImage(TW, TH)); if (lp.enaSHMaskinv || lp.showmaskSHmetinv == 1) { - bufmaskblurcol.reset(new LabImage(GW, GH, true)); - originalmaskSH.reset(new LabImage(GW, GH)); + bufmaskblurcol.reset(new LabImage(TW, TH, true)); + originalmaskSH.reset(new LabImage(TW, TH)); } #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread) #endif - for (int y = 0; y < GH ; y++) { - for (int x = 0; x < GW; x++) { + for (int y = 0; y < TH ; y++) { + for (int x = 0; x < TW; x++) { bufcolorig->L[y][x] = original->L[y][x]; } } @@ -11277,9 +13997,6 @@ void ImProcFunctions::Lab_Local( float lap = params->locallab.spots.at(sp).lapmaskSH; bool pde = params->locallab.spots.at(sp).laplac; LocwavCurve dummy; - bool lmasutilicolwav = false; - // bool delt = params->locallab.spots.at(sp).deltae; - bool delt = false; int sco = params->locallab.spots.at(sp).scopemask; int shortcu = params->locallab.spots.at(sp).shortc; @@ -11292,20 +14009,19 @@ void ImProcFunctions::Lab_Local( float anchorcd = params->locallab.spots.at(sp).fatanchorSH; int lumask = params->locallab.spots.at(sp).lumask; LocHHmaskCurve lochhhmasCurve; - bool lhhmasutili = false; const int highl = 0; - maskcalccol(false, pde, GW, GH, 0, 0, sk, cx, cy, bufcolorig.get(), bufmaskblurcol.get(), originalmaskSH.get(), original, reserved, inv, lp, + maskcalccol(false, pde, TW, TH, 0, 0, sk, cx, cy, bufcolorig.get(), bufmaskblurcol.get(), originalmaskSH.get(), original, reserved, inv, lp, 0.f, false, - locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, lochhhmasCurve, lhhmasutili, multiThread, - enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmaskSHlocalcurve, localmaskSHutili, dummy, lmasutilicolwav, 1, 1, 5, 5, - shortcu, delt, hueref, chromaref, lumaref, + locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, lochhhmasCurve, false, multiThread, + enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmaskSHlocalcurve, localmaskSHutili, dummy, false, 1, 1, 5, 5, + shortcu, false, hueref, chromaref, lumaref, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco, false, 0.f, 0.f, -1 ); if (lp.showmaskSHmetinv == 1) { - showmask(lumask, lp, 0, 0, cx, cy, GW, GH, bufcolorig.get(), transformed, bufmaskblurcol.get(), inv); + showmask(lumask, lp, 0, 0, cx, cy, TW, TH, bufcolorig.get(), transformed, bufmaskblurcol.get(), inv); return; } @@ -11313,7 +14029,7 @@ void ImProcFunctions::Lab_Local( float adjustr = 2.f; InverseColorLight_Local(tonequ, tonecurv, sp, 2, lp, originalmaskSH.get(), lightCurveloc, hltonecurveloc, shtonecurveloc, tonecurveloc, exlocalcurve, cclocalcurve, adjustr, localcutili, lllocalcurve, locallutili, original, transformed, cx, cy, hueref, chromaref, lumaref, sk); - if (params->locallab.spots.at(sp).recurs) { + if (lp.recur) { original->CopyFrom(transformed, multiThread); float avge; calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); @@ -11321,7 +14037,7 @@ void ImProcFunctions::Lab_Local( } // soft light and retinex_pde - if (lp.strng > 1.f && call <= 3 && lp.sfena) { + if ((lp.strng > 1.f || lp.prevdE) && call <= 3 && lp.sfena) { int ystart = rtengine::max(static_cast(lp.yc - lp.lyT) - cy, 0); int yend = rtengine::min(static_cast(lp.yc + lp.ly) - cy, original->H); int xstart = rtengine::max(static_cast(lp.xc - lp.lxL) - cx, 0); @@ -11389,9 +14105,9 @@ void ImProcFunctions::Lab_Local( } } - transit_shapedetect2(call, 3, bufexporig.get(), bufexpfin.get(), nullptr, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); + transit_shapedetect2(sp, 0.f, 0.f, call, 3, bufexporig.get(), bufexpfin.get(), nullptr, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); - if (params->locallab.spots.at(sp).recurs) { + if (lp.recur) { original->CopyFrom(transformed, multiThread); float avge; calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); @@ -11409,7 +14125,7 @@ void ImProcFunctions::Lab_Local( if (lp.locmet == 1) { if (locwavCurve && locwavutili) { for (int i = 0; i < 500; i++) { - if (locwavCurve[i] != 0.5) { + if (locwavCurve[i] != 0.5f) { wavcurve = true; break; } @@ -11417,7 +14133,7 @@ void ImProcFunctions::Lab_Local( } if (loclevwavCurve && loclevwavutili) { for (int i = 0; i < 500; i++) { - if (loclevwavCurve[i] != 0.) { + if (loclevwavCurve[i] != 0.f) { wavcurvelev = true; break; } @@ -11425,7 +14141,7 @@ void ImProcFunctions::Lab_Local( } if (locconwavCurve && locconwavutili) { for (int i = 0; i < 500; i++) { - if (locconwavCurve[i] != 0.5) { + if (locconwavCurve[i] != 0.5f) { wavcurvecon = true; break; } @@ -11433,7 +14149,7 @@ void ImProcFunctions::Lab_Local( } if (loccompwavCurve && loccompwavutili) { for (int i = 0; i < 500; i++) { - if (loccompwavCurve[i] != 0.) { + if (loccompwavCurve[i] != 0.f) { wavcurvecomp = true; break; } @@ -11441,7 +14157,7 @@ void ImProcFunctions::Lab_Local( } if (loccomprewavCurve && loccomprewavutili) { for (int i = 0; i < 500; i++) { - if (loccomprewavCurve[i] != 0.75) { + if (loccomprewavCurve[i] != 0.75f) { wavcurvecompre = true; break; } @@ -11449,7 +14165,7 @@ void ImProcFunctions::Lab_Local( } } - if ((lp.lcamount > 0.f || wavcurve || lp.showmasklcmet == 2 || lp.enalcMask || lp.showmasklcmet == 3 || lp.showmasklcmet == 4 || lp.prevdE || lp.strwav != 0.f || wavcurvelev || wavcurvecon || wavcurvecomp || wavcurvecompre || lp.edgwena || params->locallab.spots.at(sp).residblur > 0.f || params->locallab.spots.at(sp).levelblur > 0.f || params->locallab.spots.at(sp).residcont != 0.f || params->locallab.spots.at(sp).clarilres != 0.f || params->locallab.spots.at(sp).claricres != 0.f) && call <= 3 && lp.lcena) { + if ((lp.lcamount > 0.f || wavcurve || lp.showmasklcmet == 2 || lp.enalcMask || lp.showmasklcmet == 3 || lp.showmasklcmet == 4 || lp.prevdE || lp.strwav != 0.f || wavcurvelev || wavcurvecon || wavcurvecomp || wavcurvecompre || lp.edgwena || params->locallab.spots.at(sp).residblur > 0.0 || params->locallab.spots.at(sp).levelblur > 0.0 || params->locallab.spots.at(sp).residcont != 0.0 || params->locallab.spots.at(sp).clarilres != 0.0 || params->locallab.spots.at(sp).claricres != 0.0) && call <= 3 && lp.lcena) { int ystart = rtengine::max(static_cast(lp.yc - lp.lyT) - cy, 0); int yend = rtengine::min(static_cast(lp.yc + lp.ly) - cy, original->H); @@ -11552,8 +14268,6 @@ void ImProcFunctions::Lab_Local( float lap = 0.f; //params->locallab.spots.at(sp).lapmaskexp; bool pde = false; //params->locallab.spots.at(sp).laplac; LocwavCurve dummy; - bool lmasutilicolwav = false; - bool delt = params->locallab.spots.at(sp).deltae; int sco = params->locallab.spots.at(sp).scopemask; int shado = 0; int shortcu = 0;//lp.mergemet; //params->locallab.spots.at(sp).shortc; @@ -11565,13 +14279,12 @@ void ImProcFunctions::Lab_Local( float anchorcd = 50.f; int lumask = params->locallab.spots.at(sp).lumask; LocHHmaskCurve lochhhmasCurve; - bool lhhmasutili = false; const int highl = 0; maskcalccol(false, pde, bfw, bfh, xstart, ystart, sk, cx, cy, bufgb.get(), bufmaskoriglc.get(), originalmasklc.get(), original, reserved, inv, lp, 0.f, false, - locccmaslcCurve, lcmaslcutili, locllmaslcCurve, llmaslcutili, lochhmaslcCurve, lhmaslcutili, lochhhmasCurve, lhhmasutili, multiThread, - enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmasklclocalcurve, localmasklcutili, dummy, lmasutilicolwav, 1, 1, 5, 5, - shortcu, delt, hueref, chromaref, lumaref, + locccmaslcCurve, lcmaslcutili, locllmaslcCurve, llmaslcutili, lochhmaslcCurve, lhmaslcutili, lochhhmasCurve, false, multiThread, + enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmasklclocalcurve, localmasklcutili, dummy, false, 1, 1, 5, 5, + shortcu, params->locallab.spots.at(sp).deltae, hueref, chromaref, lumaref, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco, false, 0.f, 0.f, -1 ); @@ -11624,8 +14337,8 @@ void ImProcFunctions::Lab_Local( } } else if (lp.locmet == 1) { //wavelet && sk ==1 int wavelet_level = 1 + params->locallab.spots.at(sp).csthreshold.getBottomRight();//retrieve with +1 maximum wavelet_level - float mL = params->locallab.spots.at(sp).clarilres / 100.f; - float mC = params->locallab.spots.at(sp).claricres / 100.f; + float mL = params->locallab.spots.at(sp).clarilres / 100.0; + float mC = params->locallab.spots.at(sp).claricres / 100.0; float softr = params->locallab.spots.at(sp).clarisoft; float mL0 = 0.f; float mC0 = 0.f; @@ -11730,7 +14443,7 @@ void ImProcFunctions::Lab_Local( #pragma omp parallel for if (multiThread) #endif for (int i = 0; i < W_La * H_La; i++) { - wav_ab0a[i] *= (1.f + sin(rtengine::RT_PI * (satur / 200.f)));//more progressive than linear + wav_ab0a[i] *= (1.f + xsinf(rtengine::RT_PI_F * (satur / 200.f)));//more progressive than linear wav_ab0a[i] = clipC(wav_ab0a[i]); } } @@ -11784,7 +14497,7 @@ void ImProcFunctions::Lab_Local( #pragma omp parallel for if (multiThread) #endif for (int i = 0; i < W_Lb * H_Lb; i++) { - wav_ab0b[i] *= (1.f + sin(rtengine::RT_PI * (satur / 200.f))); + wav_ab0b[i] *= (1.f + xsinf(rtengine::RT_PI_F * (satur / 200.f))); wav_ab0b[i] = clipC(wav_ab0b[i]); } } @@ -11846,12 +14559,20 @@ void ImProcFunctions::Lab_Local( } } + if(lp.enalcMask && lp.recothrw != 1.f) { + float hig = lp.higthrw; + float low = lp.lowthrw; + float recoth = lp.recothrw; + float decay = lp.decayw; + bool invmask = false; + maskrecov(tmp1.get(), original, bufmaskoriglc.get(), bfh, bfw, ystart, xstart, hig, low, recoth, decay, invmask, sk, multiThread); + } - transit_shapedetect2(call, 10, bufgb.get(), tmp1.get(), originalmasklc.get(), hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); + transit_shapedetect2(sp, 0.f, 0.f, call, 10, bufgb.get(), tmp1.get(), originalmasklc.get(), hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); tmp1.reset(); } - if (params->locallab.spots.at(sp).recurs) { + if (lp.recur) { original->CopyFrom(transformed, multiThread); float avge; calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); @@ -11902,7 +14623,7 @@ void ImProcFunctions::Lab_Local( //sharpen ellipse and transition Sharp_Local(call, loctemp, 0, hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); - if (params->locallab.spots.at(sp).recurs) { + if (lp.recur) { original->CopyFrom(transformed, multiThread); float avge; calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); @@ -11917,694 +14638,16 @@ void ImProcFunctions::Lab_Local( InverseSharp_Local(loctemp, hueref, lumaref, chromaref, lp, original, transformed, cx, cy, sk); - if (params->locallab.spots.at(sp).recurs) { + if (lp.recur) { original->CopyFrom(transformed, multiThread); float avge; calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); } } - if (lp.dehaze != 0 && lp.retiena) { - int ystart = rtengine::max(static_cast(lp.yc - lp.lyT) - cy, 0); - int yend = rtengine::min(static_cast(lp.yc + lp.ly) - cy, original->H); - int xstart = rtengine::max(static_cast(lp.xc - lp.lxL) - cx, 0); - int xend = rtengine::min(static_cast(lp.xc + lp.lx) - cx, original->W); - int bfh = yend - ystart; - int bfw = xend - xstart; - - if (bfh >= mSP && bfw >= mSP) { - const std::unique_ptr bufexporig(new LabImage(bfw, bfh)); //buffer for data in zone limit - const std::unique_ptr bufexpfin(new LabImage(bfw, bfh)); //buffer for data in zone limit - -#ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) if (multiThread) -#endif - for (int y = ystart; y < yend; y++) { - for (int x = xstart; x < xend; x++) { - bufexporig->L[y - ystart][x - xstart] = original->L[y][x]; - bufexporig->a[y - ystart][x - xstart] = original->a[y][x]; - bufexporig->b[y - ystart][x - xstart] = original->b[y][x]; - } - } - - bufexpfin->CopyFrom(bufexporig.get(), multiThread); - //calc dehaze - const std::unique_ptr tmpImage(new Imagefloat(bfw, bfh)); - - DehazeParams dehazeParams; - dehazeParams.enabled = true; - dehazeParams.strength = lp.dehaze; - dehazeParams.showDepthMap = false; - dehazeParams.depth = lp.depth; - dehazeParams.luminance = params->locallab.spots.at(sp).lumonly; - lab2rgb(*bufexpfin, *tmpImage.get(), params->icm.workingProfile); - dehazeloc(tmpImage.get(), dehazeParams); - rgb2lab(*tmpImage.get(), *bufexpfin, params->icm.workingProfile); - - transit_shapedetect2(call, 30, bufexporig.get(), bufexpfin.get(), nullptr, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); - - if (params->locallab.spots.at(sp).recurs) { - original->CopyFrom(transformed, multiThread); - float avge; - calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); - } - } - } - - lp.invret = false;//always disabled inverse RETI too complex todo !! - - if (lp.str >= 0.2f && lp.retiena && call != 2) { - LabImage *bufreti = nullptr; - LabImage *bufmask = nullptr; - LabImage *buforig = nullptr; - LabImage *buforigmas = nullptr; - - if (GW >= mSP && GH >= mSP) - - { - - array2D buflight(GW, GH); - JaggedArray bufchro(GW, GH); - - int Hd, Wd; - Hd = GH; - Wd = GW; - - bufreti = new LabImage(GW, GH); - bufmask = new LabImage(GW, GH); - - if (!lp.enaretiMasktmap && lp.enaretiMask) { - buforig = new LabImage(GW, GH); - buforigmas = new LabImage(GW, GH); - } - -#ifdef _OPENMP - #pragma omp parallel for if (multiThread) -#endif - for (int ir = 0; ir < GH; ir++) //fill with 0 - for (int jr = 0; jr < GW; jr++) { - bufreti->L[ir][jr] = 0.f; - bufreti->a[ir][jr] = 0.f; - bufreti->b[ir][jr] = 0.f; - buflight[ir][jr] = 0.f; - bufchro[ir][jr] = 0.f; - } - -#ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) if (multiThread) -#endif - for (int y = 0; y < transformed->H ; y++) //{ - for (int x = 0; x < transformed->W; x++) { - bufreti->L[y][x] = original->L[y][x]; - bufreti->a[y][x] = original->a[y][x]; - bufreti->b[y][x] = original->b[y][x]; - bufmask->L[y][x] = original->L[y][x]; - bufmask->a[y][x] = original->a[y][x]; - bufmask->b[y][x] = original->b[y][x]; - - if (!lp.enaretiMasktmap && lp.enaretiMask) { - buforig->L[y][x] = original->L[y][x]; - buforig->a[y][x] = original->a[y][x]; - buforig->b[y][x] = original->b[y][x]; - } - - } - - float raddE = params->locallab.spots.at(sp).softradiusret; - - //calc dE and reduction to use in MSR to reduce artifacts - const float mindE = 4.f + MINSCOPE * lp.sensh * lp.thr; - const float maxdE = 5.f + MAXSCOPE * lp.sensh * (1 + 0.1f * lp.thr); - const float mindElim = 2.f + MINSCOPE * limscope * lp.thr; - const float maxdElim = 5.f + MAXSCOPE * limscope * (1 + 0.1f * lp.thr); - const float refa = chromaref * cos(hueref); - const float refb = chromaref * sin(hueref); - - const std::unique_ptr> reducDEBuffer(new JaggedArray(Wd, Hd)); - float** reducDE = *(reducDEBuffer.get()); - - float ade = 0.01f * raddE; - float bde = 100.f - raddE; - float sensibefore = ade * lp.sensh + bde;//we can change sensitivity 0.1 90 or 0.3 70 or 0.4 60 -#ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) if (multiThread) -#endif - for (int y = 0; y < transformed->H ; y++) - for (int x = 0; x < transformed->W; x++) { - float dE = std::sqrt(SQR(refa - bufreti->a[y][x] / 327.68f) + SQR(refb - bufreti->b[y][x] / 327.68f) + SQR(lumaref - bufreti->b[y][x] / 327.68f)); - const float reducdE = calcreducdE(dE, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sensibefore); - reducDE[y][x] = clipDE(reducdE); - } - - const std::unique_ptr> origBuffer(new JaggedArray(Wd, Hd)); - float** orig = *(origBuffer.get()); - - const std::unique_ptr> origBuffer1(new JaggedArray(Wd, Hd)); - float** orig1 = *(origBuffer1.get()); - -#ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) if (multiThread) -#endif - for (int ir = 0; ir < Hd; ir += 1) - for (int jr = 0; jr < Wd; jr += 1) { - orig[ir][jr] = bufreti->L[ir][jr]; - orig1[ir][jr] = bufreti->L[ir][jr]; - } - - LabImage *tmpl = new LabImage(Wd, Hd); - - // float minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax; - bool fftw = lp.ftwreti; - //fftw = false; - //for Retinex Mask are incorporated in MSR - bool delt = params->locallab.spots.at(sp).deltae; - int sco = params->locallab.spots.at(sp).scopemask; - float lumask = params->locallab.spots.at(sp).lumask; - - const float mindE2 = 2.f + MINSCOPE * sco * lp.thr; - const float maxdE2 = 5.f + MAXSCOPE * sco * (1 + 0.1f * lp.thr); - const float mindElim2 = 2.f + MINSCOPE * limscope * lp.thr; - const float maxdElim2 = 5.f + MAXSCOPE * limscope * (1 + 0.1f * lp.thr); - ImProcFunctions::MSRLocal(call, sp, fftw, 1, reducDE, bufreti, bufmask, buforig, buforigmas, orig, orig1, - Wd, Hd, Wd, Hd, params->locallab, sk, locRETgainCcurve, locRETtransCcurve, 0, 4, 1.f, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, - locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili, llretiMask, - lmaskretilocalcurve, localmaskretiutili, - transformed, lp.enaretiMasktmap, lp.enaretiMask, - delt, hueref, chromaref, lumaref, - maxdE2, mindE2, maxdElim2, mindElim2, lp.iterat, limscope, sco, lp.balance, lp.balanceh, lumask); -#ifdef _OPENMP - #pragma omp parallel for if (multiThread) -#endif - for (int ir = 0; ir < Hd; ir += 1) { - for (int jr = 0; jr < Wd; jr += 1) { - tmpl->L[ir][jr] = orig[ir][jr]; - } - } - - if (lp.equret) { //equilibrate luminance before / after MSR - float *datain = new float[Hd * Wd]; - float *data = new float[Hd * Wd]; -#ifdef _OPENMP - #pragma omp parallel for if (multiThread) -#endif - for (int ir = 0; ir < Hd; ir += 1) - for (int jr = 0; jr < Wd; jr += 1) { - datain[ir * Wd + jr] = orig1[ir][jr]; - data[ir * Wd + jr] = orig[ir][jr]; - } - - normalize_mean_dt(data, datain, Hd * Wd, 1.f, 1.f); -#ifdef _OPENMP - #pragma omp parallel for if (multiThread) -#endif - for (int ir = 0; ir < Hd; ir += 1) - for (int jr = 0; jr < Wd; jr += 1) { - tmpl->L[ir][jr] = data[ir * Wd + jr]; - } - - delete [] datain; - delete [] data; - } - - - float minL = tmpl->L[0][0] - bufreti->L[0][0]; - float maxL = minL; -#ifdef _OPENMP - #pragma omp parallel for reduction(min:minL) reduction(max:maxL) schedule(dynamic,16) if (multiThread) -#endif - for (int ir = 0; ir < Hd; ir++) { - for (int jr = 0; jr < Wd; jr++) { - buflight[ir][jr] = tmpl->L[ir][jr] - bufreti->L[ir][jr]; - minL = rtengine::min(minL, buflight[ir][jr]); - maxL = rtengine::max(maxL, buflight[ir][jr]); - } - } - - const float coef = 0.01f * rtengine::max(std::fabs(minL), std::fabs(maxL)); - - for (int ir = 0; ir < Hd; ir++) { - for (int jr = 0; jr < Wd; jr++) { - buflight[ir][jr] /= coef; - } - } - - transit_shapedetect_retinex(call, 4, bufreti, bufmask, buforigmas, buflight, bufchro, hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); - - if (params->locallab.spots.at(sp).recurs) { - original->CopyFrom(transformed, multiThread); - float avge; - calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); - } - - if (params->locallab.spots.at(sp).chrrt > 0) { - - if (call == 1) { - -#ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) if (multiThread) -#endif - for (int ir = 0; ir < Hd; ir += 1) - for (int jr = 0; jr < Wd; jr += 1) { - - orig[ir][jr] = std::sqrt(SQR(bufreti->a[ir][jr]) + SQR(bufreti->b[ir][jr])); - orig1[ir][jr] = std::sqrt(SQR(bufreti->a[ir][jr]) + SQR(bufreti->b[ir][jr])); - } - - } - - float maxChro = orig1[0][0]; -#ifdef _OPENMP - #pragma omp parallel for reduction(max:maxChro) schedule(dynamic,16) if (multiThread) -#endif - for (int ir = 0; ir < Hd; ir++) { - for (int jr = 0; jr < Wd; jr++) { - maxChro = rtengine::max(maxChro, orig1[ir][jr]); - } - } - - float divchro = maxChro; - - //first step change saturation without Retinex ==> gain of time and memory - float satreal = lp.str * params->locallab.spots.at(sp).chrrt / 100.f; - - if (params->locallab.spots.at(sp).chrrt <= 0.2f) { - satreal /= 10.f; - } - - DiagonalCurve reti_satur({ - DCT_NURBS, - 0, 0, - 0.2, 0.2 + satreal / 250.0, - 0.6, rtengine::min(1.0, 0.6 + satreal / 250.0), - 1, 1 - }); - - if (call == 1) { - -#ifdef _OPENMP - #pragma omp parallel for if (multiThread) -#endif - for (int ir = 0; ir < Hd; ir += 1) - for (int jr = 0; jr < Wd; jr += 1) { - const float Chprov = orig1[ir][jr]; - float2 sincosval; - sincosval.y = Chprov == 0.0f ? 1.f : bufreti->a[ir][jr] / Chprov; - sincosval.x = Chprov == 0.0f ? 0.f : bufreti->b[ir][jr] / Chprov; - - if (params->locallab.spots.at(sp).chrrt <= 100.f) { //first step - float buf = LIM01(orig[ir][jr] / divchro); - buf = reti_satur.getVal(buf); - buf *= divchro; - orig[ir][jr] = buf; - } - - tmpl->a[ir][jr] = orig[ir][jr] * sincosval.y; - tmpl->b[ir][jr] = orig[ir][jr] * sincosval.x; - } - - float minC = std::sqrt(SQR(tmpl->a[0][0]) + SQR(tmpl->b[0][0])) - orig1[0][0]; - float maxC = minC; -#ifdef _OPENMP - #pragma omp parallel for reduction(min:minC) reduction(max:maxC) schedule(dynamic,16) if (multiThread) -#endif - for (int ir = 0; ir < Hd; ir++) { - for (int jr = 0; jr < Wd; jr++) { - bufchro[ir][jr] = std::sqrt(SQR(tmpl->a[ir][jr]) + SQR(tmpl->b[ir][jr])) - orig1[ir][jr]; - minC = rtengine::min(minC, bufchro[ir][jr]); - maxC = rtengine::max(maxC, bufchro[ir][jr]); - } - } - - float coefC = 0.01f * rtengine::max(std::fabs(minC), std::fabs(maxC)); - - if (coefC > 0.f) { - coefC = 1.f / coefC; -#ifdef _OPENMP - #pragma omp parallel for if (multiThread) -#endif - for (int ir = 0; ir < Hd; ir++) { - for (int jr = 0; jr < Wd; jr++) { - bufchro[ir][jr] *= coefC; - } - } - } - } - - transit_shapedetect_retinex(call, 5, tmpl, bufmask, buforigmas, buflight, bufchro, hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); - - if (params->locallab.spots.at(sp).recurs) { - original->CopyFrom(transformed, multiThread); - float avge; - calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); - } - } - - delete tmpl; - delete bufmask; - - if (!lp.enaretiMasktmap && lp.enaretiMask) { - if (buforig) { - delete buforig; - } - - if (buforigmas) { - delete buforigmas; - } - } - delete bufreti; - } - } - - - - if (lp.str >= 0.2f && lp.retiena && call == 2) { - int ystart = rtengine::max(static_cast(lp.yc - lp.lyT) - cy, 0); - int yend = rtengine::min(static_cast(lp.yc + lp.ly) - cy, original->H); - int xstart = rtengine::max(static_cast(lp.xc - lp.lxL) - cx, 0); - int xend = rtengine::min(static_cast(lp.xc + lp.lx) - cx, original->W); - int bfh = yend - ystart; - int bfw = xend - xstart; - - LabImage *bufreti = nullptr; - LabImage *bufmask = nullptr; - LabImage *buforig = nullptr; - LabImage *buforigmas = nullptr; - int bfhr = bfh; - int bfwr = bfw; - - if (bfw >= mSP && bfh > mSP) { - if (lp.ftwreti) { - optfft(N_fftwsize, bfh, bfw, bfhr, bfwr, lp, original->H, original->W, xstart, ystart, xend, yend, cx, cy); - } - - array2D buflight(bfw, bfh); - JaggedArray bufchro(bfw, bfh); - - int Hd, Wd; - Hd = GH; - Wd = GW; - - if (!lp.invret && call == 2) { - - Hd = bfh; - Wd = bfw; - bufreti = new LabImage(bfw, bfh); - bufmask = new LabImage(bfw, bfh); - - if (!lp.enaretiMasktmap && lp.enaretiMask) { - buforig = new LabImage(bfw, bfh); - buforigmas = new LabImage(bfw, bfh); - } - -#ifdef _OPENMP - #pragma omp parallel for if (multiThread) -#endif - for (int ir = 0; ir < bfh; ir++) //fill with 0 - for (int jr = 0; jr < bfw; jr++) { - bufreti->L[ir][jr] = 0.f; - bufreti->a[ir][jr] = 0.f; - bufreti->b[ir][jr] = 0.f; - buflight[ir][jr] = 0.f; - bufchro[ir][jr] = 0.f; - } - - -#ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) if (multiThread) -#endif - for (int y = ystart; y < yend; y++) { - for (int x = xstart; x < xend; x++) { - bufreti->L[y - ystart][x - xstart] = original->L[y][x]; - bufreti->a[y - ystart][x - xstart] = original->a[y][x]; - bufreti->b[y - ystart][x - xstart] = original->b[y][x]; - bufmask->L[y - ystart][x - xstart] = original->L[y][x]; - bufmask->a[y - ystart][x - xstart] = original->a[y][x]; - bufmask->b[y - ystart][x - xstart] = original->b[y][x]; - - if (!lp.enaretiMasktmap && lp.enaretiMask) { - buforig->L[y - ystart][x - xstart] = original->L[y][x]; - buforig->a[y - ystart][x - xstart] = original->a[y][x]; - buforig->b[y - ystart][x - xstart] = original->b[y][x]; - } - } - } - } - - float raddE = params->locallab.spots.at(sp).softradiusret; - - //calc dE and reduction to use in MSR to reduce artifacts - const float mindE = 4.f + MINSCOPE * lp.sensh * lp.thr; - const float maxdE = 5.f + MAXSCOPE * lp.sensh * (1 + 0.1f * lp.thr); - const float mindElim = 2.f + MINSCOPE * limscope * lp.thr; - const float maxdElim = 5.f + MAXSCOPE * limscope * (1 + 0.1f * lp.thr); - const float refa = chromaref * cos(hueref); - const float refb = chromaref * sin(hueref); - - const std::unique_ptr> reducDEBuffer(new JaggedArray(Wd, Hd)); - float** reducDE = *(reducDEBuffer.get()); - float ade = 0.01f * raddE; - float bde = 100.f - raddE; - float sensibefore = ade * lp.sensh + bde;//we can change sensitivity 0.1 90 or 0.3 70 or 0.4 60 -#ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) if (multiThread) -#endif - for (int y = ystart; y < yend ; y++) { - for (int x = xstart; x < xend; x++) { - const float dE = std::sqrt(SQR(refa - bufreti->a[y - ystart][x - xstart] / 327.68f) + SQR(refb - bufreti->b[y - ystart][x - xstart] / 327.68f) + SQR(lumaref - bufreti->b[y - ystart][x - xstart] / 327.68f)); - const float reducdE = calcreducdE(dE, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sensibefore); - reducDE[y - ystart][x - xstart] = clipDE(reducdE); - } - } - - const std::unique_ptr> origBuffer(new JaggedArray(Wd, Hd)); - float** orig = *(origBuffer.get()); - - const std::unique_ptr> origBuffer1(new JaggedArray(Wd, Hd)); - float** orig1 = *(origBuffer1.get()); - - LabImage *tmpl = nullptr; - - if (!lp.invret && call == 2) { -#ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) if (multiThread) -#endif - for (int ir = 0; ir < Hd; ir += 1) { - for (int jr = 0; jr < Wd; jr += 1) { - orig[ir][jr] = bufreti->L[ir][jr]; - orig1[ir][jr] = bufreti->L[ir][jr]; - } - } - - tmpl = new LabImage(Wd, Hd); - } - - // float minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax; - bool fftw = lp.ftwreti; - //for Retinex Mask are incorporated in MSR - bool delt = params->locallab.spots.at(sp).deltae; - int sco = params->locallab.spots.at(sp).scopemask; - float lumask = params->locallab.spots.at(sp).lumask; - - const float mindE2 = 2.f + MINSCOPE * sco * lp.thr; - const float maxdE2 = 5.f + MAXSCOPE * sco * (1 + 0.1f * lp.thr); - const float mindElim2 = 2.f + MINSCOPE * limscope * lp.thr; - const float maxdElim2 = 5.f + MAXSCOPE * limscope * (1 + 0.1f * lp.thr); - - ImProcFunctions::MSRLocal(call, sp, fftw, 1, reducDE, bufreti, bufmask, buforig, buforigmas, orig, orig1, - Wd, Hd, bfwr, bfhr, params->locallab, sk, locRETgainCcurve, locRETtransCcurve, 0, 4, 1.f, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, - locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili, llretiMask, - lmaskretilocalcurve, localmaskretiutili, - transformed, lp.enaretiMasktmap, lp.enaretiMask, - delt, hueref, chromaref, lumaref, - maxdE2, mindE2, maxdElim2, mindElim2, lp.iterat, limscope, sco, lp.balance, lp.balanceh, lumask); - -#ifdef _OPENMP - #pragma omp parallel for if (multiThread) -#endif - for (int ir = 0; ir < Hd; ir += 1) - for (int jr = 0; jr < Wd; jr += 1) { - tmpl->L[ir][jr] = orig[ir][jr]; - } - - - if (lp.equret) { //equilibrate luminance before / after MSR - const std::unique_ptr datain(new float[Hd * Wd]); - const std::unique_ptr data(new float[Hd * Wd]); -#ifdef _OPENMP - #pragma omp parallel for if (multiThread) -#endif - for (int ir = 0; ir < Hd; ir += 1) { - for (int jr = 0; jr < Wd; jr += 1) { - datain[ir * Wd + jr] = orig1[ir][jr]; - data[ir * Wd + jr] = orig[ir][jr]; - } - } - - normalize_mean_dt(data.get(), datain.get(), Hd * Wd, 1.f, 1.f); -#ifdef _OPENMP - #pragma omp parallel for if (multiThread) -#endif - for (int ir = 0; ir < Hd; ir += 1) { - for (int jr = 0; jr < Wd; jr += 1) { - tmpl->L[ir][jr] = data[ir * Wd + jr]; - } - } - } - - if (!lp.invret) { - float minL = tmpl->L[0][0] - bufreti->L[0][0]; - float maxL = minL; -#ifdef _OPENMP - #pragma omp parallel for reduction(min:minL) reduction(max:maxL) schedule(dynamic,16) if (multiThread) -#endif - for (int ir = 0; ir < Hd; ir++) { - for (int jr = 0; jr < Wd; jr++) { - buflight[ir][jr] = tmpl->L[ir][jr] - bufreti->L[ir][jr]; - minL = rtengine::min(minL, buflight[ir][jr]); - maxL = rtengine::max(maxL, buflight[ir][jr]); - } - } - - float coef = 0.01f * rtengine::max(std::fabs(minL), std::fabs(maxL)); - - if (coef > 0.f) { - coef = 1.f / coef; -#ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) if (multiThread) -#endif - for (int ir = 0; ir < Hd; ir++) { - for (int jr = 0; jr < Wd; jr++) { - buflight[ir][jr] *= coef; - } - } - } - - transit_shapedetect_retinex(call, 4, bufreti, bufmask, buforigmas, buflight, bufchro, hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); - - if (params->locallab.spots.at(sp).recurs) { - original->CopyFrom(transformed, multiThread); - float avge; - calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); - } - } - - if (params->locallab.spots.at(sp).chrrt > 0) { - if (!lp.invret && call == 2) { -#ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) if (multiThread) -#endif - for (int ir = 0; ir < Hd; ir += 1) { - for (int jr = 0; jr < Wd; jr += 1) { - orig[ir][jr] = std::sqrt(SQR(bufreti->a[ir][jr]) + SQR(bufreti->b[ir][jr])); - orig1[ir][jr] = std::sqrt(SQR(bufreti->a[ir][jr]) + SQR(bufreti->b[ir][jr])); - } - } - } - - float maxChro = orig1[0][0]; -#ifdef _OPENMP - #pragma omp parallel for reduction(max:maxChro) schedule(dynamic,16) if (multiThread) -#endif - for (int ir = 0; ir < Hd; ir++) { - for (int jr = 0; jr < Wd; jr++) { - maxChro = rtengine::max(maxChro, orig1[ir][jr]); - } - } - - //first step change saturation without Retinex ==> gain of time and memory - float satreal = lp.str * params->locallab.spots.at(sp).chrrt / 100.f; - - if (params->locallab.spots.at(sp).chrrt <= 0.2f) { - satreal /= 10.f; - } - - DiagonalCurve reti_satur({ - DCT_NURBS, - 0, 0, - 0.2, 0.2 + satreal / 250.0, - 0.6, rtengine::min(1.0, 0.6 + satreal / 250.0), - 1, 1 - }); - - if (!lp.invret && call == 2) { - -#ifdef _OPENMP - #pragma omp parallel for if (multiThread) -#endif - for (int ir = 0; ir < Hd; ir += 1) { - for (int jr = 0; jr < Wd; jr += 1) { - const float Chprov = orig1[ir][jr]; - float2 sincosval; - sincosval.y = Chprov == 0.0f ? 1.f : bufreti->a[ir][jr] / Chprov; - sincosval.x = Chprov == 0.0f ? 0.f : bufreti->b[ir][jr] / Chprov; - - if (params->locallab.spots.at(sp).chrrt <= 40.f) { //first step - orig[ir][jr] = reti_satur.getVal(LIM01(orig[ir][jr] / maxChro)) * maxChro; - } - - tmpl->a[ir][jr] = orig[ir][jr] * sincosval.y; - tmpl->b[ir][jr] = orig[ir][jr] * sincosval.x; - } - } - - float minC = std::sqrt(SQR(tmpl->a[0][0]) + SQR(tmpl->b[0][0])) - orig1[0][0]; - float maxC = minC; -#ifdef _OPENMP - #pragma omp parallel for reduction(min:minC) reduction(max:maxC) schedule(dynamic,16) if (multiThread) -#endif - for (int ir = 0; ir < Hd; ir++) { - for (int jr = 0; jr < Wd; jr++) { - bufchro[ir][jr] = std::sqrt(SQR(tmpl->a[ir][jr]) + SQR(tmpl->b[ir][jr])) - orig1[ir][jr]; - minC = rtengine::min(minC, bufchro[ir][jr]); - maxC = rtengine::max(maxC, bufchro[ir][jr]); - } - } - - float coefC = 0.01f * rtengine::max(std::fabs(minC), std::fabs(maxC)); - - if (coefC > 0.f) { - coefC = 1.f / coefC; -#ifdef _OPENMP - #pragma omp parallel for if (multiThread) -#endif - for (int ir = 0; ir < Hd; ir++) { - for (int jr = 0; jr < Wd; jr++) { - bufchro[ir][jr] *= coefC; - } - } - } - } - - if (!lp.invret) { - transit_shapedetect_retinex(call, 5, tmpl, bufmask, buforigmas, buflight, bufchro, hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); - - if (params->locallab.spots.at(sp).recurs) { - original->CopyFrom(transformed, multiThread); - float avge; - calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); - } - } - } - - delete tmpl; - delete bufmask; - - if (!lp.enaretiMasktmap && lp.enaretiMask) { - if (buforig) { - delete buforig; - } - - if (buforigmas) { - delete buforigmas; - } - } - delete bufreti; - } - } - bool enablefat = false; - if (params->locallab.spots.at(sp).fatamount > 1.f) { + if (params->locallab.spots.at(sp).fatamount > 1.0) { enablefat = true;; } @@ -12717,8 +14760,6 @@ void ImProcFunctions::Lab_Local( float lap = params->locallab.spots.at(sp).lapmaskexp; bool pde = params->locallab.spots.at(sp).laplac; LocwavCurve dummy; - bool lmasutilicolwav = false; - bool delt = params->locallab.spots.at(sp).deltae; int sco = params->locallab.spots.at(sp).scopemask; int shado = 0; int shortcu = 0;//lp.mergemet; //params->locallab.spots.at(sp).shortc; @@ -12731,14 +14772,13 @@ void ImProcFunctions::Lab_Local( float anchorcd = 50.f; int lumask = params->locallab.spots.at(sp).lumask; LocHHmaskCurve lochhhmasCurve; - bool lhhmasutili = false; const int highl = 0; maskcalccol(false, pde, bfw, bfh, xstart, ystart, sk, cx, cy, bufexporig.get(), bufmaskblurexp.get(), originalmaskexp.get(), original, reserved, inv, lp, 0.f, false, - locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, lochhhmasCurve, lhhmasutili, multiThread, - enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmaskexplocalcurve, localmaskexputili, dummy, lmasutilicolwav, 1, 1, 5, 5, - shortcu, delt, hueref, chromaref, lumaref, + locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, lochhhmasCurve, false, multiThread, + enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmaskexplocalcurve, localmaskexputili, dummy, false, 1, 1, 5, 5, + shortcu, params->locallab.spots.at(sp).deltae, hueref, chromaref, lumaref, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco, false, 0.f, 0.f, 0 ); @@ -12767,24 +14807,29 @@ void ImProcFunctions::Lab_Local( if (exlocalcurve && localexutili) {// L=f(L) curve enhanced + #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread) #endif for (int ir = 0; ir < bfh; ir++) for (int jr = 0; jr < bfw; jr++) { - bufexpfin->L[ir][jr] = 0.5f * exlocalcurve[2.f * bufexporig->L[ir][jr]]; + bufexpfin->L[ir][jr] = 0.6f * bufexporig->L[ir][jr] + 0.2f * exlocalcurve[2.f * bufexporig->L[ir][jr]]; } - + if (lp.expcomp == 0.f) { lp.expcomp = 0.001f;// to enabled } - ImProcFunctions::exlabLocal(lp, bfh, bfw, bfhr, bfwr, bufexpfin.get(), bufexpfin.get(), hltonecurveloc, shtonecurveloc, tonecurveloc, hueref, lumaref, chromaref); + ImProcFunctions::exlabLocal(lp, 0.5f, bfh, bfw, bfhr, bfwr, bufexpfin.get(), bufexpfin.get(), hltonecurveloc, shtonecurveloc, tonecurveloc, hueref, lumaref, chromaref); + } else { - if (lp.expcomp != 0.f || lp.laplacexp > 0.1f) { - ImProcFunctions::exlabLocal(lp, bfh, bfw, bfhr, bfwr, bufexporig.get(), bufexpfin.get(), hltonecurveloc, shtonecurveloc, tonecurveloc, hueref, lumaref, chromaref); + if (lp.expcomp != 0.f ) { // || lp.laplacexp > 0.1f + if(lp.laplacexp <= 0.1f) { + lp.laplacexp = 0.2f; //force to use Laplacian wth very small values + } + ImProcFunctions::exlabLocal(lp, 1.f, bfh, bfw, bfhr, bfwr, bufexporig.get(), bufexpfin.get(), hltonecurveloc, shtonecurveloc, tonecurveloc, hueref, lumaref, chromaref); } } @@ -12816,36 +14861,18 @@ void ImProcFunctions::Lab_Local( datain[y * bfwr + x] = bufexpfin->L[y][x]; } } - FattalToneMappingParams fatParams; fatParams.enabled = true; fatParams.threshold = params->locallab.spots.at(sp).fatdetail; fatParams.amount = params->locallab.spots.at(sp).fatamount; fatParams.anchor = 50.f; //params->locallab.spots.at(sp).fatanchor; - const float sigm = params->locallab.spots.at(sp).fatlevel; - const float mean = params->locallab.spots.at(sp).fatanchor; + //const float sigm = 1.f; //params->locallab.spots.at(sp).fatlevel; + //const float mean = 1.f;// params->locallab.spots.at(sp).fatanchor; const std::unique_ptr tmpImagefat(new Imagefloat(bfwr, bfhr)); lab2rgb(*bufexpfin, *(tmpImagefat.get()), params->icm.workingProfile); ToneMapFattal02(tmpImagefat.get(), fatParams, 3, 0, nullptr, 0, 0, 1);//last parameter = 1 ==>ART algorithm rgb2lab(*(tmpImagefat.get()), *bufexpfin, params->icm.workingProfile); -#ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) if (multiThread) -#endif - for (int y = 0; y < bfhr; y++) { - for (int x = 0; x < bfwr; x++) { - dataout[y * bfwr + x] = bufexpfin->L[y][x]; - } - } - normalize_mean_dt(dataout.get(), datain.get(), bfwr * bfhr, mean, sigm); -#ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) if (multiThread) -#endif - for (int y = 0; y < bfhr; y++) { - for (int x = 0; x < bfwr; x++) { - bufexpfin->L[y][x] = dataout[y * bfwr + x]; - } - } } if (lp.laplacexp > 0.1f) { @@ -12944,11 +14971,21 @@ void ImProcFunctions::Lab_Local( if (lp.softradiusexp > 0.f && lp.expmet == 0) { softproc(buforig.get(), bufexpfin.get(), lp.softradiusexp, bfh, bfw, 0.1, 0.001, 0.5f, sk, multiThread, 1); } + + if(lp.enaExpMask && lp.recothre != 1.f) { + float hig = lp.higthre; + float low = lp.lowthre; + float recoth = lp.recothre; + float decay = lp.decaye; + bool invmask = false; + maskrecov(bufexpfin.get(), original, bufmaskblurexp.get(), bfh, bfw, ystart, xstart, hig, low, recoth, decay, invmask, sk, multiThread); + } + float meansob = 0.f; - transit_shapedetect2(call, 1, bufexporig.get(), bufexpfin.get(), originalmaskexp.get(), hueref, chromaref, lumaref, sobelref, meansob, blend2, lp, original, transformed, cx, cy, sk); + transit_shapedetect2(sp, 0.f, 0.f, call, 1, bufexporig.get(), bufexpfin.get(), originalmaskexp.get(), hueref, chromaref, lumaref, sobelref, meansob, blend2, lp, original, transformed, cx, cy, sk); } - if (params->locallab.spots.at(sp).recurs) { + if (lp.recur) { original->CopyFrom(transformed, multiThread); float avge; calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); @@ -12958,22 +14995,22 @@ void ImProcFunctions::Lab_Local( } //inverse - else if (lp.invex && (lp.expcomp != 0.0 || lp.laplacexp > 0.1f || lp.blac != 0 || lp.hlcomp > 0.f || lp.shadex > 0 || params->locallab.spots.at(sp).fatamount > 1.f || (exlocalcurve && localexutili) || lp.enaExpMaskinv || lp.showmaskexpmetinv == 1) && lp.exposena) { + else if (lp.invex && (lp.expcomp != 0.f || lp.laplacexp > 0.1f || lp.blac != 0 || lp.hlcomp > 0.f || lp.shadex > 0 || params->locallab.spots.at(sp).fatamount > 1.0 || (exlocalcurve && localexutili) || lp.enaExpMaskinv || lp.showmaskexpmetinv == 1) && lp.exposena) { constexpr float adjustr = 2.f; std::unique_ptr bufmaskblurexp; std::unique_ptr originalmaskexp; - const std::unique_ptr bufexporig(new LabImage(GW, GH)); + const std::unique_ptr bufexporig(new LabImage(TW, TH)); if (lp.enaExpMaskinv || lp.showmaskexpmetinv == 1) { - bufmaskblurexp.reset(new LabImage(GW, GH, true)); - originalmaskexp.reset(new LabImage(GW, GH)); + bufmaskblurexp.reset(new LabImage(TW, TH, true)); + originalmaskexp.reset(new LabImage(TW, TH)); } #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread) #endif - for (int y = 0; y < GH ; y++) { - for (int x = 0; x < GW; x++) { + for (int y = 0; y < TH ; y++) { + for (int x = 0; x < TW; x++) { bufexporig->L[y][x] = original->L[y][x]; } } @@ -12993,9 +15030,6 @@ void ImProcFunctions::Lab_Local( const float lap = params->locallab.spots.at(sp).lapmaskexp; const bool pde = params->locallab.spots.at(sp).laplac; LocwavCurve dummy; - const bool lmasutilicolwav = false; - // bool delt = params->locallab.spots.at(sp).deltae; - const bool delt = false; const int sco = params->locallab.spots.at(sp).scopemask; constexpr int shado = 0; constexpr int shortcu = 0;//lp.mergemet; //params->locallab.spots.at(sp).shortc; @@ -13008,19 +15042,18 @@ void ImProcFunctions::Lab_Local( constexpr float amountcd = 0.f; constexpr float anchorcd = 50.f; LocHHmaskCurve lochhhmasCurve; - constexpr bool lhhmasutili = false; const int highl = 0; - maskcalccol(false, pde, GW, GH, 0, 0, sk, cx, cy, bufexporig.get(), bufmaskblurexp.get(), originalmaskexp.get(), original, reserved, inv, lp, + maskcalccol(false, pde, TW, TH, 0, 0, sk, cx, cy, bufexporig.get(), bufmaskblurexp.get(), originalmaskexp.get(), original, reserved, inv, lp, 0.f, false, - locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, lochhhmasCurve, lhhmasutili, multiThread, - enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmaskexplocalcurve, localmaskexputili, dummy, lmasutilicolwav, 1, 1, 5, 5, - shortcu, delt, hueref, chromaref, lumaref, + locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, lochhhmasCurve, false, multiThread, + enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmaskexplocalcurve, localmaskexputili, dummy, false, 1, 1, 5, 5, + shortcu, false, hueref, chromaref, lumaref, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco, false, 0.f, 0.f, 0 ); if (lp.showmaskexpmetinv == 1) { - showmask(lumask, lp, 0, 0, cx, cy, GW, GH, bufexporig.get(), transformed, bufmaskblurexp.get(), inv); + showmask(lumask, lp, 0, 0, cx, cy, TW, TH, bufexporig.get(), transformed, bufmaskblurexp.get(), inv); return; } @@ -13030,7 +15063,6 @@ void ImProcFunctions::Lab_Local( } } - if (lp.hlcomp > 0.f) { if (lp.expcomp == 0.f) { lp.expcomp = 0.001f; // to enabled @@ -13039,7 +15071,7 @@ void ImProcFunctions::Lab_Local( InverseColorLight_Local(false, false, sp, 1, lp, originalmaskexp.get(), lightCurveloc, hltonecurveloc, shtonecurveloc, tonecurveloc, exlocalcurve, cclocalcurve, adjustr, localcutili, lllocalcurve, locallutili, original, transformed, cx, cy, hueref, chromaref, lumaref, sk); - if (params->locallab.spots.at(sp).recurs) { + if (lp.recur) { original->CopyFrom(transformed, multiThread); float avge; calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); @@ -13047,7 +15079,7 @@ void ImProcFunctions::Lab_Local( } //local color and light - const float factor = LocallabParams::LABGRIDL_CORR_MAX * 3.276f; + const float factor = LocallabParams::LABGRIDL_CORR_MAX * 3.276; const float scaling = LocallabParams::LABGRIDL_CORR_SCALE; const float scaledirect = LocallabParams::LABGRIDL_DIRECT_SCALE; const float a_scale = (lp.highA - lp.lowA) / factor / scaling; @@ -13056,10 +15088,7 @@ void ImProcFunctions::Lab_Local( const float b_base = lp.lowB / scaling; const bool ctoning = (a_scale != 0.f || b_scale != 0.f || a_base != 0.f || b_base != 0.f); const float a_scalemerg = (lp.highAmerg - lp.lowAmerg) / factor / scaling; - const float a_basemerg = lp.lowAmerg / scaling; const float b_scalemerg = (lp.highBmerg - lp.lowBmerg) / factor / scaling; - const float b_basemerg = lp.lowBmerg / scaling; - const bool ctoningmerg = (a_scalemerg != 0.f || b_scalemerg != 0.f || a_basemerg != 0.f || b_basemerg != 0.f); if (!lp.inv && (lp.chro != 0 || lp.ligh != 0.f || lp.cont != 0 || ctoning || lp.mergemet > 0 || lp.strcol != 0.f || lp.strcolab != 0.f || lp.qualcurvemet != 0 || lp.showmaskcolmet == 2 || lp.enaColorMask || lp.showmaskcolmet == 3 || lp.showmaskcolmet == 4 || lp.showmaskcolmet == 5 || lp.prevdE) && lp.colorena) { // || lllocalcurve)) { //interior ellipse renforced lightness and chroma //locallutili int ystart = rtengine::max(static_cast(lp.yc - lp.lyT) - cy, 0); @@ -13188,8 +15217,8 @@ void ImProcFunctions::Lab_Local( const int level_hr = params->locallab.spots.at(sp).csthresholdcol.getTopRight(); const int shortcu = lp.mergemet; //params->locallab.spots.at(sp).shortc; const int lumask = params->locallab.spots.at(sp).lumask; - const float strumask = 0.02f * params->locallab.spots.at(sp).strumaskcol; - float conthr = 0.01f * params->locallab.spots.at(sp).conthrcol; + const float strumask = 0.02 * params->locallab.spots.at(sp).strumaskcol; + float conthr = 0.01 * params->locallab.spots.at(sp).conthrcol; const float mercol = params->locallab.spots.at(sp).mercol; const float merlucol = params->locallab.spots.at(sp).merlucol; @@ -13215,7 +15244,7 @@ void ImProcFunctions::Lab_Local( maskcalccol(false, pde, bfw, bfh, xstart, ystart, sk, cx, cy, bufcolorig.get(), bufmaskblurcol.get(), originalmaskcol.get(), original, reserved, inv, lp, strumask, astool, - locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, lochhhmasCurve, lhhmasutili, multiThread, + locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, llochhhmasCurve, lhhmasutili, multiThread, enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmasklocalcurve, localmaskutili, loclmasCurvecolwav, lmasutilicolwav, level_bl, level_hl, level_br, level_hr, shortcu, delt, hueref, chromaref, lumaref, @@ -13350,7 +15379,7 @@ void ImProcFunctions::Lab_Local( bool HHcurve = false; if (lochhCurve && HHutili) { for (int i = 0; i < 500; i++) { - if (lochhCurve[i] != 0.5) { + if (lochhCurve[i] != 0.5f) { HHcurve = true; break; } @@ -13365,16 +15394,16 @@ void ImProcFunctions::Lab_Local( DiagonalCurve color_satur({ DCT_NURBS, 0, 0, - 0.2, 0.2 + satreal / 250.0, - 0.6, rtengine::min(1.0, 0.6 + satreal / 250.0), + 0.2, 0.2f + satreal / 250.f, + 0.6, rtengine::min(1.f, 0.6f + satreal / 250.f), 1, 1 }); DiagonalCurve color_saturmoins({ DCT_NURBS, 0, 0, - 0.1 - satreal / 150., 0.1, - rtengine::min(1.0, 0.7 - satreal / 300.), 0.7, + 0.1f - satreal / 150.f, 0.1f, + rtengine::min(1.f, 0.7f - satreal / 300.f), 0.7, 1, 1 }); @@ -13395,9 +15424,9 @@ void ImProcFunctions::Lab_Local( // 35000 must be globally good, more than 32768...and less than !! to avoid calculation min max if (lp.chro > 0.f) { - Chprov = color_satur.getVal(LIM01(Chprov / 35000.f)) * 35000.f; + Chprov = static_cast(color_satur.getVal(LIM01(Chprov / 35000.f))) * 35000.f; } else { - Chprov = color_saturmoins.getVal(LIM01(Chprov / 35000.f)) * 35000.f; + Chprov = static_cast(color_saturmoins.getVal(LIM01(Chprov / 35000.f))) * 35000.f; } if (lp.chro == -100.f) { @@ -13437,7 +15466,7 @@ void ImProcFunctions::Lab_Local( if (lochhCurve && HHcurve && lp.qualcurvemet != 0 && !ctoning) { // H=f(H) const float chromat = std::sqrt(SQR(bufcolcalca) + SQR(bufcolcalcb)); const float hhforcurv = xatan2f(bufcolcalcb, bufcolcalca); - const float valparam = 2.f * float ((lochhCurve[500.f * Color::huelab_to_huehsv2(hhforcurv)] - 0.5f)) + static_cast(hhforcurv); + const float valparam = 2.f * (lochhCurve[500.f * static_cast(Color::huelab_to_huehsv2(hhforcurv))] - 0.5f) + hhforcurv; float2 sincosval = xsincosf(valparam); bufcolcalca = chromat * sincosval.y; bufcolcalcb = chromat * sincosval.x; @@ -13454,7 +15483,7 @@ void ImProcFunctions::Lab_Local( if (loclhCurve && LHutili && lp.qualcurvemet != 0) {//L=f(H) curve const float rhue = xatan2f(bufcolcalcb, bufcolcalca); float l_r = bufcolcalcL / 32768.f; //Luminance Lab in 0..1 - const float valparam = loclhCurve[500.f * Color::huelab_to_huehsv2(rhue)] - 0.5f; //get l_r=f(H) + const float valparam = loclhCurve[500.f *static_cast(Color::huelab_to_huehsv2(rhue))] - 0.5f; //get l_r=f(H) if (valparam > 0.f) { l_r = (1.f - valparam) * l_r + valparam * (1.f - SQR(((SQR(1.f - rtengine::min(l_r, 1.0f)))))); @@ -13471,7 +15500,7 @@ void ImProcFunctions::Lab_Local( if (locchCurve && CHutili && lp.qualcurvemet != 0) {//C=f(H) curve const float rhue = xatan2f(bufcolcalcb, bufcolcalca); - const float valparam = locchCurve[500.f * Color::huelab_to_huehsv2(rhue)] - 0.5f; //get valp=f(H) + const float valparam = locchCurve[500.f * static_cast(Color::huelab_to_huehsv2(rhue))] - 0.5f; //get valp=f(H) float chromaChfactor = 1.0f + valparam; bufcolcalca *= chromaChfactor;//apply C=f(H) bufcolcalcb *= chromaChfactor; @@ -13497,10 +15526,6 @@ void ImProcFunctions::Lab_Local( } } - if (HHcurve && ctoning) {//not use ctoning and H(H) simultaneous but priority to ctoning - HHcurve = false; - } - if (!execcolor) {//if we don't use color and light sliders, curves except RGB #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread) @@ -13538,7 +15563,7 @@ void ImProcFunctions::Lab_Local( bufcolreserv->L[y][x] = lastorig->L[y + ystart][x + xstart]; bufcolreserv->a[y][x] = lastorig->a[y + ystart][x + xstart]; bufcolreserv->b[y][x] = lastorig->b[y + ystart][x + xstart]; - } else if (lp.mergemet == 4 && ctoningmerg) { + } else if (lp.mergemet == 4) { bufcolreserv->L[y][x] = merlucol * 327.68f; bufcolreserv->a[y][x] = 9.f * scaledirect * a_scalemerg; bufcolreserv->b[y][x] = 9.f * scaledirect * b_scalemerg; @@ -14017,7 +16042,7 @@ void ImProcFunctions::Lab_Local( softproc(bufcolreserv.get(), bufcolfin.get(), lp.softradiuscol, bfh, bfw, 0.001, 0.00001, 0.5f, sk, multiThread, 1); } float meansob = 0.f; - transit_shapedetect2(call, 0, bufcolreserv.get(), bufcolfin.get(), originalmaskcol.get(), hueref, chromaref, lumaref, sobelref, meansob, blend2, lp, original, transformed, cx, cy, sk); + transit_shapedetect2(sp, 0.f, 0.f, call, 0, bufcolreserv.get(), bufcolfin.get(), originalmaskcol.get(), hueref, chromaref, lumaref, sobelref, meansob, blend2, lp, original, transformed, cx, cy, sk); } if (!nottransit) { @@ -14089,13 +16114,23 @@ void ImProcFunctions::Lab_Local( if (lp.softradiuscol > 0.f) { softproc(bufcolorig.get(), bufcolfin.get(), lp.softradiuscol, bfh, bfw, 0.001, 0.00001, 0.5f, sk, multiThread, 1); } + //mask recovery + + if(lp.enaColorMask && lp.recothrc != 1.f) { + float hig = lp.higthrc; + float low = lp.lowthrc; + float recoth = lp.recothrc; + float decay = lp.decayc; + bool invmask = false; + maskrecov(bufcolfin.get(), original, bufmaskblurcol.get(), bfh, bfw, ystart, xstart, hig, low, recoth, decay, invmask, sk, multiThread); + } float meansob = 0.f; - transit_shapedetect2(call, 0, bufcolorig.get(), bufcolfin.get(), originalmaskcol.get(), hueref, chromaref, lumaref, sobelref, meansob, blend2, lp, original, transformed, cx, cy, sk); + transit_shapedetect2(sp, 0.f, 0.f, call, 0, bufcolorig.get(), bufcolfin.get(), originalmaskcol.get(), hueref, chromaref, lumaref, sobelref, meansob, blend2, lp, original, transformed, cx, cy, sk); } } - if (params->locallab.spots.at(sp).recurs) { + if (lp.recur) { original->CopyFrom(transformed, multiThread); float avge; calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); @@ -14128,18 +16163,18 @@ void ImProcFunctions::Lab_Local( std::unique_ptr bufmaskblurcol; std::unique_ptr originalmaskcol; - const std::unique_ptr bufcolorig(new LabImage(GW, GH)); + const std::unique_ptr bufcolorig(new LabImage(TW, TH)); if (lp.enaColorMaskinv || lp.showmaskcolmetinv == 1) { - bufmaskblurcol.reset(new LabImage(GW, GH, true)); - originalmaskcol.reset(new LabImage(GW, GH)); + bufmaskblurcol.reset(new LabImage(TW, TH, true)); + originalmaskcol.reset(new LabImage(TW, TH)); } #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread) #endif - for (int y = 0; y < GH ; y++) { - for (int x = 0; x < GW; x++) { + for (int y = 0; y < TH ; y++) { + for (int x = 0; x < TW; x++) { bufcolorig->L[y][x] = original->L[y][x]; } } @@ -14167,7 +16202,7 @@ void ImProcFunctions::Lab_Local( int sco = params->locallab.spots.at(sp).scopemask; int shortcu = lp.mergemet; //params->locallab.spots.at(sp).shortc; int lumask = params->locallab.spots.at(sp).lumask; - float strumask = 0.02f * params->locallab.spots.at(sp).strumaskcol; + float strumask = 0.02 * params->locallab.spots.at(sp).strumaskcol; const float mindE = 2.f + MINSCOPE * sco * lp.thr; const float maxdE = 5.f + MAXSCOPE * sco * (1 + 0.1f * lp.thr); @@ -14177,9 +16212,9 @@ void ImProcFunctions::Lab_Local( constexpr float anchorcd = 50.f; const int highl = 0; - maskcalccol(false, pde, GW, GH, 0, 0, sk, cx, cy, bufcolorig.get(), bufmaskblurcol.get(), originalmaskcol.get(), original, reserved, inv, lp, + maskcalccol(false, pde, TW, TH, 0, 0, sk, cx, cy, bufcolorig.get(), bufmaskblurcol.get(), originalmaskcol.get(), original, reserved, inv, lp, strumask, params->locallab.spots.at(sp).toolcol, - locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, lochhhmasCurve, lhhmasutili, multiThread, + locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, llochhhmasCurve, lhhmasutili, multiThread, enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, blendm, shado, highl, amountcd, anchorcd, lmasklocalcurve, localmaskutili, loclmasCurvecolwav, lmasutilicolwav, level_bl, level_hl, level_br, level_hr, shortcu, false, hueref, chromaref, lumaref, @@ -14187,14 +16222,14 @@ void ImProcFunctions::Lab_Local( ); if (lp.showmaskcolmetinv == 1) { - showmask(lumask, lp, 0, 0, cx, cy, GW, GH, bufcolorig.get(), transformed, bufmaskblurcol.get(), inv); + showmask(lumask, lp, 0, 0, cx, cy, TW, TH, bufcolorig.get(), transformed, bufmaskblurcol.get(), inv); return; } if (lp.showmaskcolmetinv == 0 || lp.enaColorMaskinv) { InverseColorLight_Local(false, false, sp, 0, lp, originalmaskcol.get(), lightCurveloc, hltonecurveloc, shtonecurveloc, tonecurveloc, exlocalcurve, cclocalcurve, adjustr, localcutili, lllocalcurve, locallutili, original, transformed, cx, cy, hueref, chromaref, lumaref, sk); - if (params->locallab.spots.at(sp).recurs) { + if (lp.recur) { original->CopyFrom(transformed, multiThread); float avge; calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); @@ -14287,7 +16322,7 @@ void ImProcFunctions::Lab_Local( const int level_hr = params->locallab.spots.at(sp).csthresholdmask.getTopRight(); const int shortcu = lp.mergemet; //params->locallab.spots.at(sp).shortc; const int lumask = params->locallab.spots.at(sp).lumask; - const float strumask = 0.02f * params->locallab.spots.at(sp).strumaskmask; + const float strumask = 0.02 * params->locallab.spots.at(sp).strumaskmask; const float softr = params->locallab.spots.at(sp).softradiusmask; const float mindE = 2.f + MINSCOPE * sco * lp.thr; @@ -14329,17 +16364,16 @@ void ImProcFunctions::Lab_Local( } } if (softr != 0.f) {//soft for L a b because we change color... - float rad = softr; - const float tmpblur = rad < 0.f ? -1.f / rad : 1.f + rad; - const int r1 = rtengine::max(4 / sk * tmpblur + 0.5, 1); - const int r2 = rtengine::max(25 / sk * tmpblur + 0.5, 1); + const float tmpblur = softr < 0.f ? -1.f / softr : 1.f + softr; + const int r1 = rtengine::max(4 / sk * tmpblur + 0.5f, 1); + const int r2 = rtengine::max(25 / sk * tmpblur + 0.5f, 1); constexpr float epsilmax = 0.005f; constexpr float epsilmin = 0.00001f; constexpr float aepsil = (epsilmax - epsilmin) / 100.f; constexpr float bepsil = epsilmin; - const float epsil = rad < 0.f ? 0.001f : aepsil * rad + bepsil; + const float epsil = softr < 0.f ? 0.001f : aepsil * softr + bepsil; rtengine::guidedFilter(guid, blechro, blechro, r1, epsil, multiThread); rtengine::guidedFilter(guid, ble, ble, r2, 0.2f * epsil, multiThread); @@ -14360,11 +16394,11 @@ void ImProcFunctions::Lab_Local( float meansob = 0.f; - transit_shapedetect2(call, 20, bufcolorigsav.get(), bufcolfin.get(), originalmaskcol.get(), hueref, chromaref, lumaref, sobelref, meansob, nullptr, lp, origsav, transformed, cx, cy, sk); + transit_shapedetect2(sp, 0.f, 0.f, call, 20, bufcolorigsav.get(), bufcolfin.get(), originalmaskcol.get(), hueref, chromaref, lumaref, sobelref, meansob, nullptr, lp, origsav, transformed, cx, cy, sk); delete origsav; origsav = NULL; - if (params->locallab.spots.at(sp).recurs) { + if (lp.recur) { original->CopyFrom(transformed, multiThread); float avge; calc_ref(sp, original, transformed, 0, 0, original->W, original->H, sk, huerefblur, chromarefblur, lumarefblur, hueref, chromaref, lumaref, sobelref, avge, locwavCurveden, locwavdenutili); @@ -14377,157 +16411,7 @@ void ImProcFunctions::Lab_Local( //end common mask // Gamut and Munsell control - very important do not deactivated to avoid crash - if (params->locallab.spots.at(sp).avoid) { - const float ach = lp.trans / 100.f; - - TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix(params->icm.workingProfile); - const float wip[3][3] = { - {static_cast(wiprof[0][0]), static_cast(wiprof[0][1]), static_cast(wiprof[0][2])}, - {static_cast(wiprof[1][0]), static_cast(wiprof[1][1]), static_cast(wiprof[1][2])}, - {static_cast(wiprof[2][0]), static_cast(wiprof[2][1]), static_cast(wiprof[2][2])} - }; - const bool highlight = params->toneCurve.hrenabled; - const bool needHH = (lp.chro != 0.f); -#ifdef _OPENMP - #pragma omp parallel if (multiThread) -#endif - { -#ifdef __SSE2__ - float atan2Buffer[transformed->W] ALIGNED16; - float sqrtBuffer[transformed->W] ALIGNED16; - float sincosyBuffer[transformed->W] ALIGNED16; - float sincosxBuffer[transformed->W] ALIGNED16; - vfloat c327d68v = F2V(327.68f); - vfloat onev = F2V(1.f); -#endif - -#ifdef _OPENMP - #pragma omp for schedule(dynamic,16) -#endif - for (int y = 0; y < transformed->H; y++) { - const int loy = cy + y; - const bool isZone0 = loy > lp.yc + lp.ly || loy < lp.yc - lp.lyT; // whole line is zone 0 => we can skip a lot of processing - - if (isZone0) { // outside selection and outside transition zone => no effect, keep original values - continue; - } - -#ifdef __SSE2__ - int i = 0; - - for (; i < transformed->W - 3; i += 4) { - vfloat av = LVFU(transformed->a[y][i]); - vfloat bv = LVFU(transformed->b[y][i]); - - if (needHH) { // only do expensive atan2 calculation if needed - STVF(atan2Buffer[i], xatan2f(bv, av)); - } - - vfloat Chprov1v = vsqrtf(SQRV(bv) + SQRV(av)); - STVF(sqrtBuffer[i], Chprov1v / c327d68v); - vfloat sincosyv = av / Chprov1v; - vfloat sincosxv = bv / Chprov1v; - vmask selmask = vmaskf_eq(Chprov1v, ZEROV); - sincosyv = vself(selmask, onev, sincosyv); - sincosxv = vselfnotzero(selmask, sincosxv); - STVF(sincosyBuffer[i], sincosyv); - STVF(sincosxBuffer[i], sincosxv); - } - - for (; i < transformed->W; i++) { - float aa = transformed->a[y][i]; - float bb = transformed->b[y][i]; - - if (needHH) { // only do expensive atan2 calculation if needed - atan2Buffer[i] = xatan2f(bb, aa); - } - - float Chprov1 = std::sqrt(SQR(bb) + SQR(aa)); - sqrtBuffer[i] = Chprov1 / 327.68f; - - if (Chprov1 == 0.0f) { - sincosyBuffer[i] = 1.f; - sincosxBuffer[i] = 0.0f; - } else { - sincosyBuffer[i] = aa / Chprov1; - sincosxBuffer[i] = bb / Chprov1; - } - } - -#endif - - for (int x = 0; x < transformed->W; x++) { - int lox = cx + x; - int zone; - float localFactor = 1.f; - - if (lp.shapmet == 0) { - calcTransition(lox, loy, ach, lp, zone, localFactor); - } else /*if (lp.shapmet == 1)*/ { - calcTransitionrect(lox, loy, ach, lp, zone, localFactor); - } - - if (zone == 0) { // outside selection and outside transition zone => no effect, keep original values - continue; - } - - float Lprov1 = transformed->L[y][x] / 327.68f; - float2 sincosval; -#ifdef __SSE2__ - float HH = atan2Buffer[x]; // reading HH from line buffer even if line buffer is not filled is faster than branching - float Chprov1 = sqrtBuffer[x]; - sincosval.y = sincosyBuffer[x]; - sincosval.x = sincosxBuffer[x]; - float chr = 0.f; - -#else - const float aa = transformed->a[y][x]; - const float bb = transformed->b[y][x]; - float HH = 0.f, chr = 0.f; - - if (needHH) { // only do expensive atan2 calculation if needed - HH = xatan2f(bb, aa); - } - - float Chprov1 = std::sqrt(SQR(aa) + SQR(bb)) / 327.68f; - - 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 - - Color::pregamutlab(Lprov1, HH, chr); - Chprov1 = rtengine::min(Chprov1, chr); - Color::gamutLchonly(sincosval, Lprov1, Chprov1, wip, highlight, 0.15f, 0.92f); - transformed->L[y][x] = Lprov1 * 327.68f; - transformed->a[y][x] = 327.68f * Chprov1 * sincosval.y; - transformed->b[y][x] = 327.68f * Chprov1 * sincosval.x; - - if (needHH) { - const float Lprov2 = original->L[y][x] / 327.68f; - float correctionHue = 0.f; // Munsell's correction - float correctlum = 0.f; - const float memChprov = std::sqrt(SQR(original->a[y][x]) + SQR(original->b[y][x])) / 327.68f; - float Chprov = std::sqrt(SQR(transformed->a[y][x]) + SQR(transformed->b[y][x])) / 327.68f; - Color::AllMunsellLch(true, Lprov1, Lprov2, HH, Chprov, memChprov, correctionHue, correctlum); - - if (std::fabs(correctionHue) < 0.015f) { - HH += correctlum; // correct only if correct Munsell chroma very little. - } - - sincosval = xsincosf(HH + correctionHue); - transformed->a[y][x] = 327.68f * Chprov * sincosval.y; // apply Munsell - transformed->b[y][x] = 327.68f * Chprov * sincosval.x; - } - } - } - } - } - + avoidcolshi(lp, sp, original, transformed, cy, cx, sk); } } diff --git a/rtengine/ipretinex.cc b/rtengine/ipretinex.cc index d65bf1cad..67db52e55 100644 --- a/rtengine/ipretinex.cc +++ b/rtengine/ipretinex.cc @@ -55,6 +55,7 @@ #define BENCHMARK #include "StopWatch.h" #include "guidedfilter.h" +#include "boxblur.h" #define clipretinex( val, minv, maxv ) (( val = (val < minv ? minv : val ) ) > maxv ? maxv : val ) #define CLIPLOC(x) LIM(x,0.f,32767.f) @@ -782,7 +783,7 @@ void ImProcFunctions::maskforretinex(int sp, int before, float ** luminance, flo const LocCCmaskCurve & locccmasretiCurve, bool lcmasretiutili, const LocLLmaskCurve & locllmasretiCurve, bool llmasretiutili, const LocHHmaskCurve & lochhmasretiCurve, bool lhmasretiutili, int llretiMask, bool retiMasktmap, bool retiMask, float rad, float lap, bool pde, float gamm, float slop, float chro, float blend, const LUTf & lmaskretilocalcurve, bool localmaskretiutili, - LabImage * bufreti, LabImage * bufmask, LabImage * buforig, LabImage * buforigmas, bool multiThread, + LabImage * bufreti, LabImage * bufmask, LabImage * buforig, LabImage * buforigmas, LabImage * bufmaskorigreti, bool multiThread, bool delt, const float hueref, const float chromaref, const float lumaref, float maxdE, float mindE, float maxdElim, float mindElim, float iterat, float limscope, int scope, float balance, float balanceh, float lumask) { @@ -793,11 +794,10 @@ void ImProcFunctions::maskforretinex(int sp, int before, float ** luminance, flo array2D guid(W_L, H_L); std::unique_ptr bufmaskblurreti; bufmaskblurreti.reset(new LabImage(W_L, H_L)); - std::unique_ptr bufmaskorigreti; - bufmaskorigreti.reset(new LabImage(W_L, H_L)); +// std::unique_ptr bufmaskorigreti; +// bufmaskorigreti.reset(new LabImage(W_L, H_L)); std::unique_ptr bufprov; bufprov.reset(new LabImage(W_L, H_L)); - #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) #endif @@ -964,6 +964,33 @@ void ImProcFunctions::maskforretinex(int sp, int before, float ** luminance, flo } } + if (lap > 0.f && pde) { + array2D mask; + mask(W_L, H_L); + float amount = LIM01(float(lap)/100.f); + array2D LL(W_L, H_L, bufreti->L, ARRAY2D_BYREFERENCE); + ImProcFunctions::laplacian(LL, mask, W_L, H_L, 25.f, 20000.f, amount, false); +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + for (int i = 0; i < H_L; ++i) { + for (int j = 0; j < W_L; ++j) { + mask[i][j] = LIM01(mask[i][j]); + } + } + for (int i = 0; i < 3; ++i) { + boxblur(static_cast(mask), static_cast(mask), 5 / skip, W_L, H_L, false); + } +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + for (int i = 0; i < H_L; ++i) { + for (int j = 0; j < W_L; ++j) { + bufmaskblurreti->L[i][j] += CLIPLOC(100000.f * (mask[i][j]));//increase strongly result + } + } + } + if (delt) { float *rdE[H_L] ALIGNED16; @@ -995,7 +1022,7 @@ void ImProcFunctions::maskforretinex(int sp, int before, float ** luminance, flo } - +/* if (lap > 0.f) { float *datain = new float[H_L * W_L]; float *data_tmp = new float[H_L * W_L]; @@ -1030,7 +1057,7 @@ void ImProcFunctions::maskforretinex(int sp, int before, float ** luminance, flo delete [] data_tmp; } - +*/ //blend #ifdef _OPENMP #pragma omp parallel @@ -1124,7 +1151,7 @@ void ImProcFunctions::maskforretinex(int sp, int before, float ** luminance, flo -void ImProcFunctions::MSRLocal(int call, int sp, bool fftw, int lum, float** reducDE, LabImage * bufreti, LabImage * bufmask, LabImage * buforig, LabImage * buforigmas, float** luminance, const float* const *originalLuminance, +void ImProcFunctions::MSRLocal(int call, int sp, bool fftw, int lum, float** reducDE, LabImage * bufreti, LabImage * bufmask, LabImage * buforig, LabImage * buforigmas, LabImage * bufmaskorigreti, float** luminance, const float* const *originalLuminance, const int width, const int height, int bfwr, int bfhr, const procparams::LocallabParams &loc, const int skip, const LocretigainCurve &locRETgainCcurve, const LocretitransCurve &locRETtransCcurve, const int chrome, const int scall, const float krad, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, const LocCCmaskCurve & locccmasretiCurve, bool lcmasretiutili, const LocLLmaskCurve & locllmasretiCurve, bool llmasretiutili, const LocHHmaskCurve & lochhmasretiCurve, bool lhmasretiutili, int llretiMask, @@ -1614,7 +1641,7 @@ void ImProcFunctions::MSRLocal(int call, int sp, bool fftw, int lum, float** red locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili, llretiMask, retiMasktmap, retiMask, rad, lap, pde, gamm, slop, chro, blend, lmaskretilocalcurve, localmaskretiutili, - bufreti, bufmask, buforig, buforigmas, multiThread, + bufreti, bufmask, buforig, buforigmas, bufmaskorigreti, multiThread, delt, hueref, chromaref, lumaref, maxdE, mindE, maxdElim, mindElim, iterat, limscope, scope, balance, balanceh, lumask ); diff --git a/rtengine/ipsharpen.cc b/rtengine/ipsharpen.cc index afe6f8aa3..96d42e336 100644 --- a/rtengine/ipsharpen.cc +++ b/rtengine/ipsharpen.cc @@ -543,8 +543,8 @@ BENCHFUN // calculate contrast based blend factors to reduce sharpening in regions with low contrast JaggedArray blend(W, H); - float contrast = params->sharpenMicro.contrast / 100.0; - buildBlendMask(luminance, blend, W, H, contrast); + float contrastThreshold = params->sharpenMicro.contrast / 100.0; + buildBlendMask(luminance, blend, W, H, contrastThreshold); #ifdef _OPENMP #pragma omp parallel diff --git a/rtengine/ipwavelet.cc b/rtengine/ipwavelet.cc index 613e74723..caec5ec22 100644 --- a/rtengine/ipwavelet.cc +++ b/rtengine/ipwavelet.cc @@ -578,7 +578,6 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const cp.chromfi = 0.1f * waparams.chromfi; cp.chromco = 0.1f * waparams.chromco; cp.ballum = waparams.ballum; - cp.conres = waparams.rescon; cp.conresH = waparams.resconH; cp.radius = waparams.radius; @@ -1041,13 +1040,13 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const } - if (!exblurL && cp.contrast == 0.f && cp.blurres == 0.f && !cp.tonemap && !cp.resena && !cp.chromena && !cp.finena && !cp.edgeena && cp.conres == 0.f && cp.conresH == 0.f && cp.val == 0 && !ref0 && params->wavelet.CLmethod == "all") { // no processing of residual L or edge=> we probably can reduce the number of levels + if (!exblurL && cp.contrast == 0.f && cp.blurres == 0.f && !cp.noiseena && !cp.tonemap && !cp.resena && !cp.chromena && !cp.toningena && !cp.finena && !cp.edgeena && cp.conres == 0.f && cp.conresH == 0.f && cp.val == 0 && !ref0 && params->wavelet.CLmethod == "all") { // no processing of residual L or edge=> we probably can reduce the number of levels while (levwavL > 0 && cp.mul[levwavL - 1] == 0.f) { // cp.mul[level] == 0.f means no changes to level levwavL--; } } - if (levwavL == 6 && cp.noiseena) { + if (levwavL == 6 && cp.noiseena && cp.chromfi == 0.f) { cp.chromfi = 0.01f; } @@ -1056,6 +1055,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const levwavL = 7; } } + bool isdenoisL = (cp.lev0n > 0.1f || cp.lev1n > 0.1f || cp.lev2n > 0.1f || cp.lev3n > 0.1f || cp.lev4n > 0.1f); if (levwavL < 5 && cp.noiseena) { levwavL = 6; //to allow edge and denoise => I always allocate 3 (4) levels..because if user select wavelet it is to do something !! @@ -1103,7 +1103,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const madL[lvl][dir - 1] = SQR(Mad(WavCoeffs_L[dir], Wlvl_L * Hlvl_L)); if (settings->verbose) { - printf("Luminance noise estimate (sqr) madL=%.0f lvl=%i dir=%i\n", madL[lvl][dir - 1], lvl, dir - 1); + // printf("Luminance noise estimate (sqr) madL=%.0f lvl=%i dir=%i\n", madL[lvl][dir - 1], lvl, dir - 1); } } } @@ -1160,7 +1160,6 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const } else { kr4 = 1.f; } - if ((cp.lev0n > 0.1f || cp.lev1n > 0.1f || cp.lev2n > 0.1f || cp.lev3n > 0.1f || cp.lev4n > 0.1f) && cp.noiseena) { int edge = 6; vari[0] = rtengine::max(0.000001f, vari[0]); @@ -1183,30 +1182,28 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const float* noisevarhue = new float[GHL * GWL]; int GW2L = (GWL + 1) / 2; - float nvlh[13] = {1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 0.7f, 0.5f}; //high value - float nvll[13] = {0.1f, 0.15f, 0.2f, 0.25f, 0.3f, 0.35f, 0.4f, 0.45f, 0.7f, 0.8f, 1.f, 1.f, 1.f}; //low value + constexpr float nvlh[13] = {1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 0.7f, 0.5f}; //high value + constexpr float nvll[13] = {0.1f, 0.15f, 0.2f, 0.25f, 0.3f, 0.35f, 0.4f, 0.45f, 0.7f, 0.8f, 1.f, 1.f, 1.f}; //low value - float seuillow = 3000.f;//low - float seuilhigh = 18000.f;//high - int i = 10 - cp.ballum; - float ac = (nvlh[i] - nvll[i]) / (seuillow - seuilhigh); - float bc = nvlh[i] - seuillow * ac; + constexpr float seuillow = 3000.f;//low + constexpr float seuilhigh = 18000.f;//high + const int index = 10 - cp.ballum; + const float ac = (nvlh[index] - nvll[index]) / (seuillow - seuilhigh); + const float bc = nvlh[index] - seuillow * ac; #ifdef _OPENMP #pragma omp parallel for - #endif - for (int ir = 0; ir < GHL; ir++) for (int jr = 0; jr < GWL; jr++) { float lN = labco->L[ir][jr]; if (lN < seuillow) { - noisevarlum[(ir >> 1)*GW2L + (jr >> 1)] = nvlh[i]; + noisevarlum[(ir >> 1)*GW2L + (jr >> 1)] = nvlh[index]; } else if (lN < seuilhigh) { noisevarlum[(ir >> 1)*GW2L + (jr >> 1)] = ac * lN + bc; } else { - noisevarlum[(ir >> 1)*GW2L + (jr >> 1)] = nvll[i]; + noisevarlum[(ir >> 1)*GW2L + (jr >> 1)] = nvll[index]; } } @@ -1227,12 +1224,12 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const if(cp.quamet == 0) { if (settings->verbose) { - printf("denoise standard\n"); + printf("denoise standard L\n"); } WaveletDenoiseAllL(*Ldecomp, noisevarlum, madL, vari, edge, 1); } else { if (settings->verbose) { - printf("denoise bishrink\n"); + printf("denoise bishrink L\n"); } WaveletDenoiseAll_BiShrinkL(*Ldecomp, noisevarlum, madL, vari, edge, 1); @@ -1329,19 +1326,16 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const } } // } - if (execut && exitifzero) { + if (execut && exitifzero) { for (int dir = 1; dir < 4; dir++) { for (int level = 0; level < levref; level++) { - int Wlvl_L = Ldecomp->level_W(level); - int Hlvl_L = Ldecomp->level_H(level); - float* const* WavCoeffs_L = Ldecomp->level_coeffs(level);//first decomp denoised - float* const* WavCoeffs_L2 = Ldecomp2->level_coeffs(level);//second decomp before denoise - int k4 = 3; - int k5 = 3; - if(cp.complex == 1){ - k4= 4; - k5= 5; - } + const int Wlvl_L = Ldecomp->level_W(level); + const int Hlvl_L = Ldecomp->level_H(level); + const float* const WavCoeffs_L = Ldecomp->level_coeffs(level)[dir];//first decomp denoised + const float* const WavCoeffs_L2 = Ldecomp2->level_coeffs(level)[dir];//second decomp before denoise + const int k4 = cp.complex == 1 ? 4 : 3; + const int k5 = cp.complex == 1 ? 5 : 3; + auto WavL0 = Ldecomp->level_coeffs(0)[dir]; auto WavL1 = Ldecomp->level_coeffs(1)[dir]; auto WavL2 = Ldecomp->level_coeffs(2)[dir]; @@ -1360,134 +1354,95 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const } //find local contrast - float tempmean = 0.f; - float tempsig = 0.f; - float tempmax = 0.f; - if(cp.mixmet == 0){ - tempmean = mean[level]; - tempsig = sigma[level]; - tempmax = MaxP[level]; - } else if(cp.mixmet == 1){ - tempmean = 0.5f * mean[level] + 0.5f * meand[level] ; - tempsig = 0.5f * sigma[level] + 0.5f * sigmad[level] ; - tempmax = 0.5f * MaxP[level] + 0.5f * MaxPd[level] ; - } else if(cp.mixmet == 2){ - tempmean = 0.3f * mean[level] + 0.7f * meand[level] ; - tempsig = 0.3f * sigma[level] + 0.7f * sigmad[level] ; - tempmax = 0.3f * MaxP[level] + 0.7f * MaxPd[level] ; - } else if(cp.mixmet == 3){ - tempmean = meand[level]; - tempsig = sigmad[level]; - tempmax = MaxPd[level]; - } - + constexpr float weights[4] = {0.f, 0.5f, 0.7f, 1.f}; + const float weightL = weights[rtengine::LIM(cp.mixmet, 0, 3)]; + const float tempmean = intp(weightL, meand[level], mean[level]); + const float tempsig = intp(weightL, sigmad[level], sigma[level]); + const float tempmax = intp(weightL, MaxPd[level], MaxP[level]); + if (MaxP[level] > 0.f && mean[level] != 0.f && sigma[level] != 0.f) { //curve - float insigma = 0.666f; //SD - float logmax = log(tempmax); //log Max + constexpr float insigma = 0.666f; //SD + const float logmax = log(tempmax); //log Max //cp.sigmm change the "wider" of sigma - float rapX = (tempmean + siglh[level] * tempsig) / (tempmax); //rapport between sD / max - float inx = log(insigma); - float iny = log(rapX); - float rap = inx / iny; //koef - float asig = 0.166f / (tempsig * siglh[level]); - float bsig = 0.5f - asig * tempmean; - float amean = 0.5f / (tempmean); + const float rapX = (tempmean + siglh[level] * tempsig) / tempmax; //rapport between sD / max + const float inx = log(insigma); + const float iny = log(rapX); + const float rap = inx / iny; //koef + const float asig = 0.166f / (tempsig * siglh[level]); + const float bsig = 0.5f - asig * tempmean; + const float amean = 1.f / tempmean; + + //equalizer for levels 0 1 and 3... 1.33 and 0.75 arbitrary values + float kcFactor = 1.f; + if(cp.denmet == 1) { + if(level == 0 || level == 3) { + kcFactor = 1.7f; + } + } else if(cp.denmet == 2) { + if(level == 0 || level == 3) { + kcFactor = 0.3f; + } + } else if(cp.denmet == 3) { + if(level == 0 || level == 1) { + kcFactor = 1.7f; + } + } else if(cp.denmet == 4) { + if(level == 0 || level == 1) { + kcFactor = 0.3f; + } + } + const float k = 1.f / (siglh[level] > 1.f ? SQR(siglh[level]) : siglh[level]); + const float maxVal = tempmean + siglh[level] * tempsig; #ifdef _OPENMP - #pragma omp parallel for schedule(dynamic, Wlvl_L * 16) num_threads(wavNestedLevels) if (wavNestedLevels>1) + #pragma omp parallel for schedule(dynamic, Wlvl_L * 16) num_threads(wavNestedLevels) if (wavNestedLevels>1) #endif - for (int i = 0; i < Wlvl_L * Hlvl_L; i++) { float absciss; - float tempwav = 0.f; - if(cp.mixmet == 0){ - tempwav = WavCoeffs_L2[dir][i]; - } else if(cp.mixmet == 1){ - tempwav = 0.5f * WavCoeffs_L[dir][i] + 0.5f * WavCoeffs_L2[dir][i]; - } else if(cp.mixmet == 2){ - tempwav = 0.7f * WavCoeffs_L[dir][i] + 0.3f * WavCoeffs_L2[dir][i]; - } else if(cp.mixmet == 3){ - tempwav = WavCoeffs_L[dir][i]; + const float tempwav = std::fabs(intp(weightL, WavCoeffs_L[i], WavCoeffs_L2[i])); + + if (tempwav >= maxVal) { //for max + absciss = xexpf((xlogf(tempwav) - logmax) * rap); + } else if (tempwav >= tempmean) { + absciss = asig * tempwav + bsig; + } else { + absciss = 0.5f * pow_F(amean * tempwav, k); } - if (std::fabs(tempwav) >= (tempmean + siglh[level] * tempsig)) { //for max - float valcour = xlogf(std::fabs(tempwav)); - float valc = valcour - logmax; - float vald = valc * rap; - absciss = xexpf(vald); - } else if (std::fabs(tempwav) >= tempmean) { - absciss = asig * std::fabs(tempwav) + bsig; - } else { - absciss = amean * std::fabs(tempwav); - float k = siglh[level]; - if(siglh[level] > 1.f) { - k = SQR(siglh[level]); - } - float abs = pow(2.f * absciss, (1.f / k)); - absciss = 0.5f * abs; - } - float kc = 0.f; - if(cp.slimet == 0) { - kc = wavlow.getVal(absciss) -1.f; + float kc; + if (cp.slimet == 0) { + kc = wavlow.getVal(absciss) - 1.f; } else { kc = wavdenoise[absciss * 500.f] - 1.f; } - - float kchigh = 0.f; - kchigh = wavhigh.getVal(absciss) -1.f; - kchigh = -SQR(kchigh); - - float kcmed = 0.f; - kcmed = wavmed.getVal(absciss) -1.f; - kcmed = -SQR(kcmed); - - if(kc < 0) { - kc = -SQR(kc);//approximation to simulate sliders denoise + if (kc < 0) { + kc = -SQR(kc); //approximation to simulate sliders denoise } - //equalizer for levels 0 1 and 3... 1.33 and 0.75 arbitrary values - if(cp.denmet == 1) { - if(level == 0 || level == 3) { - kc *= 1.7f; - } - } else if(cp.denmet == 2) { - if(level == 0 || level == 3) { - kc *= 0.3f; - } - } else if(cp.denmet == 3) { - if(level == 0 || level == 1) { - kc *= 1.7f; - } - } else if(cp.denmet == 4) { - if(level == 0 || level == 1) { - kc *= 0.3f; - } - } - - float reduceeffect = kc <= 0.f ? 1.f : 1.2f;//1.2 allows to increase denoise (not used) + kc *= kcFactor; - float kinterm = 1.f + reduceeffect * kc; - kinterm = kinterm <= 0.f ? 0.01f : kinterm; - - float kintermhigh = 1.f + reduceeffect * kchigh; - kintermhigh = kintermhigh <= 0.f ? 0.01f : kintermhigh; + const float reduceeffect = kc <= 0.f ? 1.f : 1.2f; //1.2 allows to increase denoise (not used) - float kintermed = 1.f + reduceeffect * kcmed; - kintermed = kintermed <= 0.f ? 0.01f : kintermed; - - float kintermlow = kinterm; - if(level < 4) { + if (level < 4) { + float kintermlow = 1.f + reduceeffect * kc; + kintermlow = kintermlow <= 0.f ? 0.01f : kintermlow; WavL0[i] = WavL02[i] + (WavL0[i] - WavL02[i]) * kintermlow; WavL1[i] = WavL12[i] + (WavL1[i] - WavL12[i]) * kintermlow; WavL2[i] = WavL22[i] + (WavL2[i] - WavL22[i]) * kintermlow; WavL3[i] = WavL32[i] + (WavL3[i] - WavL32[i]) * kintermlow; } - if(cp.complex == 1){ - if(cp.limden > 0.f) { + if (cp.complex == 1){ + if (cp.limden > 0.f) { + const float kcmed = -SQR(wavmed.getVal(absciss) - 1.f); + float kintermed = 1.f + reduceeffect * kcmed; + kintermed = kintermed <= 0.f ? 0.01f : kintermed; WavL0[i] = WavL02[i] + (WavL0[i] - WavL02[i]) * kintermed; WavL1[i] = WavL12[i] + (WavL1[i] - WavL12[i]) * kintermed; WavL2[i] = WavL22[i] + (WavL2[i] - WavL22[i]) * kintermed; WavL3[i] = WavL32[i] + (WavL3[i] - WavL32[i]) * kintermed; } + const float kchigh = -SQR(wavhigh.getVal(absciss) - 1.f); + float kintermhigh = 1.f + reduceeffect * kchigh; + kintermhigh = kintermhigh <= 0.f ? 0.01f : kintermhigh; WavL4[i] = WavL42[i] + (WavL4[i] - WavL42[i]) * kintermhigh; WavL5[i] = WavL52[i] + (WavL5[i] - WavL52[i]) * kintermhigh; } @@ -1574,7 +1529,6 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const if (noiseccb < 0.f) { noiseccb = 0.0001f; } - int edge = 2; variC[0] = SQR(noisecfr); variC[1] = SQR(noisecfr); @@ -1770,7 +1724,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const if (!hhutili) { //always a or b int levwava = levwav; - if (!exblurab && cp.chrores == 0.f && cp.blurcres == 0.f && !cp.tonemap && !cp.resena && !cp.chromena && !cp.finena && !cp.edgeena&& params->wavelet.CLmethod == "all" && !cp.cbena) { // no processing of residual ab => we probably can reduce the number of levels + if (!exblurab && cp.chrores == 0.f && cp.blurcres == 0.f && !cp.noiseena && !cp.tonemap && !cp.resena && !cp.chromena && !cp.toningena && !cp.finena && !cp.edgeena && params->wavelet.CLmethod == "all" && !cp.cbena) { // no processing of residual ab => we probably can reduce the number of levels while (levwava > 0 && !cp.diag && (((cp.CHmet == 2 && (cp.chro == 0.f || cp.mul[levwava - 1] == 0.f)) || (cp.CHmet != 2 && (levwava == 10 || (!cp.curv || cp.mulC[levwava - 1] == 0.f))))) && (!cp.opaRG || levwava == 10 || (cp.opaRG && cp.mulopaRG[levwava - 1] == 0.f)) && ((levwava == 10 || (cp.CHSLmet == 1 && cp.mulC[levwava - 1] == 0.f)))) { levwava--; } @@ -1784,6 +1738,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const levwava = rtengine::min(maxlevelcrop, levwava); levwava = rtengine::min(maxlev2, levwava); + levwava = rtengine::min(levwav, levwava); if (settings->verbose) { printf("Leval decomp a=%i\n", levwava); } @@ -1794,11 +1749,17 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const if(levwava == 6) { edge = 1; } - if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.quamet == 0 )) { + if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.quamet == 0 && isdenoisL)) { + if (settings->verbose) { + printf("denoise standard a \n"); + } WaveletDenoiseAllAB(*Ldecomp, *adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, 1); - } else if (cp.chromfi > 0.f && cp.chromco >= 2.f){ + } else if (cp.noiseena && ((cp.chromfi > 0.f && cp.chromco >= 0.f) && cp.quamet == 1 && isdenoisL)){ + if (settings->verbose) { + printf("denoise bishrink a \n"); + } WaveletDenoiseAll_BiShrinkAB(*Ldecomp, *adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, 1); WaveletDenoiseAllAB(*Ldecomp, *adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, 1); @@ -1816,7 +1777,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const int levwavb = levwav; - if (!exblurab && cp.chrores == 0.f && cp.blurcres == 0.f && !cp.tonemap && !cp.resena && !cp.chromena && !cp.finena && !cp.edgeena && params->wavelet.CLmethod == "all" && !cp.cbena) { // no processing of residual ab => we probably can reduce the number of levels + if (!exblurab && cp.chrores == 0.f && cp.blurcres == 0.f && !cp.noiseena && !cp.tonemap && !cp.resena && !cp.chromena && !cp.toningena && !cp.finena && !cp.edgeena && params->wavelet.CLmethod == "all" && !cp.cbena) { // no processing of residual ab => we probably can reduce the number of levels while (levwavb > 0 && !cp.diag && (((cp.CHmet == 2 && (cp.chro == 0.f || cp.mul[levwavb - 1] == 0.f)) || (cp.CHmet != 2 && (levwavb == 10 || (!cp.curv || cp.mulC[levwavb - 1] == 0.f))))) && (!cp.opaBY || levwavb == 10 || (cp.opaBY && cp.mulopaBY[levwavb - 1] == 0.f)) && ((levwavb == 10 || (cp.CHSLmet == 1 && cp.mulC[levwavb - 1] == 0.f)))) { levwavb--; } @@ -1831,6 +1792,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const levwavb = rtengine::min(maxlevelcrop, levwavb); levwavb = rtengine::min(maxlev2, levwavb); + levwavb = rtengine::min(levwav, levwavb); if (settings->verbose) { printf("Leval decomp b=%i\n", levwavb); @@ -1844,12 +1806,19 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const if (!bdecomp->memory_allocation_failed()) { // if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.chromco < 2.f )) { - if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.quamet == 0)) { - + if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.quamet == 0 && isdenoisL)) { WaveletDenoiseAllAB(*Ldecomp, *bdecomp, noisevarchrom, madL, variCb, edge, noisevarab_r, true, false, false, 1); - } else if (cp.chromfi > 0.f && cp.chromco >= 2.f){ + if (settings->verbose) { + printf("Denoise standard b\n"); + } + } else if (cp.noiseena && ((cp.chromfi > 0.f && cp.chromco >= 0.f) && cp.quamet == 1 && isdenoisL)){ + WaveletDenoiseAll_BiShrinkAB(*Ldecomp, *bdecomp, noisevarchrom, madL, variCb, edge, noisevarab_r, true, false, false, 1); WaveletDenoiseAllAB(*Ldecomp, *bdecomp, noisevarchrom, madL, variCb, edge, noisevarab_r, true, false, false, 1); + if (settings->verbose) { + printf("Denoise bishrink b\n"); + } + } Evaluate2(*bdecomp, meanab, meanNab, sigmaab, sigmaNab, MaxPab, MaxNab, wavNestedLevels); @@ -1871,18 +1840,24 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const const std::unique_ptr bdecomp(new wavelet_decomposition(labco->data + 2 * datalen, labco->W, labco->H, levwavab, 1, skip, rtengine::max(1, wavNestedLevels), DaubLen)); if (!adecomp->memory_allocation_failed() && !bdecomp->memory_allocation_failed()) { - if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.quamet == 0)) { + if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.quamet == 0 && isdenoisL)) { WaveletDenoiseAllAB(*Ldecomp, *adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, 1); - } else if (cp.chromfi > 0.f && cp.chromco >= 2.f){ + if (settings->verbose) { + printf("Denoise standard ab\n"); + } + } else if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.quamet == 1 && isdenoisL)) { WaveletDenoiseAll_BiShrinkAB(*Ldecomp, *adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, 1); WaveletDenoiseAllAB(*Ldecomp, *adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, 1); + if (settings->verbose) { + printf("Denoise bishrink ab\n"); + } } Evaluate2(*adecomp, meanab, meanNab, sigmaab, sigmaNab, MaxPab, MaxNab, wavNestedLevels); WaveletcontAllAB(labco, varhue, varchro, *adecomp, wavblcurve, waOpacityCurveW, cp, true, skip, meanab, sigmaab); - if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.quamet == 0)) { + if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.quamet == 0 && isdenoisL)) { WaveletDenoiseAllAB(*Ldecomp, *bdecomp, noisevarchrom, madL, variCb, edge, noisevarab_r, true, false, false, 1); - } else if (cp.chromfi > 0.f && cp.chromco >= 2.f){ + } else if(cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.quamet == 1 && isdenoisL)) { WaveletDenoiseAll_BiShrinkAB(*Ldecomp, *bdecomp, noisevarchrom, madL, variCb, edge, noisevarab_r, true, false, false, 1); WaveletDenoiseAllAB(*Ldecomp, *bdecomp, noisevarchrom, madL, variCb, edge, noisevarab_r, true, false, false, 1); } @@ -1908,9 +1883,6 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const if (usechrom) { Ldecomp->reconstruct(labco->data, cp.strength); } -// if (settings->verbose) { -// printf("OK END\n"); -// } } } @@ -2182,20 +2154,26 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const } //end hue -// printf("LEVWAV=%i\n", levwavL); if (thrend > 0.f) { - //2 decomposition LL after guidefilter and dst before (perhaps dst no need) + //2 decomposition LL after guidefilter and dst before (perhaps dst no need) const std::unique_ptr LdecompLL(new wavelet_decomposition(LL[0], ww, hh, levwavL, 1, skip, rtengine::max(1, wavNestedLevels), DaubLen)); const std::unique_ptr Ldecompdst(new wavelet_decomposition(dst->L[0], ww, hh, levwavL, 1, skip, rtengine::max(1, wavNestedLevels), DaubLen)); if (!LdecompLL->memory_allocation_failed() && !Ldecompdst->memory_allocation_failed()) { - Evaluate2(*LdecompLL, meang, meanNg, sigmag, sigmaNg, MaxPg, MaxNg, wavNestedLevels); Evaluate2(*Ldecompdst, mean, meanN, sigma, sigmaN, MaxP, MaxN, wavNestedLevels); - float sig = 2.f; + constexpr float sig = 2.f; + + // original code for variable sig + float k = sig; + // cppcheck-suppress knownConditionTrueFalse + if (sig > 1.f) { + k = SQR(sig); + } + float thr = 0.f; - if(thrend < 0.02f) thr = 0.5f; - else if(thrend < 0.1f) thr = 0.2f; + if (thrend < 0.02f) thr = 0.5f; + else if (thrend < 0.1f) thr = 0.2f; else thr = 0.f; FlatCurve wavguid({ @@ -2205,34 +2183,29 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const for (int dir = 1; dir < 4; dir++) { for (int level = 0; level < levwavL-1; level++) { - int Wlvl_L = LdecompLL->level_W(level); - int Hlvl_L = LdecompLL->level_H(level); + const int Wlvl_L = LdecompLL->level_W(level); + const int Hlvl_L = LdecompLL->level_H(level); float* const* WavCoeffs_L = LdecompLL->level_coeffs(level);//first decomp denoised float* const* WavCoeffs_L2 = Ldecompdst->level_coeffs(level);//second decomp before denoise if (settings->verbose) { printf("level=%i mean=%.0f meanden=%.0f sigma=%.0f sigmaden=%.0f Max=%.0f Maxden=%.0f\n", level, mean[level], meang[level], sigma[level], sigmag[level],MaxP[level], MaxPg[level]); } - //find local contrast - float tempmean = 0.f; - float tempsig = 0.f; - float tempmax = 0.f; - tempmean = 0.3f * mean[level] + 0.7f * meang[level] ; - tempsig = 0.3f * sigma[level] + 0.7f * sigmag[level] ; - tempmax = 0.3f * MaxP[level] + 0.7f * MaxPg[level] ; + //find local contrast + const float tempmean = 0.3f * mean[level] + 0.7f * meang[level]; + const float tempsig = 0.3f * sigma[level] + 0.7f * sigmag[level]; + const float tempmax = 0.3f * MaxP[level] + 0.7f * MaxPg[level]; if (MaxP[level] > 0.f && mean[level] != 0.f && sigma[level] != 0.f) { //curve - float insigma = 0.666f; //SD - float logmax = log(tempmax); //log Max - //cp.sigmm change the "wider" of sigma - float rapX = (tempmean + sig * tempsig) / (tempmax); //rapport between sD / max - float inx = log(insigma); - float iny = log(rapX); - float rap = inx / iny; //koef - float asig = 0.166f / (tempsig * sig); - float bsig = 0.5f - asig * tempmean; - float amean = 0.5f / (tempmean); - + constexpr float insigma = 0.666f; //SD + const float logmax = log(tempmax); //log Max + const float rapX = (tempmean + sig * tempsig) / tempmax; //rapport between sD / max + const float inx = log(insigma); + const float iny = log(rapX); + const float rap = inx / iny; //koef + const float asig = 0.166f / (tempsig * sig); + const float bsig = 0.5f - asig * tempmean; + const float amean = 1.f / tempmean; #ifdef _OPENMP #pragma omp parallel for schedule(dynamic, Wlvl_L * 16) num_threads(wavNestedLevels) if (wavNestedLevels>1) @@ -2240,36 +2213,27 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const for (int i = 0; i < Wlvl_L * Hlvl_L; i++) { float absciss; - float tempwav = 0.f; - tempwav = 0.7f * WavCoeffs_L[dir][i] + 0.3f * WavCoeffs_L2[dir][i]; + const float tempwav = std::fabs(0.7f * WavCoeffs_L[dir][i] + 0.3f * WavCoeffs_L2[dir][i]); - if (std::fabs(tempwav) >= (tempmean + sig * tempsig)) { //for max - float valcour = xlogf(std::fabs(tempwav)); - float valc = valcour - logmax; - float vald = valc * rap; + if (tempwav >= tempmean + sig * tempsig) { //for max + const float vald = (xlogf(tempwav) - logmax) * rap; absciss = xexpf(vald); - } else if (std::fabs(tempwav) >= tempmean) { - absciss = asig * std::fabs(tempwav) + bsig; + } else if (tempwav >= tempmean) { + absciss = asig * tempwav + bsig; } else { - absciss = amean * std::fabs(tempwav); - float k = sig; - if(sig > 1.f) { - k = SQR(sig); + absciss = amean * tempwav; + if (sig == 2.f) { // for sig = 2.f we can use a faster calculation because the exponent in this case is 0.25 + absciss = 0.5f * std::sqrt(std::sqrt(absciss)); + } else { // original code for variable sig + absciss = 0.5f * pow_F(absciss, 1.f / k); } - float abs = pow(2.f * absciss, (1.f / k)); - absciss = 0.5f * abs; } - float kc = wavguid.getVal(absciss) -1.f; + float kc = wavguid.getVal(absciss) - 1.f; + kc = kc < 0.f ? -SQR(kc) : kc; // approximation to simulate sliders denoise - if(kc < 0) { - kc = -SQR(kc);//approximation to simulate sliders denoise - } - float reduceeffect = kc <= 0.f ? 1.f : 1.2f;//1.2 allows to increase denoise (not used) - - float kinterm = 1.f + reduceeffect * kc; - kinterm = kinterm <= 0.f ? 0.01f : kinterm; - float prov = WavCoeffs_L2[dir][i];//save before denoise - WavCoeffs_L[dir][i] = prov + (WavCoeffs_L[dir][i] - prov) * kinterm;//only apply local contrast on difference between denoise and normal + const float reduceeffect = kc <= 0.f ? 1.f : 1.2f;//1.2 allows to increase denoise (not used) + const float kinterm = rtengine::max(1.f + reduceeffect * kc, 0.f); + WavCoeffs_L[dir][i] = intp(kinterm, WavCoeffs_L[dir][i], WavCoeffs_L2[dir][i]); // interpolate using kinterm } } } @@ -2278,7 +2242,6 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const } } - //end local contrast #ifdef _OPENMP #pragma omp parallel for @@ -2822,7 +2785,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * float eddlipinfl = 0.005f * cp.edgsens + 0.4f; float eddlipampl = 1.f + cp.edgampl / 50.f; - if (cp.detectedge) { //enabled Lipschitz control...more memory..more time... + if (cp.detectedge && cp.val > 0) { //enabled Lipschitz control...more memory..more time... const std::unique_ptr tmCBuffer(new float[H_L * W_L]); float *tmC[H_L]; @@ -3740,7 +3703,7 @@ void ImProcFunctions::ContAllL(float *koeLi[12], float maxkoeLi, bool lipschitz, float edghig = settings->edghi;//increase or reduce "reinforce" float edglow = settings->edglo;//increase or reduce "reduce" float limrad = settings->limrad;//threshold action in function radius (rad) - printf("edghi=%f edglo=%f limrad=%f\n", edghig, edglow, limrad); + // printf("edghi=%f edglo=%f limrad=%f\n", edghig, edglow, limrad); // value *= beta; float edge = 1.f; float lim0 = limrad; //arbitrary limit for low radius and level between 2 or 3 to 30 maxi @@ -3766,7 +3729,7 @@ void ImProcFunctions::ContAllL(float *koeLi[12], float maxkoeLi, bool lipschitz, float bk = al0; float koef = ak * level + bk; //modulate for levels : more levels high, more koef low ==> concentrated action on low levels, without or near for high levels float expkoef = -std::pow(std::fabs(rad - lev), koef); //reduce effect for high levels - printf("repart=%f\n", repart); + // printf("repart=%f\n", repart); if (cp.reinforce == 3) { if (rad < (lim0 / 60.f) && level == 0) { @@ -4569,6 +4532,10 @@ void ImProcFunctions::ContAllAB(LabImage * labco, int maxlvl, float ** varhue, f } if ((useOpacity && level < 9 && mulOpacity != 0.f) && cp.toningena) { //toning + // if (settings->verbose) { + // printf("Toning enabled\n"); + // } + float mea[10]; float effect = cp.sigmaton; float betaab; diff --git a/rtengine/klt/trackFeatures.cc b/rtengine/klt/trackFeatures.cc index 8c0cd5ba6..b4f13c53c 100644 --- a/rtengine/klt/trackFeatures.cc +++ b/rtengine/klt/trackFeatures.cc @@ -460,7 +460,7 @@ static int _trackFeature( /* Check whether window is out of bounds */ if (*x2-hw < 0.0f || nc-(*x2+hw) < one_plus_eps || - *y2-hh < 0.0f || nr-(*y2+hh) < one_plus_eps) + *y2-hh < 0.0f || nr-(*y2+hh) < one_plus_eps || std::isnan(*x2) || std::isnan(*y2)) status = KLT_OOB; /* Check whether residue is too large */ diff --git a/rtengine/klt/writeFeatures.cc b/rtengine/klt/writeFeatures.cc index d3bf6f3d4..d3ec627ed 100644 --- a/rtengine/klt/writeFeatures.cc +++ b/rtengine/klt/writeFeatures.cc @@ -559,19 +559,19 @@ static structureType _readHeader( if (id == FEATURE_TABLE) { fscanf(fp, "%s", line); if (strcmp(line, ",") != 0) { - KLTError("(_readFeatures) File '%s' is corrupted -- " + KLTError("(_readFeatures) File is corrupted -- " "(Expected 'comma', found '%s' instead)", line); exit(1); } fscanf(fp, "%s", line); if (strcmp(line, "nFeatures") != 0) { - KLTError("(_readFeatures) File '%s' is corrupted -- " + KLTError("(_readFeatures) File is corrupted -- " "(2 Expected 'nFeatures ', found '%s' instead)", line); exit(1); } fscanf(fp, "%s", line); if (strcmp(line, "=") != 0) { - KLTError("(_readFeatures) File '%s' is corrupted -- " + KLTError("(_readFeatures) File is corrupted -- " "(2 Expected '= ', found '%s' instead)", line); exit(1); } diff --git a/rtengine/lcp.cc b/rtengine/lcp.cc index 8e90a3549..7fd22d1f8 100644 --- a/rtengine/lcp.cc +++ b/rtengine/lcp.cc @@ -196,7 +196,7 @@ rtengine::LCPProfile::LCPProfile(const Glib::ustring& fname) : XML_Parser parser = XML_ParserCreate(nullptr); if (!parser) { - throw "Couldn't allocate memory for XML parser"; + throw std::runtime_error("Couldn't allocate memory for XML parser"); } XML_SetElementHandler(parser, XmlStartHandler, XmlEndHandler); @@ -216,7 +216,7 @@ rtengine::LCPProfile::LCPProfile(const Glib::ustring& fname) : if (XML_Parse(parser, buf, bytesRead, done) == XML_STATUS_ERROR) { XML_ParserFree(parser); - throw "Invalid XML in LCP file"; + throw std::runtime_error("Invalid XML in LCP file"); } } while (!done); diff --git a/rtengine/lj92.c b/rtengine/lj92.c index d72075a62..1e0e8cb80 100644 --- a/rtengine/lj92.c +++ b/rtengine/lj92.c @@ -313,6 +313,9 @@ static int decode(ljp* self) { } static int receive(ljp* self,int ssss) { + if (ssss == 16) { + return 1 << 15; + } int i = 0; int v = 0; while (i != ssss) { @@ -365,24 +368,29 @@ inline static int nextdiff(ljp* self, int Px) { cnt -= usedbits; int keepbitsmask = (1 << cnt)-1; b &= keepbitsmask; - while (cnt < t) { - next = *(u16*)&self->data[ix]; - int one = next&0xFF; - int two = next>>8; - b = (b<<16)|(one<<8)|two; - cnt += 16; - ix += 2; - if (one==0xFF) { - b >>= 8; - cnt -= 8; - } else if (two==0xFF) ix++; - } - cnt -= t; - int diff = b >> cnt; - int vt = 1<<(t-1); - if (diff < vt) { - vt = (-1 << t) + 1; - diff += vt; + int diff; + if (t == 16) { + diff = 1 << 15; + } else { + while (cnt < t) { + next = *(u16*)&self->data[ix]; + int one = next&0xFF; + int two = next>>8; + b = (b<<16)|(one<<8)|two; + cnt += 16; + ix += 2; + if (one==0xFF) { + b >>= 8; + cnt -= 8; + } else if (two==0xFF) ix++; + } + cnt -= t; + diff = b >> cnt; + int vt = 1<<(t-1); + if (diff < vt) { + vt = (-1 << t) + 1; + diff += vt; + } } keepbitsmask = (1 << cnt)-1; self->b = b & keepbitsmask; @@ -424,6 +432,7 @@ static int parsePred6(ljp* self) { diff = nextdiff(self,0); Px = 1 << (self->bits-1); left = Px + diff; + left = (u16) (left % 65536); if (self->linearize) linear = self->linearize[left]; else @@ -437,6 +446,7 @@ static int parsePred6(ljp* self) { diff = nextdiff(self,0); Px = left; left = Px + diff; + left = (u16) (left % 65536); if (self->linearize) linear = self->linearize[left]; else @@ -460,6 +470,7 @@ static int parsePred6(ljp* self) { diff = nextdiff(self,0); Px = lastrow[col]; // Use value above for first pixel in row left = Px + diff; + left = (u16) (left % 65536); if (self->linearize) { if (left>self->linlen) return LJ92_ERROR_CORRUPT; linear = self->linearize[left]; @@ -478,6 +489,7 @@ static int parsePred6(ljp* self) { diff = nextdiff(self,0); Px = lastrow[col] + ((left - lastrow[col-1])>>1); left = Px + diff; + left = (u16) (left % 65536); //printf("%d %d %d %d %d %x\n",col,diff,left,lastrow[col],lastrow[col-1],&lastrow[col]); if (self->linearize) { if (left>self->linlen) return LJ92_ERROR_CORRUPT; @@ -556,6 +568,7 @@ static int parseScan(ljp* self) { } diff = nextdiff(self,Px); left = Px + diff; + left = (u16) (left % 65536); //printf("%d %d %d\n",c,diff,left); int linear; if (self->linearize) { diff --git a/rtengine/myfile.h b/rtengine/myfile.h index 423edea9a..34b90c525 100644 --- a/rtengine/myfile.h +++ b/rtengine/myfile.h @@ -107,13 +107,13 @@ inline int getc (IMFILE* f) return fgetc(f); } -inline int fread (void* dst, int es, int count, IMFILE* f) +inline int fread (void* dst, size_t es, size_t count, IMFILE* f) { - int s = es * count; - int avail = f->size - f->pos; + size_t s = es * count; + size_t avail = static_cast(f->size) - static_cast(f->pos); - if (s <= avail) { + if (static_cast(s) <= static_cast(avail)) { memcpy (dst, f->data + f->pos, s); f->pos += s; diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 7c711a3da..863fbd6e2 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -773,7 +773,7 @@ enum ProcEventCode { EvlocallabexnoiseMethod = 747, Evlocallabdepth = 748, Evlocallabloglin = 749, - Evlocallablumonly = 750, + EvlocallabdehazeSaturation = 750, Evlocallaboffs = 751, EvlocallabCTtransCurve = 752, Evlocallabcliptm = 753, @@ -982,7 +982,90 @@ enum ProcEventCode { EvlocallabquaMethod = 956, Evlocallabhishow = 957, Evlocallabinvbl = 958, - + Evlocallabcatad = 959, + Evlocallabciecam = 960, + Evlocallabsourceabs = 961, + Evlocallabtargabs = 962, + Evlocallabsurround = 963, + Evlocallabsaturl = 964, + Evlocallabcontl = 965, + EvlocallabCCmaskshapeL = 966, + EvlocallabLLmaskshapeL = 967, + EvlocallabHHmaskshapeL = 968, + EvLocallabEnaLMask = 969, + EvLocallabblendmaskL = 970, + EvLocallabradmaskL = 971, + EvLocallabchromaskL = 972, + EvlocallabLmaskshapeL = 973, + Evlocallablightl = 974, + EvlocallabLshapeL = 975, + Evlocallabcontq = 976, + Evlocallabsursour = 977, + Evlocallablightq = 978, + Evlocallabcolorfl = 979, + Evlocallabrepar = 980, + EvlocallabwavCurvehue = 981, + Evlocallablevelthr = 982, + Evlocallablevelthrlow = 983, + Evlocallabusemask1 = 984, + Evlocallablnoiselow = 985, + Evlocallabrecothres = 986, + Evlocallablowthres = 987, + Evlocallabhigthres = 988, + Evlocallabrecothresd = 989, + Evlocallablowthresd = 990, + Evlocallabhigthresd = 991, + Evlocallabinvmaskd = 992, + Evlocallabinvmask = 993, + Evlocallabdecayd = 994, + Evlocallabrecothresc = 995, + Evlocallablowthresc = 996, + Evlocallabhigthresc = 997, + Evlocallabdecayc = 998, + Evlocallabmidthresd = 999, + Evlocallabrecothresl = 1000, + Evlocallablowthresl = 1001, + Evlocallabhigthresl = 1002, + Evlocallabdecayl = 1003, + Evlocallabrecothrese = 1004, + Evlocallablowthrese = 1005, + Evlocallabhigthrese = 1006, + Evlocallabdecaye = 1007, + Evlocallabrecothress = 1008, + Evlocallablowthress = 1009, + Evlocallabhigthress = 1010, + Evlocallabdecays = 1011, + Evlocallabrecothresv = 1012, + Evlocallablowthresv = 1013, + Evlocallabhigthresv = 1014, + Evlocallabdecayv = 1015, + Evlocallabrecothresw = 1016, + Evlocallablowthresw = 1017, + Evlocallabhigthresw = 1018, + Evlocallabdecayw = 1019, + Evlocallabmidthresdch = 1020, + Evlocallabrecothrest = 1021, + Evlocallablowthrest = 1022, + Evlocallabhigthrest = 1023, + Evlocallabdecayt = 1024, + Evlocallabrecothrescb = 1025, + Evlocallablowthrescb = 1026, + Evlocallabhigthrescb = 1027, + Evlocallabdecaycb = 1028, + Evlocallabrecothresr = 1029, + Evlocallablowthresr = 1030, + Evlocallabhigthresr = 1031, + Evlocallabdecayr = 1032, + Evlocallabnlstr = 1033, + Evlocallabnldet = 1034, + Evlocallabnlpat = 1035, + Evlocallabnlrad = 1036, + Evlocallabnlgam = 1037, + Evlocallabdivgr = 1038, + EvLocallabSpotavoidrad = 1039, + EvLocallabSpotavoidmun = 1040, + Evlocallabcontthres = 1041, + Evlocallabnorm = 1042, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index da89d9493..8794fe0e8 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -112,6 +112,16 @@ void getFromKeyfile( value = keyfile.get_double(group_name, key); } +void getFromKeyfile( + const Glib::KeyFile& keyfile, + const Glib::ustring& group_name, + const Glib::ustring& key, + float& value +) +{ + value = static_cast(keyfile.get_double(group_name, key)); +} + void getFromKeyfile( const Glib::KeyFile& keyfile, const Glib::ustring& group_name, @@ -153,6 +163,21 @@ void getFromKeyfile( rtengine::sanitizeCurve(value); } +void getFromKeyfile( + const Glib::KeyFile& keyfile, + const Glib::ustring& group_name, + const Glib::ustring& key, + rtengine::procparams::FilmNegativeParams::RGB& value +) +{ + const std::vector v = keyfile.get_double_list(group_name, key); + if(v.size() >= 3) { + value.r = v[0]; + value.g = v[1]; + value.b = v[2]; + } +} + template bool assignFromKeyfile( const Glib::KeyFile& keyfile, @@ -219,6 +244,16 @@ void putToKeyfile( keyfile.set_integer(group_name, key, value); } +void putToKeyfile( + const Glib::ustring& group_name, + const Glib::ustring& key, + float value, + Glib::KeyFile& keyfile +) +{ + keyfile.set_double(group_name, key, static_cast(value)); +} + void putToKeyfile( const Glib::ustring& group_name, const Glib::ustring& key, @@ -271,6 +306,18 @@ void putToKeyfile( keyfile.set_double_list(group_name, key, list); } +void putToKeyfile( + const Glib::ustring& group_name, + const Glib::ustring& key, + const rtengine::procparams::FilmNegativeParams::RGB& value, + Glib::KeyFile& keyfile +) +{ + const std::vector vec = { value.r, value.g, value.b }; + keyfile.set_double_list(group_name, key, vec); +} + + template bool saveToKeyfile( bool save, @@ -366,6 +413,7 @@ ToneCurveParams::ToneCurveParams() : saturation(0), shcompr(50), hlcompr(0), + hlbl(0), hlcomprthresh(0), histmatching(false), fromHistMatching(false), @@ -391,6 +439,7 @@ bool ToneCurveParams::isPanningRelatedChange(const ToneCurveParams& other) const && saturation == other.saturation && shcompr == other.shcompr && hlcompr == other.hlcompr + && hlbl == other.hlbl && hlcomprthresh == other.hlcomprthresh && histmatching == other.histmatching && clampOOG == other.clampOOG); @@ -414,6 +463,7 @@ bool ToneCurveParams::operator ==(const ToneCurveParams& other) const && saturation == other.saturation && shcompr == other.shcompr && hlcompr == other.hlcompr + && hlbl == other.hlbl && hlcomprthresh == other.hlcomprthresh && histmatching == other.histmatching && fromHistMatching == other.fromHistMatching @@ -1403,6 +1453,9 @@ ColorAppearanceParams::ColorAppearanceParams() : curveMode(TcMode::LIGHT), curveMode2(TcMode::LIGHT), curveMode3(CtcMode::CHROMA), + complexmethod("normal"), + modelmethod("02"), + catmethod("clas"), surround("Average"), surrsrc("Average"), adapscen(2000.0), @@ -1427,7 +1480,7 @@ ColorAppearanceParams::ColorAppearanceParams() : gamut(true), datacie(false), tonecie(false), - tempout(5000), + tempout(5003), autotempout(true), ybout(18), greenout(1.0), @@ -1451,6 +1504,9 @@ bool ColorAppearanceParams::operator ==(const ColorAppearanceParams& other) cons && curveMode == other.curveMode && curveMode2 == other.curveMode2 && curveMode3 == other.curveMode3 + && complexmethod == other.complexmethod + && modelmethod == other.modelmethod + && catmethod == other.catmethod && surround == other.surround && surrsrc == other.surrsrc && adapscen == other.adapscen @@ -2746,11 +2802,13 @@ LocallabParams::LocallabSpot::LocallabSpot() : balanh(1.0), colorde(5.0), colorscope(30.0), + avoidrad(0.7), transitweak(1.0), transitgrad(0.0), hishow(false), activ(true), avoid(false), + avoidmun(false), blwh(false), recurs(false), laplac(true), @@ -3003,6 +3061,10 @@ LocallabParams::LocallabSpot::LocallabSpot() : 0.35 }, csthresholdcol(0, 0, 6, 5, false), + recothresc(1.), + lowthresc(12.), + higthresc(85.), + decayc(2.), // Exposure visiexpose(false), expexpose(false), @@ -3026,6 +3088,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : 1.0, 1.0 }, + norm(true), inversex(false), enaExpMask(false), enaExpMaskaft(false), @@ -3099,6 +3162,10 @@ LocallabParams::LocallabSpot::LocallabSpot() : fatdetail(40.0), fatanchor(1.0), fatlevel(1.), + recothrese(1.), + lowthrese(12.), + higthrese(85.), + decaye(2.), // Shadow highlight visishadhigh(false), expshadhigh(false), @@ -3179,6 +3246,10 @@ LocallabParams::LocallabSpot::LocallabSpot() : fatanchorSH(50.0), gamSH(2.4), sloSH(12.92), + recothress(1.), + lowthress(12.), + higthress(85.), + decays(2.), // Vibrance visivibrance(false), expvibrance(false), @@ -3257,6 +3328,10 @@ LocallabParams::LocallabSpot::LocallabSpot() : 1.0, 1.0 }, + recothresv(1.), + lowthresv(12.), + higthresv(85.), + decayv(2.), // Soft Light visisoft(false), expsoft(false), @@ -3275,45 +3350,93 @@ LocallabParams::LocallabSpot::LocallabSpot() : itera(1), guidbl(0), strbl(50), + recothres(1.), + lowthres(12.), + higthres(85.), + recothresd(1.), + lowthresd(12.), + midthresd(0.), + midthresdch(0.), + higthresd(85.), + decayd(2.), isogr(400), strengr(0), scalegr(100), + divgr(1.), epsbl(0), blMethod("blur"), chroMethod("lum"), - quamethod("cons"), + quamethod("none"), blurMethod("norm"), medMethod("33"), + usemask(false), + invmaskd(false), + invmask(false), + levelthr(85.), + lnoiselow(1.), + levelthrlow(12.), activlum(true), noiselumf(0.), noiselumf0(0.), noiselumf2(0.), noiselumc(0.), - noiselumdetail(0.), + noiselumdetail(50.), noiselequal(7), noisechrof(0.), noisechroc(0.), - noisechrodetail(0.), + noisechrodetail(50.), adjblur(0), bilateral(0), + nlstr(0), + nldet(50), + nlpat(2), + nlrad(5), + nlgam(3.), sensiden(60), - detailthr(0), + detailthr(50), locwavcurveden{ static_cast(FCT_MinMaxCPoints), 0.0, - 0.0, - 0.0, + 0.09, 0.35, - 0.5, 0., - 0.35, + 0.33, + 0.17, + 0.33, 0.35, 1.0, - 0.0, + 0.03, 0.35, 0.35 }, - showmaskblMethodtyp("blur"), + locwavcurvehue{ + static_cast(FCT_MinMaxCPoints), + 0.0, + 0.50, + 0.35, + 0.35, + 0.166, + 0.50, + 0.35, + 0.35, + 0.333, + 0.50, + 0.35, + 0.35, + 0.50, + 0.50, + 0.35, + 0.35, + 0.666, + 0.50, + 0.35, + 0.35, + 0.833, + 0.50, + 0.35, + 0.35 + }, + showmaskblMethodtyp("nois"), CCmaskblcurve{ static_cast(FCT_MinMaxCPoints), 0.0, @@ -3465,6 +3588,10 @@ LocallabParams::LocallabSpot::LocallabSpot() : 1.0, 1.0 }, + recothrest(1.), + lowthrest(12.), + higthrest(85.), + decayt(2.), // Retinex visireti(false), expreti(false), @@ -3509,9 +3636,9 @@ LocallabParams::LocallabSpot::LocallabSpot() : 0.35 }, inversret(false), - equilret(true), - loglin(false), - lumonly(false), + equilret(false), + loglin(true), + dehazeSaturation(50.0), softradiusret(40.0), CCmaskreticurve{ static_cast(FCT_MinMaxCPoints), @@ -3579,6 +3706,10 @@ LocallabParams::LocallabSpot::LocallabSpot() : 1.0, 1.0 }, + recothresr(1.), + lowthresr(12.), + higthresr(85.), + decayr(2.), // Sharpening visisharp(false), expsharp(false), @@ -3788,6 +3919,10 @@ LocallabParams::LocallabSpot::LocallabSpot() : 1.0, 1.0 }, + recothresw(1.), + lowthresw(12.), + higthresw(85.), + decayw(2.), // Contrast by detail levels visicbdl(false), expcbdl(false), @@ -3858,21 +3993,106 @@ LocallabParams::LocallabSpot::LocallabSpot() : 1.0, 1.0 }, + recothrescb(1.), + lowthrescb(12.), + higthrescb(85.), + decaycb(2.), // Log encoding visilog(false), explog(false), autocompute(false), sourceGray(10.), + sourceabs(2000.), + targabs(16.), targetGray(18.), + catad(0.), + saturl(0.), + lightl(0.), + lightq(0.), + contl(0.), + contthres(0.), + contq(0.), + colorfl(0.), + LcurveL{ + static_cast(DCT_NURBS), + 0.0, + 0.0, + 1.0, + 1.0 + }, Autogray(true), fullimage(true), + repar(100.0), + ciecam(false), blackEv(-5.0), whiteEv(10.0), detail(0.6), sensilog(60), + sursour("Average"), + surround("Average"), baselog(2.), strlog(0.0), anglog(0.0), + CCmaskcurveL{ + static_cast(FCT_MinMaxCPoints), + 0.0, + 1.0, + 0.35, + 0.35, + 0.50, + 1.0, + 0.35, + 0.35, + 1.00, + 1.0, + 0.35, + 0.35 + }, + LLmaskcurveL{ + static_cast(FCT_MinMaxCPoints), + 0.0, + 1.0, + 0.35, + 0.35, + 0.50, + 1.0, + 0.35, + 0.35, + 1.00, + 1.0, + 0.35, + 0.35 + }, + HHmaskcurveL{ + static_cast(FCT_MinMaxCPoints), + 0.0, + 1.0, + 0.35, + 0.35, + 0.50, + 1.0, + 0.35, + 0.35, + 1.00, + 1.0, + 0.35, + 0.35 + }, + enaLMask(false), + blendmaskL(0), + radmaskL(0.), + chromaskL(0.), + LmaskcurveL{ + static_cast(DCT_NURBS), + 0.0, + 0.0, + 1.0, + 1.0 + }, + recothresl(1.), + lowthresl(12.), + higthresl(85.), + decayl(2.), // mask visimask(false), complexmask(0), @@ -4006,11 +4226,13 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && balanh == other.balanh && colorde == other.colorde && colorscope == other.colorscope + && avoidrad == other.avoidrad && transitweak == other.transitweak && transitgrad == other.transitgrad && hishow == other.hishow && activ == other.activ && avoid == other.avoid + && avoidmun == other.avoidmun && blwh == other.blwh && recurs == other.recurs && laplac == other.laplac @@ -4083,6 +4305,10 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && Lmaskcurve == other.Lmaskcurve && LLmaskcolcurvewav == other.LLmaskcolcurvewav && csthresholdcol == other.csthresholdcol + && recothresc == other.recothresc + && lowthresc == other.lowthresc + && higthresc == other.higthresc + && decayc == other.decayc // Exposure && visiexpose == other.visiexpose && expexpose == other.expexpose @@ -4100,6 +4326,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && strexp == other.strexp && angexp == other.angexp && excurve == other.excurve + && norm == other.norm && inversex == other.inversex && enaExpMask == other.enaExpMask && enaExpMaskaft == other.enaExpMaskaft @@ -4126,6 +4353,10 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && fatdetail == other.fatdetail && fatanchor == other.fatanchor && fatlevel == other.fatlevel + && recothrese == other.recothrese + && lowthrese == other.lowthrese + && higthrese == other.higthrese + && decaye == other.decaye // Shadow highlight && visishadhigh == other.visishadhigh && expshadhigh == other.expshadhigh @@ -4166,6 +4397,10 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && fatanchorSH == other.fatanchorSH && gamSH == other.gamSH && sloSH == other.sloSH + && recothress == other.recothress + && lowthress == other.lowthress + && higthress == other.higthress + && decays == other.decays // Vibrance && visivibrance == other.visivibrance && expvibrance == other.expvibrance @@ -4194,6 +4429,10 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && strvibh == other.strvibh && angvib == other.angvib && Lmaskvibcurve == other.Lmaskvibcurve + && recothresv == other.recothresv + && lowthresv == other.lowthresv + && higthresv == other.higthresv + && decayv == other.decayv // Soft Light && visisoft == other.visisoft && expsoft == other.expsoft @@ -4212,14 +4451,30 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && itera == other.itera && guidbl == other.guidbl && strbl == other.strbl + && recothres == other.recothres + && lowthres == other.lowthres + && higthres == other.higthres + && recothresd == other.recothresd + && lowthresd == other.lowthresd + && midthresd == other.midthresd + && midthresdch == other.midthresdch + && higthresd == other.higthresd + && decayd == other.decayd && isogr == other.isogr && strengr == other.strengr && scalegr == other.scalegr + && divgr == other.divgr && epsbl == other.epsbl && blMethod == other.blMethod && chroMethod == other.chroMethod && quamethod == other.quamethod && blurMethod == other.blurMethod + && usemask == other.usemask + && invmaskd == other.invmaskd + && invmask == other.invmask + && levelthr == other.levelthr + && lnoiselow == other.lnoiselow + && levelthrlow == other.levelthrlow && medMethod == other.medMethod && activlum == other.activlum && noiselumf == other.noiselumf @@ -4233,9 +4488,15 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && noisechrodetail == other.noisechrodetail && adjblur == other.adjblur && bilateral == other.bilateral + && nlstr == other.nlstr + && nldet == other.nldet + && nlpat == other.nlpat + && nlrad == other.nlrad + && nlgam == other.nlgam && sensiden == other.sensiden && detailthr == other.detailthr && locwavcurveden == other.locwavcurveden + && locwavcurvehue == other.locwavcurvehue && showmaskblMethodtyp == other.showmaskblMethodtyp && CCmaskblcurve == other.CCmaskblcurve && LLmaskblcurve == other.LLmaskblcurve @@ -4282,6 +4543,10 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && slomasktm == other.slomasktm && lapmasktm == other.lapmasktm && Lmasktmcurve == other.Lmasktmcurve + && recothrest == other.recothrest + && lowthrest == other.lowthrest + && higthrest == other.higthrest + && decayt == other.decayt // Retinex && visireti == other.visireti && expreti == other.expreti @@ -4300,7 +4565,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && inversret == other.inversret && equilret == other.equilret && loglin == other.loglin - && lumonly == other.lumonly + && dehazeSaturation == other.dehazeSaturation && softradiusret == other.softradiusret && CCmaskreticurve == other.CCmaskreticurve && LLmaskreticurve == other.LLmaskreticurve @@ -4320,6 +4585,10 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && cliptm == other.cliptm && fftwreti == other.fftwreti && Lmaskreticurve == other.Lmaskreticurve + && recothresr == other.recothresr + && lowthresr == other.lowthresr + && higthresr == other.higthresr + && decayr == other.decayr // Sharpening && visisharp == other.visisharp && expsharp == other.expsharp @@ -4405,6 +4674,10 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && radmasklc == other.radmasklc && chromasklc == other.chromasklc && Lmasklccurve == other.Lmasklccurve + && recothresw == other.recothresw + && lowthresw == other.lowthresw + && higthresw == other.higthresw + && decayw == other.decayw // Contrast by detail levels && visicbdl == other.visicbdl && expcbdl == other.expcbdl @@ -4435,21 +4708,54 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && slomaskcb == other.slomaskcb && lapmaskcb == other.lapmaskcb && Lmaskcbcurve == other.Lmaskcbcurve + && recothrescb == other.recothrescb + && lowthrescb == other.lowthrescb + && higthrescb == other.higthrescb + && decaycb == other.decaycb // Log encoding && visilog == other.visilog && explog == other.explog + && complexlog == other.complexlog && autocompute == other.autocompute && sourceGray == other.sourceGray + && sourceabs == other.sourceabs + && targabs == other.targabs && targetGray == other.targetGray + && catad == other.catad + && saturl == other.saturl + && lightl == other.lightl + && lightq == other.lightq + && contl == other.contl + && contthres == other.contthres + && contq == other.contq + && colorfl == other.colorfl + && LcurveL == other.LcurveL && Autogray == other.Autogray && fullimage == other.fullimage + && repar == other.repar + && ciecam == other.ciecam && blackEv == other.blackEv && whiteEv == other.whiteEv && detail == other.detail && sensilog == other.sensilog && baselog == other.baselog + && sursour == other.sursour + && surround == other.surround && strlog == other.strlog && anglog == other.anglog + && CCmaskcurveL == other.CCmaskcurveL + && LLmaskcurveL == other.LLmaskcurveL + && HHmaskcurveL == other.HHmaskcurveL + && enaLMask == other.enaLMask + && blendmaskL == other.blendmaskL + && radmaskL == other.radmaskL + && chromaskL == other.chromaskL + && LmaskcurveL == other.LmaskcurveL + && recothresl == other.recothresl + && lowthresl == other.lowthresl + && higthresl == other.higthresl + && decayl == other.decayl + // mask && visimask == other.visimask && complexmask == other.complexmask @@ -4624,9 +4930,9 @@ bool SoftLightParams::operator !=(const SoftLightParams& other) const DehazeParams::DehazeParams() : enabled(false), strength(50), + saturation(50), showDepthMap(false), - depth(25), - luminance(false) + depth(25) { } @@ -4637,7 +4943,7 @@ bool DehazeParams::operator ==(const DehazeParams& other) const && strength == other.strength && showDepthMap == other.showDepthMap && depth == other.depth - && luminance == other.luminance; + && saturation == other.saturation; } bool DehazeParams::operator !=(const DehazeParams& other) const @@ -4939,12 +5245,35 @@ FilmNegativeParams::FilmNegativeParams() : redRatio(1.36), greenExp(1.5), blueRatio(0.86), - redBase(0), - greenBase(0), - blueBase(0) + refInput({0.0, 0.0, 0.0}), + refOutput({0.0, 0.0, 0.0}), + colorSpace(ColorSpace::WORKING), + backCompat(BackCompat::CURRENT) { } +bool FilmNegativeParams::RGB::operator ==(const FilmNegativeParams::RGB& other) const +{ + return + r == other.r + && g == other.g + && b == other.b; +} + +bool FilmNegativeParams::RGB::operator !=(const FilmNegativeParams::RGB& other) const +{ + return !(*this == other); +} + +FilmNegativeParams::RGB FilmNegativeParams::RGB::operator *(const FilmNegativeParams::RGB& other) const +{ + return { + (*this).r * other.r, + (*this).g * other.g, + (*this).b * other.b + }; +} + bool FilmNegativeParams::operator ==(const FilmNegativeParams& other) const { return @@ -4952,9 +5281,10 @@ bool FilmNegativeParams::operator ==(const FilmNegativeParams& other) const && redRatio == other.redRatio && greenExp == other.greenExp && blueRatio == other.blueRatio - && redBase == other.redBase - && greenBase == other.greenBase - && blueBase == other.blueBase; + && refInput == other.refInput + && refOutput == other.refOutput + && colorSpace == other.colorSpace + && backCompat == other.backCompat; } bool FilmNegativeParams::operator !=(const FilmNegativeParams& other) const @@ -5110,6 +5440,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo // Highlight recovery saveToKeyfile(!pedited || pedited->toneCurve.hrenabled, "HLRecovery", "Enabled", toneCurve.hrenabled, keyFile); saveToKeyfile(!pedited || pedited->toneCurve.method, "HLRecovery", "Method", toneCurve.method, keyFile); + saveToKeyfile(!pedited || pedited->toneCurve.hlbl, "HLRecovery", "Hlbl", toneCurve.hlbl, keyFile); const std::map tc_mapping = { {ToneCurveMode::STD, "Standard"}, @@ -5310,6 +5641,9 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->colorappearance.degreeout, "Color appearance", "Degreeout", colorappearance.degreeout, keyFile); saveToKeyfile(!pedited || pedited->colorappearance.autodegreeout, "Color appearance", "AutoDegreeout", colorappearance.autodegreeout, keyFile); saveToKeyfile(!pedited || pedited->colorappearance.surround, "Color appearance", "Surround", colorappearance.surround, keyFile); + saveToKeyfile(!pedited || pedited->colorappearance.complexmethod, "Color appearance", "complex", colorappearance.complexmethod, keyFile); + saveToKeyfile(!pedited || pedited->colorappearance.modelmethod, "Color appearance", "ModelCat", colorappearance.modelmethod, keyFile); + saveToKeyfile(!pedited || pedited->colorappearance.catmethod, "Color appearance", "CatCat", colorappearance.catmethod, keyFile); saveToKeyfile(!pedited || pedited->colorappearance.surrsrc, "Color appearance", "Surrsrc", colorappearance.surrsrc, keyFile); saveToKeyfile(!pedited || pedited->colorappearance.adaplum, "Color appearance", "AdaptLum", colorappearance.adaplum, keyFile); saveToKeyfile(!pedited || pedited->colorappearance.badpixsl, "Color appearance", "Badpixsl", colorappearance.badpixsl, keyFile); @@ -5376,10 +5710,10 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo // Dehaze saveToKeyfile(!pedited || pedited->dehaze.enabled, "Dehaze", "Enabled", dehaze.enabled, keyFile); - saveToKeyfile(!pedited || pedited->dehaze.strength, "Dehaze", "Strength", dehaze.strength, keyFile); - saveToKeyfile(!pedited || pedited->dehaze.showDepthMap, "Dehaze", "ShowDepthMap", dehaze.showDepthMap, keyFile); - saveToKeyfile(!pedited || pedited->dehaze.depth, "Dehaze", "Depth", dehaze.depth, keyFile); - saveToKeyfile(!pedited || pedited->dehaze.depth, "Dehaze", "Luminance", dehaze.luminance, keyFile); + saveToKeyfile(!pedited || pedited->dehaze.strength, "Dehaze", "Strength", dehaze.strength, keyFile); + saveToKeyfile(!pedited || pedited->dehaze.showDepthMap, "Dehaze", "ShowDepthMap", dehaze.showDepthMap, keyFile); + saveToKeyfile(!pedited || pedited->dehaze.depth, "Dehaze", "Depth", dehaze.depth, keyFile); + saveToKeyfile(!pedited || pedited->dehaze.depth, "Dehaze", "Saturation", dehaze.saturation, keyFile); // Directional pyramid denoising saveToKeyfile(!pedited || pedited->dirpyrDenoise.enabled, "Directional Pyramid Denoising", "Enabled", dirpyrDenoise.enabled, keyFile); @@ -5537,11 +5871,13 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->balanh, "Locallab", "Balanh_" + index_str, spot.balanh, keyFile); saveToKeyfile(!pedited || spot_edited->colorde, "Locallab", "Colorde_" + index_str, spot.colorde, keyFile); saveToKeyfile(!pedited || spot_edited->colorscope, "Locallab", "Colorscope_" + index_str, spot.colorscope, keyFile); + saveToKeyfile(!pedited || spot_edited->avoidrad, "Locallab", "Avoidrad_" + index_str, spot.avoidrad, keyFile); saveToKeyfile(!pedited || spot_edited->transitweak, "Locallab", "Transitweak_" + index_str, spot.transitweak, keyFile); saveToKeyfile(!pedited || spot_edited->transitgrad, "Locallab", "Transitgrad_" + index_str, spot.transitgrad, keyFile); saveToKeyfile(!pedited || spot_edited->hishow, "Locallab", "Hishow_" + index_str, spot.hishow, keyFile); saveToKeyfile(!pedited || spot_edited->activ, "Locallab", "Activ_" + index_str, spot.activ, keyFile); saveToKeyfile(!pedited || spot_edited->avoid, "Locallab", "Avoid_" + index_str, spot.avoid, keyFile); + saveToKeyfile(!pedited || spot_edited->avoidmun, "Locallab", "Avoidmun_" + index_str, spot.avoidmun, keyFile); saveToKeyfile(!pedited || spot_edited->blwh, "Locallab", "Blwh_" + index_str, spot.blwh, keyFile); saveToKeyfile(!pedited || spot_edited->recurs, "Locallab", "Recurs_" + index_str, spot.recurs, keyFile); saveToKeyfile(!pedited || spot_edited->laplac, "Locallab", "Laplac_" + index_str, spot.laplac, keyFile); @@ -5614,6 +5950,10 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->Lmaskcurve, "Locallab", "LmaskCurve_" + index_str, spot.Lmaskcurve, keyFile); saveToKeyfile(!pedited || spot_edited->LLmaskcolcurvewav, "Locallab", "LLmaskcolCurvewav_" + index_str, spot.LLmaskcolcurvewav, keyFile); saveToKeyfile(!pedited || spot_edited->csthresholdcol, "Locallab", "CSThresholdcol_" + index_str, spot.csthresholdcol.toVector(), keyFile); + saveToKeyfile(!pedited || spot_edited->recothresc, "Locallab", "Recothresc_" + index_str, spot.recothresc, keyFile); + saveToKeyfile(!pedited || spot_edited->lowthresc, "Locallab", "Lowthresc_" + index_str, spot.lowthresc, keyFile); + saveToKeyfile(!pedited || spot_edited->higthresc, "Locallab", "Higthresc_" + index_str, spot.higthresc, keyFile); + saveToKeyfile(!pedited || spot_edited->decayc, "Locallab", "Decayc_" + index_str, spot.decayc, keyFile); } // Exposure if ((!pedited || spot_edited->visiexpose) && spot.visiexpose) { @@ -5632,6 +5972,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->strexp, "Locallab", "Strexp_" + index_str, spot.strexp, keyFile); saveToKeyfile(!pedited || spot_edited->angexp, "Locallab", "Angexp_" + index_str, spot.angexp, keyFile); saveToKeyfile(!pedited || spot_edited->excurve, "Locallab", "ExCurve_" + index_str, spot.excurve, keyFile); + saveToKeyfile(!pedited || spot_edited->norm, "Locallab", "Norm_" + index_str, spot.norm, keyFile); saveToKeyfile(!pedited || spot_edited->inversex, "Locallab", "Inversex_" + index_str, spot.inversex, keyFile); saveToKeyfile(!pedited || spot_edited->enaExpMask, "Locallab", "EnaExpMask_" + index_str, spot.enaExpMask, keyFile); saveToKeyfile(!pedited || spot_edited->enaExpMaskaft, "Locallab", "EnaExpMaskaft_" + index_str, spot.enaExpMaskaft, keyFile); @@ -5658,6 +5999,10 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->fatdetail, "Locallab", "Fatdetail_" + index_str, spot.fatdetail, keyFile); saveToKeyfile(!pedited || spot_edited->fatanchor, "Locallab", "Fatanchor_" + index_str, spot.fatanchor, keyFile); saveToKeyfile(!pedited || spot_edited->fatlevel, "Locallab", "Fatlevel_" + index_str, spot.fatlevel, keyFile); + saveToKeyfile(!pedited || spot_edited->recothrese, "Locallab", "Recothrese_" + index_str, spot.recothrese, keyFile); + saveToKeyfile(!pedited || spot_edited->lowthrese, "Locallab", "Lowthrese_" + index_str, spot.lowthrese, keyFile); + saveToKeyfile(!pedited || spot_edited->higthrese, "Locallab", "Higthrese_" + index_str, spot.higthrese, keyFile); + saveToKeyfile(!pedited || spot_edited->decaye, "Locallab", "Decaye_" + index_str, spot.decaye, keyFile); } // Shadow highlight if ((!pedited || spot_edited->visishadhigh) && spot.visishadhigh) { @@ -5694,6 +6039,10 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->fatanchorSH, "Locallab", "FatanchorSH_" + index_str, spot.fatanchorSH, keyFile); saveToKeyfile(!pedited || spot_edited->gamSH, "Locallab", "GamSH_" + index_str, spot.gamSH, keyFile); saveToKeyfile(!pedited || spot_edited->sloSH, "Locallab", "SloSH_" + index_str, spot.sloSH, keyFile); + saveToKeyfile(!pedited || spot_edited->recothress, "Locallab", "Recothress_" + index_str, spot.recothress, keyFile); + saveToKeyfile(!pedited || spot_edited->lowthress, "Locallab", "Lowthress_" + index_str, spot.lowthress, keyFile); + saveToKeyfile(!pedited || spot_edited->higthress, "Locallab", "Higthress_" + index_str, spot.higthress, keyFile); + saveToKeyfile(!pedited || spot_edited->decays, "Locallab", "Decays_" + index_str, spot.decays, keyFile); } // Vibrance if ((!pedited || spot_edited->visivibrance) && spot.visivibrance) { @@ -5723,6 +6072,10 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->strvibh, "Locallab", "Strvibh_" + index_str, spot.strvibh, keyFile); saveToKeyfile(!pedited || spot_edited->angvib, "Locallab", "Angvib_" + index_str, spot.angvib, keyFile); saveToKeyfile(!pedited || spot_edited->Lmaskvibcurve, "Locallab", "LmaskvibCurve_" + index_str, spot.Lmaskvibcurve, keyFile); + saveToKeyfile(!pedited || spot_edited->recothresv, "Locallab", "Recothresv_" + index_str, spot.recothresv, keyFile); + saveToKeyfile(!pedited || spot_edited->lowthresv, "Locallab", "Lowthresv_" + index_str, spot.lowthresv, keyFile); + saveToKeyfile(!pedited || spot_edited->higthresv, "Locallab", "Higthresv_" + index_str, spot.higthresv, keyFile); + saveToKeyfile(!pedited || spot_edited->decayv, "Locallab", "Decayv_" + index_str, spot.decayv, keyFile); } // Soft Light if ((!pedited || spot_edited->visisoft) && spot.visisoft) { @@ -5743,14 +6096,30 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->itera, "Locallab", "Iteramed_" + index_str, spot.itera, keyFile); saveToKeyfile(!pedited || spot_edited->guidbl, "Locallab", "Guidbl_" + index_str, spot.guidbl, keyFile); saveToKeyfile(!pedited || spot_edited->strbl, "Locallab", "Strbl_" + index_str, spot.strbl, keyFile); + saveToKeyfile(!pedited || spot_edited->recothres, "Locallab", "Recothres_" + index_str, spot.recothres, keyFile); + saveToKeyfile(!pedited || spot_edited->lowthres, "Locallab", "Lowthres_" + index_str, spot.lowthres, keyFile); + saveToKeyfile(!pedited || spot_edited->higthres, "Locallab", "Higthres_" + index_str, spot.higthres, keyFile); + saveToKeyfile(!pedited || spot_edited->recothresd, "Locallab", "Recothresd_" + index_str, spot.recothresd, keyFile); + saveToKeyfile(!pedited || spot_edited->lowthresd, "Locallab", "Lowthresd_" + index_str, spot.lowthresd, keyFile); + saveToKeyfile(!pedited || spot_edited->midthresd, "Locallab", "Midthresd_" + index_str, spot.midthresd, keyFile); + saveToKeyfile(!pedited || spot_edited->midthresdch, "Locallab", "Midthresdch_" + index_str, spot.midthresdch, keyFile); + saveToKeyfile(!pedited || spot_edited->higthresd, "Locallab", "Higthresd_" + index_str, spot.higthresd, keyFile); + saveToKeyfile(!pedited || spot_edited->decayd, "Locallab", "Decayd_" + index_str, spot.decayd, keyFile); saveToKeyfile(!pedited || spot_edited->isogr, "Locallab", "Isogr_" + index_str, spot.isogr, keyFile); saveToKeyfile(!pedited || spot_edited->strengr, "Locallab", "Strengr_" + index_str, spot.strengr, keyFile); saveToKeyfile(!pedited || spot_edited->scalegr, "Locallab", "Scalegr_" + index_str, spot.scalegr, keyFile); + saveToKeyfile(!pedited || spot_edited->divgr, "Locallab", "Divgr_" + index_str, spot.divgr, keyFile); saveToKeyfile(!pedited || spot_edited->epsbl, "Locallab", "Epsbl_" + index_str, spot.epsbl, keyFile); saveToKeyfile(!pedited || spot_edited->blMethod, "Locallab", "BlMethod_" + index_str, spot.blMethod, keyFile); saveToKeyfile(!pedited || spot_edited->chroMethod, "Locallab", "ChroMethod_" + index_str, spot.chroMethod, keyFile); saveToKeyfile(!pedited || spot_edited->quamethod, "Locallab", "QuaMethod_" + index_str, spot.quamethod, keyFile); saveToKeyfile(!pedited || spot_edited->blurMethod, "Locallab", "BlurMethod_" + index_str, spot.blurMethod, keyFile); + saveToKeyfile(!pedited || spot_edited->usemask, "Locallab", "Usemaskb_" + index_str, spot.usemask, keyFile); + saveToKeyfile(!pedited || spot_edited->invmaskd, "Locallab", "Invmaskd_" + index_str, spot.invmaskd, keyFile); + saveToKeyfile(!pedited || spot_edited->invmask, "Locallab", "Invmask_" + index_str, spot.invmask, keyFile); + saveToKeyfile(!pedited || spot_edited->levelthr, "Locallab", "Levelthr_" + index_str, spot.levelthr, keyFile); + saveToKeyfile(!pedited || spot_edited->lnoiselow, "Locallab", "Lnoiselow_" + index_str, spot.lnoiselow, keyFile); + saveToKeyfile(!pedited || spot_edited->levelthrlow, "Locallab", "Levelthrlow_" + index_str, spot.levelthrlow, keyFile); saveToKeyfile(!pedited || spot_edited->medMethod, "Locallab", "MedMethod_" + index_str, spot.medMethod, keyFile); saveToKeyfile(!pedited || spot_edited->activlum, "Locallab", "activlum_" + index_str, spot.activlum, keyFile); saveToKeyfile(!pedited || spot_edited->noiselumf, "Locallab", "noiselumf_" + index_str, spot.noiselumf, keyFile); @@ -5764,9 +6133,15 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->noisechrodetail, "Locallab", "noisechrodetail_" + index_str, spot.noisechrodetail, keyFile); saveToKeyfile(!pedited || spot_edited->adjblur, "Locallab", "Adjblur_" + index_str, spot.adjblur, keyFile); saveToKeyfile(!pedited || spot_edited->bilateral, "Locallab", "Bilateral_" + index_str, spot.bilateral, keyFile); + saveToKeyfile(!pedited || spot_edited->nlstr, "Locallab", "Nlstr_" + index_str, spot.nlstr, keyFile); + saveToKeyfile(!pedited || spot_edited->nldet, "Locallab", "Nldet_" + index_str, spot.nldet, keyFile); + saveToKeyfile(!pedited || spot_edited->nlpat, "Locallab", "Nlpat_" + index_str, spot.nlpat, keyFile); + saveToKeyfile(!pedited || spot_edited->nlrad, "Locallab", "Nlrad_" + index_str, spot.nlrad, keyFile); + saveToKeyfile(!pedited || spot_edited->nlgam, "Locallab", "Nlgam_" + index_str, spot.nlgam, keyFile); saveToKeyfile(!pedited || spot_edited->sensiden, "Locallab", "Sensiden_" + index_str, spot.sensiden, keyFile); saveToKeyfile(!pedited || spot_edited->detailthr, "Locallab", "Detailthr_" + index_str, spot.detailthr, keyFile); saveToKeyfile(!pedited || spot_edited->locwavcurveden, "Locallab", "LocwavCurveden_" + index_str, spot.locwavcurveden, keyFile); + saveToKeyfile(!pedited || spot_edited->locwavcurvehue, "Locallab", "LocwavCurvehue_" + index_str, spot.locwavcurvehue, keyFile); saveToKeyfile(!pedited || spot_edited->showmaskblMethodtyp, "Locallab", "Showmasktyp_" + index_str, spot.showmaskblMethodtyp, keyFile); saveToKeyfile(!pedited || spot_edited->CCmaskblcurve, "Locallab", "CCmaskblCurve_" + index_str, spot.CCmaskblcurve, keyFile); saveToKeyfile(!pedited || spot_edited->LLmaskblcurve, "Locallab", "LLmaskblCurve_" + index_str, spot.LLmaskblcurve, keyFile); @@ -5814,6 +6189,10 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->slomasktm, "Locallab", "Slomasktm_" + index_str, spot.slomasktm, keyFile); saveToKeyfile(!pedited || spot_edited->lapmasktm, "Locallab", "Lapmasktm_" + index_str, spot.lapmasktm, keyFile); saveToKeyfile(!pedited || spot_edited->Lmasktmcurve, "Locallab", "LmasktmCurve_" + index_str, spot.Lmasktmcurve, keyFile); + saveToKeyfile(!pedited || spot_edited->recothrest, "Locallab", "Recothrest_" + index_str, spot.recothrest, keyFile); + saveToKeyfile(!pedited || spot_edited->lowthrest, "Locallab", "Lowthrest_" + index_str, spot.lowthrest, keyFile); + saveToKeyfile(!pedited || spot_edited->higthrest, "Locallab", "Higthrest_" + index_str, spot.higthrest, keyFile); + saveToKeyfile(!pedited || spot_edited->decayt, "Locallab", "Decayt_" + index_str, spot.decayt, keyFile); } // Retinex if ((!pedited || spot_edited->visireti) && spot.visireti) { @@ -5833,7 +6212,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->inversret, "Locallab", "Inversret_" + index_str, spot.inversret, keyFile); saveToKeyfile(!pedited || spot_edited->equilret, "Locallab", "Equilret_" + index_str, spot.equilret, keyFile); saveToKeyfile(!pedited || spot_edited->loglin, "Locallab", "Loglin_" + index_str, spot.loglin, keyFile); - saveToKeyfile(!pedited || spot_edited->lumonly, "Locallab", "Lumonly_" + index_str, spot.lumonly, keyFile); + saveToKeyfile(!pedited || spot_edited->dehazeSaturation, "Locallab", "dehazeSaturation_" + index_str, spot.dehazeSaturation, keyFile); saveToKeyfile(!pedited || spot_edited->softradiusret, "Locallab", "Softradiusret_" + index_str, spot.softradiusret, keyFile); saveToKeyfile(!pedited || spot_edited->CCmaskreticurve, "Locallab", "CCmaskretiCurve_" + index_str, spot.CCmaskreticurve, keyFile); saveToKeyfile(!pedited || spot_edited->LLmaskreticurve, "Locallab", "LLmaskretiCurve_" + index_str, spot.LLmaskreticurve, keyFile); @@ -5853,6 +6232,10 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->cliptm, "Locallab", "Cliptm_" + index_str, spot.cliptm, keyFile); saveToKeyfile(!pedited || spot_edited->fftwreti, "Locallab", "Fftwreti_" + index_str, spot.fftwreti, keyFile); saveToKeyfile(!pedited || spot_edited->Lmaskreticurve, "Locallab", "LmaskretiCurve_" + index_str, spot.Lmaskreticurve, keyFile); + saveToKeyfile(!pedited || spot_edited->recothresr, "Locallab", "Recothresr_" + index_str, spot.recothresr, keyFile); + saveToKeyfile(!pedited || spot_edited->lowthresr, "Locallab", "Lowthresr_" + index_str, spot.lowthresr, keyFile); + saveToKeyfile(!pedited || spot_edited->higthresr, "Locallab", "Higthresr_" + index_str, spot.higthresr, keyFile); + saveToKeyfile(!pedited || spot_edited->decayr, "Locallab", "Decayr_" + index_str, spot.decayr, keyFile); } // Sharpening if ((!pedited || spot_edited->visisharp) && spot.visisharp) { @@ -5940,6 +6323,10 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->radmasklc, "Locallab", "Radmasklc_" + index_str, spot.radmasklc, keyFile); saveToKeyfile(!pedited || spot_edited->chromasklc, "Locallab", "Chromasklc_" + index_str, spot.chromasklc, keyFile); saveToKeyfile(!pedited || spot_edited->Lmasklccurve, "Locallab", "LmasklcCurve_" + index_str, spot.Lmasklccurve, keyFile); + saveToKeyfile(!pedited || spot_edited->recothresw, "Locallab", "Recothresw_" + index_str, spot.recothresw, keyFile); + saveToKeyfile(!pedited || spot_edited->lowthresw, "Locallab", "Lowthresw_" + index_str, spot.lowthresw, keyFile); + saveToKeyfile(!pedited || spot_edited->higthresw, "Locallab", "Higthresw_" + index_str, spot.higthresw, keyFile); + saveToKeyfile(!pedited || spot_edited->decayw, "Locallab", "Decayw_" + index_str, spot.decayw, keyFile); } // Contrast by detail levels if ((!pedited || spot_edited->visicbdl) && spot.visicbdl) { @@ -5967,22 +6354,55 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->slomaskcb, "Locallab", "Slomaskcb_" + index_str, spot.slomaskcb, keyFile); saveToKeyfile(!pedited || spot_edited->lapmaskcb, "Locallab", "Lapmaskcb_" + index_str, spot.lapmaskcb, keyFile); saveToKeyfile(!pedited || spot_edited->Lmaskcbcurve, "Locallab", "LmaskcbCurve_" + index_str, spot.Lmaskcbcurve, keyFile); + saveToKeyfile(!pedited || spot_edited->recothrescb, "Locallab", "Recothrescb_" + index_str, spot.recothrescb, keyFile); + saveToKeyfile(!pedited || spot_edited->lowthrescb, "Locallab", "Lowthrescb_" + index_str, spot.lowthrescb, keyFile); + saveToKeyfile(!pedited || spot_edited->higthrescb, "Locallab", "Higthrescb_" + index_str, spot.higthrescb, keyFile); + saveToKeyfile(!pedited || spot_edited->decaycb, "Locallab", "Decaycb_" + index_str, spot.decaycb, keyFile); } // Log encoding if ((!pedited || spot_edited->visilog) && spot.visilog) { saveToKeyfile(!pedited || spot_edited->explog, "Locallab", "Explog_" + index_str, spot.explog, keyFile); + saveToKeyfile(!pedited || spot_edited->complexlog, "Locallab", "Complexlog_" + index_str, spot.complexlog, keyFile); saveToKeyfile(!pedited || spot_edited->autocompute, "Locallab", "Autocompute_" + index_str, spot.autocompute, keyFile); saveToKeyfile(!pedited || spot_edited->sourceGray, "Locallab", "SourceGray_" + index_str, spot.sourceGray, keyFile); + saveToKeyfile(!pedited || spot_edited->sourceabs, "Locallab", "Sourceabs_" + index_str, spot.sourceabs, keyFile); + saveToKeyfile(!pedited || spot_edited->targabs, "Locallab", "Targabs_" + index_str, spot.targabs, keyFile); saveToKeyfile(!pedited || spot_edited->targetGray, "Locallab", "TargetGray_" + index_str, spot.targetGray, keyFile); + saveToKeyfile(!pedited || spot_edited->catad, "Locallab", "Catad_" + index_str, spot.catad, keyFile); + saveToKeyfile(!pedited || spot_edited->saturl, "Locallab", "Saturl_" + index_str, spot.saturl, keyFile); + saveToKeyfile(!pedited || spot_edited->LcurveL, "Locallab", "LCurveL_" + index_str, spot.LcurveL, keyFile); + saveToKeyfile(!pedited || spot_edited->lightl, "Locallab", "Lightl_" + index_str, spot.lightl, keyFile); + saveToKeyfile(!pedited || spot_edited->lightq, "Locallab", "Brightq_" + index_str, spot.lightq, keyFile); + saveToKeyfile(!pedited || spot_edited->contl, "Locallab", "Contl_" + index_str, spot.contl, keyFile); + saveToKeyfile(!pedited || spot_edited->contthres, "Locallab", "Contthres_" + index_str, spot.contthres, keyFile); + saveToKeyfile(!pedited || spot_edited->contq, "Locallab", "Contq_" + index_str, spot.contq, keyFile); + saveToKeyfile(!pedited || spot_edited->colorfl, "Locallab", "Colorfl_" + index_str, spot.colorfl, keyFile); saveToKeyfile(!pedited || spot_edited->Autogray, "Locallab", "Autogray_" + index_str, spot.Autogray, keyFile); saveToKeyfile(!pedited || spot_edited->fullimage, "Locallab", "Fullimage_" + index_str, spot.fullimage, keyFile); + saveToKeyfile(!pedited || spot_edited->repar, "Locallab", "Repart_" + index_str, spot.repar, keyFile); + saveToKeyfile(!pedited || spot_edited->ciecam, "Locallab", "Ciecam_" + index_str, spot.ciecam, keyFile); saveToKeyfile(!pedited || spot_edited->blackEv, "Locallab", "BlackEv_" + index_str, spot.blackEv, keyFile); saveToKeyfile(!pedited || spot_edited->whiteEv, "Locallab", "WhiteEv_" + index_str, spot.whiteEv, keyFile); saveToKeyfile(!pedited || spot_edited->detail, "Locallab", "Detail_" + index_str, spot.detail, keyFile); saveToKeyfile(!pedited || spot_edited->sensilog, "Locallab", "Sensilog_" + index_str, spot.sensilog, keyFile); saveToKeyfile(!pedited || spot_edited->baselog, "Locallab", "Baselog_" + index_str, spot.baselog, keyFile); + saveToKeyfile(!pedited || spot_edited->sursour, "Locallab", "Sursour_" + index_str, spot.sursour, keyFile); + saveToKeyfile(!pedited || spot_edited->surround, "Locallab", "Surround_" + index_str, spot.surround, keyFile); saveToKeyfile(!pedited || spot_edited->strlog, "Locallab", "Strlog_" + index_str, spot.strlog, keyFile); saveToKeyfile(!pedited || spot_edited->anglog, "Locallab", "Anglog_" + index_str, spot.anglog, keyFile); + saveToKeyfile(!pedited || spot_edited->CCmaskcurveL, "Locallab", "CCmaskCurveL_" + index_str, spot.CCmaskcurveL, keyFile); + saveToKeyfile(!pedited || spot_edited->LLmaskcurveL, "Locallab", "LLmaskCurveL_" + index_str, spot.LLmaskcurveL, keyFile); + saveToKeyfile(!pedited || spot_edited->HHmaskcurveL, "Locallab", "HHmaskCurveL_" + index_str, spot.HHmaskcurveL, keyFile); + saveToKeyfile(!pedited || spot_edited->enaLMask, "Locallab", "EnaLMask_" + index_str, spot.enaLMask, keyFile); + saveToKeyfile(!pedited || spot_edited->blendmaskL, "Locallab", "blendmaskL_" + index_str, spot.blendmaskL, keyFile); + saveToKeyfile(!pedited || spot_edited->radmaskL, "Locallab", "radmaskL_" + index_str, spot.radmaskL, keyFile); + saveToKeyfile(!pedited || spot_edited->chromaskL, "Locallab", "chromaskL_" + index_str, spot.chromaskL, keyFile); + saveToKeyfile(!pedited || spot_edited->LmaskcurveL, "Locallab", "LmaskCurveL_" + index_str, spot.LmaskcurveL, keyFile); + saveToKeyfile(!pedited || spot_edited->recothresl, "Locallab", "Recothresl_" + index_str, spot.recothresl, keyFile); + saveToKeyfile(!pedited || spot_edited->lowthresl, "Locallab", "Lowthresl_" + index_str, spot.lowthresl, keyFile); + saveToKeyfile(!pedited || spot_edited->higthresl, "Locallab", "Higthresl_" + index_str, spot.higthresl, keyFile); + saveToKeyfile(!pedited || spot_edited->decayl, "Locallab", "Decayl_" + index_str, spot.decayl, keyFile); + } //mask if ((!pedited || spot_edited->visimask) && spot.visimask) { @@ -6407,9 +6827,18 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->filmNegative.redRatio, "Film Negative", "RedRatio", filmNegative.redRatio, keyFile); saveToKeyfile(!pedited || pedited->filmNegative.greenExp, "Film Negative", "GreenExponent", filmNegative.greenExp, keyFile); saveToKeyfile(!pedited || pedited->filmNegative.blueRatio, "Film Negative", "BlueRatio", filmNegative.blueRatio, keyFile); - saveToKeyfile(!pedited || pedited->filmNegative.baseValues, "Film Negative", "RedBase", filmNegative.redBase, keyFile); - saveToKeyfile(!pedited || pedited->filmNegative.baseValues, "Film Negative", "GreenBase", filmNegative.greenBase, keyFile); - saveToKeyfile(!pedited || pedited->filmNegative.baseValues, "Film Negative", "BlueBase", filmNegative.blueBase, keyFile); + + // FIXME to be removed: only for backwards compatibility with an intermediate dev version + if (filmNegative.backCompat == FilmNegativeParams::BackCompat::V2) { + saveToKeyfile(!pedited || pedited->filmNegative.refInput, "Film Negative", "RedBase", filmNegative.refInput.r, keyFile); + saveToKeyfile(!pedited || pedited->filmNegative.refInput, "Film Negative", "GreenBase", filmNegative.refInput.g, keyFile); + saveToKeyfile(!pedited || pedited->filmNegative.refInput, "Film Negative", "BlueBase", filmNegative.refInput.b, keyFile); + } + + saveToKeyfile(!pedited || pedited->filmNegative.colorSpace, "Film Negative", "ColorSpace", toUnderlying(filmNegative.colorSpace), keyFile); + saveToKeyfile(!pedited || pedited->filmNegative.refInput, "Film Negative", "RefInput", filmNegative.refInput, keyFile); + saveToKeyfile(!pedited || pedited->filmNegative.refOutput, "Film Negative", "RefOutput", filmNegative.refOutput, keyFile); + saveToKeyfile(true, "Film Negative", "BackCompat", toUnderlying(filmNegative.backCompat), keyFile); // Preprocess WB saveToKeyfile(!pedited || pedited->raw.preprocessWB.mode, "RAW Preprocess WB", "Mode", toUnderlying(raw.preprocessWB.mode), keyFile); @@ -6556,6 +6985,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) if (keyFile.has_group("HLRecovery")) { assignFromKeyfile(keyFile, "HLRecovery", "Enabled", pedited, toneCurve.hrenabled, pedited->toneCurve.hrenabled); assignFromKeyfile(keyFile, "HLRecovery", "Method", pedited, toneCurve.method, pedited->toneCurve.method); + assignFromKeyfile(keyFile, "HLRecovery", "Hlbl", pedited, toneCurve.hlbl, pedited->toneCurve.hlbl); } if (keyFile.has_group("Channel Mixer")) { @@ -6650,7 +7080,16 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) if (keyFile.has_group("Retinex")) { assignFromKeyfile(keyFile, "Retinex", "Median", pedited, retinex.medianmap, pedited->retinex.medianmap); - assignFromKeyfile(keyFile, "Retinex", "complexMethod", pedited, retinex.complexmethod, pedited->retinex.complexmethod); + + if (keyFile.has_key("Retinex", "complexMethod")) { + assignFromKeyfile(keyFile, "Retinex", "complexMethod", pedited, retinex.complexmethod, pedited->retinex.complexmethod); + } else if (retinex.enabled) { + retinex.complexmethod = "expert"; + if (pedited) { + pedited->retinex.complexmethod = true; + } + } + assignFromKeyfile(keyFile, "Retinex", "RetinexMethod", pedited, retinex.retinexMethod, pedited->retinex.retinexMethod); assignFromKeyfile(keyFile, "Retinex", "mapMethod", pedited, retinex.mapMethod, pedited->retinex.mapMethod); assignFromKeyfile(keyFile, "Retinex", "viewMethod", pedited, retinex.viewMethod, pedited->retinex.viewMethod); @@ -6905,6 +7344,25 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Color appearance", "AutoDegreeout", pedited, colorappearance.autodegreeout, pedited->colorappearance.autodegreeout); + if (keyFile.has_key("Color appearance", "complex")) { + assignFromKeyfile(keyFile, "Color appearance", "complex", pedited, colorappearance.complexmethod, pedited->colorappearance.complexmethod); + } else if (colorappearance.enabled) { + colorappearance.complexmethod = "expert"; + if (pedited) { + pedited->colorappearance.complexmethod = true; + } + } + + if (keyFile.has_key("Color appearance", "ModelCat")) { + assignFromKeyfile(keyFile, "Color appearance", "ModelCat", pedited, colorappearance.modelmethod, pedited->colorappearance.modelmethod); + } else if (colorappearance.enabled) { + colorappearance.modelmethod = "02"; + if (pedited) { + pedited->colorappearance.modelmethod = true; + } + } + assignFromKeyfile(keyFile, "Color appearance", "CatCat", pedited, colorappearance.catmethod, pedited->colorappearance.catmethod); + assignFromKeyfile(keyFile, "Color appearance", "Surround", pedited, colorappearance.surround, pedited->colorappearance.surround); assignFromKeyfile(keyFile, "Color appearance", "Surrsrc", pedited, colorappearance.surrsrc, pedited->colorappearance.surrsrc); assignFromKeyfile(keyFile, "Color appearance", "AdaptLum", pedited, colorappearance.adaplum, pedited->colorappearance.adaplum); @@ -7247,11 +7705,13 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Balanh_" + index_str, pedited, spot.balanh, spotEdited.balanh); assignFromKeyfile(keyFile, "Locallab", "Colorde_" + index_str, pedited, spot.colorde, spotEdited.colorde); assignFromKeyfile(keyFile, "Locallab", "Colorscope_" + index_str, pedited, spot.colorscope, spotEdited.colorscope); + assignFromKeyfile(keyFile, "Locallab", "Avoidrad_" + index_str, pedited, spot.avoidrad, spotEdited.avoidrad); assignFromKeyfile(keyFile, "Locallab", "Transitweak_" + index_str, pedited, spot.transitweak, spotEdited.transitweak); assignFromKeyfile(keyFile, "Locallab", "Transitgrad_" + index_str, pedited, spot.transitgrad, spotEdited.transitgrad); assignFromKeyfile(keyFile, "Locallab", "Hishow_" + index_str, pedited, spot.hishow, spotEdited.hishow); assignFromKeyfile(keyFile, "Locallab", "Activ_" + index_str, pedited, spot.activ, spotEdited.activ); assignFromKeyfile(keyFile, "Locallab", "Avoid_" + index_str, pedited, spot.avoid, spotEdited.avoid); + assignFromKeyfile(keyFile, "Locallab", "Avoidmun_" + index_str, pedited, spot.avoidmun, spotEdited.avoidmun); assignFromKeyfile(keyFile, "Locallab", "Blwh_" + index_str, pedited, spot.blwh, spotEdited.blwh); assignFromKeyfile(keyFile, "Locallab", "Recurs_" + index_str, pedited, spot.recurs, spotEdited.recurs); assignFromKeyfile(keyFile, "Locallab", "Laplac_" + index_str, pedited, spot.laplac, spotEdited.laplac); @@ -7337,6 +7797,10 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) spotEdited.csthresholdcol = true; } + assignFromKeyfile(keyFile, "Locallab", "Recothresc_" + index_str, pedited, spot.recothresc, spotEdited.recothresc); + assignFromKeyfile(keyFile, "Locallab", "Lowthresc_" + index_str, pedited, spot.lowthresc, spotEdited.lowthresc); + assignFromKeyfile(keyFile, "Locallab", "Higthresc_" + index_str, pedited, spot.higthresc, spotEdited.higthresc); + assignFromKeyfile(keyFile, "Locallab", "Decayc_" + index_str, pedited, spot.decayc, spotEdited.decayc); // Exposure spot.visiexpose = assignFromKeyfile(keyFile, "Locallab", "Expexpose_" + index_str, pedited, spot.expexpose, spotEdited.expexpose); @@ -7359,6 +7823,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Strexp_" + index_str, pedited, spot.strexp, spotEdited.strexp); assignFromKeyfile(keyFile, "Locallab", "Angexp_" + index_str, pedited, spot.angexp, spotEdited.angexp); assignFromKeyfile(keyFile, "Locallab", "ExCurve_" + index_str, pedited, spot.excurve, spotEdited.excurve); + assignFromKeyfile(keyFile, "Locallab", "Norm_" + index_str, pedited, spot.norm, spotEdited.norm); assignFromKeyfile(keyFile, "Locallab", "Inversex_" + index_str, pedited, spot.inversex, spotEdited.inversex); assignFromKeyfile(keyFile, "Locallab", "EnaExpMask_" + index_str, pedited, spot.enaExpMask, spotEdited.enaExpMask); assignFromKeyfile(keyFile, "Locallab", "EnaExpMaskaft_" + index_str, pedited, spot.enaExpMaskaft, spotEdited.enaExpMaskaft); @@ -7385,6 +7850,10 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Fatdetail_" + index_str, pedited, spot.fatdetail, spotEdited.fatdetail); assignFromKeyfile(keyFile, "Locallab", "Fatanchor_" + index_str, pedited, spot.fatanchor, spotEdited.fatanchor); assignFromKeyfile(keyFile, "Locallab", "Fatlevel_" + index_str, pedited, spot.fatlevel, spotEdited.fatlevel); + assignFromKeyfile(keyFile, "Locallab", "Recothrese_" + index_str, pedited, spot.recothrese, spotEdited.recothrese); + assignFromKeyfile(keyFile, "Locallab", "Lowthrese_" + index_str, pedited, spot.lowthrese, spotEdited.lowthrese); + assignFromKeyfile(keyFile, "Locallab", "Higthrese_" + index_str, pedited, spot.higthrese, spotEdited.higthrese); + assignFromKeyfile(keyFile, "Locallab", "Decaye_" + index_str, pedited, spot.decaye, spotEdited.decaye); // Shadow highlight spot.visishadhigh = assignFromKeyfile(keyFile, "Locallab", "Expshadhigh_" + index_str, pedited, spot.expshadhigh, spotEdited.expshadhigh); @@ -7426,6 +7895,10 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "FatanchorSH_" + index_str, pedited, spot.fatanchorSH, spotEdited.fatanchorSH); assignFromKeyfile(keyFile, "Locallab", "GamSH_" + index_str, pedited, spot.gamSH, spotEdited.gamSH); assignFromKeyfile(keyFile, "Locallab", "SloSH_" + index_str, pedited, spot.sloSH, spotEdited.sloSH); + assignFromKeyfile(keyFile, "Locallab", "Recothress_" + index_str, pedited, spot.recothress, spotEdited.recothress); + assignFromKeyfile(keyFile, "Locallab", "Lowthress_" + index_str, pedited, spot.lowthress, spotEdited.lowthress); + assignFromKeyfile(keyFile, "Locallab", "Higthress_" + index_str, pedited, spot.higthress, spotEdited.higthress); + assignFromKeyfile(keyFile, "Locallab", "Decays_" + index_str, pedited, spot.decays, spotEdited.decays); // Vibrance spot.visivibrance = assignFromKeyfile(keyFile, "Locallab", "Expvibrance_" + index_str, pedited, spot.expvibrance, spotEdited.expvibrance); @@ -7468,6 +7941,10 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Strvibh_" + index_str, pedited, spot.strvibh, spotEdited.strvibh); assignFromKeyfile(keyFile, "Locallab", "Angvib_" + index_str, pedited, spot.angvib, spotEdited.angvib); assignFromKeyfile(keyFile, "Locallab", "LmaskvibCurve_" + index_str, pedited, spot.Lmaskvibcurve, spotEdited.Lmaskvibcurve); + assignFromKeyfile(keyFile, "Locallab", "Recothresv_" + index_str, pedited, spot.recothresv, spotEdited.recothresv); + assignFromKeyfile(keyFile, "Locallab", "Lowthresv_" + index_str, pedited, spot.lowthresv, spotEdited.lowthresv); + assignFromKeyfile(keyFile, "Locallab", "Higthresv_" + index_str, pedited, spot.higthresv, spotEdited.higthresv); + assignFromKeyfile(keyFile, "Locallab", "Decayv_" + index_str, pedited, spot.decayv, spotEdited.decayv); // Soft Light spot.visisoft = assignFromKeyfile(keyFile, "Locallab", "Expsoft_" + index_str, pedited, spot.expsoft, spotEdited.expsoft); @@ -7494,14 +7971,30 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Iteramed_" + index_str, pedited, spot.itera, spotEdited.itera); assignFromKeyfile(keyFile, "Locallab", "Guidbl_" + index_str, pedited, spot.guidbl, spotEdited.guidbl); assignFromKeyfile(keyFile, "Locallab", "Strbl_" + index_str, pedited, spot.strbl, spotEdited.strbl); + assignFromKeyfile(keyFile, "Locallab", "Recothres_" + index_str, pedited, spot.recothres, spotEdited.recothres); + assignFromKeyfile(keyFile, "Locallab", "Lowthres_" + index_str, pedited, spot.lowthres, spotEdited.lowthres); + assignFromKeyfile(keyFile, "Locallab", "Higthres_" + index_str, pedited, spot.higthres, spotEdited.higthres); + assignFromKeyfile(keyFile, "Locallab", "Recothresd_" + index_str, pedited, spot.recothresd, spotEdited.recothresd); + assignFromKeyfile(keyFile, "Locallab", "Lowthresd_" + index_str, pedited, spot.lowthresd, spotEdited.lowthresd); + assignFromKeyfile(keyFile, "Locallab", "Midthresd_" + index_str, pedited, spot.midthresd, spotEdited.midthresd); + assignFromKeyfile(keyFile, "Locallab", "Midthresdch_" + index_str, pedited, spot.midthresdch, spotEdited.midthresdch); + assignFromKeyfile(keyFile, "Locallab", "Higthresd_" + index_str, pedited, spot.higthresd, spotEdited.higthresd); + assignFromKeyfile(keyFile, "Locallab", "Decayd_" + index_str, pedited, spot.decayd, spotEdited.decayd); assignFromKeyfile(keyFile, "Locallab", "Isogr_" + index_str, pedited, spot.isogr, spotEdited.isogr); assignFromKeyfile(keyFile, "Locallab", "Strengr_" + index_str, pedited, spot.strengr, spotEdited.strengr); assignFromKeyfile(keyFile, "Locallab", "Scalegr_" + index_str, pedited, spot.scalegr, spotEdited.scalegr); + assignFromKeyfile(keyFile, "Locallab", "Divgr_" + index_str, pedited, spot.divgr, spotEdited.divgr); assignFromKeyfile(keyFile, "Locallab", "Epsbl_" + index_str, pedited, spot.epsbl, spotEdited.epsbl); assignFromKeyfile(keyFile, "Locallab", "BlMethod_" + index_str, pedited, spot.blMethod, spotEdited.blMethod); assignFromKeyfile(keyFile, "Locallab", "ChroMethod_" + index_str, pedited, spot.chroMethod, spotEdited.chroMethod); assignFromKeyfile(keyFile, "Locallab", "QuaMethod_" + index_str, pedited, spot.quamethod, spotEdited.quamethod); assignFromKeyfile(keyFile, "Locallab", "BlurMethod_" + index_str, pedited, spot.blurMethod, spotEdited.blurMethod); + assignFromKeyfile(keyFile, "Locallab", "Usemaskb_" + index_str, pedited, spot.usemask, spotEdited.usemask); + assignFromKeyfile(keyFile, "Locallab", "Invmaskd_" + index_str, pedited, spot.invmaskd, spotEdited.invmaskd); + assignFromKeyfile(keyFile, "Locallab", "Invmask_" + index_str, pedited, spot.invmask, spotEdited.invmask); + assignFromKeyfile(keyFile, "Locallab", "Levelthr_" + index_str, pedited, spot.levelthr, spotEdited.levelthr); + assignFromKeyfile(keyFile, "Locallab", "Lnoiselow_" + index_str, pedited, spot.lnoiselow, spotEdited.lnoiselow); + assignFromKeyfile(keyFile, "Locallab", "Levelthrlow_" + index_str, pedited, spot.levelthrlow, spotEdited.levelthrlow); assignFromKeyfile(keyFile, "Locallab", "MedMethod_" + index_str, pedited, spot.medMethod, spotEdited.medMethod); assignFromKeyfile(keyFile, "Locallab", "activlum_" + index_str, pedited, spot.activlum, spotEdited.activlum); assignFromKeyfile(keyFile, "Locallab", "noiselumf_" + index_str, pedited, spot.noiselumf, spotEdited.noiselumf); @@ -7515,9 +8008,15 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "noisechrodetail_" + index_str, pedited, spot.noisechrodetail, spotEdited.noisechrodetail); assignFromKeyfile(keyFile, "Locallab", "Adjblur_" + index_str, pedited, spot.adjblur, spotEdited.adjblur); assignFromKeyfile(keyFile, "Locallab", "Bilateral_" + index_str, pedited, spot.bilateral, spotEdited.bilateral); + assignFromKeyfile(keyFile, "Locallab", "Nlstr_" + index_str, pedited, spot.nlstr, spotEdited.nlstr); + assignFromKeyfile(keyFile, "Locallab", "Nldet_" + index_str, pedited, spot.nldet, spotEdited.nldet); + assignFromKeyfile(keyFile, "Locallab", "Nlpat_" + index_str, pedited, spot.nlpat, spotEdited.nlpat); + assignFromKeyfile(keyFile, "Locallab", "Nlrad_" + index_str, pedited, spot.nlrad, spotEdited.nlrad); + assignFromKeyfile(keyFile, "Locallab", "Nlgam_" + index_str, pedited, spot.nlgam, spotEdited.nlgam); assignFromKeyfile(keyFile, "Locallab", "Sensiden_" + index_str, pedited, spot.sensiden, spotEdited.sensiden); assignFromKeyfile(keyFile, "Locallab", "Detailthr_" + index_str, pedited, spot.detailthr, spotEdited.detailthr); assignFromKeyfile(keyFile, "Locallab", "LocwavCurveden_" + index_str, pedited, spot.locwavcurveden, spotEdited.locwavcurveden); + assignFromKeyfile(keyFile, "Locallab", "LocwavCurvehue_" + index_str, pedited, spot.locwavcurvehue, spotEdited.locwavcurvehue); assignFromKeyfile(keyFile, "Locallab", "Showmasktyp_" + index_str, pedited, spot.showmaskblMethodtyp, spotEdited.showmaskblMethodtyp); assignFromKeyfile(keyFile, "Locallab", "CCmaskblCurve_" + index_str, pedited, spot.CCmaskblcurve, spotEdited.CCmaskblcurve); assignFromKeyfile(keyFile, "Locallab", "LLmaskblCurve_" + index_str, pedited, spot.LLmaskblcurve, spotEdited.LLmaskblcurve); @@ -7577,6 +8076,10 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Slomasktm_" + index_str, pedited, spot.slomasktm, spotEdited.slomasktm); assignFromKeyfile(keyFile, "Locallab", "Lapmasktm_" + index_str, pedited, spot.lapmasktm, spotEdited.lapmasktm); assignFromKeyfile(keyFile, "Locallab", "LmasktmCurve_" + index_str, pedited, spot.Lmasktmcurve, spotEdited.Lmasktmcurve); + assignFromKeyfile(keyFile, "Locallab", "Recothrest_" + index_str, pedited, spot.recothrest, spotEdited.recothrest); + assignFromKeyfile(keyFile, "Locallab", "Lowthrest_" + index_str, pedited, spot.lowthrest, spotEdited.lowthrest); + assignFromKeyfile(keyFile, "Locallab", "Higthrest_" + index_str, pedited, spot.higthrest, spotEdited.higthrest); + assignFromKeyfile(keyFile, "Locallab", "Decayt_" + index_str, pedited, spot.decayt, spotEdited.decayt); // Retinex spot.visireti = assignFromKeyfile(keyFile, "Locallab", "Expreti_" + index_str, pedited, spot.expreti, spotEdited.expreti); @@ -7599,7 +8102,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Inversret_" + index_str, pedited, spot.inversret, spotEdited.inversret); assignFromKeyfile(keyFile, "Locallab", "Equilret_" + index_str, pedited, spot.equilret, spotEdited.equilret); assignFromKeyfile(keyFile, "Locallab", "Loglin_" + index_str, pedited, spot.loglin, spotEdited.loglin); - assignFromKeyfile(keyFile, "Locallab", "Lumonly_" + index_str, pedited, spot.lumonly, spotEdited.lumonly); + assignFromKeyfile(keyFile, "Locallab", "dehazeSaturation" + index_str, pedited, spot.dehazeSaturation, spotEdited.dehazeSaturation); assignFromKeyfile(keyFile, "Locallab", "Softradiusret_" + index_str, pedited, spot.softradiusret, spotEdited.softradiusret); assignFromKeyfile(keyFile, "Locallab", "CCmaskretiCurve_" + index_str, pedited, spot.CCmaskreticurve, spotEdited.CCmaskreticurve); assignFromKeyfile(keyFile, "Locallab", "LLmaskretiCurve_" + index_str, pedited, spot.LLmaskreticurve, spotEdited.LLmaskreticurve); @@ -7619,6 +8122,10 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Cliptm_" + index_str, pedited, spot.cliptm, spotEdited.cliptm); assignFromKeyfile(keyFile, "Locallab", "Fftwreti_" + index_str, pedited, spot.fftwreti, spotEdited.fftwreti); assignFromKeyfile(keyFile, "Locallab", "LmaskretiCurve_" + index_str, pedited, spot.Lmaskreticurve, spotEdited.Lmaskreticurve); + assignFromKeyfile(keyFile, "Locallab", "Recothresr_" + index_str, pedited, spot.recothresr, spotEdited.recothresr); + assignFromKeyfile(keyFile, "Locallab", "Lowthresr_" + index_str, pedited, spot.lowthresr, spotEdited.lowthresr); + assignFromKeyfile(keyFile, "Locallab", "Higthresr_" + index_str, pedited, spot.higthresr, spotEdited.higthresr); + assignFromKeyfile(keyFile, "Locallab", "Decayr_" + index_str, pedited, spot.decayr, spotEdited.decayr); // Sharpening spot.visisharp = assignFromKeyfile(keyFile, "Locallab", "Expsharp_" + index_str, pedited, spot.expsharp, spotEdited.expsharp); @@ -7723,6 +8230,10 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Radmasklc_" + index_str, pedited, spot.radmasklc, spotEdited.radmasklc); assignFromKeyfile(keyFile, "Locallab", "Chromasklc_" + index_str, pedited, spot.chromasklc, spotEdited.chromasklc); assignFromKeyfile(keyFile, "Locallab", "LmasklcCurve_" + index_str, pedited, spot.Lmasklccurve, spotEdited.Lmasklccurve); + assignFromKeyfile(keyFile, "Locallab", "Recothresw_" + index_str, pedited, spot.recothresw, spotEdited.recothresw); + assignFromKeyfile(keyFile, "Locallab", "Lowthresw_" + index_str, pedited, spot.lowthresw, spotEdited.lowthresw); + assignFromKeyfile(keyFile, "Locallab", "Higthresw_" + index_str, pedited, spot.higthresw, spotEdited.higthresw); + assignFromKeyfile(keyFile, "Locallab", "Decayw_" + index_str, pedited, spot.decayw, spotEdited.decayw); // Contrast by detail levels spot.visicbdl = assignFromKeyfile(keyFile, "Locallab", "Expcbdl_" + index_str, pedited, spot.expcbdl, spotEdited.expcbdl); @@ -7753,25 +8264,58 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Slomaskcb_" + index_str, pedited, spot.slomaskcb, spotEdited.slomaskcb); assignFromKeyfile(keyFile, "Locallab", "Lapmaskcb_" + index_str, pedited, spot.lapmaskcb, spotEdited.lapmaskcb); assignFromKeyfile(keyFile, "Locallab", "LmaskcbCurve_" + index_str, pedited, spot.Lmaskcbcurve, spotEdited.Lmaskcbcurve); + assignFromKeyfile(keyFile, "Locallab", "Recothrescb_" + index_str, pedited, spot.recothrescb, spotEdited.recothrescb); + assignFromKeyfile(keyFile, "Locallab", "Lowthrescb_" + index_str, pedited, spot.lowthrescb, spotEdited.lowthrescb); + assignFromKeyfile(keyFile, "Locallab", "Higthrescb_" + index_str, pedited, spot.higthrescb, spotEdited.higthrescb); + assignFromKeyfile(keyFile, "Locallab", "Decaycb_" + index_str, pedited, spot.decaycb, spotEdited.decaycb); // Log encoding spot.visilog = assignFromKeyfile(keyFile, "Locallab", "Explog_" + index_str, pedited, spot.explog, spotEdited.explog); if (spot.visilog) { spotEdited.visilog = true; } + assignFromKeyfile(keyFile, "Locallab", "Complexlog_" + index_str, pedited, spot.complexlog, spotEdited.complexlog); assignFromKeyfile(keyFile, "Locallab", "Autocompute_" + index_str, pedited, spot.autocompute, spotEdited.autocompute); assignFromKeyfile(keyFile, "Locallab", "SourceGray_" + index_str, pedited, spot.sourceGray, spotEdited.sourceGray); + assignFromKeyfile(keyFile, "Locallab", "Sourceabs_" + index_str, pedited, spot.sourceabs, spotEdited.sourceabs); + assignFromKeyfile(keyFile, "Locallab", "Targabs_" + index_str, pedited, spot.targabs, spotEdited.targabs); assignFromKeyfile(keyFile, "Locallab", "TargetGray_" + index_str, pedited, spot.targetGray, spotEdited.targetGray); + assignFromKeyfile(keyFile, "Locallab", "Catad_" + index_str, pedited, spot.catad, spotEdited.catad); + assignFromKeyfile(keyFile, "Locallab", "Saturl_" + index_str, pedited, spot.saturl, spotEdited.saturl); + assignFromKeyfile(keyFile, "Locallab", "Lightl_" + index_str, pedited, spot.lightl, spotEdited.lightl); + assignFromKeyfile(keyFile, "Locallab", "Brightq_" + index_str, pedited, spot.lightq, spotEdited.lightq); + assignFromKeyfile(keyFile, "Locallab", "Contl_" + index_str, pedited, spot.contl, spotEdited.contl); + assignFromKeyfile(keyFile, "Locallab", "Contthres_" + index_str, pedited, spot.contthres, spotEdited.contthres); + assignFromKeyfile(keyFile, "Locallab", "Contq_" + index_str, pedited, spot.contq, spotEdited.contq); + assignFromKeyfile(keyFile, "Locallab", "Colorfl_" + index_str, pedited, spot.colorfl, spotEdited.colorfl); + assignFromKeyfile(keyFile, "Locallab", "LCurveL_" + index_str, pedited, spot.LcurveL, spotEdited.LcurveL); assignFromKeyfile(keyFile, "Locallab", "AutoGray_" + index_str, pedited, spot.Autogray, spotEdited.Autogray); assignFromKeyfile(keyFile, "Locallab", "Fullimage_" + index_str, pedited, spot.fullimage, spotEdited.fullimage); + assignFromKeyfile(keyFile, "Locallab", "Repart_" + index_str, pedited, spot.repar, spotEdited.repar); + assignFromKeyfile(keyFile, "Locallab", "Ciecam_" + index_str, pedited, spot.ciecam, spotEdited.ciecam); assignFromKeyfile(keyFile, "Locallab", "BlackEv_" + index_str, pedited, spot.blackEv, spotEdited.blackEv); assignFromKeyfile(keyFile, "Locallab", "WhiteEv_" + index_str, pedited, spot.whiteEv, spotEdited.whiteEv); assignFromKeyfile(keyFile, "Locallab", "Detail_" + index_str, pedited, spot.detail, spotEdited.detail); assignFromKeyfile(keyFile, "Locallab", "Sensilog_" + index_str, pedited, spot.sensilog, spotEdited.sensilog); assignFromKeyfile(keyFile, "Locallab", "Baselog_" + index_str, pedited, spot.baselog, spotEdited.baselog); + assignFromKeyfile(keyFile, "Locallab", "Sursour_" + index_str, pedited, spot.sursour, spotEdited.sursour); + assignFromKeyfile(keyFile, "Locallab", "Surround_" + index_str, pedited, spot.surround, spotEdited.surround); assignFromKeyfile(keyFile, "Locallab", "Strlog_" + index_str, pedited, spot.strlog, spotEdited.strlog); assignFromKeyfile(keyFile, "Locallab", "Anglog_" + index_str, pedited, spot.anglog, spotEdited.anglog); + assignFromKeyfile(keyFile, "Locallab", "CCmaskCurveL_" + index_str, pedited, spot.CCmaskcurveL, spotEdited.CCmaskcurveL); + assignFromKeyfile(keyFile, "Locallab", "LLmaskCurveL_" + index_str, pedited, spot.LLmaskcurveL, spotEdited.LLmaskcurveL); + assignFromKeyfile(keyFile, "Locallab", "HHmaskCurveL_" + index_str, pedited, spot.HHmaskcurveL, spotEdited.HHmaskcurveL); + assignFromKeyfile(keyFile, "Locallab", "EnaLMask_" + index_str, pedited, spot.enaLMask, spotEdited.enaLMask); + assignFromKeyfile(keyFile, "Locallab", "blendmaskL_" + index_str, pedited, spot.blendmaskL, spotEdited.blendmaskL); + assignFromKeyfile(keyFile, "Locallab", "radmaskL_" + index_str, pedited, spot.radmaskL, spotEdited.radmaskL); + assignFromKeyfile(keyFile, "Locallab", "chromaskL_" + index_str, pedited, spot.chromaskL, spotEdited.chromaskL); + assignFromKeyfile(keyFile, "Locallab", "LmaskCurveL_" + index_str, pedited, spot.LmaskcurveL, spotEdited.LmaskcurveL); + assignFromKeyfile(keyFile, "Locallab", "Recothresl_" + index_str, pedited, spot.recothresl, spotEdited.recothresl); + assignFromKeyfile(keyFile, "Locallab", "Lowthresl_" + index_str, pedited, spot.lowthresl, spotEdited.lowthresl); + assignFromKeyfile(keyFile, "Locallab", "Higthresl_" + index_str, pedited, spot.higthresl, spotEdited.higthresl); + assignFromKeyfile(keyFile, "Locallab", "Decayl_" + index_str, pedited, spot.decayl, spotEdited.decayl); + // mask spot.visimask = assignFromKeyfile(keyFile, "Locallab", "Expmask_" + index_str, pedited, spot.expmask, spotEdited.expmask); assignFromKeyfile(keyFile, "Locallab", "Complexmask_" + index_str, pedited, spot.complexmask, spotEdited.complexmask); @@ -8032,7 +8576,16 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Wavelet", "ChoiceLevMethod", pedited, wavelet.CLmethod, pedited->wavelet.CLmethod); assignFromKeyfile(keyFile, "Wavelet", "BackMethod", pedited, wavelet.Backmethod, pedited->wavelet.Backmethod); assignFromKeyfile(keyFile, "Wavelet", "TilesMethod", pedited, wavelet.Tilesmethod, pedited->wavelet.Tilesmethod); - assignFromKeyfile(keyFile, "Wavelet", "complexMethod", pedited, wavelet.complexmethod, pedited->wavelet.complexmethod); + + if (keyFile.has_key("Wavelet", "complexMethod")) { + assignFromKeyfile(keyFile, "Wavelet", "complexMethod", pedited, wavelet.complexmethod, pedited->wavelet.complexmethod); + } else if (wavelet.enabled) { + wavelet.complexmethod = "expert"; + if (pedited) { + pedited->wavelet.complexmethod = true; + } + } + assignFromKeyfile(keyFile, "Wavelet", "denMethod", pedited, wavelet.denmethod, pedited->wavelet.denmethod); assignFromKeyfile(keyFile, "Wavelet", "mixMethod", pedited, wavelet.mixmethod, pedited->wavelet.mixmethod); assignFromKeyfile(keyFile, "Wavelet", "sliMethod", pedited, wavelet.slimethod, pedited->wavelet.slimethod); @@ -8362,7 +8915,15 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Dehaze", "Strength", pedited, dehaze.strength, pedited->dehaze.strength); assignFromKeyfile(keyFile, "Dehaze", "ShowDepthMap", pedited, dehaze.showDepthMap, pedited->dehaze.showDepthMap); assignFromKeyfile(keyFile, "Dehaze", "Depth", pedited, dehaze.depth, pedited->dehaze.depth); - assignFromKeyfile(keyFile, "Dehaze", "Luminance", pedited, dehaze.luminance, pedited->dehaze.luminance); + if (ppVersion < 349 && dehaze.enabled && keyFile.has_key("Dehaze", "Luminance")) { + const bool luminance = keyFile.get_boolean("Dehaze", "Luminance"); + dehaze.saturation = luminance ? 0 : 100; + if (pedited) { + pedited->dehaze.saturation = true; + } + } else { + assignFromKeyfile(keyFile, "Dehaze", "Saturation", pedited, dehaze.saturation, pedited->dehaze.saturation); + } } if (keyFile.has_group("Film Simulation")) { @@ -8725,23 +9286,48 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Film Negative", "RedRatio", pedited, filmNegative.redRatio, pedited->filmNegative.redRatio); assignFromKeyfile(keyFile, "Film Negative", "GreenExponent", pedited, filmNegative.greenExp, pedited->filmNegative.greenExp); assignFromKeyfile(keyFile, "Film Negative", "BlueRatio", pedited, filmNegative.blueRatio, pedited->filmNegative.blueRatio); - if (ppVersion >= 347) { + + if (ppVersion < 347) { + // Backwards compatibility with RT v5.8 + filmNegative.colorSpace = FilmNegativeParams::ColorSpace::INPUT; + filmNegative.backCompat = FilmNegativeParams::BackCompat::V1; + if (pedited) { + pedited->filmNegative.refInput = true; + pedited->filmNegative.refOutput = true; + pedited->filmNegative.colorSpace = true; + } + + } else if (!keyFile.has_key("Film Negative", "RefInput")) { + // Backwards compatibility with intermediate dev version (after v5.8) using film base values bool r, g, b; - assignFromKeyfile(keyFile, "Film Negative", "RedBase", pedited, filmNegative.redBase, r); - assignFromKeyfile(keyFile, "Film Negative", "GreenBase", pedited, filmNegative.greenBase, g); - assignFromKeyfile(keyFile, "Film Negative", "BlueBase", pedited, filmNegative.blueBase, b); + assignFromKeyfile(keyFile, "Film Negative", "RedBase", pedited, filmNegative.refInput.r, r); + assignFromKeyfile(keyFile, "Film Negative", "GreenBase", pedited, filmNegative.refInput.g, g); + assignFromKeyfile(keyFile, "Film Negative", "BlueBase", pedited, filmNegative.refInput.b, b); if (pedited) { - pedited->filmNegative.baseValues = r || g || b; + pedited->filmNegative.refInput = r || g || b; + pedited->filmNegative.refOutput = r || g || b; + pedited->filmNegative.colorSpace = true; } - } else { - // Backwards compatibility with film negative in RT 5.7: use special film base value -1, - // to signal that the old channel scaling method should be used. - filmNegative.redBase = -1.f; - filmNegative.greenBase = -1.f; - filmNegative.blueBase = -1.f; - if (pedited) { - pedited->filmNegative.baseValues = true; + + filmNegative.colorSpace = FilmNegativeParams::ColorSpace::INPUT; + // Special value -1 used to mean that this should be treated as a v5.8 profile + filmNegative.backCompat = (filmNegative.refInput.r == -1.f) + ? FilmNegativeParams::BackCompat::V1 + : FilmNegativeParams::BackCompat::V2; + + } else { // current version + + assignFromKeyfile(keyFile, "Film Negative", "RefInput", pedited, filmNegative.refInput, pedited->filmNegative.refInput); + assignFromKeyfile(keyFile, "Film Negative", "RefOutput", pedited, filmNegative.refOutput, pedited->filmNegative.refOutput); + + int cs = toUnderlying(filmNegative.colorSpace); + assignFromKeyfile(keyFile, "Film Negative", "ColorSpace", pedited, cs, pedited->filmNegative.colorSpace); + filmNegative.colorSpace = static_cast(cs); + + if (keyFile.has_key("Film Negative", "BackCompat")) { + filmNegative.backCompat = FilmNegativeParams::BackCompat(keyFile.get_integer("Film Negative", "BackCompat")); } + } } diff --git a/rtengine/procparams.h b/rtengine/procparams.h index a52c8677e..f72d12f81 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -297,6 +297,7 @@ struct ToneCurveParams { int saturation; int shcompr; int hlcompr; // Highlight Recovery's compression + int hlbl; // Highlight Recovery's compression int hlcomprthresh; // Highlight Recovery's threshold bool histmatching; // histogram matching bool fromHistMatching; @@ -672,6 +673,9 @@ struct ColorAppearanceParams { TcMode curveMode; TcMode curveMode2; CtcMode curveMode3; + Glib::ustring complexmethod; + Glib::ustring modelmethod; + Glib::ustring catmethod; Glib::ustring surround; Glib::ustring surrsrc; @@ -1005,11 +1009,13 @@ struct LocallabParams { double balanh; double colorde; double colorscope; + double avoidrad; double transitweak; double transitgrad; bool hishow; bool activ; bool avoid; + bool avoidmun; bool blwh; bool recurs; bool laplac; @@ -1082,6 +1088,10 @@ struct LocallabParams { std::vector Lmaskcurve; std::vector LLmaskcolcurvewav; Threshold csthresholdcol; + double recothresc; + double lowthresc; + double higthresc; + double decayc; // Exposure bool visiexpose; bool expexpose; @@ -1099,6 +1109,7 @@ struct LocallabParams { double strexp; double angexp; std::vector excurve; + bool norm; bool inversex; bool enaExpMask; bool enaExpMaskaft; @@ -1125,6 +1136,10 @@ struct LocallabParams { double fatdetail; double fatanchor; double fatlevel; + double recothrese; + double lowthrese; + double higthrese; + double decaye; // Shadow highlight bool visishadhigh; bool expshadhigh; @@ -1157,6 +1172,10 @@ struct LocallabParams { double fatanchorSH; double gamSH; double sloSH; + double recothress; + double lowthress; + double higthress; + double decays; // Vibrance bool visivibrance; bool expvibrance; @@ -1185,6 +1204,10 @@ struct LocallabParams { double strvibh; double angvib; std::vector Lmaskvibcurve; + double recothresv; + double lowthresv; + double higthresv; + double decayv; // Soft Light bool visisoft; bool expsoft; @@ -1203,15 +1226,31 @@ struct LocallabParams { int itera; int guidbl; int strbl; + double recothres; + double lowthres; + double higthres; + double recothresd; + double lowthresd; + double midthresd; + double midthresdch; + double higthresd; + double decayd; int isogr; int strengr; int scalegr; + double divgr; int epsbl; Glib::ustring blMethod; // blur, med, guid Glib::ustring chroMethod; // lum, chr, all Glib::ustring quamethod; // cons agre Glib::ustring blurMethod; // norm, inv Glib::ustring medMethod; // none, 33, 55, 77, 99 + bool usemask; + bool invmaskd; + bool invmask; + double levelthr; + double lnoiselow; + double levelthrlow; bool activlum; double noiselumf; double noiselumf0; @@ -1224,9 +1263,15 @@ struct LocallabParams { double noisechrodetail; int adjblur; int bilateral; + int nlstr; + int nldet; + int nlpat; + int nlrad; + double nlgam; int sensiden; int detailthr; std::vector locwavcurveden; + std::vector locwavcurvehue; Glib::ustring showmaskblMethodtyp; std::vector CCmaskblcurve; std::vector LLmaskblcurve; @@ -1273,6 +1318,10 @@ struct LocallabParams { double slomasktm; double lapmasktm; std::vector Lmasktmcurve; + double recothrest; + double lowthrest; + double higthrest; + double decayt; // Retinex bool visireti; bool expreti; @@ -1291,7 +1340,7 @@ struct LocallabParams { bool inversret; bool equilret; bool loglin; - bool lumonly; + double dehazeSaturation; double softradiusret; std::vector CCmaskreticurve; std::vector LLmaskreticurve; @@ -1311,6 +1360,10 @@ struct LocallabParams { double cliptm; bool fftwreti; std::vector Lmaskreticurve; + double recothresr; + double lowthresr; + double higthresr; + double decayr; // Sharpening bool visisharp; bool expsharp; @@ -1396,6 +1449,10 @@ struct LocallabParams { double radmasklc; double chromasklc; std::vector Lmasklccurve; + double recothresw; + double lowthresw; + double higthresw; + double decayw; // Contrast by detail levels bool visicbdl; bool expcbdl; @@ -1418,21 +1475,54 @@ struct LocallabParams { double slomaskcb; double lapmaskcb; std::vector Lmaskcbcurve; + double recothrescb; + double lowthrescb; + double higthrescb; + double decaycb; // Log encoding bool visilog; bool explog; + int complexlog; bool autocompute; double sourceGray; + double sourceabs; + double targabs; double targetGray; + double catad; + double saturl; + double lightl; + double lightq; + double contl; + double contthres; + double contq; + double colorfl; + std::vector LcurveL; bool Autogray; bool fullimage; + double repar; + bool ciecam; double blackEv; double whiteEv; double detail; int sensilog; + Glib::ustring sursour; + Glib::ustring surround; double baselog; double strlog; double anglog; + std::vector CCmaskcurveL; + std::vector LLmaskcurveL; + std::vector HHmaskcurveL; + bool enaLMask; + double blendmaskL; + double radmaskL; + double chromaskL; + std::vector LmaskcurveL; + double recothresl; + double lowthresl; + double higthresl; + double decayl; + // mask bool visimask; int complexmask; @@ -1968,9 +2058,9 @@ struct SoftLightParams { struct DehazeParams { bool enabled; int strength; + int saturation; bool showDepthMap; int depth; - bool luminance; DehazeParams(); @@ -2173,10 +2263,28 @@ struct FilmNegativeParams { double greenExp; double blueRatio; - double redBase; - double greenBase; - double blueBase; - + struct RGB { + float r, g, b; + + bool operator ==(const RGB& other) const; + bool operator !=(const RGB& other) const; + RGB operator *(const RGB& other) const; + }; + + RGB refInput; + RGB refOutput; + + enum class ColorSpace { + INPUT = 0, + WORKING + // TODO : add support for custom color profile + }; + + ColorSpace colorSpace; + + enum class BackCompat { CURRENT = 0, V1, V2 }; + BackCompat backCompat; + FilmNegativeParams(); bool operator ==(const FilmNegativeParams& other) const; diff --git a/rtengine/rawflatfield.cc b/rtengine/rawflatfield.cc index cbc5e6bd6..22dbca852 100644 --- a/rtengine/rawflatfield.cc +++ b/rtengine/rawflatfield.cc @@ -263,7 +263,7 @@ void cfaboxblur(const float* const * riFlatFile, float* cfablur, int boxH, int b namespace rtengine { -void RawImageSource::processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, const float black[4]) +void RawImageSource::processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, array2D &rawData, const float black[4]) { // BENCHFUN std::unique_ptr cfablur(new float[H * W]); diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 870f39d0f..21258c9a7 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -636,6 +636,56 @@ float calculate_scale_mul(float scale_mul[4], const float pre_mul_[4], const flo return gain; } + +void RawImageSource::getWBMults (const ColorTemp &ctemp, const RAWParams &raw, std::array& out_scale_mul, float &autoGainComp, float &rm, float &gm, float &bm) const +{ + // compute channel multipliers + double r, g, b; + //float rm, gm, bm; + + if (ctemp.getTemp() < 0) { + // no white balance, ie revert the pre-process white balance to restore original unbalanced raw camera color + rm = ri->get_pre_mul(0); + gm = ri->get_pre_mul(1); + bm = ri->get_pre_mul(2); + } else { + ctemp.getMultipliers (r, g, b); + rm = imatrices.cam_rgb[0][0] * r + imatrices.cam_rgb[0][1] * g + imatrices.cam_rgb[0][2] * b; + gm = imatrices.cam_rgb[1][0] * r + imatrices.cam_rgb[1][1] * g + imatrices.cam_rgb[1][2] * b; + bm = imatrices.cam_rgb[2][0] * r + imatrices.cam_rgb[2][1] * g + imatrices.cam_rgb[2][2] * b; + } + + // adjust gain so the maximum raw value of the least scaled channel just hits max + const float new_pre_mul[4] = { ri->get_pre_mul(0) / rm, ri->get_pre_mul(1) / gm, ri->get_pre_mul(2) / bm, ri->get_pre_mul(3) / gm }; + float new_scale_mul[4]; + + bool isMono = (ri->getSensorType() == ST_FUJI_XTRANS && raw.xtranssensor.method == RAWParams::XTransSensor::getMethodString(RAWParams::XTransSensor::Method::MONO)) + || (ri->getSensorType() == ST_BAYER && raw.bayersensor.method == RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::MONO)); + + float c_white[4]; + for (int i = 0; i < 4; ++i) { + c_white[i] = (ri->get_white(i) - cblacksom[i]) / static_cast(raw.expos) + cblacksom[i]; + } + + float gain = calculate_scale_mul(new_scale_mul, new_pre_mul, c_white, cblacksom, isMono, ri->get_colors()); + rm = new_scale_mul[0] / scale_mul[0] * gain; + gm = new_scale_mul[1] / scale_mul[1] * gain; + bm = new_scale_mul[2] / scale_mul[2] * gain; + //fprintf(stderr, "camera gain: %f, current wb gain: %f, diff in stops %f\n", camInitialGain, gain, log2(camInitialGain) - log2(gain)); + + const float expcomp = std::pow(2, ri->getBaselineExposure()); + rm *= expcomp; + gm *= expcomp; + bm *= expcomp; + + out_scale_mul[0] = scale_mul[0]; + out_scale_mul[1] = scale_mul[1]; + out_scale_mul[2] = scale_mul[2]; + out_scale_mul[3] = scale_mul[3]; + + autoGainComp = camInitialGain / initialGain; +} + void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hrp, const RAWParams &raw) { MyMutex::MyLock lock(getImageMutex); @@ -2387,7 +2437,7 @@ void RawImageSource::HLRecovery_Global(const ToneCurveParams &hrp) printf ("Applying Highlight Recovery: Color propagation...\n"); } - HLRecovery_inpaint (red, green, blue); + HLRecovery_inpaint (red, green, blue, hrp.hlbl); rgbSourceModified = true; } } @@ -2444,7 +2494,7 @@ void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, Raw if (riFlatFile && W == riFlatFile->get_width() && H == riFlatFile->get_height()) { - processFlatField(raw, riFlatFile, black); + processFlatField(raw, riFlatFile, rawData, black); } // flatfield } else if (ri->get_colors() == 1) { // Monochrome @@ -2466,7 +2516,7 @@ void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, Raw } } if (riFlatFile && W == riFlatFile->get_width() && H == riFlatFile->get_height()) { - processFlatField(raw, riFlatFile, black); + processFlatField(raw, riFlatFile, rawData, black); } // flatfield } else { // No bayer pattern diff --git a/rtengine/rawimagesource.h b/rtengine/rawimagesource.h index 6db38d8e1..fecde5d96 100644 --- a/rtengine/rawimagesource.h +++ b/rtengine/rawimagesource.h @@ -124,9 +124,6 @@ public: int load(const Glib::ustring &fname) override { return load(fname, false); } int load(const Glib::ustring &fname, bool firstFrameOnly); void preprocess (const procparams::RAWParams &raw, const procparams::LensProfParams &lensProf, const procparams::CoarseTransformParams& coarse, bool prepareDenoise = true) override; - void filmNegativeProcess (const procparams::FilmNegativeParams ¶ms, std::array& filmBaseValues) override; - bool getFilmNegativeExponents (Coord2D spotA, Coord2D spotB, int tran, const procparams::FilmNegativeParams ¤tParams, std::array& newExps) override; - bool getRawSpotValues(Coord2D spot, int spotSize, int tran, const procparams::FilmNegativeParams ¶ms, std::array& rawValues) override; void demosaic (const procparams::RAWParams &raw, bool autoContrast, double &contrastThreshold, bool cache = false) override; void retinex (const procparams::ColorManagementParams& cmp, const procparams::RetinexParams &deh, const procparams::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) override; void retinexPrepareCurves (const procparams::RetinexParams &retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) override; @@ -140,13 +137,14 @@ public: return rgbSourceModified; // tracks whether cached rgb output of demosaic has been modified } - void processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, const float black[4]); + void processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, array2D &rawData, const float black[4]); void copyOriginalPixels(const procparams::RAWParams &raw, RawImage *ri, RawImage *riDark, RawImage *riFlatFile, array2D &rawData ); void scaleColors (int winx, int winy, int winw, int winh, const procparams::RAWParams &raw, array2D &rawData); // raw for cblack void WBauto(double &tempref, double &greenref, array2D &redloc, array2D &greenloc, array2D &blueloc, int bfw, int bfh, double &avg_rm, double &avg_gm, double &avg_bm, double &tempitc, double &greenitc, float &studgood, bool &twotimes, const procparams::WBParams & wbpar, int begx, int begy, int yEn, int xEn, int cx, int cy, const procparams::ColorManagementParams &cmp, const procparams::RAWParams &raw) override; void getAutoWBMultipliersitc(double &tempref, double &greenref, double &tempitc, double &greenitc, float &studgood, int begx, int begy, int yEn, int xEn, int cx, int cy, int bf_h, int bf_w, double &rm, double &gm, double &bm, const procparams::WBParams & wbpar, const procparams::ColorManagementParams &cmp, const procparams::RAWParams &raw) override; void getrgbloc(int begx, int begy, int yEn, int xEn, int cx, int cy, int bf_h, int bf_w) override; + void getWBMults (const ColorTemp &ctemp, const procparams::RAWParams &raw, std::array& scale_mul, float &autoGainComp, float &rm, float &gm, float &bm) const override; void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const procparams::ToneCurveParams &hrp, const procparams::RAWParams &raw) override; eSensorType getSensorType () const override; bool isMono () const override; @@ -197,7 +195,7 @@ public: static void inverse33(const double (*coeff)[3], double (*icoeff)[3]); void MSR(float** luminance, float **originalLuminance, float **exLuminance, const LUTf& mapcurve, bool mapcontlutili, int width, int height, const procparams::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) override; + void HLRecovery_inpaint (float** red, float** green, float** blue, int blur); 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]); static void HLRecovery_blend (float* rin, float* gin, float* bin, int width, float maxval, float* hlmax); diff --git a/rtengine/rcd_demosaic.cc b/rtengine/rcd_demosaic.cc index ff477281b..3a88e1a9a 100644 --- a/rtengine/rcd_demosaic.cc +++ b/rtengine/rcd_demosaic.cc @@ -21,7 +21,6 @@ #include "rawimagesource.h" #include "rt_math.h" #include "../rtgui/multilangmgr.h" -#include "opthelper.h" #include "StopWatch.h" using namespace std; @@ -36,7 +35,7 @@ unsigned fc(const unsigned int cfa[2][2], int r, int c) { namespace rtengine { -/** +/* * RATIO CORRECTED DEMOSAICING * Luis Sanz Rodriguez (luis.sanz.rodriguez(at)gmail(dot)com) * @@ -45,7 +44,12 @@ namespace rtengine * Original code from https://github.com/LuisSR/RCD-Demosaicing * Licensed under the GNU GPL version 3 */ + // Tiled version by Ingo Weyrich (heckflosse67@gmx.de) +// Luis Sanz Rodriguez significantly optimised the v 2.3 code and simplified the directional +// coefficients in an exact, shorter and more performant formula. +// In cooperation with Hanno Schwalm (hanno@schwalm-bremen.de) and Luis Sanz Rodriguez this has been tuned for performance. + void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure) { // Test for RGB cfa @@ -61,7 +65,6 @@ void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure) } std::unique_ptr stop; - if (measure) { std::cout << "Demosaicing " << W << "x" << H << " image using rcd with " << chunkSize << " tiles per thread" << std::endl; stop.reset(new StopWatch("rcd demosaic")); @@ -75,26 +78,30 @@ void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure) } const unsigned int cfarray[2][2] = {{FC(0,0), FC(0,1)}, {FC(1,0), FC(1,1)}}; + constexpr int tileBorder = 9; // avoid tile-overlap errors constexpr int rcdBorder = 9; - constexpr int tileSize = 214; - constexpr int tileSizeN = tileSize - 2 * rcdBorder; + constexpr int tileSize = 194; + constexpr int tileSizeN = tileSize - 2 * tileBorder; const int numTh = H / (tileSizeN) + ((H % (tileSizeN)) ? 1 : 0); const int numTw = W / (tileSizeN) + ((W % (tileSizeN)) ? 1 : 0); constexpr int w1 = tileSize, w2 = 2 * tileSize, w3 = 3 * tileSize, w4 = 4 * tileSize; //Tolerance to avoid dividing by zero constexpr float eps = 1e-5f; constexpr float epssq = 1e-10f; + constexpr float scale = 65536.f; #ifdef _OPENMP #pragma omp parallel #endif { int progresscounter = 0; - float *cfa = (float*) calloc(tileSize * tileSize, sizeof *cfa); - float (*rgb)[tileSize * tileSize] = (float (*)[tileSize * tileSize])malloc(3 * sizeof *rgb); - float *VH_Dir = (float*) calloc(tileSize * tileSize, sizeof *VH_Dir); - float *PQ_Dir = (float*) calloc(tileSize * tileSize, sizeof *PQ_Dir); - float *lpf = PQ_Dir; // reuse buffer, they don't overlap in usage + float *const cfa = (float*) calloc(tileSize * tileSize, sizeof *cfa); + float (*const rgb)[tileSize * tileSize] = (float (*)[tileSize * tileSize])malloc(3 * sizeof *rgb); + float *const VH_Dir = (float*) calloc(tileSize * tileSize, sizeof *VH_Dir); + float *const PQ_Dir = (float*) calloc(tileSize * tileSize / 2, sizeof *PQ_Dir); + float *const lpf = PQ_Dir; // reuse buffer, they don't overlap in usage + float *const P_CDiff_Hpf = (float*) calloc(tileSize * tileSize / 2, sizeof *P_CDiff_Hpf); + float *const Q_CDiff_Hpf = (float*) calloc(tileSize * tileSize / 2, sizeof *Q_CDiff_Hpf); #ifdef _OPENMP #pragma omp for schedule(dynamic, chunkSize) collapse(2) nowait @@ -103,12 +110,12 @@ void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure) for (int tc = 0; tc < numTw; ++tc) { const int rowStart = tr * tileSizeN; const int rowEnd = std::min(rowStart + tileSize, H); - if (rowStart + rcdBorder == rowEnd - rcdBorder) { + if (rowStart + tileBorder == rowEnd - tileBorder) { continue; } const int colStart = tc * tileSizeN; const int colEnd = std::min(colStart + tileSize, W); - if (colStart + rcdBorder == colEnd - rcdBorder) { + if (colStart + tileBorder == colEnd - tileBorder) { continue; } @@ -116,90 +123,59 @@ void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure) const int tilecols = std::min(colEnd - colStart, tileSize); for (int row = rowStart; row < rowEnd; row++) { - int indx = (row - rowStart) * tileSize; - int c0 = fc(cfarray, row, colStart); - int c1 = fc(cfarray, row, colStart + 1); - int col = colStart; - - for (; col < colEnd - 1; col+=2, indx+=2) { - cfa[indx] = rgb[c0][indx] = LIM01(rawData[row][col] / 65535.f); - cfa[indx + 1] = rgb[c1][indx + 1] = LIM01(rawData[row][col + 1] / 65535.f); - } - if (col < colEnd) { - cfa[indx] = rgb[c0][indx] = LIM01(rawData[row][col] / 65535.f); + const int c0 = fc(cfarray, row, colStart); + const int c1 = fc(cfarray, row, colStart + 1); + for (int col = colStart, indx = (row - rowStart) * tileSize; col < colEnd; ++col, ++indx) { + cfa[indx] = rgb[c0][indx] = rgb[c1][indx] = LIM01(rawData[row][col] / scale); } } - /** - * STEP 1: Find cardinal and diagonal interpolation directions - */ + // Step 1: Find cardinal and diagonal interpolation directions + float bufferV[3][tileSize - 8]; - for (int row = 4; row < tileRows - 4; row++) { - for (int col = 4, indx = row * tileSize + col; col < tilecols - 4; col++, indx++) { - const float cfai = cfa[indx]; - //Calculate h/v local discrimination - float V_Stat = max(epssq, -18.f * cfai * (cfa[indx - w1] + cfa[indx + w1] + 2.f * (cfa[indx - w2] + cfa[indx + w2]) - cfa[indx - w3] - cfa[indx + w3]) - 2.f * cfai * (cfa[indx - w4] + cfa[indx + w4] - 19.f * cfai) - cfa[indx - w1] * (70.f * cfa[indx + w1] + 12.f * cfa[indx - w2] - 24.f * cfa[indx + w2] + 38.f * cfa[indx - w3] - 16.f * cfa[indx + w3] - 12.f * cfa[indx - w4] + 6.f * cfa[indx + w4] - 46.f * cfa[indx - w1]) + cfa[indx + w1] * (24.f * cfa[indx - w2] - 12.f * cfa[indx + w2] + 16.f * cfa[indx - w3] - 38.f * cfa[indx + w3] - 6.f * cfa[indx - w4] + 12.f * cfa[indx + w4] + 46.f * cfa[indx + w1]) + cfa[indx - w2] * (14.f * cfa[indx + w2] - 12.f * cfa[indx + w3] - 2.f * cfa[indx - w4] + 2.f * cfa[indx + w4] + 11.f * cfa[indx - w2]) + cfa[indx + w2] * (-12.f * cfa[indx - w3] + 2.f * (cfa[indx - w4] - cfa[indx + w4]) + 11.f * cfa[indx + w2]) + cfa[indx - w3] * (2.f * cfa[indx + w3] - 6.f * cfa[indx - w4] + 10.f * cfa[indx - w3]) + cfa[indx + w3] * (-6.f * cfa[indx + w4] + 10.f * cfa[indx + w3]) + cfa[indx - w4] * cfa[indx - w4] + cfa[indx + w4] * cfa[indx + w4]); - float H_Stat = max(epssq, -18.f * cfai * (cfa[indx - 1] + cfa[indx + 1] + 2.f * (cfa[indx - 2] + cfa[indx + 2]) - cfa[indx - 3] - cfa[indx + 3]) - 2.f * cfai * (cfa[indx - 4] + cfa[indx + 4] - 19.f * cfai) - cfa[indx - 1] * (70.f * cfa[indx + 1] + 12.f * cfa[indx - 2] - 24.f * cfa[indx + 2] + 38.f * cfa[indx - 3] - 16.f * cfa[indx + 3] - 12.f * cfa[indx - 4] + 6.f * cfa[indx + 4] - 46.f * cfa[indx - 1]) + cfa[indx + 1] * (24.f * cfa[indx - 2] - 12.f * cfa[indx + 2] + 16.f * cfa[indx - 3] - 38.f * cfa[indx + 3] - 6.f * cfa[indx - 4] + 12.f * cfa[indx + 4] + 46.f * cfa[indx + 1]) + cfa[indx - 2] * (14.f * cfa[indx + 2] - 12.f * cfa[indx + 3] - 2.f * cfa[indx - 4] + 2.f * cfa[indx + 4] + 11.f * cfa[indx - 2]) + cfa[indx + 2] * (-12.f * cfa[indx - 3] + 2.f * (cfa[indx - 4] - cfa[indx + 4]) + 11.f * cfa[indx + 2]) + cfa[indx - 3] * (2.f * cfa[indx + 3] - 6.f * cfa[indx - 4] + 10.f * cfa[indx - 3]) + cfa[indx + 3] * (-6.f * cfa[indx + 4] + 10.f * cfa[indx + 3]) + cfa[indx - 4] * cfa[indx - 4] + cfa[indx + 4] * cfa[indx + 4]); + // Step 1.1: Calculate the square of the vertical and horizontal color difference high pass filter + for (int row = 3; row < std::min(tileRows - 3, 5); ++row) { + for (int col = 4, indx = row * tileSize + col; col < tilecols - 4; ++col, ++indx) { + bufferV[row - 3][col - 4] = SQR((cfa[indx - w3] - cfa[indx - w1] - cfa[indx + w1] + cfa[indx + w3]) - 3.f * (cfa[indx - w2] + cfa[indx + w2]) + 6.f * cfa[indx]); + } + } + + // Step 1.2: Obtain the vertical and horizontal directional discrimination strength + float bufferH[tileSize - 6] ALIGNED16; + float* V0 = bufferV[0]; + float* V1 = bufferV[1]; + float* V2 = bufferV[2]; + for (int row = 4; row < tileRows - 4; ++row) { + for (int col = 3, indx = row * tileSize + col; col < tilecols - 3; ++col, ++indx) { + bufferH[col - 3] = SQR((cfa[indx - 3] - cfa[indx - 1] - cfa[indx + 1] + cfa[indx + 3]) - 3.f * (cfa[indx - 2] + cfa[indx + 2]) + 6.f * cfa[indx]); + } + for (int col = 4, indx = (row + 1) * tileSize + col; col < tilecols - 4; ++col, ++indx) { + V2[col - 4] = SQR((cfa[indx - w3] - cfa[indx - w1] - cfa[indx + w1] + cfa[indx + w3]) - 3.f * (cfa[indx - w2] + cfa[indx + w2]) + 6.f * cfa[indx]); + } + for (int col = 4, indx = row * tileSize + col; col < tilecols - 4; ++col, ++indx) { + + float V_Stat = std::max(epssq, V0[col - 4] + V1[col - 4] + V2[col - 4]); + float H_Stat = std::max(epssq, bufferH[col - 4] + bufferH[col - 3] + bufferH[col - 2]); VH_Dir[indx] = V_Stat / (V_Stat + H_Stat); } + // rotate pointers from row0, row1, row2 to row1, row2, row0 + std::swap(V0, V2); + std::swap(V0, V1); } - /** - * STEP 2: Calculate the low pass filter - */ - // Step 2.1: Low pass filter incorporating green, red and blue local samples from the raw data - - for (int row = 2; row < tileRows - 2; row++) { - for (int col = 2 + (fc(cfarray, row, 0) & 1), indx = row * tileSize + col; col < tilecols - 2; col += 2, indx += 2) { - lpf[indx>>1] = 0.25f * cfa[indx] + 0.125f * (cfa[indx - w1] + cfa[indx + w1] + cfa[indx - 1] + cfa[indx + 1]) + 0.0625f * (cfa[indx - w1 - 1] + cfa[indx - w1 + 1] + cfa[indx + w1 - 1] + cfa[indx + w1 + 1]); + // Step 2: Low pass filter incorporating green, red and blue local samples from the raw data + for (int row = 2; row < tileRows - 2; ++row) { + for (int col = 2 + (fc(cfarray, row, 0) & 1), indx = row * tileSize + col, lpindx = indx / 2; col < tilecols - 2; col += 2, indx += 2, ++lpindx) { + lpf[lpindx] = cfa[indx] + + 0.5f * (cfa[indx - w1] + cfa[indx + w1] + cfa[indx - 1] + cfa[indx + 1]) + + 0.25f * (cfa[indx - w1 - 1] + cfa[indx - w1 + 1] + cfa[indx + w1 - 1] + cfa[indx + w1 + 1]); } } - /** - * STEP 3: Populate the green channel - */ - // Step 3.1: Populate the green channel at blue and red CFA positions - for (int row = 4; row < tileRows - 4; row++) { - int col = 4 + (fc(cfarray, row, 0) & 1); - int indx = row * tileSize + col; -#ifdef __SSE2__ - const vfloat zd5v = F2V(0.5f); - const vfloat zd25v = F2V(0.25f); - const vfloat epsv = F2V(eps); - for (; col < tilecols - 7; col += 8, indx += 8) { - // Cardinal gradients - const vfloat cfai = LC2VFU(cfa[indx]); - const vfloat N_Grad = epsv + (vabsf(LC2VFU(cfa[indx - w1]) - LC2VFU(cfa[indx + w1])) + vabsf(cfai - LC2VFU(cfa[indx - w2]))) + (vabsf(LC2VFU(cfa[indx - w1]) - LC2VFU(cfa[indx - w3])) + vabsf(LC2VFU(cfa[indx - w2]) - LC2VFU(cfa[indx - w4]))); - const vfloat S_Grad = epsv + (vabsf(LC2VFU(cfa[indx - w1]) - LC2VFU(cfa[indx + w1])) + vabsf(cfai - LC2VFU(cfa[indx + w2]))) + (vabsf(LC2VFU(cfa[indx + w1]) - LC2VFU(cfa[indx + w3])) + vabsf(LC2VFU(cfa[indx + w2]) - LC2VFU(cfa[indx + w4]))); - const vfloat W_Grad = epsv + (vabsf(LC2VFU(cfa[indx - 1]) - LC2VFU(cfa[indx + 1])) + vabsf(cfai - LC2VFU(cfa[indx - 2]))) + (vabsf(LC2VFU(cfa[indx - 1]) - LC2VFU(cfa[indx - 3])) + vabsf(LC2VFU(cfa[indx - 2]) - LC2VFU(cfa[indx - 4]))); - const vfloat E_Grad = epsv + (vabsf(LC2VFU(cfa[indx - 1]) - LC2VFU(cfa[indx + 1])) + vabsf(cfai - LC2VFU(cfa[indx + 2]))) + (vabsf(LC2VFU(cfa[indx + 1]) - LC2VFU(cfa[indx + 3])) + vabsf(LC2VFU(cfa[indx + 2]) - LC2VFU(cfa[indx + 4]))); - - // Cardinal pixel estimations - const vfloat lpfi = LVFU(lpf[indx>>1]); - const vfloat N_Est = LC2VFU(cfa[indx - w1]) + (LC2VFU(cfa[indx - w1]) * (lpfi - LVFU(lpf[(indx - w2)>>1])) / (epsv + lpfi + LVFU(lpf[(indx - w2)>>1]))); - const vfloat S_Est = LC2VFU(cfa[indx + w1]) + (LC2VFU(cfa[indx + w1]) * (lpfi - LVFU(lpf[(indx + w2)>>1])) / (epsv + lpfi + LVFU(lpf[(indx + w2)>>1]))); - const vfloat W_Est = LC2VFU(cfa[indx - 1]) + (LC2VFU(cfa[indx - 1]) * (lpfi - LVFU(lpf[(indx - 2)>>1])) / (epsv + lpfi + LVFU(lpf[(indx - 2)>>1]))); - const vfloat E_Est = LC2VFU(cfa[indx + 1]) + (LC2VFU(cfa[indx + 1]) * (lpfi - LVFU(lpf[(indx + 2)>>1])) / (epsv + lpfi + LVFU(lpf[(indx + 2)>>1]))); - - // Vertical and horizontal estimations - const vfloat V_Est = (S_Grad * N_Est + N_Grad * S_Est) / (N_Grad + S_Grad); - const vfloat H_Est = (W_Grad * E_Est + E_Grad * W_Est) / (E_Grad + W_Grad); - - // G@B and G@R interpolation - // Refined vertical and horizontal local discrimination - const vfloat VH_Central_Value = LC2VFU(VH_Dir[indx]); - const vfloat VH_Neighbourhood_Value = zd25v * ((LC2VFU(VH_Dir[indx - w1 - 1]) + LC2VFU(VH_Dir[indx - w1 + 1])) + (LC2VFU(VH_Dir[indx + w1 - 1]) + LC2VFU(VH_Dir[indx + w1 + 1]))); - -#if defined(__clang__) - const vfloat VH_Disc = vself(vmaskf_lt(vabsf(zd5v - VH_Central_Value), vabsf(zd5v - VH_Neighbourhood_Value)), VH_Neighbourhood_Value, VH_Central_Value); -#else - const vfloat VH_Disc = vabsf(zd5v - VH_Central_Value) < vabsf(zd5v - VH_Neighbourhood_Value) ? VH_Neighbourhood_Value : VH_Central_Value; -#endif - STC2VFU(rgb[1][indx], vintpf(VH_Disc, H_Est, V_Est)); - } -#endif - for (; col < tilecols - 4; col += 2, indx += 2) { + // Step 3: Populate the green channel at blue and red CFA positions + for (int row = 4; row < tileRows - 4; ++row) { + for (int col = 4 + (fc(cfarray, row, 0) & 1), indx = row * tileSize + col, lpindx = indx / 2; col < tilecols - 4; col += 2, indx += 2, ++lpindx) { // Cardinal gradients const float cfai = cfa[indx]; const float N_Grad = eps + (std::fabs(cfa[indx - w1] - cfa[indx + w1]) + std::fabs(cfai - cfa[indx - w2])) + (std::fabs(cfa[indx - w1] - cfa[indx - w3]) + std::fabs(cfa[indx - w2] - cfa[indx - w4])); @@ -208,11 +184,11 @@ void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure) const float E_Grad = eps + (std::fabs(cfa[indx - 1] - cfa[indx + 1]) + std::fabs(cfai - cfa[indx + 2])) + (std::fabs(cfa[indx + 1] - cfa[indx + 3]) + std::fabs(cfa[indx + 2] - cfa[indx + 4])); // Cardinal pixel estimations - const float lpfi = lpf[indx>>1]; - const float N_Est = cfa[indx - w1] * (1.f + (lpfi - lpf[(indx - w2)>>1]) / (eps + lpfi + lpf[(indx - w2)>>1])); - const float S_Est = cfa[indx + w1] * (1.f + (lpfi - lpf[(indx + w2)>>1]) / (eps + lpfi + lpf[(indx + w2)>>1])); - const float W_Est = cfa[indx - 1] * (1.f + (lpfi - lpf[(indx - 2)>>1]) / (eps + lpfi + lpf[(indx - 2)>>1])); - const float E_Est = cfa[indx + 1] * (1.f + (lpfi - lpf[(indx + 2)>>1]) / (eps + lpfi + lpf[(indx + 2)>>1])); + const float lpfi = lpf[lpindx]; + const float N_Est = cfa[indx - w1] * (lpfi + lpfi) / (eps + lpfi + lpf[lpindx - w1]); + const float S_Est = cfa[indx + w1] * (lpfi + lpfi) / (eps + lpfi + lpf[lpindx + w1]); + const float W_Est = cfa[indx - 1] * (lpfi + lpfi) / (eps + lpfi + lpf[lpindx - 1]); + const float E_Est = cfa[indx + 1] * (lpfi + lpfi) / (eps + lpfi + lpf[lpindx + 1]); // Vertical and horizontal estimations const float V_Est = (S_Grad * N_Est + N_Grad * S_Est) / (N_Grad + S_Grad); @@ -224,7 +200,7 @@ void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure) const float VH_Neighbourhood_Value = 0.25f * ((VH_Dir[indx - w1 - 1] + VH_Dir[indx - w1 + 1]) + (VH_Dir[indx + w1 - 1] + VH_Dir[indx + w1 + 1])); const float VH_Disc = std::fabs(0.5f - VH_Central_Value) < std::fabs(0.5f - VH_Neighbourhood_Value) ? VH_Neighbourhood_Value : VH_Central_Value; - rgb[1][indx] = VH_Disc * H_Est + (1.f - VH_Disc) * V_Est; + rgb[1][indx] = intp(VH_Disc, H_Est, V_Est); } } @@ -232,25 +208,30 @@ void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure) * STEP 4: Populate the red and blue channels */ - // Step 4.1: Calculate P/Q diagonal local discrimination - for (int row = rcdBorder - 4; row < tileRows - rcdBorder + 4; row++) { - for (int col = rcdBorder - 4 + (fc(cfarray, row, rcdBorder) & 1), indx = row * tileSize + col; col < tilecols - rcdBorder + 4; col += 2, indx += 2) { - const float cfai = cfa[indx]; + // Step 4.0: Calculate the square of the P/Q diagonals color difference high pass filter + for (int row = 3; row < tileRows - 3; ++row) { + for (int col = 3, indx = row * tileSize + col, indx2 = indx / 2; col < tilecols - 3; col+=2, indx+=2, indx2++ ) { + P_CDiff_Hpf[indx2] = SQR((cfa[indx - w3 - 3] - cfa[indx - w1 - 1] - cfa[indx + w1 + 1] + cfa[indx + w3 + 3]) - 3.f * (cfa[indx - w2 - 2] + cfa[indx + w2 + 2]) + 6.f * cfa[indx]); + Q_CDiff_Hpf[indx2] = SQR((cfa[indx - w3 + 3] - cfa[indx - w1 + 1] - cfa[indx + w1 - 1] + cfa[indx + w3 - 3]) - 3.f * (cfa[indx - w2 + 2] + cfa[indx + w2 - 2]) + 6.f * cfa[indx]); + } + } - float P_Stat = max(epssq, - 18.f * cfai * (cfa[indx - w1 - 1] + cfa[indx + w1 + 1] + 2.f * (cfa[indx - w2 - 2] + cfa[indx + w2 + 2]) - cfa[indx - w3 - 3] - cfa[indx + w3 + 3]) - 2.f * cfai * (cfa[indx - w4 - 4] + cfa[indx + w4 + 4] - 19.f * cfai) - cfa[indx - w1 - 1] * (70.f * cfa[indx + w1 + 1] - 12.f * cfa[indx - w2 - 2] + 24.f * cfa[indx + w2 + 2] - 38.f * cfa[indx - w3 - 3] + 16.f * cfa[indx + w3 + 3] + 12.f * cfa[indx - w4 - 4] - 6.f * cfa[indx + w4 + 4] + 46.f * cfa[indx - w1 - 1]) + cfa[indx + w1 + 1] * (24.f * cfa[indx - w2 - 2] - 12.f * cfa[indx + w2 + 2] + 16.f * cfa[indx - w3 - 3] - 38.f * cfa[indx + w3 + 3] - 6.f * cfa[indx - w4 - 4] + 12.f * cfa[indx + w4 + 4] + 46.f * cfa[indx + w1 + 1]) + cfa[indx - w2 - 2] * (14.f * cfa[indx + w2 + 2] - 12.f * cfa[indx + w3 + 3] - 2.f * (cfa[indx - w4 - 4] - cfa[indx + w4 + 4]) + 11.f * cfa[indx - w2 - 2]) - cfa[indx + w2 + 2] * (12.f * cfa[indx - w3 - 3] + 2.f * (cfa[indx - w4 - 4] - cfa[indx + w4 + 4]) + 11.f * cfa[indx + w2 + 2]) + cfa[indx - w3 - 3] * (2.f * cfa[indx + w3 + 3] - 6.f * cfa[indx - w4 - 4] + 10.f * cfa[indx - w3 - 3]) - cfa[indx + w3 + 3] * (6.f * cfa[indx + w4 + 4] + 10.f * cfa[indx + w3 + 3]) + cfa[indx - w4 - 4] * cfa[indx - w4 - 4] + cfa[indx + w4 + 4] * cfa[indx + w4 + 4]); - float Q_Stat = max(epssq, - 18.f * cfai * (cfa[indx + w1 - 1] + cfa[indx - w1 + 1] + 2.f * (cfa[indx + w2 - 2] + cfa[indx - w2 + 2]) - cfa[indx + w3 - 3] - cfa[indx - w3 + 3]) - 2.f * cfai * (cfa[indx + w4 - 4] + cfa[indx - w4 + 4] - 19.f * cfai) - cfa[indx + w1 - 1] * (70.f * cfa[indx - w1 + 1] - 12.f * cfa[indx + w2 - 2] + 24.f * cfa[indx - w2 + 2] - 38.f * cfa[indx + w3 - 3] + 16.f * cfa[indx - w3 + 3] + 12.f * cfa[indx + w4 - 4] - 6.f * cfa[indx - w4 + 4] + 46.f * cfa[indx + w1 - 1]) + cfa[indx - w1 + 1] * (24.f * cfa[indx + w2 - 2] - 12.f * cfa[indx - w2 + 2] + 16.f * cfa[indx + w3 - 3] - 38.f * cfa[indx - w3 + 3] - 6.f * cfa[indx + w4 - 4] + 12.f * cfa[indx - w4 + 4] + 46.f * cfa[indx - w1 + 1]) + cfa[indx + w2 - 2] * (14.f * cfa[indx - w2 + 2] - 12.f * cfa[indx - w3 + 3] - 2.f * (cfa[indx + w4 - 4] - cfa[indx - w4 + 4]) + 11.f * cfa[indx + w2 - 2]) - cfa[indx - w2 + 2] * (12.f * cfa[indx + w3 - 3] + 2.f * (cfa[indx + w4 - 4] - cfa[indx - w4 + 4]) + 11.f * cfa[indx - w2 + 2]) + cfa[indx + w3 - 3] * (2.f * cfa[indx - w3 + 3] - 6.f * cfa[indx + w4 - 4] + 10.f * cfa[indx + w3 - 3]) - cfa[indx - w3 + 3] * (6.f * cfa[indx - w4 + 4] + 10.f * cfa[indx - w3 + 3]) + cfa[indx + w4 - 4] * cfa[indx + w4 - 4] + cfa[indx - w4 + 4] * cfa[indx - w4 + 4]); - - PQ_Dir[indx] = P_Stat / (P_Stat + Q_Stat); + // Step 4.1: Obtain the P/Q diagonals directional discrimination strength + for (int row = 4; row < tileRows - 4; ++row) { + for (int col = 4 + (fc(cfarray, row, 0) & 1), indx = row * tileSize + col, indx2 = indx / 2, indx3 = (indx - w1 - 1) / 2, indx4 = (indx + w1 - 1) / 2; col < tilecols - 4; col += 2, indx += 2, indx2++, indx3++, indx4++ ) { + float P_Stat = std::max(epssq, P_CDiff_Hpf[indx3] + P_CDiff_Hpf[indx2] + P_CDiff_Hpf[indx4 + 1]); + float Q_Stat = std::max(epssq, Q_CDiff_Hpf[indx3 + 1] + Q_CDiff_Hpf[indx2] + Q_CDiff_Hpf[indx4]); + PQ_Dir[indx2] = P_Stat / (P_Stat + Q_Stat); } } // Step 4.2: Populate the red and blue channels at blue and red CFA positions - for (int row = rcdBorder - 3; row < tileRows - rcdBorder + 3; row++) { - for (int col = rcdBorder - 3 + (fc(cfarray, row, rcdBorder - 1) & 1), indx = row * tileSize + col, c = 2 - fc(cfarray, row, col); col < tilecols - rcdBorder + 3; col += 2, indx += 2) { + for (int row = 4; row < tileRows - 4; ++row) { + for (int col = 4 + (fc(cfarray, row, 0) & 1), indx = row * tileSize + col, c = 2 - fc(cfarray, row, col), pqindx = indx / 2, pqindx2 = (indx - w1 - 1) / 2, pqindx3 = (indx + w1 - 1) / 2; col < tilecols - 4; col += 2, indx += 2, ++pqindx, ++pqindx2, ++pqindx3) { // Refined P/Q diagonal local discrimination - float PQ_Central_Value = PQ_Dir[indx]; - float PQ_Neighbourhood_Value = 0.25f * (PQ_Dir[indx - w1 - 1] + PQ_Dir[indx - w1 + 1] + PQ_Dir[indx + w1 - 1] + PQ_Dir[indx + w1 + 1]); + float PQ_Central_Value = PQ_Dir[pqindx]; + float PQ_Neighbourhood_Value = 0.25f * (PQ_Dir[pqindx2] + PQ_Dir[pqindx2 + 1] + PQ_Dir[pqindx3] + PQ_Dir[pqindx3 + 1]); float PQ_Disc = (std::fabs(0.5f - PQ_Central_Value) < std::fabs(0.5f - PQ_Neighbourhood_Value)) ? PQ_Neighbourhood_Value : PQ_Central_Value; @@ -271,16 +252,16 @@ void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure) float Q_Est = (NE_Grad * SW_Est + SW_Grad * NE_Est) / (NE_Grad + SW_Grad); // R@B and B@R interpolation - rgb[c][indx] = rgb[1][indx] + (1.f - PQ_Disc) * P_Est + PQ_Disc * Q_Est; + rgb[c][indx] = rgb[1][indx] + intp(PQ_Disc, Q_Est, P_Est); } } // Step 4.3: Populate the red and blue channels at green CFA positions - for (int row = rcdBorder; row < tileRows - rcdBorder; row++) { - for (int col = rcdBorder + (fc(cfarray, row, rcdBorder - 1) & 1), indx = row * tileSize + col; col < tilecols - rcdBorder; col += 2, indx += 2) { + for (int row = 4; row < tileRows - 4; ++row) { + for (int col = 4 + (fc(cfarray, row, 1) & 1), indx = row * tileSize + col; col < tilecols - 4; col += 2, indx += 2) { // Refined vertical and horizontal local discrimination - float VH_Central_Value = VH_Dir[indx]; + float VH_Central_Value = VH_Dir[indx]; float VH_Neighbourhood_Value = 0.25f * ((VH_Dir[indx - w1 - 1] + VH_Dir[indx - w1 + 1]) + (VH_Dir[indx + w1 - 1] + VH_Dir[indx + w1 + 1])); float VH_Disc = (std::fabs(0.5f - VH_Central_Value) < std::fabs(0.5f - VH_Neighbourhood_Value)) ? VH_Neighbourhood_Value : VH_Central_Value; @@ -314,17 +295,22 @@ void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure) float H_Est = (E_Grad * W_Est + W_Grad * E_Est) / (E_Grad + W_Grad); // R@G and B@G interpolation - rgb[c][indx] = rgb1 + (1.f - VH_Disc) * V_Est + VH_Disc * H_Est; + rgb[c][indx] = rgb1 + intp(VH_Disc, H_Est, V_Est); } } } - for (int row = rowStart + rcdBorder; row < rowEnd - rcdBorder; ++row) { - for (int col = colStart + rcdBorder; col < colEnd - rcdBorder; ++col) { + // For the outermost tiles in all directions we can use a smaller border margin + const int firstVertical = rowStart + ((tr == 0) ? rcdBorder : tileBorder); + const int lastVertical = rowEnd - ((tr == numTh - 1) ? rcdBorder : tileBorder); + const int firstHorizontal = colStart + ((tc == 0) ? rcdBorder : tileBorder); + const int lastHorizontal = colEnd - ((tc == numTw - 1) ? rcdBorder : tileBorder); + for (int row = firstVertical; row < lastVertical; ++row) { + for (int col = firstHorizontal; col < lastHorizontal; ++col) { int idx = (row - rowStart) * tileSize + col - colStart ; - red[row][col] = std::max(0.f, rgb[0][idx] * 65535.f); - green[row][col] = std::max(0.f, rgb[1][idx] * 65535.f); - blue[row][col] = std::max(0.f, rgb[2][idx] * 65535.f); + red[row][col] = std::max(0.f, rgb[0][idx] * scale); + green[row][col] = std::max(0.f, rgb[1][idx] * scale); + blue[row][col] = std::max(0.f, rgb[2][idx] * scale); } } @@ -348,6 +334,8 @@ void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure) free(rgb); free(VH_Dir); free(PQ_Dir); + free(P_CDiff_Hpf); + free(Q_CDiff_Hpf); } border_interpolate(W, H, rcdBorder, rawData, red, green, blue); diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 255d080ac..cb5353054 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -31,13 +31,13 @@ int refreshmap[rtengine::NUMOFEVENTS] = { ALL, // EvProfileLoaded, ALL, // EvProfileChanged, ALL, // EvHistoryBrowsed, - RGBCURVE, // EvBrightness, - RGBCURVE, // EvContrast, - RGBCURVE, // EvBlack, - RGBCURVE, // EvExpComp, - RGBCURVE, // EvHLCompr, - RGBCURVE, // EvSHCompr, - RGBCURVE, // EvToneCurve1, + AUTOEXP, // EvBrightness, + AUTOEXP, // EvContrast, + AUTOEXP, // EvBlack, + AUTOEXP, // EvExpComp, + AUTOEXP, // EvHLCompr, + AUTOEXP, // EvSHCompr, + AUTOEXP, // EvToneCurve1, AUTOEXP, // EvAutoExp, AUTOEXP, // EvClip, LUMINANCECURVE, // EvLBrightness, @@ -60,46 +60,46 @@ int refreshmap[rtengine::NUMOFEVENTS] = { SHARPENING, // EvShrDAmount, SHARPENING, // EvShrDDamping, SHARPENING, // EvShrDIterations, - TRANSFORM, // EvLCPUseDist, + HDR, // EvLCPUseDist, DARKFRAME, // EvLCPUseVign, - TRANSFORM, // EvLCPUseCA, + HDR, // EvLCPUseCA, M_VOID, // EvFixedExp ALLNORAW, // EvWBMethod, ALLNORAW, // EvWBTemp, ALLNORAW, // EvWBGreen, - RGBCURVE, // EvToneCurveMode1, - RGBCURVE, // EvToneCurve2, - RGBCURVE, // EvToneCurveMode2, + AUTOEXP, // EvToneCurveMode1, + AUTOEXP, // EvToneCurve2, + AUTOEXP, // EvToneCurveMode2, 0, // EvLDNRadius: obsolete, 0, // EvLDNEdgeTolerance: obsolete, 0, // EvCDNEnabled:obsolete, 0, // free entry RGBCURVE | M_AUTOEXP, // EvDCPToneCurve, ALLNORAW, // EvDCPIlluminant, - RETINEX, // EvSHEnabled, - RGBCURVE, // EvSHHighlights, - RGBCURVE, // EvSHShadows, - RGBCURVE, // EvSHHLTonalW, - RGBCURVE, // EvSHSHTonalW, - RGBCURVE, // EvSHLContrast, - RETINEX, // EvSHRadius, + LUMINANCECURVE, // EvSHEnabled, + LUMINANCECURVE, // EvSHHighlights, + LUMINANCECURVE, // EvSHShadows, + LUMINANCECURVE, // EvSHHLTonalW, + LUMINANCECURVE, // EvSHSHTonalW, + AUTOEXP, // EvSHLContrast, + LUMINANCECURVE, // EvSHRadius, ALLNORAW, // EvCTRotate, ALLNORAW, // EvCTHFlip, ALLNORAW, // EvCTVFlip, - TRANSFORM, // EvROTDegree, - TRANSFORM, // EvTransAutoFill, - TRANSFORM, // EvDISTAmount, + HDR, // EvROTDegree, + HDR, // EvTransAutoFill, + HDR, // EvDISTAmount, ALL, // EvBookmarkSelected, CROP, // EvCrop, - TRANSFORM, // EvCACorr, + HDR, // EvCACorr, ALLNORAW, // EvHREnabled, ALLNORAW, // EvHRAmount, ALLNORAW, // EvHRMethod, DEMOSAIC, // EvWProfile, OUTPUTPROFILE, // EvOProfile, ALLNORAW, // EvIProfile, - TRANSFORM, // EvVignettingAmount, - RGBCURVE, // EvChMixer, + HDR, // EvVignettingAmount, + AUTOEXP, // EvChMixer, RESIZE, // EvResizeScale, RESIZE, // EvResizeMethod, EXIF, // EvExif, @@ -110,9 +110,9 @@ int refreshmap[rtengine::NUMOFEVENTS] = { RESIZE, // EvResizeEnabled ALL, // EvProfileChangeNotification RETINEX, // EvShrHighQuality - TRANSFORM, // EvPerspCorr + HDR, // EvPerspCorr DARKFRAME, // EvLCPFile - RGBCURVE, // EvRGBrCurveLumamode + AUTOEXP, // EvRGBrCurveLumamode IMPULSEDENOISE, // EvIDNEnabled, IMPULSEDENOISE, // EvIDNThresh, ALLNORAW, // EvDPDNEnabled, @@ -126,15 +126,15 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, // EvLbCurve, DEMOSAIC, // EvDemosaicMethod DARKFRAME, // EvPreProcessHotPixel - RGBCURVE, // EvSaturation, - RGBCURVE, // EvHSVEqualizerH, - RGBCURVE, // EvHSVEqualizerS, - RGBCURVE, // EvHSVEqualizerV, - RGBCURVE, // EvHSVEqEnabled, + AUTOEXP, // EvSaturation, + AUTOEXP, // EvHSVEqualizerH, + AUTOEXP, // EvHSVEqualizerS, + AUTOEXP, // EvHSVEqualizerV, + AUTOEXP, // EvHSVEqEnabled, DEFRINGE, // EvDefringeEnabled, DEFRINGE, // EvDefringeRadius, DEFRINGE, // EvDefringeThreshold, - RGBCURVE, // EvHLComprThreshold, + AUTOEXP, // EvHLComprThreshold, RESIZE, // EvResizeBoundingBox RESIZE, // EvResizeAppliesTo LUMINANCECURVE, // EvCBAvoidClip, @@ -156,7 +156,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = { FLATFIELD, // EvFlatFieldAutoSelect, FLATFIELD, // EvFlatFieldBlurRadius, FLATFIELD, // EvFlatFieldBlurType, - TRANSFORM, // EvAutoDIST, + HDR, // EvAutoDIST, ALLNORAW, // EvDPDNLumCurve, ALLNORAW, // EvDPDNChromCurve, GAMMA, // EvGAMMA @@ -177,26 +177,26 @@ int refreshmap[rtengine::NUMOFEVENTS] = { SHARPENING, // EvSharpenMicroEnabled SHARPENING, // EvSharpenMicroMatrix DEMOSAIC, // EvDemosaicALLEnhanced Disabled but not removed for now, may be reintroduced some day - RGBCURVE, // EvVibranceEnabled - RGBCURVE, // EvVibrancePastels - RGBCURVE, // EvVibranceSaturated - RGBCURVE, // EvVibranceProtectSkins - RGBCURVE, // EvVibranceAvoidColorShift - RGBCURVE, // EvVibrancePastSatTog - RGBCURVE, // EvVibrancePastSatThreshold + AUTOEXP, // EvVibranceEnabled + AUTOEXP, // EvVibrancePastels + AUTOEXP, // EvVibranceSaturated + AUTOEXP, // EvVibranceProtectSkins + AUTOEXP, // EvVibranceAvoidColorShift + AUTOEXP, // EvVibrancePastSatTog + AUTOEXP, // EvVibrancePastSatThreshold SHARPENING, // EvEPDStrength SHARPENING, // EvEPDEdgeStopping SHARPENING, // EvEPDScale SHARPENING, // EvEPDReweightingIterates SHARPENING, // EvEPDEnabled - RGBCURVE, // EvRGBrCurve - RGBCURVE, // EvRGBgCurve - RGBCURVE, // EvRGBbCurve - RGBCURVE, // EvNeutralExp + AUTOEXP, // EvRGBrCurve + AUTOEXP, // EvRGBgCurve + AUTOEXP, // EvRGBbCurve + AUTOEXP, // EvNeutralExp DEMOSAIC | M_PREPROC, // EvDemosaicMethodPreProc LUMINANCECURVE, // EvLCCurve LUMINANCECURVE, // EvLCHCurve - RGBCURVE, // EvVibranceSkinTonesCurve + AUTOEXP, // EvVibranceSkinTonesCurve LUMINANCECURVE, // EvLLCCurve LUMINANCECURVE, // EvLLCredsk ALLNORAW, // EvDPDNLdetail @@ -236,81 +236,81 @@ int refreshmap[rtengine::NUMOFEVENTS] = { DEFRINGE, // EvPFCurve ALLNORAW, // EvWBequal ALLNORAW, // EvWBequalbo - TRANSFORM, // EvGradientDegree - TRANSFORM, // EvGradientEnabled - TRANSFORM, // EvPCVignetteStrength - TRANSFORM, // EvPCVignetteEnabled - RGBCURVE, // EvBWChmixEnabled - RGBCURVE, // EvBWred - RGBCURVE, // EvBWgreen - RGBCURVE, // EvBWblue - RGBCURVE, // EvBWredgam - RGBCURVE, // EvBWgreengam - RGBCURVE, // EvBWbluegam - RGBCURVE, // EvBWfilter - RGBCURVE, // EvBWsetting - RGBCURVE, // EvBWoran - RGBCURVE, // EvBWyell - RGBCURVE, // EvBWcyan - RGBCURVE, // EvBWmag - RGBCURVE, // EvBpur - RGBCURVE, // EvBWLuminanceEqual - RGBCURVE, // EvBWChmixEnabledLm - RGBCURVE, // EvBWmethod - RGBCURVE, // EvBWBeforeCurve - RGBCURVE, // EvBWBeforeCurveMode - RGBCURVE, // EvBWAfterCurve - RGBCURVE, // EvBWAfterCurveMode - RGBCURVE, // EvAutoch + HDR, // EvGradientDegree + HDR, // EvGradientEnabled + HDR, // EvPCVignetteStrength + HDR, // EvPCVignetteEnabled + AUTOEXP, // EvBWChmixEnabled + AUTOEXP, // EvBWred + AUTOEXP, // EvBWgreen + AUTOEXP, // EvBWblue + AUTOEXP, // EvBWredgam + AUTOEXP, // EvBWgreengam + AUTOEXP, // EvBWbluegam + AUTOEXP, // EvBWfilter + AUTOEXP, // EvBWsetting + AUTOEXP, // EvBWoran + AUTOEXP, // EvBWyell + AUTOEXP, // EvBWcyan + AUTOEXP, // EvBWmag + AUTOEXP, // EvBpur + AUTOEXP, // EvBWLuminanceEqual + AUTOEXP, // EvBWChmixEnabledLm + AUTOEXP, // EvBWmethod + AUTOEXP, // EvBWBeforeCurve + AUTOEXP, // EvBWBeforeCurveMode + AUTOEXP, // EvBWAfterCurve + AUTOEXP, // EvBWAfterCurveMode + AUTOEXP, // EvAutoch 0, // --unused-- - RGBCURVE, // EvNeutralBW - TRANSFORM, // EvGradientFeather - TRANSFORM, // EvGradientStrength - TRANSFORM, // EvGradientCenter - TRANSFORM, // EvPCVignetteFeather - TRANSFORM, // EvPCVignetteRoundness - TRANSFORM, // EvVignettingRadius, - TRANSFORM, // EvVignettingStrength - TRANSFORM, // EvVignettingCenter + AUTOEXP, // EvNeutralBW + HDR, // EvGradientFeather + HDR, // EvGradientStrength + HDR, // EvGradientCenter + HDR, // EvPCVignetteFeather + HDR, // EvPCVignetteRoundness + HDR, // EvVignettingRadius, + HDR, // EvVignettingStrength + HDR, // EvVignettingCenter LUMINANCECURVE, // EvLCLCurve LUMINANCECURVE, // EvLLHCurve LUMINANCECURVE, // EvLHHCurve ALLNORAW, // EvDirPyrEqualizerThreshold ALLNORAW, // EvDPDNenhance - RGBCURVE, // EvBWMethodalg + AUTOEXP, // EvBWMethodalg ALLNORAW, // EvDirPyrEqualizerSkin ALLNORAW, // EvDirPyrEqlgamutlab ALLNORAW, // EvDirPyrEqualizerHueskin ALLNORAW, // EvDPDNmedian ALLNORAW, // EvDPDNmedmet - RGBCURVE, // EvColorToningEnabled - RGBCURVE, // EvColorToningColor - RGBCURVE, // EvColorToningOpacity - RGBCURVE, // EvColorToningCLCurve - RGBCURVE, // EvColorToningMethod - RGBCURVE, // EvColorToningLLCurve - RGBCURVE, // EvColorToningredlow - RGBCURVE, // EvColorToninggreenlow - RGBCURVE, // EvColorToningbluelow - RGBCURVE, // EvColorToningredmed - RGBCURVE, // EvColorToninggreenmed - RGBCURVE, // EvColorToningbluemed - RGBCURVE, // EvColorToningredhigh - RGBCURVE, // EvColorToninggreenhigh - RGBCURVE, // EvColorToningbluehigh - RGBCURVE, // EvColorToningbalance - RGBCURVE, // EvColorToningNeutral - RGBCURVE, // EvColorToningsatlow - RGBCURVE, // EvColorToningsathigh - RGBCURVE, // EvColorToningTwocolor - RGBCURVE, // EvColorToningNeutralcur - RGBCURVE, // EvColorToningLumamode - RGBCURVE, // EvColorToningShadows - RGBCURVE, // EvColorToningHighights - RGBCURVE, // EvColorToningSatProtection - RGBCURVE, // EvColorToningSatThreshold - RGBCURVE, // EvColorToningStrength - RGBCURVE, // EvColorToningautosat + AUTOEXP, // EvColorToningEnabled + AUTOEXP, // EvColorToningColor + AUTOEXP, // EvColorToningOpacity + AUTOEXP, // EvColorToningCLCurve + AUTOEXP, // EvColorToningMethod + AUTOEXP, // EvColorToningLLCurve + AUTOEXP, // EvColorToningredlow + AUTOEXP, // EvColorToninggreenlow + AUTOEXP, // EvColorToningbluelow + AUTOEXP, // EvColorToningredmed + AUTOEXP, // EvColorToninggreenmed + AUTOEXP, // EvColorToningbluemed + AUTOEXP, // EvColorToningredhigh + AUTOEXP, // EvColorToninggreenhigh + AUTOEXP, // EvColorToningbluehigh + AUTOEXP, // EvColorToningbalance + AUTOEXP, // EvColorToningNeutral + AUTOEXP, // EvColorToningsatlow + AUTOEXP, // EvColorToningsathigh + AUTOEXP, // EvColorToningTwocolor + AUTOEXP, // EvColorToningNeutralcur + AUTOEXP, // EvColorToningLumamode + AUTOEXP, // EvColorToningShadows + AUTOEXP, // EvColorToningHighights + AUTOEXP, // EvColorToningSatProtection + AUTOEXP, // EvColorToningSatThreshold + AUTOEXP, // EvColorToningStrength + AUTOEXP, // EvColorToningautosat ALLNORAW, // EvDPDNmetmed ALLNORAW, // EvDPDNrgbmet ALLNORAW, // EvDPDNpasses @@ -319,9 +319,9 @@ int refreshmap[rtengine::NUMOFEVENTS] = { DARKFRAME, // EvPreProcessExpBlackRed DARKFRAME, // EvPreProcessExpBlackGreen DARKFRAME, // EvPreProcessExpBlackBlue - RGBCURVE, // EvFilmSimulationEnabled - RGBCURVE, // EvFilmSimulationStrength - RGBCURVE, // EvFilmSimulationFilename + AUTOEXP, // EvFilmSimulationEnabled + AUTOEXP, // EvFilmSimulationStrength + AUTOEXP, // EvFilmSimulationFilename ALLNORAW, // EvDPDNLCurve ALLNORAW, // EvDPDNsmet DARKFRAME, // EvPreProcessDeadPixel @@ -518,474 +518,559 @@ int refreshmap[rtengine::NUMOFEVENTS] = { HDR, // EvTMFattalThreshold HDR, // EvTMFattalAmount ALLNORAW, // EvWBEnabled - RGBCURVE, // EvRGBEnabled + AUTOEXP, // EvRGBEnabled LUMINANCECURVE, // EvLEnabled DEMOSAIC, // EvPdShrEnabled CAPTURESHARPEN, // EvPdShrMaskToggled - LUMINANCECURVE, // EvLocallabSpotDeleted + AUTOEXP, // EvLocallabSpotDeleted M_VOID, // EvLocallabSpotSelected M_VOID, // EvLocallabSpotName M_VOID, // EvLocallabSpotVisibility - LUMINANCECURVE, // EvLocallabSpotShape - LUMINANCECURVE, // EvLocallabSpotSpotMethod - LUMINANCECURVE, // EvLocallabSpotShapeMethod - LUMINANCECURVE, // EvLocallabSpotLocX - LUMINANCECURVE, // EvLocallabSpotLocXL - LUMINANCECURVE, // EvLocallabSpotLocY - LUMINANCECURVE, // EvLocallabSpotLocYT - LUMINANCECURVE, // EvLocallabSpotCenter - LUMINANCECURVE, // EvLocallabSpotCircrad - LUMINANCECURVE, // EvLocallabSpotQualityMethod - LUMINANCECURVE, // EvLocallabSpotTransit - LUMINANCECURVE, // EvLocallabSpotThresh - LUMINANCECURVE, // EvLocallabSpotIter - LUMINANCECURVE, // EvLocallabSpotSensiexclu - LUMINANCECURVE, // EvLocallabSpotStruc - LUMINANCECURVE, // EvlocallabEnabled - LUMINANCECURVE, // EvLocenacolor - LUMINANCECURVE, // Evlocallabcurvactiv - LUMINANCECURVE, // Evlocallablightness - LUMINANCECURVE, // Evlocallabcontrast - LUMINANCECURVE, // Evlocallabchroma - LUMINANCECURVE, // Evlocallabsensi - LUMINANCECURVE, // EvlocallabqualitycurveMethod - LUMINANCECURVE, // Evlocallabllshape - LUMINANCECURVE, // Evlocallabccshape - LUMINANCECURVE, // EvlocallabLHshape - LUMINANCECURVE, // EvlocallabHHshape - LUMINANCECURVE, // Evlocallabinvers - LUMINANCECURVE, // EvLocenaexpose - LUMINANCECURVE, // Evlocallabexpcomp - LUMINANCECURVE, // Evlocallabhlcompr - LUMINANCECURVE, // Evlocallabhlcomprthresh - LUMINANCECURVE, // Evlocallabblack - LUMINANCECURVE, // Evlocallabshcompr - LUMINANCECURVE, // Evlocallabwarm - LUMINANCECURVE, // Evlocallabsensiex - LUMINANCECURVE, // Evlocallabshapeexpos - LUMINANCECURVE, // EvLocenavibrance - LUMINANCECURVE, // EvlocallabSaturated - LUMINANCECURVE, // EvlocallabPastels - LUMINANCECURVE, // EvlocallabPastSatThreshold - LUMINANCECURVE, // EvlocallabProtectSkins - LUMINANCECURVE, // EvlocallabAvoidColorShift - LUMINANCECURVE, // EvlocallabPastSatTog - LUMINANCECURVE, // Evlocallabsensiv - LUMINANCECURVE, // EvlocallabSkinTonesCurve - LUMINANCECURVE, // EvLocenablur - LUMINANCECURVE, // Evlocallabradius - LUMINANCECURVE, // Evlocallabstrength - LUMINANCECURVE, // Evlocallabsensibn - LUMINANCECURVE, // EvlocallabblurMethod - LUMINANCECURVE, // Evlocallabactivlum - LUMINANCECURVE, // EvLocenatonemap - LUMINANCECURVE, // Evlocallabstren - LUMINANCECURVE, // Evlocallabgamma - LUMINANCECURVE, // Evlocallabestop - LUMINANCECURVE, // Evlocallabscaltm - LUMINANCECURVE, // Evlocallabrewei - LUMINANCECURVE, // Evlocallabsensitm - LUMINANCECURVE, // EvLocenareti - LUMINANCECURVE, // EvlocallabretinexMethod - LUMINANCECURVE, // Evlocallabstr - LUMINANCECURVE, // Evlocallabchrrt - LUMINANCECURVE, // Evlocallabneigh - LUMINANCECURVE, // Evlocallabvart - LUMINANCECURVE, // Evlocallabsensih - LUMINANCECURVE, // EvlocallabCTgainCurve - LUMINANCECURVE, // Evlocallabinversret - LUMINANCECURVE, // EvLocenasharp - LUMINANCECURVE, // Evlocallabsharradius - LUMINANCECURVE, // Evlocallabsharamount - LUMINANCECURVE, // Evlocallabshardamping - LUMINANCECURVE, // Evlocallabshariter - LUMINANCECURVE, // Evlocallabsensis - LUMINANCECURVE, // Evlocallabinverssha - LUMINANCECURVE, // EvLocenacbdl - LUMINANCECURVE, // EvlocallabEqualizer - LUMINANCECURVE, // Evlocallabchromacbdl - LUMINANCECURVE, // EvlocallabThresho - LUMINANCECURVE, // Evlocallabsensicb - LUMINANCECURVE, // EvLocenadenoi - LUMINANCECURVE, // Evlocallabnoiselumf - LUMINANCECURVE, // Evlocallabnoiselumc - LUMINANCECURVE, // Evlocallabnoiselumdetail - LUMINANCECURVE, // Evlocallabnoiselequal - LUMINANCECURVE, // Evlocallabnoisechrof - LUMINANCECURVE, // Evlocallabnoisechroc - LUMINANCECURVE, // Evlocallabnoisechrodetail - LUMINANCECURVE, // Evlocallabadjblur - LUMINANCECURVE, // Evlocallabbilateral - LUMINANCECURVE, // Evlocallabsensiden - LUMINANCECURVE, // Evlocallabavoid - LUMINANCECURVE, // Evlocallabsharcontrast - LUMINANCECURVE, // EvLocenacontrast - LUMINANCECURVE, // Evlocallablcradius - LUMINANCECURVE, // Evlocallablcamount - LUMINANCECURVE, // Evlocallablcdarkness - LUMINANCECURVE, // Evlocallablclightness - LUMINANCECURVE, // Evlocallabsensilc - LUMINANCECURVE, // Evlocallabdehaz - LUMINANCECURVE, // EvLocenasoft - LUMINANCECURVE, // EvLocallabstreng - LUMINANCECURVE, // EvLocallabsensisf - LUMINANCECURVE, // Evlocallabsharblur - LUMINANCECURVE, // EvLocenalabregion - LUMINANCECURVE, // EvlocallabshowmaskMethod - LUMINANCECURVE, // EvLocallabSpotSelectedWithMask - LUMINANCECURVE, // EvlocallabCCmaskshape - LUMINANCECURVE, // EvlocallabLLmaskshape - LUMINANCECURVE, // EvlocallabCCmaskexpshape - LUMINANCECURVE, // EvlocallabLLmaskexpshape - LUMINANCECURVE, // EvlocallabHHmaskshape - LUMINANCECURVE, // Evlocallabstructcol - LUMINANCECURVE, // Evlocallabstructexp - LUMINANCECURVE, // EvlocallabHHmaskexpshape - LUMINANCECURVE, // Evlocallabblendmaskcol - LUMINANCECURVE, // Evlocallabblendmaskexp - LUMINANCECURVE, // Evlocallabblurexpde - LUMINANCECURVE, // EvLocallabEnaColorMask - LUMINANCECURVE, // EvLocallabEnaExpMask - LUMINANCECURVE, // Evlocallabblurcolde - LUMINANCECURVE, // Evlocallabinversex - LUMINANCECURVE, // Evlocallabstructexclu - LUMINANCECURVE, // Evlocallabexpchroma - LUMINANCECURVE, // EvLocallabLabGridValue - LUMINANCECURVE, // EvLocallabLabstrengthgrid - LUMINANCECURVE, // EvLocallabgridMethod - LUMINANCECURVE, // EvLocenashadhigh - LUMINANCECURVE, // EvLocallabhighlights - LUMINANCECURVE, // EvLocallabh_tonalwidth - LUMINANCECURVE, // EvLocallabshadows - LUMINANCECURVE, // EvLocallabs_tonalwidth - LUMINANCECURVE, // EvLocallabsh_radius - LUMINANCECURVE, // EvLocallabsensihs - LUMINANCECURVE, // Evlocallabradmaskcol - LUMINANCECURVE, // Evlocallabradmaskexp - LUMINANCECURVE, // EvlocallabToolAdded - LUMINANCECURVE, // EvlocallabCCmaskSHshape - LUMINANCECURVE, // EvlocallabLLmaskSHshape - LUMINANCECURVE, // EvlocallabHHmaskSHshape - LUMINANCECURVE, // EvlocallabblendmaskSH - LUMINANCECURVE, // EvLocallabEnaSHMask - LUMINANCECURVE, // EvlocallabradmaskSH - LUMINANCECURVE, // EvlocallabblurSHde - LUMINANCECURVE, // Evlocallabinverssh - LUMINANCECURVE, // EvLocallabSpotbalan - LUMINANCECURVE, // EvLocallabchromaskexp - LUMINANCECURVE, // EvLocallabgammaskexp - LUMINANCECURVE, // EvLocallabslomaskexp - LUMINANCECURVE, // EvLocallabsoftradiusexp - LUMINANCECURVE, // EvLocallabchromaskcol - LUMINANCECURVE, // EvLocallabgammaskcol - LUMINANCECURVE, // EvLocallabslomaskcol - LUMINANCECURVE, // EvLocallabchromaskSH - LUMINANCECURVE, // EvLocallabgammaskSH - LUMINANCECURVE, // EvLocallabslomaskSH - LUMINANCECURVE, // EvLocallabsoftradiuscol - LUMINANCECURVE, // EvLocallabsoftradiusret - LUMINANCECURVE, // EvLocallabsoftradiuscb - LUMINANCECURVE, // EvLocallabSpotTransitweak - LUMINANCECURVE, // EvLocallabclarityml - LUMINANCECURVE, // EvLocallabcontresid - LUMINANCECURVE, // Evlocallabnoiselumf0 - LUMINANCECURVE, // Evlocallabnoiselumf2 + AUTOEXP, // EvLocallabSpotShape + AUTOEXP, // EvLocallabSpotSpotMethod + AUTOEXP, // EvLocallabSpotShapeMethod + AUTOEXP, // EvLocallabSpotLocX + AUTOEXP, // EvLocallabSpotLocXL + AUTOEXP, // EvLocallabSpotLocY + AUTOEXP, // EvLocallabSpotLocYT + AUTOEXP, // EvLocallabSpotCenter + AUTOEXP, // EvLocallabSpotCircrad + AUTOEXP, // EvLocallabSpotQualityMethod + AUTOEXP, // EvLocallabSpotTransit + AUTOEXP, // EvLocallabSpotThresh + AUTOEXP, // EvLocallabSpotIter + AUTOEXP, // EvLocallabSpotSensiexclu + AUTOEXP, // EvLocallabSpotStruc + AUTOEXP, // EvlocallabEnabled + AUTOEXP, // EvLocenacolor + AUTOEXP, // Evlocallabcurvactiv + AUTOEXP, // Evlocallablightness + AUTOEXP, // Evlocallabcontrast + AUTOEXP, // Evlocallabchroma + AUTOEXP, // Evlocallabsensi + AUTOEXP, // EvlocallabqualitycurveMethod + AUTOEXP, // Evlocallabllshape + AUTOEXP, // Evlocallabccshape + AUTOEXP, // EvlocallabLHshape + AUTOEXP, // EvlocallabHHshape + AUTOEXP, // Evlocallabinvers + AUTOEXP, // EvLocenaexpose + AUTOEXP, // Evlocallabexpcomp + AUTOEXP, // Evlocallabhlcompr + AUTOEXP, // Evlocallabhlcomprthresh + AUTOEXP, // Evlocallabblack + AUTOEXP, // Evlocallabshcompr + AUTOEXP, // Evlocallabwarm + AUTOEXP, // Evlocallabsensiex + AUTOEXP, // Evlocallabshapeexpos + AUTOEXP, // EvLocenavibrance + AUTOEXP, // EvlocallabSaturated + AUTOEXP, // EvlocallabPastels + AUTOEXP, // EvlocallabPastSatThreshold + AUTOEXP, // EvlocallabProtectSkins + AUTOEXP, // EvlocallabAvoidColorShift + AUTOEXP, // EvlocallabPastSatTog + AUTOEXP, // Evlocallabsensiv + AUTOEXP, // EvlocallabSkinTonesCurve + AUTOEXP, // EvLocenablur + AUTOEXP, // Evlocallabradius + AUTOEXP, // Evlocallabstrength + AUTOEXP, // Evlocallabsensibn + AUTOEXP, // EvlocallabblurMethod + AUTOEXP, // Evlocallabactivlum + AUTOEXP, // EvLocenatonemap + AUTOEXP, // Evlocallabstren + AUTOEXP, // Evlocallabgamma + AUTOEXP, // Evlocallabestop + AUTOEXP, // Evlocallabscaltm + AUTOEXP, // Evlocallabrewei + AUTOEXP, // Evlocallabsensitm + AUTOEXP, // EvLocenareti + AUTOEXP, // EvlocallabretinexMethod + AUTOEXP, // Evlocallabstr + AUTOEXP, // Evlocallabchrrt + AUTOEXP, // Evlocallabneigh + AUTOEXP, // Evlocallabvart + AUTOEXP, // Evlocallabsensih + AUTOEXP, // EvlocallabCTgainCurve + AUTOEXP, // Evlocallabinversret + AUTOEXP, // EvLocenasharp + AUTOEXP, // Evlocallabsharradius + AUTOEXP, // Evlocallabsharamount + AUTOEXP, // Evlocallabshardamping + AUTOEXP, // Evlocallabshariter + AUTOEXP, // Evlocallabsensis + AUTOEXP, // Evlocallabinverssha + AUTOEXP, // EvLocenacbdl + AUTOEXP, // EvlocallabEqualizer + AUTOEXP, // Evlocallabchromacbdl + AUTOEXP, // EvlocallabThresho + AUTOEXP, // Evlocallabsensicb + AUTOEXP, // EvLocenadenoi + AUTOEXP, // Evlocallabnoiselumf + AUTOEXP, // Evlocallabnoiselumc + AUTOEXP, // Evlocallabnoiselumdetail + AUTOEXP, // Evlocallabnoiselequal + AUTOEXP, // Evlocallabnoisechrof + AUTOEXP, // Evlocallabnoisechroc + AUTOEXP, // Evlocallabnoisechrodetail + AUTOEXP, // Evlocallabadjblur + AUTOEXP, // Evlocallabbilateral + AUTOEXP, // Evlocallabsensiden + AUTOEXP, // Evlocallabavoid + AUTOEXP, // Evlocallabsharcontrast + AUTOEXP, // EvLocenacontrast + AUTOEXP, // Evlocallablcradius + AUTOEXP, // Evlocallablcamount + AUTOEXP, // Evlocallablcdarkness + AUTOEXP, // Evlocallablclightness + AUTOEXP, // Evlocallabsensilc + AUTOEXP, // Evlocallabdehaz + AUTOEXP, // EvLocenasoft + AUTOEXP, // EvLocallabstreng + AUTOEXP, // EvLocallabsensisf + AUTOEXP, // Evlocallabsharblur + AUTOEXP, // EvLocenalabregion + AUTOEXP, // EvlocallabshowmaskMethod + AUTOEXP, // EvLocallabSpotSelectedWithMask + AUTOEXP, // EvlocallabCCmaskshape + AUTOEXP, // EvlocallabLLmaskshape + AUTOEXP, // EvlocallabCCmaskexpshape + AUTOEXP, // EvlocallabLLmaskexpshape + AUTOEXP, // EvlocallabHHmaskshape + AUTOEXP, // Evlocallabstructcol + AUTOEXP, // Evlocallabstructexp + AUTOEXP, // EvlocallabHHmaskexpshape + AUTOEXP, // Evlocallabblendmaskcol + AUTOEXP, // Evlocallabblendmaskexp + AUTOEXP, // Evlocallabblurexpde + AUTOEXP, // EvLocallabEnaColorMask + AUTOEXP, // EvLocallabEnaExpMask + AUTOEXP, // Evlocallabblurcolde + AUTOEXP, // Evlocallabinversex + AUTOEXP, // Evlocallabstructexclu + AUTOEXP, // Evlocallabexpchroma + AUTOEXP, // EvLocallabLabGridValue + AUTOEXP, // EvLocallabLabstrengthgrid + AUTOEXP, // EvLocallabgridMethod + AUTOEXP, // EvLocenashadhigh + AUTOEXP, // EvLocallabhighlights + AUTOEXP, // EvLocallabh_tonalwidth + AUTOEXP, // EvLocallabshadows + AUTOEXP, // EvLocallabs_tonalwidth + AUTOEXP, // EvLocallabsh_radius + AUTOEXP, // EvLocallabsensihs + AUTOEXP, // Evlocallabradmaskcol + AUTOEXP, // Evlocallabradmaskexp + AUTOEXP, // EvlocallabToolAdded + AUTOEXP, // EvlocallabCCmaskSHshape + AUTOEXP, // EvlocallabLLmaskSHshape + AUTOEXP, // EvlocallabHHmaskSHshape + AUTOEXP, // EvlocallabblendmaskSH + AUTOEXP, // EvLocallabEnaSHMask + AUTOEXP, // EvlocallabradmaskSH + AUTOEXP, // EvlocallabblurSHde + AUTOEXP, // Evlocallabinverssh + AUTOEXP, // EvLocallabSpotbalan + AUTOEXP, // EvLocallabchromaskexp + AUTOEXP, // EvLocallabgammaskexp + AUTOEXP, // EvLocallabslomaskexp + AUTOEXP, // EvLocallabsoftradiusexp + AUTOEXP, // EvLocallabchromaskcol + AUTOEXP, // EvLocallabgammaskcol + AUTOEXP, // EvLocallabslomaskcol + AUTOEXP, // EvLocallabchromaskSH + AUTOEXP, // EvLocallabgammaskSH + AUTOEXP, // EvLocallabslomaskSH + AUTOEXP, // EvLocallabsoftradiuscol + AUTOEXP, // EvLocallabsoftradiusret + AUTOEXP, // EvLocallabsoftradiuscb + AUTOEXP, // EvLocallabSpotTransitweak + AUTOEXP, // EvLocallabclarityml + AUTOEXP, // EvLocallabcontresid + AUTOEXP, // Evlocallabnoiselumf0 + AUTOEXP, // Evlocallabnoiselumf2 0, // Evlocallabblurcbdl - LUMINANCECURVE, // Evlocallabblendmaskcb - LUMINANCECURVE, // Evlocallabradmaskcb - LUMINANCECURVE, // Evlocallabchromaskcb - LUMINANCECURVE, // Evlocallabgammaskcb - LUMINANCECURVE, // Evlocallabslomaskcb - LUMINANCECURVE, // EvlocallabCCmaskcbshape - LUMINANCECURVE, // EvlocallabLLmaskcbshape - LUMINANCECURVE, // EvlocallabHHmaskcbshape - LUMINANCECURVE, // EvLocallabEnacbMask + AUTOEXP, // Evlocallabblendmaskcb + AUTOEXP, // Evlocallabradmaskcb + AUTOEXP, // Evlocallabchromaskcb + AUTOEXP, // Evlocallabgammaskcb + AUTOEXP, // Evlocallabslomaskcb + AUTOEXP, // EvlocallabCCmaskcbshape + AUTOEXP, // EvlocallabLLmaskcbshape + AUTOEXP, // EvlocallabHHmaskcbshape + AUTOEXP, // EvLocallabEnacbMask M_VOID, // EvlocallabToolRemovedWithoutRefresh - LUMINANCECURVE, // Evlocallabsoftradiustm - LUMINANCECURVE, // EvLocallabSpotTransitgrad - LUMINANCECURVE, // Evlocallabamount - LUMINANCECURVE, // Evlocallabsatur - LUMINANCECURVE, // EvlocallabCCmaskretishape - LUMINANCECURVE, // EvlocallabLLmaskretishape - LUMINANCECURVE, // EvlocallabHHmaskretishape - LUMINANCECURVE, // EvLocallabEnaretiMask - LUMINANCECURVE, // Evlocallabblendmaskreti - LUMINANCECURVE, // Evlocallabradmaskreti - LUMINANCECURVE, // Evlocallabchromaskreti - LUMINANCECURVE, // Evlocallabgammaskreti - LUMINANCECURVE, // Evlocallabslomaskreti - LUMINANCECURVE, // EvlocallabToolRemovedWithRefresh - LUMINANCECURVE, // EvLocallabEnaretiMasktmap - LUMINANCECURVE, // Evlocallabscalereti - LUMINANCECURVE, // Evlocallabdarkness - LUMINANCECURVE, // Evlocallablightnessreti - LUMINANCECURVE, // Evlocallablimd - LUMINANCECURVE, // Evlocallablaplace - LUMINANCECURVE, // EvlocallabsoftMethod - LUMINANCECURVE, // Evlocallabequilret - LUMINANCECURVE, // Evlocallabequiltm - LUMINANCECURVE, // Evlocallabfftwlc - LUMINANCECURVE, // Evlocallabfftwreti - LUMINANCECURVE, // EvlocallabshowmasksoftMethod - LUMINANCECURVE, // Evlocallabshadex - LUMINANCECURVE, // EvlocallabexpMethod - LUMINANCECURVE, // EvLocallablaplacexp - LUMINANCECURVE, // EvLocallabbalanexp - LUMINANCECURVE, // EvLocallablinear - LUMINANCECURVE, // EvlocallabCCmasktmshape - LUMINANCECURVE, // EvlocallabLLmasktmshape - LUMINANCECURVE, // EvlocallabHHmasktmshape - LUMINANCECURVE, // EvLocallabEnatmMask - LUMINANCECURVE, // Evlocallabblendmasktm - LUMINANCECURVE, // Evlocallabradmasktm - LUMINANCECURVE, // Evlocallabchromasktm - LUMINANCECURVE, // Evlocallabgammasktm - LUMINANCECURVE, // Evlocallabslomasktm - LUMINANCECURVE, // EvlocallabshowmasktmMethod - LUMINANCECURVE, // EvlocallablocalcontMethod - LUMINANCECURVE, // Evlocallabwavcurve - LUMINANCECURVE, // Evlocallablevelwav - LUMINANCECURVE, // Evlocallabresidcont - LUMINANCECURVE, // EvlocallabCCmaskblshape - LUMINANCECURVE, // EvlocallabLLmaskblshape - LUMINANCECURVE, // EvlocallabHHmaskblshape - LUMINANCECURVE, // EvLocallabEnablMask - LUMINANCECURVE, // EvlocallabshowmaskblMethod - LUMINANCECURVE, // Evlocallabblendmaskbl - LUMINANCECURVE, // Evlocallabradmaskbl - LUMINANCECURVE, // Evlocallabchromaskbl - LUMINANCECURVE, // Evlocallabgammaskbl - LUMINANCECURVE, // Evlocallabslomaskbl - LUMINANCECURVE, // EvlocallabblMethod - LUMINANCECURVE, // EvlocallabmedMethod - LUMINANCECURVE, // Evlocallabitera - LUMINANCECURVE, // Evlocallabguidbl - LUMINANCECURVE, // Evlocallabepsbl - LUMINANCECURVE, // EvlocallabshowmaskcolMethodinv - LUMINANCECURVE, // EvlocallabshowmaskexpMethodinv - LUMINANCECURVE, // EvlocallabshowmaskSHMethodinv - LUMINANCECURVE, // Evlocallabclarilres - LUMINANCECURVE, // Evlocallabclarisoft - LUMINANCECURVE, // Evlocallabclaricres - LUMINANCECURVE, // Evlocallabresidchro - LUMINANCECURVE, // Evlocallabgamm - LUMINANCECURVE, // Evlocallabfatamount - LUMINANCECURVE, // Evlocallabfatdetail - LUMINANCECURVE, // Evlocallabfatanchor - LUMINANCECURVE, // Evlocallabfatlevel - LUMINANCECURVE, // EvlocallabSpotCreated - LUMINANCECURVE, // EvlocallabexnoiseMethod - LUMINANCECURVE, // Evlocallabdepth - LUMINANCECURVE, // Evlocallabloglin - LUMINANCECURVE, // Evlocallablumonly - LUMINANCECURVE, // Evlocallaboffs - LUMINANCECURVE, // EvlocallabCTtransCurve - LUMINANCECURVE, // Evlocallabcliptm - LUMINANCECURVE, // Evlocallabenatmmaskaft - LUMINANCECURVE, // EvlocallabenaExpmaskaft - LUMINANCECURVE, // Evlocallablapmasktm - LUMINANCECURVE, // Evlocallablapmaskreti - LUMINANCECURVE, // Evlocallablapmaskexp - LUMINANCECURVE, // Evlocallablapmaskcol - LUMINANCECURVE, // EvlocallablapmaskSH - LUMINANCECURVE, // Evlocallablapmaskcb - LUMINANCECURVE, // Evlocallablapmaskbl - LUMINANCECURVE, // Evlocallablaplac - LUMINANCECURVE, // Evlocallabdetailthr - LUMINANCECURVE, // Evlocallabfftwbl - LUMINANCECURVE, // Evlocallabisogr - LUMINANCECURVE, // Evlocallabstrengr - LUMINANCECURVE, // Evlocallabscalegr - LUMINANCECURVE, // EvlocallabLmaskshape - LUMINANCECURVE, // EvlocallabLmaskexpshape - LUMINANCECURVE, // EvlocallabLmaskSHshape - LUMINANCECURVE, // EvlocallabLmasktmshape - LUMINANCECURVE, // EvlocallabLmaskretishape - LUMINANCECURVE, // EvlocallabLmaskcbshape - LUMINANCECURVE, // EvlocallabLmaskblshape - LUMINANCECURVE, // EvlocallabLLmaskblshapewav - LUMINANCECURVE, // Evlocallabshadmaskbl - LUMINANCECURVE, // EvlocallabLLmaskcolshapewav - LUMINANCECURVE, // Evlocallabshadmaskcol - LUMINANCECURVE, // EvlocallabcsThreshold - LUMINANCECURVE, // EvlocallabcsThresholdblur - LUMINANCECURVE, // EvlocallabcsThresholdcol - LUMINANCECURVE, // Evlocallabdeltae - LUMINANCECURVE, // EvLocallabSpotscopemask - LUMINANCECURVE, // EvlocallabshMethod - LUMINANCECURVE, // EvlocallabEqualizersh - LUMINANCECURVE, // EvlocallabdetailSH - LUMINANCECURVE, // EvlocallabfatamountSH - LUMINANCECURVE, // EvlocallabfatanchorSH - LUMINANCECURVE, // Evlocallabshortc - LUMINANCECURVE, // EvLocallabSpotlumask - LUMINANCECURVE, // EvlocallabgamSH - LUMINANCECURVE, // EvlocallabsloSH - LUMINANCECURVE, // Evlocallabsavrest - LUMINANCECURVE, // Evlocallabrecurs - LUMINANCECURVE, // EvLocallabmergecolMethod - LUMINANCECURVE, // EvLocallabopacol - LUMINANCECURVE, // Evlocallabrgbshape - LUMINANCECURVE, // EvLocallabtoneMethod - LUMINANCECURVE, // EvLocallabspecial - LUMINANCECURVE, // EvLocallabconthrcol - LUMINANCECURVE, // EvLocallabmerMethod - LUMINANCECURVE, // EvLocallabstrumaskcol - LUMINANCECURVE, // EvLocallabstrumaskbl - LUMINANCECURVE, // EvLocallabtoolcol - LUMINANCECURVE, // Evlocallabtoolbl - LUMINANCECURVE, // EvlocallabHHhmaskshape - LUMINANCECURVE, // EvlocallabCCmaskvibshape - LUMINANCECURVE, // EvlocallabLLmaskvibshape - LUMINANCECURVE, // EvlocallabHHmaskvibshape - LUMINANCECURVE, // EvlocallabshowmaskvibMethod - LUMINANCECURVE, // EvLocallabEnavibMask - LUMINANCECURVE, // Evlocallabblendmaskvi - LUMINANCECURVE, // Evlocallabradmaskvib - LUMINANCECURVE, // Evlocallabchromaskvib - LUMINANCECURVE, // Evlocallabgammaskvib - LUMINANCECURVE, // Evlocallabslomaskvib - LUMINANCECURVE, // Evlocallablapmaskvib - LUMINANCECURVE, // EvlocallabLmaskvibshape - LUMINANCECURVE, // EvLocallabLabGridmergValue - LUMINANCECURVE, // EvLocallabmercol - LUMINANCECURVE, // EvLocallabmerlucol - LUMINANCECURVE, // Evlocallabstrmaskexp - LUMINANCECURVE, // Evlocallabangmaskexp - LUMINANCECURVE, // Evlocallabstrexp - LUMINANCECURVE, // Evlocallabangexp - LUMINANCECURVE, // EvlocallabstrSH - LUMINANCECURVE, // EvlocallabangSH - LUMINANCECURVE, // Evlocallabstrcol - LUMINANCECURVE, // Evlocallabangcol - LUMINANCECURVE, // Evlocallabstrcolab - LUMINANCECURVE, // EvLocallabSpotfeather - LUMINANCECURVE, // Evlocallabstrcolh - LUMINANCECURVE, // Evlocallabstrvib - LUMINANCECURVE, // Evlocallabangvib - LUMINANCECURVE, // Evlocallabstrvibab - LUMINANCECURVE, // Evlocallabstrvibh - LUMINANCECURVE, // EvLocallabSpotcomplexMethod - LUMINANCECURVE, // Evlocallabclshape - LUMINANCECURVE, // Evlocallablcshape - LUMINANCECURVE, // Evlocallabblurcol - LUMINANCECURVE, // Evlocallabcontcol - LUMINANCECURVE, // EvLocallabfftColorMask - RGBCURVE | M_AUTOEXP, // EvLocenalog - AUTOEXP, // EvLocallabAuto - LUMINANCECURVE, // EvlocallabsourceGray - AUTOEXP, // EvlocallabsourceGrayAuto - AUTOEXP, // EvlocallabAutoGray - LUMINANCECURVE, // EvlocallabblackEv - LUMINANCECURVE, // EvlocallabwhiteEv - LUMINANCECURVE, // EvlocallabtargetGray - LUMINANCECURVE, // Evlocallabdetail - LUMINANCECURVE, // Evlocallabsensilog + AUTOEXP, // Evlocallabsoftradiustm + AUTOEXP, // EvLocallabSpotTransitgrad + AUTOEXP, // Evlocallabamount + AUTOEXP, // Evlocallabsatur + AUTOEXP, // EvlocallabCCmaskretishape + AUTOEXP, // EvlocallabLLmaskretishape + AUTOEXP, // EvlocallabHHmaskretishape + AUTOEXP, // EvLocallabEnaretiMask + AUTOEXP, // Evlocallabblendmaskreti + AUTOEXP, // Evlocallabradmaskreti + AUTOEXP, // Evlocallabchromaskreti + AUTOEXP, // Evlocallabgammaskreti + AUTOEXP, // Evlocallabslomaskreti + AUTOEXP, // EvlocallabToolRemovedWithRefresh + AUTOEXP, // EvLocallabEnaretiMasktmap + AUTOEXP, // Evlocallabscalereti + AUTOEXP, // Evlocallabdarkness + AUTOEXP, // Evlocallablightnessreti + AUTOEXP, // Evlocallablimd + AUTOEXP, // Evlocallablaplace + AUTOEXP, // EvlocallabsoftMethod + AUTOEXP, // Evlocallabequilret + AUTOEXP, // Evlocallabequiltm + AUTOEXP, // Evlocallabfftwlc + AUTOEXP, // Evlocallabfftwreti + AUTOEXP, // EvlocallabshowmasksoftMethod + AUTOEXP, // Evlocallabshadex + AUTOEXP, // EvlocallabexpMethod + AUTOEXP, // EvLocallablaplacexp + AUTOEXP, // EvLocallabbalanexp + AUTOEXP, // EvLocallablinear + AUTOEXP, // EvlocallabCCmasktmshape + AUTOEXP, // EvlocallabLLmasktmshape + AUTOEXP, // EvlocallabHHmasktmshape + AUTOEXP, // EvLocallabEnatmMask + AUTOEXP, // Evlocallabblendmasktm + AUTOEXP, // Evlocallabradmasktm + AUTOEXP, // Evlocallabchromasktm + AUTOEXP, // Evlocallabgammasktm + AUTOEXP, // Evlocallabslomasktm + AUTOEXP, // EvlocallabshowmasktmMethod + AUTOEXP, // EvlocallablocalcontMethod + AUTOEXP, // Evlocallabwavcurve + AUTOEXP, // Evlocallablevelwav + AUTOEXP, // Evlocallabresidcont + AUTOEXP, // EvlocallabCCmaskblshape + AUTOEXP, // EvlocallabLLmaskblshape + AUTOEXP, // EvlocallabHHmaskblshape + AUTOEXP, // EvLocallabEnablMask + AUTOEXP, // EvlocallabshowmaskblMethod + AUTOEXP, // Evlocallabblendmaskbl + AUTOEXP, // Evlocallabradmaskbl + AUTOEXP, // Evlocallabchromaskbl + AUTOEXP, // Evlocallabgammaskbl + AUTOEXP, // Evlocallabslomaskbl + AUTOEXP, // EvlocallabblMethod + AUTOEXP, // EvlocallabmedMethod + AUTOEXP, // Evlocallabitera + AUTOEXP, // Evlocallabguidbl + AUTOEXP, // Evlocallabepsbl + AUTOEXP, // EvlocallabshowmaskcolMethodinv + AUTOEXP, // EvlocallabshowmaskexpMethodinv + AUTOEXP, // EvlocallabshowmaskSHMethodinv + AUTOEXP, // Evlocallabclarilres + AUTOEXP, // Evlocallabclarisoft + AUTOEXP, // Evlocallabclaricres + AUTOEXP, // Evlocallabresidchro + AUTOEXP, // Evlocallabgamm + AUTOEXP, // Evlocallabfatamount + AUTOEXP, // Evlocallabfatdetail + AUTOEXP, // Evlocallabfatanchor + AUTOEXP, // Evlocallabfatlevel + AUTOEXP, // EvlocallabSpotCreated + AUTOEXP, // EvlocallabexnoiseMethod + AUTOEXP, // Evlocallabdepth + AUTOEXP, // Evlocallabloglin + AUTOEXP, // EvlocallabdehazeSaturation + AUTOEXP, // Evlocallaboffs + AUTOEXP, // EvlocallabCTtransCurve + AUTOEXP, // Evlocallabcliptm + AUTOEXP, // Evlocallabenatmmaskaft + AUTOEXP, // EvlocallabenaExpmaskaft + AUTOEXP, // Evlocallablapmasktm + AUTOEXP, // Evlocallablapmaskreti + AUTOEXP, // Evlocallablapmaskexp + AUTOEXP, // Evlocallablapmaskcol + AUTOEXP, // EvlocallablapmaskSH + AUTOEXP, // Evlocallablapmaskcb + AUTOEXP, // Evlocallablapmaskbl + AUTOEXP, // Evlocallablaplac + AUTOEXP, // Evlocallabdetailthr + AUTOEXP, // Evlocallabfftwbl + AUTOEXP, // Evlocallabisogr + AUTOEXP, // Evlocallabstrengr + AUTOEXP, // Evlocallabscalegr + AUTOEXP, // EvlocallabLmaskshape + AUTOEXP, // EvlocallabLmaskexpshape + AUTOEXP, // EvlocallabLmaskSHshape + AUTOEXP, // EvlocallabLmasktmshape + AUTOEXP, // EvlocallabLmaskretishape + AUTOEXP, // EvlocallabLmaskcbshape + AUTOEXP, // EvlocallabLmaskblshape + AUTOEXP, // EvlocallabLLmaskblshapewav + AUTOEXP, // Evlocallabshadmaskbl + AUTOEXP, // EvlocallabLLmaskcolshapewav + AUTOEXP, // Evlocallabshadmaskcol + AUTOEXP, // EvlocallabcsThreshold + AUTOEXP, // EvlocallabcsThresholdblur + AUTOEXP, // EvlocallabcsThresholdcol + AUTOEXP, // Evlocallabdeltae + AUTOEXP, // EvLocallabSpotscopemask + AUTOEXP, // EvlocallabshMethod + AUTOEXP, // EvlocallabEqualizersh + AUTOEXP, // EvlocallabdetailSH + AUTOEXP, // EvlocallabfatamountSH + AUTOEXP, // EvlocallabfatanchorSH + AUTOEXP, // Evlocallabshortc + AUTOEXP, // EvLocallabSpotlumask + AUTOEXP, // EvlocallabgamSH + AUTOEXP, // EvlocallabsloSH + AUTOEXP, // Evlocallabsavrest + AUTOEXP, // Evlocallabrecurs + AUTOEXP, // EvLocallabmergecolMethod + AUTOEXP, // EvLocallabopacol + AUTOEXP, // Evlocallabrgbshape + AUTOEXP, // EvLocallabtoneMethod + AUTOEXP, // EvLocallabspecial + AUTOEXP, // EvLocallabconthrcol + AUTOEXP, // EvLocallabmerMethod + AUTOEXP, // EvLocallabstrumaskcol + AUTOEXP, // EvLocallabstrumaskbl + AUTOEXP, // EvLocallabtoolcol + AUTOEXP, // Evlocallabtoolbl + AUTOEXP, // EvlocallabHHhmaskshape + AUTOEXP, // EvlocallabCCmaskvibshape + AUTOEXP, // EvlocallabLLmaskvibshape + AUTOEXP, // EvlocallabHHmaskvibshape + AUTOEXP, // EvlocallabshowmaskvibMethod + AUTOEXP, // EvLocallabEnavibMask + AUTOEXP, // Evlocallabblendmaskvi + AUTOEXP, // Evlocallabradmaskvib + AUTOEXP, // Evlocallabchromaskvib + AUTOEXP, // Evlocallabgammaskvib + AUTOEXP, // Evlocallabslomaskvib + AUTOEXP, // Evlocallablapmaskvib + AUTOEXP, // EvlocallabLmaskvibshape + AUTOEXP, // EvLocallabLabGridmergValue + AUTOEXP, // EvLocallabmercol + AUTOEXP, // EvLocallabmerlucol + AUTOEXP, // Evlocallabstrmaskexp + AUTOEXP, // Evlocallabangmaskexp + AUTOEXP, // Evlocallabstrexp + AUTOEXP, // Evlocallabangexp + AUTOEXP, // EvlocallabstrSH + AUTOEXP, // EvlocallabangSH + AUTOEXP, // Evlocallabstrcol + AUTOEXP, // Evlocallabangcol + AUTOEXP, // Evlocallabstrcolab + AUTOEXP, // EvLocallabSpotfeather + AUTOEXP, // Evlocallabstrcolh + AUTOEXP, // Evlocallabstrvib + AUTOEXP, // Evlocallabangvib + AUTOEXP, // Evlocallabstrvibab + AUTOEXP, // Evlocallabstrvibh + AUTOEXP, // EvLocallabSpotcomplexMethod + AUTOEXP, // Evlocallabclshape + AUTOEXP, // Evlocallablcshape + AUTOEXP, // Evlocallabblurcol + AUTOEXP, // Evlocallabcontcol + AUTOEXP, // EvLocallabfftColorMask + AUTOEXP | M_AUTOEXP, // EvLocenalog + HDR, // EvLocallabAuto + AUTOEXP, // EvlocallabsourceGray + HDR, // EvlocallabsourceGrayAuto + HDR, // EvlocallabAutoGray + AUTOEXP, // EvlocallabblackEv + AUTOEXP, // EvlocallabwhiteEv + AUTOEXP, // EvlocallabtargetGray + AUTOEXP, // Evlocallabdetail + AUTOEXP, // Evlocallabsensilog AUTOEXP, // Evlocallabfullimage - LUMINANCECURVE, // Evlocallabbaselog - LUMINANCECURVE, // Evlocallabresidblur - LUMINANCECURVE, // Evlocallabblurlc - LUMINANCECURVE, // Evlocallablevelblur - LUMINANCECURVE, // EvlocallabwavCurvelev - LUMINANCECURVE, // EvlocallabwavCurvecon - LUMINANCECURVE, // Evlocallabsigma - LUMINANCECURVE, // Evlocallaboriglc - LUMINANCECURVE, // Evlocallabsigmadc - LUMINANCECURVE, // Evlocallabdeltad - LUMINANCECURVE, // EvlocallabwavCurvecomp - LUMINANCECURVE, // Evlocallabfatres - LUMINANCECURVE, // EvLocallabSpotbalanh - LUMINANCECURVE, // EvlocallabwavCurveden - LUMINANCECURVE, // EvlocallabHHmasklcshape - LUMINANCECURVE, // EvlocallabCCmasklcshape - LUMINANCECURVE, // EvlocallabLLmasklcshape - LUMINANCECURVE, // EvlocallabEnalcMask - LUMINANCECURVE, // EvlocallabshowmasklcMethod - LUMINANCECURVE, // Evlocallabblendmasklc - LUMINANCECURVE, // Evlocallabradmasklc - LUMINANCECURVE, // Evlocallabchromasklc - LUMINANCECURVE, // EvlocallabLmasklcshape - LUMINANCECURVE, // Evlocallabchromalev - LUMINANCECURVE, // Evlocallabchromablu - LUMINANCECURVE, // Evlocallaboffset - LUMINANCECURVE, // Evlocallabwavblur - LUMINANCECURVE, // Evlocallabwavcont - LUMINANCECURVE, // Evlocallabwavcomp - LUMINANCECURVE, // Evlocallabwavcompre - LUMINANCECURVE, // EvlocallabwavCurvecompre - LUMINANCECURVE, // Evlocallabresidcomp - LUMINANCECURVE, // Evlocallabthreswav - LUMINANCECURVE, // Evlocallabstrwav - LUMINANCECURVE, // Evlocallabangwav - LUMINANCECURVE, // Evlocallabwavgradl - LUMINANCECURVE, // Evlocallabstrlog - LUMINANCECURVE, // Evlocallabanglog - LUMINANCECURVE, // EvLocallabSpotcolorde - LUMINANCECURVE, // EvlocallabshowmasksharMethod - LUMINANCECURVE, // Evlocallabshowreset - LUMINANCECURVE, // Evlocallabstrengthw - LUMINANCECURVE, // Evlocallabradiusw - LUMINANCECURVE, // Evlocallabdetailw - LUMINANCECURVE, // Evlocallabgradw - LUMINANCECURVE, // Evlocallabtloww - LUMINANCECURVE, // Evlocallabthigw - LUMINANCECURVE, // EvlocallabwavCurveedg - LUMINANCECURVE, // EvlocallablocaledgMethod - LUMINANCECURVE, // Evlocallabwavedg - LUMINANCECURVE, // Evlocallabedgw - LUMINANCECURVE, // Evlocallabbasew - LUMINANCECURVE, // EvlocallablocalneiMethod - LUMINANCECURVE, // Evlocallabwaveshow - LUMINANCECURVE, // EvLocallabSpotwavMethod - LUMINANCECURVE, // EvlocallabchroMethod - LUMINANCECURVE, // Evlocallabstrbl - LUMINANCECURVE, // Evlocallabsigmadr - LUMINANCECURVE, // Evlocallabsigmabl - LUMINANCECURVE, // Evlocallabsigmaed - LUMINANCECURVE, // Evlocallabresidsha - LUMINANCECURVE, // Evlocallabresidshathr - LUMINANCECURVE, // Evlocallabresidhi - LUMINANCECURVE, // Evlocallabresidhithr - LUMINANCECURVE, // Evlocallabsigmalc - LUMINANCECURVE, // Evlocallabsigmalc2 - LUMINANCECURVE, // Evlocallabblwh - LUMINANCECURVE, // EvlocallabcomplexityWithRefresh + AUTOEXP, // Evlocallabbaselog + AUTOEXP, // Evlocallabresidblur + AUTOEXP, // Evlocallabblurlc + AUTOEXP, // Evlocallablevelblur + AUTOEXP, // EvlocallabwavCurvelev + AUTOEXP, // EvlocallabwavCurvecon + AUTOEXP, // Evlocallabsigma + AUTOEXP, // Evlocallaboriglc + AUTOEXP, // Evlocallabsigmadc + AUTOEXP, // Evlocallabdeltad + AUTOEXP, // EvlocallabwavCurvecomp + AUTOEXP, // Evlocallabfatres + AUTOEXP, // EvLocallabSpotbalanh + AUTOEXP, // EvlocallabwavCurveden + AUTOEXP, // EvlocallabHHmasklcshape + AUTOEXP, // EvlocallabCCmasklcshape + AUTOEXP, // EvlocallabLLmasklcshape + AUTOEXP, // EvlocallabEnalcMask + AUTOEXP, // EvlocallabshowmasklcMethod + AUTOEXP, // Evlocallabblendmasklc + AUTOEXP, // Evlocallabradmasklc + AUTOEXP, // Evlocallabchromasklc + AUTOEXP, // EvlocallabLmasklcshape + AUTOEXP, // Evlocallabchromalev + AUTOEXP, // Evlocallabchromablu + AUTOEXP, // Evlocallaboffset + AUTOEXP, // Evlocallabwavblur + AUTOEXP, // Evlocallabwavcont + AUTOEXP, // Evlocallabwavcomp + AUTOEXP, // Evlocallabwavcompre + AUTOEXP, // EvlocallabwavCurvecompre + AUTOEXP, // Evlocallabresidcomp + AUTOEXP, // Evlocallabthreswav + AUTOEXP, // Evlocallabstrwav + AUTOEXP, // Evlocallabangwav + AUTOEXP, // Evlocallabwavgradl + AUTOEXP, // Evlocallabstrlog + AUTOEXP, // Evlocallabanglog + AUTOEXP, // EvLocallabSpotcolorde + AUTOEXP, // EvlocallabshowmasksharMethod + AUTOEXP, // Evlocallabshowreset + AUTOEXP, // Evlocallabstrengthw + AUTOEXP, // Evlocallabradiusw + AUTOEXP, // Evlocallabdetailw + AUTOEXP, // Evlocallabgradw + AUTOEXP, // Evlocallabtloww + AUTOEXP, // Evlocallabthigw + AUTOEXP, // EvlocallabwavCurveedg + AUTOEXP, // EvlocallablocaledgMethod + AUTOEXP, // Evlocallabwavedg + AUTOEXP, // Evlocallabedgw + AUTOEXP, // Evlocallabbasew + AUTOEXP, // EvlocallablocalneiMethod + AUTOEXP, // Evlocallabwaveshow + AUTOEXP, // EvLocallabSpotwavMethod + AUTOEXP, // EvlocallabchroMethod + AUTOEXP, // Evlocallabstrbl + AUTOEXP, // Evlocallabsigmadr + AUTOEXP, // Evlocallabsigmabl + AUTOEXP, // Evlocallabsigmaed + AUTOEXP, // Evlocallabresidsha + AUTOEXP, // Evlocallabresidshathr + AUTOEXP, // Evlocallabresidhi + AUTOEXP, // Evlocallabresidhithr + AUTOEXP, // Evlocallabsigmalc + AUTOEXP, // Evlocallabsigmalc2 + AUTOEXP, // Evlocallabblwh + AUTOEXP, // EvlocallabcomplexityWithRefresh 0, // can be reused - LUMINANCECURVE, // EvLocallabSpotcolorscope - LUMINANCECURVE, // EvlocallabshowmasktypMethod - LUMINANCECURVE, // Evlocallabshadmaskblsha - LUMINANCECURVE, // EvLocenamask - LUMINANCECURVE, // Evlocallabsensimask - LUMINANCECURVE, // Evlocallabblendmask - LUMINANCECURVE, // EvLocallabEna_Mask - LUMINANCECURVE, // Evlocallabradmask - LUMINANCECURVE, // Evlocallablapmask - LUMINANCECURVE, // Evlocallabchromask - LUMINANCECURVE, // Evlocallabgammask - LUMINANCECURVE, // Evlocallabslopmask - LUMINANCECURVE, // EvlocallabCCmask_shape - LUMINANCECURVE, // EvlocallabLLmask_shape - LUMINANCECURVE, // EvlocallabHHmask_shape - LUMINANCECURVE, // EvLocallabtoolmask - LUMINANCECURVE, // Evlocallabstrumaskmask - LUMINANCECURVE, // EvlocallabHHhmask_shape - LUMINANCECURVE, // EvLocallabfftmask - LUMINANCECURVE, // Evlocallabblurmask - LUMINANCECURVE, // Evlocallabcontmask - LUMINANCECURVE, // Evlocallabshadmask - LUMINANCECURVE, // EvlocallabLmask_shape - LUMINANCECURVE, // EvlocallabLLmask_shapewav - LUMINANCECURVE, // EvlocallabcsThresholdmask - LUMINANCECURVE, // Evlocallabstr_mask - LUMINANCECURVE, // Evlocallabang_mask - LUMINANCECURVE, // Evlocallabsoftradiusmask - LUMINANCECURVE, // Evlocallabblendmaskab - LUMINANCECURVE, // EvLocallabSpotprevMethod - LUMINANCECURVE, // Evlocallabactiv - LUMINANCECURVE, // EvlocallabCHshape - LUMINANCECURVE, //EvlocallabquaMethod - LUMINANCECURVE, //Evlocallabhishow - LUMINANCECURVE // Evlocallabinvbl + AUTOEXP, // EvLocallabSpotcolorscope + AUTOEXP, // EvlocallabshowmasktypMethod + AUTOEXP, // Evlocallabshadmaskblsha + AUTOEXP, // EvLocenamask + AUTOEXP, // Evlocallabsensimask + AUTOEXP, // Evlocallabblendmask + AUTOEXP, // EvLocallabEna_Mask + AUTOEXP, // Evlocallabradmask + AUTOEXP, // Evlocallablapmask + AUTOEXP, // Evlocallabchromask + AUTOEXP, // Evlocallabgammask + AUTOEXP, // Evlocallabslopmask + AUTOEXP, // EvlocallabCCmask_shape + AUTOEXP, // EvlocallabLLmask_shape + AUTOEXP, // EvlocallabHHmask_shape + AUTOEXP, // EvLocallabtoolmask + AUTOEXP, // Evlocallabstrumaskmask + AUTOEXP, // EvlocallabHHhmask_shape + AUTOEXP, // EvLocallabfftmask + AUTOEXP, // Evlocallabblurmask + AUTOEXP, // Evlocallabcontmask + AUTOEXP, // Evlocallabshadmask + AUTOEXP, // EvlocallabLmask_shape + AUTOEXP, // EvlocallabLLmask_shapewav + AUTOEXP, // EvlocallabcsThresholdmask + AUTOEXP, // Evlocallabstr_mask + AUTOEXP, // Evlocallabang_mask + AUTOEXP, // Evlocallabsoftradiusmask + AUTOEXP, // Evlocallabblendmaskab + AUTOEXP, // EvLocallabSpotprevMethod + AUTOEXP, // Evlocallabactiv + AUTOEXP, // EvlocallabCHshape + AUTOEXP, //EvlocallabquaMethod + AUTOEXP, //Evlocallabhishow + AUTOEXP, // Evlocallabinvbl + AUTOEXP, // Evlocallabcatad + AUTOEXP, // Evlocallabciecam + AUTOEXP, // Evlocallabsourceabs + AUTOEXP, // Evlocallabtargabs + AUTOEXP, // Evlocallabsurround + AUTOEXP, // Evlocallabsaturl + AUTOEXP, // Evlocallabcontl + AUTOEXP, //EvlocallabCCmaskshapeL + AUTOEXP, //EvlocallabLLmaskshapeL + AUTOEXP, // EvlocallabHHmaskshapeL + AUTOEXP, // EvlocallabenaLMask + AUTOEXP, // EvlocallabblendmaskL + AUTOEXP, // EvlocallabradmaskL + AUTOEXP, // EvlocallabchromaskL + AUTOEXP, //EvlocallabLmaskshapeL + AUTOEXP, // Evlocallablightl + AUTOEXP, // EvlocallabLshapeL + AUTOEXP, // Evlocallabcontq + AUTOEXP, // Evlocallabsursour + AUTOEXP, // Evlocallablightq + AUTOEXP, // Evlocallabcolorfl + AUTOEXP, // Evlocallabrepar + AUTOEXP, //EvlocallabwavCurvehue + AUTOEXP, // Evlocallablevelthr + AUTOEXP, // Evlocallablevelthrlow + AUTOEXP, //Evlocallabusemask1 + AUTOEXP, // Evlocallablnoiselow + AUTOEXP, // Evlocallabrecothres + AUTOEXP, // Evlocallablowthres + AUTOEXP, // Evlocallabhigthres + AUTOEXP, // Evlocallabrecothresd + AUTOEXP, // Evlocallablowthresd + AUTOEXP, // Evlocallabhigthresd + AUTOEXP, // Evlocallabinvmaskd + AUTOEXP, // Evlocallabinvmask + AUTOEXP, // Evlocallabdecayd + AUTOEXP, // Evlocallabrecothresc + AUTOEXP, // Evlocallablowthresc + AUTOEXP, // Evlocallabhigthresc + AUTOEXP, // Evlocallabdecayc + AUTOEXP, // Evlocallabmidthresd + AUTOEXP, // Evlocallabrecothresl + AUTOEXP, // Evlocallablowthresl + AUTOEXP, // Evlocallabhigthresl + AUTOEXP, // Evlocallabdecayl + AUTOEXP, // Evlocallabrecothrese + AUTOEXP, // Evlocallablowthrese + AUTOEXP, // Evlocallabhigthrese + AUTOEXP, // Evlocallabdecaye + AUTOEXP, // Evlocallabrecothress + AUTOEXP, // Evlocallablowthress + AUTOEXP, // Evlocallabhigthress + AUTOEXP, // Evlocallabdecays + AUTOEXP, // Evlocallabrecothrev + AUTOEXP, // Evlocallablowthresv + AUTOEXP, // Evlocallabhigthresv + AUTOEXP, // Evlocallabdecayv + AUTOEXP, // Evlocallabrecothrew + AUTOEXP, // Evlocallablowthresw + AUTOEXP, // Evlocallabhigthresw + AUTOEXP, // Evlocallabdecayw + AUTOEXP, // Evlocallabmidthresdch + AUTOEXP, // Evlocallabrecothret + AUTOEXP, // Evlocallablowthrest + AUTOEXP, // Evlocallabhigthrest + AUTOEXP, // Evlocallabdecayt + AUTOEXP, // Evlocallabrecothrecb + AUTOEXP, // Evlocallablowthrescb + AUTOEXP, // Evlocallabhigthrescb + AUTOEXP, // Evlocallabdecaycb + AUTOEXP, // Evlocallabrecothrer + AUTOEXP, // Evlocallablowthresr + AUTOEXP, // Evlocallabhigthresr + AUTOEXP, // Evlocallabdecayr + AUTOEXP, // Evlocallabnlstr + AUTOEXP, // Evlocallabnldet + AUTOEXP, // Evlocallabnlpat + AUTOEXP, // Evlocallabnlrad + AUTOEXP, // Evlocallabnlgam + AUTOEXP, // Evlocallabdivgr + AUTOEXP, // EvLocallabSpotavoidrad + AUTOEXP, // EvLocallabSpotavoidmun + AUTOEXP, // Evlocallabcontthres + AUTOEXP // Evlocallabnorm + }; diff --git a/rtengine/rescale.h b/rtengine/rescale.h index 3126a7c58..2a5892224 100644 --- a/rtengine/rescale.h +++ b/rtengine/rescale.h @@ -35,23 +35,22 @@ inline float getBilinearValue(const array2D &src, float x, float y) const int H = src.getHeight(); // Get integer and fractional parts of numbers - int xi = x; - int yi = y; - float xf = x - xi; - float yf = y - yi; - int xi1 = std::min(xi + 1, W - 1); - int yi1 = std::min(yi + 1, H - 1); + const int xi = x; + const int yi = y; + const float xf = x - xi; + const float yf = y - yi; + const int xi1 = std::min(xi + 1, W - 1); + const int yi1 = std::min(yi + 1, H - 1); - float bl = src[yi][xi]; - float br = src[yi][xi1]; - float tl = src[yi1][xi]; - float tr = src[yi1][xi1]; + const float bl = src[yi][xi]; + const float br = src[yi][xi1]; + const float tl = src[yi1][xi]; + const float tr = src[yi1][xi1]; // interpolate - float b = xf * br + (1.f - xf) * bl; - float t = xf * tr + (1.f - xf) * tl; - float pxf = yf * t + (1.f - yf) * b; - return pxf; + const float b = intp(xf, br, bl); + const float t = intp(xf, tr, tl); + return intp(yf, t, b); } diff --git a/rtengine/rt_algo.cc b/rtengine/rt_algo.cc index 81121f58c..e4ae84a46 100644 --- a/rtengine/rt_algo.cc +++ b/rtengine/rt_algo.cc @@ -479,4 +479,25 @@ void buildBlendMask(const float* const * luminance, float **blend, int W, int H, } } +double accumulateProduct(const float* data1, const float* data2, size_t n, bool multiThread) { + if (n == 0) { + return 0.0; + } + + // use two accumulators to reduce dependencies (improves speed) and increase accuracy + double acc1 = 0.0; + double acc2 = 0.0; +#ifdef _OPENMP + #pragma omp parallel for reduction(+:acc1,acc2) if(multiThread) +#endif + for (size_t i = 0; i < n - 1; i += 2) { + acc1 += static_cast(data1[i]) * static_cast(data2[i]); + acc2 += static_cast(data1[i + 1]) * static_cast(data2[i + 1]); + } + + if (n & 1) { + acc1 += static_cast(data1[n -1]) * static_cast(data2[n -1]); + } + return acc1 + acc2; +} } diff --git a/rtengine/rt_algo.h b/rtengine/rt_algo.h index a72a7c56b..bffe17b57 100644 --- a/rtengine/rt_algo.h +++ b/rtengine/rt_algo.h @@ -29,4 +29,5 @@ void buildBlendMask(const float* const * luminance, float **blend, int W, int H, void buildGradientsMask(int W, int H, float **luminance, float **out, float amount, int nlevels, int detail_level, float alfa, float beta, bool multithread); +double accumulateProduct(const float* data1, const float* data2, size_t n, bool multiThread = true); } diff --git a/rtengine/rtengine.h b/rtengine/rtengine.h index a63e52ab7..ceb27a504 100644 --- a/rtengine/rtengine.h +++ b/rtengine/rtengine.h @@ -41,6 +41,9 @@ * */ +template +class array2D; + template class LUT; @@ -275,6 +278,8 @@ public: virtual void sizeChanged(int w, int h, int ow, int oh) = 0; }; +class HistogramObservable; + /** This listener is used when the histogram of the final image has changed. */ class HistogramListener { @@ -300,8 +305,43 @@ public: const LUTu& histGreenRaw, const LUTu& histBlueRaw, const LUTu& histChroma, - const LUTu& histLRETI + const LUTu& histLRETI, + int vectorscopeScale, + const array2D& vectorscopeHC, + const array2D& vectorscopeHS, + int waveformScale, + const array2D& waveformRed, + const array2D& waveformGreen, + const array2D& waveformBlue, + const array2D& waveformLuma ) = 0; + /** Tells which observable is notifying the listener. */ + virtual void setObservable(HistogramObservable* observable) = 0; + /** Returns if the listener wants the histogram to be updated. */ + virtual bool updateHistogram(void) const = 0; + /** Returns if the listener wants the raw histogram to be updated. */ + virtual bool updateHistogramRaw(void) const = 0; + /** Returns if the listener wants the H-C vectorscope to be updated. */ + virtual bool updateVectorscopeHC(void) const = 0; + /** Returns if the listener wants the H-S vectorscope to be updated. */ + virtual bool updateVectorscopeHS(void) const = 0; + /** Returns if the listener wants the waveform to be updated. */ + virtual bool updateWaveform(void) const = 0; +}; + +class HistogramObservable +{ +public: + /** Tells the observable to update the histogram data. */ + virtual void requestUpdateHistogram() = 0; + /** Tells the observable to update the raw histogram data. */ + virtual void requestUpdateHistogramRaw() = 0; + /** Tells the observable to update the H-C vectorscope data. */ + virtual void requestUpdateVectorscopeHC() = 0; + /** Tells the observable to update the H-S vectorscope data. */ + virtual void requestUpdateVectorscopeHS() = 0; + /** Tells the observable to update the waveform data. */ + virtual void requestUpdateWaveform() = 0; }; /** This listener is used when the auto exposure has been recomputed (e.g. when the clipping ratio changed). */ @@ -372,7 +412,7 @@ public: virtual ~LocallabListener() = default; virtual void refChanged(const std::vector &ref, int selspot) = 0; virtual void minmaxChanged(const std::vector &minmax, int selspot) = 0; - virtual void logencodChanged(const float blackev, const float whiteev, const float sourceg, const float targetg) = 0; + virtual void logencodChanged(const float blackev, const float whiteev, const float sourceg, const float sourceab, const float targetg) = 0; }; class AutoColorTonListener @@ -443,7 +483,7 @@ class FilmNegListener { public: virtual ~FilmNegListener() = default; - virtual void filmBaseValuesChanged(std::array rgb) = 0; + virtual void filmRefValuesChanged(const procparams::FilmNegativeParams::RGB &refInput, const procparams::FilmNegativeParams::RGB &refOutput) = 0; }; /** This class represents a detailed part of the image (looking through a kind of window). @@ -522,7 +562,7 @@ public: virtual void updateUnLock() = 0; - virtual void setLocallabMaskVisibility(bool previewDeltaE, int locallColorMask, int locallColorMaskinv, int locallExpMask, int locallExpMaskinv, int locallSHMask, int locallSHMaskinv, int locallvibMask, int locallsoftMask, int locallblMask, int localltmMask, int locallretiMask, int locallsharMask, int localllcMask, int locallcbMask, int locall_Mask) = 0; + virtual void setLocallabMaskVisibility(bool previewDeltaE, int locallColorMask, int locallColorMaskinv, int locallExpMask, int locallExpMaskinv, int locallSHMask, int locallSHMaskinv, int locallvibMask, int locallsoftMask, int locallblMask, int localltmMask, int locallretiMask, int locallsharMask, int localllcMask, int locallcbMask, int localllogMask, int locall_Mask) = 0; /** Creates and returns a Crop instance that acts as a window on the image * @param editDataProvider pointer to the EditDataProvider that communicates with the EditSubscriber @@ -532,9 +572,8 @@ public: virtual bool getAutoWB (double& temp, double& green, double equal, double tempBias) = 0; virtual void getCamWB (double& temp, double& green) = 0; virtual void getSpotWB (int x, int y, int rectSize, double& temp, double& green) = 0; - virtual bool getFilmNegativeExponents(int xA, int yA, int xB, int yB, std::array& newExps) = 0; - virtual bool getRawSpotValues (int x, int y, int spotSize, std::array& rawValues) = 0; - + virtual bool getFilmNegativeSpot(int x, int y, int spotSize, procparams::FilmNegativeParams::RGB &refInput, procparams::FilmNegativeParams::RGB &refOutput) = 0; + virtual void getAutoCrop (double ratio, int &x, int &y, int &w, int &h) = 0; virtual void saveInputICCReference (const Glib::ustring& fname, bool apply_wb) = 0; diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index 2adcf956a..5d6fa3aeb 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -205,11 +205,6 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h, ImageIO* img = imgSrc.getImageIO(); - // agriggio -- hotfix for #3794, to be revised once a proper solution is implemented - if (std::max(img->getWidth(), img->getHeight()) / std::min(img->getWidth(), img->getHeight()) >= 10) { - return nullptr; - } - Thumbnail* tpp = new Thumbnail (); unsigned char* data; @@ -235,15 +230,29 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h, h = img->getHeight(); tpp->scale = 1.; } else { - if (fixwh == 1) { + if (fixwh < 0 && w > 0 && h > 0) { + const int ww = h * img->getWidth() / img->getHeight(); + const int hh = w * img->getHeight() / img->getWidth(); + if (ww <= w) { + w = ww; + tpp->scale = static_cast(img->getHeight()) / h; + } else { + h = hh; + tpp->scale = static_cast(img->getWidth()) / w; + } + } else if (fixwh == 1) { w = h * img->getWidth() / img->getHeight(); - tpp->scale = (double)img->getHeight() / h; + tpp->scale = static_cast(img->getHeight()) / h; } else { h = w * img->getHeight() / img->getWidth(); - tpp->scale = (double)img->getWidth() / w; + tpp->scale = static_cast(img->getWidth()) / w; } } + // Precaution to prevent division by zero later on + if (h < 1) h = 1; + if (w < 1) w = 1; + // bilinear interpolation if (tpp->thumbImg) { delete tpp->thumbImg; @@ -565,7 +574,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, eSensorType &sens tpp->defGain = max (scale_mul[0], scale_mul[1], scale_mul[2], scale_mul[3]) / min (scale_mul[0], scale_mul[1], scale_mul[2], scale_mul[3]); tpp->defGain *= std::pow(2, ri->getBaselineExposure()); - tpp->scaleGain = scale_mul[0] / pre_mul[0]; // used to reconstruct scale_mul from filmnegativethumb.cc + tpp->scaleGain = scale_mul[0] / pre_mul[0]; // can be used to reconstruct scale_mul later in processing tpp->gammaCorrected = true; @@ -1141,11 +1150,18 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT rwidth = int (size_t (thumbImg->getWidth()) * size_t (rheight) / size_t (thumbImg->getHeight())); } + if (rwidth < 1) rwidth = 1; + if (rheight < 1) rheight = 1; Imagefloat* baseImg = resizeTo (rwidth, rheight, interp, thumbImg); - if (isRaw && params.filmNegative.enabled) { - processFilmNegative(params, baseImg, rwidth, rheight); + // Film negative legacy mode, for backwards compatibility RT v5.8 + if (params.filmNegative.enabled) { + if (params.filmNegative.backCompat == FilmNegativeParams::BackCompat::V1) { + processFilmNegative(params, baseImg, rwidth, rheight); + } else if (params.filmNegative.backCompat == FilmNegativeParams::BackCompat::V2) { + processFilmNegativeV2(params, baseImg, rwidth, rheight); + } } if (params.coarse.rotate) { @@ -1187,6 +1203,19 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT // if luma denoise has to be done for thumbnails, it should be right here + int fw = baseImg->getWidth(); + int fh = baseImg->getHeight(); + //ColorTemp::CAT02 (baseImg, ¶ms) ;//perhaps not good! + + ImProcFunctions ipf (¶ms, forHistogramMatching); // enable multithreading when forHistogramMatching is true + ipf.setScale (sqrt (double (fw * fw + fh * fh)) / sqrt (double (thumbImg->getWidth() * thumbImg->getWidth() + thumbImg->getHeight() * thumbImg->getHeight()))*scale); + ipf.updateColorProfiles (ICCStore::getInstance()->getDefaultMonitorProfileName(), RenderingIntent(settings->monitorIntent), false, false); + + // Process film negative BEFORE colorspace conversion, if needed + if (params.filmNegative.enabled && params.filmNegative.backCompat == FilmNegativeParams::BackCompat::CURRENT && params.filmNegative.colorSpace == FilmNegativeParams::ColorSpace::INPUT) { + ipf.filmNegativeProcess(baseImg, baseImg, params.filmNegative); + } + // perform color space transformation if (isRaw) { @@ -1196,13 +1225,10 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT StdImageSource::colorSpaceConversion (baseImg, params.icm, embProfile, thumbImg->getSampleFormat()); } - int fw = baseImg->getWidth(); - int fh = baseImg->getHeight(); - //ColorTemp::CAT02 (baseImg, ¶ms) ;//perhaps not good! - - ImProcFunctions ipf (¶ms, forHistogramMatching); // enable multithreading when forHistogramMatching is true - ipf.setScale (sqrt (double (fw * fw + fh * fh)) / sqrt (double (thumbImg->getWidth() * thumbImg->getWidth() + thumbImg->getHeight() * thumbImg->getHeight()))*scale); - ipf.updateColorProfiles (ICCStore::getInstance()->getDefaultMonitorProfileName(), RenderingIntent(settings->monitorIntent), false, false); + // Process film negative AFTER colorspace conversion, if needed + if (params.filmNegative.enabled && params.filmNegative.backCompat == FilmNegativeParams::BackCompat::CURRENT && params.filmNegative.colorSpace != FilmNegativeParams::ColorSpace::INPUT) { + ipf.filmNegativeProcess(baseImg, baseImg, params.filmNegative); + } LUTu hist16 (65536); @@ -1376,11 +1402,22 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT params.labCurve.lccurve, curve1, curve2, satcurve, lhskcurve, 16); - ipf.chromiLuminanceCurve (nullptr, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); + if (params.colorToning.enabled && params.colorToning.method == "LabGrid") { + ipf.colorToningLabGrid(labView, 0,labView->W , 0, labView->H, false); + } + + ipf.shadowsHighlights(labView, params.sh.enabled, params.sh.lab,params.sh.highlights ,params.sh.shadows, params.sh.radius, 16, params.sh.htonalwidth, params.sh.stonalwidth); + + if (params.localContrast.enabled) { + // Alberto's local contrast + ipf.localContrast(labView, labView->L, params.localContrast, false, 16); + } + ipf.chromiLuminanceCurve (nullptr, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); ipf.vibrance (labView, params.vibrance, params.toneCurve.hrenabled, params.icm.workingProfile); ipf.labColorCorrectionRegions(labView); + if ((params.colorappearance.enabled && !params.colorappearance.tonecie) || !params.colorappearance.enabled) { ipf.EPDToneMap (labView, 5, 6); } diff --git a/rtengine/rtthumbnail.h b/rtengine/rtthumbnail.h index 698b8f411..33bfec21c 100644 --- a/rtengine/rtthumbnail.h +++ b/rtengine/rtthumbnail.h @@ -77,6 +77,7 @@ class Thumbnail double scaleGain; void processFilmNegative(const procparams::ProcParams& params, const Imagefloat* baseImg, int rwidth, int rheight); + void processFilmNegativeV2(const procparams::ProcParams& params, const Imagefloat* baseImg, int rwidth, int rheight); public: diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index f32ce35b3..53e581468 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -219,16 +219,6 @@ private: imgsrc->setCurrentFrame(params.raw.bayersensor.imageNum); imgsrc->preprocess(params.raw, params.lensProf, params.coarse, params.dirpyrDenoise.enabled); - // After preprocess, run film negative processing if enabled - if ((imgsrc->getSensorType() == ST_BAYER || (imgsrc->getSensorType() == ST_FUJI_XTRANS)) && params.filmNegative.enabled) { - std::array filmBaseValues = { - static_cast(params.filmNegative.redBase), - static_cast(params.filmNegative.greenBase), - static_cast(params.filmNegative.blueBase) - }; - imgsrc->filmNegativeProcess (params.filmNegative, filmBaseValues); - } - if (pl) { pl->setProgress(0.20); } @@ -873,7 +863,23 @@ private: //ImProcFunctions ipf (¶ms, true); ImProcFunctions &ipf = * (ipf_p.get()); - imgsrc->convertColorSpace(baseImg, params.icm, currWB); + if (params.filmNegative.enabled) { + // Process film negative AFTER colorspace conversion if camera space is NOT selected + if (params.filmNegative.colorSpace != FilmNegativeParams::ColorSpace::INPUT) { + imgsrc->convertColorSpace(baseImg, params.icm, currWB); + } + + FilmNegativeParams copy = params.filmNegative; + ipf.filmNegativeProcess(baseImg, baseImg, copy, params.raw, imgsrc, currWB); + + // ... otherwise, process film negative BEFORE colorspace conversion + if (params.filmNegative.colorSpace == FilmNegativeParams::ColorSpace::INPUT) { + imgsrc->convertColorSpace(baseImg, params.icm, currWB); + } + + } else { + imgsrc->convertColorSpace(baseImg, params.icm, currWB); + } // perform first analysis hist16(65536); @@ -935,6 +941,281 @@ private: */ // RGB processing + labView = new LabImage(fw, fh); + + if (params.locallab.enabled && params.locallab.spots.size() > 0) { + ipf.rgb2lab(*baseImg, *labView, params.icm.workingProfile); + + MyTime t1, t2; + t1.set(); + + const std::unique_ptr reservView(new LabImage(*labView, true)); + const std::unique_ptr lastorigView(new LabImage(*labView, true)); + std::unique_ptr savenormtmView; + std::unique_ptr savenormretiView; + LocretigainCurve locRETgainCurve; + LocretitransCurve locRETtransCurve; + LocLHCurve loclhCurve; + LocHHCurve lochhCurve; + LocCHCurve locchCurve; + LocCCmaskCurve locccmasCurve; + LocLLmaskCurve locllmasCurve; + LocHHmaskCurve lochhmasCurve; + LocHHmaskCurve lochhhmasCurve; + LocCCmaskCurve locccmasexpCurve; + LocLLmaskCurve locllmasexpCurve; + LocHHmaskCurve lochhmasexpCurve; + LocCCmaskCurve locccmasSHCurve; + LocLLmaskCurve locllmasSHCurve; + LocHHmaskCurve lochhmasSHCurve; + LocCCmaskCurve locccmasvibCurve; + LocLLmaskCurve locllmasvibCurve; + LocHHmaskCurve lochhmasvibCurve; + LocCCmaskCurve locccmaslcCurve; + LocLLmaskCurve locllmaslcCurve; + LocHHmaskCurve lochhmaslcCurve; + LocCCmaskCurve locccmascbCurve; + LocLLmaskCurve locllmascbCurve; + LocHHmaskCurve lochhmascbCurve; + LocCCmaskCurve locccmasretiCurve; + LocLLmaskCurve locllmasretiCurve; + LocHHmaskCurve lochhmasretiCurve; + LocCCmaskCurve locccmastmCurve; + LocLLmaskCurve locllmastmCurve; + LocHHmaskCurve lochhmastmCurve; + LocCCmaskCurve locccmasblCurve; + LocLLmaskCurve locllmasblCurve; + LocHHmaskCurve lochhmasblCurve; + LocCCmaskCurve locccmaslogCurve; + LocLLmaskCurve locllmaslogCurve; + LocHHmaskCurve lochhmaslogCurve; + + LocCCmaskCurve locccmas_Curve; + LocLLmaskCurve locllmas_Curve; + LocHHmaskCurve lochhmas_Curve; + LocHHmaskCurve lochhhmas_Curve; + + LocwavCurve loclmasCurveblwav; + LocwavCurve loclmasCurvecolwav; + LocwavCurve loclmasCurve_wav; + LocwavCurve locwavCurve; + LocwavCurve loclevwavCurve; + LocwavCurve locconwavCurve; + LocwavCurve loccompwavCurve; + LocwavCurve loccomprewavCurve; + LocwavCurve locedgwavCurve; + LocwavCurve locwavCurvehue; + LocwavCurve locwavCurveden; + LUTf lllocalcurve(65536, LUT_CLIP_OFF); + LUTf lclocalcurve(65536, LUT_CLIP_OFF); + LUTf cllocalcurve(65536, LUT_CLIP_OFF); + LUTf cclocalcurve(65536, LUT_CLIP_OFF); + LUTf rgblocalcurve(65536, LUT_CLIP_OFF); + LUTf hltonecurveloc(65536, LUT_CLIP_OFF); + LUTf shtonecurveloc(65536, LUT_CLIP_OFF); + LUTf tonecurveloc(65536, LUT_CLIP_OFF); + LUTf lightCurveloc(32770, LUT_CLIP_OFF); + LUTf exlocalcurve(65536, LUT_CLIP_OFF); + LUTf lmasklocalcurve(65536, LUT_CLIP_OFF); + LUTf lmaskexplocalcurve(65536, LUT_CLIP_OFF); + LUTf lmaskSHlocalcurve(65536, LUT_CLIP_OFF); + LUTf lmaskviblocalcurve(65536, LUT_CLIP_OFF); + LUTf lmasktmlocalcurve(65536, LUT_CLIP_OFF); + LUTf lmaskretilocalcurve(65536, LUT_CLIP_OFF); + LUTf lmaskcblocalcurve(65536, LUT_CLIP_OFF); + LUTf lmaskbllocalcurve(65536, LUT_CLIP_OFF); + LUTf lmasklclocalcurve(65536, LUT_CLIP_OFF); + LUTf lmaskloglocalcurve(65536, LUT_CLIP_OFF); + LUTf lmasklocal_curve(65536, LUT_CLIP_OFF); + + array2D shbuffer; + for (size_t sp = 0; sp < params.locallab.spots.size(); sp++) { + if (params.locallab.spots.at(sp).inverssha) { + shbuffer(fw, fh); + break; + } + } + + for (size_t sp = 0; sp < params.locallab.spots.size(); sp++) { + + // Set local curves of current spot to LUT + locRETgainCurve.Set(params.locallab.spots.at(sp).localTgaincurve); + locRETtransCurve.Set(params.locallab.spots.at(sp).localTtranscurve); + const bool LHutili = loclhCurve.Set(params.locallab.spots.at(sp).LHcurve); + const bool HHutili = lochhCurve.Set(params.locallab.spots.at(sp).HHcurve); + const bool CHutili = locchCurve.Set(params.locallab.spots.at(sp).CHcurve); + const bool lcmasutili = locccmasCurve.Set(params.locallab.spots.at(sp).CCmaskcurve); + const bool llmasutili = locllmasCurve.Set(params.locallab.spots.at(sp).LLmaskcurve); + const bool lhmasutili = lochhmasCurve.Set(params.locallab.spots.at(sp).HHmaskcurve); + const bool lhhmasutili = lochhhmasCurve.Set(params.locallab.spots.at(sp).HHhmaskcurve); + const bool lcmasexputili = locccmasexpCurve.Set(params.locallab.spots.at(sp).CCmaskexpcurve); + const bool llmasexputili = locllmasexpCurve.Set(params.locallab.spots.at(sp).LLmaskexpcurve); + const bool lhmasexputili = lochhmasexpCurve.Set(params.locallab.spots.at(sp).HHmaskexpcurve); + const bool lcmasSHutili = locccmasSHCurve.Set(params.locallab.spots.at(sp).CCmaskSHcurve); + const bool llmasSHutili = locllmasSHCurve.Set(params.locallab.spots.at(sp).LLmaskSHcurve); + const bool lhmasSHutili = lochhmasSHCurve.Set(params.locallab.spots.at(sp).HHmaskSHcurve); + const bool lcmasvibutili = locccmasvibCurve.Set(params.locallab.spots.at(sp).CCmaskvibcurve); + const bool llmasvibutili = locllmasvibCurve.Set(params.locallab.spots.at(sp).LLmaskvibcurve); + const bool lhmasvibutili = lochhmasvibCurve.Set(params.locallab.spots.at(sp).HHmaskvibcurve); + const bool lcmascbutili = locccmascbCurve.Set(params.locallab.spots.at(sp).CCmaskcbcurve); + const bool llmascbutili = locllmascbCurve.Set(params.locallab.spots.at(sp).LLmaskcbcurve); + const bool lhmascbutili = lochhmascbCurve.Set(params.locallab.spots.at(sp).HHmaskcbcurve); + const bool lcmasretiutili = locccmasretiCurve.Set(params.locallab.spots.at(sp).CCmaskreticurve); + const bool llmasretiutili = locllmasretiCurve.Set(params.locallab.spots.at(sp).LLmaskreticurve); + const bool lhmasretiutili = lochhmasretiCurve.Set(params.locallab.spots.at(sp).HHmaskreticurve); + const bool lcmastmutili = locccmastmCurve.Set(params.locallab.spots.at(sp).CCmasktmcurve); + const bool lhmaslcutili = lochhmaslcCurve.Set(params.locallab.spots.at(sp).HHmasklccurve); + const bool llmastmutili = locllmastmCurve.Set(params.locallab.spots.at(sp).LLmasktmcurve); + const bool lhmastmutili = lochhmastmCurve.Set(params.locallab.spots.at(sp).HHmasktmcurve); + const bool lcmasblutili = locccmasblCurve.Set(params.locallab.spots.at(sp).CCmaskblcurve); + const bool llmasblutili = locllmasblCurve.Set(params.locallab.spots.at(sp).LLmaskblcurve); + const bool lhmasblutili = lochhmasblCurve.Set(params.locallab.spots.at(sp).HHmaskblcurve); + const bool lcmaslogutili = locccmaslogCurve.Set(params.locallab.spots.at(sp).CCmaskcurveL); + const bool llmaslogutili = locllmaslogCurve.Set(params.locallab.spots.at(sp).LLmaskcurveL); + const bool lhmaslogutili = lochhmaslogCurve.Set(params.locallab.spots.at(sp).HHmaskcurveL); + + const bool lcmas_utili = locccmas_Curve.Set(params.locallab.spots.at(sp).CCmask_curve); + const bool llmas_utili = locllmas_Curve.Set(params.locallab.spots.at(sp).LLmask_curve); + const bool lhmas_utili = lochhmas_Curve.Set(params.locallab.spots.at(sp).HHmask_curve); + const bool lhhmas_utili = lochhhmas_Curve.Set(params.locallab.spots.at(sp).HHhmask_curve); + const bool lmasutiliblwav = loclmasCurveblwav.Set(params.locallab.spots.at(sp).LLmaskblcurvewav); + const bool lmasutilicolwav = loclmasCurvecolwav.Set(params.locallab.spots.at(sp).LLmaskcolcurvewav); + const bool lcmaslcutili = locccmaslcCurve.Set(params.locallab.spots.at(sp).CCmasklccurve); + const bool llmaslcutili = locllmaslcCurve.Set(params.locallab.spots.at(sp).LLmasklccurve); + const bool lmasutili_wav = loclmasCurve_wav.Set(params.locallab.spots.at(sp).LLmask_curvewav); + const bool locwavutili = locwavCurve.Set(params.locallab.spots.at(sp).locwavcurve); + const bool locwavhueutili = locwavCurvehue.Set(params.locallab.spots.at(sp).locwavcurvehue); + const bool locwavdenutili = locwavCurveden.Set(params.locallab.spots.at(sp).locwavcurveden); + const bool loclevwavutili = loclevwavCurve.Set(params.locallab.spots.at(sp).loclevwavcurve); + const bool locconwavutili = locconwavCurve.Set(params.locallab.spots.at(sp).locconwavcurve); + const bool loccompwavutili = loccompwavCurve.Set(params.locallab.spots.at(sp).loccompwavcurve); + const bool loccomprewavutili = loccomprewavCurve.Set(params.locallab.spots.at(sp).loccomprewavcurve); + const bool locedgwavutili = locedgwavCurve.Set(params.locallab.spots.at(sp).locedgwavcurve); + const bool locallutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).llcurve, lllocalcurve, 1); + const bool localclutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).clcurve, cllocalcurve, 1); + const bool locallcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).lccurve, lclocalcurve, 1); + const bool localcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).cccurve, cclocalcurve, 1); + const bool localrgbutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).rgbcurve, rgblocalcurve, 1); + const bool localexutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).excurve, exlocalcurve, 1); + const bool localmaskutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskcurve, lmasklocalcurve, 1); + const bool localmaskexputili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskexpcurve, lmaskexplocalcurve, 1); + const bool localmaskSHutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).LmaskSHcurve, lmaskSHlocalcurve, 1); + const bool localmaskvibutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskvibcurve, lmaskviblocalcurve, 1); + const bool localmasktmutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmasktmcurve, lmasktmlocalcurve, 1); + const bool localmaskretiutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskreticurve, lmaskretilocalcurve, 1); + const bool localmaskcbutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskcbcurve, lmaskcblocalcurve, 1); + const bool localmaskblutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskblcurve, lmaskbllocalcurve, 1); + const bool localmasklcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmasklccurve, lmasklclocalcurve, 1); + const bool localmasklogutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).LmaskcurveL, lmaskloglocalcurve, 1); + const bool localmask_utili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmask_curve, lmasklocal_curve, 1); + + //provisory + double ecomp = params.locallab.spots.at(sp).expcomp; + double lblack = params.locallab.spots.at(sp).black; + double lhlcompr = params.locallab.spots.at(sp).hlcompr; + double lhlcomprthresh = params.locallab.spots.at(sp).hlcomprthresh; + double shcompr = params.locallab.spots.at(sp).shcompr; + double br = params.locallab.spots.at(sp).lightness; + double cont = params.locallab.spots.at(sp).contrast; + if (lblack < 0. && params.locallab.spots.at(sp).expMethod == "pde" ) { + lblack *= 1.5; + } + + // Reference parameters computation + double huere, chromare, lumare, huerefblu, chromarefblu, lumarefblu, sobelre; + int lastsav; + float avge; + float meantme; + float stdtme; + float meanretie; + float stdretie; + + if (params.locallab.spots.at(sp).spotMethod == "exc") { + ipf.calc_ref(sp, reservView.get(), reservView.get(), 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili); + } else { + ipf.calc_ref(sp, labView, labView, 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili); + } + CurveFactory::complexCurvelocal(ecomp, lblack / 65535., lhlcompr, lhlcomprthresh, shcompr, br, cont, lumare, + hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, avge, + 1); + float minCD; + float maxCD; + float mini; + float maxi; + float Tmean; + float Tsigma; + float Tmin; + float Tmax; + + // No Locallab mask is shown in exported picture + ipf.Lab_Local(2, sp, shbuffer, labView, labView, reservView.get(), savenormtmView.get(), savenormretiView.get(), lastorigView.get(), 0, 0, fw, fh, 1, locRETgainCurve, locRETtransCurve, + lllocalcurve, locallutili, + cllocalcurve, localclutili, + lclocalcurve, locallcutili, + loclhCurve, lochhCurve, locchCurve, + lmasklocalcurve, localmaskutili, + lmaskexplocalcurve, localmaskexputili, + lmaskSHlocalcurve, localmaskSHutili, + lmaskviblocalcurve, localmaskvibutili, + lmasktmlocalcurve, localmasktmutili, + lmaskretilocalcurve, localmaskretiutili, + lmaskcblocalcurve, localmaskcbutili, + lmaskbllocalcurve, localmaskblutili, + lmasklclocalcurve, localmasklcutili, + lmaskloglocalcurve, localmasklogutili, + lmasklocal_curve, localmask_utili, + + locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, + locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, + locccmasvibCurve, lcmasvibutili, locllmasvibCurve, llmasvibutili, lochhmasvibCurve, lhmasvibutili, + locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, + locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili, + locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili, + locccmasblCurve, lcmasblutili, locllmasblCurve, llmasblutili, lochhmasblCurve, lhmasblutili, + locccmaslcCurve, lcmaslcutili, locllmaslcCurve, llmaslcutili, lochhmaslcCurve, lhmaslcutili, + locccmaslogCurve, lcmaslogutili, locllmaslogCurve, llmaslogutili, lochhmaslogCurve, lhmaslogutili, + + locccmas_Curve, lcmas_utili, locllmas_Curve, llmas_utili, lochhmas_Curve, lhmas_utili, + lochhhmas_Curve, lhhmas_utili, + loclmasCurveblwav,lmasutiliblwav, + loclmasCurvecolwav,lmasutilicolwav, + locwavCurve, locwavutili, + loclevwavCurve, loclevwavutili, + locconwavCurve, locconwavutili, + loccompwavCurve, loccompwavutili, + loccomprewavCurve, loccomprewavutili, + locwavCurvehue, locwavhueutili, + locwavCurveden, locwavdenutili, + locedgwavCurve, locedgwavutili, + loclmasCurve_wav,lmasutili_wav, + LHutili, HHutili, CHutili, cclocalcurve, localcutili, rgblocalcurve, localrgbutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, + huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, + meantme, stdtme, meanretie, stdretie +); + + if (sp + 1u < params.locallab.spots.size()) { + // do not copy for last spot as it is not needed anymore + lastorigView->CopyFrom(labView); + } + + if (params.locallab.spots.at(sp).spotMethod == "exc") { + ipf.calc_ref(sp, reservView.get(), reservView.get(), 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili); + } else { + ipf.calc_ref(sp, labView, labView, 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili); + } + } + + t2.set(); + ipf.lab2rgb(*labView, *baseImg, params.icm.workingProfile); + + if (settings->verbose) { + printf("Total local:- %d usec\n", t2.etime(t1)); + } + + } + + curve1(65536); curve2(65536); curve(65536, 0); @@ -970,7 +1251,7 @@ private: CurveFactory::diagonalCurve2Lut(params.colorToning.cl2curve, cl2Toningcurve, 1); } - labView = new LabImage(fw, fh); +// labView = new LabImage(fw, fh); if (params.blackwhite.enabled) { CurveFactory::curveBW(params.blackwhite.beforeCurve, params.blackwhite.afterCurve, hist16, dummy, customToneCurvebw1, customToneCurvebw2, 1); @@ -1001,7 +1282,7 @@ private: } autor = -9000.f; // This will ask to compute the "auto" values for the B&W tool (have to be inferior to -5000) - DCPProfile::ApplyState as; + DCPProfileApplyState as; DCPProfile *dcpProf = imgsrc->getDCP(params.icm, as); LUTu histToneCurve; @@ -1077,246 +1358,15 @@ private: params.labCurve.lccurve, curve1, curve2, satcurve, lhskcurve, 1); - if (params.locallab.enabled && params.locallab.spots.size() > 0) { - MyTime t1, t2; - t1.set(); - const std::unique_ptr reservView(new LabImage(*labView, true)); - const std::unique_ptr lastorigView(new LabImage(*labView, true)); - LocretigainCurve locRETgainCurve; - LocretitransCurve locRETtransCurve; - LocLHCurve loclhCurve; - LocHHCurve lochhCurve; - LocCHCurve locchCurve; - LocCCmaskCurve locccmasCurve; - LocLLmaskCurve locllmasCurve; - LocHHmaskCurve lochhmasCurve; - LocHHmaskCurve lochhhmasCurve; - LocCCmaskCurve locccmasexpCurve; - LocLLmaskCurve locllmasexpCurve; - LocHHmaskCurve lochhmasexpCurve; - LocCCmaskCurve locccmasSHCurve; - LocLLmaskCurve locllmasSHCurve; - LocHHmaskCurve lochhmasSHCurve; - LocCCmaskCurve locccmasvibCurve; - LocLLmaskCurve locllmasvibCurve; - LocHHmaskCurve lochhmasvibCurve; - LocCCmaskCurve locccmaslcCurve; - LocLLmaskCurve locllmaslcCurve; - LocHHmaskCurve lochhmaslcCurve; - LocCCmaskCurve locccmascbCurve; - LocLLmaskCurve locllmascbCurve; - LocHHmaskCurve lochhmascbCurve; - LocCCmaskCurve locccmasretiCurve; - LocLLmaskCurve locllmasretiCurve; - LocHHmaskCurve lochhmasretiCurve; - LocCCmaskCurve locccmastmCurve; - LocLLmaskCurve locllmastmCurve; - LocHHmaskCurve lochhmastmCurve; - LocCCmaskCurve locccmasblCurve; - LocLLmaskCurve locllmasblCurve; - LocHHmaskCurve lochhmasblCurve; - LocCCmaskCurve locccmas_Curve; - LocLLmaskCurve locllmas_Curve; - LocHHmaskCurve lochhmas_Curve; - LocHHmaskCurve lochhhmas_Curve; - - LocwavCurve loclmasCurveblwav; - LocwavCurve loclmasCurvecolwav; - LocwavCurve loclmasCurve_wav; - LocwavCurve locwavCurve; - LocwavCurve loclevwavCurve; - LocwavCurve locconwavCurve; - LocwavCurve loccompwavCurve; - LocwavCurve loccomprewavCurve; - LocwavCurve locedgwavCurve; - LocwavCurve locwavCurveden; - LUTf lllocalcurve(65536, LUT_CLIP_OFF); - LUTf lclocalcurve(65536, LUT_CLIP_OFF); - LUTf cllocalcurve(65536, LUT_CLIP_OFF); - LUTf cclocalcurve(65536, LUT_CLIP_OFF); - LUTf rgblocalcurve(65536, LUT_CLIP_OFF); - LUTf hltonecurveloc(65536, LUT_CLIP_OFF); - LUTf shtonecurveloc(65536, LUT_CLIP_OFF); - LUTf tonecurveloc(65536, LUT_CLIP_OFF); - LUTf lightCurveloc(32770, LUT_CLIP_OFF); - LUTf exlocalcurve(65536, LUT_CLIP_OFF); - LUTf lmasklocalcurve(65536, LUT_CLIP_OFF); - LUTf lmaskexplocalcurve(65536, LUT_CLIP_OFF); - LUTf lmaskSHlocalcurve(65536, LUT_CLIP_OFF); - LUTf lmaskviblocalcurve(65536, LUT_CLIP_OFF); - LUTf lmasktmlocalcurve(65536, LUT_CLIP_OFF); - LUTf lmaskretilocalcurve(65536, LUT_CLIP_OFF); - LUTf lmaskcblocalcurve(65536, LUT_CLIP_OFF); - LUTf lmaskbllocalcurve(65536, LUT_CLIP_OFF); - LUTf lmasklclocalcurve(65536, LUT_CLIP_OFF); - LUTf lmasklocal_curve(65536, LUT_CLIP_OFF); + if (params.colorToning.enabled && params.colorToning.method == "LabGrid") { + ipf.colorToningLabGrid(labView, 0,labView->W , 0, labView->H, false); + } - array2D shbuffer; - for (size_t sp = 0; sp < params.locallab.spots.size(); sp++) { - if (params.locallab.spots.at(sp).inverssha) { - shbuffer(fw, fh); - break; - } - } - - for (size_t sp = 0; sp < params.locallab.spots.size(); sp++) { - // Set local curves of current spot to LUT - locRETgainCurve.Set(params.locallab.spots.at(sp).localTgaincurve); - locRETtransCurve.Set(params.locallab.spots.at(sp).localTtranscurve); - const bool LHutili = loclhCurve.Set(params.locallab.spots.at(sp).LHcurve); - const bool HHutili = lochhCurve.Set(params.locallab.spots.at(sp).HHcurve); - const bool CHutili = locchCurve.Set(params.locallab.spots.at(sp).CHcurve); - const bool lcmasutili = locccmasCurve.Set(params.locallab.spots.at(sp).CCmaskcurve); - const bool llmasutili = locllmasCurve.Set(params.locallab.spots.at(sp).LLmaskcurve); - const bool lhmasutili = lochhmasCurve.Set(params.locallab.spots.at(sp).HHmaskcurve); - const bool lhhmasutili = lochhhmasCurve.Set(params.locallab.spots.at(sp).HHhmaskcurve); - const bool lcmasexputili = locccmasexpCurve.Set(params.locallab.spots.at(sp).CCmaskexpcurve); - const bool llmasexputili = locllmasexpCurve.Set(params.locallab.spots.at(sp).LLmaskexpcurve); - const bool lhmasexputili = lochhmasexpCurve.Set(params.locallab.spots.at(sp).HHmaskexpcurve); - const bool lcmasSHutili = locccmasSHCurve.Set(params.locallab.spots.at(sp).CCmaskSHcurve); - const bool llmasSHutili = locllmasSHCurve.Set(params.locallab.spots.at(sp).LLmaskSHcurve); - const bool lhmasSHutili = lochhmasSHCurve.Set(params.locallab.spots.at(sp).HHmaskSHcurve); - const bool lcmasvibutili = locccmasvibCurve.Set(params.locallab.spots.at(sp).CCmaskvibcurve); - const bool llmasvibutili = locllmasvibCurve.Set(params.locallab.spots.at(sp).LLmaskvibcurve); - const bool lhmasvibutili = lochhmasvibCurve.Set(params.locallab.spots.at(sp).HHmaskvibcurve); - const bool lcmascbutili = locccmascbCurve.Set(params.locallab.spots.at(sp).CCmaskcbcurve); - const bool llmascbutili = locllmascbCurve.Set(params.locallab.spots.at(sp).LLmaskcbcurve); - const bool lhmascbutili = lochhmascbCurve.Set(params.locallab.spots.at(sp).HHmaskcbcurve); - const bool lcmasretiutili = locccmasretiCurve.Set(params.locallab.spots.at(sp).CCmaskreticurve); - const bool llmasretiutili = locllmasretiCurve.Set(params.locallab.spots.at(sp).LLmaskreticurve); - const bool lhmasretiutili = lochhmasretiCurve.Set(params.locallab.spots.at(sp).HHmaskreticurve); - const bool lcmastmutili = locccmastmCurve.Set(params.locallab.spots.at(sp).CCmasktmcurve); - const bool lhmaslcutili = lochhmaslcCurve.Set(params.locallab.spots.at(sp).HHmasklccurve); - const bool llmastmutili = locllmastmCurve.Set(params.locallab.spots.at(sp).LLmasktmcurve); - const bool lhmastmutili = lochhmastmCurve.Set(params.locallab.spots.at(sp).HHmasktmcurve); - const bool lcmasblutili = locccmasblCurve.Set(params.locallab.spots.at(sp).CCmaskblcurve); - const bool llmasblutili = locllmasblCurve.Set(params.locallab.spots.at(sp).LLmaskblcurve); - const bool lhmasblutili = lochhmasblCurve.Set(params.locallab.spots.at(sp).HHmaskblcurve); - const bool lcmas_utili = locccmas_Curve.Set(params.locallab.spots.at(sp).CCmask_curve); - const bool llmas_utili = locllmas_Curve.Set(params.locallab.spots.at(sp).LLmask_curve); - const bool lhmas_utili = lochhmas_Curve.Set(params.locallab.spots.at(sp).HHmask_curve); - const bool lhhmas_utili = lochhhmas_Curve.Set(params.locallab.spots.at(sp).HHhmask_curve); - const bool lmasutiliblwav = loclmasCurveblwav.Set(params.locallab.spots.at(sp).LLmaskblcurvewav); - const bool lmasutilicolwav = loclmasCurvecolwav.Set(params.locallab.spots.at(sp).LLmaskcolcurvewav); - const bool lcmaslcutili = locccmaslcCurve.Set(params.locallab.spots.at(sp).CCmasklccurve); - const bool llmaslcutili = locllmaslcCurve.Set(params.locallab.spots.at(sp).LLmasklccurve); - const bool lmasutili_wav = loclmasCurve_wav.Set(params.locallab.spots.at(sp).LLmask_curvewav); - const bool locwavutili = locwavCurve.Set(params.locallab.spots.at(sp).locwavcurve); - const bool locwavdenutili = locwavCurveden.Set(params.locallab.spots.at(sp).locwavcurveden); - const bool loclevwavutili = loclevwavCurve.Set(params.locallab.spots.at(sp).loclevwavcurve); - const bool locconwavutili = locconwavCurve.Set(params.locallab.spots.at(sp).locconwavcurve); - const bool loccompwavutili = loccompwavCurve.Set(params.locallab.spots.at(sp).loccompwavcurve); - const bool loccomprewavutili = loccomprewavCurve.Set(params.locallab.spots.at(sp).loccomprewavcurve); - const bool locedgwavutili = locedgwavCurve.Set(params.locallab.spots.at(sp).locedgwavcurve); - const bool locallutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).llcurve, lllocalcurve, 1); - const bool localclutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).clcurve, cllocalcurve, 1); - const bool locallcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).lccurve, lclocalcurve, 1); - const bool localcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).cccurve, cclocalcurve, 1); - const bool localrgbutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).rgbcurve, rgblocalcurve, 1); - const bool localexutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).excurve, exlocalcurve, 1); - const bool localmaskutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskcurve, lmasklocalcurve, 1); - const bool localmaskexputili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskexpcurve, lmaskexplocalcurve, 1); - const bool localmaskSHutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).LmaskSHcurve, lmaskSHlocalcurve, 1); - const bool localmaskvibutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskvibcurve, lmaskviblocalcurve, 1); - const bool localmasktmutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmasktmcurve, lmasktmlocalcurve, 1); - const bool localmaskretiutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskreticurve, lmaskretilocalcurve, 1); - const bool localmaskcbutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskcbcurve, lmaskcblocalcurve, 1); - const bool localmaskblutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskblcurve, lmaskbllocalcurve, 1); - const bool localmasklcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmasklccurve, lmasklclocalcurve, 1); - const bool localmask_utili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmask_curve, lmasklocal_curve, 1); - - //provisory - double ecomp = params.locallab.spots.at(sp).expcomp; - double lblack = params.locallab.spots.at(sp).black; - double lhlcompr = params.locallab.spots.at(sp).hlcompr; - double lhlcomprthresh = params.locallab.spots.at(sp).hlcomprthresh; - double shcompr = params.locallab.spots.at(sp).shcompr; - double br = params.locallab.spots.at(sp).lightness; - double cont = params.locallab.spots.at(sp).contrast; - if (lblack < 0. && params.locallab.spots.at(sp).expMethod == "pde" ) { - lblack *= 1.5; - } - - // Reference parameters computation - double huere, chromare, lumare, huerefblu, chromarefblu, lumarefblu, sobelre; - int lastsav; - float avge; - if (params.locallab.spots.at(sp).spotMethod == "exc") { - ipf.calc_ref(sp, reservView.get(), reservView.get(), 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili); - } else { - ipf.calc_ref(sp, labView, labView, 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili); - } - CurveFactory::complexCurvelocal(ecomp, lblack / 65535., lhlcompr, lhlcomprthresh, shcompr, br, cont, lumare, - hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, avge, - 1); - float minCD; - float maxCD; - float mini; - float maxi; - float Tmean; - float Tsigma; - float Tmin; - float Tmax; - - // No Locallab mask is shown in exported picture - ipf.Lab_Local(2, sp, shbuffer, labView, labView, reservView.get(), lastorigView.get(), 0, 0, fw, fh, 1, locRETgainCurve, locRETtransCurve, - lllocalcurve, locallutili, - cllocalcurve, localclutili, - lclocalcurve, locallcutili, - loclhCurve, lochhCurve, locchCurve, - lmasklocalcurve, localmaskutili, - lmaskexplocalcurve, localmaskexputili, - lmaskSHlocalcurve, localmaskSHutili, - lmaskviblocalcurve, localmaskvibutili, - lmasktmlocalcurve, localmasktmutili, - lmaskretilocalcurve, localmaskretiutili, - lmaskcblocalcurve, localmaskcbutili, - lmaskbllocalcurve, localmaskblutili, - lmasklclocalcurve, localmasklcutili, - lmasklocal_curve, localmask_utili, - - locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, - locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, - locccmasvibCurve, lcmasvibutili, locllmasvibCurve, llmasvibutili, lochhmasvibCurve, lhmasvibutili, - locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, - locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili, - locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili, - locccmasblCurve, lcmasblutili, locllmasblCurve, llmasblutili, lochhmasblCurve, lhmasblutili, - locccmaslcCurve, lcmaslcutili, locllmaslcCurve, llmaslcutili, lochhmaslcCurve, lhmaslcutili, - locccmas_Curve, lcmas_utili, locllmas_Curve, llmas_utili, lochhmas_Curve, lhmas_utili, - lochhhmas_Curve, lhhmas_utili, - loclmasCurveblwav,lmasutiliblwav, - loclmasCurvecolwav,lmasutilicolwav, - locwavCurve, locwavutili, - loclevwavCurve, loclevwavutili, - locconwavCurve, locconwavutili, - loccompwavCurve, loccompwavutili, - loccomprewavCurve, loccomprewavutili, - locwavCurveden, locwavdenutili, - locedgwavCurve, locedgwavutili, - loclmasCurve_wav,lmasutili_wav, - LHutili, HHutili, CHutili, cclocalcurve, localcutili, rgblocalcurve, localrgbutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, - huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax); - - if (sp + 1u < params.locallab.spots.size()) { - // do not copy for last spot as it is not needed anymore - lastorigView->CopyFrom(labView); - } - - if (params.locallab.spots.at(sp).spotMethod == "exc") { - ipf.calc_ref(sp, reservView.get(), reservView.get(), 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili); - } else { - ipf.calc_ref(sp, labView, labView, 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili); - } - } - - t2.set(); - - if (settings->verbose) { - printf("Total local:- %d usec\n", t2.etime(t1)); - } + ipf.shadowsHighlights(labView, params.sh.enabled, params.sh.lab,params.sh.highlights ,params.sh.shadows, params.sh.radius, 1, params.sh.htonalwidth, params.sh.stonalwidth); + if (params.localContrast.enabled) { + // Alberto's local contrast + ipf.localContrast(labView, labView->L, params.localContrast, false, 1);//scale); } ipf.chromiLuminanceCurve(nullptr, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); diff --git a/rtengine/sleef.h b/rtengine/sleef.h index fc23cbad9..8611e2fc7 100644 --- a/rtengine/sleef.h +++ b/rtengine/sleef.h @@ -3,6 +3,11 @@ // this code was taken from http://shibatch.sourceforge.net/ // Many thanks to the author of original version: Naoki Shibata // +// Copyright Naoki Shibata and contributors 2010 - 2021. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file sleef_LICENSE.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// // This version contains modifications made by Ingo Weyrich // //////////////////////////////////////////////////////////////// diff --git a/rtengine/sleefsseavx.h b/rtengine/sleefsseavx.h index c10f4a0c2..374823316 100644 --- a/rtengine/sleefsseavx.h +++ b/rtengine/sleefsseavx.h @@ -3,6 +3,11 @@ // this code was taken from http://shibatch.sourceforge.net/ // Many thanks to the author of original version: Naoki Shibata // +// Copyright Naoki Shibata and contributors 2010 - 2021. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file sleef_LICENSE.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// // This version contains modifications made by Ingo Weyrich // //////////////////////////////////////////////////////////////// diff --git a/rtengine/stdimagesource.h b/rtengine/stdimagesource.h index f937188b4..9b95fe34e 100644 --- a/rtengine/stdimagesource.h +++ b/rtengine/stdimagesource.h @@ -57,6 +57,7 @@ public: ~StdImageSource () override; int load (const Glib::ustring &fname) override; + void getWBMults (const ColorTemp &ctemp, const procparams::RAWParams &raw, std::array& scale_mul, float &autoGainComp, float &rm, float &gm, float &bm) const override {}; void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const procparams::ToneCurveParams &hrp, const procparams::RAWParams &raw) override; void getrgbloc (int begx, int begy, int yEn, int xEn, int cx, int cy, int bf_h, int bf_w) override {}; ColorTemp getWB () const override diff --git a/rtgui/CMakeLists.txt b/rtgui/CMakeLists.txt index f0ebb315f..6724e8ee1 100644 --- a/rtgui/CMakeLists.txt +++ b/rtgui/CMakeLists.txt @@ -192,6 +192,7 @@ if(WIN32) ${GTK_INCLUDE_DIRS} ${LENSFUN_INCLUDE_DIRS} ${RSVG_INCLUDE_DIRS} + ${TIFF_INCLUDE_DIRS} ) link_directories(. ${EXTRA_LIBDIR} @@ -203,6 +204,7 @@ if(WIN32) ${GTK_LIBRARY_DIRS} ${LENSFUN_LIBRARY_DIRS} ${RSVG_LIBRARY_DIRS} + ${TIFF_LIBRARY_DIRS} ) else() include_directories(${EXTRA_INCDIR} @@ -221,6 +223,7 @@ else() ${LCMS_INCLUDE_DIRS} ${LENSFUN_INCLUDE_DIRS} ${RSVG_INCLUDE_DIRS} + ${TIFF_INCLUDE_DIRS} ) link_directories(${EXTRA_LIBDIR} ${CANBERRA-GTK_LIBRARY_DIRS} @@ -238,6 +241,7 @@ else() ${LCMS_LIBRARY_DIRS} ${LENSFUN_LIBRARY_DIRS} ${RSVG_LIBRARY_DIRS} + ${TIFF_LIBRARY_DIRS} ) endif() diff --git a/rtgui/adjuster.cc b/rtgui/adjuster.cc index 6f8c0e83a..a2f96cac3 100644 --- a/rtgui/adjuster.cc +++ b/rtgui/adjuster.cc @@ -132,7 +132,7 @@ Adjuster::Adjuster( // A label is provided, spreading the widgets in 2 rows attach_next_to(*label, Gtk::POS_LEFT, 1, 1); attach_next_to(*spin, Gtk::POS_RIGHT, 1, 1); - // A second HBox is necessary + // A second Grid is necessary grid = Gtk::manage(new Gtk::Grid()); grid->attach_next_to(*slider, Gtk::POS_LEFT, 1, 1); diff --git a/rtgui/batchqueue.cc b/rtgui/batchqueue.cc index fc1fc855e..19da96fb5 100644 --- a/rtgui/batchqueue.cc +++ b/rtgui/batchqueue.cc @@ -344,8 +344,9 @@ bool BatchQueue::loadBatchQueue () auto job = rtengine::ProcessingJob::create (source, thumb->getType () == FT_Raw, pparams, fast); - const auto prevh = getMaxThumbnailHeight (); - const auto prevw = thumb->getThumbnailWidth(prevh, &pparams); + auto prevh = getMaxThumbnailHeight(); + auto prevw = prevh; + thumb->getThumbnailSize(prevw, prevh, &pparams); auto entry = new BatchQueueEntry (job, pparams, source, prevw, prevh, thumb, options.overwriteOutputFile); thumb->decreaseRef (); // Removing the refCount acquired by cacheMgr->getEntry diff --git a/rtgui/batchqueueentry.cc b/rtgui/batchqueueentry.cc index 90079b2cc..31a6f40c7 100644 --- a/rtgui/batchqueueentry.cc +++ b/rtgui/batchqueueentry.cc @@ -106,8 +106,12 @@ void BatchQueueEntry::refreshThumbnailImage () void BatchQueueEntry::calcThumbnailSize () { - prew = preh * origpw / origph; + if (prew > options.maxThumbnailWidth) { + const float s = static_cast(options.maxThumbnailWidth) / prew; + prew = options.maxThumbnailWidth; + preh = std::max(preh * s, 1); + } } @@ -261,9 +265,8 @@ void BatchQueueEntry::_updateImage (guint8* img, int w, int h) MYWRITERLOCK(l, lockRW); prew = w; - assert (preview == nullptr); - preview = new guint8 [prew * preh * 3]; - memcpy (preview, img, prew * preh * 3); + preview.resize(prew * preh * 3); + std::copy(img, img + preview.size(), preview.begin()); if (parent) { parent->redrawNeeded (this); diff --git a/rtgui/batchqueuepanel.cc b/rtgui/batchqueuepanel.cc index f7a73a30b..8a6dd25b4 100644 --- a/rtgui/batchqueuepanel.cc +++ b/rtgui/batchqueuepanel.cc @@ -42,10 +42,10 @@ static Glib::ustring makeFolderLabel(Glib::ustring path) BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) : parent(nullptr) { - + set_orientation(Gtk::ORIENTATION_VERTICAL); batchQueue = Gtk::manage( new BatchQueue(aFileCatalog) ); - Gtk::VBox* batchQueueButtonBox = Gtk::manage (new Gtk::VBox); + Gtk::Box* batchQueueButtonBox = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); batchQueueButtonBox->set_name("BatchQueueButtons"); qStartStop = Gtk::manage (new Gtk::Switch()); @@ -61,12 +61,14 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) : parent(nullptr) batchQueueButtonBox->pack_start (*qStartStop, Gtk::PACK_SHRINK, 4); batchQueueButtonBox->pack_start (*qAutoStart, Gtk::PACK_SHRINK, 4); Gtk::Frame *bbox = Gtk::manage(new Gtk::Frame(M("MAIN_FRAME_QUEUE"))); + bbox->set_label_align(0.025, 0.5); bbox->add(*batchQueueButtonBox); // Output directory selection fdir = Gtk::manage (new Gtk::Frame (M("QUEUE_LOCATION_TITLE"))); - Gtk::VBox* odvb = Gtk::manage (new Gtk::VBox ()); - Gtk::HBox* hb2 = Gtk::manage (new Gtk::HBox ()); + fdir->set_label_align(0.025, 0.5); + Gtk::Box* odvb = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + Gtk::Box* hb2 = Gtk::manage (new Gtk::Box ()); useTemplate = Gtk::manage (new Gtk::RadioButton (M("QUEUE_LOCATION_TEMPLATE") + ":")); hb2->pack_start (*useTemplate, Gtk::PACK_SHRINK, 4); outdirTemplate = Gtk::manage (new Gtk::Entry ()); @@ -74,7 +76,7 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) : parent(nullptr) odvb->pack_start (*hb2, Gtk::PACK_SHRINK, 4); outdirTemplate->set_tooltip_markup (M("QUEUE_LOCATION_TEMPLATE_TOOLTIP")); useTemplate->set_tooltip_markup (M("QUEUE_LOCATION_TEMPLATE_TOOLTIP")); - Gtk::HBox* hb3 = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* hb3 = Gtk::manage (new Gtk::Box ()); useFolder = Gtk::manage (new Gtk::RadioButton (M("QUEUE_LOCATION_FOLDER") + ":")); hb3->pack_start (*useFolder, Gtk::PACK_SHRINK, 4); @@ -112,6 +114,7 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) : parent(nullptr) // Output file format selection fformat = Gtk::manage (new Gtk::Frame (M("QUEUE_FORMAT_TITLE"))); + fformat->set_label_align(0.025, 0.5); saveFormatPanel = Gtk::manage (new SaveFormatPanel ()); setExpandAlignProperties(saveFormatPanel, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); fformat->add (*saveFormatPanel); @@ -127,7 +130,7 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) : parent(nullptr) saveFormatPanel->setListener (this); // setup button bar - topBox = Gtk::manage (new Gtk::HBox ()); + topBox = Gtk::manage (new Gtk::Box ()); pack_start (*topBox, Gtk::PACK_SHRINK); topBox->set_name("BatchQueueButtonsMainContainer"); @@ -139,12 +142,12 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) : parent(nullptr) pack_start (*batchQueue); // lower box with thumbnail zoom - bottomBox = Gtk::manage (new Gtk::HBox ()); + bottomBox = Gtk::manage (new Gtk::Box ()); pack_start (*bottomBox, Gtk::PACK_SHRINK); // thumbnail zoom - Gtk::HBox* zoomBox = Gtk::manage (new Gtk::HBox ()); - zoomBox->pack_start (*Gtk::manage (new Gtk::VSeparator), Gtk::PACK_SHRINK, 4); + Gtk::Box* zoomBox = Gtk::manage (new Gtk::Box ()); + zoomBox->pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)), Gtk::PACK_SHRINK, 4); Gtk::Label* zoomLabel = Gtk::manage (new Gtk::Label (Glib::ustring("") + M("FILEBROWSER_THUMBSIZE") + ":")); zoomLabel->set_use_markup (true); zoomBox->pack_start (*zoomLabel, Gtk::PACK_SHRINK, 4); diff --git a/rtgui/batchqueuepanel.h b/rtgui/batchqueuepanel.h index 7c0a367d4..db4e243e9 100644 --- a/rtgui/batchqueuepanel.h +++ b/rtgui/batchqueuepanel.h @@ -30,7 +30,7 @@ class RTWindow; class FileCatalog; class Thumbnail; -class BatchQueuePanel : public Gtk::VBox, +class BatchQueuePanel : public Gtk::Box, public BatchQueueListener, public FormatChangeListener { @@ -51,8 +51,8 @@ class BatchQueuePanel : public Gtk::VBox, RTWindow* parent; BatchQueue* batchQueue; - Gtk::HBox* bottomBox; - Gtk::HBox* topBox; + Gtk::Box* bottomBox; + Gtk::Box* topBox; std::atomic queueShouldRun; diff --git a/rtgui/bayerpreprocess.cc b/rtgui/bayerpreprocess.cc index 2a1896d80..793496b5f 100644 --- a/rtgui/bayerpreprocess.cc +++ b/rtgui/bayerpreprocess.cc @@ -48,7 +48,7 @@ BayerPreProcess::BayerPreProcess() : FoldableToolPanel(this, "bayerpreprocess", greenEqThreshold->show(); - Gtk::HBox *hb = Gtk::manage(new Gtk::HBox()); + Gtk::Box *hb = Gtk::manage(new Gtk::Box()); hb->pack_start(*Gtk::manage(new Gtk::Label(M("TP_PREPROCESS_LINEDENOISE_DIRECTION") + ": ")), Gtk::PACK_SHRINK, 0); lineDenoiseDirection = Gtk::manage(new MyComboBoxText()); lineDenoiseDirection->append(M("TP_PREPROCESS_LINEDENOISE_DIRECTION_HORIZONTAL")); @@ -63,7 +63,7 @@ BayerPreProcess::BayerPreProcess() : FoldableToolPanel(this, "bayerpreprocess", pack_start(*lineDenoise, Gtk::PACK_SHRINK, 4); pack_start(*hb, Gtk::PACK_SHRINK, 4); - pack_start(*Gtk::manage(new Gtk::HSeparator())); + pack_start(*Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL))); pack_start(*greenEqThreshold, Gtk::PACK_SHRINK, 4); @@ -71,7 +71,7 @@ BayerPreProcess::BayerPreProcess() : FoldableToolPanel(this, "bayerpreprocess", pdafLinesFilter->show(); pdafLinesFilter->signal_toggled().connect(sigc::mem_fun(*this, &BayerPreProcess::pdafLinesFilterChanged), true); - pack_start(*Gtk::manage(new Gtk::HSeparator())); + pack_start(*Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL))); pack_start(*pdafLinesFilter, Gtk::PACK_SHRINK, 4); } diff --git a/rtgui/bayerprocess.cc b/rtgui/bayerprocess.cc index d219dbdd1..6da15951f 100644 --- a/rtgui/bayerprocess.cc +++ b/rtgui/bayerprocess.cc @@ -40,7 +40,7 @@ BayerProcess::BayerProcess () : EvDemosaicAutoContrast = m->newEvent(DEMOSAIC, "HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST"); EvDemosaicPixelshiftDemosaicMethod = m->newEvent(DEMOSAIC, "HISTORY_MSG_PIXELSHIFT_DEMOSAIC"); - Gtk::HBox* hb1 = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* hb1 = Gtk::manage (new Gtk::Box ()); hb1->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_RAW_DMETHOD") + ": ")), Gtk::PACK_SHRINK, 4); method = Gtk::manage (new MyComboBoxText ()); @@ -54,7 +54,7 @@ BayerProcess::BayerProcess () : hb1->pack_end (*method, Gtk::PACK_EXPAND_WIDGET, 4); pack_start( *hb1, Gtk::PACK_SHRINK, 4); - dualDemosaicOptions = Gtk::manage(new Gtk::VBox()); + dualDemosaicOptions = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); dualDemosaicContrast = Gtk::manage(new Adjuster(M("TP_RAW_DUALDEMOSAICCONTRAST"), 0, 100, 1, 20)); dualDemosaicContrast->setAdjusterListener(this); @@ -66,7 +66,7 @@ BayerProcess::BayerProcess () : dualDemosaicOptions->pack_start(*dualDemosaicContrast); pack_start( *dualDemosaicOptions, Gtk::PACK_SHRINK, 4); - borderbox = Gtk::manage(new Gtk::HBox()); + borderbox = Gtk::manage(new Gtk::Box()); border = Gtk::manage(new Adjuster(M("TP_RAW_BORDER"), 0, 16, 1, 4)); border->setAdjusterListener (this); @@ -76,7 +76,7 @@ BayerProcess::BayerProcess () : borderbox->pack_start(*border); pack_start(*borderbox, Gtk::PACK_SHRINK, 4); - imageNumberBox = Gtk::manage (new Gtk::HBox ()); + imageNumberBox = Gtk::manage (new Gtk::Box ()); imageNumberBox->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_RAW_IMAGENUM") + ": ")), Gtk::PACK_SHRINK, 4); imageNumber = Gtk::manage (new MyComboBoxText ()); imageNumber->append("1"); @@ -88,7 +88,7 @@ BayerProcess::BayerProcess () : imageNumberBox->pack_end (*imageNumber, Gtk::PACK_EXPAND_WIDGET, 4); pack_start( *imageNumberBox, Gtk::PACK_SHRINK, 4); - pack_start( *Gtk::manage( new Gtk::HSeparator()), Gtk::PACK_SHRINK, 0 ); + pack_start( *Gtk::manage( new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)), Gtk::PACK_SHRINK, 0 ); ccSteps = Gtk::manage (new Adjuster (M("TP_RAW_FALSECOLOR"), 0, 5, 1, 0 )); ccSteps->setAdjusterListener (this); @@ -97,7 +97,7 @@ BayerProcess::BayerProcess () : ccSteps->show(); pack_start( *ccSteps, Gtk::PACK_SHRINK, 4); - dcbOptions = Gtk::manage (new Gtk::VBox ()); + dcbOptions = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); dcbIterations = Gtk::manage (new Adjuster (M("TP_RAW_DCBITERATIONS"), 0, 5, 1, 2)); dcbIterations->setAdjusterListener (this); @@ -111,7 +111,7 @@ BayerProcess::BayerProcess () : dcbOptions->pack_start(*dcbEnhance); pack_start( *dcbOptions, Gtk::PACK_SHRINK, 4); - lmmseOptions = Gtk::manage (new Gtk::VBox ()); + lmmseOptions = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); lmmseIterations = Gtk::manage (new Adjuster (M("TP_RAW_LMMSEITERATIONS"), 0, 6, 1, 2)); lmmseIterations->setAdjusterListener (this); @@ -128,7 +128,7 @@ BayerProcess::BayerProcess () : pixelShiftFrame = Gtk::manage(new Gtk::Frame(M("TP_RAW_PIXELSHIFT"))); - Gtk::VBox *pixelShiftMainVBox = Gtk::manage (new Gtk::VBox ()); + Gtk::Box *pixelShiftMainVBox = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); pixelShiftMainVBox->set_border_width(0); pixelShiftEqualBright = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTEQUALBRIGHT"), multiImage)); @@ -141,7 +141,7 @@ BayerProcess::BayerProcess () : pixelShiftEqualBrightChannel->set_tooltip_text (M("TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP")); pixelShiftMainVBox->pack_start(*pixelShiftEqualBrightChannel); - Gtk::HBox* hb3 = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* hb3 = Gtk::manage (new Gtk::Box ()); hb3->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_RAW_PIXELSHIFTMOTIONMETHOD") + ": ")), Gtk::PACK_SHRINK, 4); pixelShiftMotionMethod = Gtk::manage (new MyComboBoxText ()); pixelShiftMotionMethod->append(M("TP_RAW_PIXELSHIFTMM_OFF")); @@ -152,7 +152,7 @@ BayerProcess::BayerProcess () : hb3->pack_start(*pixelShiftMotionMethod); pixelShiftMainVBox->pack_start(*hb3); - pixelShiftOptions = Gtk::manage (new Gtk::VBox ()); + pixelShiftOptions = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); pixelShiftOptions->set_border_width(0); pixelShiftShowMotion = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTSHOWMOTION"), multiImage)); @@ -166,7 +166,7 @@ BayerProcess::BayerProcess () : pixelShiftMainVBox->pack_start(*pixelShiftShowMotionMaskOnly); - Gtk::HBox* hb4 = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* hb4 = Gtk::manage (new Gtk::Box ()); hb4->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_RAW_PIXELSHIFTDMETHOD") + ": ")), Gtk::PACK_SHRINK, 4); pixelShiftDemosaicMethod = Gtk::manage (new MyComboBoxText ()); for(const auto method_string : procparams::RAWParams::BayerSensor::getPSDemosaicMethodStrings()) { diff --git a/rtgui/bayerprocess.h b/rtgui/bayerprocess.h index f8348e02b..c2af5a987 100644 --- a/rtgui/bayerprocess.h +++ b/rtgui/bayerprocess.h @@ -37,18 +37,18 @@ class BayerProcess final : protected: MyComboBoxText* method; - Gtk::HBox* borderbox; - Gtk::HBox *imageNumberBox; + Gtk::Box* borderbox; + Gtk::Box *imageNumberBox; Adjuster* border; MyComboBoxText* imageNumber; Adjuster* ccSteps; - Gtk::VBox *dcbOptions; + Gtk::Box *dcbOptions; Adjuster* dcbIterations; CheckBox* dcbEnhance; - Gtk::VBox *lmmseOptions; + Gtk::Box *lmmseOptions; Adjuster* lmmseIterations; Gtk::Frame *pixelShiftFrame; - Gtk::VBox *pixelShiftOptions; + Gtk::Box *pixelShiftOptions; MyComboBoxText* pixelShiftMotionMethod; MyComboBoxText* pixelShiftDemosaicMethod; CheckBox* pixelShiftShowMotion; @@ -63,7 +63,7 @@ protected: Adjuster* pixelShiftSmooth; Adjuster* pixelShiftEperIso; Adjuster* pixelShiftSigma; - Gtk::VBox *dualDemosaicOptions; + Gtk::Box *dualDemosaicOptions; Adjuster* dualDemosaicContrast; int oldMethod; bool lastAutoContrast; diff --git a/rtgui/bayerrawexposure.cc b/rtgui/bayerrawexposure.cc index bb3c3a48a..157abc2cf 100644 --- a/rtgui/bayerrawexposure.cc +++ b/rtgui/bayerrawexposure.cc @@ -137,8 +137,8 @@ void BayerRAWExposure::adjusterChanged(Adjuster* a, double newval) if(!PextwoGreen->getLastActive()) { listener->panelChanged (EvPreProcessExpBlackthree, value ); } else { - listener->panelChanged (EvPreProcessExpBlackthree, value ); PexBlack0->setValue (PexBlack3->getValue()); + listener->panelChanged (EvPreProcessExpBlackthree, value ); } } } diff --git a/rtgui/blackwhite.cc b/rtgui/blackwhite.cc index ea493d6e1..e713f1450 100644 --- a/rtgui/blackwhite.cc +++ b/rtgui/blackwhite.cc @@ -45,7 +45,7 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB //----------- Method combobox ------------------------------ - Gtk::HBox* metHBox = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* metHBox = Gtk::manage (new Gtk::Box ()); metHBox->set_spacing (2); Gtk::Label* metLabel = Gtk::manage (new Gtk::Label (M("TP_BWMIX_MET") + ":")); metHBox->pack_start (*metLabel, Gtk::PACK_SHRINK); @@ -62,7 +62,7 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB //----------- Luminance equalizer ------------------------------ - luminanceSep = Gtk::manage (new Gtk::HSeparator()); + luminanceSep = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); pack_start (*luminanceSep); std::vector bottomMilestones; @@ -89,12 +89,13 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB //----------- Auto and Reset buttons ------------------------------ mixerFrame = Gtk::manage (new Gtk::Frame (M("TP_BWMIX_MET_CHANMIX"))); + mixerFrame->set_label_align(0.025, 0.5); pack_start (*mixerFrame, Gtk::PACK_SHRINK, 0); - mixerVBox = Gtk::manage (new Gtk::VBox ()); + mixerVBox = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); mixerVBox->set_spacing(4); - autoHBox = Gtk::manage (new Gtk::HBox ()); + autoHBox = Gtk::manage (new Gtk::Box ()); autoch = Gtk::manage (new Gtk::ToggleButton (M("TP_BWMIX_AUTOCH"))); autoconn = autoch->signal_toggled().connect( sigc::mem_fun(*this, &BlackWhite::autoch_toggled) ); @@ -110,9 +111,9 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB //----------- Presets combobox ------------------------------ - mixerVBox->pack_start (*Gtk::manage (new Gtk::HSeparator())); + mixerVBox->pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL))); - settingHBox = Gtk::manage (new Gtk::HBox ()); + settingHBox = Gtk::manage (new Gtk::Box ()); settingHBox->set_spacing (2); settingHBox->set_tooltip_markup (M("TP_BWMIX_SETTING_TOOLTIP")); Gtk::Label *settingLabel = Gtk::manage (new Gtk::Label (M("TP_BWMIX_SETTING") + ":")); @@ -146,7 +147,7 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB //----------- Complementary Color checkbox ------------------------------ - enabledccSep = Gtk::manage (new Gtk::HSeparator()); + enabledccSep = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); mixerVBox->pack_start (*enabledccSep); enabledcc = Gtk::manage (new Gtk::CheckButton (M("TP_BWMIX_CC_ENABLED"))); @@ -160,10 +161,10 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB //----------- Color Filters ------------------------------ - filterSep = Gtk::manage (new Gtk::HSeparator()); + filterSep = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); mixerVBox->pack_start (*filterSep); - filterHBox = Gtk::manage (new Gtk::HBox ()); + filterHBox = Gtk::manage (new Gtk::Box ()); filterHBox->set_spacing (2); filterHBox->set_tooltip_markup (M("TP_BWMIX_FILTER_TOOLTIP")); Gtk::Label *filterLabel = Gtk::manage (new Gtk::Label (M("TP_BWMIX_FILTER") + ":")); @@ -199,7 +200,7 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB imgIcon[9] = Gtk::manage (new RTImage ("circle-empty-green-small.png")); imgIcon[10] = Gtk::manage (new RTImage ("circle-empty-blue-small.png")); - mixerVBox->pack_start (*Gtk::manage (new Gtk::HSeparator())); + mixerVBox->pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL))); mixerRed = Gtk::manage(new Adjuster (/*M("TP_BWMIX_RED")*/"", -100, 200, 1, 33, imgIcon[0])); @@ -222,10 +223,10 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB mixerBlue->show(); mixerVBox->pack_start( *mixerBlue, Gtk::PACK_SHRINK, 0); - filterSep2 = Gtk::manage (new Gtk::HSeparator()); + filterSep2 = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); mixerVBox->pack_start (*filterSep2); - algoHBox = Gtk::manage (new Gtk::HBox ()); + algoHBox = Gtk::manage (new Gtk::Box ()); algoHBox->set_spacing (2); algoHBox->set_tooltip_markup (M("TP_BWMIX_ALGO_TOOLTIP")); @@ -280,9 +281,10 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB //----------- Gamma sliders ------------------------------ gammaFrame = Gtk::manage (new Gtk::Frame (M("TP_BWMIX_GAMMA"))); + gammaFrame->set_label_align(0.025, 0.5); pack_start (*gammaFrame, Gtk::PACK_SHRINK, 0); - Gtk::VBox *gammaVBox = Gtk::manage (new Gtk::VBox()); + Gtk::Box* gammaVBox = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); gammaVBox->set_spacing(4); diff --git a/rtgui/blackwhite.h b/rtgui/blackwhite.h index 1aed86997..505d842db 100644 --- a/rtgui/blackwhite.h +++ b/rtgui/blackwhite.h @@ -90,7 +90,7 @@ private: void hideGamma(); FlatCurveEditor* luminanceCurve; - Gtk::HSeparator* luminanceSep; + Gtk::Separator* luminanceSep; CurveEditorGroup* luminanceCEG; CurveEditorGroup* beforeCurveCEG; DiagonalCurveEditor* beforeCurve; @@ -99,13 +99,13 @@ private: DiagonalCurveEditor* afterCurve; MyComboBoxText* afterCurveMode; Gtk::ToggleButton* autoch; - Gtk::HBox* autoHBox; + Gtk::Box* autoHBox; Gtk::Button* neutral; Gtk::Label* RGBLabels; MyComboBoxText* algo; sigc::connection algoconn; Gtk::Label* alLabel; - Gtk::HBox* algoHBox; + Gtk::Box* algoHBox; Adjuster *mixerRed; Adjuster *mixerGreen; @@ -120,20 +120,20 @@ private: Adjuster *mixerPurple; MyComboBoxText* method; sigc::connection methodconn; - Gtk::HBox* filterHBox; - Gtk::HSeparator* filterSep, *filterSep2; + Gtk::Box* filterHBox; + Gtk::Separator* filterSep, *filterSep2; MyComboBoxText* filter; sigc::connection filterconn; - Gtk::HBox* settingHBox; + Gtk::Box* settingHBox; MyComboBoxText* setting; sigc::connection settingconn; Gtk::Frame* mixerFrame; - Gtk::VBox * mixerVBox; + Gtk::Box* mixerVBox; Gtk::Frame* gammaFrame; Gtk::Image *imgIcon[11]; - Gtk::HSeparator* enabledccSep; + Gtk::Separator* enabledccSep; Gtk::CheckButton* enabledcc; bool lastEnabledcc, lastAuto; sigc::connection enaccconn, tcmodeconn, tcmodeconn2, autoconn, neutralconn; diff --git a/rtgui/chmixer.cc b/rtgui/chmixer.cc index 4b243f13c..619d7be3e 100644 --- a/rtgui/chmixer.cc +++ b/rtgui/chmixer.cc @@ -47,7 +47,7 @@ ChMixer::ChMixer (): FoldableToolPanel(this, "chmixer", M("TP_CHMIXER_LABEL"), f red[1] = Gtk::manage (new Adjuster ("", -RANGE, RANGE, 0.1, 0, imgIcon[1])); red[2] = Gtk::manage (new Adjuster ("", -RANGE, RANGE, 0.1, 0, imgIcon[2])); - Gtk::HSeparator* rsep = Gtk::manage (new Gtk::HSeparator ()); + Gtk::Separator* rsep = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); pack_start (*rlabel); @@ -66,7 +66,7 @@ ChMixer::ChMixer (): FoldableToolPanel(this, "chmixer", M("TP_CHMIXER_LABEL"), f green[1] = Gtk::manage (new Adjuster ("", -RANGE, RANGE, 0.1, 100, imgIcon[4])); green[2] = Gtk::manage (new Adjuster ("", -RANGE, RANGE, 0.1, 0, imgIcon[5])); - Gtk::HSeparator* gsep = Gtk::manage (new Gtk::HSeparator ()); + Gtk::Separator* gsep = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); pack_start (*glabel); diff --git a/rtgui/coarsepanel.h b/rtgui/coarsepanel.h index b7b4f8cf7..a74c05b15 100644 --- a/rtgui/coarsepanel.h +++ b/rtgui/coarsepanel.h @@ -23,7 +23,7 @@ #include "toolpanel.h" class CoarsePanel final : - public Gtk::HBox, + public Gtk::Box, public ToolPanel { diff --git a/rtgui/colorappearance.cc b/rtgui/colorappearance.cc index 934f922ae..8b57aadb4 100644 --- a/rtgui/colorappearance.cc +++ b/rtgui/colorappearance.cc @@ -39,7 +39,7 @@ #define MINLA0 0.01 #define MAXLA0 16384 -#define CENTERLA0 500 +//#define CENTERLA0 500 using namespace rtengine; using namespace rtengine::procparams; @@ -50,12 +50,12 @@ static double wbSlider2Temp (double sval) // slider range: 0 - 10000 double temp; - if (sval <= 5000) { + if (sval <= 5003) { // linear below center-temp - temp = MINTEMP0 + (sval / 5000.0) * (CENTERTEMP0 - MINTEMP0); + temp = MINTEMP0 + (sval / 5003.0) * (CENTERTEMP0 - MINTEMP0); } else { const double slope = (double) (CENTERTEMP0 - MINTEMP0) / (MAXTEMP0 - CENTERTEMP0); - double x = (sval - 5000) / 5000; // x 0..1 + double x = (sval - 5003) / 5003; // x 0..1 double y = x * slope + (1.0 - slope) * pow (x, 4.0); //double y = pow(x, 4.0); temp = CENTERTEMP0 + y * (MAXTEMP0 - CENTERTEMP0); @@ -71,7 +71,7 @@ static double wbSlider2Temp (double sval) return temp; } - +/* static double wbSlider2la (double sval) { @@ -99,7 +99,8 @@ static double wbSlider2la (double sval) return la; } - +*/ +/* static double wbla2Slider (double la) { @@ -153,7 +154,7 @@ static double wbla2Slider (double la) return sval; } - +*/ static double wbTemp2Slider (double temp) @@ -162,7 +163,7 @@ static double wbTemp2Slider (double temp) double sval; if (temp <= CENTERTEMP0) { - sval = ((temp - MINTEMP0) / (CENTERTEMP0 - MINTEMP0)) * 5000.0; + sval = ((temp - MINTEMP0) / (CENTERTEMP0 - MINTEMP0)) * 5003.0; } else { const double slope = (double) (CENTERTEMP0 - MINTEMP0) / (MAXTEMP0 - CENTERTEMP0); const double y = (temp - CENTERTEMP0) / (MAXTEMP0 - CENTERTEMP0); @@ -175,7 +176,7 @@ static double wbTemp2Slider (double temp) for (;;) { double y1 = x * slope + (1.0 - slope) * pow (x, 4.0); - if (5000 * fabs (y1 - y) < 0.1) { + if (5003 * fabs (y1 - y) < 0.1) { break; } @@ -196,7 +197,7 @@ static double wbTemp2Slider (double temp) } } - sval = 5000.0 + x * 5000.0; + sval = 5003.0 + x * 5003.0; } if (sval < 0) { @@ -222,11 +223,59 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" Evcatpreset = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_CAT02PRESET"); EvCATAutotempout = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_TEMPOUT"); EvCATillum = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ILLUM"); - //preset button cat02 + EvCATcomplex = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_CATCOMPLEX"); + EvCATmodel = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_CATMODEL"); + EvCATcat = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_CATCAT"); + //preset button cat02/16 + Gtk::Frame *genFrame; + Gtk::Box* genVBox; + genFrame = Gtk::manage (new Gtk::Frame (M ("TP_COLORAPP_GEN")) ); + genFrame->set_label_align (0.025, 0.5); + genFrame->set_tooltip_markup (M ("TP_COLORAPP_GEN_TOOLTIP")); + genVBox = Gtk::manage ( new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + genVBox->set_spacing (2); + + complexmethod = Gtk::manage (new MyComboBoxText ()); + complexmethod->append(M("TP_WAVELET_COMPNORMAL")); + complexmethod->append(M("TP_WAVELET_COMPEXPERT")); + complexmethodconn = complexmethod->signal_changed().connect(sigc::mem_fun(*this, &ColorAppearance::complexmethodChanged)); + complexmethod->set_tooltip_text(M("TP_WAVELET_COMPLEX_TOOLTIP")); + Gtk::Box* const complexHBox = Gtk::manage(new Gtk::Box()); + Gtk::Label* const complexLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_COMPLEXLAB") + ":")); + complexHBox->pack_start(*complexLabel, Gtk::PACK_SHRINK, 4); + complexHBox->pack_start(*complexmethod); + genVBox->pack_start (*complexHBox, Gtk::PACK_SHRINK); + + modelmethod = Gtk::manage (new MyComboBoxText ()); + modelmethod->append(M("TP_COLORAPP_MOD02")); + modelmethod->append(M("TP_COLORAPP_MOD16")); + modelmethodconn = modelmethod->signal_changed().connect(sigc::mem_fun(*this, &ColorAppearance::modelmethodChanged)); + modelmethod->set_tooltip_text(M("TP_COLORAPP_MODELCAT_TOOLTIP")); + Gtk::Box* const modelHBox = Gtk::manage(new Gtk::Box()); + Gtk::Label* const modelLabel = Gtk::manage(new Gtk::Label(M("TP_COLORAPP_MODELCAT") + ":")); + modelHBox->pack_start(*modelLabel, Gtk::PACK_SHRINK, 4); + modelHBox->pack_start(*modelmethod); + genVBox->pack_start (*modelHBox, Gtk::PACK_SHRINK); + + catmethod = Gtk::manage (new MyComboBoxText ()); + catmethod->append(M("TP_COLORAPP_CATCLASSIC")); + catmethod->append(M("TP_COLORAPP_CATSYMGEN")); + catmethod->append(M("TP_COLORAPP_CATSYMSPE")); + catmethodconn = catmethod->signal_changed().connect(sigc::mem_fun(*this, &ColorAppearance::catmethodChanged)); + catmethod->set_tooltip_text(M("TP_COLORAPP_CATMET_TOOLTIP")); + Gtk::Box* const catHBox = Gtk::manage(new Gtk::Box()); + Gtk::Label* const catLabel = Gtk::manage(new Gtk::Label(M("TP_COLORAPP_CATMOD") + ":")); + catHBox->pack_start(*catLabel, Gtk::PACK_SHRINK, 4); + catHBox->pack_start(*catmethod); + genVBox->pack_start (*catHBox, Gtk::PACK_SHRINK); + presetcat02 = Gtk::manage (new Gtk::CheckButton (M ("TP_COLORAPP_PRESETCAT02"))); presetcat02->set_tooltip_markup (M("TP_COLORAPP_PRESETCAT02_TIP")); presetcat02conn = presetcat02->signal_toggled().connect( sigc::mem_fun(*this, &ColorAppearance::presetcat02pressed)); - pack_start (*presetcat02, Gtk::PACK_SHRINK); +// genVBox->pack_start (*presetcat02, Gtk::PACK_SHRINK); + + genFrame->add (*genVBox); + pack_start (*genFrame, Gtk::PACK_EXPAND_WIDGET, 4); // ----------------------- Process #1: Converting to CIECAM @@ -234,19 +283,21 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" // Process 1 frame Gtk::Frame *p1Frame; // Vertical box container for the content of the Process 1 frame - Gtk::VBox *p1VBox; + Gtk::Box* p1VBox; p1Frame = Gtk::manage (new Gtk::Frame (M ("TP_COLORAPP_LABEL_SCENE")) ); p1Frame->set_label_align (0.025, 0.5); - - p1VBox = Gtk::manage ( new Gtk::VBox()); + p1Frame->set_tooltip_markup (M ("TP_COLORAPP_SOURCEF_TOOLTIP")); + p1VBox = Gtk::manage ( new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); p1VBox->set_spacing (2); degree = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CIECAT_DEGREE"), 0., 100., 1., 90.)); + degree->set_tooltip_markup (M ("TP_COLORAPP_DEGREE_TOOLTIP")); + degree->setAdjusterListener(this); - degree->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); + // degree->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); - degree->throwOnButtonRelease(); + // degree->throwOnButtonRelease(); degree->addAutoButton (M ("TP_COLORAPP_CAT02ADAPTATION_TOOLTIP")); p1VBox->pack_start (*degree); @@ -254,10 +305,10 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" // surrsource->set_tooltip_markup (M ("TP_COLORAPP_SURSOURCE_TOOLTIP")); - Gtk::HBox* surrHBox1 = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* surrHBox1 = Gtk::manage (new Gtk::Box ()); surrHBox1->set_spacing (2); - surrHBox1->set_tooltip_markup (M ("TP_COLORAPP_SURROUND_TOOLTIP")); - Gtk::Label* surrLabel1 = Gtk::manage (new Gtk::Label (M ("TP_COLORAPP_SURROUND") + ":")); + surrHBox1->set_tooltip_markup (M ("TP_COLORAPP_SURSOURCE_TOOLTIP")); + Gtk::Label* surrLabel1 = Gtk::manage (new Gtk::Label (M ("TP_COLORAPP_SURROUNDSRC") + ":")); surrHBox1->pack_start (*surrLabel1, Gtk::PACK_SHRINK); surrsrc = Gtk::manage (new MyComboBoxText ()); surrsrc->append (M ("TP_COLORAPP_SURROUND_AVER")); @@ -270,7 +321,10 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" // p1VBox->pack_start (*surrsource, Gtk::PACK_SHRINK); - Gtk::HBox* wbmHBox = Gtk::manage (new Gtk::HBox ()); + + + wbmHBox = Gtk::manage (new Gtk::Box ()); + wbmHBox->set_spacing (2); wbmHBox->set_tooltip_markup (M ("TP_COLORAPP_MODEL_TOOLTIP")); Gtk::Label* wbmLab = Gtk::manage (new Gtk::Label (M ("TP_COLORAPP_MODEL") + ":")); @@ -285,7 +339,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" p1VBox->pack_start (*wbmHBox); - Gtk::HBox* illumHBox = Gtk::manage (new Gtk::HBox ()); + illumHBox = Gtk::manage (new Gtk::Box ()); illumHBox->set_spacing (2); illumHBox->set_tooltip_markup (M ("TP_COLORAPP_ILLUM_TOOLTIP")); Gtk::Label* illumLab = Gtk::manage (new Gtk::Label (M ("TP_COLORAPP_ILLUM") + ":")); @@ -321,19 +375,23 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" // adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ABSOLUTELUMINANCE"), 0.01, 16384., 0.001, 2000.)); // EV -7 ==> EV 17 - adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ABSOLUTELUMINANCE"), MINLA0, MAXLA0, 0.01, 1997.4, NULL, NULL, &wbSlider2la, &wbla2Slider)); +// adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ABSOLUTELUMINANCE"), MINLA0, MAXLA0, 0.01, 1997.4, NULL, NULL, &wbSlider2la, &wbla2Slider)); + adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ABSOLUTELUMINANCE"), MINLA0, MAXLA0, 0.01, 2000.));//, NULL, NULL, &wbSlider2la, &wbla2Slider)); + adapscen->setLogScale(500, 0); - adapscen->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); + // adapscen->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); + adapscen->set_tooltip_markup (M ("TP_COLORAPP_ADAPSCEN_TOOLTIP")); - adapscen->throwOnButtonRelease(); +// adapscen->throwOnButtonRelease(); adapscen->addAutoButton(); p1VBox->pack_start (*adapscen); ybscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_MEANLUMINANCE"), 1, 90, 1, 18)); + ybscen->set_tooltip_markup (M ("TP_COLORAPP_YBSCEN_TOOLTIP")); - ybscen->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); + // ybscen->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); - ybscen->throwOnButtonRelease(); +// ybscen->throwOnButtonRelease(); ybscen->addAutoButton(); p1VBox->pack_start (*ybscen); @@ -352,17 +410,17 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" /* Gtk::Frame *p2Frame; // Vertical box container for the content of the Process 1 frame - Gtk::VBox *p2VBox; + Gtk::Box* p2VBox; p2Frame = Gtk::manage (new Gtk::Frame (M ("TP_COLORAPP_LABEL_CAM02")) ); p2Frame->set_label_align (0.025, 0.5); */ - Gtk::VBox *p2VBox; + Gtk::Box* p2VBox; - p2VBox = Gtk::manage ( new Gtk::VBox()); + p2VBox = Gtk::manage ( new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); p2VBox->set_spacing (2); - Gtk::HBox* alHBox = Gtk::manage (new Gtk::HBox ()); + alHBox = Gtk::manage (new Gtk::Box ()); alHBox->set_spacing (2); alHBox->set_tooltip_markup (M ("TP_COLORAPP_ALGO_TOOLTIP")); Gtk::Label* alLabel = Gtk::manage (new Gtk::Label (M ("TP_COLORAPP_ALGO") + ":")); @@ -376,79 +434,80 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" alHBox->pack_start (*algo); p2VBox->pack_start (*alHBox); - p2VBox->pack_start (*Gtk::manage (new Gtk::HSeparator()), Gtk::PACK_EXPAND_WIDGET, 4); + p2VBox->pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)), Gtk::PACK_EXPAND_WIDGET, 4); jlight = Gtk::manage (new Adjuster (M ("TP_COLORAPP_LIGHT"), -100.0, 100.0, 0.1, 0.)); + jlight->setAdjusterListener (this); - jlight->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); + // jlight->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); - jlight->throwOnButtonRelease(); + // jlight->throwOnButtonRelease(); jlight->set_tooltip_markup (M ("TP_COLORAPP_LIGHT_TOOLTIP")); p2VBox->pack_start (*jlight); qbright = Gtk::manage (new Adjuster (M ("TP_COLORAPP_BRIGHT"), -100.0, 100.0, 0.1, 0.)); - qbright->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); + // qbright->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); - qbright->throwOnButtonRelease(); +// qbright->throwOnButtonRelease(); qbright->set_tooltip_markup (M ("TP_COLORAPP_BRIGHT_TOOLTIP")); p2VBox->pack_start (*qbright); chroma = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CHROMA"), -100.0, 100.0, 0.1, 0.)); - chroma->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); + // chroma->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); - chroma->throwOnButtonRelease(); +// chroma->throwOnButtonRelease(); chroma->set_tooltip_markup (M ("TP_COLORAPP_CHROMA_TOOLTIP")); p2VBox->pack_start (*chroma); schroma = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CHROMA_S"), -100.0, 100.0, 0.1, 0.)); - schroma->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); + // schroma->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); - schroma->throwOnButtonRelease(); +// schroma->throwOnButtonRelease(); schroma->set_tooltip_markup (M ("TP_COLORAPP_CHROMA_S_TOOLTIP")); p2VBox->pack_start (*schroma); mchroma = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CHROMA_M"), -100.0, 100.0, 0.1, 0.)); - mchroma->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); + // mchroma->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); - mchroma->throwOnButtonRelease(); +// mchroma->throwOnButtonRelease(); mchroma->set_tooltip_markup (M ("TP_COLORAPP_CHROMA_M_TOOLTIP")); p2VBox->pack_start (*mchroma); rstprotection = Gtk::manage ( new Adjuster (M ("TP_COLORAPP_RSTPRO"), 0., 100., 0.1, 0.) ); - rstprotection->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); + // rstprotection->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); - rstprotection->throwOnButtonRelease(); + // rstprotection->throwOnButtonRelease(); rstprotection->set_tooltip_markup (M ("TP_COLORAPP_RSTPRO_TOOLTIP")); p2VBox->pack_start (*rstprotection); contrast = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CONTRAST"), -100.0, 100.0, 0.1, 0.)); - contrast->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); + // contrast->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); - contrast->throwOnButtonRelease(); +// contrast->throwOnButtonRelease(); contrast->set_tooltip_markup (M ("TP_COLORAPP_CONTRAST_TOOLTIP")); p2VBox->pack_start (*contrast); qcontrast = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CONTRAST_Q"), -100.0, 100.0, 0.1, 0.)); - qcontrast->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); + // qcontrast->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); - qcontrast->throwOnButtonRelease(); + // qcontrast->throwOnButtonRelease(); qcontrast->set_tooltip_markup (M ("TP_COLORAPP_CONTRAST_Q_TOOLTIP")); p2VBox->pack_start (*qcontrast); colorh = Gtk::manage (new Adjuster (M ("TP_COLORAPP_HUE"), -100.0, 100.0, 0.1, 0.)); - colorh->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); + // colorh->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); - colorh->throwOnButtonRelease(); +// colorh->throwOnButtonRelease(); colorh->set_tooltip_markup (M ("TP_COLORAPP_HUE_TOOLTIP")); p2VBox->pack_start (*colorh); @@ -462,7 +521,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" sharpcieconn = sharpcie->signal_toggled().connect( sigc::mem_fun(*this, &ColorAppearance::sharpcie_toggled) ); p2VBox->pack_start (*sharpcie); */ - p2VBox->pack_start (*Gtk::manage (new Gtk::HSeparator()), Gtk::PACK_EXPAND_WIDGET, 4); + p2VBox->pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)), Gtk::PACK_EXPAND_WIDGET, 4); toneCurveMode = Gtk::manage (new MyComboBoxText ()); toneCurveMode->append (M ("TP_COLORAPP_TCMODE_LIGHTNESS")); @@ -579,24 +638,25 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" // Process 3 frame Gtk::Frame *p3Frame; // Vertical box container for the content of the Process 3 frame - Gtk::VBox *p3VBox; + Gtk::Box* p3VBox; p3Frame = Gtk::manage (new Gtk::Frame (M ("TP_COLORAPP_LABEL_VIEWING")) ); // "Editing viewing conditions" ??? p3Frame->set_label_align (0.025, 0.5); + p3Frame->set_tooltip_markup (M ("TP_COLORAPP_VIEWINGF_TOOLTIP")); - p3VBox = Gtk::manage ( new Gtk::VBox()); + p3VBox = Gtk::manage ( new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); p3VBox->set_spacing (2); Gtk::Image* itempL1 = Gtk::manage (new RTImage ("circle-blue-small.png")); Gtk::Image* itempR1 = Gtk::manage (new RTImage ("circle-yellow-small.png")); Gtk::Image* igreenL1 = Gtk::manage (new RTImage ("circle-magenta-small.png")); Gtk::Image* igreenR1 = Gtk::manage (new RTImage ("circle-green-small.png")); -// adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ABSOLUTELUMINANCE"), 0.1, 16384., 0.1, 16.)); - adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ABSOLUTELUMINANCE"), MINLA0, MAXLA0, 0.01, 16, NULL, NULL, &wbSlider2la, &wbla2Slider)); + adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ABSOLUTELUMINANCE"), MINLA0, MAXLA0, 0.01, 16.));//, NULL, NULL, &wbSlider2la, &wbla2Slider)); + adaplum->setLogScale(500, 0); - adaplum->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); + // adaplum->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); - adaplum->throwOnButtonRelease(); + // adaplum->throwOnButtonRelease(); adaplum->set_tooltip_markup (M ("TP_COLORAPP_VIEWING_ABSOLUTELUMINANCE_TOOLTIP")); p3VBox->pack_start (*adaplum); @@ -605,9 +665,11 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" degreeout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CIECAT_DEGREE"), 0., 100., 1., 90.)); - degreeout->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); + // degreeout->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); + + // degreeout->throwOnButtonRelease(); + degreeout->set_tooltip_markup (M ("TP_COLORAPP_DEGREOUT_TOOLTIP")); - degreeout->throwOnButtonRelease(); degreeout->addAutoButton (M ("TP_COLORAPP_CAT02ADAPTATION_TOOLTIP")); p3VBox->pack_start (*degreeout); /* @@ -619,9 +681,11 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" tempout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR1, itempL1, &wbSlider2Temp, &wbTemp2Slider)); greenout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR1, igreenL1)); ybout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_MEANLUMINANCE"), 5, 90, 1, 18)); + ybout->set_tooltip_markup (M ("TP_COLORAPP_YBOUT_TOOLTIP")); + tempout->set_tooltip_markup (M ("TP_COLORAPP_TEMP2_TOOLTIP")); - tempout->throwOnButtonRelease(); - tempout->addAutoButton (M ("TP_COLORAPP_TEMPOUT_TOOLTIP")); + // tempout->throwOnButtonRelease(); + // tempout->addAutoButton (M ("TP_COLORAPP_TEMPOUT_TOOLTIP")); tempout->show(); greenout->show(); @@ -630,7 +694,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" p3VBox->pack_start (*greenout); p3VBox->pack_start (*ybout); - Gtk::HBox* surrHBox = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* surrHBox = Gtk::manage (new Gtk::Box ()); surrHBox->set_spacing (2); surrHBox->set_tooltip_markup (M ("TP_COLORAPP_SURROUND_TOOLTIP")); Gtk::Label* surrLabel = Gtk::manage (new Gtk::Label (M ("TP_COLORAPP_SURROUND") + ":")); @@ -666,9 +730,9 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" */ badpixsl = Gtk::manage (new Adjuster (M ("TP_COLORAPP_BADPIXSL"), 0, 2, 1, 0)); - badpixsl->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); + // badpixsl->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); - badpixsl->throwOnButtonRelease(); + // badpixsl->throwOnButtonRelease(); badpixsl->set_tooltip_markup (M ("TP_COLORAPP_BADPIXSL_TOOLTIP")); pack_start (*badpixsl, Gtk::PACK_SHRINK); @@ -762,7 +826,7 @@ void ColorAppearance::neutral_pressed () qcontrast->resetValue (false); colorh->resetValue (false); tempout->resetValue (false); - tempout->setAutoValue (true); +// tempout->setAutoValue (true); greenout->resetValue (false); ybout->resetValue (false); tempsc->resetValue (false); @@ -803,6 +867,9 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) { disableListener (); + complexmethodconn.block(true); + modelmethodconn.block(true); + catmethodconn.block(true); tcmodeconn.block (true); tcmode2conn.block (true); tcmode3conn.block (true); @@ -852,7 +919,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) adapscen->setAutoInconsistent (multiImage && !pedited->colorappearance.autoadapscen); ybscen->setAutoInconsistent (multiImage && !pedited->colorappearance.autoybscen); set_inconsistent (multiImage && !pedited->colorappearance.enabled); - tempout->setAutoInconsistent (multiImage && !pedited->colorappearance.autotempout); + // tempout->setAutoInconsistent (multiImage && !pedited->colorappearance.autotempout); shape->setUnChanged (!pedited->colorappearance.curve); shape2->setUnChanged (!pedited->colorappearance.curve2); @@ -861,6 +928,15 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) if (!pedited->colorappearance.curveMode) { toneCurveMode->set_active (2); } + if (!pedited->colorappearance.complexmethod) { + complexmethod->set_active_text(M("GENERAL_UNCHANGED")); + } + if (!pedited->colorappearance.modelmethod) { + modelmethod->set_active_text(M("GENERAL_UNCHANGED")); + } + if (!pedited->colorappearance.catmethod) { + catmethod->set_active_text(M("GENERAL_UNCHANGED")); + } if (!pedited->colorappearance.curveMode2) { toneCurveMode2->set_active (2); @@ -876,6 +952,30 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) setEnabled (pp->colorappearance.enabled); + if (pp->colorappearance.complexmethod == "normal") { + complexmethod->set_active(0); + } else if (pp->colorappearance.complexmethod == "expert") { + complexmethod->set_active(1); + } + + modelmethod->set_active(0); + + if (pp->colorappearance.modelmethod == "02") { + modelmethod->set_active(0); + } else if (pp->colorappearance.modelmethod == "16") { + modelmethod->set_active(1); + } + + catmethod->set_active(0); + + if (pp->colorappearance.catmethod == "clas") { + catmethod->set_active(0); + } else if (pp->colorappearance.catmethod == "symg") { + catmethod->set_active(1); + } else if (pp->colorappearance.catmethod == "symc") { + catmethod->set_active(2); + } + surrsrcconn.block (true); if (pedited && !pedited->colorappearance.surrsrc) { @@ -1005,7 +1105,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) lastAutoAdapscen = pp->colorappearance.autoadapscen; lastAutoDegreeout = pp->colorappearance.autodegreeout; lastAutoybscen = pp->colorappearance.autoybscen; - lastAutotempout = pp->colorappearance.autotempout; +// lastAutotempout = pp->colorappearance.autotempout; degree->setValue (pp->colorappearance.degree); degree->setAutoValue (pp->colorappearance.autodegree); @@ -1028,7 +1128,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) qcontrast->setValue (pp->colorappearance.qcontrast); colorh->setValue (pp->colorappearance.colorh); tempout->setValue (pp->colorappearance.tempout); - tempout->setAutoValue (pp->colorappearance.autotempout); +// tempout->setAutoValue (pp->colorappearance.autotempout); greenout->setValue (pp->colorappearance.greenout); ybout->setValue (pp->colorappearance.ybout); tempsc->setValue (pp->colorappearance.tempsc); @@ -1038,9 +1138,20 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) presetcat02conn.block (false); lastpresetcat02 = pp->colorappearance.presetcat02; + if (complexmethod->get_active_row_number() == 0) { + updateGUIToMode(0); + convertParamToNormal(); + + } else { + updateGUIToMode(1); + } + tcmode3conn.block (false); tcmode2conn.block (false); tcmodeconn.block (false); + catmethodconn.block(false); + modelmethodconn.block(false); + complexmethodconn.block(false); enableListener (); } void ColorAppearance::autoOpenCurve () @@ -1085,7 +1196,7 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pp->colorappearance.curve2 = shape2->getCurve (); pp->colorappearance.curve3 = shape3->getCurve (); pp->colorappearance.tempout = tempout->getValue (); - pp->colorappearance.autotempout = tempout->getAutoValue (); +// pp->colorappearance.autotempout = tempout->getAutoValue (); pp->colorappearance.greenout = greenout->getValue (); pp->colorappearance.ybout = ybout->getValue (); pp->colorappearance.tempsc = tempsc->getValue (); @@ -1119,6 +1230,9 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) } if (pedited) { + pedited->colorappearance.complexmethod = complexmethod->get_active_text() != M("GENERAL_UNCHANGED"); + pedited->colorappearance.modelmethod = modelmethod->get_active_text() != M("GENERAL_UNCHANGED"); + pedited->colorappearance.catmethod = catmethod->get_active_text() != M("GENERAL_UNCHANGED"); pedited->colorappearance.degree = degree->getEditedState (); pedited->colorappearance.degreeout = degreeout->getEditedState (); pedited->colorappearance.adapscen = adapscen->getEditedState (); @@ -1162,10 +1276,30 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pedited->colorappearance.tempsc = tempsc->getEditedState (); pedited->colorappearance.greensc = greensc->getEditedState (); pedited->colorappearance.presetcat02 = presetcat02->get_inconsistent (); - pedited->colorappearance.autotempout = !tempout->getAutoInconsistent(); +// pedited->colorappearance.autotempout = !tempout->getAutoInconsistent(); } + if (complexmethod->get_active_row_number() == 0) { + pp->colorappearance.complexmethod = "normal"; + } else if (complexmethod->get_active_row_number() == 1) { + pp->colorappearance.complexmethod = "expert"; + } + + if (modelmethod->get_active_row_number() == 0) { + pp->colorappearance.modelmethod = "02"; + } else if (modelmethod->get_active_row_number() == 1) { + pp->colorappearance.modelmethod = "16"; + } + + if (catmethod->get_active_row_number() == 0) { + pp->colorappearance.catmethod = "clas"; + } else if (catmethod->get_active_row_number() == 1) { + pp->colorappearance.catmethod = "symg"; + } else if (catmethod->get_active_row_number() == 2) { + pp->colorappearance.catmethod = "symc"; + } + if (surrsrc->get_active_row_number() == 0) { pp->colorappearance.surrsrc = "Average"; } else if (surrsrc->get_active_row_number() == 1) { @@ -1224,6 +1358,199 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) } } + + +void ColorAppearance::updateGUIToMode(int mode) +{ + if(mode ==0) { + alHBox->hide(); + wbmHBox->hide(); + curveEditorG->hide(); + curveEditorG2->hide(); + curveEditorG3->hide(); + greenout->hide(); + badpixsl->hide(); + datacie->hide(); + } else { + alHBox->show(); + wbmHBox->show(); + curveEditorG->show(); + curveEditorG2->show(); + curveEditorG3->show(); + greenout->show(); + badpixsl->show(); + datacie->show(); + } + +} + +void ColorAppearance::convertParamToNormal() +{ + const ColorAppearanceParams def_params; + disableListener(); + algo->set_active (0); + shape->setCurve(def_params.curve); + shape2->setCurve(def_params.curve2); + shape3->setCurve(def_params.curve3); + shape->reset(); + shape2->reset(); + shape3->reset(); + wbmodel->set_active (0); + if (presetcat02->get_active ()) { + wbmodel->set_active (2); + } + if (catmethod->get_active_row_number() == 1 || catmethod->get_active_row_number() == 2) { + wbmodel->set_active (2); + } + + greenout->setValue(def_params.greenout); + badpixsl->setValue(def_params.badpixsl); + + enableListener(); + + // Update GUI based on converted widget parameters: +} + +void ColorAppearance::complexmethodChanged() +{ + if (complexmethod->get_active_row_number() == 0) { + updateGUIToMode(0); + convertParamToNormal(); + + } else { + updateGUIToMode(1); + } + + if (listener && (multiImage || getEnabled())) { + listener->panelChanged(EvCATcomplex, complexmethod->get_active_text()); + } +} + +void ColorAppearance::modelmethodChanged() +{ + + if (listener && (multiImage || getEnabled())) { + listener->panelChanged(EvCATmodel, modelmethod->get_active_text()); + } +} + +void ColorAppearance::catmethodChanged() +{ + + if (catmethod->get_active_row_number() == 1) { + disableListener(); + jlight->resetValue (false); + qbright->resetValue (false); + chroma->resetValue (false); + schroma->resetValue (false); + mchroma->resetValue (false); + rstprotection->resetValue (false); + contrast->resetValue (false); + qcontrast->resetValue (false); + colorh->resetValue (false); + tempout->resetValue (false); + greenout->resetValue (false); + ybout->resetValue (false); + tempsc->resetValue (false); + greensc->resetValue (false); + badpixsl->resetValue (false); + illum->set_active (2); + toneCurveMode->set_active (0); + toneCurveMode2->set_active (0); + toneCurveMode3->set_active (0); + shape->reset(); + shape2->reset(); + shape3->reset(); + gamutconn.block (true); + gamut->set_active (true); + gamutconn.block (false); + degree->setAutoValue (true); + degree->resetValue (false); + degree->setValue(90); + adapscen->resetValue (false); + adapscen->setAutoValue (true); + degreeout->resetValue (false); + degreeout->setAutoValue (true); + ybscen->resetValue (false); + ybscen->setAutoValue (true); + surrsrc->set_active (0); + wbmodel->set_active (2); + tempsc->resetValue (false); + greensc->resetValue (false); + adapscen->setValue(400.); + ybscen->setValue(18); + surround->set_active (0); + adaplum->setValue(400.); + degreeout->setValue(90); + ybout->setValue(18); + tempout->setValue (nexttemp); + +/* if(tempout->getAutoValue()) { + tempout->resetValue (false); + } else { + tempout->setValue (nexttemp); + tempout->setAutoValue (true); + } +*/ + greenout->setValue (nextgreen); + enableListener(); + + } else if (catmethod->get_active_row_number() == 0) { + disableListener(); + degree->setAutoValue (true); + degree->resetValue (false); + adapscen->resetValue (false); + adapscen->setAutoValue (true); + degreeout->resetValue (false); + degreeout->setAutoValue (true); + ybscen->resetValue (false); + ybscen->setAutoValue (true); + surrsrc->set_active (0); + wbmodel->set_active (0); + illum->set_active (2); + tempsc->resetValue (false); + greensc->resetValue (false); + adapscen->resetValue (false); + ybscen->resetValue (false); + surround->set_active (0); + adaplum->resetValue (false); + degreeout->resetValue (false); + ybout->resetValue (false); + tempout->resetValue (false); + greenout->resetValue (false); + enableListener(); + } else if (catmethod->get_active_row_number() == 2) { + disableListener(); + degree->setAutoValue (true); + degree->resetValue (false); + adapscen->resetValue (false); + adapscen->setAutoValue (true); + degreeout->resetValue (false); + degreeout->setAutoValue (true); + ybscen->resetValue (false); + ybscen->setAutoValue (true); + surrsrc->set_active (0); + wbmodel->set_active (2); + illum->set_active (2); + tempsc->resetValue (false); + greensc->resetValue (false); + adapscen->resetValue (false); + ybscen->resetValue (false); + surround->set_active (0); + adaplum->resetValue (false); + degreeout->resetValue (false); + ybout->resetValue (false); + // tempout->resetValue (false); + tempout->setValue (nexttemp); + greenout->resetValue (false); + enableListener(); + } + + if (listener && (multiImage || getEnabled())) { + listener->panelChanged(EvCATcat, catmethod->get_active_text()); + } +} + void ColorAppearance::curveChanged (CurveEditor* ce) { @@ -1375,7 +1702,7 @@ void ColorAppearance::badpix_toggled () { } */ -void ColorAppearance::presetcat02pressed () +void ColorAppearance::presetcat02pressed () //keep in case of... { if (presetcat02->get_active ()) { disableListener(); @@ -1425,6 +1752,14 @@ void ColorAppearance::presetcat02pressed () degreeout->setValue(90); ybout->setValue(18); tempout->setValue (nexttemp); + +/* if(tempout->getAutoValue()) { + tempout->resetValue (false); + } else { + tempout->setValue (nexttemp); + tempout->setAutoValue (true); + } +*/ greenout->setValue (nextgreen); enableListener(); } else { @@ -1784,6 +2119,16 @@ void ColorAppearance::adjusterChanged(Adjuster* a, double newval) void ColorAppearance::adjusterAutoToggled(Adjuster* a) { + /* + if(presetcat02->get_active ()){ + if(tempout->getAutoValue()) { + tempout->resetValue (false); + } else { + tempout->setValue (nexttemp); + tempout->setAutoValue (true); + } + } +*/ if (multiImage) { if (degree->getAutoInconsistent()) { degree->setAutoInconsistent (false); @@ -1819,7 +2164,7 @@ void ColorAppearance::adjusterAutoToggled(Adjuster* a) ybscen->setAutoInconsistent (true); } - lastAutotempout = tempout->getAutoValue(); +/* lastAutotempout = tempout->getAutoValue(); if (tempout->getAutoInconsistent()) { tempout->setAutoInconsistent (false); @@ -1829,9 +2174,8 @@ void ColorAppearance::adjusterAutoToggled(Adjuster* a) } lastAutotempout = tempout->getAutoValue(); - +*/ } - if (listener && (multiImage || getEnabled()) ) { if (a == degree) { @@ -1874,7 +2218,7 @@ void ColorAppearance::adjusterAutoToggled(Adjuster* a) listener->panelChanged (EvCATAutoyb, M ("GENERAL_DISABLED")); } } - +/* if (a == tempout) { if (tempout->getAutoInconsistent()) { listener->panelChanged (EvCATAutotempout, M ("GENERAL_UNCHANGED")); @@ -1884,7 +2228,7 @@ void ColorAppearance::adjusterAutoToggled(Adjuster* a) listener->panelChanged (EvCATAutotempout, M ("GENERAL_DISABLED")); } } - +*/ } } void ColorAppearance::enabledChanged () @@ -1924,6 +2268,7 @@ void ColorAppearance::wbmodelChanged () { if (wbmodel->get_active_row_number() == 0 || wbmodel->get_active_row_number() == 1) { illum->hide(); + illumHBox->hide(); tempsc->hide(); greensc->hide(); tempsc->setValue (5003); @@ -1931,6 +2276,7 @@ void ColorAppearance::wbmodelChanged () } if (wbmodel->get_active_row_number() == 2) { + illumHBox->show(); tempsc->show(); greensc->show(); illum->show(); @@ -2081,6 +2427,9 @@ void ColorAppearance::setBatchMode (bool batchMode) tempsc->showEditedCB (); greensc->showEditedCB (); + complexmethod->append(M("GENERAL_UNCHANGED")); + modelmethod->append(M("GENERAL_UNCHANGED")); + catmethod->append(M("GENERAL_UNCHANGED")); surround->append (M ("GENERAL_UNCHANGED")); surrsrc->append (M ("GENERAL_UNCHANGED")); wbmodel->append (M ("GENERAL_UNCHANGED")); diff --git a/rtgui/colorappearance.h b/rtgui/colorappearance.h index c326b06f9..ce1971e85 100644 --- a/rtgui/colorappearance.h +++ b/rtgui/colorappearance.h @@ -77,6 +77,11 @@ public: void curveMode3Changed (); bool curveMode3Changed_ (); void neutral_pressed (); + void complexmethodChanged(); + void modelmethodChanged(); + void catmethodChanged(); + void convertParamToNormal(); + void updateGUIToMode(int mode); void expandCurve (bool isExpanded); bool isCurveExpanded (); @@ -104,6 +109,9 @@ private: rtengine::ProcEvent Evcatpreset; rtengine::ProcEvent EvCATAutotempout; rtengine::ProcEvent EvCATillum; + rtengine::ProcEvent EvCATcomplex; + rtengine::ProcEvent EvCATmodel; + rtengine::ProcEvent EvCATcat; bool bgTTipQuery (int x, int y, bool keyboard_tooltip, const Glib::RefPtr& tooltip); bool srTTipQuery (int x, int y, bool keyboard_tooltip, const Glib::RefPtr& tooltip); void foldAllButMe (GdkEventButton* event, MyExpander *expander); @@ -139,6 +147,9 @@ private: MyComboBoxText* toneCurveMode; MyComboBoxText* toneCurveMode2; MyComboBoxText* toneCurveMode3; + MyComboBoxText* complexmethod; + MyComboBoxText* modelmethod; + MyComboBoxText* catmethod; //Adjuster* edge; Gtk::CheckButton* surrsource; @@ -165,6 +176,10 @@ private: sigc::connection surrconn; sigc::connection gamutconn, datacieconn, tonecieconn /*,badpixconn , sharpcieconn*/; sigc::connection tcmodeconn, tcmode2conn, tcmode3conn, neutralconn; + sigc::connection complexmethodconn, modelmethodconn, catmethodconn; + Gtk::Box* alHBox; + Gtk::Box* wbmHBox; + Gtk::Box* illumHBox; CurveEditorGroup* curveEditorG; CurveEditorGroup* curveEditorG2; CurveEditorGroup* curveEditorG3; diff --git a/rtgui/coloredbar.h b/rtgui/coloredbar.h index 69cfa47d1..f5156129e 100644 --- a/rtgui/coloredbar.h +++ b/rtgui/coloredbar.h @@ -27,7 +27,7 @@ * * WARNING: If the color has no gradient defined or can't get colors from the provider, * the bar will have undefined data, and the calling class will have to draw - * the bar itself, i.e. use render_background (depending on its Gtk::Style) + * the bar itself, i.e. use render_background (depending on its Gtk::StyleContext) * */ class ColoredBar final : private BackBuffer, public ColorCaller diff --git a/rtgui/colortoning.cc b/rtgui/colortoning.cc index 77bc31638..51ca3a4bc 100644 --- a/rtgui/colortoning.cc +++ b/rtgui/colortoning.cc @@ -51,7 +51,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR method->set_active (0); method->set_tooltip_text (M("TP_COLORTONING_METHOD_TOOLTIP")); - ctbox = Gtk::manage (new Gtk::HBox ()); + ctbox = Gtk::manage (new Gtk::Box ()); Gtk::Label* lab = Gtk::manage (new Gtk::Label (M("TP_COLORTONING_METHOD"))); ctbox->pack_start (*lab, Gtk::PACK_SHRINK, 4); ctbox->pack_start (*method); @@ -61,7 +61,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR //----------- Color curve ------------------------------ - colorSep = Gtk::manage (new Gtk::HSeparator()); + colorSep = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); pack_start (*colorSep); colorCurveEditorG = new CurveEditorGroup (options.lastColorToningCurvesDir, M("TP_COLORTONING_COLOR")); @@ -202,18 +202,18 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR //----------- Saturation and strength ------------------------------ -// satLimiterSep = Gtk::manage (new Gtk::HSeparator()); +// satLimiterSep = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); // pack_start (*satLimiterSep, Gtk::PACK_SHRINK); // Gtk::Frame *p1Frame; // Vertical box container for the content of the Process 1 frame - Gtk::VBox *p1VBox; + Gtk::Box* p1VBox; p1Frame = Gtk::manage (new Gtk::Frame(M("TP_COLORTONING_SA")) ); p1Frame->set_label_align(0.025, 0.5); - p1VBox = Gtk::manage ( new Gtk::VBox()); + p1VBox = Gtk::manage ( new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); p1VBox->set_spacing(2); autosat = Gtk::manage (new Gtk::CheckButton (M("TP_COLORTONING_AUTOSAT"))); @@ -244,10 +244,10 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR // --------------------Sliders BW Colortoning ------------------- - chanMixerBox = Gtk::manage (new Gtk::VBox()); - Gtk::VBox *chanMixerHLBox = Gtk::manage (new Gtk::VBox()); - Gtk::VBox *chanMixerMidBox = Gtk::manage (new Gtk::VBox()); - Gtk::VBox *chanMixerShadowsBox = Gtk::manage (new Gtk::VBox()); + chanMixerBox = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + Gtk::Box* chanMixerHLBox = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + Gtk::Box* chanMixerMidBox = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + Gtk::Box* chanMixerShadowsBox = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); Gtk::Image* iblueR = Gtk::manage (new RTImage ("circle-blue-small.png")); Gtk::Image* iyelL = Gtk::manage (new RTImage ("circle-yellow-small.png")); @@ -296,6 +296,10 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR Gtk::Frame *chanMixerMidFrame = Gtk::manage (new Gtk::Frame(M("TP_COLORTONING_MIDTONES"))); Gtk::Frame *chanMixerShadowsFrame = Gtk::manage (new Gtk::Frame(M("TP_COLORTONING_SHADOWS"))); + chanMixerHLFrame->set_label_align (0.025, 0.5); + chanMixerMidFrame->set_label_align (0.025, 0.5); + chanMixerShadowsFrame->set_label_align (0.025, 0.5); + chanMixerHLFrame->add(*chanMixerHLBox); chanMixerMidFrame->add(*chanMixerMidBox); chanMixerShadowsFrame->add(*chanMixerShadowsBox); @@ -308,7 +312,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR pack_start( *strength, Gtk::PACK_SHRINK, 2); //I have moved after Chanmixer //--------------------- Reset sliders --------------------------- - neutrHBox = Gtk::manage (new Gtk::HBox ()); + neutrHBox = Gtk::manage (new Gtk::Box()); neutral = Gtk::manage (new Gtk::Button (M("TP_COLORTONING_NEUTRAL"))); neutral->set_tooltip_text (M("TP_COLORTONING_NEUTRAL_TIP")); @@ -342,7 +346,8 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR //------------------------------------------------------------------------ // LAB grid auto m = ProcEventMapper::getInstance(); - EvColorToningLabGridValue = m->newEvent(RGBCURVE, "HISTORY_MSG_COLORTONING_LABGRID_VALUE"); +// EvColorToningLabGridValue = m->newEvent(RGBCURVE, "HISTORY_MSG_COLORTONING_LABGRID_VALUE"); + EvColorToningLabGridValue = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_COLORTONING_LABGRID_VALUE"); labgrid = Gtk::manage(new LabGrid(EvColorToningLabGridValue, M("TP_COLORTONING_LABGRID_VALUES"))); pack_start(*labgrid, Gtk::PACK_EXPAND_WIDGET, 4); //------------------------------------------------------------------------ @@ -374,7 +379,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR EvLabRegionMaskBlur = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_COLORTONING_LABREGION_MASKBLUR"); EvLabRegionShowMask = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_COLORTONING_LABREGION_SHOWMASK"); EvLabRegionChannel = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_COLORTONING_LABREGION_CHANNEL"); - labRegionBox = Gtk::manage(new Gtk::VBox()); + labRegionBox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); labRegionList = Gtk::manage(new Gtk::ListViewText(3)); labRegionList->set_size_request(-1, 150); @@ -384,9 +389,9 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR labRegionList->set_column_title(2, M("TP_COLORTONING_LABREGION_MASK")); labRegionList->set_activate_on_single_click(true); labRegionSelectionConn = labRegionList->get_selection()->signal_changed().connect(sigc::mem_fun(this, &ColorToning::onLabRegionSelectionChanged)); - Gtk::HBox *hb = Gtk::manage(new Gtk::HBox()); + Gtk::Box *hb = Gtk::manage(new Gtk::Box()); hb->pack_start(*labRegionList, Gtk::PACK_EXPAND_WIDGET); - Gtk::VBox *vb = Gtk::manage(new Gtk::VBox()); + Gtk::Box* vb = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); labRegionAdd = Gtk::manage(new Gtk::Button()); labRegionAdd->add(*Gtk::manage(new RTImage("add-small.png"))); labRegionAdd->signal_clicked().connect(sigc::mem_fun(*this, &ColorToning::labRegionAddPressed)); @@ -429,7 +434,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR labRegionPower->setLogScale(4, 0.1); labRegionBox->pack_start(*labRegionPower); - hb = Gtk::manage(new Gtk::HBox()); + hb = Gtk::manage(new Gtk::Box()); labRegionChannel = Gtk::manage(new MyComboBoxText()); labRegionChannel->append(M("TP_COLORTONING_LABREGION_CHANNEL_ALL")); labRegionChannel->append(M("TP_COLORTONING_LABREGION_CHANNEL_R")); @@ -442,7 +447,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR hb->pack_start(*labRegionChannel); labRegionBox->pack_start(*hb); - labRegionBox->pack_start(*Gtk::manage(new Gtk::HSeparator())); + labRegionBox->pack_start(*Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL))); CurveEditorGroup *labRegionEditorG = Gtk::manage(new CurveEditorGroup(options.lastColorToningCurvesDir, M("TP_COLORTONING_LABREGION_MASK"))); labRegionEditorG->setCurveListener(this); diff --git a/rtgui/colortoning.h b/rtgui/colortoning.h index f1024f41c..be3a83c2d 100644 --- a/rtgui/colortoning.h +++ b/rtgui/colortoning.h @@ -79,8 +79,8 @@ private: void labRegionShow(int idx, bool list_only=false); void labRegionGet(int idx); - //Gtk::HSeparator* satLimiterSep; - Gtk::HSeparator* colorSep; + //Gtk::Separator* satLimiterSep; + Gtk::Separator* colorSep; CurveEditorGroup* colorCurveEditorG; CurveEditorGroup* opacityCurveEditorG; CurveEditorGroup* clCurveEditorG; @@ -89,10 +89,10 @@ private: FlatCurveEditor* colorShape; DiagonalCurveEditor* clshape; DiagonalCurveEditor* cl2shape; - Gtk::HBox* ctbox; + Gtk::Box* ctbox; Gtk::Frame *p1Frame; - Gtk::VBox* chanMixerBox; + Gtk::Box* chanMixerBox; MyComboBoxText* method; sigc::connection methodconn; MyComboBoxText* twocolor; @@ -116,7 +116,7 @@ private: Gtk::Image* irg; Gtk::Button* neutral; - Gtk::HBox* neutrHBox; + Gtk::Box* neutrHBox; int nextbw; int nextsatth; int nextsatpr; @@ -147,7 +147,7 @@ private: rtengine::ProcEvent EvLabRegionShowMask; rtengine::ProcEvent EvLabRegionChannel; - Gtk::VBox *labRegionBox; + Gtk::Box* labRegionBox; Gtk::ListViewText *labRegionList; Gtk::Button *labRegionAdd; Gtk::Button *labRegionRemove; diff --git a/rtgui/controlspotpanel.cc b/rtgui/controlspotpanel.cc index 8a08c1d64..f16ae2cf4 100644 --- a/rtgui/controlspotpanel.cc +++ b/rtgui/controlspotpanel.cc @@ -76,12 +76,14 @@ ControlSpotPanel::ControlSpotPanel(): balanh_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALANH"), 0.2, 2.5, 0.1, 1.0, Gtk::manage(new RTImage("rawtherapee-logo-16.png")), Gtk::manage(new RTImage("circle-red-green-small.png"))))), colorde_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_COLORDE"), -15, 15, 2, 5, Gtk::manage(new RTImage("circle-blue-yellow-small.png")), Gtk::manage(new RTImage("circle-gray-green-small.png"))))), colorscope_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_COLORSCOPE"), 0., 100.0, 1., 30.))), + avoidrad_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_AVOIDRAD"), 0., 30.0, 0.1, 0.7))), scopemask_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SCOPEMASK"), 0, 100, 1, 60))), lumask_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LUMASK"), -50, 30, 1, 10, Gtk::manage(new RTImage("circle-yellow-small.png")), Gtk::manage(new RTImage("circle-gray-small.png")) ))), hishow_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_PREVSHOW")))), activ_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ACTIVSPOT")))), avoid_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_AVOID")))), + avoidmun_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_AVOIDMUN")))), blwh_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_BLWH")))), recurs_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_RECURS")))), laplac_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_LAPLACC")))), @@ -95,8 +97,8 @@ ControlSpotPanel::ControlSpotPanel(): expMaskMerge_(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_MASFRAME")))), preview_(Gtk::manage(new Gtk::ToggleButton(M("TP_LOCALLAB_PREVIEW")))), - ctboxshape(Gtk::manage(new Gtk::HBox())), - ctboxshapemethod(Gtk::manage(new Gtk::HBox())), + ctboxshape(Gtk::manage(new Gtk::Box())), + ctboxshapemethod(Gtk::manage(new Gtk::Box())), controlPanelListener(nullptr), lastObject_(-1), @@ -111,7 +113,7 @@ ControlSpotPanel::ControlSpotPanel(): const bool showtooltip = options.showtooltip; pack_start(*hishow_); - Gtk::HBox* const ctboxprevmethod = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const ctboxprevmethod = Gtk::manage(new Gtk::Box()); prevMethod_->append(M("TP_LOCALLAB_PREVHIDE")); prevMethod_->append(M("TP_LOCALLAB_PREVSHOW")); prevMethod_->set_active(0); @@ -123,7 +125,9 @@ ControlSpotPanel::ControlSpotPanel(): pack_start(*ctboxprevmethod); - Gtk::HBox* const hbox1_ = Gtk::manage(new Gtk::HBox(true, 4)); + Gtk::Box* const hbox1_ = Gtk::manage(new Gtk::Box()); + hbox1_->set_spacing(4); + hbox1_->set_homogeneous(true); buttonaddconn_ = button_add_->signal_clicked().connect( sigc::mem_fun(*this, &ControlSpotPanel::on_button_add)); buttondeleteconn_ = button_delete_->signal_clicked().connect( @@ -136,7 +140,9 @@ ControlSpotPanel::ControlSpotPanel(): hbox1_->pack_start(*button_duplicate_); pack_start(*hbox1_); - Gtk::HBox* const hbox2_ = Gtk::manage(new Gtk::HBox(true, 4)); + Gtk::Box* const hbox2_ = Gtk::manage(new Gtk::Box()); + hbox2_->set_spacing(4); + hbox2_->set_homogeneous(true); buttonrenameconn_ = button_rename_->signal_clicked().connect( sigc::mem_fun(*this, &ControlSpotPanel::on_button_rename)); buttonvisibilityconn_ = button_visibility_->signal_button_release_event().connect( @@ -194,11 +200,10 @@ ControlSpotPanel::ControlSpotPanel(): scrolledwindow_->set_min_content_height(150); pack_start(*scrolledwindow_); - Gtk::HBox* const ctboxactivmethod = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const ctboxactivmethod = Gtk::manage(new Gtk::Box()); ctboxactivmethod->pack_start(*activ_); pack_start(*ctboxactivmethod); -// Gtk::HBox* const ctboxshape = Gtk::manage(new Gtk::HBox()); Gtk::Label* const labelshape = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_SHAPETYPE") + ":")); ctboxshape->pack_start(*labelshape, Gtk::PACK_SHRINK, 4); shape_->append(M("TP_LOCALLAB_ELI")); @@ -213,7 +218,7 @@ ControlSpotPanel::ControlSpotPanel(): shape_->set_tooltip_text(M("TP_LOCALLAB_SHAPE_TOOLTIP")); } - Gtk::HBox* const ctboxspotmethod = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const ctboxspotmethod = Gtk::manage(new Gtk::Box()); Gtk::Label* const labelspotmethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_EXCLUTYPE") + ":")); ctboxspotmethod->pack_start(*labelspotmethod, Gtk::PACK_SHRINK, 4); @@ -223,6 +228,7 @@ ControlSpotPanel::ControlSpotPanel(): spotMethod_->append(M("TP_LOCALLAB_EXNORM")); spotMethod_->append(M("TP_LOCALLAB_EXECLU")); + spotMethod_->append(M("TP_LOCALLAB_EXFULL")); spotMethod_->set_active(0); spotMethodconn_ = spotMethod_->signal_changed().connect( sigc::mem_fun( @@ -253,7 +259,6 @@ ControlSpotPanel::ControlSpotPanel(): pack_start(*excluFrame); -// Gtk::HBox* const ctboxshapemethod = Gtk::manage(new Gtk::HBox()); Gtk::Label* const labelshapemethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_STYPE") + ":")); ctboxshapemethod->pack_start(*labelshapemethod, Gtk::PACK_SHRINK, 4); @@ -297,7 +302,7 @@ ControlSpotPanel::ControlSpotPanel(): circrad_->set_tooltip_text(M("TP_LOCALLAB_CIRCRAD_TOOLTIP")); } - Gtk::HBox* const ctboxqualitymethod = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const ctboxqualitymethod = Gtk::manage(new Gtk::Box()); Gtk::Label* const labelqualitymethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_QUAL_METHOD") + ":")); ctboxqualitymethod->pack_start(*labelqualitymethod, Gtk::PACK_SHRINK, 4); @@ -351,6 +356,7 @@ ControlSpotPanel::ControlSpotPanel(): balanh_->setAdjusterListener(this); colorde_->setAdjusterListener(this); colorscope_->setAdjusterListener(this); + avoidrad_->setAdjusterListener(this); preview_->set_active(false); previewConn_ = preview_->signal_clicked().connect( @@ -390,7 +396,17 @@ ControlSpotPanel::ControlSpotPanel(): avoidConn_ = avoid_->signal_toggled().connect( sigc::mem_fun(*this, &ControlSpotPanel::avoidChanged)); - specCaseBox->pack_start(*avoid_); + avoidmunConn_ = avoidmun_->signal_toggled().connect( + sigc::mem_fun(*this, &ControlSpotPanel::avoidmunChanged)); + + Gtk::Frame* const avFrame = Gtk::manage(new Gtk::Frame()); + ToolParamBlock* const avbox = Gtk::manage(new ToolParamBlock()); + avFrame->set_label_align(0.025, 0.5); + avFrame->set_label_widget(*avoid_); + avbox->pack_start(*avoidrad_); + avbox->pack_start(*avoidmun_); + avFrame->add(*avbox); + specCaseBox->pack_start(*avFrame); blwhConn_ = blwh_->signal_toggled().connect( sigc::mem_fun(*this, &ControlSpotPanel::blwhChanged)); @@ -412,7 +428,7 @@ ControlSpotPanel::ControlSpotPanel(): specCaseBox->pack_start(*recurs_); specCaseBox->pack_start(*ctboxshapemethod); - Gtk::HBox* const ctboxwavmethod = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const ctboxwavmethod = Gtk::manage(new Gtk::Box()); Gtk::Label* const labelwavmethod = Gtk::manage(new Gtk::Label(M("TP_WAVELET_DAUBLOCAL") + ":")); ctboxwavmethod->pack_start(*labelwavmethod, Gtk::PACK_SHRINK, 4); @@ -471,10 +487,10 @@ ControlSpotPanel::ControlSpotPanel(): expMaskMerge_->add(*maskBox, false); pack_start(*expMaskMerge_, false, false); - Gtk::HSeparator *separatormet = Gtk::manage(new Gtk::HSeparator()); + Gtk::Separator *separatormet = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); pack_start(*separatormet, Gtk::PACK_SHRINK, 2); - Gtk::HBox* const ctboxcomplexmethod = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const ctboxcomplexmethod = Gtk::manage(new Gtk::Box()); if (showtooltip) { ctboxcomplexmethod->set_tooltip_markup(M("TP_LOCALLAB_COMPLEXMETHOD_TOOLTIP")); @@ -497,7 +513,7 @@ ControlSpotPanel::ControlSpotPanel(): ctboxcomplexmethod->pack_start(*complexMethod_); // pack_start(*ctboxcomplexmethod); /* - Gtk::HBox* const ctboxwavmethod = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const ctboxwavmethod = Gtk::manage(new Gtk::Box()); Gtk::Label* const labelwavmethod = Gtk::manage(new Gtk::Label(M("TP_WAVELET_DAUBLOCAL") + ":")); ctboxwavmethod->pack_start(*labelwavmethod, Gtk::PACK_SHRINK, 4); @@ -824,9 +840,11 @@ void ControlSpotPanel::load_ControlSpot_param() balanh_->setValue((double)row[spots_.balanh]); colorde_->setValue((double)row[spots_.colorde]); colorscope_->setValue((double)row[spots_.colorscope]); + avoidrad_->setValue((double)row[spots_.avoidrad]); hishow_->set_active(row[spots_.hishow]); activ_->set_active(row[spots_.activ]); avoid_->set_active(row[spots_.avoid]); + avoidmun_->set_active(row[spots_.avoidmun]); blwh_->set_active(row[spots_.blwh]); recurs_->set_active(row[spots_.recurs]); // laplac_->set_active(row[spots_.laplac]); @@ -942,7 +960,6 @@ void ControlSpotPanel::prevMethodChanged() void ControlSpotPanel::spotMethodChanged() { - // printf("spotMethodChanged\n"); // Get selected control spot const auto s = treeview_->get_selection(); @@ -954,6 +971,7 @@ void ControlSpotPanel::spotMethodChanged() const auto iter = s->get_selected(); Gtk::TreeModel::Row row = *iter; + const int oldSpotMethod = row[spots_.spotMethod]; row[spots_.spotMethod] = spotMethod_->get_active_row_number(); // Update Control Spot GUI according to spotMethod_ combobox state (to be compliant with updateParamVisibility function) @@ -961,8 +979,62 @@ void ControlSpotPanel::spotMethodChanged() excluFrame->show(); } else if (spotMethod_->get_active_row_number() == 0) { // Normal case excluFrame->hide(); - } else { // Excluding case + + // Reset spot shape only if previous spotMethod is Full image + if (oldSpotMethod == 2) { + disableParamlistener(true); + locX_->setValue(150.); + row[spots_.locX] = locX_->getIntValue(); + locXL_->setValue(150.); + row[spots_.locXL] = locXL_->getIntValue(); + locY_->setValue(150.); + row[spots_.locY] = locY_->getIntValue(); + locYT_->setValue(150.); + row[spots_.locYT] = locYT_->getIntValue(); + shape_->set_active(0); + row[spots_.shape] = shape_->get_active_row_number(); + transit_->setValue(60.); + row[spots_.transit] = transit_->getValue(); + disableParamlistener(false); + updateControlSpotCurve(row); + } + } else if (spotMethod_->get_active_row_number() == 1) { // Excluding case excluFrame->show(); + + // Reset spot shape only if previous spotMethod is Full image + if (oldSpotMethod == 2) { + disableParamlistener(true); + locX_->setValue(150.); + row[spots_.locX] = locX_->getIntValue(); + locXL_->setValue(150.); + row[spots_.locXL] = locXL_->getIntValue(); + locY_->setValue(150.); + row[spots_.locY] = locY_->getIntValue(); + locYT_->setValue(150.); + row[spots_.locYT] = locYT_->getIntValue(); + shape_->set_active(0); + row[spots_.shape] = shape_->get_active_row_number(); + transit_->setValue(60.); + row[spots_.transit] = transit_->getValue(); + disableParamlistener(false); + updateControlSpotCurve(row); + } + } else if (spotMethod_->get_active_row_number() == 2) { // Full image case + excluFrame->hide(); + shape_->set_active(0); + + locX_->setValue(3000.); + row[spots_.locX] = locX_->getIntValue(); + locXL_->setValue(3000.); + row[spots_.locXL] = locXL_->getIntValue(); + locY_->setValue(3000.); + row[spots_.locY] = locY_->getIntValue(); + locYT_->setValue(3000.); + row[spots_.locYT] = locYT_->getIntValue(); + shape_->set_active(1); + row[spots_.shape] = shape_->get_active_row_number(); + transit_->setValue(100.); + row[spots_.transit] = transit_->getValue(); } // Raise event @@ -1181,8 +1253,10 @@ void ControlSpotPanel::updateParamVisibility() excluFrame->show(); } else if (spotMethod_->get_active_row_number() == 0) { // Normal case excluFrame->hide(); - } else { // Excluding case + } else if (spotMethod_->get_active_row_number() == 1) { // Excluding case excluFrame->show(); + } else if (spotMethod_->get_active_row_number() == 2) {//full image + excluFrame->hide(); } /* @@ -1423,6 +1497,14 @@ void ControlSpotPanel::adjusterChanged(Adjuster* a, double newval) } } + if (a == avoidrad_) { + row[spots_.avoidrad] = avoidrad_->getValue(); + + if (listener) { + listener->panelChanged(EvLocallabSpotavoidrad, avoidrad_->getTextValue()); + } + } + if (a == scopemask_) { row[spots_.scopemask] = scopemask_->getIntValue(); @@ -1512,6 +1594,31 @@ void ControlSpotPanel::avoidChanged() } } +void ControlSpotPanel::avoidmunChanged() +{ + // printf("avoidmunChanged\n"); + + // Get selected control spot + const auto s = treeview_->get_selection(); + + if (!s->count_selected_rows()) { + return; + } + + const auto iter = s->get_selected(); + Gtk::TreeModel::Row row = *iter; + row[spots_.avoidmun] = avoidmun_->get_active(); + + // Raise event + if (listener) { + if (avoidmun_->get_active()) { + listener->panelChanged(EvLocallabSpotavoidmun, M("GENERAL_ENABLED")); + } else { + listener->panelChanged(EvLocallabSpotavoidmun, M("GENERAL_DISABLED")); + } + } +} + void ControlSpotPanel::activChanged() { // printf("activChanged\n"); @@ -1729,9 +1836,11 @@ void ControlSpotPanel::disableParamlistener(bool cond) balanh_->block(cond); colorde_->block(cond); colorscope_->block(cond); + avoidrad_->block(cond); hishowconn_.block(cond); activConn_.block(cond); avoidConn_.block(cond); + avoidmunConn_.block(cond); blwhConn_.block(cond); recursConn_.block(cond); laplacConn_.block(cond); @@ -1773,9 +1882,11 @@ void ControlSpotPanel::setParamEditable(bool cond) balanh_->set_sensitive(cond); colorde_->set_sensitive(cond); colorscope_->set_sensitive(cond); + avoidrad_->set_sensitive(cond); hishow_->set_sensitive(cond); activ_->set_sensitive(cond); avoid_->set_sensitive(cond); + avoidmun_->set_sensitive(cond); blwh_->set_sensitive(cond); recurs_->set_sensitive(cond); laplac_->set_sensitive(cond); @@ -2451,6 +2562,7 @@ ControlSpotPanel::SpotRow* ControlSpotPanel::getSpot(const int index) r->balanh = row[spots_.balanh]; r->colorde = row[spots_.colorde]; r->colorscope = row[spots_.colorscope]; + r->avoidrad = row[spots_.avoidrad]; r->transitweak = row[spots_.transitweak]; r->transitgrad = row[spots_.transitgrad]; r->scopemask = row[spots_.scopemask]; @@ -2458,6 +2570,7 @@ ControlSpotPanel::SpotRow* ControlSpotPanel::getSpot(const int index) r->hishow = row[spots_.hishow]; r->activ = row[spots_.activ]; r->avoid = row[spots_.avoid]; + r->avoidmun = row[spots_.avoidmun]; r->blwh = row[spots_.blwh]; r->recurs = row[spots_.recurs]; r->laplac = row[spots_.laplac]; @@ -2586,9 +2699,11 @@ void ControlSpotPanel::addControlSpot(SpotRow* newSpot) row[spots_.balanh] = newSpot->balanh; row[spots_.colorde] = newSpot->colorde; row[spots_.colorscope] = newSpot->colorscope; + row[spots_.avoidrad] = newSpot->avoidrad; row[spots_.hishow] = newSpot->hishow; row[spots_.activ] = newSpot->activ; row[spots_.avoid] = newSpot->avoid; + row[spots_.avoidmun] = newSpot->avoidmun; row[spots_.blwh] = newSpot->blwh; row[spots_.recurs] = newSpot->recurs; row[spots_.laplac] = newSpot->laplac; @@ -2659,6 +2774,7 @@ void ControlSpotPanel::setDefaults(const rtengine::procparams::ProcParams * defP balanh_->setDefault(defSpot.balanh); colorde_->setDefault(defSpot.colorde); colorscope_->setDefault(defSpot.colorscope); + avoidrad_->setDefault(defSpot.avoidrad); scopemask_->setDefault((double)defSpot.scopemask); lumask_->setDefault((double)defSpot.lumask); } @@ -2701,9 +2817,11 @@ ControlSpotPanel::ControlSpots::ControlSpots() add(balanh); add(colorde); add(colorscope); + add(avoidrad); add(hishow); add(activ); add(avoid); + add(avoidmun); add(blwh); add(recurs); add(laplac); @@ -2726,7 +2844,7 @@ ControlSpotPanel::RenameDialog::RenameDialog(const Glib::ustring &actualname, Gt newname_(Gtk::manage(new Gtk::Entry())) { // Entry widget - Gtk::HBox* const hb = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const hb = Gtk::manage(new Gtk::Box()); hb->pack_start(*Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_REN_DIALOG_LAB"))), false, false, 4); newname_->set_text(actualname); hb->pack_start(*newname_); diff --git a/rtgui/controlspotpanel.h b/rtgui/controlspotpanel.h index f8ef41dc0..2f92b9a77 100644 --- a/rtgui/controlspotpanel.h +++ b/rtgui/controlspotpanel.h @@ -75,9 +75,11 @@ public: double balanh; double colorde; double colorscope; + double avoidrad; bool hishow; bool activ; bool avoid; + bool avoidmun; bool blwh; bool recurs; bool laplac; @@ -249,6 +251,7 @@ private: void hishowChanged(); void activChanged(); void avoidChanged(); + void avoidmunChanged(); void blwhChanged(); void recursChanged(); void laplacChanged(); @@ -307,9 +310,11 @@ private: Gtk::TreeModelColumn balanh; Gtk::TreeModelColumn colorde; Gtk::TreeModelColumn colorscope; + Gtk::TreeModelColumn avoidrad; Gtk::TreeModelColumn hishow; Gtk::TreeModelColumn activ; Gtk::TreeModelColumn avoid; + Gtk::TreeModelColumn avoidmun; Gtk::TreeModelColumn blwh; Gtk::TreeModelColumn recurs; Gtk::TreeModelColumn laplac; @@ -394,6 +399,7 @@ private: Adjuster* const balanh_; Adjuster* const colorde_; Adjuster* const colorscope_; + Adjuster* const avoidrad_; Adjuster* const scopemask_; Adjuster* const lumask_; @@ -403,6 +409,8 @@ private: sigc::connection activConn_; Gtk::CheckButton* const avoid_; sigc::connection avoidConn_; + Gtk::CheckButton* const avoidmun_; + sigc::connection avoidmunConn_; Gtk::CheckButton* const blwh_; sigc::connection blwhConn_; Gtk::CheckButton* const recurs_; @@ -424,8 +432,8 @@ private: Gtk::ToggleButton* const preview_; sigc::connection previewConn_; - Gtk::HBox* const ctboxshape; - Gtk::HBox* const ctboxshapemethod; + Gtk::Box* const ctboxshape; + Gtk::Box* const ctboxshapemethod; // Internal variables ControlPanelListener* controlPanelListener; diff --git a/rtgui/crop.cc b/rtgui/crop.cc index 961f1908b..ea8906535 100644 --- a/rtgui/crop.cc +++ b/rtgui/crop.cc @@ -192,7 +192,7 @@ Crop::Crop(): methodgrid->attach (*resetCrop, 2, 2, 2, 1); pack_start (*methodgrid, Gtk::PACK_EXPAND_WIDGET, 0 ); - Gtk::HSeparator* methodseparator = Gtk::manage (new Gtk::HSeparator()); + Gtk::Separator* methodseparator = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); methodseparator->get_style_context()->add_class("grid-row-separator"); pack_start (*methodseparator, Gtk::PACK_SHRINK, 0); @@ -242,7 +242,7 @@ Crop::Crop(): ppigrid->set_column_homogeneous (true); setExpandAlignProperties(ppigrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - Gtk::HSeparator* ppiseparator = Gtk::manage (new Gtk::HSeparator()); + Gtk::Separator* ppiseparator = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); ppiseparator->get_style_context()->add_class("grid-row-separator"); Gtk::Grid* ppisubgrid = Gtk::manage(new Gtk::Grid()); diff --git a/rtgui/curveeditorgroup.cc b/rtgui/curveeditorgroup.cc index 5c120f7e4..d099e1a99 100644 --- a/rtgui/curveeditorgroup.cc +++ b/rtgui/curveeditorgroup.cc @@ -29,12 +29,17 @@ #include "options.h" #include "pathutils.h" -CurveEditorGroup::CurveEditorGroup (Glib::ustring& curveDir, Glib::ustring groupLabel) : curveDir(curveDir), line(0), curve_reset(nullptr), +CurveEditorGroup::CurveEditorGroup (Glib::ustring& curveDir, Glib::ustring groupLabel, int blank) : curveDir(curveDir), line(0), curve_reset(nullptr), displayedCurve(nullptr), flatSubGroup(nullptr), diagonalSubGroup(nullptr), cl(nullptr), numberOfPackedCurve(0) { // We set the label to the one provided as parameter, even if it's an empty string - curveGroupLabel = Gtk::manage (new Gtk::Label (groupLabel + ":", Gtk::ALIGN_START)); + if(blank == 0) { + curveGroupLabel = Gtk::manage (new Gtk::Label (groupLabel + ":", Gtk::ALIGN_START)); + } else if(blank == 1){ + curveGroupLabel = Gtk::manage (new Gtk::Label (groupLabel, Gtk::ALIGN_START)); + } + setExpandAlignProperties(curveGroupLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); set_row_spacing(RTScalable::getScale()); } diff --git a/rtgui/curveeditorgroup.h b/rtgui/curveeditorgroup.h index 0f7c01a32..55d438b2d 100644 --- a/rtgui/curveeditorgroup.h +++ b/rtgui/curveeditorgroup.h @@ -71,7 +71,7 @@ public: * dialogs. */ - explicit CurveEditorGroup(Glib::ustring& curveDir, Glib::ustring groupLabel = ""); + explicit CurveEditorGroup(Glib::ustring& curveDir, Glib::ustring groupLabel = "", int blank = 0); ~CurveEditorGroup() override; void newLine(); void curveListComplete(); diff --git a/rtgui/darkframe.cc b/rtgui/darkframe.cc index 74ef1384a..b6b1201a7 100644 --- a/rtgui/darkframe.cc +++ b/rtgui/darkframe.cc @@ -32,7 +32,7 @@ using namespace rtengine::procparams; DarkFrame::DarkFrame () : FoldableToolPanel(this, "darkframe", M("TP_DARKFRAME_LABEL")), dfChanged(false), lastDFauto(false), dfp(nullptr), israw(true) { - hbdf = Gtk::manage(new Gtk::HBox()); + hbdf = Gtk::manage(new Gtk::Box()); hbdf->set_spacing(4); darkFrameFile = Gtk::manage(new MyFileChooserButton(M("TP_DARKFRAME_LABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN)); bindCurrentFolder (*darkFrameFile, options.lastDarkframeDir); diff --git a/rtgui/darkframe.h b/rtgui/darkframe.h index 30696e3db..58e8b4842 100644 --- a/rtgui/darkframe.h +++ b/rtgui/darkframe.h @@ -49,7 +49,7 @@ class DarkFrame final: protected: MyFileChooserButton *darkFrameFile; - Gtk::HBox *hbdf; + Gtk::Box *hbdf; Gtk::Button *btnReset; Gtk::Label *dfLabel; Gtk::Label *dfInfo; diff --git a/rtgui/dehaze.cc b/rtgui/dehaze.cc index 6b7fcd64f..76d309afc 100644 --- a/rtgui/dehaze.cc +++ b/rtgui/dehaze.cc @@ -36,7 +36,7 @@ Dehaze::Dehaze(): FoldableToolPanel(this, "dehaze", M("TP_DEHAZE_LABEL"), false, EvDehazeStrength = m->newEvent(HDR, "HISTORY_MSG_DEHAZE_STRENGTH"); EvDehazeShowDepthMap = m->newEvent(HDR, "HISTORY_MSG_DEHAZE_SHOW_DEPTH_MAP"); EvDehazeDepth = m->newEvent(HDR, "HISTORY_MSG_DEHAZE_DEPTH"); - EvDehazeLuminance = m->newEvent(HDR, "HISTORY_MSG_DEHAZE_LUMINANCE"); + EvDehazeSaturation = m->newEvent(HDR, "HISTORY_MSG_DEHAZE_SATURATION"); strength = Gtk::manage(new Adjuster(M("TP_DEHAZE_STRENGTH"), 0., 100., 1., 50.)); strength->setAdjusterListener(this); @@ -46,9 +46,9 @@ Dehaze::Dehaze(): FoldableToolPanel(this, "dehaze", M("TP_DEHAZE_LABEL"), false, depth->setAdjusterListener(this); depth->show(); - luminance = Gtk::manage(new Gtk::CheckButton(M("TP_DEHAZE_LUMINANCE"))); - luminance->signal_toggled().connect(sigc::mem_fun(*this, &Dehaze::luminanceChanged)); - luminance->show(); + saturation = Gtk::manage(new Adjuster(M("TP_DEHAZE_SATURATION"), 0., 100., 1., 50.)); + saturation->setAdjusterListener(this); + saturation->show(); showDepthMap = Gtk::manage(new Gtk::CheckButton(M("TP_DEHAZE_SHOW_DEPTH_MAP"))); showDepthMap->signal_toggled().connect(sigc::mem_fun(*this, &Dehaze::showDepthMapChanged)); @@ -56,65 +56,65 @@ Dehaze::Dehaze(): FoldableToolPanel(this, "dehaze", M("TP_DEHAZE_LABEL"), false, pack_start(*strength); pack_start(*depth); - pack_start(*luminance); + pack_start(*saturation); pack_start(*showDepthMap); } - void Dehaze::read(const ProcParams *pp, const ParamsEdited *pedited) { disableListener(); if (pedited) { strength->setEditedState(pedited->dehaze.strength ? Edited : UnEdited); + saturation->setEditedState(pedited->dehaze.saturation ? Edited : UnEdited); depth->setEditedState(pedited->dehaze.depth ? Edited : UnEdited); set_inconsistent(multiImage && !pedited->dehaze.enabled); showDepthMap->set_inconsistent(!pedited->dehaze.showDepthMap); - luminance->set_inconsistent(!pedited->dehaze.luminance); } setEnabled(pp->dehaze.enabled); strength->setValue(pp->dehaze.strength); + saturation->setValue(pp->dehaze.saturation); depth->setValue(pp->dehaze.depth); showDepthMap->set_active(pp->dehaze.showDepthMap); - luminance->set_active(pp->dehaze.luminance); enableListener(); } - void Dehaze::write(ProcParams *pp, ParamsEdited *pedited) { pp->dehaze.strength = strength->getValue(); + pp->dehaze.saturation = saturation->getValue(); pp->dehaze.depth = depth->getValue(); pp->dehaze.enabled = getEnabled(); pp->dehaze.showDepthMap = showDepthMap->get_active(); - pp->dehaze.luminance = luminance->get_active(); if (pedited) { pedited->dehaze.strength = strength->getEditedState(); + pedited->dehaze.saturation = saturation->getEditedState(); pedited->dehaze.depth = depth->getEditedState(); pedited->dehaze.enabled = !get_inconsistent(); pedited->dehaze.showDepthMap = !showDepthMap->get_inconsistent(); - pedited->dehaze.luminance = !luminance->get_inconsistent(); } } void Dehaze::setDefaults(const ProcParams *defParams, const ParamsEdited *pedited) { strength->setDefault(defParams->dehaze.strength); + saturation->setDefault(defParams->dehaze.saturation); depth->setDefault(defParams->dehaze.depth); if (pedited) { + saturation->setDefaultEditedState(pedited->dehaze.saturation ? Edited : UnEdited); strength->setDefaultEditedState(pedited->dehaze.strength ? Edited : UnEdited); depth->setDefaultEditedState(pedited->dehaze.depth ? Edited : UnEdited); } else { + saturation->setDefaultEditedState(Irrelevant); strength->setDefaultEditedState(Irrelevant); depth->setDefaultEditedState(Irrelevant); } } - void Dehaze::adjusterChanged(Adjuster* a, double newval) { if (listener && getEnabled()) { @@ -122,11 +122,12 @@ void Dehaze::adjusterChanged(Adjuster* a, double newval) listener->panelChanged(EvDehazeStrength, a->getTextValue()); } else if (a == depth) { listener->panelChanged(EvDehazeDepth, a->getTextValue()); + } else if (a == saturation) { + listener->panelChanged(EvDehazeSaturation, a->getTextValue()); } } } - void Dehaze::enabledChanged () { if (listener) { @@ -140,7 +141,6 @@ void Dehaze::enabledChanged () } } - void Dehaze::showDepthMapChanged() { if (listener) { @@ -148,13 +148,6 @@ void Dehaze::showDepthMapChanged() } } -void Dehaze::luminanceChanged() -{ - if (listener) { - listener->panelChanged(EvDehazeLuminance, luminance->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED")); - } -} - void Dehaze::setBatchMode(bool batchMode) { ToolPanel::setBatchMode(batchMode); @@ -163,9 +156,7 @@ void Dehaze::setBatchMode(bool batchMode) depth->showEditedCB(); } - void Dehaze::setAdjusterBehavior(bool strengthAdd) { strength->setAddMode(strengthAdd); } - diff --git a/rtgui/dehaze.h b/rtgui/dehaze.h index 79d2e015c..155efa522 100644 --- a/rtgui/dehaze.h +++ b/rtgui/dehaze.h @@ -28,14 +28,15 @@ class Dehaze final : public ToolParamBlock, public AdjusterListener, public Fold private: Adjuster *strength; Adjuster *depth; + Adjuster *saturation; Gtk::CheckButton *showDepthMap; - Gtk::CheckButton *luminance; +// Gtk::CheckButton *luminance; rtengine::ProcEvent EvDehazeEnabled; rtengine::ProcEvent EvDehazeStrength; rtengine::ProcEvent EvDehazeDepth; rtengine::ProcEvent EvDehazeShowDepthMap; - rtengine::ProcEvent EvDehazeLuminance; + rtengine::ProcEvent EvDehazeSaturation; public: @@ -49,7 +50,7 @@ public: void adjusterChanged(Adjuster *a, double newval) override; void enabledChanged() override; void showDepthMapChanged(); - void luminanceChanged(); +// void luminanceChanged(); void setAdjusterBehavior(bool strengthAdd); }; diff --git a/rtgui/delayed.h b/rtgui/delayed.h index b57d7300b..80d91a3be 100644 --- a/rtgui/delayed.h +++ b/rtgui/delayed.h @@ -80,7 +80,7 @@ public: { } - DelayedCall(unsigned int _min_delay_ms, unsigned int _max_delay_ms = 0) : + explicit DelayedCall(unsigned int _min_delay_ms, unsigned int _max_delay_ms = 0) : DelayedCall({}, _min_delay_ms, _max_delay_ms) { } @@ -152,7 +152,7 @@ class DelayedConnection final : public rtengine::NonCopyable { public: - DelayedConnection(unsigned int _min_delay_ms, unsigned int _max_delay_ms = 0) : + explicit DelayedConnection(unsigned int _min_delay_ms, unsigned int _max_delay_ms = 0) : min_delay_ms(_min_delay_ms), max_delay_ms(_max_delay_ms) { diff --git a/rtgui/dirbrowser.cc b/rtgui/dirbrowser.cc index 10ef61566..2be1e3f3a 100644 --- a/rtgui/dirbrowser.cc +++ b/rtgui/dirbrowser.cc @@ -91,7 +91,7 @@ DirBrowser::DirBrowser () : dirTreeModel(), , volumes(0) #endif { - + set_orientation(Gtk::ORIENTATION_VERTICAL); dirtree = Gtk::manage ( new Gtk::TreeView() ); scrolledwindow4 = Gtk::manage ( new Gtk::ScrolledWindow() ); crt.property_ellipsize() = Pango::ELLIPSIZE_END; diff --git a/rtgui/dirbrowser.h b/rtgui/dirbrowser.h index 6ead83919..0254d6eb5 100644 --- a/rtgui/dirbrowser.h +++ b/rtgui/dirbrowser.h @@ -23,7 +23,7 @@ #include "guiutils.h" -class DirBrowser : public Gtk::VBox +class DirBrowser : public Gtk::Box { public: typedef sigc::signal DirSelectionSignal; diff --git a/rtgui/dirpyrdenoise.cc b/rtgui/dirpyrdenoise.cc index 7129542d1..3bf7c21f4 100644 --- a/rtgui/dirpyrdenoise.cc +++ b/rtgui/dirpyrdenoise.cc @@ -48,10 +48,10 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP Gtk::Frame* lumaFrame = Gtk::manage (new Gtk::Frame (M("TP_DIRPYRDENOISE_LUMINANCE_FRAME")) ); lumaFrame->set_label_align(0.025, 0.5); - Gtk::VBox * lumaVBox = Gtk::manage ( new Gtk::VBox()); + Gtk::Box* lumaVBox = Gtk::manage ( new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); lumaVBox->set_spacing(2); - ctboxL = Gtk::manage (new Gtk::HBox ()); + ctboxL = Gtk::manage (new Gtk::Box ()); Gtk::Label* labmL = Gtk::manage (new Gtk::Label (M("TP_DIRPYRDENOISE_LUMINANCE_CONTROL") + ":")); ctboxL->pack_start (*labmL, Gtk::PACK_SHRINK, 1); @@ -83,10 +83,10 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP Gtk::Frame* chromaFrame = Gtk::manage (new Gtk::Frame (M("TP_DIRPYRDENOISE_CHROMINANCE_FRAME")) ); chromaFrame->set_label_align(0.025, 0.5); - Gtk::VBox *chromaVBox = Gtk::manage ( new Gtk::VBox()); + Gtk::Box* chromaVBox = Gtk::manage ( new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); chromaVBox->set_spacing(2); - ctboxC = Gtk::manage (new Gtk::HBox ()); + ctboxC = Gtk::manage (new Gtk::Box ()); Gtk::Label* labmC = Gtk::manage (new Gtk::Label (M("TP_DIRPYRDENOISE_CHROMINANCE_METHOD") + ":")); ctboxC->pack_start (*labmC, Gtk::PACK_SHRINK, 1); @@ -99,7 +99,7 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP Cmethodconn = Cmethod->signal_changed().connect ( sigc::mem_fun(*this, &DirPyrDenoise::CmethodChanged) ); Cmethod->set_tooltip_markup (M("TP_DIRPYRDENOISE_CHROMINANCE_METHOD_TOOLTIP")); - ctboxC2 = Gtk::manage (new Gtk::HBox ()); + ctboxC2 = Gtk::manage (new Gtk::Box ()); Gtk::Label* labmC2 = Gtk::manage (new Gtk::Label (M("TP_DIRPYRDENOISE_CHROMINANCE_METHOD") + ":")); ctboxC2->pack_start (*labmC2, Gtk::PACK_SHRINK, 1); ctboxC2->set_tooltip_markup (M("TP_DIRPYRDENOISE_CHROMINANCE_METHODADVANCED_TOOLTIP")); @@ -121,7 +121,7 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP redchro = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_CHROMINANCE_REDGREEN"), -100, 100, 0.1, 0)); bluechro = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_CHROMINANCE_BLUEYELLOW"), -100, 100, 0.1, 0)); - Gtk::HBox* hb1 = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* hb1 = Gtk::manage (new Gtk::Box ()); hb1->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_DIRPYRDENOISE_MAIN_COLORSPACE") + ": ")), Gtk::PACK_SHRINK, 1); hb1->set_tooltip_markup (M("TP_DIRPYRDENOISE_MAIN_COLORSPACE_TOOLTIP")); @@ -165,9 +165,8 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP // ---- Median FIltering ---- Gtk::Frame* medianFrame = Gtk::manage (new Gtk::Frame ()); - medianFrame->set_label_align(0.025, 0.5); - Gtk::VBox *medianVBox = Gtk::manage ( new Gtk::VBox()); + Gtk::Box* medianVBox = Gtk::manage ( new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); medianVBox->set_spacing(2); median = Gtk::manage (new Gtk::CheckButton (M("TP_DIRPYRDENOISE_MEDIAN_METHOD_LABEL") + ":")); @@ -204,19 +203,19 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP medmethod->set_tooltip_text (M("TP_DIRPYRDENOISE_MEDIAN_TYPE_TOOLTIP")); medmethodconn = medmethod->signal_changed().connect ( sigc::mem_fun(*this, &DirPyrDenoise::medmethodChanged) ); - ctboxm = Gtk::manage (new Gtk::HBox ()); + ctboxm = Gtk::manage (new Gtk::Box ()); Gtk::Label* labmm = Gtk::manage (new Gtk::Label (M("TP_DIRPYRDENOISE_MEDIAN_METHOD") + ":")); ctboxm->pack_start (*labmm, Gtk::PACK_SHRINK, 1); - ctbox = Gtk::manage (new Gtk::HBox ()); + ctbox = Gtk::manage (new Gtk::Box ()); Gtk::Label* labm = Gtk::manage (new Gtk::Label (M("TP_DIRPYRDENOISE_MEDIAN_TYPE") + ":")); ctbox->pack_start (*labm, Gtk::PACK_SHRINK, 1); - ctboxrgb = Gtk::manage (new Gtk::HBox ()); + ctboxrgb = Gtk::manage (new Gtk::Box ()); Gtk::Label* labrgb = Gtk::manage (new Gtk::Label (M("TP_DIRPYRDENOISE_MEDIAN_TYPE") + ":")); ctboxrgb->pack_start (*labrgb, Gtk::PACK_SHRINK, 1); - Gtk::HBox* hb11 = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* hb11 = Gtk::manage (new Gtk::Box ()); hb11->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_DIRPYRDENOISE_MAIN_MODE") + ": ")), Gtk::PACK_SHRINK, 1); hb11->set_tooltip_markup (M("TP_DIRPYRDENOISE_MAIN_MODE_TOOLTIP")); diff --git a/rtgui/dirpyrdenoise.h b/rtgui/dirpyrdenoise.h index c754e705c..71c9b1894 100644 --- a/rtgui/dirpyrdenoise.h +++ b/rtgui/dirpyrdenoise.h @@ -115,21 +115,21 @@ private: sigc::connection smethodconn; MyComboBoxText* medmethod; sigc::connection medmethodconn; - Gtk::HBox* ctbox; + Gtk::Box* ctbox; MyComboBoxText* methodmed; sigc::connection methodmedconn; - Gtk::HBox* ctboxm; + Gtk::Box* ctboxm; MyComboBoxText* rgbmethod; sigc::connection rgbmethodconn; - Gtk::HBox* ctboxrgb; + Gtk::Box* ctboxrgb; double nextchroma; double nextred; double nextblue; double nextnresid; double nexthighresid; - Gtk::HBox* ctboxL; - Gtk::HBox* ctboxC; - Gtk::HBox* ctboxC2; + Gtk::Box* ctboxL; + Gtk::Box* ctboxC; + Gtk::Box* ctboxC2; int nexttileX; int nexttileY; int nextprevX; diff --git a/rtgui/dirpyrequalizer.cc b/rtgui/dirpyrequalizer.cc index 34aecf095..9393d7c42 100644 --- a/rtgui/dirpyrequalizer.cc +++ b/rtgui/dirpyrequalizer.cc @@ -53,11 +53,11 @@ DirPyrEqualizer::DirPyrEqualizer () : FoldableToolPanel(this, "dirpyrequalizer", Color::hsv2rgb01(0.3240, 0.5, 0.5, r, g, b); milestones.push_back( GradientMilestone(1. , r, g, b) ); // hsv: 0.324 rad: 2.5 - Gtk::VBox * cbVBox = Gtk::manage ( new Gtk::VBox()); + Gtk::Box* cbVBox = Gtk::manage ( new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); cbVBox->set_border_width(4); cbVBox->set_spacing(2); - cdbox = Gtk::manage (new Gtk::HBox ()); + cdbox = Gtk::manage (new Gtk::Box ()); labmcd = Gtk::manage (new Gtk::Label (M("TP_CBDL_METHOD") + ":")); cdbox->pack_start (*labmcd, Gtk::PACK_SHRINK, 1); @@ -71,7 +71,9 @@ DirPyrEqualizer::DirPyrEqualizer () : FoldableToolPanel(this, "dirpyrequalizer", cbVBox->pack_start(*cdbox); pack_start(*cbVBox); - Gtk::HBox * buttonBox1 = Gtk::manage (new Gtk::HBox(true, 10)); + Gtk::Box * buttonBox1 = Gtk::manage (new Gtk::Box()); + buttonBox1->set_spacing(10); + buttonBox1->set_homogeneous(true); pack_start(*buttonBox1); Gtk::Button * lumacontrastMinusButton = Gtk::manage (new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACONTRAST_MINUS"))); @@ -88,7 +90,7 @@ DirPyrEqualizer::DirPyrEqualizer () : FoldableToolPanel(this, "dirpyrequalizer", buttonBox1->show_all_children(); - Gtk::HSeparator *separator2 = Gtk::manage (new Gtk::HSeparator()); + Gtk::Separator *separator2 = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); pack_start(*separator2, Gtk::PACK_SHRINK, 2); for(int i = 0; i < 6; i++) { @@ -106,17 +108,17 @@ DirPyrEqualizer::DirPyrEqualizer () : FoldableToolPanel(this, "dirpyrequalizer", pack_start(*multiplier[i]); } - Gtk::HSeparator *separator3 = Gtk::manage (new Gtk::HSeparator()); + Gtk::Separator *separator3 = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); pack_start(*separator3, Gtk::PACK_SHRINK, 2); threshold = Gtk::manage ( new Adjuster (M("TP_DIRPYREQUALIZER_THRESHOLD"), 0, 1, 0.01, 0.2) ); threshold->setAdjusterListener(this); pack_start(*threshold); - Gtk::HSeparator *separator4 = Gtk::manage (new Gtk::HSeparator()); + Gtk::Separator *separator4 = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); pack_start(*separator4, Gtk::PACK_SHRINK, 2); /* - algoHBox = Gtk::manage (new Gtk::HBox ()); + algoHBox = Gtk::manage (new Gtk::Box ()); algoHBox->set_spacing (2); algoHBox->set_tooltip_markup (M("TP_DIRPYREQUALIZER_ALGO_TOOLTIP")); */ diff --git a/rtgui/dirpyrequalizer.h b/rtgui/dirpyrequalizer.h index 84924099e..bb03e1a53 100644 --- a/rtgui/dirpyrequalizer.h +++ b/rtgui/dirpyrequalizer.h @@ -42,7 +42,7 @@ protected: // MyComboBoxText* algo; // sigc::connection algoconn; // Gtk::Label* alLabel; - // Gtk::HBox* algoHBox; + // Gtk::Box* algoHBox; sigc::connection gamutlabConn; sigc::connection lumaneutralPressedConn; @@ -50,7 +50,7 @@ protected: sigc::connection lumacontrastMinusPressedConn; sigc::connection cbdlMethodConn; Gtk::Label* labmcd; - Gtk::HBox* cdbox; + Gtk::Box* cdbox; MyComboBoxText* cbdlMethod; bool lastgamutlab; diff --git a/rtgui/dynamicprofilepanel.cc b/rtgui/dynamicprofilepanel.cc index d7ed8ee97..865603b3a 100644 --- a/rtgui/dynamicprofilepanel.cc +++ b/rtgui/dynamicprofilepanel.cc @@ -35,7 +35,7 @@ DynamicProfilePanel::EditDialog::EditDialog (const Glib::ustring &title, Gtk::Wi Gtk::Dialog (title, parent) { profilepath_ = Gtk::manage (new ProfileStoreComboBox()); - Gtk::HBox *hb = Gtk::manage (new Gtk::HBox()); + Gtk::Box *hb = Gtk::manage (new Gtk::Box()); hb->pack_start (*Gtk::manage (new Gtk::Label (M ("DYNPROFILEEDITOR_PROFILE"))), false, false, 4); hb->pack_start (*profilepath_, true, true, 2); get_content_area()->pack_start (*hb, Gtk::PACK_SHRINK, 4); @@ -49,7 +49,7 @@ DynamicProfilePanel::EditDialog::EditDialog (const Glib::ustring &title, Gtk::Wi imagetype_->append(M("DYNPROFILEEDITOR_IMGTYPE_HDR")); imagetype_->append(M("DYNPROFILEEDITOR_IMGTYPE_PS")); imagetype_->set_active(0); - hb = Gtk::manage (new Gtk::HBox()); + hb = Gtk::manage (new Gtk::Box()); hb->pack_start (*Gtk::manage (new Gtk::Label (M ("EXIFFILTER_IMAGETYPE"))), false, false, 4); hb->pack_start (*imagetype_, true, true, 2); get_content_area()->pack_start (*hb, Gtk::PACK_SHRINK, 4); @@ -195,7 +195,7 @@ void DynamicProfilePanel::EditDialog::set_ranges() void DynamicProfilePanel::EditDialog::add_range (const Glib::ustring &name, Gtk::SpinButton *&from, Gtk::SpinButton *&to) { - Gtk::HBox *hb = Gtk::manage (new Gtk::HBox()); + Gtk::Box *hb = Gtk::manage (new Gtk::Box()); hb->pack_start (*Gtk::manage (new Gtk::Label (name)), false, false, 4); from = Gtk::manage (new Gtk::SpinButton()); to = Gtk::manage (new Gtk::SpinButton()); @@ -210,7 +210,7 @@ void DynamicProfilePanel::EditDialog::add_range (const Glib::ustring &name, void DynamicProfilePanel::EditDialog::add_optional (const Glib::ustring &name, Gtk::CheckButton *&check, Gtk::Entry *&field) { check = Gtk::manage (new Gtk::CheckButton (name)); - Gtk::HBox *hb = Gtk::manage (new Gtk::HBox()); + Gtk::Box *hb = Gtk::manage (new Gtk::Box()); hb->pack_start (*check, Gtk::PACK_SHRINK, 4); field = Gtk::manage (new Gtk::Entry()); hb->pack_start (*field, true, true, 2); @@ -231,10 +231,13 @@ DynamicProfilePanel::DynamicProfilePanel(): button_edit_ (M ("DYNPROFILEEDITOR_EDIT")), button_delete_ (M ("DYNPROFILEEDITOR_DELETE")) { + set_orientation(Gtk::ORIENTATION_VERTICAL); + add (vbox_); treeview_.set_grid_lines (Gtk::TREE_VIEW_GRID_LINES_VERTICAL); scrolledwindow_.add (treeview_); + scrolledwindow_.set_vexpand(); scrolledwindow_.set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); diff --git a/rtgui/dynamicprofilepanel.h b/rtgui/dynamicprofilepanel.h index 5796c9c85..972ca1c4a 100644 --- a/rtgui/dynamicprofilepanel.h +++ b/rtgui/dynamicprofilepanel.h @@ -25,7 +25,7 @@ #include "../rtengine/dynamicprofile.h" class DynamicProfilePanel : - public Gtk::VBox + public Gtk::Box { public: DynamicProfilePanel(); diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 8af240c88..c2ad9241a 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -21,6 +21,7 @@ #include +#include "../rtengine/array2D.h" #include "../rtengine/imagesource.h" #include "../rtengine/iccstore.h" #include "batchqueue.h" @@ -47,6 +48,8 @@ using namespace rtengine::procparams; +using ScopeType = Options::ScopeType; + namespace { @@ -470,9 +473,11 @@ EditorPanel::EditorPanel (FilePanel* filePanel) iBeforeLockON (nullptr), iBeforeLockOFF (nullptr), previewHandler (nullptr), beforePreviewHandler (nullptr), beforeIarea (nullptr), beforeBox (nullptr), afterBox (nullptr), beforeLabel (nullptr), afterLabel (nullptr), beforeHeaderBox (nullptr), afterHeaderBox (nullptr), parent (nullptr), parentWindow (nullptr), openThm (nullptr), - selectedFrame(0), isrc (nullptr), ipc (nullptr), beforeIpc (nullptr), err (0), isProcessing (false) + selectedFrame(0), isrc (nullptr), ipc (nullptr), beforeIpc (nullptr), err (0), isProcessing (false), + histogram_observable(nullptr), histogram_scope_type(ScopeType::NONE) { + set_orientation(Gtk::ORIENTATION_VERTICAL); epih = new EditorPanelIdleHelper; epih->epanel = this; epih->destroyed = false; @@ -489,30 +494,32 @@ EditorPanel::EditorPanel (FilePanel* filePanel) // build left side panel leftbox = new Gtk::Paned (Gtk::ORIENTATION_VERTICAL); - // make a subbox to allow resizing of the histogram (if it's on the left) - leftsubbox = new Gtk::Box (Gtk::ORIENTATION_VERTICAL); - leftsubbox->set_size_request (230, 250); + // make a subpaned to allow resizing of the histogram (if it's on the left) + leftsubpaned = new Gtk::Paned(Gtk::ORIENTATION_VERTICAL); + leftsubpaned->set_size_request(230, 250); histogramPanel = nullptr; - profilep = Gtk::manage (new ProfilePanel ()); + profilep = Gtk::manage(new ProfilePanel()); ppframe = Gtk::manage(new Gtk::Frame()); + ppframe->set_label_align(0.025, 0.5); ppframe->set_name ("ProfilePanel"); ppframe->add (*profilep); - ppframe->set_label (M ("PROFILEPANEL_LABEL")); - //leftsubbox->pack_start (*ppframe, Gtk::PACK_SHRINK, 4); + ppframe->set_label(M("PROFILEPANEL_LABEL")); + //leftsubpaned->pack_start (*ppframe, Gtk::PACK_SHRINK, 4); - navigator = Gtk::manage (new Navigator ()); - navigator->previewWindow->set_size_request (-1, 150 * RTScalable::getScale()); - leftsubbox->pack_start (*navigator, Gtk::PACK_SHRINK, 2); + navigator = Gtk::manage(new Navigator()); + navigator->previewWindow->set_size_request(-1, 150 * RTScalable::getScale()); + leftsubpaned->pack1(*navigator, false, false); - history = Gtk::manage (new History ()); - leftsubbox->pack_start (*history); + history = Gtk::manage(new History()); + leftsubpaned->pack2(*history, true, false); - leftsubbox->show_all (); + leftsubpaned->set_position(0); + leftsubpaned->show_all(); - leftbox->pack2 (*leftsubbox, true, true); - leftbox->show_all (); + leftbox->pack2(*leftsubpaned, true, true); + leftbox->show_all(); // build the middle of the screen Gtk::Box* editbox = Gtk::manage (new Gtk::Box (Gtk::ORIENTATION_VERTICAL)); @@ -532,10 +539,10 @@ EditorPanel::EditorPanel (FilePanel* filePanel) iBeforeLockON = new RTImage ("padlock-locked-small.png"); iBeforeLockOFF = new RTImage ("padlock-unlocked-small.png"); - Gtk::VSeparator* vsept = Gtk::manage (new Gtk::VSeparator ()); - Gtk::VSeparator* vsepz = Gtk::manage (new Gtk::VSeparator ()); - Gtk::VSeparator* vsepi = Gtk::manage (new Gtk::VSeparator ()); - Gtk::VSeparator* vseph = Gtk::manage (new Gtk::VSeparator ()); + Gtk::Separator* vsept = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)); + Gtk::Separator* vsepz = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)); + Gtk::Separator* vsepi = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)); + Gtk::Separator* vseph = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)); hidehp = Gtk::manage (new Gtk::ToggleButton ()); @@ -564,13 +571,13 @@ EditorPanel::EditorPanel (FilePanel* filePanel) tbTopPanel_1->set_image (*iTopPanel_1_Hide); } - Gtk::VSeparator* vsepcl = Gtk::manage (new Gtk::VSeparator ()); - Gtk::VSeparator* vsepz2 = Gtk::manage (new Gtk::VSeparator ()); - Gtk::VSeparator* vsepz3 = Gtk::manage (new Gtk::VSeparator ()); - Gtk::VSeparator* vsepz4 = Gtk::manage (new Gtk::VSeparator ()); + Gtk::Separator* vsepcl = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)); + Gtk::Separator* vsepz2 = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)); + Gtk::Separator* vsepz3 = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)); + Gtk::Separator* vsepz4 = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)); - Gtk::VSeparator* vsep1 = Gtk::manage (new Gtk::VSeparator ()); - Gtk::VSeparator* vsep2 = Gtk::manage (new Gtk::VSeparator ()); + Gtk::Separator* vsep1 = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)); + Gtk::Separator* vsep2 = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)); // Histogram profile toggle controls toggleHistogramProfile = Gtk::manage (new Gtk::ToggleButton ()); @@ -580,7 +587,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) toggleHistogramProfile->set_active (options.rtSettings.HistogramWorking); toggleHistogramProfile->set_tooltip_markup ( (M ("PREFERENCES_HISTOGRAM_TOOLTIP"))); - Gtk::VSeparator* vsep3 = Gtk::manage (new Gtk::VSeparator ()); + Gtk::Separator* vsep3 = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)); iareapanel = new ImageAreaPanel (); tpc->setEditProvider (iareapanel->imageArea); @@ -597,7 +604,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) toolBarPanel->pack_start (*vsept, Gtk::PACK_SHRINK, 2); if (tbTopPanel_1) { - Gtk::VSeparator* vsep = Gtk::manage (new Gtk::VSeparator ()); + Gtk::Separator* vsep = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)); toolBarPanel->pack_end (*tbTopPanel_1, Gtk::PACK_SHRINK, 1); toolBarPanel->pack_end (*vsep, Gtk::PACK_SHRINK, 2); } @@ -630,6 +637,8 @@ EditorPanel::EditorPanel (FilePanel* filePanel) vboxright = new Gtk::Paned (Gtk::ORIENTATION_VERTICAL); vsubboxright = new Gtk::Box (Gtk::ORIENTATION_VERTICAL, 0); +// int rightsize = options.fontSize * 44; +// vsubboxright->set_size_request (rightsize, rightsize - 50); vsubboxright->set_size_request (300, 250); vsubboxright->pack_start (*ppframe, Gtk::PACK_SHRINK, 2); @@ -746,7 +755,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) colorMgmtToolBar->pack_right_in (iops); if (!simpleEditor && !options.tabbedUI) { - Gtk::VSeparator* vsep3 = Gtk::manage (new Gtk::VSeparator ()); + Gtk::Separator* vsep3 = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)); iops->attach_next_to (*vsep3, Gtk::POS_RIGHT, 1, 1); iops->attach_next_to (*navPrev, Gtk::POS_RIGHT, 1, 1); iops->attach_next_to (*navSync, Gtk::POS_RIGHT, 1, 1); @@ -773,6 +782,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) hpanedr->set_name ("EditorRightPaned"); leftbox->reference (); vboxright->reference (); + vboxright->set_name ("EditorModules"); if (options.showHistory) { hpanedl->pack1 (*leftbox, false, false); @@ -895,7 +905,7 @@ EditorPanel::~EditorPanel () delete tpc; - delete leftsubbox; + delete leftsubpaned; delete leftbox; delete vsubboxright; delete vboxright; @@ -987,7 +997,7 @@ void EditorPanel::setAspect () void EditorPanel::on_realize () { realized = true; - Gtk::VBox::on_realize (); + Gtk::Box::on_realize (); // This line is needed to avoid autoexpansion of the window :-/ //vboxright->set_size_request (options.toolPanelWidth, -1); tpc->updateToolState(); @@ -2181,7 +2191,7 @@ void EditorPanel::beforeAfterToggled () history->blistenerLock ? tbBeforeLock->set_image (*iBeforeLockON) : tbBeforeLock->set_image (*iBeforeLockOFF); tbBeforeLock->set_active (history->blistenerLock); - beforeBox = Gtk::manage (new Gtk::VBox ()); + beforeBox = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); beforeBox->pack_start (*beforeHeaderBox, Gtk::PACK_SHRINK, 2); beforeBox->pack_start (*beforeIarea); @@ -2245,16 +2255,94 @@ void EditorPanel::histogramChanged( const LUTu& histGreenRaw, const LUTu& histBlueRaw, const LUTu& histChroma, - const LUTu& histLRETI + const LUTu& histLRETI, + int vectorscopeScale, + const array2D& vectorscopeHC, + const array2D& vectorscopeHS, + int waveformScale, + const array2D& waveformRed, + const array2D& waveformGreen, + const array2D& waveformBlue, + const array2D& waveformLuma ) { if (histogramPanel) { - histogramPanel->histogramChanged(histRed, histGreen, histBlue, histLuma, histChroma, histRedRaw, histGreenRaw, histBlueRaw); + histogramPanel->histogramChanged(histRed, histGreen, histBlue, histLuma, histChroma, histRedRaw, histGreenRaw, histBlueRaw, vectorscopeScale, vectorscopeHC, vectorscopeHS, waveformScale, waveformRed, waveformGreen, waveformBlue, waveformLuma); } tpc->updateCurveBackgroundHistogram(histToneCurve, histLCurve, histCCurve, histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI); } +void EditorPanel::setObservable(rtengine::HistogramObservable* observable) +{ + histogram_observable = observable; +} + +bool EditorPanel::updateHistogram(void) const +{ + return histogram_scope_type == ScopeType::HISTOGRAM + || histogram_scope_type == ScopeType::NONE; +} + +bool EditorPanel::updateHistogramRaw(void) const +{ + return histogram_scope_type == ScopeType::HISTOGRAM_RAW + || histogram_scope_type == ScopeType::NONE; +} + +bool EditorPanel::updateVectorscopeHC(void) const +{ + return + histogram_scope_type == ScopeType::VECTORSCOPE_HC + || histogram_scope_type == ScopeType::NONE; +} + +bool EditorPanel::updateVectorscopeHS(void) const +{ + return + histogram_scope_type == ScopeType::VECTORSCOPE_HS + || histogram_scope_type == ScopeType::NONE; +} + +bool EditorPanel::updateWaveform(void) const +{ + return histogram_scope_type == ScopeType::WAVEFORM + || histogram_scope_type == ScopeType::PARADE + || histogram_scope_type == ScopeType::NONE; +} + +void EditorPanel::scopeTypeChanged(ScopeType new_type) +{ + histogram_scope_type = new_type; + + if (!histogram_observable) { + return; + } + + // Make sure the new scope is updated since we only actively update the + // current scope. + switch (new_type) { + case ScopeType::HISTOGRAM: + histogram_observable->requestUpdateHistogram(); + break; + case ScopeType::HISTOGRAM_RAW: + histogram_observable->requestUpdateHistogramRaw(); + break; + case ScopeType::VECTORSCOPE_HC: + histogram_observable->requestUpdateVectorscopeHC(); + break; + case ScopeType::VECTORSCOPE_HS: + histogram_observable->requestUpdateVectorscopeHS(); + break; + case ScopeType::PARADE: + case ScopeType::WAVEFORM: + histogram_observable->requestUpdateWaveform(); + break; + case ScopeType::NONE: + break; + } +} + bool EditorPanel::CheckSidePanelsVisibility() { if (tbTopPanel_1) { @@ -2371,6 +2459,10 @@ void EditorPanel::updateHistogramPosition (int oldPosition, int newPosition) break; } + if (histogramPanel) { + histogramPanel->setPanelListener(this); + } + iareapanel->imageArea->setPointerMotionHListener (histogramPanel); } diff --git a/rtgui/editorpanel.h b/rtgui/editorpanel.h index 826793507..7675face5 100644 --- a/rtgui/editorpanel.h +++ b/rtgui/editorpanel.h @@ -32,6 +32,12 @@ #include "../rtengine/noncopyable.h" #include "../rtengine/rtengine.h" +namespace rtengine +{ +template +class array2D; +} + class BatchQueueEntry; class EditorPanel; class FilePanel; @@ -49,12 +55,13 @@ struct EditorPanelIdleHelper { class RTWindow; class EditorPanel final : - public Gtk::VBox, + public Gtk::Box, public PParamsChangeListener, public rtengine::ProgressListener, public ThumbnailListener, public HistoryBeforeLineListener, public rtengine::HistogramListener, + public HistogramPanelListener, public rtengine::NonCopyable { public: @@ -126,8 +133,25 @@ public: const LUTu& histGreenRaw, const LUTu& histBlueRaw, const LUTu& histChroma, - const LUTu& histLRETI + const LUTu& histLRETI, + int vectorscopeScale, + const array2D& vectorscopeHC, + const array2D& vectorscopeHS, + int waveformScale, + const array2D& waveformRed, + const array2D& waveformGreen, + const array2D& waveformBlue, + const array2D& waveformLuma ) override; + void setObservable(rtengine::HistogramObservable* observable) override; + bool updateHistogram(void) const override; + bool updateHistogramRaw(void) const override; + bool updateVectorscopeHC(void) const override; + bool updateVectorscopeHS(void) const override; + bool updateWaveform(void) const override; + + // HistogramPanelListener + void scopeTypeChanged(Options::ScopeType new_type) override; // event handlers void info_toggled (); @@ -200,7 +224,7 @@ private: Gtk::Image *iShowHideSidePanels_exit; Gtk::Image *iBeforeLockON, *iBeforeLockOFF; Gtk::Paned *leftbox; - Gtk::Box *leftsubbox; + Gtk::Paned *leftsubpaned; Gtk::Paned *vboxright; Gtk::Box *vsubboxright; @@ -260,4 +284,7 @@ private: bool isProcessing; IdleRegister idle_register; + + rtengine::HistogramObservable* histogram_observable; + Options::ScopeType histogram_scope_type; }; diff --git a/rtgui/editwindow.cc b/rtgui/editwindow.cc index 8841d3d42..3ae3e47fa 100644 --- a/rtgui/editwindow.cc +++ b/rtgui/editwindow.cc @@ -71,7 +71,7 @@ EditWindow::EditWindow (RTWindow* p) : resolution(RTScalable::baseDPI), parent(p signal_key_press_event().connect(sigc::mem_fun(*this, &EditWindow::keyPressed)); - Gtk::VBox* mainBox = Gtk::manage(new Gtk::VBox()); + Gtk::Box* mainBox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); mainBox->pack_start(*mainNB); add(*mainBox); @@ -215,7 +215,7 @@ void EditWindow::addEditorPanel (EditorPanel* ep, const std::string &name) ep->setParentWindow(this); // construct closeable tab for the image - Gtk::HBox* hb = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* hb = Gtk::manage (new Gtk::Box ()); hb->pack_start (*Gtk::manage (new RTImage ("aperture.png"))); hb->pack_start (*Gtk::manage (new Gtk::Label (Glib::path_get_basename (name)))); hb->set_tooltip_markup (name); diff --git a/rtgui/exifpanel.cc b/rtgui/exifpanel.cc index a2217086d..844291a24 100644 --- a/rtgui/exifpanel.cc +++ b/rtgui/exifpanel.cc @@ -41,6 +41,8 @@ ExifPanel::ExifPanel() : {"Exif.Image.ImageDescription", "Image Description"} } { + set_orientation(Gtk::ORIENTATION_VERTICAL); + recursiveOp = true; exifTree = Gtk::manage (new Gtk::TreeView()); scrolledWindow = Gtk::manage (new Gtk::ScrolledWindow()); @@ -48,7 +50,7 @@ ExifPanel::ExifPanel() : exifTree->set_headers_visible (false); exifTree->set_rules_hint (false); exifTree->set_reorderable (false); - exifTree->set_enable_search (true); + exifTree->set_enable_search (false); exifTree->get_selection()->set_mode (Gtk::SELECTION_MULTIPLE); scrolledWindow->set_shadow_type (Gtk::SHADOW_NONE); scrolledWindow->set_policy (Gtk::POLICY_ALWAYS, Gtk::POLICY_ALWAYS); @@ -319,11 +321,11 @@ void ExifPanel::addPressed () { Gtk::Dialog* dialog = new Gtk::Dialog (M ("EXIFPANEL_ADDTAGDLG_TITLE"), * ((Gtk::Window*)get_toplevel()), true); - dialog->add_button (Gtk::Stock::OK, Gtk::RESPONSE_OK); - dialog->add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); + dialog->add_button ("_OK", Gtk::RESPONSE_OK); + dialog->add_button ("_Cancel", Gtk::RESPONSE_CANCEL); - Gtk::HBox* hb1 = new Gtk::HBox (); - Gtk::HBox* hb2 = new Gtk::HBox (); + Gtk::Box* hb1 = new Gtk::Box (); + Gtk::Box* hb2 = new Gtk::Box (); Gtk::Label* tlabel = new Gtk::Label (M ("EXIFPANEL_ADDTAGDLG_SELECTTAG") + ":"); MyComboBoxText* tcombo = new MyComboBoxText (); diff --git a/rtgui/exifpanel.h b/rtgui/exifpanel.h index fc0cad111..47ad33c83 100644 --- a/rtgui/exifpanel.h +++ b/rtgui/exifpanel.h @@ -37,7 +37,7 @@ class ExifPairs; } class ExifPanel final : - public Gtk::VBox, + public Gtk::Box, public ToolPanel { diff --git a/rtgui/exportpanel.cc b/rtgui/exportpanel.cc index b4332f4a4..a4ce63c1d 100644 --- a/rtgui/exportpanel.cc +++ b/rtgui/exportpanel.cc @@ -30,9 +30,10 @@ using namespace rtengine::procparams; ExportPanel::ExportPanel () : listener (nullptr) { + set_orientation(Gtk::ORIENTATION_VERTICAL); /*enabled = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_ENABLE")) ); pack_start(*enabled, Gtk::PACK_SHRINK, 4); - pack_start (*Gtk::manage(new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 2);*/ + pack_start (*Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)), Gtk::PACK_SHRINK, 2);*/ Gtk::Label* labExportTitle = Gtk::manage ( new Gtk::Label (M ("EXPORT_FASTEXPORTOPTIONS")) ); labExportTitle->set_use_markup (true); @@ -43,7 +44,7 @@ ExportPanel::ExportPanel () : listener (nullptr) Gtk::RadioButton::Group pipeline_group; use_fast_pipeline = Gtk::manage ( new Gtk::RadioButton (pipeline_group, M ("EXPORT_USE_FAST_PIPELINE"))); use_normal_pipeline = Gtk::manage ( new Gtk::RadioButton (pipeline_group, M ("EXPORT_USE_NORMAL_PIPELINE"))); - bypass_box = Gtk::manage (new Gtk::VBox()); + bypass_box = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); bypass_ALL = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_ALL"))); use_fast_pipeline->set_tooltip_text (M ("EXPORT_USE_FAST_PIPELINE_TIP")); bypass_sharpening = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_SHARPENING"))); @@ -63,9 +64,10 @@ ExportPanel::ExportPanel () : listener (nullptr) // ---------------------- Bayer sensor frame ----------------------- Gtk::Frame *bayerFrame = Gtk::manage ( new Gtk::Frame (M ("TP_RAW_SENSOR_BAYER_LABEL"))); - Gtk::VBox* bayerFrameVBox = Gtk::manage (new Gtk::VBox ()); + bayerFrame->set_label_align(0.025, 0.5); + Gtk::Box* bayerFrameVBox = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); - Gtk::HBox* hb_raw_bayer_method = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* hb_raw_bayer_method = Gtk::manage (new Gtk::Box ()); hb_raw_bayer_method->pack_start (*Gtk::manage (new Gtk::Label ( M ("EXPORT_RAW_DMETHOD") + ": ")), Gtk::PACK_SHRINK, 4); raw_bayer_method = Gtk::manage (new MyComboBoxText ()); @@ -86,9 +88,10 @@ ExportPanel::ExportPanel () : listener (nullptr) // ---------------------- Bayer sensor frame ----------------------- Gtk::Frame *xtransFrame = Gtk::manage ( new Gtk::Frame (M ("TP_RAW_SENSOR_XTRANS_LABEL"))); - Gtk::VBox* xtransFrameVBox = Gtk::manage (new Gtk::VBox ()); + xtransFrame->set_label_align(0.025, 0.5); + Gtk::Box* xtransFrameVBox = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); - Gtk::HBox* hb_raw_xtrans_method = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* hb_raw_xtrans_method = Gtk::manage (new Gtk::Box ()); hb_raw_xtrans_method->pack_start (*Gtk::manage (new Gtk::Label ( M ("EXPORT_RAW_DMETHOD") + ": ")), Gtk::PACK_SHRINK, 4); raw_xtrans_method = Gtk::manage (new MyComboBoxText ()); @@ -102,18 +105,18 @@ ExportPanel::ExportPanel () : listener (nullptr) // ---------------------------------------------------------------- // start global packing - Gtk::HBox* lblbox = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* lblbox = Gtk::manage (new Gtk::Box ()); lblbox->pack_start (*Gtk::manage (new Gtk::Label (M ("EXPORT_PIPELINE"))), Gtk::PACK_SHRINK, 4); pack_start (*lblbox, Gtk::PACK_SHRINK, 4); pack_start (*use_fast_pipeline, Gtk::PACK_SHRINK, 4); pack_start (*use_normal_pipeline, Gtk::PACK_SHRINK, 4); - bypass_box->pack_start (*Gtk::manage (new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 4); - lblbox = Gtk::manage (new Gtk::HBox ()); + bypass_box->pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)), Gtk::PACK_SHRINK, 4); + lblbox = Gtk::manage (new Gtk::Box ()); lblbox->pack_start (*Gtk::manage (new Gtk::Label (M ("EXPORT_BYPASS"))), Gtk::PACK_SHRINK, 4); bypass_box->pack_start (*lblbox, Gtk::PACK_SHRINK, 4); bypass_box->pack_start (*bypass_ALL, Gtk::PACK_SHRINK, 4); - // bypass_box->pack_start(*Gtk::manage(new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 4); + // bypass_box->pack_start(*Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)), Gtk::PACK_SHRINK, 4); bypass_box->pack_start (*bypass_sharpening, Gtk::PACK_SHRINK, 4); bypass_box->pack_start (*bypass_sharpenEdge, Gtk::PACK_SHRINK, 4); bypass_box->pack_start (*bypass_sharpenMicro, Gtk::PACK_SHRINK, 4); @@ -146,16 +149,16 @@ ExportPanel::ExportPanel () : listener (nullptr) pack_start (*bypass_box, Gtk::PACK_SHRINK); - pack_start (*Gtk::manage (new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 2); + pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)), Gtk::PACK_SHRINK, 2); // Resize options - Gtk::HBox* rmbox = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* rmbox = Gtk::manage (new Gtk::Box ()); rmbox->pack_start (*Gtk::manage (new Gtk::Label (M ("TP_RESIZE_LABEL"))), Gtk::PACK_SHRINK, 4); pack_start (*rmbox, Gtk::PACK_SHRINK, 4); - Gtk::HBox* wbox = Gtk::manage (new Gtk::HBox ()); - Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* wbox = Gtk::manage (new Gtk::Box ()); + Gtk::Box* hbox = Gtk::manage (new Gtk::Box ()); MaxWidth = Gtk::manage (new MySpinButton ()); MaxHeight = Gtk::manage (new MySpinButton ()); wbox->pack_start (*Gtk::manage (new Gtk::Label (M ("EXPORT_MAXWIDTH"))), Gtk::PACK_SHRINK, 4); @@ -187,8 +190,8 @@ ExportPanel::ExportPanel () : listener (nullptr) // add panel ending - Gtk::VBox* vboxpe = Gtk::manage (new Gtk::VBox ()); - Gtk::HSeparator* hseptpe = Gtk::manage (new Gtk::HSeparator ()); + Gtk::Box* vboxpe = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + Gtk::Separator* hseptpe = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); Gtk::Image* peImg = Gtk::manage (new RTImage ("ornament1.png")); vboxpe->pack_start (*hseptpe, Gtk::PACK_SHRINK, 4); vboxpe->pack_start (*peImg); diff --git a/rtgui/exportpanel.h b/rtgui/exportpanel.h index 7ae7e043c..18c4bda49 100644 --- a/rtgui/exportpanel.h +++ b/rtgui/exportpanel.h @@ -31,12 +31,12 @@ public: virtual void exportRequested() = 0; }; -class ExportPanel : public Gtk::VBox +class ExportPanel : public Gtk::Box { protected: - Gtk::VBox *bypass_box; + Gtk::Box* bypass_box; //Gtk::CheckButton* enabled; Gtk::RadioButton* use_fast_pipeline; Gtk::RadioButton* use_normal_pipeline; diff --git a/rtgui/favoritbrowser.cc b/rtgui/favoritbrowser.cc index 2d49ab087..0481847cb 100644 --- a/rtgui/favoritbrowser.cc +++ b/rtgui/favoritbrowser.cc @@ -22,11 +22,13 @@ FavoritBrowser::FavoritBrowser () : listener (NULL) { + set_orientation(Gtk::ORIENTATION_VERTICAL); scrollw = Gtk::manage (new Gtk::ScrolledWindow ()); scrollw->set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); Gtk::Frame* frame = Gtk::manage (new Gtk::Frame ("Favorite Folders")); + frame->set_label_align(0.025, 0.5); frame->add (*scrollw); pack_start (*frame); @@ -65,7 +67,7 @@ FavoritBrowser::FavoritBrowser () : listener (NULL) del->set_valign(Gtk::ALIGN_START); del->set_image (*Gtk::manage (new RTImage ("remove-small.png"))); del->get_style_context()->add_class("Right"); - Gtk::HBox* buttonBox = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* buttonBox = Gtk::manage (new Gtk::Box ()); buttonBox->pack_start (*add); buttonBox->pack_start (*del); diff --git a/rtgui/favoritbrowser.h b/rtgui/favoritbrowser.h index 7a73b98af..ff57a38dc 100644 --- a/rtgui/favoritbrowser.h +++ b/rtgui/favoritbrowser.h @@ -24,7 +24,7 @@ #include "dirselectionlistener.h" class FavoritBrowser : - public Gtk::VBox, + public Gtk::Box, public DirSelectionListener { class FavoritColumns : diff --git a/rtgui/filebrowser.cc b/rtgui/filebrowser.cc index 42aafd2e0..0d2451b59 100644 --- a/rtgui/filebrowser.cc +++ b/rtgui/filebrowser.cc @@ -27,6 +27,7 @@ #include "batchqueue.h" #include "clipboard.h" +#include "inspector.h" #include "multilangmgr.h" #include "options.h" #include "paramsedited.h" @@ -152,6 +153,10 @@ FileBrowser::FileBrowser () : pmenu = new Gtk::Menu (); pmenu->attach (*Gtk::manage(open = new Gtk::MenuItem (M("FILEBROWSER_POPUPOPEN"))), 0, 1, p, p + 1); p++; + if (options.inspectorWindow) { + pmenu->attach (*Gtk::manage(inspect = new Gtk::MenuItem (M("FILEBROWSER_POPUPINSPECT"))), 0, 1, p, p + 1); + p++; + } pmenu->attach (*Gtk::manage(develop = new MyImageMenuItem (M("FILEBROWSER_POPUPPROCESS"), "gears.png")), 0, 1, p, p + 1); p++; pmenu->attach (*Gtk::manage(developfast = new Gtk::MenuItem (M("FILEBROWSER_POPUPPROCESSFAST"))), 0, 1, p, p + 1); @@ -405,6 +410,8 @@ FileBrowser::FileBrowser () : trash->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_Delete, (Gdk::ModifierType)0, Gtk::ACCEL_VISIBLE); untrash->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_Delete, Gdk::SHIFT_MASK, Gtk::ACCEL_VISIBLE); open->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_Return, (Gdk::ModifierType)0, Gtk::ACCEL_VISIBLE); + if (options.inspectorWindow) + inspect->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_F, (Gdk::ModifierType)0, Gtk::ACCEL_VISIBLE); develop->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_B, Gdk::CONTROL_MASK, Gtk::ACCEL_VISIBLE); developfast->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_B, Gdk::CONTROL_MASK | Gdk::SHIFT_MASK, Gtk::ACCEL_VISIBLE); copyprof->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_C, Gdk::CONTROL_MASK, Gtk::ACCEL_VISIBLE); @@ -416,6 +423,10 @@ FileBrowser::FileBrowser () : // Bind to event handlers open->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), open)); + if (options.inspectorWindow) { + inspect->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), inspect)); + } + for (int i = 0; i < 6; i++) { rank[i]->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), rank[i])); } @@ -698,7 +709,6 @@ void FileBrowser::menuColorlabelActivated (Gtk::MenuItem* m) void FileBrowser::menuItemActivated (Gtk::MenuItem* m) { - std::vector mselected; { @@ -751,6 +761,8 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) if (m == open) { openRequested(mselected); + } else if (options.inspectorWindow && m == inspect) { + inspectRequested(mselected); } else if (m == remove) { tbl->deleteRequested (mselected, false, true); } else if (m == removeInclProc) { @@ -973,11 +985,19 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) } for (size_t i = 0; i < mselected.size(); i++) { - mselected[i]->thumbnail->createProcParamsForUpdate (false, true); + const auto thumbnail = mselected[i]->thumbnail; + const auto rank = thumbnail->getRank(); + const auto colorLabel = thumbnail->getColorLabel(); + const auto stage = thumbnail->getStage(); + + thumbnail->createProcParamsForUpdate (false, true); + thumbnail->setRank(rank); + thumbnail->setColorLabel(colorLabel); + thumbnail->setStage(stage); // Empty run to update the thumb - rtengine::procparams::ProcParams params = mselected[i]->thumbnail->getProcParams (); - mselected[i]->thumbnail->setProcParams (params, nullptr, FILEBROWSER, true, true); + rtengine::procparams::ProcParams params = thumbnail->getProcParams (); + thumbnail->setProcParams (params, nullptr, FILEBROWSER, true, true); } if (!mselected.empty() && bppcl) { @@ -2077,3 +2097,8 @@ void FileBrowser::openRequested( std::vector mselected) tbl->openRequested (entries); } + +void FileBrowser::inspectRequested(std::vector mselected) +{ + getInspector()->showWindow(false, false); +} diff --git a/rtgui/filebrowser.h b/rtgui/filebrowser.h index 53f3f1f2b..03a8636e5 100644 --- a/rtgui/filebrowser.h +++ b/rtgui/filebrowser.h @@ -81,6 +81,7 @@ protected: Gtk::MenuItem* remove; Gtk::MenuItem* removeInclProc; Gtk::MenuItem* open; + Gtk::MenuItem* inspect; Gtk::MenuItem* selall; Gtk::MenuItem* copyTo; Gtk::MenuItem* moveTo; @@ -136,6 +137,7 @@ protected: void requestColorLabel(int colorlabel); void notifySelectionListener (); void openRequested( std::vector mselected); + void inspectRequested( std::vector mselected); ExportPanel* exportPanel; type_trash_changed m_trash_changed; diff --git a/rtgui/filebrowserentry.cc b/rtgui/filebrowserentry.cc index cbe31726d..432296f38 100644 --- a/rtgui/filebrowserentry.cc +++ b/rtgui/filebrowserentry.cc @@ -116,9 +116,12 @@ void FileBrowserEntry::refreshQuickThumbnailImage () void FileBrowserEntry::calcThumbnailSize () { - if (thumbnail) { - prew = thumbnail->getThumbnailWidth(preh); + int ow = prew, oh = preh; + thumbnail->getThumbnailSize(prew, preh); + if (ow != prew || oh != preh || preview.size() != static_cast(prew * preh * 3)) { + preview.clear(); + } } } @@ -255,22 +258,16 @@ void FileBrowserEntry::_updateImage(rtengine::IImage8* img, double s, const rten bool rotated = false; if (preh == img->getHeight()) { - const bool resize = !preview || prew != img->getWidth(); prew = img->getWidth (); // Check if image has been rotated since last time - rotated = preview && newLandscape != landscape; + rotated = !preview.empty() && newLandscape != landscape; - if (resize) { - if (preview) { - delete [] preview; - } - preview = new guint8 [prew * preh * 3]; - } - memcpy(preview, img->getData(), prew * preh * 3); + preview.resize(prew * preh * 3); + std::copy(img->getData(), img->getData() + preview.size(), preview.begin()); { - GThreadLock lock; - updateBackBuffer (); + GThreadLock lock; + updateBackBuffer (); } } @@ -601,7 +598,7 @@ bool FileBrowserEntry::onArea (CursorArea a, int x, int y) { MYREADERLOCK(l, lockRW); - if (!drawable || !preview) { + if (!drawable || preview.empty()) { return false; } diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc index 34d6c8aa3..dbea4ade9 100644 --- a/rtgui/filecatalog.cc +++ b/rtgui/filecatalog.cc @@ -66,6 +66,8 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : toolBar(tb) { + set_orientation(Gtk::ORIENTATION_VERTICAL); + inTabMode = false; set_name ("FileBrowser"); @@ -78,7 +80,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : set_size_request(0, 250); // construct trash panel with the extra "empty trash" button - trashButtonBox = Gtk::manage( new Gtk::VBox ); + trashButtonBox = Gtk::manage( new Gtk::Box(Gtk::ORIENTATION_VERTICAL) ); Gtk::Button* emptyT = Gtk::manage( new Gtk::Button ()); emptyT->set_tooltip_markup (M("FILEBROWSER_EMPTYTRASHHINT")); emptyT->set_image (*Gtk::manage(new RTImage ("trash-delete.png"))); @@ -88,7 +90,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : trashButtonBox->show (); //initialize hbToolBar1 - hbToolBar1 = Gtk::manage(new Gtk::HBox ()); + hbToolBar1 = Gtk::manage(new Gtk::Box ()); //setup BrowsePath iRefreshWhite = new RTImage("refresh-small.png"); @@ -97,7 +99,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : BrowsePath = Gtk::manage(new Gtk::Entry ()); BrowsePath->set_width_chars (50); BrowsePath->set_tooltip_markup (M("FILEBROWSER_BROWSEPATHHINT")); - Gtk::HBox* hbBrowsePath = Gtk::manage(new Gtk::HBox ()); + Gtk::Box* hbBrowsePath = Gtk::manage(new Gtk::Box ()); buttonBrowsePath = Gtk::manage(new Gtk::Button ()); buttonBrowsePath->set_image (*iRefreshWhite); buttonBrowsePath->set_tooltip_markup (M("FILEBROWSER_BROWSEPATHBUTTONHINT")); @@ -118,7 +120,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : Query->set_width_chars (20); // TODO !!! add this value to options? Query->set_max_width_chars (20); Query->set_tooltip_markup (M("FILEBROWSER_QUERYHINT")); - Gtk::HBox* hbQuery = Gtk::manage(new Gtk::HBox ()); + Gtk::Box* hbQuery = Gtk::manage(new Gtk::Box ()); buttonQueryClear = Gtk::manage(new Gtk::Button ()); buttonQueryClear->set_image (*iQueryClear); buttonQueryClear->set_tooltip_markup (M("FILEBROWSER_QUERYBUTTONHINT")); @@ -141,7 +143,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : } // setup button bar - buttonBar = Gtk::manage( new Gtk::HBox () ); + buttonBar = Gtk::manage( new Gtk::Box () ); buttonBar->set_name ("ToolBarPanelFileBrowser"); MyScrolledToolbar *stb = Gtk::manage(new MyScrolledToolbar()); stb->set_name("FileBrowserIconToolbar"); @@ -159,7 +161,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : tbLeftPanel_1->signal_toggled().connect( sigc::mem_fun(*this, &FileCatalog::tbLeftPanel_1_toggled) ); buttonBar->pack_start (*tbLeftPanel_1, Gtk::PACK_SHRINK); - vSepiLeftPanel = new Gtk::VSeparator (); + vSepiLeftPanel = new Gtk::Separator(Gtk::ORIENTATION_VERTICAL); buttonBar->pack_start (*vSepiLeftPanel, Gtk::PACK_SHRINK); iFilterClear = new RTImage ("filter-clear.png"); @@ -172,12 +174,12 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : bFilterClear->signal_button_press_event().connect (sigc::mem_fun(*this, &FileCatalog::capture_event), false); bCateg[0] = bFilterClear->signal_toggled().connect (sigc::bind(sigc::mem_fun(*this, &FileCatalog::categoryButtonToggled), bFilterClear, true)); buttonBar->pack_start (*bFilterClear, Gtk::PACK_SHRINK); - buttonBar->pack_start (*Gtk::manage(new Gtk::VSeparator), Gtk::PACK_SHRINK); + buttonBar->pack_start (*Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)), Gtk::PACK_SHRINK); - fltrVbox1 = Gtk::manage (new Gtk::VBox()); - fltrRankbox = Gtk::manage (new Gtk::HBox()); + fltrVbox1 = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + fltrRankbox = Gtk::manage (new Gtk::Box()); fltrRankbox->get_style_context()->add_class("smallbuttonbox"); - fltrLabelbox = Gtk::manage (new Gtk::HBox()); + fltrLabelbox = Gtk::manage (new Gtk::Box()); fltrLabelbox->get_style_context()->add_class("smallbuttonbox"); iUnRanked = new RTImage ("star-gold-hollow-small.png"); @@ -253,12 +255,12 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : bCLabel[3]->set_tooltip_markup (M("FILEBROWSER_SHOWCOLORLABEL4HINT")); bCLabel[4]->set_tooltip_markup (M("FILEBROWSER_SHOWCOLORLABEL5HINT")); - buttonBar->pack_start (*Gtk::manage(new Gtk::VSeparator), Gtk::PACK_SHRINK); + buttonBar->pack_start (*Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)), Gtk::PACK_SHRINK); - fltrVbox2 = Gtk::manage (new Gtk::VBox()); - fltrEditedBox = Gtk::manage (new Gtk::HBox()); + fltrVbox2 = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + fltrEditedBox = Gtk::manage (new Gtk::Box()); fltrEditedBox->get_style_context()->add_class("smallbuttonbox"); - fltrRecentlySavedBox = Gtk::manage (new Gtk::HBox()); + fltrRecentlySavedBox = Gtk::manage (new Gtk::Box()); fltrRecentlySavedBox->get_style_context()->add_class("smallbuttonbox"); // bEdited @@ -315,7 +317,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : fltrVbox2->pack_start (*fltrRecentlySavedBox, Gtk::PACK_SHRINK, 0); buttonBar->pack_start (*fltrVbox2, Gtk::PACK_SHRINK); - buttonBar->pack_start (*Gtk::manage(new Gtk::VSeparator), Gtk::PACK_SHRINK); + buttonBar->pack_start (*Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)), Gtk::PACK_SHRINK); // Trash iTrashShowEmpty = new RTImage("trash-empty-show.png") ; @@ -348,7 +350,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : buttonBar->pack_start (*bTrash, Gtk::PACK_SHRINK); buttonBar->pack_start (*bNotTrash, Gtk::PACK_SHRINK); buttonBar->pack_start (*bOriginal, Gtk::PACK_SHRINK); - buttonBar->pack_start (*Gtk::manage(new Gtk::VSeparator), Gtk::PACK_SHRINK); + buttonBar->pack_start (*Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)), Gtk::PACK_SHRINK); fileBrowser->trash_changed().connect( sigc::mem_fun(*this, &FileCatalog::trashChanged) ); // 0 - bFilterClear @@ -406,7 +408,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : buttonBar->pack_start (*exifInfo, Gtk::PACK_SHRINK); // thumbnail zoom - Gtk::HBox* zoomBox = Gtk::manage( new Gtk::HBox () ); + Gtk::Box* zoomBox = Gtk::manage( new Gtk::Box () ); zoomInButton = Gtk::manage( new Gtk::Button () ); zoomInButton->set_image (*Gtk::manage(new RTImage ("magnifier-plus.png"))); zoomInButton->signal_pressed().connect (sigc::mem_fun(*this, &FileCatalog::zoomIn)); @@ -421,7 +423,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : zoomBox->pack_end (*zoomOutButton, Gtk::PACK_SHRINK); buttonBar->pack_start (*zoomBox, Gtk::PACK_SHRINK); - buttonBar->pack_start (*Gtk::manage(new Gtk::VSeparator), Gtk::PACK_SHRINK); + buttonBar->pack_start (*Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)), Gtk::PACK_SHRINK); //iRightArrow = new RTImage("right.png"); //iRightArrow_red = new RTImage("right_red.png"); @@ -443,12 +445,12 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : buttonBar->pack_end (*tbRightPanel_1, Gtk::PACK_SHRINK); buttonBar->pack_end (*coarsePanel, Gtk::PACK_SHRINK); - buttonBar->pack_end (*Gtk::manage(new Gtk::VSeparator), Gtk::PACK_SHRINK, 4); + buttonBar->pack_end (*Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)), Gtk::PACK_SHRINK, 4); buttonBar->pack_end (*toolBar, Gtk::PACK_SHRINK); - buttonBar->pack_end (*Gtk::manage(new Gtk::VSeparator), Gtk::PACK_SHRINK, 4); + buttonBar->pack_end (*Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)), Gtk::PACK_SHRINK, 4); // add default panel - hBox = Gtk::manage( new Gtk::HBox () ); + hBox = Gtk::manage( new Gtk::Box () ); hBox->show (); hBox->pack_end (*fileBrowser); hBox->set_name ("FilmstripPanel"); @@ -525,7 +527,7 @@ void FileCatalog::exifInfoButtonToggled() void FileCatalog::on_realize() { - Gtk::VBox::on_realize(); + Gtk::Box::on_realize(); Pango::FontDescription fontd = get_pango_context()->get_font_description (); fileBrowser->get_pango_context()->set_font_description (fontd); // batchQueue->get_pango_context()->set_font_description (fontd); @@ -1228,8 +1230,9 @@ void FileCatalog::developRequested(const std::vector& tbe, bo rtengine::ProcessingJob* pjob = rtengine::ProcessingJob::create (fbe->filename, th->getType() == FT_Raw, params, fastmode && options.fastexport_use_fast_pipeline); - const int ph = BatchQueue::calcMaxThumbnailHeight(); - const int pw = th->getThumbnailWidth(ph); + int pw; + int ph = BatchQueue::calcMaxThumbnailHeight(); + th->getThumbnailSize (pw, ph); // processThumbImage is the processing intensive part, but adding to queue must be ordered //#pragma omp ordered diff --git a/rtgui/filecatalog.h b/rtgui/filecatalog.h index 194153921..c7c4f3155 100644 --- a/rtgui/filecatalog.h +++ b/rtgui/filecatalog.h @@ -43,7 +43,7 @@ class ToolBar; * - handling the thumbnail toolbar, * - monitoring the directory (for any change) */ -class FileCatalog final : public Gtk::VBox, +class FileCatalog final : public Gtk::Box, public PreviewLoaderListener, public FilterPanelListener, public FileBrowserListener, @@ -55,7 +55,7 @@ public: private: FilePanel* filepanel; - Gtk::HBox* hBox; + Gtk::Box* hBox; Glib::ustring selectedDirectory; int selectedDirectoryId; bool enabled; @@ -69,19 +69,19 @@ private: ImageAreaToolListener* iatlistener; DirSelectionSlot selectDir; - Gtk::HBox* buttonBar; - Gtk::HBox* hbToolBar1; + Gtk::Box* buttonBar; + Gtk::Box* hbToolBar1; MyScrolledToolbar* hbToolBar1STB; - Gtk::HBox* fltrRankbox; - Gtk::HBox* fltrLabelbox; - Gtk::VBox* fltrVbox1; + Gtk::Box* fltrRankbox; + Gtk::Box* fltrLabelbox; + Gtk::Box* fltrVbox1; - Gtk::HBox* fltrEditedBox; - Gtk::HBox* fltrRecentlySavedBox; - Gtk::VBox* fltrVbox2; + Gtk::Box* fltrEditedBox; + Gtk::Box* fltrRecentlySavedBox; + Gtk::Box* fltrVbox2; - Gtk::VSeparator* vSepiLeftPanel; + Gtk::Separator* vSepiLeftPanel; Gtk::ToggleButton* tbLeftPanel_1; Gtk::ToggleButton* tbRightPanel_1; @@ -119,7 +119,7 @@ private: double vScrollPos[18]; int lastScrollPos; - Gtk::VBox* trashButtonBox; + Gtk::Box* trashButtonBox; Gtk::Button* zoomInButton; Gtk::Button* zoomOutButton; diff --git a/rtgui/filepanel.cc b/rtgui/filepanel.cc index 983a0840c..a09a82597 100644 --- a/rtgui/filepanel.cc +++ b/rtgui/filepanel.cc @@ -34,7 +34,7 @@ FilePanel::FilePanel () : parent(nullptr), error(0) { // Contains everything except for the batch Tool Panel and tabs (Fast Export, Inspect, etc) - dirpaned = Gtk::manage ( new Gtk::HPaned () ); + dirpaned = Gtk::manage ( new Gtk::Paned () ); dirpaned->set_position (options.dirBrowserWidth); // The directory tree @@ -45,12 +45,12 @@ FilePanel::FilePanel () : parent(nullptr), error(0) recentBrowser = Gtk::manage ( new RecentBrowser () ); // The whole left panel. Contains Places, Recent Folders and Folders. - placespaned = Gtk::manage ( new Gtk::VPaned () ); + placespaned = Gtk::manage ( new Gtk::Paned (Gtk::ORIENTATION_VERTICAL) ); placespaned->set_name ("PlacesPaned"); placespaned->set_size_request(250, 100); placespaned->set_position (options.dirBrowserHeight); - Gtk::VBox* obox = Gtk::manage (new Gtk::VBox ()); + Gtk::Box* obox = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); obox->get_style_context()->add_class ("plainback"); obox->pack_start (*recentBrowser, Gtk::PACK_SHRINK, 4); obox->pack_start (*dirBrowser); @@ -79,11 +79,11 @@ FilePanel::FilePanel () : parent(nullptr), error(0) recentBrowser->setDirSelector (sigc::mem_fun (dirBrowser, &DirBrowser::selectDir)); fileCatalog->setFileSelectionListener (this); - rightBox = Gtk::manage ( new Gtk::HBox () ); + rightBox = Gtk::manage ( new Gtk::Box () ); rightBox->set_size_request(350, 100); rightNotebook = Gtk::manage ( new Gtk::Notebook () ); rightNotebookSwitchConn = rightNotebook->signal_switch_page().connect_notify( sigc::mem_fun(*this, &FilePanel::on_NB_switch_page) ); - //Gtk::VBox* taggingBox = Gtk::manage ( new Gtk::VBox () ); + //Gtk::Box* taggingBox = Gtk::manage ( new Gtk::Box(Gtk::ORIENTATION_VERTICAL) ); history = Gtk::manage ( new History (false) ); @@ -115,9 +115,12 @@ FilePanel::FilePanel () : parent(nullptr), error(0) Gtk::Label* devLab = Gtk::manage ( new Gtk::Label (M("MAIN_TAB_DEVELOP")) ); devLab->set_name ("LabelRightNotebook"); devLab->set_angle (90); - //Gtk::Label* inspectLab = Gtk::manage ( new Gtk::Label (M("MAIN_TAB_INSPECT")) ); - //inspectLab->set_name ("LabelRightNotebook"); - //inspectLab->set_angle (90); + Gtk::Label* inspectLab = nullptr; + if (!options.inspectorWindow) { + inspectLab = Gtk::manage ( new Gtk::Label (M("MAIN_TAB_INSPECT")) ); + inspectLab->set_name ("LabelRightNotebook"); + inspectLab->set_angle (90); + } Gtk::Label* filtLab = Gtk::manage ( new Gtk::Label (M("MAIN_TAB_FILTER")) ); filtLab->set_name ("LabelRightNotebook"); filtLab->set_angle (90); @@ -127,12 +130,13 @@ FilePanel::FilePanel () : parent(nullptr), error(0) exportLab->set_name ("LabelRightNotebook"); exportLab->set_angle (90); - tpcPaned = Gtk::manage ( new Gtk::VPaned () ); + tpcPaned = Gtk::manage ( new Gtk::Paned (Gtk::ORIENTATION_VERTICAL) ); tpcPaned->pack1 (*tpc->toolPanelNotebook, false, true); tpcPaned->pack2 (*history, true, false); rightNotebook->append_page (*sFilterPanel, *filtLab); - //rightNotebook->append_page (*inspectorPanel, *inspectLab); + if (!options.inspectorWindow) + rightNotebook->append_page (*inspectorPanel, *inspectLab); rightNotebook->append_page (*tpcPaned, *devLab); //rightNotebook->append_page (*taggingBox, *tagLab); commented out: currently the tab is empty ... rightNotebook->append_page (*sExportPanel, *exportLab); @@ -173,7 +177,7 @@ FilePanel::~FilePanel () void FilePanel::on_realize () { - Gtk::HPaned::on_realize (); + Gtk::Paned::on_realize (); tpc->closeAllTools(); } diff --git a/rtgui/filepanel.h b/rtgui/filepanel.h index cbfe8e53e..65e1ea548 100644 --- a/rtgui/filepanel.h +++ b/rtgui/filepanel.h @@ -37,7 +37,7 @@ class RTWindow; class DirBrowser; class FilePanel final : - public Gtk::HPaned, + public Gtk::Paned, public FileSelectionListener, public rtengine::NonCopyable { @@ -46,9 +46,9 @@ public: ~FilePanel () override; Gtk::Paned* placespaned; - Gtk::HPaned* dirpaned; + Gtk::Paned* dirpaned; - Gtk::HBox* rightBox; + Gtk::Box* rightBox; DirBrowser* dirBrowser; FilterPanel* filterPanel; @@ -90,7 +90,7 @@ private: RecentBrowser* recentBrowser; Inspector* inspectorPanel; - Gtk::VPaned* tpcPaned; + Gtk::Paned* tpcPaned; BatchToolPanelCoordinator* tpc; History* history; RTWindow* parent; diff --git a/rtgui/filmnegative.cc b/rtgui/filmnegative.cc index c13f09320..28b77b700 100644 --- a/rtgui/filmnegative.cc +++ b/rtgui/filmnegative.cc @@ -26,13 +26,24 @@ #include "rtimage.h" #include "../rtengine/procparams.h" +#include "../rtengine/color.h" namespace { -Adjuster* createExponentAdjuster(AdjusterListener* listener, const Glib::ustring& label, double minV, double maxV, double defaultVal) +double toAdjuster(double v) { - Adjuster* const adj = Gtk::manage(new Adjuster(label, minV, maxV, 0.001, defaultVal)); + return CLAMP(std::log2(v), 6, 16) - 6; +} + +double fromAdjuster(double v) +{ + return std::pow(2, v + 6); +} + +Adjuster* createExponentAdjuster(AdjusterListener* listener, const Glib::ustring& label, double minV, double maxV, double step, double defaultVal) +{ + Adjuster* const adj = Gtk::manage(new Adjuster(label, minV, maxV, step, defaultVal)); adj->setAdjusterListener(listener); adj->setLogScale(6, 1, true); @@ -42,46 +53,169 @@ Adjuster* createExponentAdjuster(AdjusterListener* listener, const Glib::ustring return adj; } -Glib::ustring formatBaseValues(const std::array& rgb) +Adjuster* createLevelAdjuster(AdjusterListener* listener, const Glib::ustring& label) { - if (rgb[0] <= 0.f && rgb[1] <= 0.f && rgb[2] <= 0.f) { +// Adjuster* const adj = Gtk::manage(new Adjuster(label, 1.0, 65535.0, 1.0, rtengine::MAXVALF / 24.)); + Adjuster* const adj = Gtk::manage(new Adjuster(label, 0.0, 10.0, 0.01, toAdjuster(rtengine::MAXVALF / 24.))); + adj->setAdjusterListener(listener); +// adj->setLogScale(6, 1000.0, true); + + adj->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); + + adj->show(); + return adj; +} + +Adjuster* createBalanceAdjuster(AdjusterListener* listener, const Glib::ustring& label, double minV, double maxV, double defaultVal, + const Glib::ustring& leftIcon, const Glib::ustring& rightIcon) +{ + Adjuster* const adj = Gtk::manage(new Adjuster(label, minV, maxV, 0.01, defaultVal, + Gtk::manage(new RTImage(leftIcon)), Gtk::manage(new RTImage(rightIcon)))); + adj->setAdjusterListener(listener); + adj->setLogScale(9, 0, true); + + adj->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay)); + + adj->show(); + return adj; +} + + +Glib::ustring fmt(const RGB& rgb) +{ + if (rgb.r <= 0.f && rgb.g <= 0.f && rgb.b <= 0.f) { return "- - -"; } else { - return Glib::ustring::format(std::fixed, std::setprecision(1), rgb[0]) + " " + - Glib::ustring::format(std::fixed, std::setprecision(1), rgb[1]) + " " + - Glib::ustring::format(std::fixed, std::setprecision(1), rgb[2]); + return Glib::ustring::format(std::fixed, std::setprecision(1), rgb.r) + " " + + Glib::ustring::format(std::fixed, std::setprecision(1), rgb.g) + " " + + Glib::ustring::format(std::fixed, std::setprecision(1), rgb.b); } } + +RGB getFilmNegativeExponents(const RGB &ref1, const RGB &ref2) // , const RGB &clearValsOut, const RGB &denseValsOut) +{ + using rtengine::settings; + + RGB clearVals = ref1; + RGB denseVals = ref2; + + // Detect which one is the dense spot, based on green channel + if (clearVals.g < denseVals.g) { + std::swap(clearVals, denseVals); + //std::swap(clearValsOut, denseValsOut); + } + + if (settings->verbose) { + printf("Clear input values: R=%g G=%g B=%g\n", static_cast(clearVals.r), static_cast(clearVals.g), static_cast(clearVals.b)); + printf("Dense input values: R=%g G=%g B=%g\n", static_cast(denseVals.r), static_cast(denseVals.g), static_cast(denseVals.b)); + + // printf("Clear output values: R=%g G=%g B=%g\n", static_cast(clearValsOut.r), static_cast(clearValsOut.g), static_cast(clearValsOut.b)); + // printf("Dense output values: R=%g G=%g B=%g\n", static_cast(denseValsOut.r), static_cast(denseValsOut.g), static_cast(denseValsOut.b)); + } + + const float denseGreenRatio = clearVals.g / denseVals.g; + + // Calculate logarithms in arbitrary base + const auto logBase = + [](float base, float num) -> float + { + return std::log(num) / std::log(base); + }; + + // const auto ratio = + // [](float a, float b) -> float + // { + // return a > b ? a / b : b / a; + // }; + + RGB newExps; + newExps.r = logBase(clearVals.r / denseVals.r, denseGreenRatio); + newExps.g = 1.f; // logBase(ratio(clearVals.g, denseVals.g), ratio(denseValsOut.g, clearValsOut.g) ); + newExps.b = logBase(clearVals.b / denseVals.b, denseGreenRatio); + + + + if (settings->verbose) { + printf("New exponents: R=%g G=%g B=%g\n", static_cast(newExps.r), static_cast(newExps.g), static_cast(newExps.b)); + } + + // // Re-adjust color balance based on dense spot values and new exponents + // calcBalance(rtengine::max(static_cast(params->filmNegative.refInput.g), 1.f), + // -newExps[0], -newExps[1], -newExps[2], + // denseVals[0], denseVals[1], denseVals[2], + // rBal, bBal); + + return newExps; + +} + +void temp2rgb(double outLev, double temp, double green, RGB &refOut) +{ + rtengine::ColorTemp ct = rtengine::ColorTemp(temp, green, 1., "Custom"); + + double rm, gm, bm; + ct.getMultipliers(rm, gm, bm); + + double maxGain = rtengine::max(rm, gm, bm); + + refOut.r = (rm / maxGain) * outLev; + refOut.g = (gm / maxGain) * outLev; + refOut.b = (bm / maxGain) * outLev; +} + + +void rgb2temp(const RGB &refOut, double &outLev, double &temp, double &green) +{ + double maxVal = rtengine::max(refOut.r, refOut.g, refOut.b); + + rtengine::ColorTemp ct = rtengine::ColorTemp( + refOut.r / maxVal, + refOut.g / maxVal, + refOut.b / maxVal, + 1.); + + outLev = maxVal; + temp = ct.getTemp(); + green = ct.getGreen(); +} + + } FilmNegative::FilmNegative() : FoldableToolPanel(this, "filmnegative", M("TP_FILMNEGATIVE_LABEL"), false, true), EditSubscriber(ET_OBJECTS), - evFilmNegativeExponents(ProcEventMapper::getInstance()->newEvent(FIRST, "HISTORY_MSG_FILMNEGATIVE_VALUES")), - evFilmNegativeEnabled(ProcEventMapper::getInstance()->newEvent(FIRST, "HISTORY_MSG_FILMNEGATIVE_ENABLED")), - evFilmBaseValues(ProcEventMapper::getInstance()->newEvent(FIRST, "HISTORY_MSG_FILMNEGATIVE_FILMBASE")), - filmBaseValues({0.f, 0.f, 0.f}), + NEUTRAL_TEMP(rtengine::ColorTemp(1., 1., 1., 1.)), + evFilmNegativeExponents(ProcEventMapper::getInstance()->newEvent(ALLNORAW, "HISTORY_MSG_FILMNEGATIVE_VALUES")), + evFilmNegativeEnabled(ProcEventMapper::getInstance()->newEvent(ALLNORAW, "HISTORY_MSG_FILMNEGATIVE_ENABLED")), + evFilmNegativeRefSpot(ProcEventMapper::getInstance()->newEvent(ALLNORAW, "HISTORY_MSG_FILMNEGATIVE_REF_SPOT")), + evFilmNegativeBalance(ProcEventMapper::getInstance()->newEvent(ALLNORAW, "HISTORY_MSG_FILMNEGATIVE_BALANCE")), + evFilmNegativeColorSpace(ProcEventMapper::getInstance()->newEvent(ALLNORAW, "HISTORY_MSG_FILMNEGATIVE_COLORSPACE")), + refInputValues({0.f, 0.f, 0.f}), + paramsUpgraded(false), fnp(nullptr), - greenExp(createExponentAdjuster(this, M("TP_FILMNEGATIVE_GREEN"), 0.3, 4, 1.5)), // master exponent (green channel) - redRatio(createExponentAdjuster(this, M("TP_FILMNEGATIVE_RED"), 0.3, 3, (2.04 / 1.5))), // ratio of red exponent to master exponent - blueRatio(createExponentAdjuster(this, M("TP_FILMNEGATIVE_BLUE"), 0.3, 3, (1.29 / 1.5))), // ratio of blue exponent to master exponent - spotgrid(Gtk::manage(new Gtk::Grid())), - spotbutton(Gtk::manage(new Gtk::ToggleButton(M("TP_FILMNEGATIVE_PICK")))), - filmBaseLabel(Gtk::manage(new Gtk::Label(M("TP_FILMNEGATIVE_FILMBASE_VALUES"), Gtk::ALIGN_START))), - filmBaseValuesLabel(Gtk::manage(new Gtk::Label("- - -"))), - filmBaseSpotButton(Gtk::manage(new Gtk::ToggleButton(M("TP_FILMNEGATIVE_FILMBASE_PICK")))) + colorSpace(Gtk::manage(new MyComboBoxText())), + greenExp(createExponentAdjuster(this, M("TP_FILMNEGATIVE_GREEN"), 0.3, 4, 0.01, 1.5)), // master exponent (green channel) + redRatio(createExponentAdjuster(this, M("TP_FILMNEGATIVE_RED"), 0.3, 5, 0.01, (2.04 / 1.5))), // ratio of red exponent to master exponent + blueRatio(createExponentAdjuster(this, M("TP_FILMNEGATIVE_BLUE"), 0.3, 5, 0.01, (1.29 / 1.5))), // ratio of blue exponent to master exponent + spotButton(Gtk::manage(new Gtk::ToggleButton(M("TP_FILMNEGATIVE_PICK")))), + refInputLabel(Gtk::manage(new Gtk::Label(Glib::ustring::compose(M("TP_FILMNEGATIVE_REF_LABEL"), "- - -")))), + refSpotButton(Gtk::manage(new Gtk::ToggleButton(M("TP_FILMNEGATIVE_REF_PICK")))), + outputLevel(createLevelAdjuster(this, M("TP_FILMNEGATIVE_OUT_LEVEL"))), // ref level + greenBalance(createBalanceAdjuster(this, M("TP_FILMNEGATIVE_GREENBALANCE"), -3.0, 3.0, 0.0, "circle-magenta-small.png", "circle-green-small.png")), // green balance + blueBalance(createBalanceAdjuster(this, M("TP_FILMNEGATIVE_BLUEBALANCE"), -3.0, 3.0, 0.0, "circle-blue-small.png", "circle-yellow-small.png")) // blue balance { - spotgrid->get_style_context()->add_class("grid-spacing"); - setExpandAlignProperties(spotgrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + setExpandAlignProperties(spotButton, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + spotButton->get_style_context()->add_class("independent"); + spotButton->set_tooltip_text(M("TP_FILMNEGATIVE_GUESS_TOOLTIP")); + spotButton->set_image(*Gtk::manage(new RTImage("color-picker-small.png"))); - setExpandAlignProperties(spotbutton, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - spotbutton->get_style_context()->add_class("independent"); - spotbutton->set_tooltip_text(M("TP_FILMNEGATIVE_GUESS_TOOLTIP")); - spotbutton->set_image(*Gtk::manage(new RTImage("color-picker-small.png"))); + refSpotButton->set_tooltip_text(M("TP_FILMNEGATIVE_REF_TOOLTIP")); - filmBaseSpotButton->set_tooltip_text(M("TP_FILMNEGATIVE_FILMBASE_TOOLTIP")); - setExpandAlignProperties(filmBaseValuesLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + setExpandAlignProperties(refInputLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); +// refInputLabel->set_justify(Gtk::Justification::JUSTIFY_CENTER); +// refInputLabel->set_line_wrap(true); // TODO make spot size configurable ? @@ -98,30 +232,53 @@ FilmNegative::FilmNegative() : // spotsize->set_active(0); // spotsize->append ("4"); - spotgrid->attach(*spotbutton, 0, 1, 1, 1); + // spotgrid->attach(*spotButton, 0, 1, 1, 1); // spotgrid->attach (*slab, 1, 0, 1, 1); // spotgrid->attach (*wbsizehelper, 2, 0, 1, 1); + colorSpace->append(M("TP_FILMNEGATIVE_COLORSPACE_INPUT")); + colorSpace->append(M("TP_FILMNEGATIVE_COLORSPACE_WORKING")); + setExpandAlignProperties(colorSpace, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + colorSpace->set_tooltip_markup(M("TP_FILMNEGATIVE_COLORSPACE_TOOLTIP")); + + Gtk::Grid* csGrid = Gtk::manage(new Gtk::Grid()); + Gtk::Label* csLabel = Gtk::manage(new Gtk::Label(M("TP_FILMNEGATIVE_COLORSPACE"))); + csGrid->attach(*csLabel, 0, 0, 1, 1); + csGrid->attach(*colorSpace, 1, 0, 1, 1); + + pack_start(*csGrid); + + colorSpace->set_active((int)ColorSpace::WORKING); + colorSpace->signal_changed().connect(sigc::mem_fun(*this, &FilmNegative::colorSpaceChanged)); + colorSpace->show(); + pack_start(*greenExp, Gtk::PACK_SHRINK, 0); pack_start(*redRatio, Gtk::PACK_SHRINK, 0); pack_start(*blueRatio, Gtk::PACK_SHRINK, 0); - pack_start(*spotgrid, Gtk::PACK_SHRINK, 0); + pack_start(*spotButton, Gtk::PACK_SHRINK, 0); - Gtk::HSeparator* const sep = Gtk::manage(new Gtk::HSeparator()); +// pack_start(*oldMethod, Gtk::PACK_SHRINK, 0); + + Gtk::Separator* const sep = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); sep->get_style_context()->add_class("grid-row-separator"); pack_start(*sep, Gtk::PACK_SHRINK, 0); - Gtk::Grid* const fbGrid = Gtk::manage(new Gtk::Grid()); - fbGrid->attach(*filmBaseLabel, 0, 0, 1, 1); - fbGrid->attach(*filmBaseValuesLabel, 1, 0, 1, 1); - pack_start(*fbGrid, Gtk::PACK_SHRINK, 0); +// Gtk::Grid* const fbGrid = Gtk::manage(new Gtk::Grid()); +// fbGrid->attach(*refInputLabel, 0, 0, 1, 1); +// fbGrid->attach(*filmBaseValuesLabel, 1, 0, 1, 1); +// pack_start(*fbGrid, Gtk::PACK_SHRINK, 0); + pack_start(*refInputLabel, Gtk::PACK_SHRINK, 0); - pack_start(*filmBaseSpotButton, Gtk::PACK_SHRINK, 0); + pack_start(*outputLevel, Gtk::PACK_SHRINK, 0); + pack_start(*blueBalance, Gtk::PACK_SHRINK, 0); + pack_start(*greenBalance, Gtk::PACK_SHRINK, 0); - spotbutton->signal_toggled().connect(sigc::mem_fun(*this, &FilmNegative::editToggled)); + pack_start(*refSpotButton, Gtk::PACK_SHRINK, 0); + + spotButton->signal_toggled().connect(sigc::mem_fun(*this, &FilmNegative::editToggled)); // spotsize->signal_changed().connect( sigc::mem_fun(*this, &WhiteBalance::spotSizeChanged) ); - filmBaseSpotButton->signal_toggled().connect(sigc::mem_fun(*this, &FilmNegative::baseSpotToggled)); + refSpotButton->signal_toggled().connect(sigc::mem_fun(*this, &FilmNegative::refSpotToggled)); // Editing geometry; create the spot rectangle EditRectangle* const spotRect = new EditRectangle(); @@ -139,6 +296,8 @@ FilmNegative::FilmNegative() : FilmNegative::~FilmNegative() { + idle_register.destroy(); + for (auto geometry : visibleGeometry) { delete geometry; } @@ -148,6 +307,26 @@ FilmNegative::~FilmNegative() } } + +void FilmNegative::readOutputSliders(RGB &refOut) +{ + temp2rgb(fromAdjuster(outputLevel->getValue()), + NEUTRAL_TEMP.getTemp() / std::pow(2., blueBalance->getValue()), + NEUTRAL_TEMP.getGreen() / std::pow(2., greenBalance->getValue()), + refOut); +} + +void FilmNegative::writeOutputSliders(const RGB &refOut) +{ + double outLev, cTemp, green; + rgb2temp(refOut, outLev, cTemp, green); + + outputLevel->setValue(toAdjuster(outLev)); + blueBalance->setValue(std::log2(NEUTRAL_TEMP.getTemp() / cTemp)); + greenBalance->setValue(std::log2(NEUTRAL_TEMP.getGreen() / green)); +} + + void FilmNegative::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited) { disableListener(); @@ -156,27 +335,54 @@ void FilmNegative::read(const rtengine::procparams::ProcParams* pp, const Params redRatio->setEditedState(pedited->filmNegative.redRatio ? Edited : UnEdited); greenExp->setEditedState(pedited->filmNegative.greenExp ? Edited : UnEdited); blueRatio->setEditedState(pedited->filmNegative.blueRatio ? Edited : UnEdited); + outputLevel->setEditedState(pedited->filmNegative.refOutput ? Edited : UnEdited); + greenBalance->setEditedState(pedited->filmNegative.refOutput ? Edited : UnEdited); + blueBalance->setEditedState(pedited->filmNegative.refOutput ? Edited : UnEdited); set_inconsistent(multiImage && !pedited->filmNegative.enabled); } setEnabled(pp->filmNegative.enabled); + + colorSpace->set_active(CLAMP((int)pp->filmNegative.colorSpace, 0, 1)); redRatio->setValue(pp->filmNegative.redRatio); greenExp->setValue(pp->filmNegative.greenExp); blueRatio->setValue(pp->filmNegative.blueRatio); - filmBaseValues[0] = pp->filmNegative.redBase; - filmBaseValues[1] = pp->filmNegative.greenBase; - filmBaseValues[2] = pp->filmNegative.blueBase; + refInputValues = pp->filmNegative.refInput; - // If base values are not set in params, estimated values will be passed in later + // If reference input values are not set in params, estimated values will be passed in later // (after processing) via FilmNegListener - filmBaseValuesLabel->set_text(formatBaseValues(filmBaseValues)); + refInputLabel->set_markup( + Glib::ustring::compose(M("TP_FILMNEGATIVE_REF_LABEL"), fmt(refInputValues))); + + if (pp->filmNegative.backCompat == BackCompat::CURRENT) { + outputLevel->show(); + blueBalance->show(); + greenBalance->show(); + } else { + outputLevel->hide(); + blueBalance->hide(); + greenBalance->hide(); + } + + // If reference output values are not set in params, set the default output + // chosen for median estimation: gray 1/24th of max + if (pp->filmNegative.refOutput.r <= 0) { + float gray = rtengine::MAXVALF / 24.f; + writeOutputSliders({gray, gray, gray}); + } else { + writeOutputSliders(pp->filmNegative.refOutput); + } enableListener(); } void FilmNegative::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited) { + if (colorSpace->get_active_row_number() != 3) { // UNCHANGED entry, see setBatchMode + pp->filmNegative.colorSpace = rtengine::procparams::FilmNegativeParams::ColorSpace(colorSpace->get_active_row_number()); + } + pp->filmNegative.redRatio = redRatio->getValue(); pp->filmNegative.greenExp = greenExp->getValue(); pp->filmNegative.blueRatio = blueRatio->getValue(); @@ -184,18 +390,23 @@ void FilmNegative::write(rtengine::procparams::ProcParams* pp, ParamsEdited* ped pp->filmNegative.enabled = getEnabled(); if (pedited) { + pedited->filmNegative.colorSpace = colorSpace->get_active_row_number() != 3; // UNCHANGED entry, see setBatchMode pedited->filmNegative.redRatio = redRatio->getEditedState(); pedited->filmNegative.greenExp = greenExp->getEditedState(); pedited->filmNegative.blueRatio = blueRatio->getEditedState(); - pedited->filmNegative.baseValues = filmBaseValues[0] != pp->filmNegative.redBase - || filmBaseValues[1] != pp->filmNegative.greenBase - || filmBaseValues[2] != pp->filmNegative.blueBase; + pedited->filmNegative.refOutput = outputLevel->getEditedState() || greenBalance->getEditedState() || blueBalance->getEditedState(); + // In batch mode, make sure refinput is always updated together with the balance sliders + pedited->filmNegative.refInput = pedited->filmNegative.refOutput || (refInputValues != pp->filmNegative.refInput); pedited->filmNegative.enabled = !get_inconsistent(); } - pp->filmNegative.redBase = filmBaseValues[0]; - pp->filmNegative.greenBase = filmBaseValues[1]; - pp->filmNegative.blueBase = filmBaseValues[2]; + pp->filmNegative.refInput = refInputValues; + + readOutputSliders(pp->filmNegative.refOutput); + + if (paramsUpgraded) { + pp->filmNegative.backCompat = BackCompat::CURRENT; + } } @@ -205,44 +416,70 @@ void FilmNegative::setDefaults(const rtengine::procparams::ProcParams* defParams greenExp->setValue(defParams->filmNegative.greenExp); blueRatio->setValue(defParams->filmNegative.blueRatio); + float gray = rtengine::MAXVALF / 24.f; + writeOutputSliders({gray, gray, gray}); + if (pedited) { redRatio->setDefaultEditedState(pedited->filmNegative.redRatio ? Edited : UnEdited); greenExp->setDefaultEditedState(pedited->filmNegative.greenExp ? Edited : UnEdited); blueRatio->setDefaultEditedState(pedited->filmNegative.blueRatio ? Edited : UnEdited); + + outputLevel->setDefaultEditedState(pedited->filmNegative.refOutput ? Edited : UnEdited); + greenBalance->setDefaultEditedState(pedited->filmNegative.refOutput ? Edited : UnEdited); + blueBalance->setDefaultEditedState(pedited->filmNegative.refOutput ? Edited : UnEdited); } else { redRatio->setDefaultEditedState(Irrelevant); greenExp->setDefaultEditedState(Irrelevant); blueRatio->setDefaultEditedState(Irrelevant); + outputLevel->setDefaultEditedState(Irrelevant); + greenBalance->setDefaultEditedState(Irrelevant); + blueBalance->setDefaultEditedState(Irrelevant); } } void FilmNegative::setBatchMode(bool batchMode) { + ToolPanel::setBatchMode(batchMode); + if (batchMode) { - removeIfThere(this, spotgrid, false); - removeIfThere(this, filmBaseSpotButton, false); - ToolPanel::setBatchMode(batchMode); + removeIfThere(this, spotButton, false); + removeIfThere(this, refSpotButton, false); + colorSpace->append(M("GENERAL_UNCHANGED")); + colorSpace->set_active_text(M("GENERAL_UNCHANGED")); redRatio->showEditedCB(); greenExp->showEditedCB(); blueRatio->showEditedCB(); + removeIfThere(this, refInputLabel, false); + removeIfThere(this, outputLevel, false); + removeIfThere(this, greenBalance, false); + removeIfThere(this, blueBalance, false); } } void FilmNegative::adjusterChanged(Adjuster* a, double newval) { - if (listener) { + if (listener && getEnabled()) { if (a == redRatio || a == greenExp || a == blueRatio) { - if (getEnabled()) { - listener->panelChanged( - evFilmNegativeExponents, - Glib::ustring::compose( - "Ref=%1\nR=%2\nB=%3", - greenExp->getValue(), - redRatio->getValue(), - blueRatio->getValue() - ) - ); - } + listener->panelChanged( + evFilmNegativeExponents, + Glib::ustring::compose( + "Ref=%1\nR=%2\nB=%3", + greenExp->getValue(), + redRatio->getValue(), + blueRatio->getValue() + ) + ); + } else if (a == outputLevel || a == greenBalance || a == blueBalance) { + + listener->panelChanged( + evFilmNegativeBalance, + Glib::ustring::compose( + "Lev=%1 G=%2 B=%3", + outputLevel->getValue(), + greenBalance->getValue(), + blueBalance->getValue() + ) + ); } } } @@ -260,10 +497,37 @@ void FilmNegative::enabledChanged() } } -void FilmNegative::filmBaseValuesChanged(std::array rgb) +void FilmNegative::colorSpaceChanged() { - filmBaseValues = rgb; - filmBaseValuesLabel->set_text(formatBaseValues(filmBaseValues)); + if (listener) { + listener->panelChanged(evFilmNegativeColorSpace, colorSpace->get_active_text()); + } +} + +void FilmNegative::filmRefValuesChanged(const RGB &refInput, const RGB &refOutput) +{ + + idle_register.add( + [this, refInput, refOutput]() -> bool { + refInputValues = refInput; + paramsUpgraded = true; + + disableListener(); + + refInputLabel->set_markup( + Glib::ustring::compose(M("TP_FILMNEGATIVE_REF_LABEL"), fmt(refInputValues))); + + writeOutputSliders(refOutput); + + outputLevel->show(); + blueBalance->show(); + greenBalance->show(); + + enableListener(); + return false; + } + ); + } void FilmNegative::setFilmNegProvider(FilmNegProvider* provider) @@ -297,7 +561,7 @@ bool FilmNegative::button1Pressed(int modifierKey) EditSubscriber::action = EditSubscriber::Action::NONE; if (listener) { - if (spotbutton->get_active()) { + if (spotButton->get_active()) { refSpotCoords.push_back(provider->posImage); @@ -305,17 +569,23 @@ bool FilmNegative::button1Pressed(int modifierKey) // User has selected 2 reference gray spots. Calculating new exponents // from channel values and updating parameters. - std::array newExps; + RGB ref1, ref2, dummy; + + if (fnp->getFilmNegativeSpot(refSpotCoords[0], 32, ref1, dummy) && + fnp->getFilmNegativeSpot(refSpotCoords[1], 32, ref2, dummy)) { - if (fnp->getFilmNegativeExponents(refSpotCoords[0], refSpotCoords[1], newExps)) { disableListener(); + + RGB newExps = getFilmNegativeExponents(ref1, ref2); + // Leaving green exponent unchanged, setting red and blue exponents based on // the ratios between newly calculated exponents. - redRatio->setValue(newExps[0] / newExps[1]); - blueRatio->setValue(newExps[2] / newExps[1]); + redRatio->setValue(newExps.r / newExps.g); + blueRatio->setValue(newExps.b / newExps.g); + enableListener(); - if (listener && getEnabled()) { + if (getEnabled()) { listener->panelChanged( evFilmNegativeExponents, Glib::ustring::compose( @@ -326,32 +596,37 @@ bool FilmNegative::button1Pressed(int modifierKey) ) ); } + } switchOffEditMode(); + } - } else if (filmBaseSpotButton->get_active()) { - std::array newBaseLev; + } else if (refSpotButton->get_active()) { - if (fnp->getRawSpotValues(provider->posImage, 32, newBaseLev)) { - disableListener(); + RGB refOut; + fnp->getFilmNegativeSpot(provider->posImage, 32, refInputValues, refOut); - filmBaseValues = newBaseLev; + disableListener(); - enableListener(); + float gray = rtengine::Color::rgbLuminance(refOut.r, refOut.g, refOut.b); + writeOutputSliders({gray, gray, gray}); - const Glib::ustring vs = formatBaseValues(filmBaseValues); + refInputLabel->set_text( + Glib::ustring::compose(M("TP_FILMNEGATIVE_REF_LABEL"), fmt(refInputValues))); - filmBaseValuesLabel->set_text(vs); + enableListener(); - if (listener && getEnabled()) { - listener->panelChanged(evFilmBaseValues, vs); - } - } + listener->panelChanged( + evFilmNegativeRefSpot, + Glib::ustring::compose( + "%1, %2, %3", + round(refInputValues.r), round(refInputValues.g), round(refInputValues.b) + ) + ); - switchOffEditMode(); } } @@ -364,19 +639,26 @@ bool FilmNegative::button1Released() return true; } +bool FilmNegative::button3Pressed(int modifierKey) +{ + EditSubscriber::action = EditSubscriber::Action::NONE; + switchOffEditMode(); + return true; +} + void FilmNegative::switchOffEditMode() { refSpotCoords.clear(); unsubscribe(); - spotbutton->set_active(false); - filmBaseSpotButton->set_active(false); + spotButton->set_active(false); + refSpotButton->set_active(false); } void FilmNegative::editToggled() { - if (spotbutton->get_active()) { + if (spotButton->get_active()) { - filmBaseSpotButton->set_active(false); + refSpotButton->set_active(false); refSpotCoords.clear(); subscribe(); @@ -394,11 +676,12 @@ void FilmNegative::editToggled() } } -void FilmNegative::baseSpotToggled() + +void FilmNegative::refSpotToggled() { - if (filmBaseSpotButton->get_active()) { + if (refSpotButton->get_active()) { - spotbutton->set_active(false); + spotButton->set_active(false); refSpotCoords.clear(); subscribe(); @@ -410,6 +693,7 @@ void FilmNegative::baseSpotToggled() // This is to make sure the getCursor() call is fired everywhere. EditRectangle* const imgRect = static_cast(mouseOverGeometry.at(0)); imgRect->setXYWH(0, 0, w, h); + } else { refSpotCoords.clear(); unsubscribe(); diff --git a/rtgui/filmnegative.h b/rtgui/filmnegative.h index 0810a8c57..e27a38e09 100644 --- a/rtgui/filmnegative.h +++ b/rtgui/filmnegative.h @@ -27,13 +27,21 @@ #include "guiutils.h" #include "toolpanel.h" +#include "../rtengine/colortemp.h" + +namespace +{ +using RGB = rtengine::procparams::FilmNegativeParams::RGB; +using ColorSpace = rtengine::procparams::FilmNegativeParams::ColorSpace; +using BackCompat = rtengine::procparams::FilmNegativeParams::BackCompat; +} + class FilmNegProvider { public: virtual ~FilmNegProvider() = default; - virtual bool getFilmNegativeExponents(rtengine::Coord spotA, rtengine::Coord spotB, std::array& newExps) = 0; - virtual bool getRawSpotValues(rtengine::Coord spot, int spotSize, std::array& rawValues) = 0; + virtual bool getFilmNegativeSpot(rtengine::Coord spot, int spotSize, RGB &refInput, RGB &refOutput) = 0; }; class FilmNegative final : @@ -54,8 +62,9 @@ public: void adjusterChanged(Adjuster* a, double newval) override; void enabledChanged() override; + void colorSpaceChanged(); - void filmBaseValuesChanged(std::array rgb) override; + void filmRefValuesChanged(const RGB &refInput, const RGB &refOutput) override; void setFilmNegProvider(FilmNegProvider* provider); @@ -66,31 +75,47 @@ public: bool mouseOver(int modifierKey) override; bool button1Pressed(int modifierKey) override; bool button1Released() override; + bool button3Pressed(int modifierKey) override; void switchOffEditMode() override; private: void editToggled(); - void baseSpotToggled(); + void refSpotToggled(); + + void readOutputSliders(RGB &refOutput); + void writeOutputSliders(const RGB &refOutput); + + // ColorTemp value corresponding to neutral RGB multipliers (1,1,1). Should be around 6500K. + const rtengine::ColorTemp NEUTRAL_TEMP; const rtengine::ProcEvent evFilmNegativeExponents; const rtengine::ProcEvent evFilmNegativeEnabled; - const rtengine::ProcEvent evFilmBaseValues; + const rtengine::ProcEvent evFilmNegativeRefSpot; + const rtengine::ProcEvent evFilmNegativeBalance; + const rtengine::ProcEvent evFilmNegativeColorSpace; std::vector refSpotCoords; - std::array filmBaseValues; + RGB refInputValues; + bool paramsUpgraded; FilmNegProvider* fnp; + MyComboBoxText* const colorSpace; + Adjuster* const greenExp; Adjuster* const redRatio; Adjuster* const blueRatio; - Gtk::Grid* const spotgrid; - Gtk::ToggleButton* const spotbutton; + Gtk::ToggleButton* const spotButton; - Gtk::Label* const filmBaseLabel; - Gtk::Label* const filmBaseValuesLabel; - Gtk::ToggleButton* const filmBaseSpotButton; + Gtk::Label* const refInputLabel; + Gtk::ToggleButton* const refSpotButton; + + Adjuster* const outputLevel; + Adjuster* const greenBalance; + Adjuster* const blueBalance; + + IdleRegister idle_register; }; diff --git a/rtgui/filterpanel.cc b/rtgui/filterpanel.cc index 2c4fc52d2..c407b88d7 100644 --- a/rtgui/filterpanel.cc +++ b/rtgui/filterpanel.cc @@ -25,14 +25,15 @@ using namespace rtengine; FilterPanel::FilterPanel () : listener (nullptr) { + set_orientation(Gtk::ORIENTATION_VERTICAL); enabled = Gtk::manage (new Gtk::CheckButton (M("EXIFFILTER_METADATAFILTER"))); pack_start (*enabled, Gtk::PACK_SHRINK, 2); - pack_start (*Gtk::manage(new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 2); + pack_start (*Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)), Gtk::PACK_SHRINK, 2); enaFNumber = Gtk::manage (new Gtk::CheckButton (M("EXIFFILTER_APERTURE") + ":")); - Gtk::VBox* fnvb = Gtk::manage(new Gtk::VBox ()); - Gtk::HBox* fnhb = Gtk::manage(new Gtk::HBox ()); + Gtk::Box* fnvb = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + Gtk::Box* fnhb = Gtk::manage(new Gtk::Box ()); fnvb->pack_start (*enaFNumber, Gtk::PACK_SHRINK, 0); fnumberFrom = Gtk::manage(new Gtk::Entry ()); fnumberFrom->set_width_chars(1); @@ -45,8 +46,8 @@ FilterPanel::FilterPanel () : listener (nullptr) pack_start (*fnvb, Gtk::PACK_SHRINK, 4); enaShutter = Gtk::manage(new Gtk::CheckButton(M("EXIFFILTER_SHUTTER") + ":")); - Gtk::VBox* svb = Gtk::manage(new Gtk::VBox ()); - Gtk::HBox* shb = Gtk::manage(new Gtk::HBox ()); + Gtk::Box* svb = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + Gtk::Box* shb = Gtk::manage(new Gtk::Box ()); svb->pack_start (*enaShutter, Gtk::PACK_SHRINK, 0); shutterFrom = Gtk::manage(new Gtk::Entry ()); shutterFrom->set_width_chars(1); @@ -59,8 +60,8 @@ FilterPanel::FilterPanel () : listener (nullptr) pack_start (*svb, Gtk::PACK_SHRINK, 4); enaISO = Gtk::manage(new Gtk::CheckButton(M("EXIFFILTER_ISO") + ":")); - Gtk::VBox* ivb = Gtk::manage(new Gtk::VBox ()); - Gtk::HBox* ihb = Gtk::manage(new Gtk::HBox ()); + Gtk::Box* ivb = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + Gtk::Box* ihb = Gtk::manage(new Gtk::Box ()); ivb->pack_start (*enaISO, Gtk::PACK_SHRINK, 0); isoFrom = Gtk::manage(new Gtk::Entry ()); isoFrom->set_width_chars(1); @@ -73,8 +74,8 @@ FilterPanel::FilterPanel () : listener (nullptr) pack_start (*ivb, Gtk::PACK_SHRINK, 4); enaFocalLen = Gtk::manage(new Gtk::CheckButton(M("EXIFFILTER_FOCALLEN") + ":")); - Gtk::VBox* fvb = Gtk::manage(new Gtk::VBox ()); - Gtk::HBox* fhb = Gtk::manage(new Gtk::HBox ()); + Gtk::Box* fvb = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + Gtk::Box* fhb = Gtk::manage(new Gtk::Box ()); fvb->pack_start (*enaFocalLen, Gtk::PACK_SHRINK, 0); focalFrom = Gtk::manage(new Gtk::Entry ()); focalFrom->set_width_chars(1); @@ -87,7 +88,7 @@ FilterPanel::FilterPanel () : listener (nullptr) pack_start (*fvb, Gtk::PACK_SHRINK, 4); enaExpComp = Gtk::manage(new Gtk::CheckButton(M("EXIFFILTER_EXPOSURECOMPENSATION") + ":")); - Gtk::VBox* evb = Gtk::manage(new Gtk::VBox ()); + Gtk::Box* evb = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); evb->pack_start (*enaExpComp, Gtk::PACK_SHRINK, 0); expcomp = Gtk::manage(new Gtk::ListViewText (1, false, Gtk::SELECTION_MULTIPLE)); expcomp->set_headers_visible (false); @@ -99,7 +100,7 @@ FilterPanel::FilterPanel () : listener (nullptr) pack_start (*evb, Gtk::PACK_SHRINK, 4); enaCamera = Gtk::manage(new Gtk::CheckButton(M("EXIFFILTER_CAMERA") + ":")); - Gtk::VBox* cvb = Gtk::manage(new Gtk::VBox ()); + Gtk::Box* cvb = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); cvb->pack_start (*enaCamera, Gtk::PACK_SHRINK, 0); camera = Gtk::manage(new Gtk::ListViewText (1, false, Gtk::SELECTION_MULTIPLE)); camera->set_headers_visible (false); @@ -111,7 +112,7 @@ FilterPanel::FilterPanel () : listener (nullptr) pack_start (*cvb, Gtk::PACK_EXPAND_WIDGET, 4); enaLens = Gtk::manage(new Gtk::CheckButton(M("EXIFFILTER_LENS") + ":")); - Gtk::VBox* lvb = Gtk::manage(new Gtk::VBox ()); + Gtk::Box* lvb = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); lvb->pack_start (*enaLens, Gtk::PACK_SHRINK, 0); lens = Gtk::manage(new Gtk::ListViewText (1, false, Gtk::SELECTION_MULTIPLE)); lens->set_headers_visible (false); @@ -123,7 +124,7 @@ FilterPanel::FilterPanel () : listener (nullptr) pack_start (*lvb, Gtk::PACK_EXPAND_WIDGET, 4); enaFiletype = Gtk::manage(new Gtk::CheckButton(M("EXIFFILTER_FILETYPE") + ":")); - Gtk::VBox* ftvb = Gtk::manage(new Gtk::VBox ()); + Gtk::Box* ftvb = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); ftvb->pack_start (*enaFiletype, Gtk::PACK_SHRINK, 0); filetype = Gtk::manage(new Gtk::ListViewText (1, false, Gtk::SELECTION_MULTIPLE)); filetype->set_headers_visible (false); @@ -135,8 +136,8 @@ FilterPanel::FilterPanel () : listener (nullptr) pack_start (*ftvb, Gtk::PACK_EXPAND_WIDGET, 4); // add panel ending - Gtk::VBox* vboxpe = Gtk::manage (new Gtk::VBox ()); - Gtk::HSeparator* hseptpe = Gtk::manage (new Gtk::HSeparator ()); + Gtk::Box* vboxpe = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + Gtk::Separator* hseptpe = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); Gtk::Image* peImg = Gtk::manage (new RTImage("ornament1.png")); vboxpe->pack_start(*hseptpe, Gtk::PACK_SHRINK, 4); vboxpe->pack_start(*peImg); diff --git a/rtgui/filterpanel.h b/rtgui/filterpanel.h index 25a368b27..77c2d063e 100644 --- a/rtgui/filterpanel.h +++ b/rtgui/filterpanel.h @@ -29,7 +29,7 @@ public: virtual void exifFilterChanged () = 0; }; -class FilterPanel : public Gtk::VBox +class FilterPanel : public Gtk::Box { protected: diff --git a/rtgui/flatfield.cc b/rtgui/flatfield.cc index 69d14c463..71fa0aab6 100644 --- a/rtgui/flatfield.cc +++ b/rtgui/flatfield.cc @@ -32,7 +32,7 @@ using namespace rtengine::procparams; FlatField::FlatField () : FoldableToolPanel(this, "flatfield", M("TP_FLATFIELD_LABEL")) { - hbff = Gtk::manage(new Gtk::HBox()); + hbff = Gtk::manage(new Gtk::Box()); flatFieldFile = Gtk::manage(new MyFileChooserButton(M("TP_FLATFIELD_LABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN)); bindCurrentFolder (*flatFieldFile, options.lastFlatfieldDir); ffLabel = Gtk::manage(new Gtk::Label(M("GENERAL_FILE"))); @@ -51,7 +51,7 @@ FlatField::FlatField () : FoldableToolPanel(this, "flatfield", M("TP_FLATFIELD_L flatFieldBlurRadius->show(); - Gtk::HBox* hbffbt = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* hbffbt = Gtk::manage (new Gtk::Box ()); hbffbt->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_FLATFIELD_BLURTYPE") + ":")), Gtk::PACK_SHRINK); flatFieldBlurType = Gtk::manage (new MyComboBoxText ()); flatFieldBlurType->append(M("TP_FLATFIELD_BT_AREA")); diff --git a/rtgui/flatfield.h b/rtgui/flatfield.h index 5cbc49684..0d6f167e1 100644 --- a/rtgui/flatfield.h +++ b/rtgui/flatfield.h @@ -55,7 +55,7 @@ protected: Adjuster* flatFieldClipControl; Adjuster* flatFieldBlurRadius; MyComboBoxText* flatFieldBlurType; - Gtk::HBox *hbff; + Gtk::Box *hbff; bool ffChanged; bool lastFFAutoSelect; bool lastFFAutoClipCtrl; diff --git a/rtgui/gradient.cc b/rtgui/gradient.cc index 8229e883a..b0c6000be 100644 --- a/rtgui/gradient.cc +++ b/rtgui/gradient.cc @@ -15,7 +15,7 @@ using namespace rtengine::procparams; Gradient::Gradient () : FoldableToolPanel(this, "gradient", M("TP_GRADIENT_LABEL"), false, true), EditSubscriber(ET_OBJECTS), lastObject(-1), draggedPointOldAngle(-1000.) { - editHBox = Gtk::manage (new Gtk::HBox()); + editHBox = Gtk::manage (new Gtk::Box()); edit = Gtk::manage (new Gtk::ToggleButton()); edit->get_style_context()->add_class("independent"); edit->add (*Gtk::manage (new RTImage ("crosshair-adjust.png"))); diff --git a/rtgui/gradient.h b/rtgui/gradient.h index f2be47ccc..64eabefae 100644 --- a/rtgui/gradient.h +++ b/rtgui/gradient.h @@ -21,7 +21,7 @@ private: int lastObject; protected: - Gtk::HBox *editHBox; + Gtk::Box *editHBox; Gtk::ToggleButton* edit; Adjuster* degree; Adjuster* feather; diff --git a/rtgui/guiutils.cc b/rtgui/guiutils.cc index d759751c3..f415d770f 100644 --- a/rtgui/guiutils.cc +++ b/rtgui/guiutils.cc @@ -573,18 +573,21 @@ MyExpander::MyExpander(bool useEnabled, Gtk::Widget* titleWidget) : child(nullptr), headerWidget(nullptr), statusImage(nullptr), label(nullptr), useEnabled(useEnabled) { + set_orientation(Gtk::ORIENTATION_VERTICAL); set_spacing(0); set_name("MyExpander"); set_can_focus(false); setExpandAlignProperties(this, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - headerHBox = Gtk::manage( new Gtk::HBox()); + headerHBox = Gtk::manage( new Gtk::Box()); headerHBox->set_can_focus(false); setExpandAlignProperties(headerHBox, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); if (useEnabled) { + get_style_context()->add_class("OnOff"); statusImage = Gtk::manage(new RTImage(disabledImage)); imageEvBox = Gtk::manage(new Gtk::EventBox()); + imageEvBox->set_name("MyExpanderStatus"); imageEvBox->add(*statusImage); imageEvBox->set_above_child(true); imageEvBox->signal_button_release_event().connect( sigc::mem_fun(this, & MyExpander::on_enabled_change) ); @@ -592,6 +595,7 @@ MyExpander::MyExpander(bool useEnabled, Gtk::Widget* titleWidget) : imageEvBox->signal_leave_notify_event().connect( sigc::mem_fun(this, & MyExpander::on_enter_leave_enable), false ); headerHBox->pack_start(*imageEvBox, Gtk::PACK_SHRINK, 0); } else { + get_style_context()->add_class("Fold"); statusImage = Gtk::manage(new RTImage(openedImage)); headerHBox->pack_start(*statusImage, Gtk::PACK_SHRINK, 0); } @@ -606,7 +610,7 @@ MyExpander::MyExpander(bool useEnabled, Gtk::Widget* titleWidget) : titleEvBox = Gtk::manage(new Gtk::EventBox()); titleEvBox->set_name("MyExpanderTitle"); - titleEvBox->set_border_width(2); + titleEvBox->set_border_width(0); titleEvBox->add(*headerHBox); titleEvBox->set_above_child(false); // this is the key! By making it below the child, they will get the events first. titleEvBox->set_can_focus(false); @@ -625,17 +629,18 @@ MyExpander::MyExpander(bool useEnabled, Glib::ustring titleLabel) : child(nullptr), headerWidget(nullptr), label(nullptr), useEnabled(useEnabled) { + set_orientation(Gtk::ORIENTATION_VERTICAL); set_spacing(0); set_name("MyExpander"); set_can_focus(false); setExpandAlignProperties(this, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - headerHBox = Gtk::manage( new Gtk::HBox()); + headerHBox = Gtk::manage( new Gtk::Box()); headerHBox->set_can_focus(false); setExpandAlignProperties(headerHBox, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - if (useEnabled) { + get_style_context()->add_class("OnOff"); statusImage = Gtk::manage(new RTImage(disabledImage)); imageEvBox = Gtk::manage(new Gtk::EventBox()); imageEvBox->set_name("MyExpanderStatus"); @@ -646,6 +651,7 @@ MyExpander::MyExpander(bool useEnabled, Glib::ustring titleLabel) : imageEvBox->signal_leave_notify_event().connect( sigc::mem_fun(this, & MyExpander::on_enter_leave_enable), false ); headerHBox->pack_start(*imageEvBox, Gtk::PACK_SHRINK, 0); } else { + get_style_context()->add_class("Fold"); statusImage = Gtk::manage(new RTImage(openedImage)); headerHBox->pack_start(*statusImage, Gtk::PACK_SHRINK, 0); } @@ -654,12 +660,12 @@ MyExpander::MyExpander(bool useEnabled, Glib::ustring titleLabel) : label = Gtk::manage(new Gtk::Label()); setExpandAlignProperties(label, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - label->set_markup(Glib::ustring("") + escapeHtmlChars(titleLabel) + Glib::ustring("")); + label->set_markup(escapeHtmlChars(titleLabel)); headerHBox->pack_start(*label, Gtk::PACK_EXPAND_WIDGET, 0); titleEvBox = Gtk::manage(new Gtk::EventBox()); titleEvBox->set_name("MyExpanderTitle"); - titleEvBox->set_border_width(2); + titleEvBox->set_border_width(0); titleEvBox->add(*headerHBox); titleEvBox->set_above_child(false); // this is the key! By make it below the child, they will get the events first. titleEvBox->set_can_focus(false); @@ -736,7 +742,7 @@ void MyExpander::setLevel (int level) void MyExpander::setLabel (Glib::ustring newLabel) { if (label) { - label->set_markup(Glib::ustring("") + escapeHtmlChars(newLabel) + Glib::ustring("")); + label->set_markup(escapeHtmlChars(newLabel)); } } @@ -764,8 +770,10 @@ void MyExpander::set_inconsistent(bool isInconsistent) } else { if (enabled) { statusImage->set(enabledImage->get_surface()); + get_style_context()->add_class("enabledTool"); } else { statusImage->set(disabledImage->get_surface()); + get_style_context()->remove_class("enabledTool"); } } } @@ -792,6 +800,7 @@ void MyExpander::setEnabled(bool isEnabled) if (!inconsistent) { statusImage->set(disabledImage->get_surface()); + get_style_context()->remove_class("enabledTool"); message.emit(); } } else { @@ -799,6 +808,7 @@ void MyExpander::setEnabled(bool isEnabled) if (!inconsistent) { statusImage->set(enabledImage->get_surface()); + get_style_context()->add_class("enabledTool"); message.emit(); } } @@ -901,9 +911,11 @@ bool MyExpander::on_enabled_change(GdkEventButton* event) if (enabled) { enabled = false; statusImage->set(disabledImage->get_surface()); + get_style_context()->remove_class("enabledTool"); } else { enabled = true; statusImage->set(enabledImage->get_surface()); + get_style_context()->add_class("enabledTool"); } message.emit(); @@ -1160,6 +1172,7 @@ MySpinButton::MySpinButton () set_numeric(true); set_wrap(false); set_alignment(Gtk::ALIGN_END); + set_update_policy(Gtk::SpinButtonUpdatePolicy::UPDATE_IF_VALID); // Avoid updating text if input is not a numeric } void MySpinButton::updateSize() @@ -1192,19 +1205,19 @@ bool MySpinButton::on_key_press_event (GdkEventKey* event) double vMin, vMax; get_range(vMin, vMax); - if ( (event->string[0] >= 'a' && event->string[0] <= 'z') - || (event->string[0] >= 'A' && event->string[0] <= 'Z') - || event->string[0] == '+' || (event->string[0] == '-' && vMin >= 0) - || event->string[0] == '=' || event->string[0] == '_' - ) { - return false; + if ((event->keyval >= GDK_KEY_a && event->keyval <= GDK_KEY_z) + || (event->keyval >= GDK_KEY_A && event->keyval <= GDK_KEY_Z) + || event->keyval == GDK_KEY_equal || event->keyval == GDK_KEY_underscore + || event->keyval == GDK_KEY_plus || (event->keyval == GDK_KEY_minus && vMin >= 0)) { + return false; // Event is propagated further } else { - if(event->string[0] == ',') { - event->keyval = GDK_KEY_period; - event->string[0] = '.'; + if (event->keyval == GDK_KEY_comma || event->keyval == GDK_KEY_KP_Decimal) { + set_text(get_text() + "."); + set_position(get_text().length()); // When setting text, cursor position is reseted at text start. Avoiding this with this code + return true; // Event is not propagated further } - return Gtk::Widget::on_key_press_event(event); + return Gtk::SpinButton::on_key_press_event(event); // Event is propagated normally } } @@ -1227,7 +1240,7 @@ bool MyHScale::on_scroll_event (GdkEventScroll* event) // event->delta_x, event->delta_y, (int)event->direction, (int)event->type, event->send_event); // If Shift is pressed, the widget is modified if (event->state & GDK_SHIFT_MASK) { - Gtk::HScale::on_scroll_event(event); + Gtk::Scale::on_scroll_event(event); return true; } @@ -1257,7 +1270,7 @@ MyFileChooserButton::MyFileChooserButton(const Glib::ustring &title, Gtk::FileCh box_.pack_start(lbl_, true, true); Gtk::Image *img = Gtk::manage(new Gtk::Image()); img->set_from_icon_name("folder-open", Gtk::ICON_SIZE_BUTTON); - box_.pack_start(*Gtk::manage(new Gtk::VSeparator()), false, false, 5); + box_.pack_start(*Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)), false, false, 5); box_.pack_start(*img, false, false); box_.show_all_children(); add(box_); diff --git a/rtgui/guiutils.h b/rtgui/guiutils.h index d4c91734a..d90d45370 100644 --- a/rtgui/guiutils.h +++ b/rtgui/guiutils.h @@ -185,7 +185,7 @@ public: * * Warning: once you've instantiated this class with a text label or a widget label, you won't be able to revert to the other solution. */ -class MyExpander final : public Gtk::VBox +class MyExpander final : public Gtk::Box { public: typedef sigc::signal type_signal_enabled_toggled; @@ -199,7 +199,7 @@ private: bool enabled; /// Enabled feature (default to true) bool inconsistent; /// True if the enabled button is inconsistent Gtk::EventBox *titleEvBox; /// EventBox of the title, to get a connector from it - Gtk::HBox *headerHBox; + Gtk::Box *headerHBox; bool flushEvent; /// Flag to control the weird event mechanism of Gtk (please prove me wrong!) ExpanderBox* expBox; /// Frame that includes the child and control its visibility Gtk::EventBox *imageEvBox; /// Enable/Disable or Open/Close arrow event box @@ -373,13 +373,15 @@ public: }; /** - * @brief subclass of Gtk::HScale in order to handle the scrollwheel + * @brief subclass of Gtk::Scale in order to handle the scrollwheel */ -class MyHScale final : public Gtk::HScale +class MyHScale final : public Gtk::Scale { +protected: bool on_scroll_event (GdkEventScroll* event) override; bool on_key_press_event (GdkEventKey* event) override; + }; /** @@ -391,7 +393,7 @@ private: Glib::ustring title_; Gtk::FileChooserAction action_; - Gtk::HBox box_; + Gtk::Box box_; Gtk::Label lbl_; std::string filename_; std::string current_folder_; @@ -473,7 +475,7 @@ typedef enum RTNav { /** * @brief Handle the switch between text and image to be displayed in the HBox (to be used in a button/toolpanel) */ -class TextOrIcon final : public Gtk::HBox +class TextOrIcon final : public Gtk::Box { public: diff --git a/rtgui/histogrampanel.cc b/rtgui/histogrampanel.cc index 62be4c1f4..9123e7841 100644 --- a/rtgui/histogrampanel.cc +++ b/rtgui/histogrampanel.cc @@ -22,32 +22,51 @@ #include "options.h" #include #include +#include "../rtengine/array2D.h" #include "../rtengine/LUT.h" #include "rtimage.h" #include "../rtengine/color.h" using namespace rtengine; +constexpr float HistogramArea::MAX_BRIGHT; +constexpr float HistogramArea::MIN_BRIGHT; + +using ScopeType = Options::ScopeType; // // // HistogramPanel -HistogramPanel::HistogramPanel() : +HistogramPanel::HistogramPanel () : pointer_moved_delayed_call( [this](bool validPos, const Glib::ustring &profile, const Glib::ustring &profileW, int r, int g, int b) { + bool update_hist_area; + if (!validPos) { // do something to un-show vertical bars - histogramRGBArea->updateBackBuffer(-1, -1, -1); + if (histogramRGBArea) { + histogramRGBArea->updateBackBuffer(-1, -1, -1); + } + update_hist_area = histogramArea->updatePointer(-1, -1, -1); } else { // do something to show vertical bars - histogramRGBArea->updateBackBuffer(r, g, b, profile, profileW); + if (histogramRGBArea) { + histogramRGBArea->updateBackBuffer(r, g, b, profile, profileW); + } + update_hist_area = histogramArea->updatePointer(r, g, b, profile, profileW); + } + if (histogramRGBArea) { + histogramRGBArea->queue_draw(); + } + if (update_hist_area) { + histogramArea->queue_draw(); } - histogramRGBArea->queue_draw (); }, 50, 100 - ) + ), + panel_listener(nullptr) { setExpandAlignProperties(this, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); set_name("HistogramPanel"); @@ -55,30 +74,51 @@ HistogramPanel::HistogramPanel() : histogramArea = Gtk::manage (new HistogramArea (this)); setExpandAlignProperties(histogramArea, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - histogramRGBArea = Gtk::manage (new HistogramRGBArea ()); - setExpandAlignProperties(histogramRGBArea, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END); - histogramRGBArea->show(); + histogramRGBAreaHori.reset(new HistogramRGBAreaHori()); + setExpandAlignProperties(histogramRGBAreaHori.get(), true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END); + + histogramRGBAreaVert.reset(new HistogramRGBAreaVert()); + setExpandAlignProperties(histogramRGBAreaVert.get(), false, true, Gtk::ALIGN_END, Gtk::ALIGN_FILL); + + switch (options.histogramScopeType) { + case ScopeType::NONE: + case ScopeType::HISTOGRAM_RAW: + case ScopeType::VECTORSCOPE_HC: + case ScopeType::VECTORSCOPE_HS: + histogramRGBArea = nullptr; + break; + case ScopeType::PARADE: + case ScopeType::WAVEFORM: + histogramRGBArea = histogramRGBAreaVert.get(); + break; + case ScopeType::HISTOGRAM: + histogramRGBArea = histogramRGBAreaHori.get(); + break; + } // connecting the two childs - histogramArea->signal_factor_changed().connect( sigc::mem_fun(*histogramRGBArea, &HistogramRGBArea::factorChanged) ); + histogramArea->signal_factor_changed().connect( sigc::mem_fun(*histogramRGBAreaHori, &HistogramRGBArea::factorChanged) ); + histogramArea->signal_factor_changed().connect( sigc::mem_fun(*histogramRGBAreaVert, &HistogramRGBArea::factorChanged) ); gfxGrid = Gtk::manage (new Gtk::Grid ()); - gfxGrid->set_orientation(Gtk::ORIENTATION_VERTICAL); gfxGrid->set_row_spacing(1); gfxGrid->set_column_spacing(1); - histogramRGBArea->setParent(gfxGrid); gfxGrid->add(*histogramArea); - - if (options.histogramBar) { - gfxGrid->add (*histogramRGBArea); - } + gfxGrid->attach_next_to( + *histogramRGBAreaVert, *histogramArea, + options.histogramPosition == 1 ? Gtk::POS_RIGHT : Gtk::POS_LEFT, + 1, + 1 + ); + gfxGrid->attach_next_to(*histogramRGBAreaHori, *histogramArea, Gtk::POS_BOTTOM, 1, 1); + histogramRGBAreaHori->set_no_show_all(); + histogramRGBAreaVert->set_no_show_all(); redImage = new RTImage ("histogram-red-on-small.png"); greenImage = new RTImage ("histogram-green-on-small.png"); blueImage = new RTImage ("histogram-blue-on-small.png"); valueImage = new RTImage ("histogram-silver-on-small.png"); chroImage = new RTImage ("histogram-gold-on-small.png"); - rawImage = new RTImage ("histogram-bayer-on-small.png"); barImage = new RTImage ("histogram-bar-on-small.png"); redImage_g = new RTImage ("histogram-red-off-small.png"); @@ -86,21 +126,41 @@ HistogramPanel::HistogramPanel() : blueImage_g = new RTImage ("histogram-blue-off-small.png"); valueImage_g = new RTImage ("histogram-silver-off-small.png"); chroImage_g = new RTImage ("histogram-gold-off-small.png"); - rawImage_g = new RTImage ("histogram-bayer-off-small.png"); barImage_g = new RTImage ("histogram-bar-off-small.png"); mode0Image = new RTImage ("histogram-mode-linear-small.png"); mode1Image = new RTImage ("histogram-mode-logx-small.png"); mode2Image = new RTImage ("histogram-mode-logxy-small.png"); + Gtk::Image* histImage = Gtk::manage(new RTImage("histogram-type-histogram-small.png")); + Gtk::Image* histRawImage = Gtk::manage(new RTImage("histogram-type-histogram-raw-small.png")); + Gtk::Image* paradeImage = Gtk::manage(new RTImage("histogram-type-parade-small.png")); + Gtk::Image* waveImage = Gtk::manage(new RTImage("histogram-type-waveform-small.png")); + Gtk::Image* vectHcImage = Gtk::manage(new RTImage("histogram-type-vectorscope-hc-small.png")); + Gtk::Image* vectHsImage = Gtk::manage(new RTImage("histogram-type-vectorscope-hs-small.png")); + showRed = Gtk::manage (new Gtk::ToggleButton ()); showGreen = Gtk::manage (new Gtk::ToggleButton ()); showBlue = Gtk::manage (new Gtk::ToggleButton ()); showValue = Gtk::manage (new Gtk::ToggleButton ()); showChro = Gtk::manage (new Gtk::ToggleButton ()); - showRAW = Gtk::manage (new Gtk::ToggleButton ()); showMode = Gtk::manage (new Gtk::Button ()); showBAR = Gtk::manage (new Gtk::ToggleButton ()); + scopeOptions = Gtk::manage (new Gtk::ToggleButton ()); + + Gtk::RadioButtonGroup scopeTypeGroup; + scopeHistBtn = Gtk::manage(new Gtk::RadioButton(scopeTypeGroup)); + scopeHistRawBtn = Gtk::manage(new Gtk::RadioButton(scopeTypeGroup)); + scopeParadeBtn = Gtk::manage(new Gtk::RadioButton(scopeTypeGroup)); + scopeWaveBtn = Gtk::manage(new Gtk::RadioButton(scopeTypeGroup)); + scopeVectHcBtn = Gtk::manage(new Gtk::RadioButton(scopeTypeGroup)); + scopeVectHsBtn = Gtk::manage(new Gtk::RadioButton(scopeTypeGroup)); + scopeHistBtn->set_mode(false); + scopeHistRawBtn->set_mode(false); + scopeParadeBtn->set_mode(false); + scopeWaveBtn->set_mode(false); + scopeVectHcBtn->set_mode(false); + scopeVectHsBtn->set_mode(false); showRed->set_name("histButton"); showRed->set_can_focus(false); @@ -112,40 +172,68 @@ HistogramPanel::HistogramPanel() : showValue->set_can_focus(false); showChro->set_name("histButton"); showChro->set_can_focus(false); - showRAW->set_name("histButton"); - showRAW->set_can_focus(false); showMode->set_name("histButton"); showMode->set_can_focus(false); + scopeOptions->set_name("histButton"); + scopeOptions->set_can_focus(false); showBAR->set_name("histButton"); showBAR->set_can_focus(false); + scopeHistBtn->set_name("histButton"); + scopeHistBtn->set_can_focus(false); + scopeHistRawBtn->set_name("histButton"); + scopeHistRawBtn->set_can_focus(false); + scopeParadeBtn->set_name("histButton"); + scopeParadeBtn->set_can_focus(false); + scopeWaveBtn->set_name("histButton"); + scopeWaveBtn->set_can_focus(false); + scopeVectHcBtn->set_name("histButton"); + scopeVectHcBtn->set_can_focus(false); + scopeVectHsBtn->set_name("histButton"); + scopeVectHsBtn->set_can_focus(false); showRed->set_relief (Gtk::RELIEF_NONE); showGreen->set_relief (Gtk::RELIEF_NONE); showBlue->set_relief (Gtk::RELIEF_NONE); showValue->set_relief (Gtk::RELIEF_NONE); showChro->set_relief (Gtk::RELIEF_NONE); - showRAW->set_relief (Gtk::RELIEF_NONE); showMode->set_relief (Gtk::RELIEF_NONE); + scopeOptions->set_relief (Gtk::RELIEF_NONE); showBAR->set_relief (Gtk::RELIEF_NONE); + scopeHistBtn->set_relief (Gtk::RELIEF_NONE); + scopeHistRawBtn->set_relief (Gtk::RELIEF_NONE); + scopeParadeBtn->set_relief (Gtk::RELIEF_NONE); + scopeWaveBtn->set_relief (Gtk::RELIEF_NONE); + scopeVectHcBtn->set_relief (Gtk::RELIEF_NONE); + scopeVectHsBtn->set_relief (Gtk::RELIEF_NONE); showRed->set_tooltip_text (M("HISTOGRAM_TOOLTIP_R")); showGreen->set_tooltip_text (M("HISTOGRAM_TOOLTIP_G")); showBlue->set_tooltip_text (M("HISTOGRAM_TOOLTIP_B")); showValue->set_tooltip_text (M("HISTOGRAM_TOOLTIP_L")); showChro->set_tooltip_text (M("HISTOGRAM_TOOLTIP_CHRO")); - showRAW->set_tooltip_text (M("HISTOGRAM_TOOLTIP_RAW")); showMode->set_tooltip_text (M("HISTOGRAM_TOOLTIP_MODE")); - showBAR->set_tooltip_text (M("HISTOGRAM_TOOLTIP_BAR")); + scopeOptions->set_tooltip_text(M("HISTOGRAM_TOOLTIP_SHOW_OPTIONS")); + scopeHistBtn->set_tooltip_text(M("HISTOGRAM_TOOLTIP_TYPE_HISTOGRAM")); + scopeHistRawBtn->set_tooltip_text(M("HISTOGRAM_TOOLTIP_TYPE_HISTOGRAM_RAW")); + scopeParadeBtn->set_tooltip_text(M("HISTOGRAM_TOOLTIP_TYPE_PARADE")); + scopeWaveBtn->set_tooltip_text(M("HISTOGRAM_TOOLTIP_TYPE_WAVEFORM")); + scopeVectHcBtn->set_tooltip_text(M("HISTOGRAM_TOOLTIP_TYPE_VECTORSCOPE_HC")); + scopeVectHsBtn->set_tooltip_text(M("HISTOGRAM_TOOLTIP_TYPE_VECTORSCOPE_HS")); buttonGrid = Gtk::manage (new Gtk::Grid ()); - buttonGrid->set_orientation(Gtk::ORIENTATION_VERTICAL); + buttonGrid->set_orientation(Gtk::ORIENTATION_HORIZONTAL); + persistentButtons = Gtk::manage(new Gtk::Box()); + persistentButtons->set_orientation(Gtk::ORIENTATION_VERTICAL); + optionButtons = Gtk::manage(new Gtk::Box()); + optionButtons->set_orientation(Gtk::ORIENTATION_VERTICAL); + showRed->set_active (options.histogramRed); showGreen->set_active (options.histogramGreen); showBlue->set_active (options.histogramBlue); showValue->set_active (options.histogramLuma); showChro->set_active (options.histogramChroma); - showRAW->set_active (options.histogramRAW); // no showMode->set_active(), as it's not a ToggleButton + scopeOptions->set_active(options.histogramShowOptionButtons); showBAR->set_active (options.histogramBar); showRed->set_image (showRed->get_active() ? *redImage : *redImage_g); @@ -153,56 +241,134 @@ HistogramPanel::HistogramPanel() : showBlue->set_image (showBlue->get_active() ? *blueImage : *blueImage_g); showValue->set_image (showValue->get_active() ? *valueImage : *valueImage_g); showChro->set_image (showChro->get_active() ? *chroImage : *chroImage_g); - showRAW->set_image (showRAW->get_active() ? *rawImage : *rawImage_g); if (options.histogramDrawMode == 0) showMode->set_image(*mode0Image); else if (options.histogramDrawMode == 1) showMode->set_image(*mode1Image); else showMode->set_image(*mode2Image); + scopeHistBtn->set_image(*histImage); + scopeHistRawBtn->set_image(*histRawImage); + scopeParadeBtn->set_image(*paradeImage); + scopeWaveBtn->set_image(*waveImage); + scopeVectHcBtn->set_image(*vectHcImage); + scopeVectHsBtn->set_image(*vectHsImage); + switch(options.histogramScopeType) { + case ScopeType::HISTOGRAM: + scopeHistBtn->set_active(); + break; + case ScopeType::HISTOGRAM_RAW: + scopeHistRawBtn->set_active(); + break; + case ScopeType::PARADE: + scopeParadeBtn->set_active(); + break; + case ScopeType::WAVEFORM: + scopeWaveBtn->set_active(); + break; + case ScopeType::VECTORSCOPE_HS: + scopeVectHsBtn->set_active(); + break; + case ScopeType::VECTORSCOPE_HC: + scopeVectHcBtn->set_active(); + break; + case ScopeType::NONE: + break; + } + scopeOptions->set_image(*Gtk::manage(new RTImage("histogram-ellipsis-small.png"))); showBAR->set_image (showBAR->get_active() ? *barImage : *barImage_g); - - raw_toggled(); // Make sure the luma/chroma toggles are enabled or disabled - setExpandAlignProperties(showRed , false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - setExpandAlignProperties(showGreen, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - setExpandAlignProperties(showBlue , false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - setExpandAlignProperties(showValue, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - setExpandAlignProperties(showChro , false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - setExpandAlignProperties(showRAW , false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - setExpandAlignProperties(showMode , false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - setExpandAlignProperties(showBAR , false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + setExpandAlignProperties(showRed , false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + setExpandAlignProperties(showGreen, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + setExpandAlignProperties(showBlue , false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + setExpandAlignProperties(showValue, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + setExpandAlignProperties(showChro , false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + setExpandAlignProperties(showMode , false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + setExpandAlignProperties(scopeOptions, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + setExpandAlignProperties(showBAR , false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + setExpandAlignProperties(scopeOptions, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + setExpandAlignProperties(scopeHistBtn, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + setExpandAlignProperties(scopeHistRawBtn, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + setExpandAlignProperties(scopeParadeBtn, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + setExpandAlignProperties(scopeWaveBtn, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + setExpandAlignProperties(scopeVectHcBtn, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + setExpandAlignProperties(scopeVectHsBtn, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + setExpandAlignProperties(persistentButtons, false, true, Gtk::ALIGN_START, Gtk::ALIGN_FILL); + setExpandAlignProperties(optionButtons, false, true, Gtk::ALIGN_START, Gtk::ALIGN_FILL); showRed->signal_toggled().connect( sigc::mem_fun(*this, &HistogramPanel::red_toggled), showRed ); showGreen->signal_toggled().connect( sigc::mem_fun(*this, &HistogramPanel::green_toggled), showGreen ); showBlue->signal_toggled().connect( sigc::mem_fun(*this, &HistogramPanel::blue_toggled), showBlue ); showValue->signal_toggled().connect( sigc::mem_fun(*this, &HistogramPanel::value_toggled), showValue ); showChro->signal_toggled().connect( sigc::mem_fun(*this, &HistogramPanel::chro_toggled), showChro ); - showRAW->signal_toggled().connect( sigc::mem_fun(*this, &HistogramPanel::raw_toggled), showRAW ); showMode->signal_released().connect( sigc::mem_fun(*this, &HistogramPanel::mode_released), showMode ); + scopeOptions->signal_toggled().connect(sigc::mem_fun(*this, &HistogramPanel::scopeOptionsToggled)); showBAR->signal_toggled().connect( sigc::mem_fun(*this, &HistogramPanel::bar_toggled), showBAR ); + scopeHistBtn->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &HistogramPanel::type_selected), scopeHistBtn)); + scopeHistRawBtn->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &HistogramPanel::type_selected), scopeHistRawBtn)); + scopeParadeBtn->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &HistogramPanel::type_selected), scopeParadeBtn)); + scopeWaveBtn->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &HistogramPanel::type_selected), scopeWaveBtn)); + scopeVectHcBtn->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &HistogramPanel::type_selected), scopeVectHcBtn)); + scopeVectHsBtn->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &HistogramPanel::type_selected), scopeVectHsBtn)); - buttonGrid->add (*showRed); - buttonGrid->add (*showGreen); - buttonGrid->add (*showBlue); - buttonGrid->add (*showValue); - buttonGrid->add (*showChro); - buttonGrid->add (*showRAW); - buttonGrid->add (*showMode); - buttonGrid->add (*showBAR); + brightnessWidget = Gtk::manage(new Gtk::Scale(Gtk::ORIENTATION_VERTICAL)); + brightnessWidget->set_inverted(); + brightnessWidget->set_range(log(HistogramArea::MIN_BRIGHT), log(HistogramArea::MAX_BRIGHT)); + brightnessWidget->set_draw_value(false); + brightnessWidget->signal_value_changed().connect(sigc::mem_fun(*this, &HistogramPanel::brightnessWidgetValueChanged)); + brightnessWidget->set_name("histScale"); + brightnessWidget->set_tooltip_text(M("HISTOGRAM_TOOLTIP_TRACE_BRIGHTNESS")); + setExpandAlignProperties(brightnessWidget, true, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_START); + + optionButtons->add(*showRed); + optionButtons->add(*showGreen); + optionButtons->add(*showBlue); + optionButtons->add(*showValue); + optionButtons->add(*showChro); + optionButtons->add(*showMode); + optionButtons->add(*showBAR); + optionButtons->add(*brightnessWidget); + + Gtk::Separator* separator = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)); + setExpandAlignProperties(separator, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + persistentButtons->add(*scopeHistBtn); + persistentButtons->add(*scopeHistRawBtn); + persistentButtons->add(*scopeParadeBtn); + persistentButtons->add(*scopeWaveBtn); + persistentButtons->add(*scopeVectHsBtn); + persistentButtons->add(*scopeVectHcBtn); + persistentButtons->add(*separator); + persistentButtons->add(*scopeOptions); // Put the button vbox next to the window's border to be less disturbing if (options.histogramPosition == 1) { + buttonGrid->add(*persistentButtons); + buttonGrid->add(*optionButtons); + add (*buttonGrid); add (*gfxGrid); } else { + buttonGrid->add(*optionButtons); + buttonGrid->add(*persistentButtons); + add (*gfxGrid); add (*buttonGrid); } show_all (); + optionButtons->set_no_show_all(); + optionButtons->set_visible(options.histogramShowOptionButtons); + type_changed(); + updateHistAreaOptions(); + if (histogramRGBArea) { + updateHistRGBAreaOptions(); + } + + brightness_changed_connection = histogramArea->getBrighnessChangedSignal().connect(sigc::mem_fun(*this, &HistogramPanel::brightnessUpdated)); rconn = signal_size_allocate().connect( sigc::mem_fun(*this, &HistogramPanel::resized) ); + + histogramArea->setBrightness(options.histogramTraceBrightness); } HistogramPanel::~HistogramPanel () @@ -214,7 +380,6 @@ HistogramPanel::~HistogramPanel () delete blueImage; delete valueImage; delete chroImage; - delete rawImage; delete mode0Image; delete mode1Image; delete mode2Image; @@ -225,24 +390,51 @@ HistogramPanel::~HistogramPanel () delete blueImage_g; delete valueImage_g; delete chroImage_g; - delete rawImage_g; delete barImage_g; } +void HistogramPanel::showRGBBar() +{ + histogramRGBAreaHori->set_visible( + histogramRGBArea == histogramRGBAreaHori.get() && showBAR->get_active()); + histogramRGBAreaVert->set_visible( + histogramRGBArea == histogramRGBAreaVert.get() && showBAR->get_active()); + histogramRGBAreaHori->setShow(false); + histogramRGBAreaVert->setShow(false); + + if (!histogramRGBArea) { + return; + } + + setHistRGBInvalid(); + histogramRGBArea->setShow(showBAR->get_active()); +} + void HistogramPanel::resized (Gtk::Allocation& req) { + static int old_height = 0; + static int old_width = 0; - histogramArea->updateBackBuffer (); - histogramArea->queue_draw (); + bool size_changed = + old_height != req.get_height() || old_width != req.get_width(); + + if (!histogramArea->updatePending() && size_changed) { + histogramArea->updateBackBuffer (); + histogramArea->queue_draw (); + } // set histogramRGBArea invalid; - histogramRGBArea->updateBackBuffer(-1, -1, -1); - histogramRGBArea->queue_draw (); + if (histogramRGBArea && size_changed) { + histogramRGBArea->updateBackBuffer(-1, -1, -1); + histogramRGBArea->queue_draw (); + } // Store current height of the histogram options.histogramHeight = get_height(); + old_height = req.get_height(); + old_width = req.get_width(); } void HistogramPanel::red_toggled () @@ -275,21 +467,6 @@ void HistogramPanel::chro_toggled () rgbv_toggled(); } -void HistogramPanel::raw_toggled () -{ - if (showRAW->get_active()) { - showRAW->set_image(*rawImage); - showValue->set_sensitive(false); - showChro->set_sensitive(false); - } else { - showRAW->set_image(*rawImage_g); - showValue->set_sensitive(true); - showChro->set_sensitive(true); - } - - rgbv_toggled(); -} - void HistogramPanel::mode_released () { options.histogramDrawMode = (options.histogramDrawMode + 1) % 3; @@ -302,21 +479,141 @@ void HistogramPanel::mode_released () rgbv_toggled(); } +void HistogramPanel::brightnessWidgetValueChanged(void) +{ + ConnectionBlocker blocker(brightness_changed_connection); + histogramArea->setBrightness(exp(brightnessWidget->get_value())); + options.histogramTraceBrightness = histogramArea->getBrightness(); +} + +void HistogramPanel::brightnessUpdated(float brightness) +{ + brightnessWidget->set_value(log(brightness)); + options.histogramTraceBrightness = histogramArea->getBrightness(); +} + +void HistogramPanel::scopeOptionsToggled() +{ + options.histogramShowOptionButtons = scopeOptions->get_active(); + optionButtons->set_visible(scopeOptions->get_active()); +} + +void HistogramPanel::type_selected(Gtk::RadioButton* button) +{ + ScopeType new_type = ScopeType::NONE; + + if (button == scopeHistBtn) { + new_type = ScopeType::HISTOGRAM; + } else if (button == scopeHistRawBtn) { + new_type = ScopeType::HISTOGRAM_RAW; + } else if (button == scopeParadeBtn) { + new_type = ScopeType::PARADE; + } else if (button == scopeWaveBtn) { + new_type = ScopeType::WAVEFORM; + } else if (button == scopeVectHcBtn) { + new_type = ScopeType::VECTORSCOPE_HC; + } else if (button == scopeVectHsBtn) { + new_type = ScopeType::VECTORSCOPE_HS; + } + + if (new_type == options.histogramScopeType) { + return; + } + + options.histogramScopeType = new_type; + + type_changed(); + updateHistAreaOptions(); + if (histogramRGBArea) { + updateHistRGBAreaOptions(); + } + histogramArea->setDirty(true); + histogramArea->queue_draw(); +} + +void HistogramPanel::type_changed() +{ + switch (options.histogramScopeType) { + case ScopeType::HISTOGRAM: + showRed->show(); + showGreen->show(); + showBlue->show(); + showValue->show(); + showChro->show(); + showMode->show(); + showBAR->show(); + showBAR->set_tooltip_text(M("HISTOGRAM_TOOLTIP_BAR")); + brightnessWidget->hide(); + histogramRGBArea = histogramRGBAreaHori.get(); + break; + case ScopeType::HISTOGRAM_RAW: + showRed->show(); + showGreen->show(); + showBlue->show(); + showValue->hide(); + showChro->hide(); + showMode->show(); + showBAR->hide(); + brightnessWidget->hide(); + histogramRGBArea = nullptr; + break; + case ScopeType::PARADE: + case ScopeType::WAVEFORM: + showRed->show(); + showGreen->show(); + showBlue->show(); + showValue->show(); + showChro->hide(); + showMode->hide(); + showBAR->show(); + showBAR->set_tooltip_text(M("HISTOGRAM_TOOLTIP_BAR")); + brightnessWidget->show(); + histogramRGBArea = histogramRGBAreaVert.get(); + break; + case ScopeType::VECTORSCOPE_HC: + case ScopeType::VECTORSCOPE_HS: + showRed->hide(); + showGreen->hide(); + showBlue->hide(); + showValue->hide(); + showChro->hide(); + showMode->hide(); + showBAR->show(); + showBAR->set_tooltip_text(M("HISTOGRAM_TOOLTIP_CROSSHAIR")); + brightnessWidget->show(); + histogramRGBArea = nullptr; + break; + case ScopeType::NONE: + break; + } + + if (panel_listener) { + updateHistAreaOptions(); + panel_listener->scopeTypeChanged(options.histogramScopeType); + } + + showRGBBar(); +} + void HistogramPanel::bar_toggled () { showBAR->set_image(showBAR->get_active() ? *barImage : *barImage_g); rgbv_toggled(); + showRGBBar(); } void HistogramPanel::rgbv_toggled () { // Update Display - histogramArea->updateOptions (showRed->get_active(), showGreen->get_active(), showBlue->get_active(), showValue->get_active(), showChro->get_active(), showRAW->get_active(), options.histogramDrawMode); + updateHistAreaOptions(); + histogramArea->updateBackBuffer (); histogramArea->queue_draw (); - histogramRGBArea->updateOptions (showRed->get_active(), showGreen->get_active(), showBlue->get_active(), showValue->get_active(), showChro->get_active(), showRAW->get_active(), showBAR->get_active()); - histogramRGBArea->updateBackBuffer (0, 0, 0); - histogramRGBArea->queue_draw (); + if (histogramRGBArea) { + updateHistRGBAreaOptions(); + histogramRGBArea->updateBackBuffer(-1, -1, -1); + histogramRGBArea->queue_draw (); + } } void HistogramPanel::setHistRGBInvalid () @@ -342,11 +639,27 @@ void HistogramPanel::reorder (Gtk::PositionType align) removeIfThere(this, gfxGrid, false); add (*gfxGrid); gfxGrid->unreference(); + + gfxGrid->remove(*histogramRGBAreaVert); + gfxGrid->add(*histogramRGBAreaVert); + + optionButtons->reference(); + removeIfThere(buttonGrid, optionButtons, false); + buttonGrid->add(*optionButtons); + optionButtons->unreference(); } else { buttonGrid->reference(); removeIfThere(this, buttonGrid, false); add (*buttonGrid); buttonGrid->unreference(); + + gfxGrid->remove(*histogramRGBAreaVert); + gfxGrid->attach_next_to(*histogramRGBAreaVert, *histogramArea, Gtk::POS_LEFT, 1, 1); + + persistentButtons->reference(); + removeIfThere(buttonGrid, persistentButtons, false); + buttonGrid->add(*persistentButtons); + persistentButtons->unreference(); } } @@ -361,6 +674,41 @@ void HistogramPanel::toggleButtonMode () showMode->set_image(*mode2Image); } +void HistogramPanel::setPanelListener(HistogramPanelListener* listener) +{ + panel_listener = listener; + + if (listener) { + listener->scopeTypeChanged(options.histogramScopeType); + } +} + +void HistogramPanel::updateHistAreaOptions() +{ + histogramArea->updateOptions( + showRed->get_active(), + showGreen->get_active(), + showBlue->get_active(), + showValue->get_active(), + showChro->get_active(), + options.histogramDrawMode, + options.histogramScopeType, + showBAR->get_active() + ); +} + +void HistogramPanel::updateHistRGBAreaOptions() +{ + histogramRGBArea->updateOptions( + showRed->get_active(), + showGreen->get_active(), + showBlue->get_active(), + showValue->get_active(), + showChro->get_active(), + showBAR->get_active() + ); +} + // // // @@ -378,7 +726,7 @@ double HistogramScaling::log(double vsize, double val) HistogramRGBArea::HistogramRGBArea () : val(0), r(0), g(0), b(0), valid(false), needRed(options.histogramRed), needGreen(options.histogramGreen), needBlue(options.histogramBlue), - needLuma(options.histogramLuma), needChroma(options.histogramChroma), rawMode(options.histogramRAW), + needLuma(options.histogramLuma), needChroma(options.histogramChroma), showMode(options.histogramBar), barDisplayed(options.histogramBar), parent(nullptr) { get_style_context()->add_class("drawingarea"); @@ -402,46 +750,41 @@ HistogramRGBArea::~HistogramRGBArea () } -Gtk::SizeRequestMode HistogramRGBArea::get_request_mode_vfunc () const +void HistogramRGBArea::getPreferredThickness(int& min_thickness, int& natural_thickness) const { - return Gtk::SIZE_REQUEST_HEIGHT_FOR_WIDTH; + int minimumLength = 0; + int naturalLength = 0; + getPreferredLength(minimumLength, naturalLength); + getPreferredThicknessForLength(minimumLength, min_thickness, natural_thickness); } -void HistogramRGBArea::get_preferred_height_vfunc (int &minimum_height, int &natural_height) const -{ - int minimumWidth = 0; - int naturalWidth = 0; - get_preferred_width_vfunc(minimumWidth, naturalWidth); - get_preferred_height_for_width_vfunc (minimumWidth, minimum_height, natural_height); -} - -void HistogramRGBArea::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const +void HistogramRGBArea::getPreferredLength(int& min_length, int& natural_length) const { int s = RTScalable::getScale(); - minimum_width = 60 * s; - natural_width = 200 * s; + min_length = 60 * s; + natural_length = 200 * s; } -void HistogramRGBArea::get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const +void HistogramRGBArea::getPreferredThicknessForLength(int length, int& min_thickness, int& natural_thickness) const { - int bHeight = width / 30; + int bThickness = length / 30; int s = RTScalable::getScale(); - if (bHeight > (10 * s)) { - bHeight = 10 * s; - } else if (bHeight < (5 * s)) { - bHeight = 5 * s; + if (bThickness > (10 * s)) { + bThickness = 10 * s; + } else if (bThickness < (5 * s)) { + bThickness = 5 * s; } - minimum_height = bHeight; - natural_height = bHeight; + min_thickness = bThickness; + natural_thickness = bThickness; } // unused? -void HistogramRGBArea::get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const +void HistogramRGBArea::getPreferredLengthForThickness(int thickness, int& min_length, int& natural_length) const { - get_preferred_width_vfunc (minimum_width, natural_width); + getPreferredLength(min_length, natural_length); } bool HistogramRGBArea::getShow() @@ -449,9 +792,18 @@ bool HistogramRGBArea::getShow() return(showMode); } +void HistogramRGBArea::setShow(bool show) +{ + showMode = show; +} + void HistogramRGBArea::updateBackBuffer (int r, int g, int b, const Glib::ustring &profile, const Glib::ustring &profileW) { - if (!get_realized () || !showMode || rawMode) { + if (!get_realized () || !showMode || !( + options.histogramScopeType == ScopeType::HISTOGRAM + || options.histogramScopeType == ScopeType::PARADE + || options.histogramScopeType == ScopeType::WAVEFORM + )) { return; } @@ -479,75 +831,44 @@ void HistogramRGBArea::updateBackBuffer (int r, int g, int b, const Glib::ustrin cc->set_line_width (1.0 * s); if ( r != -1 && g != -1 && b != -1 ) { - double xpos; if (needRed) { // Red cc->set_source_rgb(1.0, 0.0, 0.0); - if (options.histogramDrawMode < 2) { - xpos = padding + r * (winw - padding * 2.0) / 255.0 + 0.5*s; - } else { - xpos = padding + HistogramScaling::log (255, r) * (winw - padding * 2.0) / 255.0 + 0.5*s; - } - cc->move_to(xpos, 0.0); - cc->line_to(xpos, winh - 0.0); - cc->stroke(); + drawBar(cc, r, 255.0, winw, winh, s); } if (needGreen) { // Green cc->set_source_rgb(0.0, 1.0, 0.0); - if (options.histogramDrawMode < 2) { - xpos = padding + g * (winw - padding * 2.0) / 255.0 + 0.5*s; - } else { - xpos = padding + HistogramScaling::log (255, g) * (winw - padding * 2.0) / 255.0 + 0.5*s; - } - cc->move_to(xpos, 0.0); - cc->line_to(xpos, winh - 0.0); - cc->stroke(); + drawBar(cc, g, 255.0, winw, winh, s); } if (needBlue) { // Blue cc->set_source_rgb(0.0, 0.4, 1.0); - if (options.histogramDrawMode < 2) { - xpos = padding + b * (winw - padding * 2.0) / 255.0 + 0.5*s; - } else { - xpos = padding + HistogramScaling::log (255, b) * (winw - padding * 2.0) / 255.0 + 0.5*s; - } - cc->move_to(xpos, 0.0); - cc->line_to(xpos, winh - 0.0); - cc->stroke(); + drawBar(cc, b, 255.0, winw, winh, s); } - if(needLuma || needChroma) { + if( + (needLuma || needChroma) + && (options.histogramScopeType == ScopeType::HISTOGRAM + || options.histogramScopeType == ScopeType::PARADE + || options.histogramScopeType == ScopeType::WAVEFORM) + ) { float Lab_L, Lab_a, Lab_b; rtengine::Color::rgb2lab01(profile, profileW, r / 255.f, g / 255.f, b / 255.f, Lab_L, Lab_a, Lab_b, options.rtSettings.HistogramWorking); if (needLuma) { // Luma cc->set_source_rgb(1.0, 1.0, 1.0); - if (options.histogramDrawMode < 2) { - xpos = padding + static_cast(Lab_L) * (winw - padding * 2.0) / 100.0 + 0.5*s; - } else { - xpos = padding + HistogramScaling::log(100, Lab_L) * (winw - padding * 2.0) / 100.0 + 0.5*s; - } - cc->move_to(xpos, 0.0); - cc->line_to(xpos, winh - 0.0); - cc->stroke(); + drawBar(cc, Lab_L, 100.0, winw, winh, s); } - if (needChroma) { + if (needChroma && options.histogramScopeType == ScopeType::HISTOGRAM) { // Chroma double chromaval = sqrt(Lab_a * Lab_a + Lab_b * Lab_b) / 1.8; cc->set_source_rgb(0.9, 0.9, 0.0); - if (options.histogramDrawMode < 2) { - xpos = padding + chromaval * (winw - padding * 2.0) / 100.0 + 0.5*s; - } else { - xpos = padding + HistogramScaling::log(100, chromaval) * (winw - padding * 2.0) / 100.0 + 0.5*s; - } - cc->move_to(xpos, 0.0); - cc->line_to(xpos, winh - 0.0); - cc->stroke(); + drawBar(cc, chromaval, 100.0, winw, winh, s); } } } @@ -594,7 +915,7 @@ void HistogramRGBArea::update (int valh, int rh, int gh, int bh) ); } -void HistogramRGBArea::updateOptions (bool r, bool g, bool b, bool l, bool c, bool raw, bool bar) +void HistogramRGBArea::updateOptions (bool r, bool g, bool b, bool l, bool c, bool bar) { options.histogramRed = needRed = r; @@ -602,18 +923,8 @@ void HistogramRGBArea::updateOptions (bool r, bool g, bool b, bool l, bool c, bo options.histogramBlue = needBlue = b; options.histogramLuma = needLuma = l; options.histogramChroma = needChroma = c; - options.histogramRAW = rawMode = raw; options.histogramBar = showMode = bar; - // Show/hide the RGB bar widget - if (bar && !barDisplayed) { - parent->add(*this); - barDisplayed = true; - } else if (!bar && barDisplayed) { - removeIfThere(parent, this, false); - barDisplayed = false; - } - } void HistogramRGBArea::on_realize () @@ -658,16 +969,105 @@ void HistogramRGBArea::factorChanged (double newFactor) factor = newFactor; } +void HistogramRGBAreaHori::drawBar(Cairo::RefPtr cc, double value, double max_value, int winw, int winh, double scale) +{ + double pos; + if (options.histogramDrawMode < 2) { + pos = padding + value * (winw - padding * 2.0) / max_value + 0.5 * scale; + } else { + pos = padding + HistogramScaling::log (max_value, value) * (winw - padding * 2.0) / max_value + 0.5 * scale; + } + cc->move_to(pos, 0.0); + cc->line_to(pos, winh - 0.0); + cc->stroke(); +} + +Gtk::SizeRequestMode HistogramRGBAreaHori::get_request_mode_vfunc () const +{ + return Gtk::SIZE_REQUEST_HEIGHT_FOR_WIDTH; +} + +void HistogramRGBAreaHori::get_preferred_height_vfunc (int &minimum_height, int &natural_height) const +{ + getPreferredThickness(minimum_height, natural_height); +} + +void HistogramRGBAreaHori::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const +{ + getPreferredLength(minimum_width, natural_width); +} + +void HistogramRGBAreaHori::get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const +{ + getPreferredThicknessForLength(width, minimum_height, natural_height); +} + +void HistogramRGBAreaHori::get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const +{ + getPreferredLengthForThickness(height, minimum_width, natural_width); +} + +void HistogramRGBAreaVert::drawBar(Cairo::RefPtr cc, double value, double max_value, int winw, int winh, double scale) +{ + double pos; + if (options.histogramDrawMode < 2 || options.histogramScopeType == ScopeType::PARADE || options.histogramScopeType == ScopeType::WAVEFORM) { + pos = padding + value * (winh - padding * 2.0 - 1) / max_value + 0.5 * scale; + } else { + pos = padding + HistogramScaling::log (max_value, value) * (winh - padding * 2.0) / max_value + 0.5 * scale; + } + cc->move_to(0.0, winh - pos); + cc->line_to(winw, winh - pos); + cc->stroke(); +} + +Gtk::SizeRequestMode HistogramRGBAreaVert::get_request_mode_vfunc () const +{ + return Gtk::SIZE_REQUEST_WIDTH_FOR_HEIGHT; +} + +void HistogramRGBAreaVert::get_preferred_height_vfunc (int &minimum_height, int &natural_height) const +{ + getPreferredLength(minimum_height, natural_height); +} + +void HistogramRGBAreaVert::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const +{ + minimum_width = 10 * RTScalable::getScale(); + natural_width = minimum_width; +} + +void HistogramRGBAreaVert::get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const +{ + getPreferredLengthForThickness(width, minimum_height, natural_height); +} + +void HistogramRGBAreaVert::get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const +{ + get_preferred_width_vfunc(minimum_width, natural_width); +} + // // // // HistogramArea HistogramArea::HistogramArea (DrawModeListener *fml) : + vectorscope_scale(0), + vect_hc(0, 0), vect_hs(0, 0), + vect_hc_buffer_dirty(true), vect_hs_buffer_dirty(true), + waveform_scale(0), + rwave(0, 0), gwave(0, 0),bwave(0, 0), lwave(0, 0), + parade_buffer_r_dirty(true), parade_buffer_g_dirty(true), parade_buffer_b_dirty(true), + wave_buffer_dirty(true), wave_buffer_luma_dirty(true), valid(false), drawMode(options.histogramDrawMode), myDrawModeListener(fml), + scopeType(options.histogramScopeType), oldwidth(-1), oldheight(-1), + trace_brightness(1.0), needRed(options.histogramRed), needGreen(options.histogramGreen), needBlue(options.histogramBlue), - needLuma(options.histogramLuma), needChroma(options.histogramChroma), rawMode(options.histogramRAW), - isPressed(false), movingPosition(0.0) + needLuma(options.histogramLuma), needChroma(options.histogramChroma), + isPressed(false), movingPosition(0.0), + needPointer(options.histogramBar), + pointer_red(-1), pointer_green(-1), pointer_blue(-1), + pointer_a(0), pointer_b(0) { rhist(256); @@ -703,7 +1103,7 @@ Gtk::SizeRequestMode HistogramArea::get_request_mode_vfunc () const void HistogramArea::get_preferred_height_vfunc (int &minimum_height, int &natural_height) const { - int s = (int)RTScalable::getScale(); + int s = RTScalable::getScale(); minimum_height = 100 * s; natural_height = 200 * s; } @@ -711,7 +1111,7 @@ void HistogramArea::get_preferred_height_vfunc (int &minimum_height, int &natura void HistogramArea::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const { - int s = (int)RTScalable::getScale(); + int s = RTScalable::getScale(); minimum_width = 200 * s; natural_width = 400 * s; } @@ -728,18 +1128,23 @@ void HistogramArea::get_preferred_width_for_height_vfunc (int height, int &minim get_preferred_width_vfunc (minimum_width, natural_width); } -void HistogramArea::updateOptions (bool r, bool g, bool b, bool l, bool c, bool raw, int mode) +void HistogramArea::updateOptions (bool r, bool g, bool b, bool l, bool c, int mode, ScopeType type, bool pointer) { + wave_buffer_dirty = wave_buffer_dirty || needRed != r || needGreen != g || needBlue != b; options.histogramRed = needRed = r; options.histogramGreen = needGreen = g; options.histogramBlue = needBlue = b; options.histogramLuma = needLuma = l; options.histogramChroma = needChroma = c; - options.histogramRAW = rawMode = raw; options.histogramDrawMode = drawMode = mode; + options.histogramScopeType = scopeType = type; + options.histogramBar = needPointer = pointer; +} - updateBackBuffer (); +bool HistogramArea::updatePending(void) +{ + return haih->pending > 0 && !haih->destroyed; } void HistogramArea::update( @@ -750,18 +1155,53 @@ void HistogramArea::update( const LUTu& histChroma, const LUTu& histRedRaw, const LUTu& histGreenRaw, - const LUTu& histBlueRaw + const LUTu& histBlueRaw, + int vectorscopeScale, + const array2D& vectorscopeHC, + const array2D& vectorscopeHS, + int waveformScale, + const array2D& waveformRed, + const array2D& waveformGreen, + const array2D& waveformBlue, + const array2D& waveformLuma ) { if (histRed) { - rhist = histRed; - ghist = histGreen; - bhist = histBlue; - lhist = histLuma; - chist = histChroma; - rhistRaw = histRedRaw; - ghistRaw = histGreenRaw; - bhistRaw = histBlueRaw; + switch (scopeType) { + case ScopeType::HISTOGRAM: + rhist = histRed; + ghist = histGreen; + bhist = histBlue; + lhist = histLuma; + chist = histChroma; + break; + case ScopeType::HISTOGRAM_RAW: + rhistRaw = histRedRaw; + ghistRaw = histGreenRaw; + bhistRaw = histBlueRaw; + break; + case ScopeType::PARADE: + case ScopeType::WAVEFORM: + waveform_scale = waveformScale; + rwave = waveformRed; + gwave = waveformGreen; + bwave = waveformBlue; + lwave = waveformLuma; + parade_buffer_r_dirty = parade_buffer_g_dirty = parade_buffer_b_dirty = wave_buffer_dirty = wave_buffer_luma_dirty = true; + break; + case ScopeType::VECTORSCOPE_HS: + vectorscope_scale = vectorscopeScale; + vect_hs = vectorscopeHS; + vect_hs_buffer_dirty = true; + break; + case ScopeType::VECTORSCOPE_HC: + vectorscope_scale = vectorscopeScale; + vect_hc = vectorscopeHC; + vect_hc_buffer_dirty = true; + break; + case ScopeType::NONE: + break; + } valid = true; } else { valid = false; @@ -796,7 +1236,6 @@ void HistogramArea::update( void HistogramArea::updateBackBuffer () { - if (!get_realized ()) { return; } @@ -830,40 +1269,53 @@ void HistogramArea::updateBackBuffer () cr->set_dash (ch_ds, 0); // determine the number of h-gridlines based on current h - int nrOfHGridPartitions = (int)rtengine::min (16.0, pow (2.0, floor ((h - 100) / 250) + 2)); + int nrOfHGridPartitions = static_cast(rtengine::min (16.0, pow (2.0, floor ((h - 100) / 250) + 2))); int nrOfVGridPartitions = 8; // always show 8 stops (lines at 1,3,7,15,31,63,127) // draw vertical gridlines - for (int i = 0; i <= nrOfVGridPartitions; i++) { - double xpos = padding + 0.5; - if (options.histogramDrawMode < 2) { - xpos += (pow(2.0,i) - 1) * (w - padding * 2.0) / 255.0; - } else { - xpos += HistogramScaling::log (255, pow(2.0,i) - 1) * (w - padding * 2.0) / 255.0; + if (options.histogramScopeType == ScopeType::HISTOGRAM || options.histogramScopeType == ScopeType::HISTOGRAM_RAW) { + for (int i = 0; i <= nrOfVGridPartitions; i++) { + double xpos = padding + 0.5; + if (options.histogramDrawMode < 2) { + xpos += (pow(2.0,i) - 1) * (w - padding * 2.0) / 255.0; + } else { + xpos += HistogramScaling::log (255, pow(2.0,i) - 1) * (w - padding * 2.0) / 255.0; + } + cr->move_to (xpos, 0.); + cr->line_to (xpos, h); + cr->stroke (); } - cr->move_to (xpos, 0.); - cr->line_to (xpos, h); - cr->stroke (); } // draw horizontal gridlines - if (options.histogramDrawMode == 0) { - for (int i = 1; i < nrOfHGridPartitions; i++) { - cr->move_to (padding, i * (double)h / nrOfHGridPartitions + 0.5); - cr->line_to (w - padding, i * (double)h / nrOfHGridPartitions + 0.5); + if (options.histogramScopeType == ScopeType::PARADE || options.histogramScopeType == ScopeType::WAVEFORM) { + for (int i = 0; i <= nrOfVGridPartitions; i++) { + const double ypos = h - padding - (pow(2.0,i) - 1) * (h - 2 * padding - 1) / 255.0; + cr->move_to(0, ypos); + cr->line_to(w, ypos); + cr->stroke(); + } + } else if (options.histogramScopeType == ScopeType::VECTORSCOPE_HC || options.histogramScopeType == ScopeType::VECTORSCOPE_HS) { + // Vectorscope has no gridlines. + } else if (options.histogramDrawMode == 0) { + for (int i = 1; i < nrOfHGridPartitions; i++) { + cr->move_to (padding, i * static_cast(h) / nrOfHGridPartitions + 0.5); + cr->line_to (w - padding, i * static_cast(h) / nrOfHGridPartitions + 0.5); cr->stroke (); } } else { for (int i = 1; i < nrOfHGridPartitions; i++) { - cr->move_to (padding, h - HistogramScaling::log (h, i * (double)h / nrOfHGridPartitions) + 0.5); - cr->line_to (w - padding, h - HistogramScaling::log (h, i * (double)h / nrOfHGridPartitions) + 0.5); + cr->move_to (padding, h - HistogramScaling::log (h, i * static_cast(h) / nrOfHGridPartitions) + 0.5); + cr->line_to (w - padding, h - HistogramScaling::log (h, i * static_cast(h) / nrOfHGridPartitions) + 0.5); cr->stroke (); } } cr->unset_dash(); - if (valid) { + if (valid && (scopeType == ScopeType::HISTOGRAM || scopeType == ScopeType::HISTOGRAM_RAW)) { + bool rawMode = scopeType == ScopeType::HISTOGRAM_RAW; + // For RAW mode use the other hists LUTu& rh = rawMode ? rhistRaw : rhist; LUTu& gh = rawMode ? ghistRaw : ghist; @@ -970,6 +1422,12 @@ void HistogramArea::updateBackBuffer () drawMarks(cr, bhchanged, realhistheight, w, ui, oi); } + } else if (scopeType == ScopeType::PARADE && rwave.getWidth() > 0) { + drawParade(cr, w, h); + } else if (scopeType == ScopeType::WAVEFORM && rwave.getWidth() > 0) { + drawWaveform(cr, w, h); + } else if (scopeType == ScopeType::VECTORSCOPE_HC || scopeType == ScopeType::VECTORSCOPE_HS) { + drawVectorscope(cr, w, h); } // Draw the frame's border @@ -981,6 +1439,24 @@ void HistogramArea::updateBackBuffer () setDirty(false); } +bool HistogramArea::updatePointer(int r, int g, int b, const Glib::ustring &profile, const Glib::ustring &profileW) +{ + if (!needPointer || !(scopeType == ScopeType::VECTORSCOPE_HC || scopeType == ScopeType::VECTORSCOPE_HS)) { + return false; + } + if (pointer_red == r && pointer_green == g && pointer_blue == b) { + return false; + } + + float L; + pointer_red = r; + pointer_green = g; + pointer_blue = b; + Color::rgb2lab01(profile, profileW, r / 255.f, g / 255.f, b / 255.f, L, pointer_a, pointer_b, options.rtSettings.HistogramWorking); + updateBackBuffer(); + return true; +} + void HistogramArea::on_realize () { @@ -998,15 +1474,15 @@ void HistogramArea::drawCurve(Cairo::RefPtr &cr, scale = scale <= 0.0 ? 0.001 : scale; // avoid division by zero and negative values for (int i = 0; i < 256; i++) { - double val = data[i] * (double)vsize / scale; + double val = data[i] * static_cast(vsize) / scale; if (drawMode > 0) { // scale y for single and double log-scale - val = HistogramScaling::log ((double)vsize, val); + val = HistogramScaling::log (static_cast(vsize), val); } double iscaled = i; if (drawMode == 2) { // scale x for double log-scale - iscaled = HistogramScaling::log (255.0, (double)i); + iscaled = HistogramScaling::log (255.0, static_cast(i)); } double posX = padding + iscaled * (hsize - padding * 2.0) / 255.0; @@ -1034,10 +1510,379 @@ void HistogramArea::drawMarks(Cairo::RefPtr &cr, cr->fill(); } +void HistogramArea::drawParade(Cairo::RefPtr &cr, int w, int h) +{ + // Arbitrary scale factor divided by current scale. + const float scale = trace_brightness * 32.f * 255.f / waveform_scale; + const int wave_width = rwave.getWidth(); + const int wave_height = rwave.getHeight(); + + // See Cairo documentation on stride. + const int cairo_stride = Cairo::ImageSurface::format_stride_for_width(Cairo::FORMAT_ARGB32, rwave.getWidth()); + const auto buffer_size = static_cast::size_type>(wave_height) * cairo_stride; + + if (parade_buffer_r_dirty && needRed) { + parade_buffer_r.assign(buffer_size, 0); + assert(parade_buffer_r.size() % 4 == 0); + + for (int val = 0; val < wave_height; val++) { + const int* const r_row = rwave[val]; + std::uint32_t* const buffer_r_row = reinterpret_cast(parade_buffer_r.data() + (255 - val) * cairo_stride); + for (int col = 0; col < wave_width; col++) { + const unsigned char r = std::min(scale * r_row[col], 0xff); + if (r != 0) { + buffer_r_row[col] = (r << 16) | (r << 24); + } + } + } + + parade_buffer_r_dirty = false; + } + + if (parade_buffer_g_dirty && needGreen) { + parade_buffer_g.assign(buffer_size, 0); + assert(parade_buffer_g.size() % 4 == 0); + + for (int val = 0; val < wave_height; val++) { + const int* const g_row = gwave[val]; + std::uint32_t* const buffer_g_row = reinterpret_cast(parade_buffer_g.data() + (255 - val) * cairo_stride); + for (int col = 0; col < wave_width; col++) { + const unsigned char g = std::min(scale * g_row[col], 0xff); + if (g != 0) { + buffer_g_row[col] = (g << 8) | (g << 24); + } + } + } + + parade_buffer_g_dirty = false; + } + + if (parade_buffer_b_dirty && needBlue) { + parade_buffer_b.assign(buffer_size, 0); + assert(parade_buffer_b.size() % 4 == 0); + + for (int val = 0; val < wave_height; val++) { + const int* const b_row = bwave[val]; + std::uint32_t* const buffer_b_row = reinterpret_cast(parade_buffer_b.data() + (255 - val) * cairo_stride); + for (int col = 0; col < wave_width; col++) { + const unsigned char b = std::min(scale * b_row[col], 0xff); + if (b != 0) { + const unsigned char green = b / 2; // Make blue easier to see. + buffer_b_row[col] = b | (green << 8) | (b << 24); + } + } + } + + parade_buffer_b_dirty = false; + } + + if (wave_buffer_luma_dirty && needLuma) { + wave_buffer_luma.assign(buffer_size, 0); + assert(wave_buffer_luma.size() % 4 == 0); + + for (int val = 0; val < wave_height; val++) { + const int* const l_row = lwave[val]; + std::uint32_t* const buffer_row = + reinterpret_cast(wave_buffer_luma.data() + (255 - val) * cairo_stride); + for (int col = 0; col < wave_width; col++) { + const unsigned char l = std::min(scale * l_row[col], 0xff); + buffer_row[col] = l | (l << 8) | (l << 16) | (l << 24); + } + } + + wave_buffer_luma_dirty = false; + } + + std::vector buffers; + if (needLuma) { + buffers.push_back(wave_buffer_luma.data()); + } + if (needRed) { + buffers.push_back(parade_buffer_r.data()); + } + if (needGreen) { + buffers.push_back(parade_buffer_g.data()); + } + if (needBlue) { + buffers.push_back(parade_buffer_b.data()); + } + + auto orig_matrix = cr->get_matrix(); + const double display_wave_width = static_cast(w) / buffers.size(); + for (unsigned i = 0; i < buffers.size(); i++) { + Cairo::RefPtr surface; + cr->translate(i * display_wave_width, padding); + cr->scale(display_wave_width / wave_width, (h - 2 * padding) / wave_height); + surface = Cairo::ImageSurface::create( + buffers[i], Cairo::FORMAT_ARGB32, wave_width, wave_height, cairo_stride); + cr->set_source(surface, 0, 0); + cr->set_operator(Cairo::OPERATOR_OVER); + cr->paint(); + surface->finish(); + cr->set_matrix(orig_matrix); + } +} + +void HistogramArea::drawVectorscope(Cairo::RefPtr &cr, int w, int h) +{ + if (scopeType != ScopeType::VECTORSCOPE_HC && scopeType != ScopeType::VECTORSCOPE_HS) { + return; + } + + const auto& vect = (scopeType == ScopeType::VECTORSCOPE_HC) ? vect_hc : vect_hs; + auto& vect_buffer = (scopeType == ScopeType::VECTORSCOPE_HC) ? vect_hc_buffer : vect_hs_buffer; + auto& vect_buffer_dirty = (scopeType == ScopeType::VECTORSCOPE_HC) ? vect_hc_buffer_dirty : vect_hs_buffer_dirty; + + const int vect_width = vect.getWidth(); + const int vect_height = vect.getHeight(); + // Arbitrary scale factor multiplied by vectorscope area and divided by + // current scale. + const float scale = trace_brightness * 8.f * vect_width * vect_height / vectorscope_scale; + + // See Cairo documentation on stride. + const int cairo_stride = Cairo::ImageSurface::format_stride_for_width(Cairo::FORMAT_ARGB32, vect_width); + + if (vect_buffer_dirty && vectorscope_scale > 0) { + if (vect_buffer.size() != static_cast(cairo_stride) * vect_height) { + vect_buffer.resize(static_cast(cairo_stride) * vect_height); + } + + assert(vect_buffer.size() % 4 == 0); + + for (int y = 0; y < vect_height; y++) { + const int* const vect_row = vect[y]; + std::uint32_t* const buffer_row = + reinterpret_cast(vect_buffer.data() + (vect_height - 1 - y) * cairo_stride); + for (int x = 0; x < vect_width; x++) { + const unsigned char value = std::min(scale * vect_row[x], 0xff); + buffer_row[x] = value | (value << 8) | (value << 16) | (value << 24); + } + } + + vect_buffer_dirty = false; + } + + const bool fit_width = + vect_width * (h - 2 * padding) > vect_height * (w - 2 * padding); + const float scope_scale = fit_width ? + (w - 2 * padding) / vect_width : (h - 2 * padding) / vect_height; + const float scope_size = (vectorscope_scale > 0) ? + scope_scale * std::max(vect_width, vect_height) : std::min(w, h) - 2 * padding; + const float o_x = (w - scope_scale * vect_width) / 2; + const float o_y = (h - scope_scale * vect_height) / 2; + const double s = RTScalable::getScale(); + auto orig_matrix = cr->get_matrix(); + const double line_length = scope_size / 2.0; + std::valarray ch_ds(1); + + cr->translate(w / 2.0, h / 2.0); + cr->set_line_width (1.0 * s); + cr->set_antialias(Cairo::ANTIALIAS_SUBPIXEL); + ch_ds[0] = 4; + + if (scopeType == ScopeType::VECTORSCOPE_HS) { // Hue-Saturation. + // RYGCBM lines. + cr->set_line_width (2.0 * s); + constexpr double color_labels[6][3] = { + {1, 0, 0}, // R + {0, 1, 0}, // G + {0, 0, 1}, // B + {0, 1, 1}, // C + {1, 0, 1}, // M + {1, 1, 0}, // Y + }; + for (int i = 0; i < 3; i++) { + auto gradient = Cairo::LinearGradient::create(-line_length, 0, line_length, 0); + const double (&color_1)[3] = color_labels[i]; + const double (&color_2)[3] = color_labels[i + 3]; + cr->set_source(gradient); + gradient->add_color_stop_rgba(0, color_2[0], color_2[1], color_2[2], 0.5); + gradient->add_color_stop_rgba(0.5, 1, 1, 1, 0.25); + gradient->add_color_stop_rgba(1, color_1[0], color_1[1], color_1[2], 0.5); + cr->move_to(-line_length, 0); + cr->line_to(line_length, 0); + cr->rotate_degrees(-120); + cr->stroke(); + } + cr->set_line_width (1.0 * s); + cr->set_source_rgba (1, 1, 1, 0.25); + // 100% saturation circle. + cr->arc(0, 0, scope_size / 2.0, 0, 2 * RT_PI); + cr->stroke(); + // 25%, 50%, and 75% saturation. + cr->set_dash(ch_ds, 0); + for (int i = 1; i < 4; i++) { + cr->arc(0, 0, i * scope_size / 8.0, 0, 2 * RT_PI); + cr->stroke(); + } + // HSV skin tone line derived from -I axis of YIQ. + cr->rotate(-0.134900 * RT_PI); + cr->move_to(0, 0); + cr->line_to(line_length, 0); + cr->stroke(); + cr->unset_dash(); + } else if (scopeType == ScopeType::VECTORSCOPE_HC) { // Hue-Chroma. + // a and b axes. + Cairo::RefPtr gradient; + cr->set_line_width (2.0 * s); + gradient = Cairo::LinearGradient::create(0, -line_length, 0, line_length); + cr->set_source(gradient); + gradient->add_color_stop_rgba(0, 1, 1, 0, 0.5); // "yellow" + gradient->add_color_stop_rgba(0.5, 1, 1, 1, 0.25); // neutral + gradient->add_color_stop_rgba(1, 0, 0, 1, 0.5); // "blue" + cr->move_to(0, 0); + cr->line_to(0, line_length); + cr->move_to(0, 0); + cr->line_to(0, -line_length); + cr->stroke(); + gradient = Cairo::LinearGradient::create(-line_length, 0, line_length, 0); + cr->set_source(gradient); + gradient->add_color_stop_rgba(0, 0, 1, 0, 0.5); // "green" + gradient->add_color_stop_rgba(0.5, 1, 1, 1, 0.25); // neutral + gradient->add_color_stop_rgba(1, 1, 0, 1, 0.5); // "magenta" + cr->move_to(0, 0); + cr->line_to(line_length, 0); + cr->move_to(0, 0); + cr->line_to(-line_length, 0); + cr->stroke(); + cr->set_source_rgba (1, 1, 1, 0.25); + cr->set_line_width (1.0 * s); + // 25%, 50%, 75%, and 100% of standard chroma range. + cr->set_dash(ch_ds, 0); + for (int i = 1; i <= 4; i++) { + cr->arc(0, 0, i * scope_size / 8.0, 0, 2 * RT_PI); + cr->stroke(); + } + // CIELAB skin tone line, approximated by 50% saturation and + // value along the HSV skin tone line. + cr->rotate(-0.321713 * RT_PI); + cr->move_to(0, 0); + cr->line_to(line_length, 0); + cr->stroke(); + cr->unset_dash(); + } + cr->set_matrix(orig_matrix); + + // Vectorscope trace. + if (vectorscope_scale > 0) { + Cairo::RefPtr surface = Cairo::ImageSurface::create( + vect_buffer.data(), Cairo::FORMAT_ARGB32, vect_width, vect_height, cairo_stride); + cr->translate(o_x, o_y); + cr->scale(scope_scale, scope_scale); + cr->set_source(surface, 0, 0); + cr->set_operator(Cairo::OPERATOR_OVER); + cr->paint(); + surface->finish(); + cr->set_matrix(orig_matrix); + + if (needPointer && pointer_red >= 0 && pointer_green >= 0 && pointer_blue >= 0) { + float cx, cy; + if (scopeType == ScopeType::VECTORSCOPE_HS) { + float H, S, L; + Color::rgb2hslfloat(pointer_red * 257.f, pointer_green * 257.f, pointer_blue * 257.f, H, S, L); + cx = (w + scope_size * S * std::cos(H * 2 * RT_PI_F)) / 2; + cy = (h - scope_size * S * std::sin(H * 2 * RT_PI_F)) / 2; + } else { + constexpr float ab_factor = 1.f / 256.f; + cx = w / 2.f + scope_size * pointer_a * ab_factor; + cy = h / 2.f - scope_size * pointer_b * ab_factor; + } + const float crosshair_size = 20.f * s; + cr->set_source_rgba(1, 1, 1, 0.5); + cr->move_to(cx - crosshair_size, cy); + cr->line_to(cx + crosshair_size, cy); + cr->move_to(cx, cy - crosshair_size); + cr->line_to(cx, cy + crosshair_size); + cr->stroke(); + cr->arc(cx, cy, 3 * s, 0, 2 * RT_PI); + cr->set_source_rgb(1, 1, 1); + cr->fill_preserve(); + cr->set_source_rgb(0, 0, 0); + cr->set_line_width (1.0 * s); + cr->stroke(); + } + } +} + +void HistogramArea::drawWaveform(Cairo::RefPtr &cr, int w, int h) +{ + // Arbitrary scale factor divided by current scale. + const float scale = trace_brightness * 32.f * 255.f / waveform_scale; + const int wave_width = rwave.getWidth(); + const int wave_height = rwave.getHeight(); + + // See Cairo documentation on stride. + const int cairo_stride = Cairo::ImageSurface::format_stride_for_width(Cairo::FORMAT_ARGB32, rwave.getWidth()); + const auto buffer_size = static_cast::size_type>(wave_height) * cairo_stride; + + if (wave_buffer_dirty && (needRed || needGreen || needBlue)) { + wave_buffer.assign(buffer_size, 0); + assert(wave_buffer.size() % 4 == 0); + + for (int val = 0; val < wave_height; val++) { + const int* const r_row = rwave[val]; + const int* const g_row = gwave[val]; + const int* const b_row = bwave[val]; + std::uint32_t* const buffer_row = reinterpret_cast(wave_buffer.data() + (255 - val) * cairo_stride); + for (int col = 0; col < wave_width; col++) { + const unsigned char r = needRed ? std::min(scale * r_row[col], 0xff) : 0; + const unsigned char g = needGreen ? std::min(scale * g_row[col], 0xff) : 0; + const unsigned char b = needBlue ? std::min(scale * b_row[col], 0xff) : 0; + const unsigned char value = rtengine::max(r, g, b); + if (value != 0) { + // Ensures correct order regardless of endianness. + buffer_row[col] = b | (g << 8) | (r << 16) | (value << 24); + } + } + } + + wave_buffer_dirty = false; + } + + if (wave_buffer_luma_dirty && needLuma) { + wave_buffer_luma.assign(buffer_size, 0); + assert(wave_buffer_luma.size() % 4 == 0); + + for (int val = 0; val < wave_height; val++) { + const int* const l_row = lwave[val]; + std::uint32_t* const buffer_row = + reinterpret_cast(wave_buffer_luma.data() + (255 - val) * cairo_stride); + for (int col = 0; col < wave_width; col++) { + const unsigned char l = std::min(scale * l_row[col], 0xff); + buffer_row[col] = l | (l << 8) | (l << 16) | (l << 24); + } + } + + wave_buffer_luma_dirty = false; + } + + Cairo::RefPtr surface; + auto orig_matrix = cr->get_matrix(); + cr->translate(0, padding); + cr->scale(static_cast(w) / wave_width, (h - 2 * padding) / wave_height); + if (needLuma) { + surface = Cairo::ImageSurface::create( + wave_buffer_luma.data(), Cairo::FORMAT_ARGB32, wave_width, wave_height, cairo_stride); + cr->set_source(surface, 0, 0); + cr->set_operator(Cairo::OPERATOR_OVER); + cr->paint(); + surface->finish(); + } + if (needRed || needGreen || needBlue) { + surface = Cairo::ImageSurface::create( + wave_buffer.data(), Cairo::FORMAT_ARGB32, wave_width, wave_height, cairo_stride); + cr->set_source(surface, 0, 0); + cr->set_operator(Cairo::OPERATOR_OVER); + cr->paint(); + surface->finish(); + } + cr->set_matrix(orig_matrix); +} + bool HistogramArea::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) { - if (get_width() != oldwidth || get_height() != oldheight || isDirty ()) { + if (!updatePending() && (get_width() != oldwidth || get_height() != oldheight || isDirty())) { updateBackBuffer (); } @@ -1054,7 +1899,10 @@ bool HistogramArea::on_button_press_event (GdkEventButton* event) isPressed = true; movingPosition = event->x; - if (event->type == GDK_2BUTTON_PRESS && event->button == 1) { + if ( + event->type == GDK_2BUTTON_PRESS && event->button == 1 + && (scopeType == ScopeType::HISTOGRAM || scopeType == ScopeType::HISTOGRAM_RAW) + ) { drawMode = (drawMode + 1) % 3; options.histogramDrawMode = (options.histogramDrawMode + 1) % 3; @@ -1078,8 +1926,18 @@ bool HistogramArea::on_button_release_event (GdkEventButton* event) bool HistogramArea::on_motion_notify_event (GdkEventMotion* event) { - if (isPressed) - { + if ( + drawMode == 0 + && (scopeType == ScopeType::HISTOGRAM || scopeType == ScopeType::HISTOGRAM_RAW) + ) { + return false; + } + + if (!isPressed) { + return true; + } + + if (scopeType == ScopeType::HISTOGRAM || scopeType == ScopeType::HISTOGRAM_RAW) { // Adjust log scale. double mod = 1 + (event->x - movingPosition) / get_width(); factor /= mod; @@ -1092,11 +1950,45 @@ bool HistogramArea::on_motion_notify_event (GdkEventMotion* event) setDirty(true); queue_draw (); + } else if ( + scopeType == ScopeType::PARADE + || scopeType == ScopeType::WAVEFORM + || scopeType == ScopeType::VECTORSCOPE_HC + || scopeType == ScopeType::VECTORSCOPE_HS + ) { // Adjust brightness. + constexpr float RANGE = MAX_BRIGHT / MIN_BRIGHT; + double dx = (event->x - movingPosition) / get_width(); + float new_brightness = LIM(trace_brightness * pow(RANGE, dx), MIN_BRIGHT, MAX_BRIGHT); + setBrightness(new_brightness); + movingPosition = event->x; } return true; } +float HistogramArea::getBrightness(void) +{ + return trace_brightness; +} + +void HistogramArea::setBrightness(float brightness) +{ + brightness = LIM(brightness, MIN_BRIGHT, MAX_BRIGHT); + if (brightness != trace_brightness) { + parade_buffer_r_dirty = parade_buffer_g_dirty = parade_buffer_b_dirty = wave_buffer_dirty = wave_buffer_luma_dirty = vect_hc_buffer_dirty = vect_hs_buffer_dirty = true; + trace_brightness = brightness; + setDirty(true); + queue_draw(); + + signal_brightness_changed.emit(trace_brightness); + } +} + +HistogramArea::SignalBrightnessChanged HistogramArea::getBrighnessChangedSignal(void) +{ + return signal_brightness_changed; +} + HistogramArea::type_signal_factor_changed HistogramArea::signal_factor_changed() { return sigFactorChanged; diff --git a/rtgui/histogrampanel.h b/rtgui/histogrampanel.h index 740b0a12c..393df51a5 100644 --- a/rtgui/histogrampanel.h +++ b/rtgui/histogrampanel.h @@ -18,6 +18,8 @@ */ #pragma once +#include + #include #include @@ -26,8 +28,10 @@ #include "delayed.h" #include "guiutils.h" +#include "options.h" #include "pointermotionlistener.h" +#include "../rtengine/array2D.h" #include "../rtengine/LUT.h" #include "../rtengine/noncopyable.h" @@ -54,7 +58,7 @@ public: double log (double vsize, double val); }; -class HistogramRGBArea final : public Gtk::DrawingArea, public BackBuffer, private HistogramScaling, public rtengine::NonCopyable +class HistogramRGBArea : public Gtk::DrawingArea, public BackBuffer, protected HistogramScaling, public rtengine::NonCopyable { private: typedef const double (*TMatrix)[3]; @@ -74,7 +78,6 @@ protected: bool needBlue; bool needLuma; bool needChroma; - bool rawMode; bool showMode; bool barDisplayed; @@ -84,32 +87,58 @@ protected: HistogramRGBAreaIdleHelper* harih; + /** Draw an indicator bar for the value. */ + virtual void drawBar(Cairo::RefPtr cc, double value, double max_value, int winw, int winh, double scale) = 0; + + void getPreferredThickness(int& min_thickness, int& natural_length) const; + void getPreferredLength(int& min_length, int& natural_length) const; + void getPreferredThicknessForLength(int length, int& min_thickness, int& natural_length) const; + void getPreferredLengthForThickness(int thickness, int& min_length, int& natural_length) const; + public: HistogramRGBArea(); ~HistogramRGBArea() override; void updateBackBuffer (int r, int g, int b, const Glib::ustring &profile = "", const Glib::ustring &profileW = ""); bool getShow (); + void setShow(bool show); void setParent (Gtk::Grid* p) { parent = p; }; void update (int val, int rh, int gh, int bh); - void updateOptions (bool r, bool g, bool b, bool l, bool c, bool raw, bool show); + void updateOptions (bool r, bool g, bool b, bool l, bool c, bool show); void on_realize() override; bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) override; bool on_button_press_event (GdkEventButton* event) override; void factorChanged (double newFactor); +}; + +class HistogramRGBAreaHori final : public HistogramRGBArea +{ private: + void drawBar(Cairo::RefPtr cc, double value, double max_value, int winw, int winh, double scale) override; + Gtk::SizeRequestMode get_request_mode_vfunc () const override; void get_preferred_height_vfunc (int& minimum_height, int& natural_height) const override; void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const override; void get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const override; void get_preferred_width_for_height_vfunc (int h, int &minimum_width, int &natural_width) const override; +}; +class HistogramRGBAreaVert final : public HistogramRGBArea +{ +private: + void drawBar(Cairo::RefPtr cc, double value, double max_value, int winw, int winh, double scale) override; + + Gtk::SizeRequestMode get_request_mode_vfunc () const override; + void get_preferred_height_vfunc (int& minimum_height, int& natural_height) const override; + void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const override; + void get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const override; + void get_preferred_width_for_height_vfunc (int h, int &minimum_width, int &natural_width) const override; }; class DrawModeListener @@ -123,7 +152,10 @@ class HistogramArea final : public Gtk::DrawingArea, public BackBuffer, private { public: typedef sigc::signal type_signal_factor_changed; + typedef sigc::signal SignalBrightnessChanged; + static constexpr float MIN_BRIGHT = 0.1; + static constexpr float MAX_BRIGHT = 3; private: IdleRegister idle_register; type_signal_factor_changed sigFactorChanged; @@ -131,26 +163,49 @@ private: protected: LUTu rhist, ghist, bhist, lhist, chist; LUTu rhistRaw, ghistRaw, bhistRaw, lhistRaw; //lhistRaw is unused? + int vectorscope_scale; + array2D vect_hc, vect_hs; + std::vector vect_hc_buffer, vect_hs_buffer; + bool vect_hc_buffer_dirty, vect_hs_buffer_dirty; + int waveform_scale; + array2D rwave, gwave, bwave, lwave; + std::vector parade_buffer_r; + std::vector parade_buffer_g; + std::vector parade_buffer_b; + bool parade_buffer_r_dirty, parade_buffer_g_dirty, parade_buffer_b_dirty; + std::vector wave_buffer; + std::vector wave_buffer_luma; + bool wave_buffer_dirty, wave_buffer_luma_dirty; bool valid; int drawMode; DrawModeListener *myDrawModeListener; + Options::ScopeType scopeType; int oldwidth, oldheight; + /// Intensity of waveform and vectorscope trace. + float trace_brightness; bool needRed, needGreen, needBlue, needLuma, needChroma; - bool rawMode; bool isPressed; double movingPosition; + bool needPointer; double padding = 5.0; HistogramAreaIdleHelper* haih; + int pointer_red, pointer_green, pointer_blue; + float pointer_a, pointer_b; + + SignalBrightnessChanged signal_brightness_changed; + public: explicit HistogramArea(DrawModeListener *fml = nullptr); ~HistogramArea() override; void updateBackBuffer (); + /// Update pointer values. Returns true if widget needs redrawing. + bool updatePointer(int r, int g, int b, const Glib::ustring &profile = "", const Glib::ustring &profileW = ""); void update( const LUTu& histRed, const LUTu& histGreen, @@ -159,19 +214,35 @@ public: const LUTu& histChroma, const LUTu& histRedRaw, const LUTu& histGreenRaw, - const LUTu& histBlueRaw + const LUTu& histBlueRaw, + int vectorscopeScale, + const array2D& vectorscopeHC, + const array2D& vectorscopeHS, + int waveformScale, + const array2D& waveformRed, + const array2D& waveformGreen, + const array2D& waveformBlue, + const array2D& waveformLuma ); - void updateOptions (bool r, bool g, bool b, bool l, bool c, bool raw, int mode); + void updateOptions (bool r, bool g, bool b, bool l, bool c, int mode, Options::ScopeType type, bool pointer); + bool updatePending(); void on_realize() override; bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) override; bool on_button_press_event (GdkEventButton* event) override; bool on_button_release_event (GdkEventButton* event) override; bool on_motion_notify_event (GdkEventMotion* event) override; + float getBrightness(void); + /** Set the trace brightness, with 1 being normal. */ + void setBrightness(float brightness); + SignalBrightnessChanged getBrighnessChangedSignal(void); type_signal_factor_changed signal_factor_changed(); private: void drawCurve(Cairo::RefPtr &cr, const LUTu & data, double scale, int hsize, int vsize); void drawMarks(Cairo::RefPtr &cr, const LUTu & data, double scale, int hsize, int & ui, int & oi); + void drawParade(Cairo::RefPtr &cr, int hsize, int vsize); + void drawVectorscope(Cairo::RefPtr &cr, int hsize, int vsize); + void drawWaveform(Cairo::RefPtr &cr, int hsize, int vsize); Gtk::SizeRequestMode get_request_mode_vfunc () const override; void get_preferred_height_vfunc (int& minimum_height, int& natural_height) const override; void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const override; @@ -179,6 +250,12 @@ private: void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const override; }; +class HistogramPanelListener +{ +public: + virtual void scopeTypeChanged(Options::ScopeType new_type) = 0; +}; + class HistogramPanel final : public Gtk::Grid, public PointerMotionListener, public DrawModeListener, public rtengine::NonCopyable { private: @@ -188,22 +265,33 @@ protected: Gtk::Grid* gfxGrid; Gtk::Grid* buttonGrid; + Gtk::Box* persistentButtons; + Gtk::Box* optionButtons; HistogramArea* histogramArea; HistogramRGBArea* histogramRGBArea; + std::unique_ptr histogramRGBAreaHori; + std::unique_ptr histogramRGBAreaVert; Gtk::ToggleButton* showRed; Gtk::ToggleButton* showGreen; Gtk::ToggleButton* showBlue; Gtk::ToggleButton* showValue; - Gtk::ToggleButton* showRAW; Gtk::ToggleButton* showBAR; Gtk::ToggleButton* showChro; Gtk::Button* showMode; + Gtk::ToggleButton* scopeOptions; + Gtk::Scale* brightnessWidget; + + Gtk::RadioButton* scopeHistBtn; + Gtk::RadioButton* scopeHistRawBtn; + Gtk::RadioButton* scopeParadeBtn; + Gtk::RadioButton* scopeWaveBtn; + Gtk::RadioButton* scopeVectHcBtn; + Gtk::RadioButton* scopeVectHsBtn; Gtk::Image *redImage; Gtk::Image *greenImage; Gtk::Image *blueImage; Gtk::Image *valueImage; - Gtk::Image *rawImage; Gtk::Image *barImage; Gtk::Image *chroImage; @@ -211,7 +299,6 @@ protected: Gtk::Image *greenImage_g; Gtk::Image *blueImage_g; Gtk::Image *valueImage_g; - Gtk::Image *rawImage_g; Gtk::Image *barImage_g; Gtk::Image *chroImage_g; @@ -219,8 +306,14 @@ protected: Gtk::Image *mode1Image; Gtk::Image *mode2Image; + HistogramPanelListener* panel_listener; + + sigc::connection brightness_changed_connection; sigc::connection rconn; void setHistInvalid (); + void showRGBBar(); + void updateHistAreaOptions(); + void updateHistRGBAreaOptions(); public: @@ -235,9 +328,18 @@ public: const LUTu& histChroma, const LUTu& histRedRaw, const LUTu& histGreenRaw, - const LUTu& histBlueRaw) + const LUTu& histBlueRaw, + int vectorscopeScale, + const array2D& vectorscopeHC, + const array2D& vectorscopeHS, + int waveformScale, + const array2D& waveformRed, + const array2D& waveformGreen, + const array2D& waveformBlue, + const array2D& waveformLuma + ) { - histogramArea->update(histRed, histGreen, histBlue, histLuma, histChroma, histRedRaw, histGreenRaw, histBlueRaw); + histogramArea->update(histRed, histGreen, histBlue, histLuma, histChroma, histRedRaw, histGreenRaw, histBlueRaw, vectorscopeScale, vectorscopeHC, vectorscopeHS, waveformScale, waveformRed, waveformGreen, waveformBlue, waveformLuma); } // pointermotionlistener interface void pointerMoved (bool validPos, const Glib::ustring &profile, const Glib::ustring &profileW, int x, int y, int r, int g, int b, bool isRaw = false) override; @@ -250,13 +352,19 @@ public: void green_toggled (); void blue_toggled (); void value_toggled (); - void raw_toggled (); void chro_toggled (); void bar_toggled (); void mode_released (); + void brightnessWidgetValueChanged(); + void brightnessUpdated(float brightness); + void scopeOptionsToggled(); + void type_selected(Gtk::RadioButton* button); + void type_changed (); void rgbv_toggled (); void resized (Gtk::Allocation& req); // drawModeListener interface void toggleButtonMode () override; + + void setPanelListener(HistogramPanelListener* listener); }; diff --git a/rtgui/history.cc b/rtgui/history.cc index 1a9cc1258..dfc74af24 100644 --- a/rtgui/history.cc +++ b/rtgui/history.cc @@ -31,6 +31,7 @@ using namespace rtengine::procparams; History::History (bool bookmarkSupport) : historyVPaned (nullptr), blistener (nullptr), tpc (nullptr), bmnum (1) { + set_orientation(Gtk::ORIENTATION_VERTICAL); blistenerLock = false; // sets default that the Before preview will not be locked /* @@ -91,7 +92,7 @@ History::History (bool bookmarkSupport) : historyVPaned (nullptr), blistener (nu // Bookmark List // ~~~~~~~~~~~~~ - Gtk::HBox* ahbox = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* ahbox = Gtk::manage (new Gtk::Box ()); addBookmark = Gtk::manage (new Gtk::Button ()); // M("HISTORY_NEWSNAPSHOT") setExpandAlignProperties (addBookmark, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); //addBookmark->get_style_context()->set_junction_sides(Gtk::JUNCTION_RIGHT); @@ -116,15 +117,15 @@ History::History (bool bookmarkSupport) : historyVPaned (nullptr), blistener (nu Gtk::Frame* bmFrame = Gtk::manage (new Gtk::Frame (M ("HISTORY_SNAPSHOTS"))); bmFrame->set_name ("Snapshots"); - Gtk::VBox* bmBox = Gtk::manage (new Gtk::VBox ()); + Gtk::Box* bmBox = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); bmFrame->add (*bmBox); bmBox->pack_start (*bscrollw, Gtk::PACK_EXPAND_WIDGET, 4); bmBox->pack_end (*ahbox, Gtk::PACK_SHRINK, 4); bmBox->set_size_request (-1, 60); if (bookmarkSupport) { - historyVPaned = Gtk::manage ( new Gtk::VPaned () ); - historyVPaned->pack1 (*histFrame, true, true); + historyVPaned = Gtk::manage ( new Gtk::Paned (Gtk::ORIENTATION_VERTICAL) ); + historyVPaned->pack1 (*histFrame, true, false); historyVPaned->pack2 (*bmFrame, false, false); pack_start (*historyVPaned); } else { @@ -450,7 +451,7 @@ bool History::on_query_tooltip (int x, int y, bool keyboard_tooltip, const Glib: Gtk::Label *left = Gtk::manage (new Gtk::Label(param+" :")); Gtk::Label *right = Gtk::manage (new Gtk::Label(val)); right->set_justify(Gtk::JUSTIFY_LEFT); - Gtk::HBox *hbox = Gtk::manage (new Gtk::HBox()); + Gtk::Box *hbox = Gtk::manage (new Gtk::Box()); hbox->set_spacing(5); hbox->pack_start(*left, Gtk::PACK_SHRINK, 0); hbox->pack_start(*right, Gtk::PACK_SHRINK, 0); diff --git a/rtgui/history.h b/rtgui/history.h index faebe4765..197e5690b 100644 --- a/rtgui/history.h +++ b/rtgui/history.h @@ -33,7 +33,7 @@ public: virtual void historyBeforeLineChanged(const rtengine::procparams::ProcParams& params) = 0; }; -class History : public Gtk::VBox, public PParamsChangeListener +class History : public Gtk::Box, public PParamsChangeListener { public: @@ -72,7 +72,7 @@ public: BookmarkColumns bookmarkColumns; protected: - Gtk::VPaned* historyVPaned; + Gtk::Paned* historyVPaned; Gtk::TreeView* hTreeView; Glib::RefPtr historyModel; diff --git a/rtgui/icmpanel.cc b/rtgui/icmpanel.cc index 92827bf30..e0fd7cd96 100644 --- a/rtgui/icmpanel.cc +++ b/rtgui/icmpanel.cc @@ -62,7 +62,7 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iuncha Gtk::Frame *iFrame = Gtk::manage(new Gtk::Frame(M("TP_ICM_INPUTPROFILE"))); iFrame->set_label_align(0.025, 0.5); - iVBox = Gtk::manage(new Gtk::VBox()); + iVBox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); inone = Gtk::manage(new Gtk::RadioButton(M("TP_ICM_INPUTNONE"))); inone->set_tooltip_text(M("TP_ICM_INPUTNONE_TOOLTIP")); @@ -81,7 +81,7 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iuncha iVBox->pack_start(*icameraICC, Gtk::PACK_SHRINK); ifromfile = Gtk::manage(new Gtk::RadioButton(M("TP_ICM_INPUTCUSTOM") + ":")); - Gtk::HBox* ffbox = Gtk::manage(new Gtk::HBox()); + Gtk::Box* ffbox = Gtk::manage(new Gtk::Box()); ifromfile->set_tooltip_text(M("TP_ICM_INPUTCUSTOM_TOOLTIP")); ffbox->pack_start(*ifromfile, Gtk::PACK_SHRINK); ffbox->pack_start(*ipDialog); @@ -95,6 +95,7 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iuncha inone->set_group(opts); dcpFrame = Gtk::manage(new Gtk::Frame("DCP")); + dcpFrame->set_label_align(0.025, 0.5); Gtk::Grid* dcpGrid = Gtk::manage(new Gtk::Grid()); dcpGrid->set_column_homogeneous(false); @@ -170,7 +171,7 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iuncha Gtk::Frame *wFrame = Gtk::manage(new Gtk::Frame(M("TP_ICM_WORKINGPROFILE"))); wFrame->set_label_align(0.025, 0.5); - Gtk::VBox *wProfVBox = Gtk::manage(new Gtk::VBox()); + Gtk::Box* wProfVBox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); wProfNames = Gtk::manage(new MyComboBoxText()); wProfVBox->pack_start(*wProfNames, Gtk::PACK_SHRINK); @@ -187,7 +188,7 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iuncha //-----------------gamma TRC working - wTRCHBox = Gtk::manage(new Gtk::HBox()); + wTRCHBox = Gtk::manage(new Gtk::Box()); Gtk::Label* wtrclab = Gtk::manage(new Gtk::Label(M("TP_ICM_WORKING_TRC"))); @@ -229,7 +230,7 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iuncha Gtk::Frame *oFrame = Gtk::manage(new Gtk::Frame(M("TP_ICM_OUTPUTPROFILE"))); oFrame->set_label_align(0.025, 0.5); - Gtk::VBox *oProfVBox = Gtk::manage(new Gtk::VBox()); + Gtk::Box* oProfVBox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); oProfNames = Gtk::manage(new MyComboBoxText()); oProfVBox->pack_start(*oProfNames, Gtk::PACK_SHRINK); @@ -246,7 +247,7 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iuncha oProfNames->set_active(0); // Rendering intent - Gtk::HBox *riHBox = Gtk::manage(new Gtk::HBox()); + Gtk::Box *riHBox = Gtk::manage(new Gtk::Box()); Gtk::Label* outputIntentLbl = Gtk::manage(new Gtk::Label(M("TP_ICM_PROFILEINTENT"))); riHBox->pack_start(*outputIntentLbl, Gtk::PACK_SHRINK); oRendIntent.reset(new PopUpButton()); @@ -963,7 +964,7 @@ void ICMPanel::saveReferencePressed() Gtk::CheckButton applyWB(M("TP_ICM_SAVEREFERENCE_APPLYWB")); applyWB.set_tooltip_text(M("TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP")); - Gtk::HBox* hbox = Gtk::manage(new Gtk::HBox()); + Gtk::Box* hbox = Gtk::manage(new Gtk::Box()); hbox->pack_end(applyWB, Gtk::PACK_SHRINK, 2); Gtk::Box *box = dialog.get_content_area(); box->pack_end(*hbox, Gtk::PACK_SHRINK, 2); diff --git a/rtgui/icmpanel.h b/rtgui/icmpanel.h index cc46c5d37..81a011c59 100644 --- a/rtgui/icmpanel.h +++ b/rtgui/icmpanel.h @@ -50,7 +50,7 @@ protected: Adjuster* wSlope; Gtk::Label* labmga; - Gtk::HBox* gabox; + Gtk::Box* gabox; //bool freegamma; @@ -80,8 +80,8 @@ private: rtengine::ProcEvent EvICMslop; rtengine::ProcEvent EvICMtrcinMethod; - Gtk::VBox* iVBox; - Gtk::HBox* wTRCHBox; + Gtk::Box* iVBox; + Gtk::Box* wTRCHBox; Gtk::CheckButton* obpc; Gtk::RadioButton* inone; diff --git a/rtgui/imageareapanel.cc b/rtgui/imageareapanel.cc index f693c3181..ee153026d 100644 --- a/rtgui/imageareapanel.cc +++ b/rtgui/imageareapanel.cc @@ -20,10 +20,11 @@ ImageAreaPanel::ImageAreaPanel () : before(nullptr), after(nullptr) { + set_orientation(Gtk::ORIENTATION_VERTICAL); imageArea = new ImageArea (this); - Gtk::HBox* hb1 = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* hb1 = Gtk::manage (new Gtk::Box ()); Gtk::Frame* frame = Gtk::manage (new Gtk::Frame ()); frame->add (*imageArea); diff --git a/rtgui/imageareapanel.h b/rtgui/imageareapanel.h index f52ca9060..8572d41d6 100644 --- a/rtgui/imageareapanel.h +++ b/rtgui/imageareapanel.h @@ -23,7 +23,7 @@ class ImageArea; class ImageAreaPanel final : - public Gtk::VBox + public Gtk::Box { protected: diff --git a/rtgui/indclippedpanel.h b/rtgui/indclippedpanel.h index 1017b58f1..6be0a6c40 100644 --- a/rtgui/indclippedpanel.h +++ b/rtgui/indclippedpanel.h @@ -24,7 +24,7 @@ class ImageArea; class IndicateClippedPanel : - public Gtk::HBox + public Gtk::Box { protected: diff --git a/rtgui/inspector.cc b/rtgui/inspector.cc index 526343fca..37ed20207 100644 --- a/rtgui/inspector.cc +++ b/rtgui/inspector.cc @@ -85,45 +85,75 @@ InspectorBuffer::~InspectorBuffer() { Inspector::Inspector () : currImage(nullptr), scaled(false), scale(1.0), zoomScale(1.0), zoomScaleBegin(1.0), active(false), pinned(false), dirty(false) { set_name("Inspector"); - window.set_visible(false); - window.set_title("RawTherapee Inspector"); - window.add_events(Gdk::KEY_PRESS_MASK); - window.signal_key_release_event().connect(sigc::mem_fun(*this, &Inspector::on_key_release)); - window.signal_key_press_event().connect(sigc::mem_fun(*this, &Inspector::on_key_press)); + if (!options.inspectorWindow) { + window = nullptr; + } + else { + window = new Gtk::Window(); + window->set_title("RawTherapee Inspector"); + window->set_visible(false); + window->add_events(Gdk::KEY_PRESS_MASK); + window->signal_key_release_event().connect(sigc::mem_fun(*this, &Inspector::on_key_release)); + window->signal_key_press_event().connect(sigc::mem_fun(*this, &Inspector::on_key_press)); - add_events(Gdk::BUTTON_PRESS_MASK | Gdk::SCROLL_MASK | Gdk::SMOOTH_SCROLL_MASK); - gestureZoom = Gtk::GestureZoom::create(*this); - gestureZoom->signal_begin().connect(sigc::mem_fun(*this, &Inspector::on_zoom_begin)); - gestureZoom->signal_scale_changed().connect(sigc::mem_fun(*this, &Inspector::on_zoom_scale_changed)); + add_events(Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_MOTION_MASK | Gdk::SCROLL_MASK | Gdk::SMOOTH_SCROLL_MASK); + gestureZoom = Gtk::GestureZoom::create(*this); + gestureZoom->signal_begin().connect(sigc::mem_fun(*this, &Inspector::on_zoom_begin)); + gestureZoom->signal_scale_changed().connect(sigc::mem_fun(*this, &Inspector::on_zoom_scale_changed)); - window.add(*this); - window.set_visible(false); - active = true; // always track inspected thumbnails + window->add(*this); + window->set_size_request(500, 500); + initialized = false; // delay init to avoid flickering on some systems + active = true; // always track inspected thumbnails + } } Inspector::~Inspector() { deleteBuffers(); + if (window) + delete window; } -void Inspector::showWindow(bool scaled) +void Inspector::showWindow(bool scaled, bool fullscreen) { + if (!window) + return; + + // initialize when shown first + if (!initialized) { + window->show_all(); + window->set_visible(false); + initialized = true; + } + + // show inspector window this->scaled = scaled; - window.fullscreen(); - window.show_all(); - window.set_visible(true); + if (fullscreen) + window->fullscreen(); + else + window->unfullscreen(); + this->fullscreen = fullscreen; + window->set_visible(true); pinned = false; + + // update content when becoming visible + switchImage(next_image_path); + mouseMove(next_image_pos, 0); } bool Inspector::on_key_release(GdkEventKey *event) { + if (!window) + return false; + if (!pinned) { switch (event->keyval) { case GDK_KEY_f: case GDK_KEY_F: zoomScale = 1.0; - window.set_visible(false); + window->set_visible(false); return true; } } @@ -132,23 +162,37 @@ bool Inspector::on_key_release(GdkEventKey *event) bool Inspector::on_key_press(GdkEventKey *event) { + if (!window) + return false; + switch (event->keyval) { case GDK_KEY_z: case GDK_KEY_F: + // show image unscaled in 100% view if (pinned || scaled) zoomScale = 1.0; // reset if not key hold scaled = false; queue_draw(); return true; case GDK_KEY_f: + // show image scaled to window size if (pinned || !scaled) zoomScale = 1.0; // reset if not key hold scaled = true; queue_draw(); return true; + case GDK_KEY_F11: + // toggle fullscreen + if (fullscreen) + window->unfullscreen(); + else + window->fullscreen(); + fullscreen = !fullscreen; + return true; case GDK_KEY_Escape: + // hide window zoomScale = 1.0; - window.set_visible(false); + window->set_visible(false); return true; } @@ -157,7 +201,11 @@ bool Inspector::on_key_press(GdkEventKey *event) bool Inspector::on_button_press_event(GdkEventButton *event) { + if (!window) + return false; + if (event->type == GDK_BUTTON_PRESS) { + button_pos.set(event->x, event->y); if (!pinned) // pin window with mouse click pinned = true; @@ -166,9 +214,31 @@ bool Inspector::on_button_press_event(GdkEventButton *event) return false; } +bool Inspector::on_motion_notify_event(GdkEventMotion *event) +{ + if (!currImage || !window) + return false; + + int deviceScale = get_scale_factor(); + int delta_x = (button_pos.x - event->x)*deviceScale; + int delta_y = (button_pos.y - event->y)*deviceScale; + int imW = currImage->imgBuffer.getWidth(); + int imH = currImage->imgBuffer.getHeight(); + + moveCenter(delta_x, delta_y, imW, imH, deviceScale); + button_pos.set(event->x, event->y); + + if (!dirty) { + dirty = true; + queue_draw(); + } + + return true; +} + bool Inspector::on_scroll_event(GdkEventScroll *event) { - if (!currImage) + if (!currImage || !window) return false; bool alt = event->state & GDK_MOD1_MASK; @@ -213,7 +283,7 @@ bool Inspector::on_scroll_event(GdkEventScroll *event) break; } - if (alt) { + if ((options.zoomOnScroll && !alt) || (!options.zoomOnScroll && alt)) { // zoom beginZoom(event->x, event->y); if (std::fabs(delta_y) > std::fabs(delta_x)) @@ -237,14 +307,17 @@ bool Inspector::on_scroll_event(GdkEventScroll *event) void Inspector::moveCenter(int delta_x, int delta_y, int imW, int imH, int deviceScale) { rtengine::Coord margin; // limit to image size - margin.x = rtengine::min(window.get_width() * deviceScale / scale, imW) / 2; - margin.y = rtengine::min(window.get_height() * deviceScale / scale, imH) / 2; + margin.x = rtengine::min(window->get_width() * deviceScale / scale, imW) / 2; + margin.y = rtengine::min(window->get_height() * deviceScale / scale, imH) / 2; center.set(rtengine::LIM(center.x + delta_x, margin.x, imW - margin.x), rtengine::LIM(center.y + delta_y, margin.y, imH - margin.y)); } void Inspector::beginZoom(double x, double y) { + if (!currImage || !window) + return; + int deviceScale = get_scale_factor(); int imW = currImage->imgBuffer.getWidth(); int imH = currImage->imgBuffer.getHeight(); @@ -253,8 +326,8 @@ void Inspector::beginZoom(double x, double y) moveCenter(0, 0, imW, imH, deviceScale); // store center and current position for zooming - dcenterBegin.x = (x - window.get_width()/2) / scale * deviceScale; - dcenterBegin.y = (y - window.get_height()/2) / scale * deviceScale; + dcenterBegin.x = (x - window->get_width()/2) / scale * deviceScale; + dcenterBegin.y = (y - window->get_height()/2) / scale * deviceScale; centerBegin = center; zoomScaleBegin = zoomScale; @@ -269,7 +342,7 @@ void Inspector::on_zoom_begin(GdkEventSequence *s) void Inspector::on_zoom_scale_changed(double zscale) { - if (!currImage) + if (!currImage || !window) return; zoomScale = rtengine::LIM(zoomScaleBegin * zscale, 0.01, 16.0); @@ -308,7 +381,7 @@ bool Inspector::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) rtengine::Coord availableSize; rtengine::Coord topLeft; rtengine::Coord dest(0, 0); - int deviceScale = get_scale_factor(); + int deviceScale = window? get_scale_factor(): 1; availableSize.x = win->get_width() * deviceScale; availableSize.y = win->get_height() * deviceScale; int imW = rtengine::max(currImage->imgBuffer.getWidth(), 1); @@ -367,19 +440,22 @@ bool Inspector::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) Gdk::RGBA c; Glib::RefPtr style = get_style_context(); - // draw the background - //style->render_background(cr, 0, 0, get_width(), get_height()); - - ///* --- old method (the new method does not seem to work) - c = style->get_background_color (Gtk::STATE_FLAG_NORMAL); - cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); - cr->set_line_width (0); - cr->rectangle (0, 0, availableSize.x, availableSize.y); - cr->fill (); - //*/ + if (!window) { + // draw the background + style->render_background(cr, 0, 0, get_width(), get_height()); + } + else { + ///* --- old method (the new method does not seem to work) + c = style->get_background_color (Gtk::STATE_FLAG_NORMAL); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); + cr->set_line_width (0); + cr->rectangle (0, 0, availableSize.x, availableSize.y); + cr->fill (); + //*/ + } bool scaledImage = scale != 1.0; - if (deviceScale == 1 && !scaledImage) { + if (!window || (deviceScale == 1 && !scaledImage)) { // standard drawing currImage->imgBuffer.copySurface(win); } @@ -404,14 +480,14 @@ bool Inspector::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) cr->paint(); } - /* --- not for separate window - // draw the frame - c = style->get_border_color (Gtk::STATE_FLAG_NORMAL); - cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); - cr->set_line_width (1); - cr->rectangle (0.5, 0.5, availableSize.x - 1, availableSize.y - 1); - cr->stroke (); - */ + if (!window) { + // draw the frame + c = style->get_border_color (Gtk::STATE_FLAG_NORMAL); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); + cr->set_line_width (1); + cr->rectangle (0.5, 0.5, availableSize.x - 1, availableSize.y - 1); + cr->stroke (); + } } return true; @@ -423,6 +499,12 @@ void Inspector::mouseMove (rtengine::Coord2D pos, int transform) return; } + next_image_pos = pos; + + // skip actual update of content when not visible + if (window && !window->get_visible()) + return; + if (currImage) { center.set(int(rtengine::LIM01(pos.x)*double(currImage->imgBuffer.getWidth())), int(rtengine::LIM01(pos.y)*double(currImage->imgBuffer.getHeight()))); } else { @@ -443,6 +525,11 @@ void Inspector::switchImage (const Glib::ustring &fullPath) } next_image_path = fullPath; + + // skip actual update of content when not visible + if (window && !window->get_visible()) + return; + if (!options.inspectorDelay) { doSwitchImage(); } else { @@ -540,7 +627,8 @@ void Inspector::setActive(bool state) flushBuffers(); } - //active = state; + if (!window) + active = state; } diff --git a/rtgui/inspector.h b/rtgui/inspector.h index 9a99fb8a6..726bc947c 100644 --- a/rtgui/inspector.h +++ b/rtgui/inspector.h @@ -54,15 +54,21 @@ private: bool active; bool pinned; bool dirty; + bool initialized; + bool fullscreen; // window is shown in fullscreen mode sigc::connection delayconn; Glib::ustring next_image_path; + rtengine::Coord2D next_image_pos; - Gtk::Window window; + Gtk::Window *window; bool on_key_release(GdkEventKey *event); bool on_key_press(GdkEventKey *event); + rtengine::Coord button_pos; bool on_button_press_event(GdkEventButton *event) override; + bool on_motion_notify_event(GdkEventMotion *event) override; + bool on_scroll_event(GdkEventScroll *event) override; void moveCenter(int delta_x, int delta_y, int imW, int imH, int deviceScale); @@ -83,7 +89,7 @@ public: /** @brief Show or hide window * @param scaled fit image into window */ - void showWindow(bool scaled); + void showWindow(bool scaled, bool fullscreen = true); /** @brief Mouse movement to a new position * @param pos Location of the mouse, in percentage (i.e. [0;1] range) relative to the full size image ; -1,-1 == out of the image diff --git a/rtgui/iptcpanel.cc b/rtgui/iptcpanel.cc index 2a4f7348c..0f8471b92 100644 --- a/rtgui/iptcpanel.cc +++ b/rtgui/iptcpanel.cc @@ -79,6 +79,7 @@ IPTCPanel::IPTCPanel(): embeddedData(new rtengine::procparams::IPTCPairs) { + set_orientation(Gtk::ORIENTATION_VERTICAL); set_spacing (4); Gtk::Grid* iptc = Gtk::manage( new Gtk::Grid () ); @@ -138,7 +139,7 @@ IPTCPanel::IPTCPanel(): // -------------------------- - Gtk::HSeparator* hsep1 = Gtk::manage( new Gtk::HSeparator () ); + Gtk::Separator* hsep1 = Gtk::manage( new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL) ); setExpandAlignProperties(hsep1, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); iptc->attach (*hsep1, 0, row++, 2, 1); @@ -182,7 +183,7 @@ IPTCPanel::IPTCPanel(): iptc->attach (*scrolledWindowkw, 0, row++, 2, 1); // -------------------------- - Gtk::HSeparator* hsep2 = Gtk::manage( new Gtk::HSeparator () ); + Gtk::Separator* hsep2 = Gtk::manage( new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL) ); setExpandAlignProperties(hsep2, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); iptc->attach (*hsep2, 0, row++, 2, 1); // -------------------------- @@ -235,7 +236,7 @@ IPTCPanel::IPTCPanel(): iptc->attach (*scrolledWindowsc, 0, row++, 2, 1); // -------------------------- - Gtk::HSeparator* hsep3 = Gtk::manage( new Gtk::HSeparator () ); + Gtk::Separator* hsep3 = Gtk::manage( new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL) ); setExpandAlignProperties(hsep3, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); iptc->attach (*hsep3, 0, row++, 2, 1); // -------------------------- @@ -295,7 +296,7 @@ IPTCPanel::IPTCPanel(): // -------------------------- - Gtk::HSeparator* hsep4 = Gtk::manage( new Gtk::HSeparator () ); + Gtk::Separator* hsep4 = Gtk::manage( new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL) ); setExpandAlignProperties(hsep4, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); iptc->attach (*hsep4, 0, row++, 2, 1); diff --git a/rtgui/iptcpanel.h b/rtgui/iptcpanel.h index 100904d1a..da52fa7d2 100644 --- a/rtgui/iptcpanel.h +++ b/rtgui/iptcpanel.h @@ -26,7 +26,7 @@ #include "toolpanel.h" class IPTCPanel final : - public Gtk::VBox, + public Gtk::Box, public ToolPanel { diff --git a/rtgui/labcurve.cc b/rtgui/labcurve.cc index 27a8bee52..dca1dfd45 100644 --- a/rtgui/labcurve.cc +++ b/rtgui/labcurve.cc @@ -57,7 +57,7 @@ LCurve::LCurve () : FoldableToolPanel(this, "labcurves", M("TP_LABCURVE_LABEL"), chromaticity->setLogScale(2, 0, true); //%%%%%%%%%%%%%%%%%% - Gtk::HSeparator *hsep2 = Gtk::manage (new Gtk::HSeparator()); + Gtk::Separator* hsep2 = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); hsep2->show (); pack_start (*hsep2, Gtk::PACK_EXPAND_WIDGET, 4); @@ -81,7 +81,7 @@ LCurve::LCurve () : FoldableToolPanel(this, "labcurves", M("TP_LABCURVE_LABEL"), //%%%%%%%%%%%%%%%%%%% - Gtk::HSeparator *hsep3 = Gtk::manage (new Gtk::HSeparator()); + Gtk::Separator* hsep3 = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); hsep3->show (); pack_start (*hsep3, Gtk::PACK_EXPAND_WIDGET, 4); @@ -217,7 +217,7 @@ LCurve::LCurve () : FoldableToolPanel(this, "labcurves", M("TP_LABCURVE_LABEL"), curveEditorG->curveListComplete(); pack_start (*curveEditorG, Gtk::PACK_SHRINK, 4); - Gtk::HSeparator *hsepdh = Gtk::manage (new Gtk::HSeparator()); + Gtk::Separator* hsepdh = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); hsepdh->show (); pack_start (*hsepdh, Gtk::PACK_EXPAND_WIDGET, 4); diff --git a/rtgui/labcurve.h b/rtgui/labcurve.h index e8488a8c6..dfb79ae7a 100644 --- a/rtgui/labcurve.h +++ b/rtgui/labcurve.h @@ -53,7 +53,7 @@ protected: FlatCurveEditor* lhshape; FlatCurveEditor* hhshape; Gtk::Label* labmdh; - Gtk::HBox* dhbox; + Gtk::Box* dhbox; DiagonalCurveEditor* clshape; DiagonalCurveEditor* cdshape; diff --git a/rtgui/labgrid.h b/rtgui/labgrid.h index 4693c897c..78179210c 100644 --- a/rtgui/labgrid.h +++ b/rtgui/labgrid.h @@ -96,7 +96,7 @@ public: }; -class LabGrid: public Gtk::HBox { +class LabGrid: public Gtk::Box { private: LabGridArea grid; diff --git a/rtgui/lensgeom.cc b/rtgui/lensgeom.cc index 762726107..8bdbf6dd4 100644 --- a/rtgui/lensgeom.cc +++ b/rtgui/lensgeom.cc @@ -33,7 +33,7 @@ LensGeometry::LensGeometry () : FoldableToolPanel(this, "lensgeom", M("TP_LENSGE auto m = ProcEventMapper::getInstance(); EvTransMethod = m->newEvent(TRANSFORM, "HISTORY_MSG_TRANS_METHOD"); - Gtk::HBox* hb1 = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* hb1 = Gtk::manage (new Gtk::Box ()); hb1->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_RAW_DMETHOD") + ": ")), Gtk::PACK_SHRINK, 4); method = Gtk::manage (new MyComboBoxText ()); method->append(M("TP_LENSGEOM_LOG")); diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 1a8391f66..73fb0399b 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -74,11 +74,13 @@ LensProfilePanel::LensProfilePanel() : // Main containers: Gtk::Frame *nodesFrame = Gtk::manage(new Gtk::Frame(M("TP_LENSPROFILE_MODE_HEADER"))); + nodesFrame->set_label_align (0.025, 0.5); modesGrid->get_style_context()->add_class("grid-spacing"); setExpandAlignProperties(modesGrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); Gtk::Frame *distFrame = Gtk::manage(new Gtk::Frame(M("TP_LENSPROFILE_USE_HEADER"))); + distFrame->set_label_align (0.025, 0.5); distGrid->get_style_context()->add_class("grid-spacing"); setExpandAlignProperties(distGrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); diff --git a/rtgui/localcontrast.cc b/rtgui/localcontrast.cc index d91642b6c..6b668a1eb 100644 --- a/rtgui/localcontrast.cc +++ b/rtgui/localcontrast.cc @@ -32,11 +32,17 @@ using namespace rtengine::procparams; LocalContrast::LocalContrast(): FoldableToolPanel(this, "localcontrast", M("TP_LOCALCONTRAST_LABEL"), false, true) { auto m = ProcEventMapper::getInstance(); - EvLocalContrastEnabled = m->newEvent(RGBCURVE, "HISTORY_MSG_LOCALCONTRAST_ENABLED"); +/* EvLocalContrastEnabled = m->newEvent(RGBCURVE, "HISTORY_MSG_LOCALCONTRAST_ENABLED"); EvLocalContrastRadius = m->newEvent(RGBCURVE, "HISTORY_MSG_LOCALCONTRAST_RADIUS"); EvLocalContrastAmount = m->newEvent(RGBCURVE, "HISTORY_MSG_LOCALCONTRAST_AMOUNT"); EvLocalContrastDarkness = m->newEvent(RGBCURVE, "HISTORY_MSG_LOCALCONTRAST_DARKNESS"); EvLocalContrastLightness = m->newEvent(RGBCURVE, "HISTORY_MSG_LOCALCONTRAST_LIGHTNESS"); +*/ + EvLocalContrastEnabled = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_LOCALCONTRAST_ENABLED"); + EvLocalContrastRadius = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_LOCALCONTRAST_RADIUS"); + EvLocalContrastAmount = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_LOCALCONTRAST_AMOUNT"); + EvLocalContrastDarkness = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_LOCALCONTRAST_DARKNESS"); + EvLocalContrastLightness = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_LOCALCONTRAST_LIGHTNESS"); radius = Gtk::manage(new Adjuster(M("TP_LOCALCONTRAST_RADIUS"), 20., 200., 1., 80.)); amount = Gtk::manage(new Adjuster(M("TP_LOCALCONTRAST_AMOUNT"), 0., 1., 0.01, 0.2)); diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 1710a060f..e1eca81c5 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -38,6 +38,7 @@ LocallabToolList::LocallabToolList(): // Tool list listener listListener(nullptr) { + set_orientation(Gtk::ORIENTATION_VERTICAL); list->set_model(listTreeModel); list->pack_start(toolRow.name); listConn = list->signal_changed().connect(sigc::mem_fun(*this, &LocallabToolList::toolRowSelected)); @@ -167,6 +168,8 @@ Locallab::Locallab(): // Other widgets resetshowButton(Gtk::manage(new Gtk::Button(M("TP_LOCALLAB_RESETSHOW")))) { + set_orientation(Gtk::ORIENTATION_VERTICAL); + // Create panel widget to receive Locallab GUI elements ToolVBox* const panel = Gtk::manage(new ToolVBox()); panel->set_spacing(2); @@ -177,7 +180,7 @@ Locallab::Locallab(): panel->pack_start(*expsettings->getExpander(), false, false); // Add separator - Gtk::HSeparator* const separator = Gtk::manage(new Gtk::HSeparator()); + Gtk::Separator* const separator = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); panel->pack_start(*separator, false, false); // Add tool list widget @@ -203,7 +206,7 @@ Locallab::Locallab(): panel->pack_start(*toolpanel, false, false); // Add separator - // Gtk::HSeparator* const separator2 = Gtk::manage(new Gtk::HSeparator()); + // Gtk::Separator* const separator2 = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); // panel->pack_start(*separator2, false, false); // Add mask reset button to panel widget @@ -269,8 +272,10 @@ void Locallab::read(const rtengine::procparams::ProcParams* pp, const ParamsEdit if (pp->locallab.spots.at(i).spotMethod == "norm") { r->spotMethod = 0; - } else { + } else if(pp->locallab.spots.at(i).spotMethod == "exc"){ r->spotMethod = 1; + } else if (pp->locallab.spots.at(i).spotMethod == "full"){ + r->spotMethod = 2; } r->sensiexclu = pp->locallab.spots.at(i).sensiexclu; @@ -311,9 +316,11 @@ void Locallab::read(const rtengine::procparams::ProcParams* pp, const ParamsEdit r->balanh = pp->locallab.spots.at(i).balanh; r->colorde = pp->locallab.spots.at(i).colorde; r->colorscope = pp->locallab.spots.at(i).colorscope; + r->avoidrad = pp->locallab.spots.at(i).avoidrad; r->hishow = pp->locallab.spots.at(i).hishow; r->activ = pp->locallab.spots.at(i).activ; r->avoid = pp->locallab.spots.at(i).avoid; + r->avoidmun = pp->locallab.spots.at(i).avoidmun; r->blwh = pp->locallab.spots.at(i).blwh; r->recurs = pp->locallab.spots.at(i).recurs; r->laplac = true; //pp->locallab.spots.at(i).laplac; @@ -426,8 +433,10 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited if (newSpot->spotMethod == "norm") { r->spotMethod = 0; - } else { + } else if(newSpot->spotMethod == "exc") { r->spotMethod = 1; + } else if(newSpot->spotMethod == "full") { + r->spotMethod = 2; } r->sensiexclu = newSpot->sensiexclu; @@ -487,9 +496,11 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited r->balanh = newSpot->balanh; r->colorde = newSpot->colorde; r->colorscope = newSpot->colorscope; + r->avoidrad = newSpot->avoidrad; r->hishow = newSpot->hishow; r->activ = newSpot->activ; r->avoid = newSpot->avoid; + r->avoidmun = newSpot->avoidmun; r->blwh = newSpot->blwh; r->recurs = newSpot->recurs; r->laplac = newSpot->laplac; @@ -711,8 +722,10 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited if (newSpot->spotMethod == "norm") { r->spotMethod = 0; - } else { + } else if (newSpot->spotMethod == "exc") { r->spotMethod = 1; + } else if (newSpot->spotMethod == "full") { + r->spotMethod = 2; } r->sensiexclu = newSpot->sensiexclu; @@ -772,8 +785,10 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited r->balanh = newSpot->balanh; r->colorde = newSpot->colorde; r->colorscope = newSpot->colorscope; + r->avoidrad = newSpot->avoidrad; r->activ = newSpot->activ; r->avoid = newSpot->avoid; + r->avoidmun = newSpot->avoidmun; r->blwh = newSpot->blwh; r->recurs = newSpot->recurs; r->laplac = newSpot->laplac; @@ -878,8 +893,10 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited if (r->spotMethod == 0) { pp->locallab.spots.at(pp->locallab.selspot).spotMethod = "norm"; - } else { + } else if (r->spotMethod == 1){ pp->locallab.spots.at(pp->locallab.selspot).spotMethod = "exc"; + } else if (r->spotMethod == 2) { + pp->locallab.spots.at(pp->locallab.selspot).spotMethod = "full"; } pp->locallab.spots.at(pp->locallab.selspot).sensiexclu = r->sensiexclu; @@ -920,9 +937,11 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pp->locallab.spots.at(pp->locallab.selspot).balanh = r->balanh; pp->locallab.spots.at(pp->locallab.selspot).colorde = r->colorde; pp->locallab.spots.at(pp->locallab.selspot).colorscope = r->colorscope; + pp->locallab.spots.at(pp->locallab.selspot).avoidrad = r->avoidrad; pp->locallab.spots.at(pp->locallab.selspot).hishow = r->hishow; pp->locallab.spots.at(pp->locallab.selspot).activ = r->activ; pp->locallab.spots.at(pp->locallab.selspot).avoid = r->avoid; + pp->locallab.spots.at(pp->locallab.selspot).avoidmun = r->avoidmun; pp->locallab.spots.at(pp->locallab.selspot).blwh = r->blwh; pp->locallab.spots.at(pp->locallab.selspot).recurs = r->recurs; pp->locallab.spots.at(pp->locallab.selspot).laplac = r->laplac; @@ -1017,10 +1036,10 @@ void Locallab::minmaxChanged(const std::vector &minmax, int } } -void Locallab::logencodChanged(const float blackev, const float whiteev, const float sourceg, const float targetg) +void Locallab::logencodChanged(const float blackev, const float whiteev, const float sourceg, const float sourceab, const float targetg) { // Update Locallab Log Encoding accordingly - explog->updateAutocompute(blackev, whiteev, sourceg, targetg); + explog->updateAutocompute(blackev, whiteev, sourceg, sourceab, targetg); } void Locallab::refChanged(const std::vector &ref, int selspot) @@ -1060,20 +1079,20 @@ Locallab::llMaskVisibility Locallab::getMaskVisibility() const const bool prevDeltaE = expsettings->isDeltaEPrevActive(); // Get mask preview from Locallab tools - int colorMask, colorMaskinv, expMask, expMaskinv, shMask, shMaskinv, vibMask, softMask, blMask, tmMask, retiMask, sharMask, lcMask, cbMask, maskMask; + int colorMask, colorMaskinv, expMask, expMaskinv, shMask, shMaskinv, vibMask, softMask, blMask, tmMask, retiMask, sharMask, lcMask, cbMask, logMask, maskMask; for (auto tool : locallabTools) { - tool->getMaskView(colorMask, colorMaskinv, expMask, expMaskinv, shMask, shMaskinv, vibMask, softMask, blMask, tmMask, retiMask, sharMask, lcMask, cbMask, maskMask); + tool->getMaskView(colorMask, colorMaskinv, expMask, expMaskinv, shMask, shMaskinv, vibMask, softMask, blMask, tmMask, retiMask, sharMask, lcMask, cbMask, logMask, maskMask); } // Indicate to spot control panel if one mask preview is active const bool isMaskActive = (colorMask == 0) || (colorMaskinv == 0) || (expMask == 0) || (expMaskinv == 0) || (shMask == 0) || (shMaskinv == 0) || (vibMask == 0) || (softMask == 0) || (blMask == 0) || (tmMask == 0) || (retiMask == 0) || (sharMask == 0) || - (lcMask == 0) || (cbMask == 0) || (maskMask == 0); + (lcMask == 0) || (cbMask == 0) || (logMask == 0) || (maskMask == 0); expsettings->setMaskPrevActive(isMaskActive); - return {prevDeltaE, colorMask, colorMaskinv, expMask, expMaskinv, shMask, shMaskinv, vibMask, softMask, blMask, tmMask, retiMask, sharMask, lcMask, cbMask, maskMask}; + return {prevDeltaE, colorMask, colorMaskinv, expMask, expMaskinv, shMask, shMaskinv, vibMask, softMask, blMask, tmMask, retiMask, sharMask, lcMask, cbMask, logMask, maskMask}; } void Locallab::resetshowPressed() diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 44e408d49..1c3c06167 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -40,7 +40,7 @@ public: /* ==== LocallabToolList ==== */ class LocallabToolList: - public Gtk::VBox + public Gtk::Box { private: // Tree model to manage ComboBox rows @@ -141,7 +141,7 @@ public: void minmaxChanged(const std::vector &minmax, int selspot) override; // Locallab Log Encoding autocompute function - void logencodChanged(const float blackev, const float whiteev, const float sourceg, const float targetg) override; + void logencodChanged(const float blackev, const float whiteev, const float sourceg, const float sourceab, const float targetg) override; // Locallab tools mask background management function void refChanged(const std::vector &ref, int selspot) override; @@ -163,6 +163,7 @@ public: int sharMask; int lcMask; int cbMask; + int logMask; int maskMask; }; diff --git a/rtgui/locallabtools.cc b/rtgui/locallabtools.cc index 09d1a7cf5..2edb7db82 100644 --- a/rtgui/locallabtools.cc +++ b/rtgui/locallabtools.cc @@ -1,4 +1,5 @@ /* + * * This file is part of RawTherapee. * * Copyright (c) 2004-2010 Gabor Horvath frame @@ -131,31 +132,32 @@ LocallabTool::LocallabTool(Gtk::Box* content, Glib::ustring toolName, Glib::ustr complexity(Gtk::manage(new MyComboBoxText())) { // Create expander title bar - Gtk::HBox* const titleBox = Gtk::manage(new Gtk::HBox()); + Gtk::Box *titVBox; + titVBox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + titVBox->set_spacing(2); + + Gtk::Box* const titleBox = Gtk::manage(new Gtk::Box()); Gtk::Label* const titleLabel = Gtk::manage(new Gtk::Label()); titleLabel->set_markup(Glib::ustring("") + escapeHtmlChars(UILabel) + Glib::ustring("")); titleLabel->set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_CENTER); titleBox->pack_start(*titleLabel, Gtk::PACK_EXPAND_WIDGET, 0); - + Gtk::EventBox* const removeEvBox = Gtk::manage(new Gtk::EventBox()); // Glue to manage mouse clicking event on remove image removeEvBox->set_can_focus(false); removeEvBox->set_above_child(false); // To have priority over expander title bar when mouse clicking on remove image removeEvBox->signal_button_release_event().connect(sigc::mem_fun(this, &LocallabTool::on_remove_change)); RTImage* const removeImage = Gtk::manage(new RTImage("cancel-small.png")); removeEvBox->add(*removeImage); - titleBox->pack_end(*removeEvBox, Gtk::PACK_SHRINK, 4); - + titleBox->pack_end(*removeEvBox, Gtk::PACK_SHRINK, 1); if (needMode) { complexity->append(M("TP_LOCALLAB_MODE_EXPERT")); complexity->append(M("TP_LOCALLAB_MODE_NORMAL")); complexity->append(M("TP_LOCALLAB_MODE_SIMPLE")); complexity->set_active(2); - complexity->setPreferredWidth(100, -1); complexityConn = complexity->signal_changed().connect(sigc::mem_fun(*this, &LocallabTool::complexityModeChanged)); - titleBox->pack_end(*complexity, Gtk::PACK_SHRINK, 2); } - Gtk::VSeparator* const separator = Gtk::manage(new Gtk::VSeparator()); + Gtk::Separator* const separator = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)); titleBox->pack_end(*separator, Gtk::PACK_SHRINK, 0); if (need100Percent) { @@ -163,8 +165,10 @@ LocallabTool::LocallabTool(Gtk::Box* content, Glib::ustring toolName, Glib::ustr titleImage->set_tooltip_text(M("TP_GENERAL_11SCALE_TOOLTIP")); titleBox->pack_end(*titleImage, Gtk::PACK_SHRINK, 0); } + titVBox->pack_start(*titleBox, Gtk::PACK_SHRINK, 1); + titVBox->pack_start(*complexity, Gtk::PACK_SHRINK, 1); - exp = Gtk::manage(new MyExpander(true, titleBox)); + exp = Gtk::manage(new MyExpander(true, titVBox)); exp->signal_button_release_event().connect_notify(sigc::mem_fun(this, &LocallabTool::foldThemAll)); enaExpConn = exp->signal_enabled_toggled().connect(sigc::mem_fun(*this, &LocallabTool::enabledChanged)); @@ -424,6 +428,13 @@ LocallabColor::LocallabColor(): structcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRUCCOL1"), 0, 100, 1, 0))), blurcolde(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURDE"), 2, 100, 1, 5))), softradiuscol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.5, 0.))), + exprecov(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_DENOI2_EXP")))), + maskusablec(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUSABLE")))), + maskunusablec(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUNUSABLE")))), + recothresc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKRECOTHRES"), 1., 2., 0.01, 1.))), + lowthresc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHRLOW"), 1., 80., 0.5, 12.))), + higthresc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHR"), 20., 99., 0.5, 85.))), + decayc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKDDECAY"), 0.5, 4., 0.1, 2.))), invers(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))), expgradcol(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_EXPGRAD")))), strcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADSTRLUM"), -4., 4., 0.05, 0.))), @@ -440,11 +451,11 @@ LocallabColor::LocallabColor(): clshape(static_cast(clCurveEditorG->addCurve(CT_Diagonal, "C(L)"))), lcshape(static_cast(clCurveEditorG->addCurve(CT_Diagonal, "L(C)"))), HCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_HLH"))), - LHshape(static_cast(HCurveEditorG->addCurve(CT_Flat, "L(H)", nullptr, false, true))), + LHshape(static_cast(HCurveEditorG->addCurve(CT_Flat, "L(h)", nullptr, false, true))), H3CurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_HLH"))), - CHshape(static_cast(H3CurveEditorG->addCurve(CT_Flat, "C(H)", nullptr, false, true))), + CHshape(static_cast(H3CurveEditorG->addCurve(CT_Flat, "C(h)", nullptr, false, true))), H2CurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_HLH"))), - HHshape(static_cast(H2CurveEditorG->addCurve(CT_Flat, "H(H)", nullptr, false, true))), + HHshape(static_cast(H2CurveEditorG->addCurve(CT_Flat, "h(h)", nullptr, false, true))), rgbCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_RGB"))), toneMethod(Gtk::manage(new MyComboBoxText())), rgbshape(static_cast(rgbCurveEditorG->addCurve(CT_Diagonal, "", toneMethod))), @@ -464,10 +475,11 @@ LocallabColor::LocallabColor(): showmaskcolMethod(Gtk::manage(new MyComboBoxText())), showmaskcolMethodinv(Gtk::manage(new MyComboBoxText())), enaColorMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), - maskCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASKCOL"))), - CCmaskshape(static_cast(maskCurveEditorG->addCurve(CT_Flat, "C(C)", nullptr, false, false))), - LLmaskshape(static_cast(maskCurveEditorG->addCurve(CT_Flat, "L(L)", nullptr, false, false))), - HHmaskshape(static_cast(maskCurveEditorG->addCurve(CT_Flat, "LC(H)", nullptr, false, true))), +// maskCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASKCOL"))), + maskCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir,"", 1)), + CCmaskshape(static_cast(maskCurveEditorG->addCurve(CT_Flat, "C", nullptr, false, false))), + LLmaskshape(static_cast(maskCurveEditorG->addCurve(CT_Flat, "L", nullptr, false, false))), + HHmaskshape(static_cast(maskCurveEditorG->addCurve(CT_Flat, "LC(h)", nullptr, false, true))), struFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LABSTRUM")))), strumaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRUMASKCOL"), 0., 200., 0.1, 0.))), toolcol(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_TOOLCOL")))), @@ -477,20 +489,25 @@ LocallabColor::LocallabColor(): blurcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURCOL"), 0.2, 100., 0.5, 0.2))), blendmaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), toolcolFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_TOOLMASK")))), + toolcolFrame2(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_TOOLMASK_2")))), radmaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), lapmaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), chromaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), gammaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.25, 4.0, 0.01, 1.))), slomaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), shadmaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHAMASKCOL"), 0, 100, 1, 0))), - maskHCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASKH"))), - HHhmaskshape(static_cast(maskHCurveEditorG->addCurve(CT_Flat, "H(H)", nullptr, false, true))), + // maskHCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASKH"))), + maskHCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, "")), + HHhmaskshape(static_cast(maskHCurveEditorG->addCurve(CT_Flat, "h(h)", nullptr, false, true))), mask2CurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK2"))), Lmaskshape(static_cast(mask2CurveEditorG->addCurve(CT_Diagonal, "L(L)"))), mask2CurveEditorGwav(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_WAVMASK"))), LLmaskcolshapewav(static_cast(mask2CurveEditorGwav->addCurve(CT_Flat, "L(L)", nullptr, false, false))), csThresholdcol(Gtk::manage(new ThresholdAdjuster(M("TP_LOCALLAB_CSTHRESHOLDBLUR"), 0, 9, 0, 0, 6, 5, 0, false))) { + + set_orientation(Gtk::ORIENTATION_VERTICAL); + float R, G, B; std::vector six_shape; @@ -531,6 +548,11 @@ LocallabColor::LocallabColor(): softradiuscol->setLogScale(10, 0); softradiuscol->setAdjusterListener(this); + recothresc->setAdjusterListener(this); + lowthresc->setAdjusterListener(this); + higthresc->setAdjusterListener(this); + decayc->setAdjusterListener(this); + setExpandAlignProperties(exprecov, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); inversConn = invers->signal_toggled().connect(sigc::mem_fun(*this, &LocallabColor::inversChanged)); invers->set_tooltip_text(M("TP_LOCALLAB_INVERS_TOOLTIP")); @@ -788,6 +810,18 @@ LocallabColor::LocallabColor(): pack_start(*blurcolde); pack_start(*softradiuscol); pack_start(*invers); + ToolParamBlock* const colBox3 = Gtk::manage(new ToolParamBlock()); + colBox3->pack_start(*maskusablec, Gtk::PACK_SHRINK, 0); + colBox3->pack_start(*maskunusablec, Gtk::PACK_SHRINK, 0); + colBox3->pack_start(*recothresc); + colBox3->pack_start(*lowthresc); + colBox3->pack_start(*higthresc); + colBox3->pack_start(*decayc); + // colBox3->pack_start(*invmaskc); + exprecov->add(*colBox3, false); + pack_start(*exprecov, false, false); + + ToolParamBlock* const gradcolBox = Gtk::manage(new ToolParamBlock()); gradcolBox->pack_start(*strcol); gradcolBox->pack_start(*strcolab); @@ -796,7 +830,7 @@ LocallabColor::LocallabColor(): expgradcol->add(*gradcolBox, false); pack_start(*expgradcol, false, false); ToolParamBlock* const curvBox = Gtk::manage(new ToolParamBlock()); - Gtk::HBox* const qualcurvbox = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const qualcurvbox = Gtk::manage(new Gtk::Box()); qualcurvbox->pack_start(*labqualcurv, Gtk::PACK_SHRINK, 4); qualcurvbox->pack_start(*qualitycurveMethod); curvBox->pack_start(*qualcurvbox); @@ -814,7 +848,7 @@ LocallabColor::LocallabColor(): Gtk::Frame* const merge1colFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_MERGE1COLFRA"))); merge1colFrame->set_label_align(0.025, 0.5); ToolParamBlock* const mergecolBox = Gtk::manage(new ToolParamBlock()); - Gtk::HSeparator* const separatormer = Gtk::manage(new Gtk::HSeparator()); + Gtk::Separator* const separatormer = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); mergecolBox->pack_start(*separatormer, Gtk::PACK_SHRINK, 2); mergecolBox->pack_start(*mergecolMethod); mergecolBox->pack_start(*mercol); @@ -851,6 +885,7 @@ LocallabColor::LocallabColor(): maskcolBox->pack_start(*blendmaskcol, Gtk::PACK_SHRINK, 0); // Gtk::Frame* const toolcolFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_TOOLMASK"))); toolcolFrame->set_label_align(0.025, 0.5); + toolcolFrame2->set_label_align(0.025, 0.5); ToolParamBlock* const toolcolBox = Gtk::manage(new ToolParamBlock()); toolcolBox->pack_start(*radmaskcol, Gtk::PACK_SHRINK, 0); toolcolBox->pack_start(*lapmaskcol, Gtk::PACK_SHRINK, 0); @@ -860,8 +895,11 @@ LocallabColor::LocallabColor(): toolcolBox->pack_start(*shadmaskcol, Gtk::PACK_SHRINK, 0); toolcolBox->pack_start(*maskHCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor toolcolBox->pack_start(*mask2CurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor - toolcolBox->pack_start(*mask2CurveEditorGwav, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor - toolcolBox->pack_start(*csThresholdcol, Gtk::PACK_SHRINK, 0); + ToolParamBlock* const toolcolBox2 = Gtk::manage(new ToolParamBlock()); + toolcolBox2->pack_start(*mask2CurveEditorGwav, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor + toolcolBox2->pack_start(*csThresholdcol, Gtk::PACK_SHRINK, 0); + toolcolFrame2->add(*toolcolBox2); + toolcolBox->pack_start(*toolcolFrame2); toolcolFrame->add(*toolcolBox); maskcolBox->pack_start(*toolcolFrame); mergecolFrame->add(*maskcolBox); @@ -908,7 +946,7 @@ void LocallabColor::resetMaskView() showmaskcolMethodConninv.block(false); } -void LocallabColor::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) +void LocallabColor::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) { colorMask = showmaskcolMethod->get_active_row_number(); colorMaskinv = showmaskcolMethodinv->get_active_row_number(); @@ -923,6 +961,7 @@ void LocallabColor::updateAdviceTooltips(const bool showTooltips) strengthgrid->set_tooltip_text(M("TP_LOCALLAB_STRENGRID_TOOLTIP")); blurcolde->set_tooltip_text(M("TP_LOCALLAB_BLURCOLDE_TOOLTIP")); softradiuscol->set_tooltip_text(M("TP_LOCALLAB_SOFTRADIUSCOL_TOOLTIP")); + exprecov->set_tooltip_markup(M("TP_LOCALLAB_MASKRECOL_TOOLTIP")); expgradcol->set_tooltip_text(M("TP_LOCALLAB_EXPGRADCOL_TOOLTIP")); rgbCurveEditorG->set_tooltip_text(M("TP_LOCALLAB_RGBCURVE_TOOLTIP")); sensi->set_tooltip_text(M("TP_LOCALLAB_SENSI_TOOLTIP")); @@ -963,6 +1002,9 @@ void LocallabColor::updateAdviceTooltips(const bool showTooltips) blurcol->set_tooltip_text(M("TP_LOCALLAB_BLURRMASK_TOOLTIP")); lapmaskcol->set_tooltip_text(M("TP_LOCALLAB_LAPRAD1_TOOLTIP")); csThresholdcol->set_tooltip_text(M("TP_LOCALLAB_WAVEMASK_LEVEL_TOOLTIP")); + decayc->set_tooltip_text(M("TP_LOCALLAB_MASKDECAY_TOOLTIP")); + lowthresc->set_tooltip_text(M("TP_LOCALLAB_MASKLOWTHRESC_TOOLTIP")); + higthresc->set_tooltip_text(M("TP_LOCALLAB_MASKHIGTHRESC_TOOLTIP")); } else { lumFrame->set_tooltip_text(""); lightness->set_tooltip_text(""); @@ -970,6 +1012,7 @@ void LocallabColor::updateAdviceTooltips(const bool showTooltips) strengthgrid->set_tooltip_text(""); blurcolde->set_tooltip_text(""); softradiuscol->set_tooltip_text(""); + exprecov->set_tooltip_markup(""); expgradcol->set_tooltip_text(""); rgbCurveEditorG->set_tooltip_text(""); sensi->set_tooltip_text(""); @@ -1010,11 +1053,15 @@ void LocallabColor::updateAdviceTooltips(const bool showTooltips) mask2CurveEditorGwav->set_tooltip_text(""); LLmaskcolshapewav->setTooltip(""); csThresholdcol->set_tooltip_text(""); + decayc->set_tooltip_text(""); + lowthresc->set_tooltip_text(""); + higthresc->set_tooltip_text(""); } } void LocallabColor::setDefaultExpanderVisibility() { + exprecov->set_expanded(false); expgradcol->set_expanded(false); expcurvcol->set_expanded(false); expmaskcol1->set_expanded(false); @@ -1142,6 +1189,11 @@ void LocallabColor::read(const rtengine::procparams::ProcParams* pp, const Param merMethod->set_active(3); } + recothresc->setValue((double)spot.recothresc); + lowthresc->setValue((double)spot.lowthresc); + higthresc->setValue((double)spot.higthresc); + decayc->setValue((double)spot.decayc); + if (spot.mergecolMethod == "one") { mergecolMethod->set_active(0); } else if (spot.mergecolMethod == "two") { @@ -1275,6 +1327,11 @@ void LocallabColor::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pe spot.strcolh = strcolh->getValue(); spot.angcol = angcol->getValue(); + spot.recothresc = recothresc->getValue(); + spot.lowthresc = lowthresc->getValue(); + spot.higthresc = higthresc->getValue(); + spot.decayc = decayc->getValue(); + if (qualitycurveMethod->get_active_row_number() == 0) { spot.qualitycurveMethod = "none"; } else if (qualitycurveMethod->get_active_row_number() == 1) { @@ -1438,6 +1495,11 @@ void LocallabColor::setDefaults(const rtengine::procparams::ProcParams* defParam slomaskcol->setDefault(defSpot.slomaskcol); shadmaskcol->setDefault((double)defSpot.shadmaskcol); csThresholdcol->setDefault(defSpot.csthresholdcol); + recothresc->setDefault((double)defSpot.recothresc); + lowthresc->setDefault((double)defSpot.lowthresc); + higthresc->setDefault((double)defSpot.higthresc); + decayc->setDefault((double)defSpot.decayc); + } // Note: No need to manage pedited as batch mode is deactivated for Locallab @@ -1502,6 +1564,36 @@ void LocallabColor::adjusterChanged(Adjuster* a, double newval) } } + if (a == recothresc) { + + if (listener) { + listener->panelChanged(Evlocallabrecothresc, + recothresc->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == lowthresc) { + if (listener) { + listener->panelChanged(Evlocallablowthresc, + lowthresc->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == higthresc) { + if (listener) { + listener->panelChanged(Evlocallabhigthresc, + higthresc->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == decayc) { + if (listener) { + listener->panelChanged(Evlocallabdecayc, + decayc->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == strcol) { if (listener) { listener->panelChanged(Evlocallabstrcol, @@ -1867,6 +1959,7 @@ void LocallabColor::convertParamToNormal() HHhmaskshape->setCurve(defSpot.HHhmaskcurve); LLmaskcolshapewav->setCurve(defSpot.LLmaskcolcurvewav); csThresholdcol->setValue(defSpot.csthresholdcol); + decayc->setValue(defSpot.decayc); // Enable all listeners enableListener(); @@ -1901,13 +1994,17 @@ void LocallabColor::convertParamToSimple() showmaskcolMethod->set_active(0); showmaskcolMethodinv->set_active(0); enaColorMask->set_active(defSpot.enaColorMask); - CCmaskshape->setCurve(defSpot.CCmaskcurve); - LLmaskshape->setCurve(defSpot.LLmaskcurve); - HHmaskshape->setCurve(defSpot.HHmaskcurve); - blendmaskcol->setValue((double)defSpot.blendmaskcol); - radmaskcol->setValue(defSpot.radmaskcol); - chromaskcol->setValue(defSpot.chromaskcol); - Lmaskshape->setCurve(defSpot.Lmaskcurve); +// CCmaskshape->setCurve(defSpot.CCmaskcurve); +// LLmaskshape->setCurve(defSpot.LLmaskcurve); +// HHmaskshape->setCurve(defSpot.HHmaskcurve); +// blendmaskcol->setValue((double)defSpot.blendmaskcol); +// radmaskcol->setValue(defSpot.radmaskcol); +// chromaskcol->setValue(defSpot.chromaskcol); +// Lmaskshape->setCurve(defSpot.Lmaskcurve); + recothresc->setValue(defSpot.recothresc); + lowthresc->setValue(defSpot.lowthresc); + higthresc->setValue(defSpot.higthresc); + decayc->setValue(defSpot.decayc); // Enable all listeners enableListener(); @@ -1925,7 +2022,10 @@ void LocallabColor::updateGUIToMode(const modeType new_type) expcurvcol->hide(); expmaskcol1->hide(); expmaskcol->hide(); - + exprecov->hide(); + maskusablec->hide(); + maskunusablec->hide(); + decayc->hide(); break; case Normal: @@ -1940,6 +2040,7 @@ void LocallabColor::updateGUIToMode(const modeType new_type) H2CurveEditorG->hide(); rgbCurveEditorG->hide(); special->hide(); + exprecov->show(); expmaskcol1->hide(); struFrame->hide(); blurFrame->hide(); @@ -1950,15 +2051,26 @@ void LocallabColor::updateGUIToMode(const modeType new_type) maskHCurveEditorG->hide(); mask2CurveEditorGwav->hide(); csThresholdcol->hide(); + toolcolFrame2->hide(); // Specific Simple mode widgets are shown in Normal mode softradiuscol->show(); + if (enaColorMask->get_active()) { + maskusablec->show(); + maskunusablec->hide(); + + } else { + maskusablec->hide(); + maskunusablec->show(); + } if (!invers->get_active()) { // Keep widget hidden when invers is toggled expgradcol->show(); + exprecov->show(); } expcurvcol->show(); expmaskcol->show(); + decayc->hide(); break; @@ -1970,11 +2082,23 @@ void LocallabColor::updateGUIToMode(const modeType new_type) if (!invers->get_active()) { // Keep widget hidden when invers is toggled softradiuscol->show(); expgradcol->show(); + exprecov->show(); } strcolab->show(); strcolh->show(); expcurvcol->show(); + if (enaColorMask->get_active()) { + maskusablec->show(); + maskunusablec->hide(); + + } else { + maskusablec->hide(); + maskunusablec->show(); + } + + exprecov->show(); + decayc->show(); if (!invers->get_active()) { // Keep widgets hidden when invers is toggled clCurveEditorG->show(); @@ -2000,6 +2124,7 @@ void LocallabColor::updateGUIToMode(const modeType new_type) maskHCurveEditorG->show(); mask2CurveEditorGwav->show(); csThresholdcol->show(); + toolcolFrame2->show(); } } @@ -2173,6 +2298,15 @@ void LocallabColor::showmaskcolMethodChangedinv() void LocallabColor::enaColorMaskChanged() { + if (enaColorMask->get_active()) { + maskusablec->show(); + maskunusablec->hide(); + + } else { + maskusablec->hide(); + maskunusablec->show(); + } + if (isLocActivated && exp->getEnabled()) { if (listener) { if (enaColorMask->get_active()) { @@ -2227,6 +2361,7 @@ void LocallabColor::updateColorGUI1() structcol->hide(); softradiuscol->hide(); expgradcol->hide(); + exprecov->hide(); labqualcurv->hide(); qualitycurveMethod->hide(); clCurveEditorG->hide(); @@ -2251,6 +2386,7 @@ void LocallabColor::updateColorGUI1() if (mode == Expert || mode == Normal) { // Keep widget hidden in Simple mode softradiuscol->show(); expgradcol->show(); + exprecov->show(); } labqualcurv->show(); @@ -2361,8 +2497,9 @@ LocallabExposure::LocallabExposure(): expfat(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_FATFRA")))), fatamount(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATAMOUNT"), 1., 100., 1., 1.))), fatdetail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATDETAIL"), -100., 300., 1., 0.))), - fatlevel(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATLEVEL"), 0.25, 2.5, 0.05, 1.))), - fatanchor(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATANCHORA"), 0.1, 3.0, 0.05, 1.))), + norm(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_EQUIL")))), + fatlevel(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATLEVEL"), 0.5, 2.0, 0.01, 1.))), + fatanchor(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATANCHORA"), 0.5, 2.0, 0.01, 1.))), sensiex(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 60))), structexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRUCCOL"), 0, 100, 1, 0))), blurexpde(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURDE"), 2, 100, 1, 5))), @@ -2376,6 +2513,13 @@ LocallabExposure::LocallabExposure(): expchroma(Gtk::manage(new Adjuster(M("TP_LOCALLAB_EXPCHROMA"), -50, 100, 1, 5))), curveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_CURVEEDITOR_TONES_LABEL"))), shapeexpos(static_cast(curveEditorG->addCurve(CT_Diagonal, ""))), + exprecove(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_DENOI2_EXP")))), + maskusablee(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUSABLE")))), + maskunusablee(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUNUSABLE")))), + recothrese(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKRECOTHRES"), 1., 2., 0.01, 1.))), + lowthrese(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHRLOW"), 1., 80., 0.5, 12.))), + higthrese(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHR"), 20., 99., 0.5, 85.))), + decaye(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKDDECAY"), 0.5, 4., 0.1, 2.))), expgradexp(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_EXPGRAD")))), strexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADSTR"), -4., 4., 0.05, 0.))), angexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADANG"), -180, 180, 0.1, 0.))), @@ -2386,10 +2530,11 @@ LocallabExposure::LocallabExposure(): showmaskexpMethodinv(Gtk::manage(new MyComboBoxText())), enaExpMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), enaExpMaskaft(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASKAFT")))), - maskexpCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), - CCmaskexpshape(static_cast(maskexpCurveEditorG->addCurve(CT_Flat, "C(C)", nullptr, false, false))), - LLmaskexpshape(static_cast(maskexpCurveEditorG->addCurve(CT_Flat, "L(L)", nullptr, false, false))), - HHmaskexpshape(static_cast(maskexpCurveEditorG->addCurve(CT_Flat, "LC(H)", nullptr, false, true))), + // maskexpCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), + maskexpCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, "", 1)), + CCmaskexpshape(static_cast(maskexpCurveEditorG->addCurve(CT_Flat, "C", nullptr, false, false))), + LLmaskexpshape(static_cast(maskexpCurveEditorG->addCurve(CT_Flat, "L", nullptr, false, false))), + HHmaskexpshape(static_cast(maskexpCurveEditorG->addCurve(CT_Flat, "LC(h)", nullptr, false, true))), blendmaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), radmaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), lapmaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), @@ -2402,6 +2547,8 @@ LocallabExposure::LocallabExposure(): mask2expCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK2"))), Lmaskexpshape(static_cast(mask2expCurveEditorG->addCurve(CT_Diagonal, "L(L)"))) { + set_orientation(Gtk::ORIENTATION_VERTICAL); + const LocallabParams::LocallabSpot defSpot; // Parameter Exposure specific widgets @@ -2477,6 +2624,12 @@ LocallabExposure::LocallabExposure(): softradiusexp->setLogScale(10, 0); softradiusexp->setAdjusterListener(this); + recothrese->setAdjusterListener(this); + lowthrese->setAdjusterListener(this); + higthrese->setAdjusterListener(this); + decaye->setAdjusterListener(this); + setExpandAlignProperties(exprecove, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + normConn = norm->signal_toggled().connect(sigc::mem_fun(*this, &LocallabExposure::normChanged)); inversexConn = inversex->signal_toggled().connect(sigc::mem_fun(*this, &LocallabExposure::inversexChanged)); inversex->set_tooltip_text(M("TP_LOCALLAB_INVERS_TOOLTIP")); @@ -2554,7 +2707,7 @@ LocallabExposure::LocallabExposure(): pdeBox->pack_start(*linear); pdeBox->pack_start(*balanexp); pdeBox->pack_start(*gamm); - Gtk::HBox* const ctboxexpmethod = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const ctboxexpmethod = Gtk::manage(new Gtk::Box()); // Gtk::Label* const labelexpmethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_NOISEMETH") + ":")); ctboxexpmethod->pack_start(*labelexpmethod, Gtk::PACK_SHRINK, 4); ctboxexpmethod->pack_start(*exnoiseMethod); @@ -2566,8 +2719,9 @@ LocallabExposure::LocallabExposure(): ToolParamBlock* const fatBox = Gtk::manage(new ToolParamBlock()); fatBox->pack_start(*fatamount); fatBox->pack_start(*fatdetail); - fatBox->pack_start(*fatlevel); - fatBox->pack_start(*fatanchor); +// fatBox->pack_start(*norm); +// fatBox->pack_start(*fatlevel); +// fatBox->pack_start(*fatanchor); // fatFrame->add(*fatBox); expfat->add(*fatBox, false); // pack_start(*fatFrame); @@ -2586,6 +2740,16 @@ LocallabExposure::LocallabExposure(): toolBox->pack_start(*curveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor exptoolexp->add(*toolBox, false); pack_start(*exptoolexp); + ToolParamBlock* const expBox3 = Gtk::manage(new ToolParamBlock()); + expBox3->pack_start(*maskusablee, Gtk::PACK_SHRINK, 0); + expBox3->pack_start(*maskunusablee, Gtk::PACK_SHRINK, 0); + expBox3->pack_start(*recothrese); + expBox3->pack_start(*lowthrese); + expBox3->pack_start(*higthrese); + expBox3->pack_start(*decaye); + exprecove->add(*expBox3, false); + pack_start(*exprecove, false, false); + ToolParamBlock* const gradBox = Gtk::manage(new ToolParamBlock()); gradBox->pack_start(*strexp); gradBox->pack_start(*angexp); @@ -2639,7 +2803,7 @@ void LocallabExposure::resetMaskView() showmaskexpMethodConninv.block(false); } -void LocallabExposure::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) +void LocallabExposure::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) { expMask = showmaskexpMethod->get_active_row_number(); expMaskinv = showmaskexpMethodinv->get_active_row_number(); @@ -2652,6 +2816,10 @@ void LocallabExposure::updateAdviceTooltips(const bool showTooltips) // expMethod->set_tooltip_text(M("TP_LOCALLAB_EXPMETHOD_TOOLTIP")); // pdeFrame->set_tooltip_text(M("TP_LOCALLAB_PDEFRAME_TOOLTIP")); exppde->set_tooltip_text(M("TP_LOCALLAB_PDEFRAME_TOOLTIP")); + exprecove->set_tooltip_markup(M("TP_LOCALLAB_MASKREEXP_TOOLTIP")); + decaye->set_tooltip_text(M("TP_LOCALLAB_MASKDECAY_TOOLTIP")); + lowthrese->set_tooltip_text(M("TP_LOCALLAB_MASKLOWTHRESE_TOOLTIP")); + higthrese->set_tooltip_text(M("TP_LOCALLAB_MASKHIGTHRESE_TOOLTIP")); blurexpde->set_tooltip_text(M("TP_LOCALLAB_BLURCOLDE_TOOLTIP")); laplacexp->set_tooltip_text(M("TP_LOCALLAB_EXPLAP_TOOLTIP")); linear->set_tooltip_text(M("TP_LOCALLAB_EXPLAPLIN_TOOLTIP")); @@ -2686,6 +2854,7 @@ void LocallabExposure::updateAdviceTooltips(const bool showTooltips) exp->set_tooltip_text(""); exppde->set_tooltip_text(""); blurexpde->set_tooltip_text(""); + exprecove->set_tooltip_markup(""); laplacexp->set_tooltip_text(""); linear->set_tooltip_text(""); balanexp->set_tooltip_text(""); @@ -2718,6 +2887,7 @@ void LocallabExposure::updateAdviceTooltips(const bool showTooltips) void LocallabExposure::setDefaultExpanderVisibility() { exptoolexp->set_expanded(false); + exprecove->set_expanded(false); exppde->set_expanded(false); expfat->set_expanded(false); expgradexp->set_expanded(false); @@ -2731,6 +2901,7 @@ void LocallabExposure::disableListener() expMethodConn.block(true); exnoiseMethodConn.block(true); inversexConn.block(true); + normConn.block(true); showmaskexpMethodConn.block(true); showmaskexpMethodConninv.block(true); enaExpMaskConn.block(true); @@ -2744,6 +2915,7 @@ void LocallabExposure::enableListener() expMethodConn.block(false); exnoiseMethodConn.block(false); inversexConn.block(false); + normConn.block(false); showmaskexpMethodConn.block(false); showmaskexpMethodConninv.block(false); enaExpMaskConn.block(false); @@ -2786,10 +2958,17 @@ void LocallabExposure::read(const rtengine::procparams::ProcParams* pp, const Pa exnoiseMethod->set_active(2); } + recothrese->setValue((double)spot.recothrese); + lowthrese->setValue((double)spot.lowthrese); + higthrese->setValue((double)spot.higthrese); + decaye->setValue((double)spot.decaye); + fatamount->setValue(spot.fatamount); fatdetail->setValue(spot.fatdetail); fatlevel->setValue(spot.fatlevel); fatanchor->setValue(spot.fatanchor); + // fatlevel->setValue(1.); + // fatanchor->setValue(1.); sensiex->setValue(spot.sensiex); structexp->setValue(spot.structexp); blurexpde->setValue(spot.blurexpde); @@ -2804,6 +2983,7 @@ void LocallabExposure::read(const rtengine::procparams::ProcParams* pp, const Pa strexp->setValue(spot.strexp); angexp->setValue(spot.angexp); softradiusexp->setValue(spot.softradiusexp); + norm->set_active(spot.norm); inversex->set_active(spot.inversex); enaExpMask->set_active(spot.enaExpMask); enaExpMaskaft->set_active(spot.enaExpMaskaft); @@ -2868,6 +3048,10 @@ void LocallabExposure::write(rtengine::procparams::ProcParams* pp, ParamsEdited* } else if (exnoiseMethod->get_active_row_number() == 2) { spot.exnoiseMethod = "medhi"; } + spot.recothrese = recothrese->getValue(); + spot.lowthrese = lowthrese->getValue(); + spot.higthrese = higthrese->getValue(); + spot.decaye = decaye->getValue(); spot.fatamount = fatamount->getValue(); spot.fatdetail = fatdetail->getValue(); @@ -2888,6 +3072,7 @@ void LocallabExposure::write(rtengine::procparams::ProcParams* pp, ParamsEdited* spot.angexp = angexp->getValue(); spot.softradiusexp = softradiusexp->getValue(); spot.inversex = inversex->get_active(); + spot.norm = norm->get_active(); spot.enaExpMask = enaExpMask->get_active(); spot.enaExpMaskaft = enaExpMaskaft->get_active(); spot.CCmaskexpcurve = CCmaskexpshape->getCurve(); @@ -2944,6 +3129,10 @@ void LocallabExposure::setDefaults(const rtengine::procparams::ProcParams* defPa slomaskexp->setDefault(defSpot.slomaskexp); strmaskexp->setDefault(defSpot.strmaskexp); angmaskexp->setDefault(defSpot.angmaskexp); + recothrese->setDefault((double)defSpot.recothrese); + lowthrese->setDefault((double)defSpot.lowthrese); + higthrese->setDefault((double)defSpot.higthrese); + decaye->setDefault((double)defSpot.decaye); } // Note: No need to manage pedited as batch mode is deactivated for Locallab @@ -3013,6 +3202,34 @@ void LocallabExposure::adjusterChanged(Adjuster* a, double newval) } } + if (a == recothrese) { + if (listener) { + listener->panelChanged(Evlocallabrecothrese, + recothrese->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == lowthrese) { + if (listener) { + listener->panelChanged(Evlocallablowthrese, + lowthrese->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == higthrese) { + if (listener) { + listener->panelChanged(Evlocallabhigthrese, + higthrese->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == decaye) { + if (listener) { + listener->panelChanged(Evlocallabdecaye, + decaye->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + if (a == sensiex) { if (listener) { listener->panelChanged(Evlocallabsensiex, @@ -3232,6 +3449,12 @@ void LocallabExposure::convertParamToNormal() slomaskexp->setValue(defSpot.slomaskexp); strmaskexp->setValue(defSpot.strmaskexp); angmaskexp->setValue(defSpot.angmaskexp); +// fatlevel->setValue(defSpot.fatlevel); +// fatanchor->setValue(defSpot.fatanchor); + decaye->setValue(defSpot.decaye); +// norm->set_active(defSpot.enaExpMask); + fatlevel->setValue(defSpot.fatlevel); + fatanchor->setValue(defSpot.fatanchor); // Enable all listeners enableListener(); @@ -3243,20 +3466,26 @@ void LocallabExposure::convertParamToSimple() // Disable all listeners disableListener(); - + fatlevel->setValue(defSpot.fatlevel); + fatanchor->setValue(defSpot.fatanchor); + norm->set_active(false); // Set hidden specific GUI widgets in Simple mode to default spot values strexp->setValue(defSpot.strexp); angexp->setValue(defSpot.angexp); softradiusexp->setValue(defSpot.softradiusexp); enaExpMask->set_active(defSpot.enaExpMask); enaExpMaskaft->set_active(defSpot.enaExpMaskaft); - CCmaskexpshape->setCurve(defSpot.CCmaskexpcurve); - LLmaskexpshape->setCurve(defSpot.CCmaskexpcurve); - HHmaskexpshape->setCurve(defSpot.HHmaskexpcurve); - blendmaskexp->setValue((double)defSpot.blendmaskexp); - radmaskexp->setValue(defSpot.radmaskexp); - chromaskexp->setValue(defSpot.chromaskexp); - Lmaskexpshape->setCurve(defSpot.Lmaskexpcurve); + // CCmaskexpshape->setCurve(defSpot.CCmaskexpcurve); + // LLmaskexpshape->setCurve(defSpot.CCmaskexpcurve); + // HHmaskexpshape->setCurve(defSpot.HHmaskexpcurve); + // blendmaskexp->setValue((double)defSpot.blendmaskexp); + // radmaskexp->setValue(defSpot.radmaskexp); +// chromaskexp->setValue(defSpot.chromaskexp); +// Lmaskexpshape->setCurve(defSpot.Lmaskexpcurve); + recothrese->setValue(defSpot.recothrese); + lowthrese->setValue(defSpot.lowthrese); + higthrese->setValue(defSpot.higthrese); + decaye->setValue(defSpot.decaye); // Enable all listeners enableListener(); @@ -3271,7 +3500,14 @@ void LocallabExposure::updateGUIToMode(const modeType new_type) blurexpde->hide(); expgradexp->hide(); softradiusexp->hide(); + exprecove->hide(); + maskusablee->hide(); + maskunusablee->hide(); + decaye->hide(); expmaskexp->hide(); + norm->hide(); + fatlevel->hide(); + fatanchor->hide(); break; @@ -3283,14 +3519,28 @@ void LocallabExposure::updateGUIToMode(const modeType new_type) gammaskexp->hide(); slomaskexp->hide(); gradFramemask->hide(); + exprecove->show(); + if (enaExpMask->get_active()) { + maskusablee->show(); + maskunusablee->hide(); + + } else { + maskusablee->hide(); + maskunusablee->show(); + } + norm->show(); + fatlevel->hide(); + fatanchor->hide(); // Specific Simple mode widgets are shown in Normal mode if (!inversex->get_active()) { // Keep widget hidden when invers is toggled expgradexp->show(); softradiusexp->show(); + exprecove->show(); } expmaskexp->show(); + decaye->hide(); break; @@ -3301,10 +3551,22 @@ void LocallabExposure::updateGUIToMode(const modeType new_type) } blurexpde->show(); + norm->show(); + fatlevel->show(); + fatanchor->show(); if (!inversex->get_active()) { // Keep widget hidden when invers is toggled expgradexp->show(); softradiusexp->show(); + exprecove->show(); + } + if (enaExpMask->get_active()) { + maskusablee->show(); + maskunusablee->hide(); + + } else { + maskusablee->hide(); + maskunusablee->show(); } expmaskexp->show(); @@ -3312,6 +3574,7 @@ void LocallabExposure::updateGUIToMode(const modeType new_type) gammaskexp->show(); slomaskexp->show(); gradFramemask->show(); + decaye->show(); } } @@ -3355,6 +3618,23 @@ void LocallabExposure::exnoiseMethodChanged() } } +void LocallabExposure::normChanged() +{ + + if (isLocActivated && exp->getEnabled()) { + if (listener) { + if (norm->get_active()) { + listener->panelChanged(Evlocallabnorm, + M("GENERAL_ENABLED") + " (" + escapeHtmlChars(spotName) + ")"); + } else { + listener->panelChanged(Evlocallabnorm, + M("GENERAL_DISABLED") + " (" + escapeHtmlChars(spotName) + ")"); + } + } + } +} + + void LocallabExposure::inversexChanged() { const bool maskPreviewActivated = isMaskViewActive(); @@ -3418,6 +3698,14 @@ void LocallabExposure::showmaskexpMethodChangedinv() void LocallabExposure::enaExpMaskChanged() { + if (enaExpMask->get_active()) { + maskusablee->show(); + maskunusablee->hide(); + } else { + maskusablee->hide(); + maskunusablee->show(); + } + if (isLocActivated && exp->getEnabled()) { if (listener) { if (enaExpMask->get_active()) { @@ -3485,6 +3773,7 @@ void LocallabExposure::updateExposureGUI3() if (inversex->get_active()) { expMethod->hide(); expcomp->setLabel(M("TP_LOCALLAB_EXPCOMPINV")); + exprecove->hide(); // Manage specific case where expMethod is different from 0 if (expMethod->get_active_row_number() > 0) { @@ -3511,6 +3800,7 @@ void LocallabExposure::updateExposureGUI3() if (mode == Expert || mode == Normal) { // Keep widgets hidden in Simple mode softradiusexp->show(); expgradexp->show(); + exprecove->show(); } showmaskexpMethodinv->hide(); @@ -3553,11 +3843,18 @@ LocallabShadow::LocallabShadow(): shadows(Gtk::manage(new Adjuster(M("TP_SHADOWSHLIGHTS_SHADOWS"), 0, 100, 1, 0))), s_tonalwidth(Gtk::manage(new Adjuster(M("TP_SHADOWSHLIGHTS_SHTONALW"), 10, 100, 1, 30))), sh_radius(Gtk::manage(new Adjuster(M("TP_SHADOWSHLIGHTS_RADIUS"), 0, 100, 1, 40))), - sensihs(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 15))), + sensihs(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 15))),//unused here, but used for normalize_mean_dt blurSHde(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURDE"), 2, 100, 1, 5))), + exprecovs(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_DENOI2_EXP")))), + maskusables(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUSABLE")))), + maskunusables(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUNUSABLE")))), + recothress(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKRECOTHRES"), 1., 2., 0.01, 1.))), + lowthress(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHRLOW"), 1., 80., 0.5, 12.))), + higthress(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHR"), 20., 99., 0.5, 85.))), + decays(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKDDECAY"), 0.5, 4., 0.1, 2.))), gamFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_GAMFRA")))), gamSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMSH"), 0.25, 15.0, 0.01, 2.4))), - sloSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOSH"), 0.0, 150.0, 0.01, 12.92))), + sloSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOSH"), 0.0, 500.0, 0.01, 12.92))), expgradsh(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_EXPGRAD")))), strSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADSTR"), -4., 4., 0.05, 0.))), angSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADANG"), -180, 180, 0.1, 0.))), @@ -3566,10 +3863,11 @@ LocallabShadow::LocallabShadow(): showmaskSHMethod(Gtk::manage(new MyComboBoxText())), showmaskSHMethodinv(Gtk::manage(new MyComboBoxText())), enaSHMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), - maskSHCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), - CCmaskSHshape(static_cast(maskSHCurveEditorG->addCurve(CT_Flat, "C(C)", nullptr, false, false))), - LLmaskSHshape(static_cast(maskSHCurveEditorG->addCurve(CT_Flat, "L(L)", nullptr, false, false))), - HHmaskSHshape(static_cast(maskSHCurveEditorG->addCurve(CT_Flat, "LC(H)", nullptr, false, true))), +// maskSHCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), + maskSHCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, "", 1)), + CCmaskSHshape(static_cast(maskSHCurveEditorG->addCurve(CT_Flat, "C", nullptr, false, false))), + LLmaskSHshape(static_cast(maskSHCurveEditorG->addCurve(CT_Flat, "L", nullptr, false, false))), + HHmaskSHshape(static_cast(maskSHCurveEditorG->addCurve(CT_Flat, "LC(h)", nullptr, false, true))), blendmaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), radmaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), lapmaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), @@ -3582,6 +3880,8 @@ LocallabShadow::LocallabShadow(): fatamountSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATAMOUNT"), 1., 100., 1., 1.))), fatanchorSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATANCHOR"), 1., 100., 1., 50., Gtk::manage(new RTImage("circle-black-small.png")), Gtk::manage(new RTImage("circle-white-small.png"))))) { + set_orientation(Gtk::ORIENTATION_VERTICAL); + const LocallabParams::LocallabSpot defSpot; // Parameter Shadow highlight specific widgets @@ -3606,11 +3906,19 @@ LocallabShadow::LocallabShadow(): sh_radius->setAdjusterListener(this); + + recothress->setAdjusterListener(this); + lowthress->setAdjusterListener(this); + higthress->setAdjusterListener(this); + decays->setAdjusterListener(this); + setExpandAlignProperties(exprecovs, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + sensihs->setAdjusterListener(this); blurSHde->setAdjusterListener(this); gamSH->setAdjusterListener(this); + sloSH->setLogScale(16, 0); sloSH->setAdjusterListener(this); @@ -3699,8 +4007,18 @@ LocallabShadow::LocallabShadow(): pack_start(*shadows); pack_start(*s_tonalwidth); pack_start(*sh_radius); - // pack_start(*sensihs); + // pack_start(*sensihs);//unused here, but used for normalize_mean_dt pack_start(*blurSHde); + ToolParamBlock* const shBox3 = Gtk::manage(new ToolParamBlock()); + shBox3->pack_start(*maskusables, Gtk::PACK_SHRINK, 0); + shBox3->pack_start(*maskunusables, Gtk::PACK_SHRINK, 0); + shBox3->pack_start(*recothress); + shBox3->pack_start(*lowthress); + shBox3->pack_start(*higthress); + shBox3->pack_start(*decays); + // colBox3->pack_start(*invmaskc); + exprecovs->add(*shBox3, false); + pack_start(*exprecovs, false, false); gamFrame->set_label_align(0.025, 0.5); ToolParamBlock* const gammBox = Gtk::manage(new ToolParamBlock()); gammBox->pack_start(*gamSH); @@ -3757,7 +4075,7 @@ void LocallabShadow::resetMaskView() showmaskSHMethodConninv.block(false); } -void LocallabShadow::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) +void LocallabShadow::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) { shMask = showmaskSHMethod->get_active_row_number(); shMaskinv = showmaskSHMethodinv->get_active_row_number(); @@ -3775,6 +4093,7 @@ void LocallabShadow::updateAdviceTooltips(const bool showTooltips) gamSH->set_tooltip_text(M("TP_LOCALLAB_SHTRC_TOOLTIP")); sloSH->set_tooltip_text(M("TP_LOCALLAB_SHTRC_TOOLTIP")); strSH->set_tooltip_text(M("TP_LOCALLAB_GRADGEN_TOOLTIP")); + exprecovs->set_tooltip_markup(M("TP_LOCALLAB_MASKRESH_TOOLTIP")); expmasksh->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); blurSHde->set_tooltip_text(M("TP_LOCALLAB_BLURCOLDE_TOOLTIP")); CCmaskSHshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); @@ -3801,6 +4120,9 @@ void LocallabShadow::updateAdviceTooltips(const bool showTooltips) shadows->set_tooltip_text(""); s_tonalwidth->set_tooltip_text(""); sh_radius->set_tooltip_text(""); + decays->set_tooltip_text(M("TP_LOCALLAB_MASKDECAY_TOOLTIP")); + lowthress->set_tooltip_text(M("TP_LOCALLAB_MASKLOWTHRESS_TOOLTIP")); + higthress->set_tooltip_text(M("TP_LOCALLAB_MASKHIGTHRESS_TOOLTIP")); } else { exp->set_tooltip_text(""); @@ -3830,12 +4152,17 @@ void LocallabShadow::updateAdviceTooltips(const bool showTooltips) shadows->set_tooltip_text(""); s_tonalwidth->set_tooltip_text(""); sh_radius->set_tooltip_text(""); + exprecovs->set_tooltip_markup(""); + decays->set_tooltip_text(""); + lowthress->set_tooltip_text(""); + higthress->set_tooltip_text(""); } } void LocallabShadow::setDefaultExpanderVisibility() { + exprecovs->set_expanded(false); expgradsh->set_expanded(false); expmasksh->set_expanded(false); } @@ -3888,6 +4215,10 @@ void LocallabShadow::read(const rtengine::procparams::ProcParams* pp, const Para for (int i = 0; i < 5; i++) { multipliersh[i]->setValue((double)spot.multsh[i]); } + recothress->setValue((double)spot.recothress); + lowthress->setValue((double)spot.lowthress); + higthress->setValue((double)spot.higthress); + decays->setValue((double)spot.decays); detailSH->setValue((double)spot.detailSH); highlights->setValue((double)spot.highlights); @@ -3979,6 +4310,10 @@ void LocallabShadow::write(rtengine::procparams::ProcParams* pp, ParamsEdited* p spot.LmaskSHcurve = LmaskSHshape->getCurve(); spot.fatamountSH = fatamountSH->getValue(); spot.fatanchorSH = fatanchorSH->getValue(); + spot.recothress = recothress->getValue(); + spot.lowthress = lowthress->getValue(); + spot.higthress = higthress->getValue(); + spot.decays = decays->getValue(); } // Note: No need to manage pedited as batch mode is deactivated for Locallab @@ -4016,6 +4351,10 @@ void LocallabShadow::setDefaults(const rtengine::procparams::ProcParams* defPara slomaskSH->setDefault(defSpot.slomaskSH); fatamountSH->setDefault(defSpot.fatamountSH); fatanchorSH->setDefault(defSpot.fatanchorSH); + recothress->setDefault((double)defSpot.recothress); + lowthress->setDefault((double)defSpot.lowthress); + higthress->setDefault((double)defSpot.higthress); + decays->setDefault((double)defSpot.decays); } // Note: No need to manage pedited as batch mode is deactivated for Locallab @@ -4078,6 +4417,36 @@ void LocallabShadow::adjusterChanged(Adjuster* a, double newval) } } + if (a == recothress) { + + if (listener) { + listener->panelChanged(Evlocallabrecothress, + recothress->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == lowthress) { + if (listener) { + listener->panelChanged(Evlocallablowthress, + lowthress->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == higthress) { + if (listener) { + listener->panelChanged(Evlocallabhigthress, + higthress->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == decays) { + if (listener) { + listener->panelChanged(Evlocallabdecays, + decays->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == sensihs) { if (listener) { listener->panelChanged(Evlocallabsensihs, @@ -4241,6 +4610,7 @@ void LocallabShadow::convertParamToNormal() slomaskSH->setValue(defSpot.slomaskSH); fatamountSH->setValue(defSpot.fatamountSH); fatanchorSH->setValue(defSpot.fatanchorSH); + decays->setValue(defSpot.decays); // Enable all listeners enableListener(); @@ -4261,13 +4631,18 @@ void LocallabShadow::convertParamToSimple() showmaskSHMethod->set_active(0); showmaskSHMethodinv->set_active(0); enaSHMask->set_active(defSpot.enaSHMask); - CCmaskSHshape->setCurve(defSpot.CCmaskSHcurve); - LLmaskSHshape->setCurve(defSpot.LLmaskSHcurve); - HHmaskSHshape->setCurve(defSpot.HHmaskSHcurve); - blendmaskSH->setValue((double)defSpot.blendmaskSH); - radmaskSH->setValue(defSpot.radmaskSH); - chromaskSH->setValue(defSpot.chromaskSH); - LmaskSHshape->setCurve(defSpot.LmaskSHcurve); + // CCmaskSHshape->setCurve(defSpot.CCmaskSHcurve); + // LLmaskSHshape->setCurve(defSpot.LLmaskSHcurve); + // HHmaskSHshape->setCurve(defSpot.HHmaskSHcurve); + // blendmaskSH->setValue((double)defSpot.blendmaskSH); + // radmaskSH->setValue(defSpot.radmaskSH); + // chromaskSH->setValue(defSpot.chromaskSH); + // LmaskSHshape->setCurve(defSpot.LmaskSHcurve); + + recothress->setValue(defSpot.recothress); + lowthress->setValue(defSpot.lowthress); + higthress->setValue(defSpot.higthresc); + decays->setValue(defSpot.decays); // Enable all listeners enableListener(); @@ -4282,6 +4657,10 @@ void LocallabShadow::updateGUIToMode(const modeType new_type) gamFrame->hide(); expgradsh->hide(); expmasksh->hide(); + exprecovs->hide(); + maskusables->hide(); + maskunusables->hide(); + decays->hide(); break; @@ -4292,17 +4671,29 @@ void LocallabShadow::updateGUIToMode(const modeType new_type) gammaskSH->hide(); slomaskSH->hide(); fatSHFrame->hide(); + exprecovs->show(); // Specific Simple mode widgets are shown in Normal mode if (shMethod->get_active_row_number() != 0) { // Keep widget hidden when shMethod is equal to 0 gamFrame->show(); } + if (enaSHMask->get_active()) { + maskusables->show(); + maskunusables->hide(); + + } else { + maskusables->hide(); + maskunusables->show(); + } + if (!inverssh->get_active()) { // Keep widget hidden when inverssh is toggled expgradsh->show(); + exprecovs->show(); } expmasksh->show(); + decays->hide(); break; @@ -4316,7 +4707,18 @@ void LocallabShadow::updateGUIToMode(const modeType new_type) if (!inverssh->get_active()) { // Keep widget hidden when inverssh is toggled expgradsh->show(); + exprecovs->show(); } + if (enaSHMask->get_active()) { + maskusables->show(); + maskunusables->hide(); + + } else { + maskusables->hide(); + maskunusables->show(); + } + exprecovs->show(); + decays->show(); expmasksh->show(); lapmaskSH->show(); @@ -4420,6 +4822,15 @@ void LocallabShadow::showmaskSHMethodChangedinv() void LocallabShadow::enaSHMaskChanged() { + if (enaSHMask->get_active()) { + maskusables->show(); + maskunusables->hide(); + + } else { + maskusables->hide(); + maskunusables->show(); + } + if (isLocActivated && exp->getEnabled()) { if (listener) { if (enaSHMask->get_active()) { @@ -4446,9 +4857,11 @@ void LocallabShadow::updateShadowGUI1() showmaskSHMethod->set_active(0); showmaskSHMethodConn.block(false); showmaskSHMethodinv->show(); + exprecovs->hide(); } else { if (mode == Expert || mode == Normal) { // Keep widget hidden in Simple mode expgradsh->show(); + exprecovs->show(); } showmaskSHMethod->show(); @@ -4507,9 +4920,16 @@ LocallabVibrance::LocallabVibrance(): protectSkins(Gtk::manage(new Gtk::CheckButton(M("TP_VIBRANCE_PROTECTSKINS")))), avoidColorShift(Gtk::manage(new Gtk::CheckButton(M("TP_VIBRANCE_AVOIDCOLORSHIFT")))), pastSatTog(Gtk::manage(new Gtk::CheckButton(M("TP_VIBRANCE_PASTSATTOG")))), - sensiv(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 15))), + sensiv(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 15))),//unused here, but used for normalize_mean_dt curveEditorGG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL"))), skinTonesCurve(static_cast(curveEditorGG->addCurve(CT_Diagonal, M("TP_VIBRANCE_CURVEEDITOR_SKINTONES")))), + exprecovv(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_DENOI2_EXP")))), + maskusablev(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUSABLE")))), + maskunusablev(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUNUSABLE")))), + recothresv(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKRECOTHRES"), 1., 2., 0.01, 1.))), + lowthresv(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHRLOW"), 1., 80., 0.5, 12.))), + higthresv(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHR"), 20., 99., 0.5, 85.))), + decayv(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKDDECAY"), 0.5, 4., 0.1, 2.))), expgradvib(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_EXPGRAD")))), strvib(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADSTR"), -4., 4., 0.05, 0.))), strvibab(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADSTRCHRO"), -4., 4., 0.05, 0.))), @@ -4518,10 +4938,11 @@ LocallabVibrance::LocallabVibrance(): expmaskvib(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_SHOWVI")))), showmaskvibMethod(Gtk::manage(new MyComboBoxText())), enavibMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), - maskvibCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), - CCmaskvibshape(static_cast(maskvibCurveEditorG->addCurve(CT_Flat, "C(C)", nullptr, false, false))), - LLmaskvibshape(static_cast(maskvibCurveEditorG->addCurve(CT_Flat, "L(L)", nullptr, false, false))), - HHmaskvibshape(static_cast(maskvibCurveEditorG->addCurve(CT_Flat, "LC(H)", nullptr, false, true))), + // maskvibCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), + maskvibCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, "", 1)), + CCmaskvibshape(static_cast(maskvibCurveEditorG->addCurve(CT_Flat, "C", nullptr, false, false))), + LLmaskvibshape(static_cast(maskvibCurveEditorG->addCurve(CT_Flat, "L", nullptr, false, false))), + HHmaskvibshape(static_cast(maskvibCurveEditorG->addCurve(CT_Flat, "LC(h)", nullptr, false, true))), blendmaskvib(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), radmaskvib(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), lapmaskvib(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), @@ -4531,6 +4952,8 @@ LocallabVibrance::LocallabVibrance(): mask2vibCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK2"))), Lmaskvibshape(static_cast(mask2vibCurveEditorG->addCurve(CT_Diagonal, "L(L)"))) { + set_orientation(Gtk::ORIENTATION_VERTICAL); + float R, G, B; const LocallabParams::LocallabSpot defSpot; @@ -4572,6 +4995,12 @@ LocallabVibrance::LocallabVibrance(): curveEditorGG->curveListComplete(); + recothresv->setAdjusterListener(this); + lowthresv->setAdjusterListener(this); + higthresv->setAdjusterListener(this); + decayv->setAdjusterListener(this); + setExpandAlignProperties(exprecovv, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + setExpandAlignProperties(expgradvib, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); strvib->setAdjusterListener(this); @@ -4643,8 +5072,19 @@ LocallabVibrance::LocallabVibrance(): pack_start(*protectSkins, Gtk::PACK_SHRINK, 0); pack_start(*avoidColorShift, Gtk::PACK_SHRINK, 0); pack_start(*pastSatTog, Gtk::PACK_SHRINK, 0); - // pack_start(*sensiv, Gtk::PACK_SHRINK, 0); + // pack_start(*sensiv, Gtk::PACK_SHRINK, 0);//unused here, but used for normalize_mean_dt pack_start(*curveEditorGG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor + ToolParamBlock* const vibBox3 = Gtk::manage(new ToolParamBlock()); + vibBox3->pack_start(*maskusablev, Gtk::PACK_SHRINK, 0); + vibBox3->pack_start(*maskunusablev, Gtk::PACK_SHRINK, 0); + vibBox3->pack_start(*recothresv); + vibBox3->pack_start(*lowthresv); + vibBox3->pack_start(*higthresv); + vibBox3->pack_start(*decayv); + // colBox3->pack_start(*invmaskc); + exprecovv->add(*vibBox3, false); + pack_start(*exprecovv, false, false); + ToolParamBlock* const gradvibBox = Gtk::manage(new ToolParamBlock()); gradvibBox->pack_start(*strvib); gradvibBox->pack_start(*strvibab); @@ -4686,7 +5126,7 @@ void LocallabVibrance::resetMaskView() showmaskvibMethodConn.block(false); } -void LocallabVibrance::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) +void LocallabVibrance::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) { vibMask = showmaskvibMethod->get_active_row_number(); } @@ -4697,6 +5137,7 @@ void LocallabVibrance::updateAdviceTooltips(const bool showTooltips) exp->set_tooltip_text(M("TP_LOCALLAB_VIBRA_TOOLTIP")); warm->set_tooltip_text(M("TP_LOCALLAB_WARM_TOOLTIP")); strvib->set_tooltip_text(M("TP_LOCALLAB_GRADGEN_TOOLTIP")); + exprecovv->set_tooltip_markup(M("TP_LOCALLAB_MASKRESVIB_TOOLTIP")); expmaskvib->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); CCmaskvibshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); LLmaskvibshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); @@ -4728,6 +5169,9 @@ void LocallabVibrance::updateAdviceTooltips(const bool showTooltips) pastSatTog->set_tooltip_text(""); sensiv->set_tooltip_text(""); curveEditorGG->set_tooltip_text(""); + decayv->set_tooltip_text(M("TP_LOCALLAB_MASKDECAY_TOOLTIP")); + lowthresv->set_tooltip_text(M("TP_LOCALLAB_MASKLOWTHRESVIB_TOOLTIP")); + higthresv->set_tooltip_text(M("TP_LOCALLAB_MASKHIGTHRESVIB_TOOLTIP")); } else { exp->set_tooltip_text(""); @@ -4753,11 +5197,16 @@ void LocallabVibrance::updateAdviceTooltips(const bool showTooltips) pastSatTog->set_tooltip_text(""); sensiv->set_tooltip_text(""); curveEditorGG->set_tooltip_text(""); + exprecovv->set_tooltip_markup(""); + decayv->set_tooltip_text(""); + lowthresv->set_tooltip_text(""); + higthresv->set_tooltip_text(""); } } void LocallabVibrance::setDefaultExpanderVisibility() { + exprecovv->set_expanded(false); expgradvib->set_expanded(false); expmaskvib->set_expanded(false); } @@ -4825,6 +5274,10 @@ void LocallabVibrance::read(const rtengine::procparams::ProcParams* pp, const Pa gammaskvib->setValue(spot.gammaskvib); slomaskvib->setValue(spot.slomaskvib); Lmaskvibshape->setCurve(spot.Lmaskvibcurve); + recothresv->setValue((double)spot.recothresv); + lowthresv->setValue((double)spot.lowthresv); + higthresv->setValue((double)spot.higthresv); + decayv->setValue((double)spot.decayv); } // Enable all listeners @@ -4874,6 +5327,10 @@ void LocallabVibrance::write(rtengine::procparams::ProcParams* pp, ParamsEdited* spot.gammaskvib = gammaskvib->getValue(); spot.slomaskvib = slomaskvib->getValue(); spot.Lmaskvibcurve = Lmaskvibshape->getCurve(); + spot.recothresv = recothresv->getValue(); + spot.lowthresv = lowthresv->getValue(); + spot.higthresv = higthresv->getValue(); + spot.decayv = decayv->getValue(); } // Note: No need to manage pedited as batch mode is deactivated for Locallab @@ -4902,6 +5359,10 @@ void LocallabVibrance::setDefaults(const rtengine::procparams::ProcParams* defPa chromaskvib->setDefault(defSpot.chromaskvib); gammaskvib->setDefault(defSpot.gammaskvib); slomaskvib->setDefault(defSpot.slomaskvib); + recothresv->setDefault((double)defSpot.recothresv); + lowthresv->setDefault((double)defSpot.lowthresv); + higthresv->setDefault((double)defSpot.higthresv); + decayv->setDefault((double)defSpot.decayv); } // Note: No need to manage pedited as batch mode is deactivated for Locallab @@ -4943,6 +5404,35 @@ void LocallabVibrance::adjusterChanged(Adjuster* a, double newval) } } + if (a == recothresv) { + + if (listener) { + listener->panelChanged(Evlocallabrecothresv, + recothresv->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == lowthresv) { + if (listener) { + listener->panelChanged(Evlocallablowthresv, + lowthresv->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == higthresv) { + if (listener) { + listener->panelChanged(Evlocallabhigthresv, + higthresv->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == decayv) { + if (listener) { + listener->panelChanged(Evlocallabdecayv, + decayv->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + if (a == strvib) { if (listener) { listener->panelChanged(Evlocallabstrvib, @@ -5147,6 +5637,7 @@ void LocallabVibrance::convertParamToNormal() lapmaskvib->setValue(defSpot.lapmaskvib); gammaskvib->setValue(defSpot.gammaskvib); slomaskvib->setValue(defSpot.slomaskvib); + decayv->setValue(defSpot.decayv); // Enable all listeners enableListener(); @@ -5168,13 +5659,17 @@ void LocallabVibrance::convertParamToSimple() angvib->setValue(defSpot.angvib); showmaskvibMethod->set_active(0); enavibMask->set_active(defSpot.enavibMask); - CCmaskvibshape->setCurve(defSpot.CCmaskvibcurve); - LLmaskvibshape->setCurve(defSpot.LLmaskvibcurve); - HHmaskvibshape->setCurve(defSpot.HHmaskvibcurve); - blendmaskvib->setValue((double)defSpot.blendmaskvib); - radmaskvib->setValue(defSpot.radmaskvib); - chromaskvib->setValue(defSpot.chromaskvib); - Lmaskvibshape->setCurve(defSpot.Lmaskvibcurve); + // CCmaskvibshape->setCurve(defSpot.CCmaskvibcurve); + // LLmaskvibshape->setCurve(defSpot.LLmaskvibcurve); + // HHmaskvibshape->setCurve(defSpot.HHmaskvibcurve); + // blendmaskvib->setValue((double)defSpot.blendmaskvib); + // radmaskvib->setValue(defSpot.radmaskvib); + // chromaskvib->setValue(defSpot.chromaskvib); + // Lmaskvibshape->setCurve(defSpot.Lmaskvibcurve); + recothresv->setValue(defSpot.recothresv); + lowthresv->setValue(defSpot.lowthresv); + higthresv->setValue(defSpot.higthresv); + decayv->setValue(defSpot.decayv); // Enable all listener enableListener(); @@ -5194,6 +5689,10 @@ void LocallabVibrance::updateGUIToMode(const modeType new_type) curveEditorGG->hide(); expgradvib->hide(); expmaskvib->hide(); + exprecovv->hide(); + decayv->hide(); + maskusablev->hide(); + maskunusablev->hide(); break; @@ -5214,6 +5713,16 @@ void LocallabVibrance::updateGUIToMode(const modeType new_type) // Specific Simple mode widgets are shown in Normal mode expgradvib->show(); expmaskvib->show(); + exprecovv->show(); + decayv->hide(); + if (enavibMask->get_active()) { + maskusablev->show(); + maskunusablev->hide(); + + } else { + maskusablev->hide(); + maskunusablev->show(); + } break; @@ -5233,6 +5742,16 @@ void LocallabVibrance::updateGUIToMode(const modeType new_type) lapmaskvib->show(); gammaskvib->show(); slomaskvib->show(); + exprecovv->show(); + decayv->show(); + if (enavibMask->get_active()) { + maskusablev->show(); + maskunusablev->hide(); + + } else { + maskusablev->hide(); + maskunusablev->show(); + } } } @@ -5315,6 +5834,15 @@ void LocallabVibrance::showmaskvibMethodChanged() void LocallabVibrance::enavibMaskChanged() { + if (enavibMask->get_active()) { + maskusablev->show(); + maskunusablev->hide(); + + } else { + maskusablev->hide(); + maskunusablev->show(); + } + if (isLocActivated && exp->getEnabled()) { if (listener) { if (enavibMask->get_active()) { @@ -5349,12 +5877,14 @@ LocallabSoft::LocallabSoft(): // Soft light specific widgets softMethod(Gtk::manage(new MyComboBoxText())), - ctboxsoftmethod(Gtk::manage(new Gtk::HBox())), + ctboxsoftmethod(Gtk::manage(new Gtk::Box())), showmasksoftMethod(Gtk::manage(new MyComboBoxText())), streng(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRENG"), 1, 100, 1, 1))), laplace(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPLACE"), 0., 100., 0.5, 25.))), sensisf(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 1, 100, 1, 30))) { + set_orientation(Gtk::ORIENTATION_VERTICAL); + // Parameter Soft light specific widgets softMethod->append(M("TP_LOCALLAB_SOFTM")); softMethod->append(M("TP_LOCALLAB_RETIM")); @@ -5366,7 +5896,7 @@ LocallabSoft::LocallabSoft(): showmasksoftMethod->append(M("TP_LOCALLAB_SHOWFOURIER")); showmasksoftMethod->append(M("TP_LOCALLAB_SHOWPOISSON")); showmasksoftMethod->append(M("TP_LOCALLAB_SHOWNORMAL")); - showmasksoftMethod->append(M("TP_LOCALLAB_SHOWMODIF")); + showmasksoftMethod->append(M("TP_LOCALLAB_SHOWMODIF2")); showmasksoftMethod->set_active(0); showmasksoftMethodConn = showmasksoftMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabSoft::showmasksoftMethodChanged)); @@ -5377,6 +5907,7 @@ LocallabSoft::LocallabSoft(): sensisf->setAdjusterListener(this); // Add Soft light specific widgets to GUI + pack_start(*sensisf); pack_start(*softMethod); Gtk::Label* const labelsoftmethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_SHOWDCT") + ":")); ctboxsoftmethod->pack_start(*labelsoftmethod, Gtk::PACK_SHRINK, 4); @@ -5384,7 +5915,6 @@ LocallabSoft::LocallabSoft(): pack_start(*ctboxsoftmethod); pack_start(*streng); pack_start(*laplace); - pack_start(*sensisf); } bool LocallabSoft::isMaskViewActive() @@ -5399,7 +5929,7 @@ void LocallabSoft::resetMaskView() showmasksoftMethodConn.block(false); } -void LocallabSoft::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) +void LocallabSoft::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) { softMask = showmasksoftMethod->get_active_row_number(); } @@ -5742,14 +6272,20 @@ LocallabBlur::LocallabBlur(): radius(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADIUS"), MINRAD, MAXRAD, 0.1, 1.5, nullptr, nullptr, &blurSlider2radius, &blurRadius2Slider))), strength(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRENGTH"), 0, 100, 1, 0))), grainFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_GRAINFRA")))), - isogr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_ISOGR"), 20, 6400, 1, 0))), + grainFrame2(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_GRAINFRA2")))), + isogr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_ISOGR"), 20, 6400, 1, 400))), strengr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRENGR"), 0, 100, 1, 0))), scalegr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SCALEGR"), 0, 100, 1, 100))), + divgr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DIVGR"), 0.2, 3., 0.1, 1.))), medMethod(Gtk::manage(new MyComboBoxText())), itera(Gtk::manage(new Adjuster(M("TP_DIRPYRDENOISE_MEDIAN_PASSES"), 1, 4, 1, 1))), guidbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GUIDBL"), 0, 1000, 1, 0))), strbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRBL"), 0, 100, 1, 50))), epsbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_EPSBL"), -10, 10, 1, 0))), + expdenoise2(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_DENOI2_EXP")))), + recothres(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKRECOTHRES"), 1., 2., 0.01, 1.))), + lowthres(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHRLOW2"), 1., 80., 0.5, 12.))), + higthres(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHR2"), 20., 99., 0.5, 85.))), sensibn(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 40))), blurMethod(Gtk::manage(new MyComboBoxText())), invbl(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVBL")))), @@ -5759,30 +6295,62 @@ LocallabBlur::LocallabBlur(): quamethod(Gtk::manage(new MyComboBoxText())), LocalcurveEditorwavden(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_WAVDEN"))), wavshapeden(static_cast(LocalcurveEditorwavden->addCurve(CT_Flat, "", nullptr, false, false))), + expdenoise1(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_DENOI1_EXP")))), + maskusable(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUSABLE")))), + maskunusable(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUNUSABLE")))), + maskusable2(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUSABLE")))), + maskunusable2(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUNUSABLE")))), + maskusable3(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUSABLE")))), + maskunusable3(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUNUSABLE")))), + usemask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_USEMASK")))), + lnoiselow(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLNOISELOW"), 0.7, 2., 0.01, 1.))), + levelthr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHR2"), 20., 99., 0.5, 85.))), + levelthrlow(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHRLOW2"), 1., 80., 0.5, 12.))), noiselumf0(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINEZERO"), MINCHRO, MAXCHRO, 0.01, 0.))), noiselumf(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINE"), MINCHRO, MAXCHRO, 0.01, 0.))), noiselumf2(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINETWO"), MINCHRO, MAXCHRO, 0.01, 0.))), - noiselumc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMCOARSE"), MINCHRO, MAXCHROCC, 0.01, 0.))), - noiselumdetail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMDETAIL"), 0., 100., 0.01, 0.))), + noiselumc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMCOARSE"), MINCHRO, MAXCHROCC, 0.01, 0.))),//unused here, but used for normalize_mean_dt + noiselumdetail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMDETAIL"), 0., 100., 0.01, 50.))), noiselequal(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELEQUAL"), -2, 10, 1, 7, Gtk::manage(new RTImage("circle-white-small.png")), Gtk::manage(new RTImage("circle-black-small.png"))))), + LocalcurveEditorwavhue(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_WAVELET_DENOISEHUE"))), + wavhue(static_cast(LocalcurveEditorwavhue->addCurve(CT_Flat, "", nullptr, false, true))), noisechrof(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHROFINE"), MINCHRO, MAXCHRO, 0.01, 0.))), noisechroc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHROCOARSE"), MINCHRO, MAXCHROCC, 0.01, 0.))), - noisechrodetail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHRODETAIL"), 0., 100., 0.01, 0.))), - detailthr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DETAILTHR"), 0, 100, 1, 0))), + noisechrodetail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHRODETAIL"), 0., 100., 0.01, 50.))), + detailFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_DETAILFRA")))), + detailthr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DETAILTHR"), 0, 100, 1, 50))), adjblur(Gtk::manage(new Adjuster(M("TP_LOCALLAB_ADJ"), -100., 100., 1., 0., Gtk::manage(new RTImage("circle-blue-yellow-small.png")), Gtk::manage(new RTImage("circle-red-green-small.png"))))), + expdenoise3(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_DENOI2_EXP")))), + recothresd(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKRECOTHRES"), 1., 2., 0.01, 1.))), + lowthresd(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHRLOW2"), 1., 80., 0.5, 12.))), + midthresd(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHRMID"), 0., 100., 0.5, 0.))), + midthresdch(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHRMIDCH"), 0., 100., 0.5, 0.))), + higthresd(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHR2"), 20., 99., 0.5, 85.))), + decayd(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKDDECAY"), 0.5, 4., 0.1, 2.))), + invmaskd(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVMASK")))), + invmask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVMASK")))), + nlFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_NLFRA")))), + nlstr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NLLUM"), 0, 100, 1, 0))), + nldet(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NLDET"), 0, 100, 1, 50))), + nlpat(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NLPAT"), 1, 5, 1, 2))), + nlrad(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NLRAD"), 3, 10, 1, 5))), + nlgam(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NLGAM"), 2., 5., 0.1, 3.))), bilateral(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BILATERAL"), 0, 100, 1, 0))), sensiden(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 60))), + neutral(Gtk::manage (new Gtk::Button (M ("TP_RETINEX_NEUTRAL")))), expmaskbl(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_SHOWPLUS")))), showmaskblMethod(Gtk::manage(new MyComboBoxText())), showmaskblMethodtyp(Gtk::manage(new MyComboBoxText())), enablMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), - maskblCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), - CCmaskblshape(static_cast(maskblCurveEditorG->addCurve(CT_Flat, "C(C)", nullptr, false, false))), - LLmaskblshape(static_cast(maskblCurveEditorG->addCurve(CT_Flat, "L(L)", nullptr, false, false))), - HHmaskblshape(static_cast(maskblCurveEditorG->addCurve(CT_Flat, "LC(H)", nullptr, false, true))), +// maskblCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), + maskblCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, "", 1)), + CCmaskblshape(static_cast(maskblCurveEditorG->addCurve(CT_Flat, "C", nullptr, false, false))), + LLmaskblshape(static_cast(maskblCurveEditorG->addCurve(CT_Flat, "L", nullptr, false, false))), + HHmaskblshape(static_cast(maskblCurveEditorG->addCurve(CT_Flat, "LC(h)", nullptr, false, true))), strumaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRUMASKCOL"), 0., 200., 0.1, 0.))), toolbl(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_TOOLCOL")))), toolblFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_TOOLMASK")))), + toolblFrame2(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_TOOLMASK_2")))), blendmaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), radmaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), lapmaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), @@ -5795,13 +6363,23 @@ LocallabBlur::LocallabBlur(): Lmaskblshape(static_cast(mask2blCurveEditorG->addCurve(CT_Diagonal, "L(L)"))), mask2blCurveEditorGwav(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_WAVMASK"))), LLmaskblshapewav(static_cast(mask2blCurveEditorGwav->addCurve(CT_Flat, "L(L)", nullptr, false, false))), - quaHBox(Gtk::manage(new Gtk::HBox())), + quaHBox(Gtk::manage(new Gtk::Box())), csThresholdblur(Gtk::manage(new ThresholdAdjuster(M("TP_LOCALLAB_CSTHRESHOLDBLUR"), 0, 9, 0, 0, 6, 5, 0, false))) { + set_orientation(Gtk::ORIENTATION_VERTICAL); + const LocallabParams::LocallabSpot defSpot; // Parameter Blur, Noise & Denoise specific widgets setExpandAlignProperties(expblnoise, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + float R, G, B; + std::vector six_shape; + + for (int i = 0; i < 6; i++) { + const float x = static_cast(i) * (1.f / 6.f); + Color::hsv2rgb01(x, 0.5f, 0.5f, R, G, B); + six_shape.emplace_back(x, R, G, B); + } blMethod->append(M("TP_LOCALLAB_BLUR")); blMethod->append(M("TP_LOCALLAB_BLMED")); @@ -5810,19 +6388,24 @@ LocallabBlur::LocallabBlur(): blMethodConn = blMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabBlur::blMethodChanged)); fftwblConn = fftwbl->signal_toggled().connect(sigc::mem_fun(*this, &LocallabBlur::fftwblChanged)); + usemaskConn = usemask->signal_toggled().connect(sigc::mem_fun(*this, &LocallabBlur::usemaskChanged)); invblConn = invbl->signal_toggled().connect(sigc::mem_fun(*this, &LocallabBlur::invblChanged)); + invmaskdConn = invmaskd->signal_toggled().connect(sigc::mem_fun(*this, &LocallabBlur::invmaskdChanged)); + invmaskConn = invmask->signal_toggled().connect(sigc::mem_fun(*this, &LocallabBlur::invmaskChanged)); radius->setAdjusterListener(this); strength->setAdjusterListener(this); grainFrame->set_label_align(0.025, 0.5); + grainFrame2->set_label_align(0.025, 0.5); isogr->setAdjusterListener(this); strengr->setAdjusterListener(this); scalegr->setAdjusterListener(this); + divgr->setAdjusterListener(this); medMethod->append(M("TP_LOCALLAB_MEDNONE")); medMethod->append(M("TP_DIRPYRDENOISE_TYPE_3X3")); @@ -5840,6 +6423,10 @@ LocallabBlur::LocallabBlur(): strbl->setAdjusterListener(this); epsbl->setAdjusterListener(this); + setExpandAlignProperties(expdenoise2, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + recothres->setAdjusterListener(this); + lowthres->setAdjusterListener(this); + higthres->setAdjusterListener(this); sensibn->setAdjusterListener(this); @@ -5859,8 +6446,10 @@ LocallabBlur::LocallabBlur(): setExpandAlignProperties(expdenoise, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); - quamethod->append(M("TP_WAVELET_QUACONSER")); - quamethod->append(M("TP_WAVELET_QUAAGRES")); + quamethod->append(M("TP_LOCALLAB_QUANONEALL")); + quamethod->append(M("TP_LOCALLAB_QUACONSER")); + quamethod->append(M("TP_LOCALLAB_QUAAGRES")); + quamethod->append(M("TP_LOCALLAB_QUANONEWAV")); quamethodconn = quamethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabBlur::quamethodChanged)); Gtk::Label* const quaLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_DENQUA") + ":")); quaHBox->pack_start(*quaLabel, Gtk::PACK_SHRINK, 4); @@ -5872,6 +6461,12 @@ LocallabBlur::LocallabBlur(): wavshapeden->setResetCurve(FlatCurveType(defSpot.locwavcurveden.at(0)), defSpot.locwavcurveden); LocalcurveEditorwavden->curveListComplete(); + setExpandAlignProperties(expdenoise1, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + + levelthr->setAdjusterListener(this); + lnoiselow->setAdjusterListener(this); + + levelthrlow->setAdjusterListener(this); noiselumf0->setAdjusterListener(this); @@ -5885,6 +6480,19 @@ LocallabBlur::LocallabBlur(): noiselequal->setAdjusterListener(this); + LocalcurveEditorwavhue->setCurveListener(this); + + wavhue->setIdentityValue(0.); + wavhue->setResetCurve(FlatCurveType(defSpot.locwavcurvehue.at(0)), defSpot.locwavcurvehue); + wavhue->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); + wavhue->setCurveColorProvider(this, 3); + wavhue->setBottomBarBgGradient(six_shape); + +// wavguid->setIdentityValue(0.); +// wavguid->setResetCurve(FlatCurveType(defSpot.locwavcurveguid.at(0)), defSpot.locwavcurveguid); + + LocalcurveEditorwavhue->curveListComplete(); + noisechrof->setAdjusterListener(this); noisechroc->set_tooltip_text(M("TP_LOCALLAB_NOISECHROC_TOOLTIP")); @@ -5892,14 +6500,38 @@ LocallabBlur::LocallabBlur(): noisechrodetail->setAdjusterListener(this); + detailFrame->set_label_align(0.025, 0.5); detailthr->setAdjusterListener(this); adjblur->setAdjusterListener(this); + setExpandAlignProperties(expdenoise3, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + recothresd->setAdjusterListener(this); + lowthresd->setAdjusterListener(this); + midthresd->setAdjusterListener(this); + midthresdch->setAdjusterListener(this); + higthresd->setAdjusterListener(this); + decayd->setAdjusterListener(this); bilateral->setAdjusterListener(this); + nlFrame->set_label_align(0.025, 0.5); + + nlstr->setAdjusterListener(this); + nldet->setAdjusterListener(this); + nlpat->setAdjusterListener(this); + nlrad->setAdjusterListener(this); + nlgam->setAdjusterListener(this); sensiden->setAdjusterListener(this); + + setExpandAlignProperties (neutral, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + RTImage *resetImg = Gtk::manage (new RTImage ("undo-small.png", "redo-small.png")); + setExpandAlignProperties (resetImg, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + neutral->set_image (*resetImg); + neutral->set_tooltip_text (M ("TP_RETINEX_NEUTRAL_TIP")); + neutralconn = neutral->signal_pressed().connect ( sigc::mem_fun (*this, &LocallabBlur::neutral_pressed) ); + neutral->show(); + setExpandAlignProperties(expmaskbl, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); showmaskblMethod->append(M("TP_LOCALLAB_SHOWMNONE")); @@ -5913,7 +6545,7 @@ LocallabBlur::LocallabBlur(): showmaskblMethodtyp->append(M("TP_LOCALLAB_SHOWMASKTYP1")); showmaskblMethodtyp->append(M("TP_LOCALLAB_SHOWMASKTYP2")); showmaskblMethodtyp->append(M("TP_LOCALLAB_SHOWMASKTYP3")); - showmaskblMethodtyp->set_active(0); + showmaskblMethodtyp->set_active(1); showmaskblMethodtypConn = showmaskblMethodtyp->signal_changed().connect(sigc::mem_fun(*this, &LocallabBlur::showmaskblMethodtypChanged)); enablMaskConn = enablMask->signal_toggled().connect(sigc::mem_fun(*this, &LocallabBlur::enablMaskChanged)); @@ -5974,14 +6606,21 @@ LocallabBlur::LocallabBlur(): // Add Blur, Noise & Denoise specific widgets to GUI ToolParamBlock* const blnoisebox = Gtk::manage(new ToolParamBlock()); + blnoisebox->pack_start(*sensibn); blnoisebox->pack_start(*blMethod); blnoisebox->pack_start(*fftwbl, Gtk::PACK_SHRINK, 0); blnoisebox->pack_start(*radius); blnoisebox->pack_start(*strength); + + ToolParamBlock* const grain2Box = Gtk::manage(new ToolParamBlock()); + grain2Box->pack_start(*isogr); + grain2Box->pack_start(*divgr); + grainFrame2->add(*grain2Box); + ToolParamBlock* const grainBox = Gtk::manage(new ToolParamBlock()); - grainBox->pack_start(*isogr); + grainBox->pack_start(*grainFrame2); grainBox->pack_start(*strengr); -// grainBox->pack_start(*scalegr); + grainBox->pack_start(*scalegr); grainFrame->add(*grainBox); blnoisebox->pack_start(*grainFrame); blnoisebox->pack_start(*medMethod); @@ -5989,7 +6628,16 @@ LocallabBlur::LocallabBlur(): blnoisebox->pack_start(*guidbl); blnoisebox->pack_start(*strbl); blnoisebox->pack_start(*epsbl); - blnoisebox->pack_start(*sensibn); + ToolParamBlock* const wavBox2 = Gtk::manage(new ToolParamBlock()); + wavBox2->pack_start(*maskusable2, Gtk::PACK_SHRINK, 0); + wavBox2->pack_start(*maskunusable2, Gtk::PACK_SHRINK, 0); + wavBox2->pack_start(*recothres); + wavBox2->pack_start(*lowthres); + wavBox2->pack_start(*higthres); + wavBox2->pack_start(*invmask); + expdenoise2->add(*wavBox2, false); + blnoisebox->pack_start(*expdenoise2); +// blnoisebox->pack_start(*sensibn); // blnoisebox->pack_start(*blurMethod); blnoisebox->pack_start(*invbl); blnoisebox->pack_start(*chroMethod); @@ -6004,18 +6652,56 @@ LocallabBlur::LocallabBlur(): // wavBox->pack_start(*noiselumf0); // wavBox->pack_start(*noiselumf); // wavBox->pack_start(*noiselumf2); - // wavBox->pack_start(*noiselumc); + // wavBox->pack_start(*noiselumc);//unused here, but used for normalize_mean_dt wavBox->pack_start(*noiselumdetail); wavBox->pack_start(*noiselequal); + wavBox->pack_start(*LocalcurveEditorwavhue, Gtk::PACK_SHRINK, 4); + ToolParamBlock* const wavBox1 = Gtk::manage(new ToolParamBlock()); + wavBox1->pack_start(*maskusable, Gtk::PACK_SHRINK, 0); + wavBox1->pack_start(*maskunusable, Gtk::PACK_SHRINK, 0); + wavBox1->pack_start(*lnoiselow, Gtk::PACK_SHRINK, 0); + wavBox1->pack_start(*levelthrlow, Gtk::PACK_SHRINK, 0); + wavBox1->pack_start(*levelthr, Gtk::PACK_SHRINK, 0); + expdenoise1->add(*wavBox1, false); + wavBox->pack_start(*expdenoise1); + ToolParamBlock* const detailBox = Gtk::manage(new ToolParamBlock()); + detailBox->pack_start(*detailthr); + detailBox->pack_start(*usemask, Gtk::PACK_SHRINK, 0); + detailFrame->add(*detailBox); + wavBox->pack_start(*detailFrame); + denoisebox->pack_start(*sensiden); + + ToolParamBlock* const nlbox = Gtk::manage(new ToolParamBlock()); + nlbox->pack_start(*nlstr); + nlbox->pack_start(*nldet); + nlbox->pack_start(*nlgam); + nlbox->pack_start(*nlpat); + nlbox->pack_start(*nlrad); + nlFrame->add(*nlbox); + wavBox->pack_start(*nlFrame); + wavBox->pack_start(*noisechrof); wavBox->pack_start(*noisechroc); wavBox->pack_start(*noisechrodetail); - wavBox->pack_start(*detailthr); wavBox->pack_start(*adjblur); wavFrame->add(*wavBox); denoisebox->pack_start(*wavFrame); + + ToolParamBlock* const wavBox3 = Gtk::manage(new ToolParamBlock()); + wavBox3->pack_start(*maskusable3, Gtk::PACK_SHRINK, 0); + wavBox3->pack_start(*maskunusable3, Gtk::PACK_SHRINK, 0); + wavBox3->pack_start(*recothresd); + wavBox3->pack_start(*lowthresd); + wavBox3->pack_start(*midthresd); + wavBox3->pack_start(*midthresdch); + wavBox3->pack_start(*higthresd); + wavBox3->pack_start(*decayd); + wavBox3->pack_start(*invmaskd); + expdenoise3->add(*wavBox3, false); + denoisebox->pack_start(*expdenoise3); denoisebox->pack_start(*bilateral); - denoisebox->pack_start(*sensiden); + denoisebox->pack_start(*neutral); + expdenoise->add(*denoisebox, false); pack_start(*expdenoise); ToolParamBlock* const maskblBox = Gtk::manage(new ToolParamBlock()); @@ -6025,10 +6711,11 @@ LocallabBlur::LocallabBlur(): maskblBox->pack_start(*maskblCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor maskblBox->pack_start(*strumaskbl, Gtk::PACK_SHRINK, 0); maskblBox->pack_start(*toolbl, Gtk::PACK_SHRINK, 0); - Gtk::HSeparator* const separatorstrubl = Gtk::manage(new Gtk::HSeparator()); + Gtk::Separator* const separatorstrubl = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); maskblBox->pack_start(*separatorstrubl, Gtk::PACK_SHRINK, 2); maskblBox->pack_start(*blendmaskbl, Gtk::PACK_SHRINK, 0); toolblFrame->set_label_align(0.025, 0.5); + toolblFrame2->set_label_align(0.025, 0.5); ToolParamBlock* const toolblBox = Gtk::manage(new ToolParamBlock()); toolblBox->pack_start(*radmaskbl, Gtk::PACK_SHRINK, 0); toolblBox->pack_start(*lapmaskbl, Gtk::PACK_SHRINK, 0); @@ -6038,8 +6725,11 @@ LocallabBlur::LocallabBlur(): toolblBox->pack_start(*shadmaskblsha, Gtk::PACK_SHRINK, 0); toolblBox->pack_start(*shadmaskbl, Gtk::PACK_SHRINK, 0); toolblBox->pack_start(*mask2blCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor - toolblBox->pack_start(*mask2blCurveEditorGwav, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor - toolblBox->pack_start(*csThresholdblur, Gtk::PACK_SHRINK, 0); + ToolParamBlock* const toolblBox2 = Gtk::manage(new ToolParamBlock()); + toolblBox2->pack_start(*mask2blCurveEditorGwav, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor + toolblBox2->pack_start(*csThresholdblur, Gtk::PACK_SHRINK, 0); + toolblFrame2->add(*toolblBox2); + toolblBox->pack_start(*toolblFrame2); toolblFrame->add(*toolblBox); maskblBox->pack_start(*toolblFrame); expmaskbl->add(*maskblBox, false); @@ -6049,6 +6739,7 @@ LocallabBlur::LocallabBlur(): LocallabBlur::~LocallabBlur() { delete LocalcurveEditorwavden; + delete LocalcurveEditorwavhue; delete maskblCurveEditorG; delete mask2blCurveEditorG; delete mask2blCurveEditorGwav; @@ -6066,7 +6757,7 @@ void LocallabBlur::resetMaskView() showmaskblMethodConn.block(false); } -void LocallabBlur::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) +void LocallabBlur::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) { blMask = showmaskblMethod->get_active_row_number(); } @@ -6090,6 +6781,12 @@ void LocallabBlur::updateAdviceTooltips(const bool showTooltips) expdenoise->set_tooltip_markup(M("TP_LOCALLAB_DENOI_TOOLTIP")); quamethod->set_tooltip_markup(M("TP_LOCALLAB_DENOIQUA_TOOLTIP")); wavshapeden->setTooltip(M("TP_LOCALLAB_WASDEN_TOOLTIP")); + wavhue->setTooltip(M("TP_LOCALLAB_WAVHUE_TOOLTIP")); + expdenoise1->set_tooltip_markup(M("TP_LOCALLAB_MASKLC_TOOLTIP")); + expdenoise2->set_tooltip_markup(M("TP_LOCALLAB_MASKGF_TOOLTIP")); + expdenoise3->set_tooltip_markup(M("TP_LOCALLAB_MASKDE_TOOLTIP")); + invmask->set_tooltip_text(M("TP_LOCALLAB_MASKDEINV_TOOLTIP")); + invmaskd->set_tooltip_text(M("TP_LOCALLAB_MASKDEINV_TOOLTIP")); LocalcurveEditorwavden->setTooltip(M("TP_LOCALLAB_WASDEN_TOOLTIP")); noiselequal->set_tooltip_text(M("TP_LOCALLAB_DENOIEQUAL_TOOLTIP")); noiselumdetail->set_tooltip_text(M("TP_LOCALLAB_DENOILUMDETAIL_TOOLTIP")); @@ -6099,6 +6796,12 @@ void LocallabBlur::updateAdviceTooltips(const bool showTooltips) detailthr->set_tooltip_text(M("TP_LOCALLAB_DENOITHR_TOOLTIP")); adjblur->set_tooltip_text(M("TP_LOCALLAB_DENOIEQUALCHRO_TOOLTIP")); bilateral->set_tooltip_text(M("TP_LOCALLAB_DENOIBILAT_TOOLTIP")); + nlFrame->set_tooltip_text(M("TP_LOCALLAB_NLFRAME_TOOLTIP")); + nlstr->set_tooltip_text(M("TP_LOCALLAB_NLDENOISE_TOOLTIP")); + nldet->set_tooltip_text(M("TP_LOCALLAB_NLDENOISE_TOOLTIP")); + nlpat->set_tooltip_text(M("TP_LOCALLAB_NLDENOISENLPAT_TOOLTIP")); + nlrad->set_tooltip_text(M("TP_LOCALLAB_NLDENOISENLRAD_TOOLTIP")); + nlgam->set_tooltip_text(M("TP_LOCALLAB_NLDENOISENLGAM_TOOLTIP")); noiselumc->set_tooltip_text(M("TP_LOCALLAB_NOISECHROC_TOOLTIP")); expmaskbl->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); showmaskblMethodtyp->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKTYP_TOOLTIP")); @@ -6122,7 +6825,12 @@ void LocallabBlur::updateAdviceTooltips(const bool showTooltips) lapmaskbl->set_tooltip_text(M("TP_LOCALLAB_LAPRAD1_TOOLTIP")); csThresholdblur->set_tooltip_text(M("TP_LOCALLAB_WAVEMASK_LEVEL_TOOLTIP")); sensiden->set_tooltip_text(M("TP_LOCALLAB_SENSI_TOOLTIP")); - + lowthres->set_tooltip_text(M("TP_LOCALLAB_MASKLOWTHRES_TOOLTIP")); + lowthresd->set_tooltip_text(M("TP_LOCALLAB_MASKLOWTHRESD_TOOLTIP")); +// midthresd->set_tooltip_text(M("TP_LOCALLAB_MASKMIDTHRESD_TOOLTIP")); + higthresd->set_tooltip_text(M("TP_LOCALLAB_MASKHIGTHRESD_TOOLTIP")); + higthres->set_tooltip_text(M("TP_LOCALLAB_MASKHIGTHRES_TOOLTIP")); + decayd->set_tooltip_text(M("TP_LOCALLAB_MASKDECAY_TOOLTIP")); } else { expblnoise->set_tooltip_markup(""); @@ -6138,6 +6846,12 @@ void LocallabBlur::updateAdviceTooltips(const bool showTooltips) epsbl->set_tooltip_text(""); blurMethod->set_tooltip_markup(""); quamethod->set_tooltip_markup(""); + wavhue->setTooltip(""); + expdenoise1->set_tooltip_markup(""); + expdenoise2->set_tooltip_markup(""); + expdenoise3->set_tooltip_markup(""); + invmask->set_tooltip_text(""); + invmaskd->set_tooltip_text(""); LocalcurveEditorwavden->setTooltip(""); noiselequal->set_tooltip_text(""); noiselumdetail->set_tooltip_text(""); @@ -6147,6 +6861,12 @@ void LocallabBlur::updateAdviceTooltips(const bool showTooltips) detailthr->set_tooltip_text(""); adjblur->set_tooltip_text(""); bilateral->set_tooltip_text(""); + nlFrame->set_tooltip_text(""); + nlstr->set_tooltip_text(""); + nldet->set_tooltip_text(""); + nlpat->set_tooltip_text(""); + nlrad->set_tooltip_text(""); + nlgam->set_tooltip_text(""); sensibn->set_tooltip_text(""); blurMethod->set_tooltip_markup(""); expdenoise->set_tooltip_markup(""); @@ -6173,14 +6893,63 @@ void LocallabBlur::updateAdviceTooltips(const bool showTooltips) shadmaskblsha->set_tooltip_text(""); csThresholdblur->set_tooltip_text(""); sensiden->set_tooltip_text(""); + lowthres->set_tooltip_text(""); + lowthresd->set_tooltip_text(""); + higthresd->set_tooltip_text(""); + higthres->set_tooltip_text(""); +// midthresd->set_tooltip_text(""); + decayd->set_tooltip_text(""); } } +void LocallabBlur::neutral_pressed () +{ + const LocallabParams::LocallabSpot defSpot; + lnoiselow->setValue(defSpot.lnoiselow); + levelthr->setValue(defSpot.levelthr); + levelthrlow->setValue(defSpot.levelthrlow); + noiselumf0->setValue(defSpot.noiselumf0); + noiselumdetail->setValue(defSpot.noiselumdetail); + noiselequal->setValue(defSpot.noiselequal); + noisechrof->setValue(defSpot.noisechrof); + noisechroc->setValue(defSpot.noisechroc); + noisechrodetail->setValue(defSpot.noisechrodetail); + detailthr->setValue(defSpot.detailthr);; + adjblur->setValue(defSpot.adjblur); + bilateral->setValue(defSpot.bilateral); + nlstr->setValue(defSpot.nlstr); + nldet->setValue(defSpot.nldet); + nlpat->setValue(defSpot.nlpat); + nlrad->setValue(defSpot.nlrad); + nlgam->setValue(defSpot.nlgam); + sensiden->setValue(defSpot.sensiden); + quamethod->set_active (0); + wavshapeden->setCurve(defSpot.locwavcurveden); + wavhue->setCurve(defSpot.locwavcurvehue); + usemask->set_active(defSpot.usemask); + invmaskd->set_active(defSpot.invmaskd); + invmask->set_active(defSpot.invmask); + recothresd->setValue(defSpot.recothresd); + lowthresd->setValue(defSpot.lowthresd); + midthresd->setValue(defSpot.midthresd); + midthresdch->setValue(defSpot.midthresdch); + higthresd->setValue(defSpot.higthresd); + decayd->setValue(defSpot.decayd); + recothres->setValue(defSpot.recothres); + lowthres->setValue(defSpot.lowthres); + higthres->setValue(defSpot.higthres); + + +} + void LocallabBlur::setDefaultExpanderVisibility() { expblnoise->set_expanded(false); expdenoise->set_expanded(false); + expdenoise1->set_expanded(false); + expdenoise2->set_expanded(false); + expdenoise3->set_expanded(false); expmaskbl->set_expanded(false); } @@ -6190,6 +6959,9 @@ void LocallabBlur::disableListener() blMethodConn.block(true); fftwblConn.block(true); + usemaskConn.block(true); + invmaskdConn.block(true); + invmaskConn.block(true); invblConn.block(true); medMethodConn.block(true); blurMethodConn.block(true); @@ -6208,6 +6980,9 @@ void LocallabBlur::enableListener() blMethodConn.block(false); fftwblConn.block(false); + usemaskConn.block(false); + invmaskdConn.block(false); + invmaskConn.block(false); invblConn.block(false); medMethodConn.block(false); blurMethodConn.block(false); @@ -6246,12 +7021,16 @@ void LocallabBlur::read(const rtengine::procparams::ProcParams* pp, const Params } fftwbl->set_active(spot.fftwbl); + usemask->set_active(spot.usemask); + invmaskd->set_active(spot.invmaskd); + invmask->set_active(spot.invmask); invbl->set_active(spot.invbl); radius->setValue(spot.radius); strength->setValue(spot.strength); isogr->setValue((double)spot.isogr); strengr->setValue((double)spot.strengr); scalegr->setValue((double)spot.scalegr); + divgr->setValue((double)spot.divgr); if (spot.medMethod == "none") { medMethod->set_active(0); @@ -6268,8 +7047,17 @@ void LocallabBlur::read(const rtengine::procparams::ProcParams* pp, const Params itera->setValue((double)spot.itera); guidbl->setValue((double)spot.guidbl); strbl->setValue((double)spot.strbl); + recothres->setValue((double)spot.recothres); + lowthres->setValue((double)spot.lowthres); + higthres->setValue((double)spot.higthres); epsbl->setValue((double)spot.epsbl); sensibn->setValue((double)spot.sensibn); + recothresd->setValue((double)spot.recothresd); + lowthresd->setValue((double)spot.lowthresd); + midthresd->setValue((double)spot.midthresd); + midthresdch->setValue((double)spot.midthresdch); + higthresd->setValue((double)spot.higthresd); + decayd->setValue((double)spot.decayd); if (spot.blurMethod == "norm") { blurMethod->set_active(0); @@ -6285,19 +7073,27 @@ void LocallabBlur::read(const rtengine::procparams::ProcParams* pp, const Params chroMethod->set_active(2); } - if (spot.quamethod == "cons") { + if (spot.quamethod == "none") { quamethod->set_active(0); - } else if (spot.quamethod == "agre") { + } else if (spot.quamethod == "cons") { quamethod->set_active(1); + } else if (spot.quamethod == "agre") { + quamethod->set_active(2); + } else if (spot.quamethod == "nlmean") { + quamethod->set_active(3); } activlum->set_active(spot.activlum); wavshapeden->setCurve(spot.locwavcurveden); + wavhue->setCurve(spot.locwavcurvehue); noiselumf0->setValue(spot.noiselumf0); noiselumf->setValue(spot.noiselumf); noiselumf2->setValue(spot.noiselumf2); noiselumc->setValue(spot.noiselumc); noiselumdetail->setValue(spot.noiselumdetail); + levelthr->setValue(spot.levelthr); + lnoiselow->setValue(spot.lnoiselow); + levelthrlow->setValue(spot.levelthrlow); noiselequal->setValue((double)spot.noiselequal); noisechrof->setValue(spot.noisechrof); noisechroc->setValue(spot.noisechroc); @@ -6305,8 +7101,13 @@ void LocallabBlur::read(const rtengine::procparams::ProcParams* pp, const Params detailthr->setValue((double)spot.detailthr); adjblur->setValue((double)spot.adjblur); bilateral->setValue((double)spot.bilateral); + nlstr->setValue((double)spot.nlstr); + nldet->setValue((double)spot.nldet); + nlpat->setValue((double)spot.nlpat); + nlrad->setValue((double)spot.nlrad); + nlgam->setValue((double)spot.nlgam); sensiden->setValue((double)spot.sensiden); - + if (spot.showmaskblMethodtyp == "blur") { showmaskblMethodtyp ->set_active(0); } else if (spot.showmaskblMethodtyp == "nois") { @@ -6366,12 +7167,16 @@ void LocallabBlur::write(rtengine::procparams::ProcParams* pp, ParamsEdited* ped } spot.fftwbl = fftwbl->get_active(); + spot.usemask = usemask->get_active(); + spot.invmaskd = invmaskd->get_active(); + spot.invmask = invmask->get_active(); spot.invbl = invbl->get_active(); spot.radius = radius->getValue(); spot.strength = strength->getIntValue(); spot.isogr = isogr->getIntValue(); spot.strengr = strengr->getIntValue(); spot.scalegr = scalegr->getIntValue(); + spot.divgr = divgr->getValue(); if (medMethod->get_active_row_number() == 0) { spot.medMethod = "none"; @@ -6388,8 +7193,17 @@ void LocallabBlur::write(rtengine::procparams::ProcParams* pp, ParamsEdited* ped spot.itera = itera->getIntValue(); spot.guidbl = guidbl->getIntValue(); spot.strbl = strbl->getIntValue(); + spot.recothres = recothres->getValue(); + spot.lowthres = lowthres->getValue(); + spot.higthres = higthres->getValue(); spot.epsbl = epsbl->getIntValue(); spot.sensibn = sensibn->getIntValue(); + spot.recothresd = recothresd->getValue(); + spot.lowthresd = lowthresd->getValue(); + spot.midthresd = midthresd->getValue(); + spot.midthresdch = midthresdch->getValue(); + spot.higthresd = higthresd->getValue(); + spot.decayd = decayd->getValue(); if (blurMethod->get_active_row_number() == 0) { spot.blurMethod = "norm"; @@ -6406,18 +7220,26 @@ void LocallabBlur::write(rtengine::procparams::ProcParams* pp, ParamsEdited* ped } if (quamethod->get_active_row_number() == 0) { - spot.quamethod = "cons"; + spot.quamethod = "none"; } else if (quamethod->get_active_row_number() == 1) { + spot.quamethod = "cons"; + } else if (quamethod->get_active_row_number() == 2) { spot.quamethod = "agre"; + } else if (quamethod->get_active_row_number() == 3) { + spot.quamethod = "nlmean"; } spot.activlum = activlum->get_active(); spot.locwavcurveden = wavshapeden->getCurve(); + spot.locwavcurvehue = wavhue->getCurve(); spot.noiselumf0 = noiselumf0->getValue(); spot.noiselumf = noiselumf->getValue(); spot.noiselumf2 = noiselumf2->getValue(); spot.noiselumc = noiselumc->getValue(); spot.noiselumdetail = noiselumdetail->getValue(); + spot.levelthr = levelthr->getValue(); + spot.lnoiselow = lnoiselow->getValue(); + spot.levelthrlow = levelthrlow->getValue(); spot.noiselequal = noiselequal->getIntValue(); spot.noisechrof = noisechrof->getValue(); spot.noisechroc = noisechroc->getValue(); @@ -6426,6 +7248,11 @@ void LocallabBlur::write(rtengine::procparams::ProcParams* pp, ParamsEdited* ped spot.adjblur = adjblur->getIntValue(); spot.bilateral = bilateral->getIntValue(); spot.sensiden = sensiden->getIntValue(); + spot.nlstr = nlstr->getIntValue(); + spot.nldet = nldet->getIntValue(); + spot.nlpat = nlpat->getIntValue(); + spot.nlrad = nlrad->getIntValue(); + spot.nlgam = nlgam->getValue(); if (showmaskblMethodtyp->get_active_row_number() == 0) { spot.showmaskblMethodtyp = "blur"; @@ -6452,6 +7279,7 @@ void LocallabBlur::write(rtengine::procparams::ProcParams* pp, ParamsEdited* ped spot.Lmaskblcurve = Lmaskblshape->getCurve(); spot.LLmaskblcurvewav = LLmaskblshapewav->getCurve(); spot.csthresholdblur = csThresholdblur->getValue(); + } // Note: No need to manage pedited as batch mode is deactivated for Locallab @@ -6470,16 +7298,29 @@ void LocallabBlur::setDefaults(const rtengine::procparams::ProcParams* defParams isogr->setDefault((double)defSpot.isogr); strengr->setDefault((double)defSpot.strengr); scalegr->setDefault((double)defSpot.scalegr); + divgr->setDefault((double)defSpot.divgr); itera->setDefault((double)defSpot.itera); guidbl->setDefault((double)defSpot.guidbl); strbl->setDefault((double)defSpot.strbl); + recothres->setDefault((double)defSpot.recothres); + lowthres->setDefault((double)defSpot.lowthres); + higthres->setDefault((double)defSpot.higthres); epsbl->setDefault((double)defSpot.epsbl); sensibn->setDefault((double)defSpot.sensibn); + recothresd->setDefault((double)defSpot.recothresd); + lowthresd->setDefault((double)defSpot.lowthresd); + midthresd->setDefault((double)defSpot.midthresd); + midthresdch->setDefault((double)defSpot.midthresdch); + higthresd->setDefault((double)defSpot.higthresd); + decayd->setDefault((double)defSpot.decayd); noiselumf0->setDefault(defSpot.noiselumf0); noiselumf->setDefault(defSpot.noiselumf); noiselumf2->setDefault(defSpot.noiselumf2); noiselumc->setDefault(defSpot.noiselumc); noiselumdetail->setDefault(defSpot.noiselumdetail); + levelthr->setDefault(defSpot.levelthr); + lnoiselow->setDefault(defSpot.lnoiselow); + levelthrlow->setDefault(defSpot.levelthrlow); noiselequal->setDefault((double)defSpot.noiselequal); noisechrof->setDefault(defSpot.noisechrof); noisechroc->setDefault(defSpot.noisechroc); @@ -6487,6 +7328,11 @@ void LocallabBlur::setDefaults(const rtengine::procparams::ProcParams* defParams detailthr->setDefault((double)defSpot.detailthr); adjblur->setDefault((double)defSpot.adjblur); bilateral->setDefault((double)defSpot.bilateral); + nlstr->setDefault((double)defSpot.nlstr); + nldet->setDefault((double)defSpot.nldet); + nlpat->setDefault((double)defSpot.nlpat); + nlrad->setDefault((double)defSpot.nlrad); + nlgam->setDefault(defSpot.nlgam); sensiden->setDefault((double)defSpot.sensiden); strumaskbl->setDefault(defSpot.strumaskbl); blendmaskbl->setDefault((double)defSpot.blendmaskbl); @@ -6541,6 +7387,13 @@ void LocallabBlur::adjusterChanged(Adjuster* a, double newval) } } + if (a == divgr) { + if (listener) { + listener->panelChanged(Evlocallabdivgr, + divgr->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + if (a == itera) { if (listener) { listener->panelChanged(Evlocallabitera, @@ -6562,6 +7415,81 @@ void LocallabBlur::adjusterChanged(Adjuster* a, double newval) } } + if (a == recothres) { + if(recothres->getValue()!= 1.) { + if (showmaskblMethodtyp->get_active_row_number() == 1) { + showmaskblMethodtyp->set_active(2); + } + } + + if (listener) { + listener->panelChanged(Evlocallabrecothres, + recothres->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == lowthres) { + if (listener) { + listener->panelChanged(Evlocallablowthres, + lowthres->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == higthres) { + if (listener) { + listener->panelChanged(Evlocallabhigthres, + higthres->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == recothresd) { + if(recothresd->getValue()!= 1.) { + if (showmaskblMethodtyp->get_active_row_number() == 0) { + showmaskblMethodtyp->set_active(2); + } + } + + if (listener) { + listener->panelChanged(Evlocallabrecothresd, + recothresd->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == lowthresd) { + if (listener) { + listener->panelChanged(Evlocallablowthresd, + lowthresd->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == midthresd) { + if (listener) { + listener->panelChanged(Evlocallabmidthresd, + midthresd->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == midthresdch) { + if (listener) { + listener->panelChanged(Evlocallabmidthresdch, + midthresdch->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == higthresd) { + if (listener) { + listener->panelChanged(Evlocallabhigthresd, + higthresd->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == decayd) { + if (listener) { + listener->panelChanged(Evlocallabdecayd, + decayd->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + if (a == epsbl) { if (listener) { listener->panelChanged(Evlocallabepsbl, @@ -6618,6 +7546,32 @@ void LocallabBlur::adjusterChanged(Adjuster* a, double newval) } } + if (a == levelthr) { + if (listener) { + listener->panelChanged(Evlocallablevelthr, + levelthr->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == lnoiselow) { + if(lnoiselow->getValue()!= 1.) { + if (showmaskblMethodtyp->get_active_row_number() == 0) { + showmaskblMethodtyp->set_active(2); + } + } + if (listener) { + listener->panelChanged(Evlocallablnoiselow, + lnoiselow->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == levelthrlow) { + if (listener) { + listener->panelChanged(Evlocallablevelthrlow, + levelthrlow->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + if (a == noisechrof) { if (listener) { listener->panelChanged(Evlocallabnoisechrof, @@ -6660,6 +7614,41 @@ void LocallabBlur::adjusterChanged(Adjuster* a, double newval) } } + if (a == nlstr) { + if (listener) { + listener->panelChanged(Evlocallabnlstr, + nlstr->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == nldet) { + if (listener) { + listener->panelChanged(Evlocallabnldet, + nldet->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == nlpat) { + if (listener) { + listener->panelChanged(Evlocallabnlpat, + nlpat->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == nlrad) { + if (listener) { + listener->panelChanged(Evlocallabnlrad, + nlrad->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == nlgam) { + if (listener) { + listener->panelChanged(Evlocallabnlgam, + nlgam->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + if (a == sensiden) { if (listener) { listener->panelChanged(Evlocallabsensiden, @@ -6733,6 +7722,8 @@ void LocallabBlur::adjusterChanged(Adjuster* a, double newval) } } + + void LocallabBlur::adjusterChanged2(ThresholdAdjuster* a, int newBottomL, int newTopL, int newBottomR, int newTopR) { if (isLocActivated && exp->getEnabled()) { @@ -6753,6 +7744,13 @@ void LocallabBlur::curveChanged(CurveEditor* ce) } } + if (ce == wavhue) { + if (listener) { + listener->panelChanged(EvlocallabwavCurvehue, + M("HISTORY_CUSTOMCURVE") + " (" + escapeHtmlChars(spotName) + ")"); + } + } + if (ce == CCmaskblshape) { if (listener) { listener->panelChanged(EvlocallabCCmaskblshape, @@ -6811,17 +7809,21 @@ void LocallabBlur::convertParamToNormal() // Disable all listeners disableListener(); - + invmask->set_active(defSpot.invmask); + invmaskd->set_active(defSpot.invmaskd); // Set hidden GUI widgets in Normal mode to default spot values fftwbl->set_active(defSpot.fftwbl); strumaskbl->setValue(defSpot.strumaskbl); toolbl->set_active(defSpot.toolbl); + decayd->setValue(defSpot.decayd); lapmaskbl->setValue(defSpot.lapmaskbl); shadmaskbl->setValue((double)defSpot.shadmaskbl); shadmaskblsha->setValue((double)defSpot.shadmaskblsha); LLmaskblshapewav->setCurve(defSpot.LLmaskblcurvewav); csThresholdblur->setValue(defSpot.csthresholdblur); - + lnoiselow->setValue(defSpot.lnoiselow); + nlrad->setValue(defSpot.nlrad); + // Enable all listeners enableListener(); } @@ -6832,7 +7834,9 @@ void LocallabBlur::convertParamToSimple() // Disable all listeners disableListener(); - + invmask->set_active(defSpot.invmask); + invmaskd->set_active(defSpot.invmaskd); + scalegr->setValue(defSpot.scalegr); // Set hidden specific GUI widgets in Simple mode to default spot values showmaskblMethod->set_active(0); @@ -6843,18 +7847,38 @@ void LocallabBlur::convertParamToSimple() } else if (defSpot.showmaskblMethodtyp == "all") { showmaskblMethodtyp->set_active(2); } - + lnoiselow->setValue(defSpot.lnoiselow); enablMask->set_active(defSpot.enablMask); - CCmaskblshape->setCurve(defSpot.CCmaskblcurve); - LLmaskblshape->setCurve(defSpot.LLmaskblcurve); - HHmaskblshape->setCurve(defSpot.HHmaskblcurve); - blendmaskbl->setValue((double)defSpot.blendmaskbl); - radmaskbl->setValue(defSpot.radmaskbl); - chromaskbl->setValue(defSpot.chromaskbl); - gammaskbl->setValue(defSpot.gammaskbl); - slomaskbl->setValue(defSpot.slomaskbl); - Lmaskblshape->setCurve(defSpot.Lmasklccurve); - + // CCmaskblshape->setCurve(defSpot.CCmaskblcurve); + // LLmaskblshape->setCurve(defSpot.LLmaskblcurve); + // HHmaskblshape->setCurve(defSpot.HHmaskblcurve); + // blendmaskbl->setValue((double)defSpot.blendmaskbl); + // radmaskbl->setValue(defSpot.radmaskbl); + // chromaskbl->setValue(defSpot.chromaskbl); + // gammaskbl->setValue(defSpot.gammaskbl); + // slomaskbl->setValue(defSpot.slomaskbl); + // Lmaskblshape->setCurve(defSpot.Lmasklccurve); + levelthr->setValue(defSpot.levelthr); + lnoiselow->setValue(defSpot.lnoiselow); + levelthrlow->setValue(defSpot.levelthrlow); + usemask->set_active(defSpot.usemask); + invmaskd->set_active(defSpot.invmaskd); + invmask->set_active(defSpot.invmask); + recothresd->setValue(defSpot.recothresd); + lowthresd->setValue(defSpot.lowthresd); + midthresd->setValue(defSpot.midthresd); + midthresdch->setValue(defSpot.midthresdch); + higthresd->setValue(defSpot.higthresd); + decayd->setValue(defSpot.decayd); + recothres->setValue(defSpot.recothres); + lowthres->setValue(defSpot.lowthres); + higthres->setValue(defSpot.higthres); + adjblur->setValue(defSpot.adjblur); + noisechrodetail->setValue(defSpot.noisechrodetail); + nlpat->setValue(defSpot.nlpat); + nlrad->setValue(defSpot.nlrad); + nlgam->setValue(defSpot.nlgam); + // Enable all listeners enableListener(); } @@ -6866,7 +7890,25 @@ void LocallabBlur::updateGUIToMode(const modeType new_type) // Expert and Normal mode widgets are hidden in Simple mode fftwbl->hide(); expmaskbl->hide(); - + expdenoise1->hide(); + expdenoise2->hide(); + expdenoise3->hide(); + maskusable->hide(); + maskunusable->hide(); + maskusable2->hide(); + maskunusable2->hide(); + maskusable3->hide(); + maskunusable3->hide(); + decayd->hide(); + invmask->hide(); + invmaskd->hide(); + adjblur->hide(); + noisechrodetail->hide(); + usemask->hide(); + nlpat->hide(); + nlrad->hide(); + nlgam->hide(); + scalegr->hide(); break; case Normal: @@ -6879,8 +7921,59 @@ void LocallabBlur::updateGUIToMode(const modeType new_type) shadmaskblsha->hide(); mask2blCurveEditorGwav->hide(); csThresholdblur->hide(); + toolblFrame2->hide(); // Specific Simple mode widgets are shown in Normal mode expmaskbl->show(); + expdenoise1->hide(); + expdenoise2->hide(); + expdenoise3->show(); + adjblur->show(); + noisechrodetail->show(); + usemask->show(); + nlpat->show(); + nlrad->hide(); + nlgam->show(); + scalegr->show(); + + if (blMethod->get_active_row_number() == 2) { + expdenoise2->show(); + } + + decayd->hide(); + invmask->hide(); + invmaskd->hide(); + if(lnoiselow->getValue()!= 1.) { + if (showmaskblMethodtyp->get_active_row_number() == 0) { + showmaskblMethodtyp->set_active(2); + } + } + if(recothres->getValue()!= 1.) { + if (showmaskblMethodtyp->get_active_row_number() == 1) { + showmaskblMethodtyp->set_active(2); + } + } + if(recothresd->getValue()!= 1.) { + if (showmaskblMethodtyp->get_active_row_number() == 0) { + showmaskblMethodtyp->set_active(2); + } + } + + if (enablMask->get_active()) { + maskusable->show(); + maskunusable->hide(); + maskusable2->show(); + maskunusable2->hide(); + maskusable3->show(); + maskunusable3->hide(); + + } else { + maskusable->hide(); + maskunusable->show(); + maskusable2->hide(); + maskunusable2->show(); + maskusable3->hide(); + maskunusable3->show(); + } break; @@ -6889,7 +7982,24 @@ void LocallabBlur::updateGUIToMode(const modeType new_type) // Show widgets hidden in Normal and Simple mode if (blMethod->get_active_row_number() == 0) { // Keep widget hidden when blMethod is > 0 fftwbl->show(); + expdenoise2->hide(); } + if (blMethod->get_active_row_number() == 1) { + expdenoise2->hide(); + } + if (blMethod->get_active_row_number() == 2) { + expdenoise2->show(); + } + + expdenoise1->show(); + expdenoise3->show(); + decayd->show(); + invmask->show(); + invmaskd->show(); + adjblur->show(); + noisechrodetail->show(); + usemask->show(); + scalegr->show(); expmaskbl->show(); strumaskbl->show(); @@ -6899,6 +8009,43 @@ void LocallabBlur::updateGUIToMode(const modeType new_type) shadmaskblsha->show(); mask2blCurveEditorGwav->show(); csThresholdblur->show(); + toolblFrame2->show(); + nlpat->show(); + nlrad->show(); + nlgam->show(); + + if(lnoiselow->getValue()!= 1.) { + if (showmaskblMethodtyp->get_active_row_number() == 0) { + showmaskblMethodtyp->set_active(2); + } + } + if(recothres->getValue()!= 1.) { + if (showmaskblMethodtyp->get_active_row_number() == 1) { + showmaskblMethodtyp->set_active(2); + } + } + if(recothresd->getValue()!= 1.) { + if (showmaskblMethodtyp->get_active_row_number() == 0) { + showmaskblMethodtyp->set_active(2); + } + } + + if (enablMask->get_active()) { + maskusable->show(); + maskunusable->hide(); + maskusable2->show(); + maskunusable2->hide(); + maskusable3->show(); + maskunusable3->hide(); + } else { + maskusable->hide(); + maskunusable->show(); + maskusable2->hide(); + maskunusable2->show(); + maskusable3->show(); + maskunusable3->hide(); + } + } } @@ -6913,7 +8060,7 @@ void LocallabBlur::updateMaskBackground(const double normChromar, const double n LLmaskblshape->updateLocallabBackground(normLumar); HHmaskblshape->updateLocallabBackground(normHuer); Lmaskblshape->updateLocallabBackground(normLumar); - + wavhue->updateLocallabBackground(normHuer); return false; } ); @@ -6923,6 +8070,19 @@ void LocallabBlur::blMethodChanged() { // Update Blur & Noise GUI according to blMethod combobox state updateBlurGUI(); + const LocallabParams::LocallabSpot defSpot; + + if (invbl->get_active() && blMethod->get_active_row_number() == 2) { + radius->setValue(defSpot.radius); + medMethod->set_active(0); + } else if(invbl->get_active() && blMethod->get_active_row_number() == 0) { + guidbl->setValue(defSpot.guidbl); + medMethod->set_active(0); + } else if(invbl->get_active() && blMethod->get_active_row_number() == 1) { + radius->setValue(defSpot.radius); + guidbl->setValue(defSpot.guidbl); + } + if (isLocActivated && exp->getEnabled()) { if (listener) { @@ -6947,8 +8107,69 @@ void LocallabBlur::fftwblChanged() } } +void LocallabBlur::usemaskChanged() +{ + if (isLocActivated && exp->getEnabled()) { + if (listener) { + if (usemask->get_active()) { + listener->panelChanged(Evlocallabusemask1, + M("GENERAL_ENABLED") + " (" + escapeHtmlChars(spotName) + ")"); + } else { + listener->panelChanged(Evlocallabusemask1, + M("GENERAL_DISABLED") + " (" + escapeHtmlChars(spotName) + ")"); + } + } + } +} + +void LocallabBlur::invmaskdChanged() +{ + if (isLocActivated && exp->getEnabled()) { + if (listener) { + if (invmaskd->get_active()) { + listener->panelChanged(Evlocallabinvmaskd, + M("GENERAL_ENABLED") + " (" + escapeHtmlChars(spotName) + ")"); + } else { + listener->panelChanged(Evlocallabinvmaskd, + M("GENERAL_DISABLED") + " (" + escapeHtmlChars(spotName) + ")"); + } + } + } +} + +void LocallabBlur::invmaskChanged() +{ + if (isLocActivated && exp->getEnabled()) { + if (listener) { + if (invmask->get_active()) { + listener->panelChanged(Evlocallabinvmask, + M("GENERAL_ENABLED") + " (" + escapeHtmlChars(spotName) + ")"); + } else { + listener->panelChanged(Evlocallabinvmask, + M("GENERAL_DISABLED") + " (" + escapeHtmlChars(spotName) + ")"); + } + } + } +} + + void LocallabBlur::invblChanged() { + const LocallabParams::LocallabSpot defSpot; + + if (invbl->get_active() && blMethod->get_active_row_number() == 2) { + radius->setValue(defSpot.radius); + medMethod->set_active(0); + } else if(invbl->get_active() && blMethod->get_active_row_number() == 0) { + guidbl->setValue(defSpot.guidbl); + medMethod->set_active(0); + } else if(invbl->get_active() && blMethod->get_active_row_number() == 1) { + radius->setValue(defSpot.radius); + guidbl->setValue(defSpot.guidbl); + } + + + if (isLocActivated && exp->getEnabled()) { if (listener) { if (invbl->get_active()) { @@ -7032,6 +8253,22 @@ void LocallabBlur::showmaskblMethodChanged() void LocallabBlur::showmaskblMethodtypChanged() { + if(lnoiselow->getValue()!= 1.) { + if (showmaskblMethodtyp->get_active_row_number() == 0) { + showmaskblMethodtyp->set_active(2); + } + } + if(recothres->getValue()!= 1.) { + if (showmaskblMethodtyp->get_active_row_number() == 1) { + showmaskblMethodtyp->set_active(2); + } + } + if(recothresd->getValue()!= 1.) { + if (showmaskblMethodtyp->get_active_row_number() == 0) { + showmaskblMethodtyp->set_active(2); + } + } + // If mask preview is activated, deactivate all other tool mask preview if (locToolListener) { locToolListener->resetOtherMaskView(this); @@ -7045,6 +8282,22 @@ void LocallabBlur::showmaskblMethodtypChanged() void LocallabBlur::enablMaskChanged() { + if (enablMask->get_active()) { + maskusable->show(); + maskunusable->hide(); + maskusable2->show(); + maskunusable2->hide(); + maskusable3->show(); + maskunusable3->hide(); + } else { + maskusable->hide(); + maskunusable->show(); + maskusable2->hide(); + maskunusable2->show(); + maskusable3->hide(); + maskunusable3->show(); + } + if (isLocActivated && exp->getEnabled()) { if (listener) { if (enablMask->get_active()) { @@ -7075,13 +8328,27 @@ void LocallabBlur::toolblChanged() void LocallabBlur::updateBlurGUI() { + const LocallabParams::LocallabSpot defSpot; + + if (invbl->get_active() && blMethod->get_active_row_number() == 2) { + radius->setValue(defSpot.radius); + medMethod->set_active(0); + } else if(invbl->get_active() && blMethod->get_active_row_number() == 0) { + guidbl->setValue(defSpot.guidbl); + medMethod->set_active(0); + } else if(invbl->get_active() && blMethod->get_active_row_number() == 1) { + radius->setValue(defSpot.radius); + guidbl->setValue(defSpot.guidbl); + } + + const int mode = complexity->get_active_row_number(); if (blMethod->get_active_row_number() == 0) { if (mode == Expert) { // Keep widget hidden in Normal and Simple mode fftwbl->show(); } - + expdenoise2->hide(); radius->show(); strength->show(); grainFrame->show(); @@ -7089,6 +8356,9 @@ void LocallabBlur::updateBlurGUI() itera->hide(); guidbl->hide(); strbl->hide(); + recothres->hide(); + lowthres->hide(); + higthres->hide(); epsbl->hide(); activlum->show(); } else if (blMethod->get_active_row_number() == 1) { @@ -7100,6 +8370,10 @@ void LocallabBlur::updateBlurGUI() itera->show(); guidbl->hide(); strbl->hide(); + expdenoise2->hide(); + recothres->hide(); + lowthres->hide(); + higthres->hide(); epsbl->hide(); activlum->show(); } else if (blMethod->get_active_row_number() == 2) { @@ -7111,6 +8385,13 @@ void LocallabBlur::updateBlurGUI() itera->hide(); guidbl->show(); strbl->show(); + expdenoise2->hide(); + if (mode == Expert || mode == Normal){ + expdenoise2->show(); + recothres->show(); + lowthres->show(); + higthres->show(); + } epsbl->show(); activlum->hide(); } diff --git a/rtgui/locallabtools.h b/rtgui/locallabtools.h index 4ae593225..53eafd6f8 100644 --- a/rtgui/locallabtools.h +++ b/rtgui/locallabtools.h @@ -124,7 +124,7 @@ public: return false; }; virtual void resetMaskView() {}; - virtual void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) {}; + virtual void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) {}; // Advice tooltips management function virtual void updateAdviceTooltips(const bool showTooltips) {}; @@ -170,7 +170,7 @@ private: /* ==== LocallabColor ==== */ class LocallabColor: - public Gtk::VBox, + public Gtk::Box, public LocallabTool, public ThresholdAdjusterListener { @@ -189,6 +189,13 @@ private: Adjuster* const structcol; Adjuster* const blurcolde; Adjuster* const softradiuscol; + MyExpander* const exprecov; + Gtk::Label* const maskusablec; + Gtk::Label* const maskunusablec; + Adjuster* const recothresc; + Adjuster* const lowthresc; + Adjuster* const higthresc; + Adjuster* const decayc; Gtk::CheckButton* const invers; MyExpander* const expgradcol; Adjuster* const strcol; @@ -242,6 +249,7 @@ private: Adjuster* const blurcol; Adjuster* const blendmaskcol; Gtk::Frame* const toolcolFrame; + Gtk::Frame* const toolcolFrame2; Adjuster* const radmaskcol; Adjuster* const lapmaskcol; Adjuster* const chromaskcol; @@ -266,7 +274,7 @@ public: bool isMaskViewActive() override; void resetMaskView() override; - void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) override; + void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) override; void updateAdviceTooltips(const bool showTooltips) override; @@ -278,6 +286,7 @@ public: void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override; void adjusterChanged(Adjuster* a, double newval) override; void adjusterChanged(ThresholdAdjuster* a, double newBottom, double newTop) override {}; // Not used +// void adjusterChanged3(ThresholdAdjuster* a, double newBottom, double newTop) override {}; void adjusterChanged(ThresholdAdjuster* a, double newBottomLeft, double newTopLeft, double newBottomRight, double newTopRight) override {}; // Not used void adjusterChanged(ThresholdAdjuster* a, int newBottom, int newTop) override {}; // Not used void adjusterChanged(ThresholdAdjuster* a, int newBottomLeft, int newTopLeft, int newBottomRight, int newTopRight) override {}; // Not used @@ -313,7 +322,7 @@ private: /* ==== LocallabExposure ==== */ class LocallabExposure: - public Gtk::VBox, + public Gtk::Box, public LocallabTool { private: @@ -331,6 +340,7 @@ private: MyExpander* const expfat; Adjuster* const fatamount; Adjuster* const fatdetail; + Gtk::CheckButton* const norm; Adjuster* const fatlevel; Adjuster* const fatanchor; Adjuster* const sensiex; @@ -346,6 +356,14 @@ private: Adjuster* const expchroma; CurveEditorGroup* const curveEditorG; DiagonalCurveEditor* shapeexpos; + MyExpander* const exprecove; + Gtk::Label* const maskusablee; + Gtk::Label* const maskunusablee; + Adjuster* const recothrese; + Adjuster* const lowthrese; + Adjuster* const higthrese; + Adjuster* const decaye; + MyExpander* const expgradexp; Adjuster* const strexp; Adjuster* const angexp; @@ -372,7 +390,7 @@ private: CurveEditorGroup* const mask2expCurveEditorG; DiagonalCurveEditor* const Lmaskexpshape; - sigc::connection expMethodConn, exnoiseMethodConn, inversexConn, showmaskexpMethodConn, showmaskexpMethodConninv, enaExpMaskConn, enaExpMaskaftConn; + sigc::connection expMethodConn, exnoiseMethodConn, inversexConn, normConn, showmaskexpMethodConn, showmaskexpMethodConninv, enaExpMaskConn, enaExpMaskaftConn; public: LocallabExposure(); @@ -380,7 +398,7 @@ public: bool isMaskViewActive() override; void resetMaskView() override; - void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) override; + void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) override; void updateAdviceTooltips(const bool showTooltips) override; @@ -404,6 +422,7 @@ private: void expMethodChanged(); void exnoiseMethodChanged(); void inversexChanged(); + void normChanged(); void showmaskexpMethodChanged(); void showmaskexpMethodChangedinv(); void enaExpMaskChanged(); @@ -417,7 +436,7 @@ private: /* ==== LocallabShadow ==== */ class LocallabShadow: - public Gtk::VBox, + public Gtk::Box, public LocallabTool { private: @@ -432,6 +451,13 @@ private: Adjuster* const sh_radius; Adjuster* const sensihs; Adjuster* const blurSHde; + MyExpander* const exprecovs; + Gtk::Label* const maskusables; + Gtk::Label* const maskunusables; + Adjuster* const recothress; + Adjuster* const lowthress; + Adjuster* const higthress; + Adjuster* const decays; Gtk::Frame* const gamFrame; Adjuster* const gamSH; Adjuster* const sloSH; @@ -467,7 +493,7 @@ public: bool isMaskViewActive() override; void resetMaskView() override; - void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) override; + void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) override; void updateAdviceTooltips(const bool showTooltips) override; @@ -500,7 +526,7 @@ private: /* ==== LocallabVibrance ==== */ class LocallabVibrance: - public Gtk::VBox, + public Gtk::Box, public LocallabTool, public ThresholdAdjusterListener, public ThresholdCurveProvider @@ -517,6 +543,13 @@ private: Adjuster* const sensiv; CurveEditorGroup* const curveEditorGG; DiagonalCurveEditor* const skinTonesCurve; + MyExpander* const exprecovv; + Gtk::Label* const maskusablev; + Gtk::Label* const maskunusablev; + Adjuster* const recothresv; + Adjuster* const lowthresv; + Adjuster* const higthresv; + Adjuster* const decayv; MyExpander* const expgradvib; Adjuster* const strvib; Adjuster* const strvibab; @@ -546,7 +579,7 @@ public: bool isMaskViewActive() override; void resetMaskView() override; - void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) override; + void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) override; void updateAdviceTooltips(const bool showTooltips) override; @@ -558,6 +591,7 @@ public: void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override; void adjusterChanged(Adjuster* a, double newval) override; void adjusterChanged(ThresholdAdjuster* a, double newBottom, double newTop) override {}; // Not used +// void adjusterChanged3(ThresholdAdjuster* a, double newBottom, double newTop) override {}; void adjusterChanged(ThresholdAdjuster* a, double newBottomLeft, double newTopLeft, double newBottomRight, double newTopRight) override {}; // Not used void adjusterChanged(ThresholdAdjuster* a, int newBottom, int newTop) override; void adjusterChanged(ThresholdAdjuster* a, int newBottomLeft, int newTopLeft, int newBottomRight, int newTopRight) override {}; // Not used @@ -584,13 +618,13 @@ private: /* ==== LocallabSoft ==== */ class LocallabSoft: - public Gtk::VBox, + public Gtk::Box, public LocallabTool { private: // Soft light specific widgets MyComboBoxText* const softMethod; - Gtk::HBox* const ctboxsoftmethod; + Gtk::Box* const ctboxsoftmethod; MyComboBoxText* const showmasksoftMethod; Adjuster* const streng; Adjuster* const laplace; @@ -603,7 +637,7 @@ public: bool isMaskViewActive() override; void resetMaskView() override; - void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) override; + void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) override; void updateAdviceTooltips(const bool showTooltips) override; @@ -630,9 +664,11 @@ private: /* ==== LocallabBlur ==== */ class LocallabBlur: - public Gtk::VBox, + public Gtk::Box, public LocallabTool, public ThresholdAdjusterListener +// public ThresholdCurveProvider + { private: // Blur & Noise specific widgets @@ -642,14 +678,20 @@ private: Adjuster* const radius; Adjuster* const strength; Gtk::Frame* const grainFrame; + Gtk::Frame* const grainFrame2; Adjuster* const isogr; Adjuster* const strengr; Adjuster* const scalegr; + Adjuster* const divgr; MyComboBoxText* const medMethod; Adjuster* const itera; Adjuster* const guidbl; Adjuster* const strbl; Adjuster* const epsbl; + MyExpander* const expdenoise2; + Adjuster* const recothres; + Adjuster* const lowthres; + Adjuster* const higthres; Adjuster* const sensibn; MyComboBoxText* const blurMethod; Gtk::CheckButton* const invbl; @@ -659,19 +701,51 @@ private: MyComboBoxText* const quamethod; CurveEditorGroup* const LocalcurveEditorwavden; FlatCurveEditor* const wavshapeden; + MyExpander* const expdenoise1; + Gtk::Label* const maskusable; + Gtk::Label* const maskunusable; + Gtk::Label* const maskusable2; + Gtk::Label* const maskunusable2; + Gtk::Label* const maskusable3; + Gtk::Label* const maskunusable3; + + Gtk::CheckButton* const usemask; + Adjuster* const lnoiselow; + Adjuster* const levelthr; + Adjuster* const levelthrlow; Adjuster* const noiselumf0; Adjuster* const noiselumf; Adjuster* const noiselumf2; Adjuster* const noiselumc; Adjuster* const noiselumdetail; Adjuster* const noiselequal; + CurveEditorGroup* const LocalcurveEditorwavhue; + FlatCurveEditor* wavhue; Adjuster* const noisechrof; Adjuster* const noisechroc; Adjuster* const noisechrodetail; + Gtk::Frame* const detailFrame; Adjuster* const detailthr; Adjuster* const adjblur; + MyExpander* const expdenoise3; + Adjuster* const recothresd; + Adjuster* const lowthresd; + Adjuster* const midthresd; + Adjuster* const midthresdch; + Adjuster* const higthresd; + Adjuster* const decayd; + + Gtk::CheckButton* const invmaskd; + Gtk::CheckButton* const invmask; + Gtk::Frame* const nlFrame; + Adjuster* const nlstr; + Adjuster* const nldet; + Adjuster* const nlpat; + Adjuster* const nlrad; + Adjuster* const nlgam; Adjuster* const bilateral; Adjuster* const sensiden; + Gtk::Button* neutral; MyExpander* const expmaskbl; MyComboBoxText* const showmaskblMethod; MyComboBoxText* const showmaskblMethodtyp; @@ -683,6 +757,7 @@ private: Adjuster* const strumaskbl; Gtk::CheckButton* const toolbl; Gtk::Frame* const toolblFrame; + Gtk::Frame* const toolblFrame2; Adjuster* const blendmaskbl; Adjuster* const radmaskbl; Adjuster* const lapmaskbl; @@ -695,20 +770,21 @@ private: DiagonalCurveEditor* const Lmaskblshape; CurveEditorGroup* const mask2blCurveEditorGwav; FlatCurveEditor* const LLmaskblshapewav; - Gtk::HBox* const quaHBox; + Gtk::Box* const quaHBox; ThresholdAdjuster* const csThresholdblur; sigc::connection blMethodConn, fftwblConn, invblConn, medMethodConn, blurMethodConn, chroMethodConn, activlumConn, showmaskblMethodConn, showmaskblMethodtypConn, enablMaskConn, toolblConn; - sigc::connection quamethodconn; + sigc::connection quamethodconn, usemaskConn, invmaskdConn, invmaskConn, neutralconn; public: LocallabBlur(); ~LocallabBlur(); bool isMaskViewActive() override; void resetMaskView() override; - void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) override; + void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) override; void updateAdviceTooltips(const bool showTooltips) override; + void neutral_pressed(); void setDefaultExpanderVisibility() override; void disableListener() override; @@ -718,6 +794,7 @@ public: void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override; void adjusterChanged(Adjuster* a, double newval) override; void adjusterChanged(ThresholdAdjuster* a, double newBottom, double newTop) override {}; // Not used +// void adjusterChanged3(ThresholdAdjuster* a, double newBotto, double newTo) override; void adjusterChanged(ThresholdAdjuster* a, double newBottomLeft, double newTopLeft, double newBottomRight, double newTopRight) override {}; // Not used void adjusterChanged(ThresholdAdjuster* a, int newBottom, int newTop) override {}; // Not used void adjusterChanged(ThresholdAdjuster* a, int newBottomLeft, int newTopLeft, int newBottomRight, int newTopRight) override {}; // Not used @@ -734,6 +811,9 @@ private: void blMethodChanged(); void fftwblChanged(); + void usemaskChanged(); + void invmaskdChanged(); + void invmaskChanged(); void invblChanged(); void medMethodChanged(); void blurMethodChanged(); @@ -750,7 +830,7 @@ private: /* ==== LocallabTone ==== */ class LocallabTone: - public Gtk::VBox, + public Gtk::Box, public LocallabTool { private: @@ -765,6 +845,13 @@ private: Adjuster* const rewei; Adjuster* const softradiustm; Adjuster* const sensitm; + MyExpander* const exprecovt; + Gtk::Label* const maskusablet; + Gtk::Label* const maskunusablet; + Adjuster* const recothrest; + Adjuster* const lowthrest; + Adjuster* const higthrest; + Adjuster* const decayt; MyExpander* const expmasktm; MyComboBoxText* const showmasktmMethod; Gtk::CheckButton* const enatmMask; @@ -790,7 +877,7 @@ public: bool isMaskViewActive() override; void resetMaskView() override; - void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) override; + void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) override; void updateAdviceTooltips(const bool showTooltips) override; @@ -819,7 +906,7 @@ private: /* ==== LocallabRetinex ==== */ class LocallabRetinex: - public Gtk::VBox, + public Gtk::Box, public LocallabTool { private: @@ -827,7 +914,7 @@ private: Gtk::Frame* const dehaFrame; Adjuster* const dehaz; Adjuster* const depth; - Gtk::CheckButton* const lumonly; + Adjuster* const dehazeSaturation; Gtk::Frame* const retiFrame; Adjuster* const str; Gtk::CheckButton* const loglin; @@ -854,6 +941,13 @@ private: Gtk::Label* const transLabels2; CurveEditorGroup* const LocalcurveEditorgainT; FlatCurveEditor* const cTgainshape; + MyExpander* const exprecovr; + Gtk::Label* const maskusabler; + Gtk::Label* const maskunusabler; + Adjuster* const recothresr; + Adjuster* const lowthresr; + Adjuster* const higthresr; + Adjuster* const decayr; MyExpander* const expmaskreti; MyComboBoxText* const showmaskretiMethod; Gtk::CheckButton* const enaretiMask; @@ -872,7 +966,7 @@ private: DiagonalCurveEditor* const Lmaskretishape; Gtk::CheckButton* const inversret; - sigc::connection lumonlyConn, loglinConn, retinexMethodConn, fftwretiConn, equilretConn, showmaskretiMethodConn, enaretiMaskConn, enaretiMasktmapConn, inversretConn; + sigc::connection loglinConn, retinexMethodConn, fftwretiConn, equilretConn, showmaskretiMethodConn, enaretiMaskConn, enaretiMasktmapConn, inversretConn; public: LocallabRetinex(); @@ -882,7 +976,7 @@ public: bool isMaskViewActive() override; void resetMaskView() override; - void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) override; + void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) override; void updateAdviceTooltips(const bool showTooltips) override; @@ -903,7 +997,6 @@ private: void updateMaskBackground(const double normChromar, const double normLumar, const double normHuer) override; - void lumonlyChanged(); void loglinChanged(); void retinexMethodChanged(); void fftwretiChanged(); @@ -920,7 +1013,7 @@ private: /* ==== LocallabSharp ==== */ class LocallabSharp: - public Gtk::VBox, + public Gtk::Box, public LocallabTool { private: @@ -942,7 +1035,7 @@ public: bool isMaskViewActive() override; void resetMaskView() override; - void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) override; + void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) override; void updateAdviceTooltips(const bool showTooltips) override; @@ -965,9 +1058,10 @@ private: /* ==== LocallabContrast ==== */ class LocallabContrast: - public Gtk::VBox, + public Gtk::Box, public LocallabTool, public ThresholdAdjusterListener + { private: MyComboBoxText* const localcontMethod; @@ -1043,6 +1137,13 @@ private: FlatCurveEditor* const wavshapecomp; Adjuster* const fatres; Gtk::CheckButton* const fftwlc; + MyExpander* const exprecovw; + Gtk::Label* const maskusablew; + Gtk::Label* const maskunusablew; + Adjuster* const recothresw; + Adjuster* const lowthresw; + Adjuster* const higthresw; + Adjuster* const decayw; MyExpander* const expmasklc; MyComboBoxText* const showmasklcMethod; Gtk::CheckButton* const enalcMask; @@ -1064,7 +1165,7 @@ public: bool isMaskViewActive() override; void resetMaskView() override; - void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) override; + void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) override; void updateAdviceTooltips(const bool showTooltips) override; @@ -1076,6 +1177,7 @@ public: void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override; void adjusterChanged(Adjuster* a, double newval) override; void adjusterChanged(ThresholdAdjuster* a, double newBottom, double newTop) override {}; // Not used +// void adjusterChanged3(ThresholdAdjuster* a, double newBottom, double newTop) override {}; void adjusterChanged(ThresholdAdjuster* a, double newBottomLeft, double newTopLeft, double newBottomRight, double newTopRight) override {}; // Not used void adjusterChanged(ThresholdAdjuster* a, int newBottom, int newTop) override {}; // Not used void adjusterChanged(ThresholdAdjuster* a, int newBottomLeft, int newTopLeft, int newBottomRight, int newTopRight) override {}; // Not used @@ -1113,7 +1215,7 @@ private: /* ==== LocallabCBDL ==== */ class LocallabCBDL: - public Gtk::VBox, + public Gtk::Box, public LocallabTool { private: @@ -1125,6 +1227,13 @@ private: Adjuster* const contresid; Adjuster* const softradiuscb; Adjuster* const sensicb; + MyExpander* const exprecovcb; + Gtk::Label* const maskusablecb; + Gtk::Label* const maskunusablecb; + Adjuster* const recothrescb; + Adjuster* const lowthrescb; + Adjuster* const higthrescb; + Adjuster* const decaycb; MyExpander* const expmaskcb; MyComboBoxText* const showmaskcbMethod; Gtk::CheckButton* const enacbMask; @@ -1155,7 +1264,7 @@ public: bool isMaskViewActive() override; void resetMaskView() override; - void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) override; + void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) override; void updateAdviceTooltips(const bool showTooltips) override; @@ -1186,29 +1295,83 @@ private: /* ==== LocallabLog ==== */ class LocallabLog: - public Gtk::VBox, + public Gtk::Box, public LocallabTool { private: + Adjuster* const repar; + Gtk::CheckButton* const ciecam; Gtk::ToggleButton* const autocompute; Gtk::Frame* const logPFrame; Adjuster* const blackEv; Adjuster* const whiteEv; Gtk::CheckButton* const fullimage; + Gtk::Frame* const logFrame; Gtk::CheckButton* const Autogray; Adjuster* const sourceGray; + Adjuster* const sourceabs; + MyComboBoxText* const sursour; + Gtk::Box* const surHBox; + Gtk::Frame* const log1Frame; + Gtk::Frame* const log2Frame; Adjuster* const targetGray; Adjuster* const detail; + Adjuster* const catad; + Adjuster* const lightl; + Adjuster* const lightq; + Adjuster* const contl; + Adjuster* const contq; + Adjuster* const contthres; + Adjuster* const colorfl; + Adjuster* const saturl; + MyExpander* const expL; + CurveEditorGroup* const CurveEditorL; + DiagonalCurveEditor* const LshapeL; + Adjuster* const targabs; + MyComboBoxText* const surround; + Gtk::Box* const surrHBox; + Adjuster* const baselog; + MyExpander* const exprecovl; + Gtk::Label* const maskusablel; + Gtk::Label* const maskunusablel; + Adjuster* const recothresl; + Adjuster* const lowthresl; + Adjuster* const higthresl; + Adjuster* const decayl; + Adjuster* const sensilog; + Gtk::Frame* const gradlogFrame; Adjuster* const strlog; Adjuster* const anglog; + MyExpander* const expmaskL; + MyComboBoxText* const showmaskLMethod; + Gtk::CheckButton* const enaLMask; + CurveEditorGroup* const maskCurveEditorL; + FlatCurveEditor* const CCmaskshapeL; + FlatCurveEditor* const LLmaskshapeL; + FlatCurveEditor* const HHmaskshapeL; + Adjuster* const blendmaskL; + Adjuster* const radmaskL; + Adjuster* const chromaskL; + CurveEditorGroup* const mask2CurveEditorL; + DiagonalCurveEditor* const LmaskshapeL; - sigc::connection autoconn, fullimageConn, AutograyConn; - + sigc::connection autoconn, ciecamconn, fullimageConn, AutograyConn; + sigc::connection surroundconn, sursourconn; + sigc::connection showmaskLMethodConn, enaLMaskConn; public: LocallabLog(); + ~LocallabLog(); + + bool isMaskViewActive() override; + void resetMaskView() override; + void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) override; + void updateAdviceTooltips(const bool showTooltips) override; + void surroundChanged(); + void sursourChanged(); + void setDefaultExpanderVisibility() override; void disableListener() override; void enableListener() override; @@ -1216,23 +1379,33 @@ public: void write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr) override; void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override; void adjusterChanged(Adjuster* a, double newval) override; + void curveChanged(CurveEditor* ce) override; - void updateAutocompute(const float blackev, const float whiteev, const float sourceg, const float targetg); + void updateAutocompute(const float blackev, const float whiteev, const float sourceg, const float sourceab, const float targetg); private: void enabledChanged() override; + void convertParamToNormal() override; + void convertParamToSimple() override; + void updateGUIToMode(const modeType new_type) override; + void complexityModeChanged(); void autocomputeToggled(); void fullimageChanged(); void AutograyChanged(); + void ciecamChanged(); + void showmaskLMethodChanged(); + void enaLMaskChanged(); + void updateMaskBackground(const double normChromar, const double normLumar, const double normHuer) override; void updateLogGUI(); + void updateLogGUI2(); }; /* ==== LocallabMask ==== */ class LocallabMask: - public Gtk::VBox, + public Gtk::Box, public LocallabTool, public ThresholdAdjusterListener { @@ -1280,7 +1453,7 @@ public: bool isMaskViewActive() override; void resetMaskView() override; - void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) override; + void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) override; void updateAdviceTooltips(const bool showTooltips) override; @@ -1291,6 +1464,7 @@ public: void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override; void adjusterChanged(Adjuster* a, double newval) override; void adjusterChanged(ThresholdAdjuster* a, double newBottom, double newTop) override {}; // Not used +// void adjusterChanged3(ThresholdAdjuster* a, double newBottom, double newTop) override {}; void adjusterChanged(ThresholdAdjuster* a, double newBottomLeft, double newTopLeft, double newBottomRight, double newTopRight) override {}; // Not used void adjusterChanged(ThresholdAdjuster* a, int newBottom, int newTop) override {}; // Not used void adjusterChanged(ThresholdAdjuster* a, int newBottomLeft, int newTopLeft, int newBottomRight, int newTopRight) override {}; // Not used diff --git a/rtgui/locallabtools2.cc b/rtgui/locallabtools2.cc index a0619eafd..d0ed30a8a 100644 --- a/rtgui/locallabtools2.cc +++ b/rtgui/locallabtools2.cc @@ -126,16 +126,24 @@ LocallabTone::LocallabTone(): estop(Gtk::manage(new Adjuster(M("TP_LOCALLAB_ESTOP"), 0.1, 4., 0.01, 1.4))), scaltm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SCALTM"), 0.1, 10.0, 0.01, 1.0))), rewei(Gtk::manage(new Adjuster(M("TP_LOCALLAB_REWEI"), 0, 3, 1, 0))), - softradiustm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.1, 0.))), + softradiustm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.1, 0.))),//unused here, but used for normalize_mean_dt sensitm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 60))), + exprecovt(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_DENOI2_EXP")))), + maskusablet(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUSABLE")))), + maskunusablet(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUNUSABLE")))), + recothrest(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKRECOTHRES"), 1., 2., 0.01, 1.))), + lowthrest(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHRLOW"), 1., 80., 0.5, 12.))), + higthrest(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHR"), 20., 99., 0.5, 85.))), + decayt(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKDDECAY"), 0.5, 4., 0.1, 2.))), expmasktm(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_SHOWT")))), showmasktmMethod(Gtk::manage(new MyComboBoxText())), enatmMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), enatmMaskaft(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_AFTER_MASK")))), - masktmCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), - CCmasktmshape(static_cast(masktmCurveEditorG->addCurve(CT_Flat, "C(C)", nullptr, false, false))), - LLmasktmshape(static_cast(masktmCurveEditorG->addCurve(CT_Flat, "L(L)", nullptr, false, false))), - HHmasktmshape(static_cast(masktmCurveEditorG->addCurve(CT_Flat, "LC(H)", nullptr, false, true))), + // masktmCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), + masktmCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, "", 1)), + CCmasktmshape(static_cast(masktmCurveEditorG->addCurve(CT_Flat, "C", nullptr, false, false))), + LLmasktmshape(static_cast(masktmCurveEditorG->addCurve(CT_Flat, "L", nullptr, false, false))), + HHmasktmshape(static_cast(masktmCurveEditorG->addCurve(CT_Flat, "LC(h)", nullptr, false, true))), blendmasktm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), lapmasktm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), radmasktm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), @@ -145,6 +153,8 @@ LocallabTone::LocallabTone(): mask2tmCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK2"))), Lmasktmshape(static_cast(mask2tmCurveEditorG->addCurve(CT_Diagonal, "L(L)"))) { + set_orientation(Gtk::ORIENTATION_VERTICAL); + const LocallabParams::LocallabSpot defSpot; // Parameter Tone Mapping specific widgets @@ -169,6 +179,12 @@ LocallabTone::LocallabTone(): sensitm->setAdjusterListener(this); + recothrest->setAdjusterListener(this); + lowthrest->setAdjusterListener(this); + higthrest->setAdjusterListener(this); + decayt->setAdjusterListener(this); + setExpandAlignProperties(exprecovt, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + setExpandAlignProperties(expmasktm, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); showmasktmMethod->append(M("TP_LOCALLAB_SHOWMNONE")); @@ -222,6 +238,7 @@ LocallabTone::LocallabTone(): // Add Tone Mapping specific widgets to GUI // pack_start(*amount); // To use if we change transit_shapedetect parameters + pack_start(*sensitm); pack_start(*stren); pack_start(*equiltm); pack_start(*gamma); @@ -229,8 +246,19 @@ LocallabTone::LocallabTone(): pack_start(*estop); pack_start(*scaltm); pack_start(*rewei); - // pack_start(*softradiustm); // Always bad with TM ?? - pack_start(*sensitm); + // pack_start(*softradiustm); //unused here, but used for normalize_mean_dt +// pack_start(*sensitm); + ToolParamBlock* const tmBox3 = Gtk::manage(new ToolParamBlock()); + tmBox3->pack_start(*maskusablet, Gtk::PACK_SHRINK, 0); + tmBox3->pack_start(*maskunusablet, Gtk::PACK_SHRINK, 0); + tmBox3->pack_start(*recothrest); + tmBox3->pack_start(*lowthrest); + tmBox3->pack_start(*higthrest); + tmBox3->pack_start(*decayt); + // colBox3->pack_start(*invmaskc); + exprecovt->add(*tmBox3, false); + pack_start(*exprecovt, false, false); + ToolParamBlock* const masktmBox = Gtk::manage(new ToolParamBlock()); masktmBox->pack_start(*showmasktmMethod, Gtk::PACK_SHRINK, 4); masktmBox->pack_start(*enatmMask, Gtk::PACK_SHRINK, 0); @@ -265,7 +293,7 @@ void LocallabTone::resetMaskView() showmasktmMethodConn.block(false); } -void LocallabTone::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) +void LocallabTone::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) { tmMask = showmasktmMethod->get_active_row_number(); } @@ -274,6 +302,7 @@ void LocallabTone::updateAdviceTooltips(const bool showTooltips) { if (showTooltips) { exp->set_tooltip_text(M("TP_LOCALLAB_TONEMAP_TOOLTIP")); + exprecovt->set_tooltip_markup(M("TP_LOCALLAB_MASKRESTM_TOOLTIP")); equiltm->set_tooltip_text(M("TP_LOCALLAB_EQUILTM_TOOLTIP")); gamma->set_tooltip_text(M("TP_LOCALLAB_TONEMAPGAM_TOOLTIP")); estop->set_tooltip_text(M("TP_LOCALLAB_TONEMAPESTOP_TOOLTIP")); @@ -293,6 +322,9 @@ void LocallabTone::updateAdviceTooltips(const bool showTooltips) chromasktm->set_tooltip_text(M("TP_LOCALLAB_CHROMASK_TOOLTIP")); slomasktm->set_tooltip_text(M("TP_LOCALLAB_SLOMASK_TOOLTIP")); lapmasktm->set_tooltip_text(M("TP_LOCALLAB_LAPRAD1_TOOLTIP")); + decayt->set_tooltip_text(M("TP_LOCALLAB_MASKDECAY_TOOLTIP")); + lowthrest->set_tooltip_text(M("TP_LOCALLAB_MASKLOWTHRESTM_TOOLTIP")); + higthrest->set_tooltip_text(M("TP_LOCALLAB_MASKHIGTHRESTM_TOOLTIP")); } else { exp->set_tooltip_text(""); @@ -317,11 +349,16 @@ void LocallabTone::updateAdviceTooltips(const bool showTooltips) chromasktm->set_tooltip_text(""); slomasktm->set_tooltip_text(""); lapmasktm->set_tooltip_text(""); + exprecovt->set_tooltip_markup(""); + decayt->set_tooltip_text(""); + lowthrest->set_tooltip_text(""); + higthrest->set_tooltip_text(""); } } void LocallabTone::setDefaultExpanderVisibility() { + exprecovt->set_expanded(false); expmasktm->set_expanded(false); } @@ -384,6 +421,10 @@ void LocallabTone::read(const rtengine::procparams::ProcParams* pp, const Params gammasktm->setValue(spot.gammasktm); slomasktm->setValue(spot.slomasktm); Lmasktmshape->setCurve(spot.Lmasktmcurve); + recothrest->setValue((double)spot.recothrest); + lowthrest->setValue((double)spot.lowthrest); + higthrest->setValue((double)spot.higthrest); + decayt->setValue((double)spot.decayt); } // Enable all listeners @@ -428,6 +469,10 @@ void LocallabTone::write(rtengine::procparams::ProcParams* pp, ParamsEdited* ped spot.gammasktm = gammasktm->getValue(); spot.slomasktm = slomasktm->getValue(); spot.Lmasktmcurve = Lmasktmshape->getCurve(); + spot.recothrest = recothrest->getValue(); + spot.lowthrest = lowthrest->getValue(); + spot.higthrest = higthrest->getValue(); + spot.decayt = decayt->getValue(); } // Note: No need to manage pedited as batch mode is deactivated for Locallab @@ -456,6 +501,10 @@ void LocallabTone::setDefaults(const rtengine::procparams::ProcParams* defParams chromasktm->setDefault(defSpot.chromasktm); gammasktm->setDefault(defSpot.gammasktm); slomasktm->setDefault(defSpot.slomasktm); + recothrest->setDefault((double)defSpot.recothrest); + lowthrest->setDefault((double)defSpot.lowthrest); + higthrest->setDefault((double)defSpot.higthrest); + decayt->setDefault((double)defSpot.decayt); } // Note: No need to manage pedited as batch mode is deactivated for Locallab @@ -496,6 +545,14 @@ void LocallabTone::adjusterChanged(Adjuster* a, double newval) listener->panelChanged(Evlocallabgammasktm, gammasktm->getTextValue() + spName); } else if (a == slomasktm) { listener->panelChanged(Evlocallabslomasktm, slomasktm->getTextValue() + spName); + } else if (a == recothrest) { + listener->panelChanged(Evlocallabrecothrest, recothrest->getTextValue() + spName); + } else if (a == lowthrest) { + listener->panelChanged(Evlocallablowthrest, lowthrest->getTextValue() + spName); + } else if (a == higthrest) { + listener->panelChanged(Evlocallabhigthrest, higthrest->getTextValue() + spName); + } else if (a == decayt) { + listener->panelChanged(Evlocallabdecayt, decayt->getTextValue() + spName); } } } @@ -555,13 +612,17 @@ void LocallabTone::convertParamToSimple() showmasktmMethod->set_active(0); enatmMask->set_active(defSpot.enatmMask); enatmMaskaft->set_active(defSpot.enatmMaskaft); - CCmasktmshape->setCurve(defSpot.CCmasktmcurve); - LLmasktmshape->setCurve(defSpot.LLmasktmcurve); - HHmasktmshape->setCurve(defSpot.HHmasktmcurve); - blendmasktm->setValue((double)defSpot.blendmasktm); - radmasktm->setValue(defSpot.radmasktm); - chromasktm->setValue(defSpot.chromasktm); - Lmasktmshape->setCurve(defSpot.Lmasktmcurve); +// CCmasktmshape->setCurve(defSpot.CCmasktmcurve); +// LLmasktmshape->setCurve(defSpot.LLmasktmcurve); +// HHmasktmshape->setCurve(defSpot.HHmasktmcurve); +// blendmasktm->setValue((double)defSpot.blendmasktm); +// radmasktm->setValue(defSpot.radmasktm); +// chromasktm->setValue(defSpot.chromasktm); +// Lmasktmshape->setCurve(defSpot.Lmasktmcurve); + recothrest->setValue(defSpot.recothrest); + lowthrest->setValue(defSpot.lowthrest); + higthrest->setValue(defSpot.higthrest); + decayt->setValue(defSpot.decayt); // Enable all listeners enableListener(); @@ -576,6 +637,10 @@ void LocallabTone::updateGUIToMode(const modeType new_type) satur->hide(); rewei->hide(); expmasktm->hide(); + exprecovt->hide(); + decayt->hide(); + maskusablet->hide(); + maskunusablet->hide(); break; @@ -589,6 +654,16 @@ void LocallabTone::updateGUIToMode(const modeType new_type) slomasktm->hide(); // Specific Simple mode widgets are shown in Normal mode expmasktm->show(); + exprecovt->show(); + decayt->hide(); + if (enatmMask->get_active()) { + maskusablet->show(); + maskunusablet->hide(); + + } else { + maskusablet->hide(); + maskunusablet->show(); + } break; @@ -601,6 +676,16 @@ void LocallabTone::updateGUIToMode(const modeType new_type) lapmasktm->show(); gammasktm->show(); slomasktm->show(); + exprecovt->show(); + decayt->show(); + if (enatmMask->get_active()) { + maskusablet->show(); + maskunusablet->hide(); + + } else { + maskusablet->hide(); + maskunusablet->show(); + } } } @@ -650,6 +735,14 @@ void LocallabTone::showmasktmMethodChanged() void LocallabTone::enatmMaskChanged() { + if (enatmMask->get_active()) { + maskusablet->show(); + maskunusablet->hide(); + } else { + maskusablet->hide(); + maskunusablet->show(); + } + if (isLocActivated && exp->getEnabled()) { if (listener) { if (enatmMask->get_active()) { @@ -686,7 +779,7 @@ LocallabRetinex::LocallabRetinex(): dehaFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_DEHAFRA")))), dehaz(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DEHAZ"), -100, 100, 1, 0))), depth(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DEPTH"), 0, 100, 1, 25))), - lumonly(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_LUMONLY")))), + dehazeSaturation(Gtk::manage(new Adjuster(M("TP_DEHAZE_SATURATION"), 0, 100, 1, 50))), retiFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_RETIFRA")))), str(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STR"), 0., 100., 0.2, 0.))), loglin(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_LOGLIN")))), @@ -713,14 +806,22 @@ LocallabRetinex::LocallabRetinex(): transLabels2(Gtk::manage(new Gtk::Label("---"))), LocalcurveEditorgainT(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_TRANSMISSIONGAIN"))), cTgainshape(static_cast(LocalcurveEditorgainT->addCurve(CT_Flat, "", nullptr, false, false))), + exprecovr(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_DENOI2_EXP")))), + maskusabler(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUSABLE")))), + maskunusabler(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUNUSABLE")))), + recothresr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKRECOTHRES"), 1., 2., 0.01, 1.))), + lowthresr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHRLOW2"), 1., 80., 0.5, 12.))), + higthresr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHR2"), 20., 99., 0.5, 85.))), + decayr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKDDECAY"), 0.5, 4., 0.1, 2.))), expmaskreti(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_SHOWR")))), showmaskretiMethod(Gtk::manage(new MyComboBoxText())), enaretiMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), enaretiMasktmap(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_TM_MASK")))), - maskretiCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), - CCmaskretishape(static_cast(maskretiCurveEditorG->addCurve(CT_Flat, "C(C)", nullptr, false, false))), - LLmaskretishape(static_cast(maskretiCurveEditorG->addCurve(CT_Flat, "L(L)", nullptr, false, false))), - HHmaskretishape(static_cast(maskretiCurveEditorG->addCurve(CT_Flat, "LC(H)", nullptr, false, true))), + // maskretiCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), + maskretiCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, "", 1)), + CCmaskretishape(static_cast(maskretiCurveEditorG->addCurve(CT_Flat, "C", nullptr, false, false))), + LLmaskretishape(static_cast(maskretiCurveEditorG->addCurve(CT_Flat, "L", nullptr, false, false))), + HHmaskretishape(static_cast(maskretiCurveEditorG->addCurve(CT_Flat, "LC(h)", nullptr, false, true))), blendmaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), radmaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 10.))), lapmaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), @@ -731,15 +832,16 @@ LocallabRetinex::LocallabRetinex(): Lmaskretishape(static_cast(mask2retiCurveEditorG->addCurve(CT_Diagonal, "L(L)"))), inversret(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))) { + set_orientation(Gtk::ORIENTATION_VERTICAL); + const LocallabParams::LocallabSpot defSpot; // Parameter Retinex specific widgets dehaz->setAdjusterListener(this); + dehazeSaturation->setAdjusterListener(this); depth->setAdjusterListener(this); - lumonlyConn = lumonly->signal_toggled().connect(sigc::mem_fun(*this, &LocallabRetinex::lumonlyChanged)); - retiFrame->set_label_align(0.025, 0.5); str->setAdjusterListener(this); @@ -804,6 +906,12 @@ LocallabRetinex::LocallabRetinex(): LocalcurveEditorgainT->curveListComplete(); + recothresr->setAdjusterListener(this); + lowthresr->setAdjusterListener(this); + higthresr->setAdjusterListener(this); + decayr->setAdjusterListener(this); + setExpandAlignProperties(exprecovr, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + setExpandAlignProperties(expmaskreti, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); showmaskretiMethod->append(M("TP_LOCALLAB_SHOWMNONE")); @@ -865,7 +973,7 @@ LocallabRetinex::LocallabRetinex(): ToolParamBlock* const dehaBox = Gtk::manage(new ToolParamBlock()); dehaBox->pack_start(*dehaz); dehaBox->pack_start(*depth); - dehaBox->pack_start(*lumonly); + dehaBox->pack_start(*dehazeSaturation); dehaFrame->add(*dehaBox); auxBox->add(*dehaFrame); ToolParamBlock* const deharetiBox = Gtk::manage(new ToolParamBlock()); @@ -887,7 +995,7 @@ LocallabRetinex::LocallabRetinex(): retiBox->pack_start(*limd); retiBox->pack_start(*offs); ToolParamBlock* const toolretiBox = Gtk::manage(new ToolParamBlock()); - toolretiBox->pack_start(*chrrt); + // toolretiBox->pack_start(*chrrt); toolretiBox->pack_start(*darkness); toolretiBox->pack_start(*lightnessreti); toolretiBox->pack_start(*cliptm); @@ -899,6 +1007,16 @@ LocallabRetinex::LocallabRetinex(): toolretiBox->pack_start(*LocalcurveEditorgainT, Gtk::PACK_SHRINK, 4); expretitools->add(*toolretiBox, false); retiBox->pack_start(*expretitools, false, false); + ToolParamBlock* const reBox3 = Gtk::manage(new ToolParamBlock()); + reBox3->pack_start(*maskusabler, Gtk::PACK_SHRINK, 0); + reBox3->pack_start(*maskunusabler, Gtk::PACK_SHRINK, 0); + reBox3->pack_start(*recothresr); + reBox3->pack_start(*lowthresr); + reBox3->pack_start(*higthresr); + reBox3->pack_start(*decayr); + // colBox3->pack_start(*invmaskc); + exprecovr->add(*reBox3, false); + ToolParamBlock* const maskretiBox = Gtk::manage(new ToolParamBlock()); maskretiBox->pack_start(*showmaskretiMethod, Gtk::PACK_SHRINK, 4); maskretiBox->pack_start(*enaretiMask, Gtk::PACK_SHRINK, 0); @@ -912,6 +1030,7 @@ LocallabRetinex::LocallabRetinex(): maskretiBox->pack_start(*slomaskreti, Gtk::PACK_SHRINK, 0); maskretiBox->pack_start(*mask2retiCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor expmaskreti->add(*maskretiBox, false); + retiBox->pack_start(*exprecovr, false, false); retiBox->pack_start(*expmaskreti, false, false); // retiBox->pack_start(*inversret); retitoolFrame->add(*retiBox); @@ -967,7 +1086,7 @@ void LocallabRetinex::resetMaskView() showmaskretiMethodConn.block(false); } -void LocallabRetinex::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) +void LocallabRetinex::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) { retiMask = showmaskretiMethod->get_active_row_number(); } @@ -978,6 +1097,7 @@ void LocallabRetinex::updateAdviceTooltips(const bool showTooltips) dehaFrame->set_tooltip_text(M("TP_LOCALLAB_DEHAZFRAME_TOOLTIP")); dehaz->set_tooltip_text(M("TP_LOCALLAB_DEHAZ_TOOLTIP")); retiFrame->set_tooltip_text(M("TP_LOCALLAB_RETIFRAME_TOOLTIP")); + exprecovr->set_tooltip_markup(M("TP_LOCALLAB_MASKRESRETI_TOOLTIP")); loglin->set_tooltip_text(M("TP_LOCALLAB_RETI_LOGLIN_TOOLTIP")); sensih->set_tooltip_text(M("TP_LOCALLAB_SENSI_TOOLTIP")); fftwreti->set_tooltip_text(M("TP_LOCALLAB_LC_FFTW_TOOLTIP")); @@ -1010,6 +1130,9 @@ void LocallabRetinex::updateAdviceTooltips(const bool showTooltips) chromaskreti->set_tooltip_text(M("TP_LOCALLAB_CHROMASK_TOOLTIP")); slomaskreti->set_tooltip_text(M("TP_LOCALLAB_SLOMASK_TOOLTIP")); lapmaskreti->set_tooltip_text(M("TP_LOCALLAB_LAPRAD1_TOOLTIP")); + decayr->set_tooltip_text(M("TP_LOCALLAB_MASKDECAY_TOOLTIP")); + lowthresr->set_tooltip_text(M("TP_LOCALLAB_MASKLOWTHRESRETI_TOOLTIP")); + higthresr->set_tooltip_text(M("TP_LOCALLAB_MASKHIGTHRESRETI_TOOLTIP")); } else { dehaFrame->set_tooltip_text(""); @@ -1047,11 +1170,16 @@ void LocallabRetinex::updateAdviceTooltips(const bool showTooltips) chromaskreti->set_tooltip_text(""); slomaskreti->set_tooltip_text(""); lapmaskreti->set_tooltip_text(""); + exprecovr->set_tooltip_markup(""); + decayr->set_tooltip_text(""); + lowthresr->set_tooltip_text(""); + higthresr->set_tooltip_text(""); } } void LocallabRetinex::setDefaultExpanderVisibility() { + exprecovr->set_expanded(false); expretitools->set_expanded(false); expmaskreti->set_expanded(false); } @@ -1060,7 +1188,6 @@ void LocallabRetinex::disableListener() { LocallabTool::disableListener(); - lumonlyConn.block(true); loglinConn.block(true); retinexMethodConn.block(true); fftwretiConn.block(true); @@ -1075,7 +1202,6 @@ void LocallabRetinex::enableListener() { LocallabTool::enableListener(); - lumonlyConn.block(false); loglinConn.block(false); retinexMethodConn.block(false); fftwretiConn.block(false); @@ -1105,7 +1231,7 @@ void LocallabRetinex::read(const rtengine::procparams::ProcParams* pp, const Par dehaz->setValue((double)spot.dehaz); depth->setValue((double)spot.depth); - lumonly->set_active(spot.lumonly); + dehazeSaturation->setValue((double)spot.dehazeSaturation); str->setValue(spot.str); loglin->set_active(spot.loglin); sensih->setValue((double)spot.sensih); @@ -1125,7 +1251,8 @@ void LocallabRetinex::read(const rtengine::procparams::ProcParams* pp, const Par scalereti->setValue(spot.scalereti); limd->setValue(spot.limd); offs->setValue(spot.offs); - chrrt->setValue(spot.chrrt); + chrrt->setValue(0.); + // chrrt->setValue(spot.chrrt); darkness->setValue(spot.darkness); lightnessreti->setValue(spot.lightnessreti); cliptm->setValue(spot.cliptm); @@ -1145,6 +1272,10 @@ void LocallabRetinex::read(const rtengine::procparams::ProcParams* pp, const Par slomaskreti->setValue(spot.slomaskreti); Lmaskretishape->setCurve(spot.Lmaskreticurve); inversret->set_active(spot.inversret); + recothresr->setValue((double)spot.recothresr); + lowthresr->setValue((double)spot.lowthresr); + higthresr->setValue((double)spot.higthresr); + decayr->setValue((double)spot.decayr); } // Enable all listeners @@ -1178,7 +1309,7 @@ void LocallabRetinex::write(rtengine::procparams::ProcParams* pp, ParamsEdited* spot.dehaz = dehaz->getIntValue(); spot.depth = depth->getIntValue(); - spot.lumonly = lumonly->get_active(); + spot.dehazeSaturation = dehazeSaturation->getIntValue(); spot.str = str->getValue(); spot.loglin = loglin->get_active(); spot.sensih = sensih->getIntValue(); @@ -1218,6 +1349,10 @@ void LocallabRetinex::write(rtengine::procparams::ProcParams* pp, ParamsEdited* spot.slomaskreti = slomaskreti->getValue(); spot.Lmaskreticurve = Lmaskretishape->getCurve(); spot.inversret = inversret->get_active(); + spot.recothresr = recothresr->getValue(); + spot.lowthresr = lowthresr->getValue(); + spot.higthresr = higthresr->getValue(); + spot.decayr = decayr->getValue(); } // Note: No need to manage pedited as batch mode is deactivated for Locallab @@ -1232,6 +1367,7 @@ void LocallabRetinex::setDefaults(const rtengine::procparams::ProcParams* defPar // Set default values for adjuster widgets dehaz->setDefault((double)defSpot.dehaz); + dehazeSaturation->setDefault((double)defSpot.dehazeSaturation); depth->setDefault((double)defSpot.depth); str->setDefault(defSpot.str); sensih->setDefault((double)defSpot.sensih); @@ -1251,6 +1387,10 @@ void LocallabRetinex::setDefaults(const rtengine::procparams::ProcParams* defPar chromaskreti->setDefault(defSpot.chromaskreti); gammaskreti->setDefault(defSpot.gammaskreti); slomaskreti->setDefault(defSpot.slomaskreti); + recothresr->setDefault((double)defSpot.recothresr); + lowthresr->setDefault((double)defSpot.lowthresr); + higthresr->setDefault((double)defSpot.higthresr); + decayr->setDefault((double)defSpot.decayr); } // Note: No need to manage pedited as batch mode is deactivated for Locallab @@ -1276,6 +1416,13 @@ void LocallabRetinex::adjusterChanged(Adjuster* a, double newval) } } + if (a == dehazeSaturation) { + if (listener) { + listener->panelChanged(EvlocallabdehazeSaturation, + dehazeSaturation->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + if (a == depth) { if (listener) { listener->panelChanged(Evlocallabdepth, @@ -1367,6 +1514,35 @@ void LocallabRetinex::adjusterChanged(Adjuster* a, double newval) } } + if (a == recothresr) { + + if (listener) { + listener->panelChanged(Evlocallabrecothresr, + recothresr->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == lowthresr) { + if (listener) { + listener->panelChanged(Evlocallablowthresr, + lowthresr->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == higthresr) { + if (listener) { + listener->panelChanged(Evlocallabhigthresr, + higthresr->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == decayr) { + if (listener) { + listener->panelChanged(Evlocallabdecayr, + decayr->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + if (a == blendmaskreti) { if (listener) { listener->panelChanged(Evlocallabblendmaskreti, @@ -1520,6 +1696,10 @@ void LocallabRetinex::convertParamToNormal() slomaskreti->setValue(defSpot.slomaskreti); Lmaskretishape->setCurve(defSpot.Lmaskreticurve); inversret->set_active(defSpot.inversret); + recothresr->setValue(defSpot.recothresr); + lowthresr->setValue(defSpot.lowthresr); + higthresr->setValue(defSpot.higthresr); + decayr->setValue(defSpot.decayr); // Enable all listeners enableListener(); @@ -1540,11 +1720,12 @@ void LocallabRetinex::convertParamToSimple() // Disable all listeners disableListener(); - // Set hidden specific GUI widgets in Simple mode to default spot values - lumonly->set_active(defSpot.lumonly); - - // Enable all listeners + recothresr->setValue(defSpot.recothresr); + lowthresr->setValue(defSpot.lowthresr); + higthresr->setValue(defSpot.higthresr); + decayr->setValue(defSpot.decayr); enableListener(); + } void LocallabRetinex::updateGUIToMode(const modeType new_type) @@ -1552,9 +1733,12 @@ void LocallabRetinex::updateGUIToMode(const modeType new_type) switch (new_type) { case Simple: // Expert and Normal mode widgets are hidden in Simple mode - lumonly->hide(); retiFrame->hide(); retitoolFrame->hide(); + exprecovr->hide(); + decayr->hide(); + maskusabler->hide(); + maskunusabler->hide(); break; @@ -1563,15 +1747,27 @@ void LocallabRetinex::updateGUIToMode(const modeType new_type) retiFrame->hide(); retitoolFrame->hide(); // Specific Simple mode widgets are shown in Normal mode - lumonly->show(); + exprecovr->hide(); + decayr->hide(); + maskusabler->hide(); + maskunusabler->hide(); break; case Expert: // Show widgets hidden in Normal and Simple mode - lumonly->show(); retiFrame->show(); retitoolFrame->show(); + exprecovr->show(); + decayr->show(); + if (enaretiMask->get_active()) { + maskusabler->show(); + maskunusabler->hide(); + + } else { + maskusabler->hide(); + maskunusabler->show(); + } } } @@ -1592,21 +1788,6 @@ void LocallabRetinex::updateMaskBackground(const double normChromar, const doubl ); } -void LocallabRetinex::lumonlyChanged() -{ - if (isLocActivated && exp->getEnabled()) { - if (listener) { - if (lumonly->get_active()) { - listener->panelChanged(Evlocallablumonly, - M("GENERAL_ENABLED") + " (" + escapeHtmlChars(spotName) + ")"); - } else { - listener->panelChanged(Evlocallablumonly, - M("GENERAL_DISABLED") + " (" + escapeHtmlChars(spotName) + ")"); - } - } - } -} - void LocallabRetinex::loglinChanged() { if (isLocActivated && exp->getEnabled()) { @@ -1676,6 +1857,15 @@ void LocallabRetinex::showmaskretiMethodChanged() void LocallabRetinex::enaretiMaskChanged() { + if (enaretiMask->get_active()) { + maskusabler->show(); + maskunusabler->hide(); + + } else { + maskusabler->hide(); + maskunusabler->show(); + } + if (isLocActivated && exp->getEnabled()) { if (listener) { if (enaretiMask->get_active()) { @@ -1785,6 +1975,8 @@ LocallabSharp::LocallabSharp(): sharFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_SHARFRAME")))), showmasksharMethod(Gtk::manage(new MyComboBoxText())) { + set_orientation(Gtk::ORIENTATION_VERTICAL); + // Parameter Sharpening specific widgets sharcontrast->setAdjusterListener(this); @@ -1803,20 +1995,21 @@ LocallabSharp::LocallabSharp(): inversshaConn = inverssha->signal_toggled().connect(sigc::mem_fun(*this, &LocallabSharp::inversshaChanged)); showmasksharMethod->append(M("TP_LOCALLAB_SHOWMNONE")); - showmasksharMethod->append(M("TP_LOCALLAB_SHOWMODIF")); + showmasksharMethod->append(M("TP_LOCALLAB_SHOWMODIF2")); showmasksharMethod->append(M("TP_LOCALLAB_SHOWREF")); showmasksharMethod->set_active(0); showmasksharMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); showmasksharMethodConn = showmasksharMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabSharp::showmasksharMethodChanged)); // Add Sharpening specific widgets to GUI + pack_start(*sensisha); pack_start(*sharcontrast); pack_start(*sharblur); pack_start(*sharradius); pack_start(*sharamount); pack_start(*shardamping); pack_start(*shariter); - pack_start(*sensisha); +// pack_start(*sensisha); pack_start(*inverssha); sharFrame->set_label_align(0.025, 0.5); ToolParamBlock* const sharfBox = Gtk::manage(new ToolParamBlock()); @@ -1837,7 +2030,7 @@ void LocallabSharp::resetMaskView() showmasksharMethodConn.block(false); } -void LocallabSharp::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) +void LocallabSharp::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) { sharMask = showmasksharMethod->get_active_row_number(); } @@ -2132,7 +2325,7 @@ LocallabContrast::LocallabContrast(): wavshape(static_cast(LocalcurveEditorwav->addCurve(CT_Flat, "", nullptr, false, false))), csThreshold(Gtk::manage(new ThresholdAdjuster(M("TP_LOCALLAB_CSTHRESHOLD"), 0, 9, 0, 0, 6, 6, 0, false))), levelwav(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LEVELWAV"), 1, 9, 1, 4))), - expresidpyr(Gtk::manage(new MyExpander(false, Gtk::manage(new Gtk::HBox())))), + expresidpyr(Gtk::manage(new MyExpander(false, Gtk::manage(new Gtk::Box())))), residcont(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RESIDCONT"), -100, 100, 1, 0))), residchro(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RESIDCHRO"), -100., 100., 1., 0.))), residsha(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RESIDSHA"), -100., 100., 1., 0.))), @@ -2145,7 +2338,7 @@ LocallabContrast::LocallabContrast(): claricres(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARICRES"), -20., 100., 0.5, 0.))), clarisoft(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.5, 1.))), origlc(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ORIGLC")))), - expcontrastpyr(Gtk::manage(new MyExpander(false, Gtk::manage(new Gtk::HBox())))), + expcontrastpyr(Gtk::manage(new MyExpander(false, Gtk::manage(new Gtk::Box())))), wavgradl(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_GRALWFRA")))), sigmalc2(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SIGMAWAV"), 0.2, 2.5, 0.01, 1.))), strwav(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADSTR"), -4.0, 4.0, 0.05, 0.))), @@ -2174,7 +2367,7 @@ LocallabContrast::LocallabContrast(): wavshapelev(static_cast(LocalcurveEditorwavlev->addCurve(CT_Flat, "", nullptr, false, false))), residblur(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RESIDBLUR"), 0., 100., 0.5, 0.))), blurlc(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_BLURLC")))), - expcontrastpyr2(Gtk::manage(new MyExpander(false, Gtk::manage(new Gtk::HBox())))), + expcontrastpyr2(Gtk::manage(new MyExpander(false, Gtk::manage(new Gtk::Box())))), wavcont(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_CONTFRA")))), sigma(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SIGMAWAV"), 0.2, 2.5, 0.01, 1.))), offset(Gtk::manage(new Adjuster(M("TP_LOCALLAB_OFFSETWAV"), 0.33, 1.66, 0.01, 1., Gtk::manage(new RTImage("circle-black-small.png")), Gtk::manage(new RTImage("circle-white-small.png"))))), @@ -2194,19 +2387,30 @@ LocallabContrast::LocallabContrast(): wavshapecomp(static_cast(LocalcurveEditorwavcomp->addCurve(CT_Flat, "", nullptr, false, false))), fatres(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATRES"), 0., 100., 1., 0.))), fftwlc(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_FFTW")))), + exprecovw(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_DENOI2_EXP")))), + maskusablew(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUSABLE")))), + maskunusablew(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUNUSABLE")))), + recothresw(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKRECOTHRES"), 1., 2., 0.01, 1.))), + lowthresw(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHRLOW"), 1., 80., 0.5, 12.))), + higthresw(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHR"), 20., 99., 0.5, 85.))), + decayw(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKDDECAY"), 0.5, 4., 0.1, 2.))), + expmasklc(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_SHOWLC")))), showmasklcMethod(Gtk::manage(new MyComboBoxText())), enalcMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), - masklcCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), - CCmasklcshape(static_cast(masklcCurveEditorG->addCurve(CT_Flat, "C(C)", nullptr, false, false))), - LLmasklcshape(static_cast(masklcCurveEditorG->addCurve(CT_Flat, "L(L)", nullptr, false, false))), - HHmasklcshape(static_cast(masklcCurveEditorG->addCurve(CT_Flat, "LC(H)", nullptr, false, true))), +// masklcCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), + masklcCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, "", 1)), + CCmasklcshape(static_cast(masklcCurveEditorG->addCurve(CT_Flat, "C", nullptr, false, false))), + LLmasklcshape(static_cast(masklcCurveEditorG->addCurve(CT_Flat, "L", nullptr, false, false))), + HHmasklcshape(static_cast(masklcCurveEditorG->addCurve(CT_Flat, "LC(h)", nullptr, false, true))), blendmasklc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), radmasklc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), chromasklc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), mask2lcCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK2"))), Lmasklcshape(static_cast(mask2lcCurveEditorG->addCurve(CT_Diagonal, "L(L)"))) { + set_orientation(Gtk::ORIENTATION_VERTICAL); + const LocallabParams::LocallabSpot defSpot; // Parameter Local contrast specific widgets @@ -2239,7 +2443,7 @@ LocallabContrast::LocallabContrast(): levelwav->setAdjusterListener(this); - Gtk::HBox* const LresTitleHBox = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const LresTitleHBox = Gtk::manage(new Gtk::Box()); Gtk::Label* const LresLabel = Gtk::manage(new Gtk::Label()); LresLabel->set_markup(Glib::ustring("") + escapeHtmlChars(M("TP_LOCALLAB_LOC_RESIDPYR")) + Glib::ustring("")); LresLabel->set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_CENTER); @@ -2272,14 +2476,27 @@ LocallabContrast::LocallabContrast(): origlcConn = origlc->signal_toggled().connect(sigc::mem_fun(*this, &LocallabContrast::origlcChanged)); - Gtk::HBox* const LCTitleHBox = Gtk::manage(new Gtk::HBox()); + Gtk::Box *TittleVBox; + TittleVBox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + TittleVBox->set_spacing(2); + + Gtk::Box* const LCTitleHBox = Gtk::manage(new Gtk::Box()); + Gtk::Box* const LCTitleHBox11 = Gtk::manage(new Gtk::Box()); Gtk::Label* const LCLabel = Gtk::manage(new Gtk::Label()); - LCLabel->set_markup(Glib::ustring("") + escapeHtmlChars(M("TP_LOCALLAB_LOC_CONTRASTPYR")) + Glib::ustring("") + escapeHtmlChars(M("TP_LOCALLAB_LOC_CONTRASTPYRLAB"))); + Gtk::Label* const LCLabel11 = Gtk::manage(new Gtk::Label()); + + LCLabel->set_markup(Glib::ustring("") + escapeHtmlChars(M("TP_LOCALLAB_LOC_CONTRASTPYR")) + Glib::ustring("")); + LCLabel11->set_markup(escapeHtmlChars(M("TP_LOCALLAB_LOC_CONTRASTPYRLAB"))); LCLabel->set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + LCLabel11->set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_CENTER); LCTitleHBox->pack_start(*LCLabel, Gtk::PACK_EXPAND_WIDGET, 0); - expcontrastpyr->setLabel(LCTitleHBox); + LCTitleHBox11->pack_start(*LCLabel11, Gtk::PACK_EXPAND_WIDGET, 0); + TittleVBox->pack_start(*LCTitleHBox, Gtk::PACK_SHRINK); + TittleVBox->pack_start(*LCTitleHBox11, Gtk::PACK_SHRINK); + expcontrastpyr->setLabel(TittleVBox); setExpandAlignProperties(expcontrastpyr, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + wavgradlConn = wavgradl->signal_toggled().connect(sigc::mem_fun(*this, &LocallabContrast::wavgradlChanged)); sigmalc2->setAdjusterListener(this); @@ -2349,12 +2566,25 @@ LocallabContrast::LocallabContrast(): blurlcConn = blurlc->signal_toggled().connect(sigc::mem_fun(*this, &LocallabContrast::blurlcChanged)); - Gtk::HBox* const LCTitleHBox2 = Gtk::manage(new Gtk::HBox()); + Gtk::Box *TittleVBox2; + TittleVBox2 = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + TittleVBox2->set_spacing(2); + + Gtk::Box* const LCTitleHBox2 = Gtk::manage(new Gtk::Box()); + Gtk::Box* const LCTitleHBox22 = Gtk::manage(new Gtk::Box()); Gtk::Label* const LCLabel2 = Gtk::manage(new Gtk::Label()); - LCLabel2->set_markup(Glib::ustring("") + escapeHtmlChars(M("TP_LOCALLAB_LOC_CONTRASTPYR2")) + Glib::ustring("") + escapeHtmlChars(M("TP_LOCALLAB_LOC_CONTRASTPYR2LAB"))); + Gtk::Label* const LCLabel22 = Gtk::manage(new Gtk::Label()); + + LCLabel2->set_markup(Glib::ustring("") + escapeHtmlChars(M("TP_LOCALLAB_LOC_CONTRASTPYR2")) + Glib::ustring("")); + LCLabel22->set_markup(escapeHtmlChars(M("TP_LOCALLAB_LOC_CONTRASTPYR2LAB"))); LCLabel2->set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + LCLabel22->set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_CENTER); LCTitleHBox2->pack_start(*LCLabel2, Gtk::PACK_EXPAND_WIDGET, 0); - expcontrastpyr2->setLabel(LCTitleHBox2); + LCTitleHBox22->pack_start(*LCLabel22, Gtk::PACK_EXPAND_WIDGET, 0); + TittleVBox2->pack_start(*LCTitleHBox2, Gtk::PACK_SHRINK); + TittleVBox2->pack_start(*LCTitleHBox22, Gtk::PACK_SHRINK); + expcontrastpyr2->setLabel(TittleVBox2); + setExpandAlignProperties(expcontrastpyr2, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); wavcontConn = wavcont->signal_toggled().connect(sigc::mem_fun(*this, &LocallabContrast::wavcontChanged)); @@ -2406,6 +2636,13 @@ LocallabContrast::LocallabContrast(): fftwlcConn = fftwlc->signal_toggled().connect(sigc::mem_fun(*this, &LocallabContrast::fftwlcChanged)); + recothresw->setAdjusterListener(this); + lowthresw->setAdjusterListener(this); + higthresw->setAdjusterListener(this); + decayw->setAdjusterListener(this); + setExpandAlignProperties(exprecovw, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + + setExpandAlignProperties(expmasklc, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); showmasklcMethod->append(M("TP_LOCALLAB_SHOWMNONE")); @@ -2451,15 +2688,17 @@ LocallabContrast::LocallabContrast(): mask2lcCurveEditorG->curveListComplete(); // Add Local contrast specific widgets to GUI + pack_start(*sensilc); pack_start(*localcontMethod); pack_start(*lcradius); pack_start(*lcamount); pack_start(*lcdarkness); pack_start(*lclightness); + pack_start(*csThreshold); ToolParamBlock* const coBox = Gtk::manage(new ToolParamBlock()); coBox->pack_start(*sigmalc); coBox->pack_start(*LocalcurveEditorwav, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor - coBox->pack_start(*csThreshold); + // coBox->pack_start(*csThreshold); contFrame->add(*coBox); pack_start(*contFrame); // pack_start(*levelwav); @@ -2477,8 +2716,8 @@ LocallabContrast::LocallabContrast(): resiBox->pack_start(*shresFrame); expresidpyr->add(*resiBox, false); pack_start(*expresidpyr); - pack_start(*sensilc); - Gtk::HSeparator* const separatorcontr = Gtk::manage(new Gtk::HSeparator()); +// pack_start(*sensilc); + Gtk::Separator* const separatorcontr = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); pack_start(*separatorcontr); ToolParamBlock* const clariBox = Gtk::manage(new ToolParamBlock()); clariBox->pack_start(*clarilres); @@ -2508,20 +2747,20 @@ LocallabContrast::LocallabContrast(): edgsBox->pack_start(*waveshow); edgsBoxshow->pack_start(*radiusw); edgsBoxshow->pack_start(*detailw); - Gtk::HBox* const edbox = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const edbox = Gtk::manage(new Gtk::Box()); Gtk::Label* const labmedgr = Gtk::manage(new Gtk::Label(M("TP_WAVELET_MEDGREINF") + ":")); edbox->pack_start(*labmedgr, Gtk::PACK_SHRINK, 1); edbox->pack_start(*localedgMethod); edgsBoxshow->pack_start(*edbox); - Gtk::HSeparator* const separatoredg2 = Gtk::manage(new Gtk::HSeparator()); + Gtk::Separator* const separatoredg2 = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); edgsBoxshow->pack_start(*separatoredg2); edgsBoxshow->pack_start(*tloww); edgsBoxshow->pack_start(*thigw); - Gtk::HSeparator* const separatoredg = Gtk::manage(new Gtk::HSeparator()); + Gtk::Separator* const separatoredg = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); edgsBoxshow->pack_start(*separatoredg); edgsBoxshow->pack_start(*edgw); edgsBoxshow->pack_start(*basew); - Gtk::HBox* const ctboxNP = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const ctboxNP = Gtk::manage(new Gtk::Box()); Gtk::Label* const labmNP = Gtk::manage(new Gtk::Label(M("TP_WAVELET_NPTYPE") + ":")); ctboxNP->pack_start(*labmNP, Gtk::PACK_SHRINK, 1); ctboxNP->pack_start(*localneiMethod); @@ -2532,13 +2771,13 @@ LocallabContrast::LocallabContrast(): Gtk::Frame* const blurlevelFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_BLURLEVELFRA"))); blurlevelFrame->set_label_align(0.025, 0.5); blurlevelFrame->set_label_widget(*wavblur); - Gtk::VBox* const blurlevcontBox = Gtk::manage(new Gtk::VBox()); + Gtk::Box* const blurlevcontBox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); blurlevcontBox->set_spacing(2); blurlevcontBox->pack_start(*levelblur); blurlevcontBox->pack_start(*sigmabl); blurlevcontBox->pack_start(*chromablu); blurlevcontBox->pack_start(*LocalcurveEditorwavlev, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor - Gtk::HSeparator* const separatorblu = Gtk::manage(new Gtk::HSeparator()); + Gtk::Separator* const separatorblu = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); blurlevcontBox->pack_start(*separatorblu); blurlevcontBox->pack_start(*residblur); blurlevcontBox->pack_start(*blurlc); @@ -2550,7 +2789,7 @@ LocallabContrast::LocallabContrast(): Gtk::Frame* const contFrame2 = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_CONTFRA"))); contFrame2->set_label_align(0.025, 0.5); contFrame2->set_label_widget(*wavcont); - Gtk::VBox* const contlevBox = Gtk::manage(new Gtk::VBox()); + Gtk::Box* const contlevBox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); contlevBox->set_spacing(2); contlevBox->pack_start(*sigma); contlevBox->pack_start(*offset); @@ -2561,7 +2800,7 @@ LocallabContrast::LocallabContrast(): Gtk::Frame* const compreFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_COMPREFRA"))); compreFrame->set_label_align(0.025, 0.5); compreFrame->set_label_widget(*wavcompre); - Gtk::VBox* const compreBox = Gtk::manage(new Gtk::VBox()); + Gtk::Box* const compreBox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); compreBox->set_spacing(2); compreBox->pack_start(*LocalcurveEditorwavcompre, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor compreBox->pack_start(*sigmadr); @@ -2572,12 +2811,12 @@ LocallabContrast::LocallabContrast(): Gtk::Frame* const compFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_COMPFRA"))); compFrame->set_label_align(0.025, 0.5); compFrame->set_label_widget(*wavcomp); - Gtk::VBox* const compBox = Gtk::manage(new Gtk::VBox()); + Gtk::Box* const compBox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); compBox->set_spacing(2); compBox->pack_start(*sigmadc); compBox->pack_start(*deltad); compBox->pack_start(*LocalcurveEditorwavcomp, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor - // Gtk::HSeparator* const separatorcomp = Gtk::manage(new Gtk::HSeparator()); + // Gtk::Separator* const separatorcomp = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); // compBox->pack_start(*separatorcomp); // compBox->pack_start(*fatres); compFrame->add(*compBox); @@ -2585,6 +2824,17 @@ LocallabContrast::LocallabContrast(): expcontrastpyr2->add(*blurcontBox2, false); pack_start(*expcontrastpyr2); pack_start(*fftwlc); + ToolParamBlock* const wwBox3 = Gtk::manage(new ToolParamBlock()); + wwBox3->pack_start(*maskusablew, Gtk::PACK_SHRINK, 0); + wwBox3->pack_start(*maskunusablew, Gtk::PACK_SHRINK, 0); + wwBox3->pack_start(*recothresw); + wwBox3->pack_start(*lowthresw); + wwBox3->pack_start(*higthresw); + wwBox3->pack_start(*decayw); + // colBox3->pack_start(*invmaskc); + exprecovw->add(*wwBox3, false); + pack_start(*exprecovw, false, false); + ToolParamBlock* const masklcBox = Gtk::manage(new ToolParamBlock()); masklcBox->pack_start(*showmasklcMethod, Gtk::PACK_SHRINK, 4); masklcBox->pack_start(*enalcMask, Gtk::PACK_SHRINK, 0); @@ -2621,7 +2871,7 @@ void LocallabContrast::resetMaskView() showmasklcMethodConn.block(false); } -void LocallabContrast::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) +void LocallabContrast::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) { lcMask = showmasklcMethod->get_active_row_number(); } @@ -2635,6 +2885,7 @@ void LocallabContrast::updateAdviceTooltips(const bool showTooltips) levelwav->set_tooltip_markup(M("TP_LOCALLAB_LEVELWAV_TOOLTIP")); clariFrame->set_tooltip_markup(M("TP_LOCALLAB_CLARI_TOOLTIP")); clarisoft->set_tooltip_markup(M("TP_LOCALLAB_CLARISOFT_TOOLTIP")); + exprecovw->set_tooltip_markup(M("TP_LOCALLAB_MASKRESWAV_TOOLTIP")); wavshape->setTooltip(M("TP_LOCALLAB_WAT_WAVSHAPE_TOOLTIP")); clarilres->set_tooltip_text(M("TP_LOCALLAB_WAT_CLARIL_TOOLTIP")); @@ -2694,6 +2945,9 @@ void LocallabContrast::updateAdviceTooltips(const bool showTooltips) masklcCurveEditorG->set_tooltip_markup(M("TP_LOCALLAB_MASKCURVE_TOOLTIP")); chromasklc->set_tooltip_text(M("TP_LOCALLAB_CHROMASK_TOOLTIP")); sensilc->set_tooltip_text(M("TP_LOCALLAB_SENSI_TOOLTIP")); + decayw->set_tooltip_text(M("TP_LOCALLAB_MASKDECAY_TOOLTIP")); + lowthresw->set_tooltip_text(M("TP_LOCALLAB_MASKLOWTHRESWAV_TOOLTIP")); + higthresw->set_tooltip_text(M("TP_LOCALLAB_MASKHIGTHRESWAV_TOOLTIP")); } else { contFrame->set_tooltip_text(""); LocalcurveEditorwav->set_tooltip_markup(""); @@ -2758,6 +3012,10 @@ void LocallabContrast::updateAdviceTooltips(const bool showTooltips) wavshapecomp->setTooltip(""); threswav->set_tooltip_text(""); residcomp->set_tooltip_text(""); + exprecovw->set_tooltip_markup(""); + decayw->set_tooltip_text(""); + lowthresw->set_tooltip_text(""); + higthresw->set_tooltip_text(""); } } @@ -2768,6 +3026,7 @@ void LocallabContrast::setDefaultExpanderVisibility() expcontrastpyr->set_expanded(false); expcontrastpyr2->set_expanded(false); expmasklc->set_expanded(false); + exprecovw->set_expanded(false); } void LocallabContrast::disableListener() @@ -2922,6 +3181,10 @@ void LocallabContrast::read(const rtengine::procparams::ProcParams* pp, const Pa radmasklc->setValue(spot.radmasklc); chromasklc->setValue(spot.chromasklc); Lmasklcshape->setCurve(spot.Lmasklccurve); + recothresw->setValue((double)spot.recothresw); + lowthresw->setValue((double)spot.lowthresw); + higthresw->setValue((double)spot.higthresw); + decayw->setValue((double)spot.decayw); } // Enable all listeners @@ -3040,6 +3303,10 @@ void LocallabContrast::write(rtengine::procparams::ProcParams* pp, ParamsEdited* spot.radmasklc = radmasklc->getValue(); spot.chromasklc = chromasklc->getValue(); spot.Lmasklccurve = Lmasklcshape->getCurve(); + spot.recothresw = recothresw->getValue(); + spot.lowthresw = lowthresw->getValue(); + spot.higthresw = higthresw->getValue(); + spot.decayw = decayw->getValue(); } // Note: No need to manage pedited as batch mode is deactivated for Locallab @@ -3098,6 +3365,10 @@ void LocallabContrast::setDefaults(const rtengine::procparams::ProcParams* defPa blendmasklc->setDefault((double)defSpot.blendmasklc); radmasklc->setDefault(defSpot.radmasklc); chromasklc->setDefault(defSpot.chromasklc); + recothresw->setDefault((double)defSpot.recothresw); + lowthresw->setDefault((double)defSpot.lowthresw); + higthresw->setDefault((double)defSpot.higthresw); + decayw->setDefault((double)defSpot.decayw); } // Note: No need to manage pedited as batch mode is deactivated for Locallab @@ -3394,6 +3665,35 @@ void LocallabContrast::adjusterChanged(Adjuster* a, double newval) } } + if (a == recothresw) { + + if (listener) { + listener->panelChanged(Evlocallabrecothresw, + recothresw->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == lowthresw) { + if (listener) { + listener->panelChanged(Evlocallablowthresw, + lowthresw->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == higthresw) { + if (listener) { + listener->panelChanged(Evlocallabhigthresw, + higthresw->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == decayw) { + if (listener) { + listener->panelChanged(Evlocallabdecayw, + decayw->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + if (a == blendmasklc) { if (listener) { listener->panelChanged(Evlocallabblendmasklc, @@ -3583,6 +3883,7 @@ void LocallabContrast::convertParamToNormal() wavshapecomp->setCurve(defSpot.loccompwavcurve); fatres->setValue(defSpot.fatres); fftwlc->set_active(defSpot.fftwlc); + decayw->setValue(defSpot.decayw); // Enable all listeners enableListener(); @@ -3608,15 +3909,20 @@ void LocallabContrast::convertParamToSimple() showmasklcMethod->set_active(0); enalcMask->set_active(defSpot.enalcMask); - CCmasklcshape->setCurve(defSpot.CCmasklccurve); - LLmasklcshape->setCurve(defSpot.LLmasklccurve); - HHmasklcshape->setCurve(defSpot.HHmasklccurve); - blendmasklc->setValue((double)defSpot.blendmasklc); - radmasklc->setValue(defSpot.radmasklc); - chromasklc->setValue(defSpot.chromasklc); - Lmasklcshape->setCurve(defSpot.Lmasklccurve); +// CCmasklcshape->setCurve(defSpot.CCmasklccurve); +// LLmasklcshape->setCurve(defSpot.LLmasklccurve); +// HHmasklcshape->setCurve(defSpot.HHmasklccurve); +// blendmasklc->setValue((double)defSpot.blendmasklc); +// radmasklc->setValue(defSpot.radmasklc); +// chromasklc->setValue(defSpot.chromasklc); +// Lmasklcshape->setCurve(defSpot.Lmasklccurve); // Enable all listeners + recothresw->setValue(defSpot.recothresw); + lowthresw->setValue(defSpot.lowthresw); + higthresw->setValue(defSpot.higthresw); + decayw->setValue(defSpot.decayw); + enableListener(); // Update GUI based on converted widget parameters: @@ -3635,6 +3941,10 @@ void LocallabContrast::updateGUIToMode(const modeType new_type) expcontrastpyr2->hide(); fftwlc->hide(); expmasklc->hide(); + exprecovw->hide(); + decayw->hide(); + maskusablew->hide(); + maskunusablew->hide(); break; @@ -3647,6 +3957,16 @@ void LocallabContrast::updateGUIToMode(const modeType new_type) // Specific Simple mode widgets are shown in Normal mode localcontMethod->show(); expmasklc->show(); + exprecovw->show(); + decayw->hide(); + if (enalcMask->get_active()) { + maskusablew->show(); + maskunusablew->hide(); + + } else { + maskusablew->hide(); + maskunusablew->show(); + } break; @@ -3665,6 +3985,17 @@ void LocallabContrast::updateGUIToMode(const modeType new_type) } expmasklc->show(); + exprecovw->show(); + decayw->show(); + if (enalcMask->get_active()) { + maskusablew->show(); + maskunusablew->hide(); + + } else { + maskusablew->hide(); + maskunusablew->show(); + } + } } @@ -3888,6 +4219,15 @@ void LocallabContrast::showmasklcMethodChanged() void LocallabContrast::enalcMaskChanged() { + if (enalcMask->get_active()) { + maskusablew->show(); + maskunusablew->hide(); + + } else { + maskusablew->hide(); + maskunusablew->show(); + } + if (isLocActivated && exp->getEnabled()) { if (listener) { if (enalcMask->get_active()) { @@ -3912,6 +4252,7 @@ void LocallabContrast::updateContrastGUI1() lcdarkness->show(); lclightness->show(); contFrame->hide(); + csThreshold->hide(); levelwav->hide(); expresidpyr->hide(); clariFrame->hide(); @@ -3927,6 +4268,7 @@ void LocallabContrast::updateContrastGUI1() lcdarkness->hide(); lclightness->hide(); contFrame->show(); + csThreshold->show(); levelwav->show(); expresidpyr->show(); clariFrame->show(); @@ -3994,13 +4336,21 @@ LocallabCBDL::LocallabCBDL(): contresid(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CONTRESID"), -100, 100, 1, 0))), softradiuscb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.5, 0.))), sensicb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 60))), + exprecovcb(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_DENOI2_EXP")))), + maskusablecb(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUSABLE")))), + maskunusablecb(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUNUSABLE")))), + recothrescb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKRECOTHRES"), 1., 2., 0.01, 1.))), + lowthrescb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHRLOW"), 1., 80., 0.5, 12.))), + higthrescb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHR"), 20., 99., 0.5, 85.))), + decaycb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKDDECAY"), 0.5, 4., 0.1, 2.))), expmaskcb(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_SHOWCB")))), showmaskcbMethod(Gtk::manage(new MyComboBoxText())), enacbMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), - maskcbCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), - CCmaskcbshape(static_cast(maskcbCurveEditorG->addCurve(CT_Flat, "C(C)", nullptr, false, false))), - LLmaskcbshape(static_cast(maskcbCurveEditorG->addCurve(CT_Flat, "L(L)", nullptr, false, false))), - HHmaskcbshape(static_cast(maskcbCurveEditorG->addCurve(CT_Flat, "LC(H)", nullptr, false, true))), + // maskcbCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), + maskcbCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, "", 1)), + CCmaskcbshape(static_cast(maskcbCurveEditorG->addCurve(CT_Flat, "C", nullptr, false, false))), + LLmaskcbshape(static_cast(maskcbCurveEditorG->addCurve(CT_Flat, "L", nullptr, false, false))), + HHmaskcbshape(static_cast(maskcbCurveEditorG->addCurve(CT_Flat, "LC(h)", nullptr, false, true))), blendmaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), radmaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), lapmaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), @@ -4014,6 +4364,8 @@ LocallabCBDL::LocallabCBDL(): lumaneutralButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMANEUTRAL")))), lumacontrastPlusButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACONTRAST_PLUS")))) { + set_orientation(Gtk::ORIENTATION_VERTICAL); + const LocallabParams::LocallabSpot defSpot; // Parameter CBDL specific widgets @@ -4034,6 +4386,12 @@ LocallabCBDL::LocallabCBDL(): sensicb->setAdjusterListener(this); + recothrescb->setAdjusterListener(this); + lowthrescb->setAdjusterListener(this); + higthrescb->setAdjusterListener(this); + decaycb->setAdjusterListener(this); + setExpandAlignProperties(exprecovcb, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMNONE")); showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMODIF")); showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK")); @@ -4087,10 +4445,13 @@ LocallabCBDL::LocallabCBDL(): lumaneutralPressedConn = lumaneutralButton->signal_pressed().connect(sigc::mem_fun(*this, &LocallabCBDL::lumaneutralPressed)); lumacontrastPlusPressedConn = lumacontrastPlusButton->signal_pressed().connect(sigc::mem_fun(*this, &LocallabCBDL::lumacontrastPlusPressed)); + pack_start(*sensicb); // Add CBDL specific widgets to GUI ToolParamBlock* const levBox = Gtk::manage(new ToolParamBlock()); - Gtk::HBox* buttonBox = Gtk::manage(new Gtk::HBox(true, 10)); + Gtk::Box* buttonBox = Gtk::manage(new Gtk::Box()); + buttonBox->set_spacing(2); + buttonBox->set_homogeneous(true); buttonBox->pack_start(*lumacontrastMinusButton); buttonBox->pack_start(*lumaneutralButton); buttonBox->pack_start(*lumacontrastPlusButton); @@ -4100,7 +4461,7 @@ LocallabCBDL::LocallabCBDL(): levBox->pack_start(*adj); } - Gtk::HSeparator* const separator = Gtk::manage(new Gtk::HSeparator()); + Gtk::Separator* const separator = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); levBox->pack_start(*separator, Gtk::PACK_SHRINK, 2); levBox->pack_start(*chromacbdl); levBox->pack_start(*threshold); @@ -4114,7 +4475,18 @@ LocallabCBDL::LocallabCBDL(): residFrame->add(*residBox); pack_start(*residFrame); pack_start(*softradiuscb); - pack_start(*sensicb); +// pack_start(*sensicb); + ToolParamBlock* const cbBox3 = Gtk::manage(new ToolParamBlock()); + cbBox3->pack_start(*maskusablecb, Gtk::PACK_SHRINK, 0); + cbBox3->pack_start(*maskunusablecb, Gtk::PACK_SHRINK, 0); + cbBox3->pack_start(*recothrescb); + cbBox3->pack_start(*lowthrescb); + cbBox3->pack_start(*higthrescb); + cbBox3->pack_start(*decaycb); + // colBox3->pack_start(*invmaskc); + exprecovcb->add(*cbBox3, false); + pack_start(*exprecovcb, false, false); + ToolParamBlock* const maskcbBox = Gtk::manage(new ToolParamBlock()); maskcbBox->pack_start(*showmaskcbMethod, Gtk::PACK_SHRINK, 4); maskcbBox->pack_start(*enacbMask, Gtk::PACK_SHRINK, 0); @@ -4149,7 +4521,7 @@ void LocallabCBDL::resetMaskView() showmaskcbMethodConn.block(false); } -void LocallabCBDL::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) +void LocallabCBDL::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) { cbMask = showmaskcbMethod->get_active_row_number(); } @@ -4163,6 +4535,7 @@ void LocallabCBDL::updateAdviceTooltips(const bool showTooltips) adj->set_tooltip_text(M("TP_LOCALLAB_CBDL_ADJ_TOOLTIP")); } + exprecovcb->set_tooltip_markup(M("TP_LOCALLAB_MASKRESCB_TOOLTIP")); chromacbdl->set_tooltip_text(M("TP_LOCALLAB_CHROMACB_TOOLTIP")); threshold->set_tooltip_text(M("TP_LOCALLAB_CBDL_THRES_TOOLTIP")); clarityml->set_tooltip_text(M("TP_LOCALLAB_CBDLCLARI_TOOLTIP")); @@ -4180,6 +4553,9 @@ void LocallabCBDL::updateAdviceTooltips(const bool showTooltips) chromaskcb->set_tooltip_text(M("TP_LOCALLAB_CHROMASK_TOOLTIP")); slomaskcb->set_tooltip_text(M("TP_LOCALLAB_SLOMASK_TOOLTIP")); lapmaskcb->set_tooltip_text(M("TP_LOCALLAB_LAPRAD1_TOOLTIP")); + decaycb->set_tooltip_text(M("TP_LOCALLAB_MASKDECAY_TOOLTIP")); + lowthrescb->set_tooltip_text(M("TP_LOCALLAB_MASKLOWTHRESCB_TOOLTIP")); + higthrescb->set_tooltip_text(M("TP_LOCALLAB_MASKHIGTHRESCB_TOOLTIP")); } else { levFrame->set_tooltip_text(""); @@ -4204,11 +4580,16 @@ void LocallabCBDL::updateAdviceTooltips(const bool showTooltips) chromaskcb->set_tooltip_text(""); slomaskcb->set_tooltip_text(""); lapmaskcb->set_tooltip_text(""); + exprecovcb->set_tooltip_markup(""); + decaycb->set_tooltip_text(""); + lowthrescb->set_tooltip_text(""); + higthrescb->set_tooltip_text(""); } } void LocallabCBDL::setDefaultExpanderVisibility() { + exprecovcb->set_expanded(false); expmaskcb->set_expanded(false); } @@ -4274,6 +4655,10 @@ void LocallabCBDL::read(const rtengine::procparams::ProcParams* pp, const Params gammaskcb->setValue(spot.gammaskcb); slomaskcb->setValue(spot.slomaskcb); Lmaskcbshape->setCurve(spot.Lmaskcbcurve); + recothrescb->setValue((double)spot.recothrescb); + lowthrescb->setValue((double)spot.lowthrescb); + higthrescb->setValue((double)spot.higthrescb); + decaycb->setValue((double)spot.decaycb); } // Enable all listeners @@ -4317,6 +4702,10 @@ void LocallabCBDL::write(rtengine::procparams::ProcParams* pp, ParamsEdited* ped spot.gammaskcb = gammaskcb->getValue(); spot.slomaskcb = slomaskcb->getValue(); spot.Lmaskcbcurve = Lmaskcbshape->getCurve(); + spot.recothrescb = recothrescb->getValue(); + spot.lowthrescb = lowthrescb->getValue(); + spot.higthrescb = higthrescb->getValue(); + spot.decaycb = decaycb->getValue(); } // Note: No need to manage pedited as batch mode is deactivated for Locallab @@ -4346,6 +4735,10 @@ void LocallabCBDL::setDefaults(const rtengine::procparams::ProcParams* defParams chromaskcb->setDefault(defSpot.chromaskcb); gammaskcb->setDefault(defSpot.gammaskcb); slomaskcb->setDefault(defSpot.slomaskcb); + recothrescb->setDefault((double)defSpot.recothrescb); + lowthrescb->setDefault((double)defSpot.lowthrescb); + higthrescb->setDefault((double)defSpot.higthrescb); + decaycb->setDefault((double)defSpot.decaycb); } // Note: No need to manage pedited as batch mode is deactivated for Locallab @@ -4410,6 +4803,35 @@ void LocallabCBDL::adjusterChanged(Adjuster* a, double newval) } } + if (a == recothrescb) { + + if (listener) { + listener->panelChanged(Evlocallabrecothrescb, + recothrescb->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == lowthrescb) { + if (listener) { + listener->panelChanged(Evlocallablowthrescb, + lowthrescb->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == higthrescb) { + if (listener) { + listener->panelChanged(Evlocallabhigthrescb, + higthrescb->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == decaycb) { + if (listener) { + listener->panelChanged(Evlocallabdecaycb, + decaycb->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + if (a == blendmaskcb) { if (listener) { listener->panelChanged(Evlocallabblendmaskcb, @@ -4511,6 +4933,7 @@ void LocallabCBDL::convertParamToNormal() // Set hidden GUI widgets in Normal mode to default spot values lapmaskcb->setValue(defSpot.lapmaskcb); + decaycb->setValue(defSpot.decaycb); // Enable all listeners enableListener(); @@ -4527,15 +4950,19 @@ void LocallabCBDL::convertParamToSimple() softradiuscb->setValue(defSpot.softradiuscb); showmaskcbMethod->set_active(0); enacbMask->set_active(defSpot.enacbMask); - CCmaskcbshape->setCurve(defSpot.CCmaskcbcurve); - LLmaskcbshape->setCurve(defSpot.LLmaskcbcurve); - HHmaskcbshape->setCurve(defSpot.HHmaskcbcurve); - blendmaskcb->setValue((double)defSpot.blendmaskcb); - radmaskcb->setValue(defSpot.radmaskcb); - chromaskcb->setValue(defSpot.chromaskcb); - gammaskcb->setValue(defSpot.gammaskcb); - slomaskcb->setValue(defSpot.slomaskcb); - Lmaskcbshape->setCurve(defSpot.Lmaskcbcurve); +// CCmaskcbshape->setCurve(defSpot.CCmaskcbcurve); +// LLmaskcbshape->setCurve(defSpot.LLmaskcbcurve); +// HHmaskcbshape->setCurve(defSpot.HHmaskcbcurve); +// blendmaskcb->setValue((double)defSpot.blendmaskcb); +// radmaskcb->setValue(defSpot.radmaskcb); +// chromaskcb->setValue(defSpot.chromaskcb); +// gammaskcb->setValue(defSpot.gammaskcb); +// slomaskcb->setValue(defSpot.slomaskcb); +// Lmaskcbshape->setCurve(defSpot.Lmaskcbcurve); + recothrescb->setValue(defSpot.recothrescb); + lowthrescb->setValue(defSpot.lowthrescb); + higthrescb->setValue(defSpot.higthrescb); + decaycb->setValue(defSpot.decaycb); // Enable all listers enableListener(); @@ -4548,6 +4975,10 @@ void LocallabCBDL::updateGUIToMode(const modeType new_type) // Expert and Normal mode widgets are hidden in Simple mode softradiuscb->hide(); expmaskcb->hide(); + exprecovcb->hide(); + decaycb->hide(); + maskusablecb->hide(); + maskunusablecb->hide(); break; @@ -4557,6 +4988,16 @@ void LocallabCBDL::updateGUIToMode(const modeType new_type) // Specific Simple mode widgets are shown in Normal mode softradiuscb->show(); expmaskcb->show(); + exprecovcb->show(); + decaycb->hide(); + if (enacbMask->get_active()) { + maskusablecb->show(); + maskunusablecb->hide(); + + } else { + maskusablecb->hide(); + maskunusablecb->show(); + } break; @@ -4565,6 +5006,16 @@ void LocallabCBDL::updateGUIToMode(const modeType new_type) softradiuscb->show(); expmaskcb->show(); lapmaskcb->show(); + exprecovcb->show(); + decaycb->show(); + if (enacbMask->get_active()) { + maskusablecb->show(); + maskunusablecb->hide(); + + } else { + maskusablecb->hide(); + maskunusablecb->show(); + } } } @@ -4599,6 +5050,14 @@ void LocallabCBDL::showmaskcbMethodChanged() void LocallabCBDL::enacbMaskChanged() { + if (enacbMask->get_active()) { + maskusablecb->show(); + maskunusablecb->hide(); + } else { + maskusablecb->hide(); + maskunusablecb->show(); + } + if (isLocActivated && exp->getEnabled()) { if (listener) { if (enacbMask->get_active()) { @@ -4646,31 +5105,82 @@ void LocallabCBDL::lumacontrastPlusPressed() /* ==== LocallabLog ==== */ LocallabLog::LocallabLog(): - LocallabTool(this, M("TP_LOCALLAB_LOG_TOOLNAME"), M("TP_LOCALLAB_LOG"), false, false), + LocallabTool(this, M("TP_LOCALLAB_LOG_TOOLNAME"), M("TP_LOCALLAB_LOG"), false), // Log encoding specific widgets + repar(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LOGREPART"), 1.0, 100.0, 1., 100.0))), + ciecam(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_CIEC")))), autocompute(Gtk::manage(new Gtk::ToggleButton(M("TP_LOCALLAB_LOGAUTO")))), logPFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LOGPFRA")))), blackEv(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLACK_EV"), -16.0, 0.0, 0.1, -5.0))), - whiteEv(Gtk::manage(new Adjuster(M("TP_LOCALLAB_WHITE_EV"), 0.0, 32.0, 0.1, 10.0))), + whiteEv(Gtk::manage(new Adjuster(M("TP_LOCALLAB_WHITE_EV"), 0., 32.0, 0.1, 10.0))), fullimage(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_FULLIMAGE")))), + logFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LOGFRA")))), Autogray(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_AUTOGRAY")))), sourceGray(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOURCE_GRAY"), 1.0, 100.0, 0.1, 10.0))), + sourceabs(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOURCE_ABS"), 0.01, 16384.0, 0.01, 2000.0))), + sursour(Gtk::manage (new MyComboBoxText ())), + surHBox(Gtk::manage(new Gtk::Box())), + log1Frame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LOG1FRA")))), + log2Frame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LOG2FRA")))), targetGray(Gtk::manage(new Adjuster(M("TP_LOCALLAB_TARGET_GRAY"), 5.0, 80.0, 0.1, 18.0))), detail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DETAIL"), 0., 1., 0.01, 0.6))), - baselog(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BASELOG"), 1.3, 8., 0.05, 2., Gtk::manage(new RTImage("circle-black-small.png")), Gtk::manage(new RTImage("circle-white-small.png"))))), + catad(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CATAD"), -100., 100., 0.5, 0., Gtk::manage(new RTImage("circle-blue-small.png")), Gtk::manage(new RTImage("circle-orange-small.png"))))), + lightl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LOGLIGHTL"), -100., 100., 0.5, 0.))), + lightq(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LOGLIGHTQ"), -100., 100., 0.5, 0.))), + contl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LOGCONTL"), -100., 100., 0.5, 0.))), + contq(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LOGCONQL"), -100., 100., 0.5, 0.))), + contthres(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LOGCONTHRES"), -1., 1., 0.01, 0.))), + colorfl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LOGCOLORFL"), -100., 100., 0.5, 0.))), + saturl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SATURV"), -100., 100., 0.5, 0.))), + expL(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_LOGEXP")))), + CurveEditorL(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_LOGCONTQ"))), + LshapeL(static_cast(CurveEditorL->addCurve(CT_Diagonal, "Q(Q)"))), + targabs(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOURCE_ABS"), 0.01, 16384.0, 0.01, 16.0))), + surround(Gtk::manage (new MyComboBoxText ())), + surrHBox(Gtk::manage(new Gtk::Box())), + baselog(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BASELOG"), 1.3, 3., 0.05, 2.))),//, Gtk::manage(new RTImage("circle-black-small.png")), Gtk::manage(new RTImage("circle-white-small.png"))))), + exprecovl(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_DENOI2_EXP")))), + maskusablel(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUSABLE")))), + maskunusablel(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUNUSABLE")))), + recothresl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKRECOTHRES"), 1., 2., 0.01, 1.))), + lowthresl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHRLOW"), 1., 80., 0.5, 12.))), + higthresl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHR"), 20., 99., 0.5, 85.))), + decayl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKDDECAY"), 0.5, 4., 0.1, 2.))), + sensilog(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 60))), + gradlogFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_GRADLOGFRA")))), strlog(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADSTR"), -2.0, 2.0, 0.05, 0.))), - anglog(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADANG"), -180, 180, 0.1, 0.))) + anglog(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADANG"), -180, 180, 0.1, 0.))), + expmaskL(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_SHOWC")))), + showmaskLMethod(Gtk::manage(new MyComboBoxText())), + enaLMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), + // maskCurveEditorL(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASKCOL"))), + maskCurveEditorL(new CurveEditorGroup(options.lastlocalCurvesDir, "", 1)), + CCmaskshapeL(static_cast(maskCurveEditorL->addCurve(CT_Flat, "C", nullptr, false, false))), + LLmaskshapeL(static_cast(maskCurveEditorL->addCurve(CT_Flat, "L", nullptr, false, false))), + HHmaskshapeL(static_cast(maskCurveEditorL->addCurve(CT_Flat, "LC(h)", nullptr, false, true))), + blendmaskL(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), + radmaskL(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), + chromaskL(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), + mask2CurveEditorL(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK2"))), + LmaskshapeL(static_cast(mask2CurveEditorL->addCurve(CT_Diagonal, "L(L)"))) + + { + set_orientation(Gtk::ORIENTATION_VERTICAL); + // Parameter Log encoding specific widgets autoconn = autocompute->signal_toggled().connect(sigc::mem_fun(*this, &LocallabLog::autocomputeToggled)); + const LocallabParams::LocallabSpot defSpot; + repar->setAdjusterListener(this); blackEv->setLogScale(2, -8); blackEv->setAdjusterListener(this); whiteEv->setLogScale(16, 0); whiteEv->setAdjusterListener(this); + ciecamconn = ciecam->signal_toggled().connect(sigc::mem_fun(*this, &LocallabLog::ciecamChanged)); fullimageConn = fullimage->signal_toggled().connect(sigc::mem_fun(*this, &LocallabLog::fullimageChanged)); @@ -4678,19 +5188,127 @@ LocallabLog::LocallabLog(): sourceGray->setAdjusterListener(this); + sourceabs->setLogScale(500, 0); + + sourceabs->setAdjusterListener(this); + targetGray->setAdjusterListener(this); detail->setAdjusterListener(this); + catad->setAdjusterListener(this); + + setExpandAlignProperties(expL, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + + saturl->setAdjusterListener(this); + + lightl->setAdjusterListener(this); + + lightq->setAdjusterListener(this); + contl->setAdjusterListener(this); + contthres->setAdjusterListener(this); + + contq->setAdjusterListener(this); + colorfl->setAdjusterListener(this); + + CurveEditorL->setCurveListener(this); + + LshapeL->setResetCurve(DiagonalCurveType(defSpot.LcurveL.at(0)), defSpot.LcurveL); + LshapeL->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); + LshapeL->setLeftBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); + + CurveEditorL->curveListComplete(); + + + targabs->setLogScale(500, 0); + + targabs->setAdjusterListener(this); + baselog->setAdjusterListener(this); + recothresl->setAdjusterListener(this); + lowthresl->setAdjusterListener(this); + higthresl->setAdjusterListener(this); + decayl->setAdjusterListener(this); + setExpandAlignProperties(exprecovl, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); sensilog->setAdjusterListener(this); strlog->setAdjusterListener(this); anglog->setAdjusterListener(this); + + surHBox->set_spacing (2); + surHBox->set_tooltip_markup (M ("TP_LOCALLAB_LOGSURSOUR_TOOLTIP")); + Gtk::Label* surLabel = Gtk::manage (new Gtk::Label (M ("TP_COLORAPP_SURROUND") + ":")); + surHBox->pack_start (*surLabel, Gtk::PACK_SHRINK); + sursour->append (M ("TP_COLORAPP_SURROUND_AVER")); + sursour->append (M ("TP_COLORAPP_SURROUND_DIM")); +// sursour->append (M ("TP_COLORAPP_SURROUND_DARK")); + sursour->set_active (0); + surHBox->pack_start (*sursour); + sursourconn = sursour->signal_changed().connect ( sigc::mem_fun (*this, &LocallabLog::sursourChanged) ); + + + + surrHBox->set_spacing (2); + surrHBox->set_tooltip_markup (M ("TP_COLORAPP_SURROUND_TOOLTIP")); + Gtk::Label* surrLabel = Gtk::manage (new Gtk::Label (M ("TP_COLORAPP_SURROUND") + ":")); + surrHBox->pack_start (*surrLabel, Gtk::PACK_SHRINK); + surround->append (M ("TP_COLORAPP_SURROUND_AVER")); + surround->append (M ("TP_COLORAPP_SURROUND_DIM")); + surround->append (M ("TP_COLORAPP_SURROUND_DARK")); + surround->append (M ("TP_COLORAPP_SURROUND_EXDARK")); + surround->set_active (0); + surrHBox->pack_start (*surround); + surroundconn = surround->signal_changed().connect ( sigc::mem_fun (*this, &LocallabLog::surroundChanged) ); + + setExpandAlignProperties(expmaskL, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + + showmaskLMethod->append(M("TP_LOCALLAB_SHOWMNONE")); + showmaskLMethod->append(M("TP_LOCALLAB_SHOWMODIF")); + showmaskLMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK")); + showmaskLMethod->append(M("TP_LOCALLAB_SHOWMASK")); + showmaskLMethod->append(M("TP_LOCALLAB_SHOWREF")); + showmaskLMethod->set_active(0); + showmaskLMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); + showmaskLMethodConn = showmaskLMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabLog::showmaskLMethodChanged)); + + + enaLMaskConn = enaLMask->signal_toggled().connect(sigc::mem_fun(*this, &LocallabLog::enaLMaskChanged)); + + maskCurveEditorL->setCurveListener(this); + + CCmaskshapeL->setIdentityValue(0.); + CCmaskshapeL->setResetCurve(FlatCurveType(defSpot.CCmaskcurveL.at(0)), defSpot.CCmaskcurveL); + CCmaskshapeL->setBottomBarColorProvider(this, 1); + + LLmaskshapeL->setIdentityValue(0.); + LLmaskshapeL->setResetCurve(FlatCurveType(defSpot.LLmaskcurveL.at(0)), defSpot.LLmaskcurveL); + LLmaskshapeL->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); + + HHmaskshapeL->setIdentityValue(0.); + HHmaskshapeL->setResetCurve(FlatCurveType(defSpot.HHmaskcurveL.at(0)), defSpot.HHmaskcurveL); + HHmaskshapeL->setCurveColorProvider(this, 2); + HHmaskshapeL->setBottomBarColorProvider(this, 2); + + maskCurveEditorL->curveListComplete(); + + blendmaskL->setAdjusterListener(this); + radmaskL->setAdjusterListener(this); + chromaskL->setAdjusterListener(this); + + mask2CurveEditorL->setCurveListener(this); + + LmaskshapeL->setResetCurve(DiagonalCurveType(defSpot.LmaskcurveL.at(0)), defSpot.LmaskcurveL); + LmaskshapeL->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); + LmaskshapeL->setLeftBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); + + mask2CurveEditorL->curveListComplete(); // Add Log encoding specific widgets to GUI + pack_start(*sensilog); + pack_start(*repar); + pack_start(*ciecam); logPFrame->set_label_align(0.025, 0.5); ToolParamBlock* const logPBox = Gtk::manage(new ToolParamBlock()); logPBox->pack_start(*autocompute); @@ -4699,18 +5317,69 @@ LocallabLog::LocallabLog(): logPBox->pack_start(*fullimage); logPFrame->add(*logPBox); pack_start(*logPFrame); - Gtk::Frame* const logFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LOGFRA"))); +// Gtk::Frame* const logFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LOGFRA"))); logFrame->set_label_align(0.025, 0.5); ToolParamBlock* const logFBox = Gtk::manage(new ToolParamBlock()); logFBox->pack_start(*Autogray); logFBox->pack_start(*sourceGray); + logFBox->pack_start(*sourceabs); + logFBox->pack_start (*surHBox); +// logFBox->pack_start(*baselog); logFrame->add(*logFBox); pack_start(*logFrame); - pack_start(*targetGray); - pack_start(*detail); - pack_start(*baselog); - pack_start(*sensilog); - Gtk::Frame* const gradlogFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_GRADLOGFRA"))); + log1Frame->set_label_align(0.025, 0.5); + ToolParamBlock* const logP1Box = Gtk::manage(new ToolParamBlock()); + logP1Box->pack_start(*detail); + logP1Box->pack_start(*contl); + logP1Box->pack_start(*contthres); + logP1Box->pack_start(*saturl); + ToolParamBlock* const logP11Box = Gtk::manage(new ToolParamBlock()); + logP11Box->pack_start(*lightl); + logP11Box->pack_start(*lightq); + logP11Box->pack_start(*contq); + logP11Box->pack_start(*colorfl); + expL->add(*logP11Box, false); + logP1Box->pack_start(*expL, false, false); + +// logP1Box->pack_start(*CurveEditorL, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor + log1Frame->add(*logP1Box); + pack_start(*log1Frame); + log2Frame->set_label_align(0.025, 0.5); + ToolParamBlock* const logP2Box = Gtk::manage(new ToolParamBlock()); + logP2Box->pack_start(*targetGray); + logP2Box->pack_start(*targabs); + logP2Box->pack_start(*catad); + logP2Box->pack_start (*surrHBox); + ToolParamBlock* const logBox3 = Gtk::manage(new ToolParamBlock()); + logBox3->pack_start(*maskusablel, Gtk::PACK_SHRINK, 0); + logBox3->pack_start(*maskunusablel, Gtk::PACK_SHRINK, 0); + logBox3->pack_start(*recothresl); + logBox3->pack_start(*lowthresl); + logBox3->pack_start(*higthresl); + logBox3->pack_start(*decayl); + // colBox3->pack_start(*invmaskc); + exprecovl->add(*logBox3, false); + + ToolParamBlock* const logP3Box = Gtk::manage(new ToolParamBlock()); + logP3Box->pack_start(*showmaskLMethod, Gtk::PACK_SHRINK, 4); + logP3Box->pack_start(*enaLMask, Gtk::PACK_SHRINK, 0); + logP3Box->pack_start(*maskCurveEditorL, Gtk::PACK_SHRINK, 4); + logP3Box->pack_start(*blendmaskL); + logP3Box->pack_start(*radmaskL); + logP3Box->pack_start(*chromaskL); + logP3Box->pack_start(*mask2CurveEditorL, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor + expmaskL->add(*logP3Box, false); + + + log2Frame->add(*logP2Box); + pack_start(*log2Frame); + pack_start(*exprecovl, false, false); + +// pack_start(*baselog); +// pack_start(*sensilog); + pack_start(*expmaskL, false, false); + + // Gtk::Frame* const gradlogFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_GRADLOGFRA"))); gradlogFrame->set_label_align(0.025, 0.5); ToolParamBlock* const gradlogBox = Gtk::manage(new ToolParamBlock()); gradlogBox->pack_start(*strlog); @@ -4719,36 +5388,85 @@ LocallabLog::LocallabLog(): pack_start(*gradlogFrame); } +LocallabLog::~LocallabLog() +{ + delete maskCurveEditorL; + delete mask2CurveEditorL; + delete CurveEditorL; + +} + +void LocallabLog::setDefaultExpanderVisibility() +{ + exprecovl->set_expanded(false); + expmaskL->set_expanded(false); + expL->set_expanded(false); + +} + void LocallabLog::updateAdviceTooltips(const bool showTooltips) { if (showTooltips) { exp->set_tooltip_text(M("TP_LOCALLAB_LOGENCOD_TOOLTIP")); + repar->set_tooltip_text(M("TP_LOCALLAB_LOGREPART_TOOLTIP")); logPFrame->set_tooltip_text(M("TP_LOCALLAB_LOGFRAME_TOOLTIP")); + logFrame->set_tooltip_text(M("TP_LOCALLAB_LOGSCENE_TOOLTIP")); + log1Frame->set_tooltip_text(M("TP_LOCALLAB_LOGIMAGE_TOOLTIP")); + log2Frame->set_tooltip_text(M("TP_LOCALLAB_LOGVIEWING_TOOLTIP")); autocompute->set_tooltip_text(M("TP_LOCALLAB_LOGAUTO_TOOLTIP")); + Autogray->set_tooltip_text(M("TP_LOCALLAB_LOGAUTOGRAY_TOOLTIP")); // blackEv->set_tooltip_text(M("TP_LOCALLAB_LOGBLACKWHEV_TOOLTIP")); // whiteEv->set_tooltip_text(M("TP_LOCALLAB_LOGBLACKWHEV_TOOLTIP")); + exprecovl->set_tooltip_markup(M("TP_LOCALLAB_MASKRELOG_TOOLTIP")); blackEv->set_tooltip_text(""); whiteEv->set_tooltip_text(""); sourceGray->set_tooltip_text(""); - targetGray->set_tooltip_text(M("TP_LOCALLAB_LOGTARGGREY_TOOLTIP")); + sourceabs->set_tooltip_text(M("TP_COLORAPP_ADAPSCEN_TOOLTIP")); + targabs->set_tooltip_text(M("TP_COLORAPP_VIEWING_ABSOLUTELUMINANCE_TOOLTIP")); + targetGray->set_tooltip_text(M("TP_COLORAPP_YBOUT_TOOLTIP")); baselog->set_tooltip_text(M("TP_LOCALLAB_LOGBASE_TOOLTIP")); strlog->set_tooltip_text(M("TP_LOCALLAB_GRADGEN_TOOLTIP")); anglog->set_tooltip_text(M("TP_LOCALLAB_GRADANG_TOOLTIP")); - - // detail->set_tooltip_text(M("TP_LOCALLAB_NUL_TOOLTIP")); - // Autogray->set_tooltip_text(M("TP_LOCALLAB_NUL_TOOLTIP")); - // sensilog->set_tooltip_text(M("TP_LOCALLAB_NUL_TOOLTIP")); - detail->set_tooltip_text(""); - Autogray->set_tooltip_text(""); + contl->set_tooltip_text(M("TP_LOCALLAB_LOGCONTL_TOOLTIP")); + contq->set_tooltip_text(M("TP_LOCALLAB_LOGCONTQ_TOOLTIP")); + contthres->set_tooltip_text(M("TP_LOCALLAB_LOGCONTTHRES_TOOLTIP")); + colorfl->set_tooltip_text(M("TP_LOCALLAB_LOGCOLORF_TOOLTIP")); + lightl->set_tooltip_text(M("TP_LOCALLAB_LOGLIGHTL_TOOLTIP")); + lightq->set_tooltip_text(M("TP_LOCALLAB_LOGLIGHTQ_TOOLTIP")); + saturl->set_tooltip_text(M("TP_LOCALLAB_LOGSATURL_TOOLTIP")); + detail->set_tooltip_text(M("TP_LOCALLAB_LOGDETAIL_TOOLTIP")); + catad->set_tooltip_text(M("TP_LOCALLAB_LOGCATAD_TOOLTIP")); sensilog->set_tooltip_text(M("TP_LOCALLAB_SENSI_TOOLTIP")); fullimage->set_tooltip_text(M("TP_LOCALLAB_FULLIMAGELOG_TOOLTIP")); + ciecam->set_tooltip_text(M("TP_LOCALLAB_CIECAMLOG_TOOLTIP")); + expmaskL->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); + CCmaskshapeL->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + LLmaskshapeL->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + HHmaskshapeL->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + blendmaskL->set_tooltip_text(M("TP_LOCALLAB_BLENDMASK_TOOLTIP")); + radmaskL->set_tooltip_text(M("TP_LOCALLAB_LAPRAD2_TOOLTIP")); + chromaskL->set_tooltip_text(M("TP_LOCALLAB_CHROMASK_TOOLTIP")); +// mask2CurveEditorL->set_tooltip_text(M("TP_LOCALLAB_CONTRASTCURVMASK_TOOLTIP")); + LmaskshapeL->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP")); + decayl->set_tooltip_text(M("TP_LOCALLAB_MASKDECAY_TOOLTIP")); + lowthresl->set_tooltip_text(M("TP_LOCALLAB_MASKLOWTHRESL_TOOLTIP")); + higthresl->set_tooltip_text(M("TP_LOCALLAB_MASKHIGTHRESL_TOOLTIP")); + + } else { exp->set_tooltip_text(""); + repar->set_tooltip_text(""); logPFrame->set_tooltip_text(""); + logFrame->set_tooltip_text(""); + log1Frame->set_tooltip_text(""); + log2Frame->set_tooltip_text(""); + exprecovl->set_tooltip_markup(""); autocompute->set_tooltip_text(""); blackEv->set_tooltip_text(""); whiteEv->set_tooltip_text(""); sourceGray->set_tooltip_text(""); + sourceabs->set_tooltip_text(""); + targabs->set_tooltip_text(""); targetGray->set_tooltip_text(""); baselog->set_tooltip_text(""); strlog->set_tooltip_text(""); @@ -4757,6 +5475,27 @@ void LocallabLog::updateAdviceTooltips(const bool showTooltips) Autogray->set_tooltip_text(""); sensilog->set_tooltip_text(""); fullimage->set_tooltip_text(""); + ciecam->set_tooltip_text(""); + contl->set_tooltip_text(""); + lightl->set_tooltip_text(""); + lightq->set_tooltip_text(""); + contq->set_tooltip_text(""); + contthres->set_tooltip_text(""); + colorfl->set_tooltip_text(""); + saturl->set_tooltip_text(""); + catad->set_tooltip_text(""); + expmaskL->set_tooltip_markup(""); + CCmaskshapeL->setTooltip(""); + LLmaskshapeL->setTooltip(""); + HHmaskshapeL->setTooltip(""); + blendmaskL->set_tooltip_text(""); + radmaskL->set_tooltip_text(""); + chromaskL->set_tooltip_text(""); + mask2CurveEditorL->set_tooltip_text(""); + LmaskshapeL->setTooltip(""); + decayl->set_tooltip_text(""); + lowthresl->set_tooltip_text(""); + higthresl->set_tooltip_text(""); } } @@ -4767,7 +5506,12 @@ void LocallabLog::disableListener() autoconn.block(true); fullimageConn.block(true); + ciecamconn.block(true); + enaLMaskConn.block(true); + surroundconn.block (true); + sursourconn.block (true); AutograyConn.block(true); + showmaskLMethodConn.block(true); } void LocallabLog::enableListener() @@ -4776,9 +5520,34 @@ void LocallabLog::enableListener() autoconn.block(false); fullimageConn.block(false); + ciecamconn.block(false); + enaLMaskConn.block(false); + surroundconn.block (false); + sursourconn.block (false); AutograyConn.block(false); + showmaskLMethodConn.block(false); } +bool LocallabLog::isMaskViewActive() +{ + return ((showmaskLMethod->get_active_row_number() != 0)); +} + +void LocallabLog::resetMaskView() +{ + showmaskLMethodConn.block(true); + + showmaskLMethod->set_active(0); + + showmaskLMethodConn.block(false); +} + +void LocallabLog::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) +{ + logMask = showmaskLMethod->get_active_row_number(); +} + + void LocallabLog::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited) { // Disable all listeners @@ -4794,26 +5563,80 @@ void LocallabLog::read(const rtengine::procparams::ProcParams* pp, const ParamsE exp->set_visible(spot.visilog); exp->setEnabled(spot.explog); + complexity->set_active(spot.complexlog); autocompute->set_active(spot.autocompute); blackEv->setValue(spot.blackEv); + repar->setValue(spot.repar); + whiteEv->setValue(spot.whiteEv); +/* if(whiteEv->getValue() < 1.5){ + whiteEv->setValue(1.5); + } +*/ + if (spot.sursour == "Average") { + sursour->set_active (0); + } else if (spot.sursour == "Dim") { + sursour->set_active (1); + } + + + if (spot.surround == "Average") { + surround->set_active (0); + } else if (spot.surround == "Dim") { + surround->set_active (1); + } else if (spot.surround == "Dark") { + surround->set_active (2); + } else if (spot.surround == "ExtremelyDark") { + surround->set_active (3); + } + recothresl->setValue((double)spot.recothresl); + lowthresl->setValue((double)spot.lowthresl); + higthresl->setValue((double)spot.higthresl); + decayl->setValue((double)spot.decayl); + + ciecam->set_active(spot.ciecam); fullimage->set_active(spot.fullimage); Autogray->set_active(spot.Autogray); sourceGray->setValue(spot.sourceGray); + sourceabs->setValue(spot.sourceabs); + catad->setValue(spot.catad); + saturl->setValue(spot.saturl); + lightl->setValue(spot.lightl); + lightq->setValue(spot.lightq); + contl->setValue(spot.contl); + contthres->setValue(spot.contthres); + contq->setValue(spot.contq); + colorfl->setValue(spot.colorfl); + LshapeL->setCurve(spot.LcurveL); + targabs->setValue(spot.targabs); targetGray->setValue(spot.targetGray); detail->setValue(spot.detail); baselog->setValue(spot.baselog); sensilog->setValue((double)spot.sensilog); strlog->setValue(spot.strlog); anglog->setValue(spot.anglog); + CCmaskshapeL->setCurve(spot.CCmaskcurveL); + LLmaskshapeL->setCurve(spot.LLmaskcurveL); + HHmaskshapeL->setCurve(spot.HHmaskcurveL); + enaLMask->set_active(spot.enaLMask); + blendmaskL->setValue(spot.blendmaskL); + radmaskL->setValue(spot.radmaskL); + chromaskL->setValue(spot.chromaskL); + LmaskshapeL->setCurve(spot.LmaskcurveL); + + } // Enable all listeners enableListener(); + // Update GUI according to complexity mode + updateGUIToMode(static_cast(complexity->get_active_row_number())); + // Update Log Encoding GUI according to autocompute button state updateLogGUI(); + updateLogGUI2(); // Note: No need to manage pedited as batch mode is deactivated for Locallab } @@ -4827,24 +5650,294 @@ void LocallabLog::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedi spot.explog = exp->getEnabled(); spot.visilog = exp->get_visible(); + spot.complexlog = complexity->get_active_row_number(); spot.autocompute = autocompute->get_active(); + spot.repar = repar->getValue(); spot.blackEv = blackEv->getValue(); spot.whiteEv = whiteEv->getValue(); spot.fullimage = fullimage->get_active(); + spot.ciecam = ciecam->get_active(); spot.Autogray = Autogray->get_active(); spot.sourceGray = sourceGray->getValue(); + spot.sourceabs = sourceabs->getValue(); + spot.targabs = targabs->getValue(); spot.targetGray = targetGray->getValue(); + spot.catad = catad->getValue(); + spot.saturl = saturl->getValue(); + spot.lightl = lightl->getValue(); + spot.lightq = lightq->getValue(); + spot.contl = contl->getValue(); + spot.contthres = contthres->getValue(); + spot.contq = contq->getValue(); + spot.colorfl = colorfl->getValue(); + spot.LcurveL = LshapeL->getCurve(); spot.detail = detail->getValue(); spot.baselog = baselog->getValue(); spot.sensilog = sensilog->getIntValue(); spot.strlog = strlog->getValue(); spot.anglog = anglog->getValue(); + spot.CCmaskcurveL = CCmaskshapeL->getCurve(); + spot.LLmaskcurveL = LLmaskshapeL->getCurve(); + spot.HHmaskcurveL = HHmaskshapeL->getCurve(); + spot.enaLMask = enaLMask->get_active(); + spot.blendmaskL = blendmaskL->getValue(); + spot.radmaskL = radmaskL->getValue(); + spot.chromaskL = chromaskL->getValue(); + spot.LmaskcurveL = LmaskshapeL->getCurve(); + + spot.recothresl = recothresl->getValue(); + spot.lowthresl = lowthresl->getValue(); + spot.higthresl = higthresl->getValue(); + spot.decayl = decayl->getValue(); + + if (sursour->get_active_row_number() == 0) { + spot.sursour = "Average"; + } else if (sursour->get_active_row_number() == 1) { + spot.sursour = "Dim"; + } + + if (surround->get_active_row_number() == 0) { + spot.surround = "Average"; + } else if (surround->get_active_row_number() == 1) { + spot.surround = "Dim"; + } else if (surround->get_active_row_number() == 2) { + spot.surround = "Dark"; + } else if (surround->get_active_row_number() == 3) { + spot.surround = "ExtremelyDark"; + } + } // Note: No need to manage pedited as batch mode is deactivated for Locallab } +void LocallabLog::enaLMaskChanged() +{ + if (enaLMask->get_active()) { + maskusablel->show(); + maskunusablel->hide(); + + } else { + maskusablel->hide(); + maskunusablel->show(); + } + + if (isLocActivated && exp->getEnabled()) { + if (listener) { + if (enaLMask->get_active()) { + listener->panelChanged(EvLocallabEnaLMask, + M("GENERAL_ENABLED") + " (" + escapeHtmlChars(spotName) + ")"); + } else { + listener->panelChanged(EvLocallabEnaLMask, + M("GENERAL_DISABLED") + " (" + escapeHtmlChars(spotName) + ")"); + } + } + } +} + + + +void LocallabLog::updateGUIToMode(const modeType new_type) +{ + + switch (new_type) { + case Simple: + // Expert and Normal mode widgets are hidden in Simple mode + ciecam->hide(); + ciecam->set_active(false); + sourceabs->hide(); + targabs->hide(); + saturl->hide(); + contl->hide(); + contthres->hide(); + lightl->hide(); + lightq->hide(); + contq->hide(); + colorfl->hide(); + catad->hide(); + surrHBox->hide(); + expL->hide(); + surHBox->hide(); + expmaskL->hide(); + gradlogFrame->hide(); + exprecovl->hide(); + maskusablel->hide(); + maskunusablel->hide(); + decayl->hide(); + break; + + case Normal: + // Expert mode widgets are hidden in Normal mode + ciecam->hide(); + ciecam->set_active(true); + + sourceabs->show(); + targabs->show(); + catad->show(); + saturl->show(); + lightl->show(); + lightq->show(); + contl->show(); + contthres->show(); + contq->show(); + colorfl->show(); + surrHBox->show(); + expL->hide(); + surHBox->hide(); + expmaskL->show(); + gradlogFrame->show(); + if (enaLMask->get_active()) { + maskusablel->show(); + maskunusablel->hide(); + + } else { + maskusablel->hide(); + maskunusablel->show(); + } + + exprecovl->show(); + decayl->hide(); + + break; + + case Expert: + // Show widgets hidden in Normal and Simple mode + ciecam->hide(); + ciecam->set_active(true); + sourceabs->show(); + targabs->show(); + catad->show(); + saturl->show(); + lightl->show(); + lightq->show(); + contl->show(); + contthres->show(); + contq->show(); + colorfl->show(); + surrHBox->show(); + expL->show(); + expmaskL->show(); + gradlogFrame->show(); + surHBox->show(); + if (enaLMask->get_active()) { + maskusablel->show(); + maskunusablel->hide(); + + } else { + maskusablel->hide(); + maskunusablel->show(); + } + exprecovl->show(); + decayl->show(); + + } +} + + + + +void LocallabLog::convertParamToSimple() +{ + const LocallabParams::LocallabSpot defSpot; + + // Disable all listeners + disableListener(); + ciecam->set_active(false); + contq->setValue(defSpot.contq); + contthres->setValue(defSpot.contthres); + colorfl->setValue(defSpot.colorfl); + lightl->setValue(defSpot.lightl); + lightq->setValue(defSpot.lightq); + sursour->set_active(0); + strlog->setValue(defSpot.strlog); + anglog->setValue(defSpot.anglog); + enaLMask->set_active(false); + recothresl->setValue(defSpot.recothresl); + lowthresl->setValue(defSpot.lowthresl); + higthresl->setValue(defSpot.higthresl); + decayl->setValue(defSpot.decayl); + // Enable all listeners + enableListener(); +} + + +void LocallabLog::convertParamToNormal() +{ + const LocallabParams::LocallabSpot defSpot; + + // Disable all listeners + disableListener(); + ciecam->set_active(true); + contq->setValue(defSpot.contq); + colorfl->setValue(defSpot.colorfl); + lightl->setValue(defSpot.lightl); + lightq->setValue(defSpot.lightq); + sursour->set_active(0); +// enaLMask->set_active(true); + decayl->setValue(defSpot.decayl); + // Enable all listeners + enableListener(); + +} + + + +void LocallabLog::showmaskLMethodChanged() +{ + + // If mask preview is activated, deactivate all other tool mask preview + if (locToolListener) { + locToolListener->resetOtherMaskView(this); + } + + if (listener) { + listener->panelChanged(EvlocallabshowmaskMethod, ""); + } +} + +void LocallabLog::curveChanged(CurveEditor* ce) +{ + if (isLocActivated && exp->getEnabled()) { + if (ce == HHmaskshapeL) { + if (listener) { + listener->panelChanged(EvlocallabHHmaskshapeL, + M("HISTORY_CUSTOMCURVE") + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (ce == LLmaskshapeL) { + if (listener) { + listener->panelChanged(EvlocallabLLmaskshapeL, + M("HISTORY_CUSTOMCURVE") + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (ce == CCmaskshapeL) { + if (listener) { + listener->panelChanged(EvlocallabCCmaskshapeL, + M("HISTORY_CUSTOMCURVE") + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (ce == LmaskshapeL) { + if (listener) { + listener->panelChanged(EvlocallabLmaskshapeL, + M("HISTORY_CUSTOMCURVE") + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (ce == LshapeL) { + if (listener) { + listener->panelChanged(EvlocallabLshapeL, + M("HISTORY_CUSTOMCURVE") + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + } +} + + void LocallabLog::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited) { const int index = defParams->locallab.selspot; @@ -4853,15 +5946,35 @@ void LocallabLog::setDefaults(const rtengine::procparams::ProcParams* defParams, const LocallabParams::LocallabSpot& defSpot = defParams->locallab.spots.at(index); // Set default value for adjuster widgets + repar->setDefault(defSpot.repar); blackEv->setDefault(defSpot.blackEv); whiteEv->setDefault(defSpot.whiteEv); sourceGray->setDefault(defSpot.sourceGray); + sourceabs->setDefault(defSpot.sourceabs); + targabs->setDefault(defSpot.targabs); targetGray->setDefault(defSpot.targetGray); + catad->setDefault(defSpot.catad); + saturl->setDefault(defSpot.saturl); + lightl->setDefault(defSpot.lightl); + lightq->setDefault(defSpot.lightq); + contl->setDefault(defSpot.contl); + contthres->setDefault(defSpot.contthres); + contq->setDefault(defSpot.contq); + colorfl->setDefault(defSpot.colorfl); detail->setDefault(defSpot.detail); baselog->setDefault(defSpot.baselog); sensilog->setDefault((double)defSpot.sensilog); strlog->setDefault(defSpot.strlog); anglog->setDefault(defSpot.anglog); + blendmaskL->setDefault(defSpot.blendmaskL); + radmaskL->setDefault(defSpot.radmaskL); + chromaskL->setDefault(defSpot.chromaskL); + recothresl->setDefault((double)defSpot.recothresl); + lowthresl->setDefault((double)defSpot.lowthresl); + higthresl->setDefault((double)defSpot.higthresl); + decayl->setDefault((double)defSpot.decayl); + + } // Note: No need to manage pedited as batch mode is deactivated for Locallab @@ -4870,6 +5983,13 @@ void LocallabLog::setDefaults(const rtengine::procparams::ProcParams* defParams, void LocallabLog::adjusterChanged(Adjuster* a, double newval) { if (isLocActivated && exp->getEnabled()) { + if (a == repar) { + if (listener) { + listener->panelChanged(Evlocallabrepar, + repar->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + if (a == blackEv) { if (listener) { listener->panelChanged(EvlocallabblackEv, @@ -4891,6 +6011,20 @@ void LocallabLog::adjusterChanged(Adjuster* a, double newval) } } + if (a == sourceabs) { + if (listener) { + listener->panelChanged(Evlocallabsourceabs, + sourceabs->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == targabs) { + if (listener) { + listener->panelChanged(Evlocallabtargabs, + targabs->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + if (a == targetGray) { if (listener) { listener->panelChanged(EvlocallabtargetGray, @@ -4898,6 +6032,63 @@ void LocallabLog::adjusterChanged(Adjuster* a, double newval) } } + if (a == catad) { + if (listener) { + listener->panelChanged(Evlocallabcatad, + catad->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == saturl) { + if (listener) { + listener->panelChanged(Evlocallabsaturl, + saturl->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == lightl) { + if (listener) { + listener->panelChanged(Evlocallablightl, + lightl->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == lightq) { + if (listener) { + listener->panelChanged(Evlocallablightq, + lightq->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + + if (a == contl) { + if (listener) { + listener->panelChanged(Evlocallabcontl, + contl->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == contthres) { + if (listener) { + listener->panelChanged(Evlocallabcontthres, + contthres->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == contq) { + if (listener) { + listener->panelChanged(Evlocallabcontq, + contq->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == colorfl) { + if (listener) { + listener->panelChanged(Evlocallabcolorfl, + colorfl->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + if (a == detail) { if (listener) { listener->panelChanged(Evlocallabdetail, @@ -4912,6 +6103,36 @@ void LocallabLog::adjusterChanged(Adjuster* a, double newval) } } + if (a == recothresl) { + + if (listener) { + listener->panelChanged(Evlocallabrecothresl, + recothresl->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == lowthresl) { + if (listener) { + listener->panelChanged(Evlocallablowthresl, + lowthresl->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == higthresl) { + if (listener) { + listener->panelChanged(Evlocallabhigthresl, + higthresl->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == decayl) { + if (listener) { + listener->panelChanged(Evlocallabdecayl, + decayl->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == sensilog) { if (listener) { listener->panelChanged(Evlocallabsensilog, @@ -4932,13 +6153,36 @@ void LocallabLog::adjusterChanged(Adjuster* a, double newval) anglog->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); } } + + if (a == blendmaskL) { + if (listener) { + listener->panelChanged(EvLocallabblendmaskL, + blendmaskL->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == radmaskL) { + if (listener) { + listener->panelChanged(EvLocallabradmaskL, + radmaskL->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == chromaskL) { + if (listener) { + listener->panelChanged(EvLocallabchromaskL, + chromaskL->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + } } -void LocallabLog::updateAutocompute(const float blackev, const float whiteev, const float sourceg, const float targetg) +void LocallabLog::updateAutocompute(const float blackev, const float whiteev, const float sourceg, const float sourceab, const float targetg) { idle_register.add( - [this, blackev, whiteev, sourceg, targetg]() -> bool { + [this, blackev, whiteev, sourceg, sourceab, targetg]() -> bool { GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected // Update adjuster values according to autocomputed ones @@ -4947,6 +6191,7 @@ void LocallabLog::updateAutocompute(const float blackev, const float whiteev, co blackEv->setValue(blackev); whiteEv->setValue(whiteev); sourceGray->setValue(sourceg); + sourceabs->setValue(sourceab); targetGray->setValue(targetg); enableListener(); @@ -4971,6 +6216,27 @@ void LocallabLog::enabledChanged() } } +void LocallabLog::sursourChanged() +{ + if (isLocActivated && exp->getEnabled()) { + if (listener) { + listener->panelChanged(Evlocallabsursour, + sursour->get_active_text() + " (" + escapeHtmlChars(spotName) + ")"); + } + } +} + + +void LocallabLog::surroundChanged() +{ + if (isLocActivated && exp->getEnabled()) { + if (listener) { + listener->panelChanged(Evlocallabsurround, + surround->get_active_text() + " (" + escapeHtmlChars(spotName) + ")"); + } + } +} + void LocallabLog::autocomputeToggled() { // Update Log Encoding GUI according to autocompute button state @@ -4989,6 +6255,48 @@ void LocallabLog::autocomputeToggled() } } +void LocallabLog::ciecamChanged() +{ + /* + if(ciecam->get_active()){ + sourceabs->set_sensitive(true); + targabs->set_sensitive(true); + catad->set_sensitive(true); + surrHBox->set_sensitive(true); + + sourceabs->show(); + targabs->show(); + catad->show(); + saturl->show(); + lightl->show(); + contl->show(); + contq->show(); + surrHBox->show(); + } else { + sourceabs->hide(); + targabs->hide(); + saturl->hide(); + contl->hide(); + lightl->hide(); + contq->hide(); + catad->hide(); + surrHBox->hide(); + } +*/ + if (isLocActivated && exp->getEnabled()) { + if (listener) { + if (ciecam->get_active()) { + listener->panelChanged(Evlocallabciecam, + M("GENERAL_ENABLED") + " (" + escapeHtmlChars(spotName) + ")"); + } else { + listener->panelChanged(Evlocallabciecam, + M("GENERAL_DISABLED") + " (" + escapeHtmlChars(spotName) + ")"); + } + } + } +} + + void LocallabLog::fullimageChanged() { if (isLocActivated && exp->getEnabled()) { @@ -5004,6 +6312,25 @@ void LocallabLog::fullimageChanged() } } +void LocallabLog::updateMaskBackground(const double normChromar, const double normLumar, const double normHuer) +{ + idle_register.add( + [this, normHuer, normLumar, normChromar]() -> bool { + GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected + + // Update mask background + CCmaskshapeL->updateLocallabBackground(normChromar); + LLmaskshapeL->updateLocallabBackground(normLumar); + HHmaskshapeL->updateLocallabBackground(normHuer); + LmaskshapeL->updateLocallabBackground(normLumar); + + return false; + } + ); +} + + + void LocallabLog::AutograyChanged() { if (isLocActivated && exp->getEnabled()) { @@ -5019,17 +6346,59 @@ void LocallabLog::AutograyChanged() } } +void LocallabLog::updateLogGUI2() +{ + /* + if(ciecam->get_active()){ + sourceabs->show(); + targabs->show(); + catad->show(); + saturl->show(); + contl->show(); + lightl->show(); + contq->show(); + surrHBox->show(); + } else { + sourceabs->hide(); + targabs->hide(); + catad->hide(); + saturl->hide(); + lightl->hide(); + contl->hide(); + contq->hide(); + surrHBox->hide(); + } + */ +} + + void LocallabLog::updateLogGUI() { + const int mode = complexity->get_active_row_number(); + if (autocompute->get_active()) { blackEv->set_sensitive(false); whiteEv->set_sensitive(false); sourceGray->set_sensitive(false); + if (mode == Expert || mode == Normal) { + sourceabs->set_sensitive(false); + } else { + sourceabs->hide(); + } } else { blackEv->set_sensitive(true); whiteEv->set_sensitive(true); sourceGray->set_sensitive(true); + if (mode == Expert || mode == Normal){ + sourceabs->set_sensitive(true); + } else { + sourceabs->hide(); + } } + if (mode == Expert || mode == Normal) { // Keep widget hidden in Simple mode + exprecovl->show(); + } + } @@ -5044,10 +6413,11 @@ LocallabMask::LocallabMask(): softradiusmask(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.5, 1.))), showmask_Method(Gtk::manage(new MyComboBoxText())), enamask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), - mask_CurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASKCOL"))), - CCmask_shape(static_cast(mask_CurveEditorG->addCurve(CT_Flat, "C(C)", nullptr, false, false))), - LLmask_shape(static_cast(mask_CurveEditorG->addCurve(CT_Flat, "L(L)", nullptr, false, false))), - HHmask_shape(static_cast(mask_CurveEditorG->addCurve(CT_Flat, "LC(H)", nullptr, false, true))), +// mask_CurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASKCOL"))), + mask_CurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, "", 1)), + CCmask_shape(static_cast(mask_CurveEditorG->addCurve(CT_Flat, "C", nullptr, false, false))), + LLmask_shape(static_cast(mask_CurveEditorG->addCurve(CT_Flat, "L", nullptr, false, false))), + HHmask_shape(static_cast(mask_CurveEditorG->addCurve(CT_Flat, "LC(h)", nullptr, false, true))), struFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LABSTRUM")))), strumaskmask(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRUMASKCOL"), 0., 200., 0.1, 0.))), toolmask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_TOOLCOL")))), @@ -5063,7 +6433,7 @@ LocallabMask::LocallabMask(): slopmask(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), shadmask(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHAMASKCOL"), 0, 100, 1, 0))), mask_HCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASKH"))), - HHhmask_shape(static_cast(mask_HCurveEditorG->addCurve(CT_Flat, "H(H)", nullptr, false, true))), + HHhmask_shape(static_cast(mask_HCurveEditorG->addCurve(CT_Flat, "h(h)", nullptr, false, true))), mask2CurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK2"))), Lmask_shape(static_cast(mask2CurveEditorG->addCurve(CT_Diagonal, "L(L)"))), mask2CurveEditorGwav(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_WAVMASK"))), @@ -5073,6 +6443,9 @@ LocallabMask::LocallabMask(): str_mask(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADSTR"), -2., 2., 0.05, 0.))), ang_mask(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADANG"), -180., 180., 0.1, 0.))) { + + set_orientation(Gtk::ORIENTATION_VERTICAL); + const LocallabParams::LocallabSpot defSpot; // Parameter Mask common specific widgets @@ -5234,7 +6607,7 @@ void LocallabMask::resetMaskView() showmask_MethodConn.block(false); } -void LocallabMask::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &maskMask) +void LocallabMask::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask) { maskMask = showmask_Method->get_active_row_number(); } diff --git a/rtgui/metadatapanel.cc b/rtgui/metadatapanel.cc index f92152763..e26444ccc 100644 --- a/rtgui/metadatapanel.cc +++ b/rtgui/metadatapanel.cc @@ -28,8 +28,9 @@ using namespace rtengine::procparams; MetaDataPanel::MetaDataPanel() : EvMetaDataMode(ProcEventMapper::getInstance()->newEvent(M_VOID, "HISTORY_MSG_METADATA_MODE")) { + set_orientation(Gtk::ORIENTATION_VERTICAL); - Gtk::HBox *box = Gtk::manage(new Gtk::HBox()); + Gtk::Box *box = Gtk::manage(new Gtk::Box()); box->pack_start(*Gtk::manage(new Gtk::Label(M("TP_METADATA_MODE") + ": ")), Gtk::PACK_SHRINK, 4); metadataMode = Gtk::manage(new MyComboBoxText()); metadataMode->append(M("TP_METADATA_TUNNEL")); diff --git a/rtgui/metadatapanel.h b/rtgui/metadatapanel.h index b39ffd2c1..bc74ac484 100644 --- a/rtgui/metadatapanel.h +++ b/rtgui/metadatapanel.h @@ -24,7 +24,7 @@ #include "exifpanel.h" #include "iptcpanel.h" -class MetaDataPanel: public Gtk::VBox, public ToolPanel { +class MetaDataPanel: public Gtk::Box, public ToolPanel { private: rtengine::ProcEvent EvMetaDataMode; MyComboBoxText *metadataMode; diff --git a/rtgui/navigator.cc b/rtgui/navigator.cc index 9397cfc67..42f605fa2 100644 --- a/rtgui/navigator.cc +++ b/rtgui/navigator.cc @@ -72,10 +72,10 @@ Navigator::Navigator() : ); set_label (M("MAIN_MSG_NAVIGATOR")); - Gtk::VBox* mbox = Gtk::manage (new Gtk::VBox ()); - mbox->set_name("Navigator"); + set_name("Navigator"); + Gtk::Box* mbox = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); previewWindow = Gtk::manage (new PreviewWindow ()); - mbox->pack_start (*previewWindow, Gtk::PACK_SHRINK, 2); + mbox->pack_start (*previewWindow, Gtk::PACK_EXPAND_WIDGET, 2); dimension = Gtk::manage (new Gtk::Label ()); mbox->pack_start (*dimension, Gtk::PACK_SHRINK, 2); position = Gtk::manage (new Gtk::Label ()); @@ -102,6 +102,17 @@ Navigator::Navigator() : lLAB_A->set_alignment(Gtk::ALIGN_START); lLAB_B->set_alignment(Gtk::ALIGN_START); lLAB_L->set_alignment(Gtk::ALIGN_START); + + // expand labels + lR->set_hexpand(); + lG->set_hexpand(); + lB->set_hexpand(); + lH->set_hexpand(); + lS->set_hexpand(); + lV->set_hexpand(); + lLAB_A->set_hexpand(); + lLAB_B->set_hexpand(); + lLAB_L->set_hexpand(); //values R = Gtk::manage (new Gtk::Label ()); @@ -172,72 +183,66 @@ Navigator::Navigator() : */ // setup the tables - Gtk::Table* table0 = Gtk::manage (new Gtk::Table (1, 3)); //rows, cols The main table container + Gtk::Grid* table0 = Gtk::manage (new Gtk::Grid()); //rows, cols The main table container // let's pack tables1,2-3 into table0 // RGB Gtk::EventBox *evBox1 = Gtk::manage (new Gtk::EventBox()); - Gtk::HBox* hbox1 = Gtk::manage (new Gtk::HBox ()); // container - Gtk::Table* table1 = Gtk::manage (new Gtk::Table (3, 2)); - - table1->attach (*lR, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 4, 0); - table1->attach (*R, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 0, 0); - - table1->attach (*lG, 0, 1, 1, 2, Gtk::SHRINK, Gtk::SHRINK, 4, 0); - table1->attach (*G, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 0, 0); - - table1->attach (*lB, 0, 1, 2, 3, Gtk::SHRINK, Gtk::SHRINK, 4, 0); - table1->attach (*B, 1, 2, 2, 3, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 0, 0); + Gtk::Box* hbox1 = Gtk::manage (new Gtk::Box ()); + Gtk::Grid* table1 = Gtk::manage (new Gtk::Grid()); + + table1->attach(*lR, 0, 0, 1, 1); + table1->attach(*R, 1, 0, 1, 1); + table1->attach(*lG, 0, 1, 1, 1); + table1->attach(*G, 1, 1, 1, 1); + table1->attach(*lB, 0, 2, 1, 1); + table1->attach(*B, 1, 2, 1, 1); evBox1->add (*table1); evBox1->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &Navigator::cycleUnitsRGB)); hbox1->pack_start (*evBox1, Gtk::PACK_EXPAND_WIDGET, 4); - hbox1->pack_start (*Gtk::manage (new Gtk::VSeparator()), Gtk::PACK_SHRINK, 4); - table0->attach (*hbox1, 0, 1, 0, 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 0, 0); + hbox1->pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)), Gtk::PACK_SHRINK, 4); + table0->attach(*hbox1, 0, 0, 1, 1); // HSV Gtk::EventBox *evBox2 = Gtk::manage (new Gtk::EventBox()); - Gtk::HBox* hbox2 = Gtk::manage (new Gtk::HBox ()); // container - Gtk::Table* table2 = Gtk::manage (new Gtk::Table (3, 2)); + Gtk::Box* hbox2 = Gtk::manage (new Gtk::Box ()); + Gtk::Grid* table2 = Gtk::manage (new Gtk::Grid()); - table2->attach (*lH, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 4, 0); - table2->attach (*H, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 0, 0); - - table2->attach (*lS, 0, 1, 1, 2, Gtk::SHRINK, Gtk::SHRINK, 4, 0); - table2->attach (*S, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 0, 0); - - table2->attach (*lV, 0, 1, 2, 3, Gtk::SHRINK, Gtk::SHRINK, 4, 0); - table2->attach (*V, 1, 2, 2, 3, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 0, 0); + table2->attach(*lH, 0, 0, 1, 1); + table2->attach(*H, 1, 0, 1, 1); + table2->attach(*lS, 0, 1, 1, 1); + table2->attach(*S, 1, 1, 1, 1); + table2->attach(*lV, 0, 2, 1, 1); + table2->attach(*V, 1, 2, 1, 1); evBox2->add (*table2); evBox2->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &Navigator::cycleUnitsHSV)); hbox2->pack_start (*evBox2, Gtk::PACK_EXPAND_WIDGET, 4); - hbox2->pack_start (*Gtk::manage (new Gtk::VSeparator()), Gtk::PACK_SHRINK, 4); - table0->attach (*hbox2, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 0, 0); + hbox2->pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)), Gtk::PACK_SHRINK, 4); + table0->attach(*hbox2, 1, 0, 1, 1); // LAB - Gtk::HBox* hbox3 = Gtk::manage (new Gtk::HBox ()); // container - Gtk::Table* table3 = Gtk::manage (new Gtk::Table (3, 2)); + Gtk::Box* hbox3 = Gtk::manage (new Gtk::Box ()); + Gtk::Grid* table3 = Gtk::manage (new Gtk::Grid()); - table3->attach (*lLAB_L, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 4, 0); - table3->attach (*LAB_L, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 0, 0); - - table3->attach (*lLAB_A, 0, 1, 1, 2, Gtk::SHRINK, Gtk::SHRINK, 4, 0); - table3->attach (*LAB_A, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 0, 0); - - table3->attach (*lLAB_B, 0, 1, 2, 3, Gtk::SHRINK, Gtk::SHRINK, 4, 0); - table3->attach (*LAB_B, 1, 2, 2, 3, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 0, 0); + table3->attach(*lLAB_L, 0, 0, 1, 1); + table3->attach(*LAB_L, 1, 0, 1, 1); + table3->attach(*lLAB_A, 0, 1, 1, 1); + table3->attach(*LAB_A, 1, 1, 1, 1); + table3->attach(*lLAB_B, 0, 2, 1, 1); + table3->attach(*LAB_B, 1, 2, 1, 1); hbox3->pack_start (*table3, Gtk::PACK_EXPAND_WIDGET, 4); - hbox3->pack_start (*Gtk::manage (new Gtk::HBox()), Gtk::PACK_SHRINK, 2); - table0->attach (*hbox3, 2, 3, 0, 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 0, 0); + hbox3->pack_start (*Gtk::manage (new Gtk::Box()), Gtk::PACK_SHRINK, 2); + table0->attach(*hbox3, 2, 0, 1, 1); - table0->set_homogeneous(true); // all cells will be the same size as the largest cell. + table0->set_column_homogeneous(true); // all cells will have equal width - mbox->pack_start (*table0, Gtk::PACK_EXPAND_WIDGET, 2); + mbox->pack_start (*table0, Gtk::PACK_SHRINK, 2); add (*mbox); setInvalid (); diff --git a/rtgui/options.cc b/rtgui/options.cc index 99e1b9f08..ce03db434 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -400,6 +400,7 @@ void Options::setDefaults() overwriteOutputFile = false; // if TRUE, existing output JPGs/PNGs are overwritten, instead of adding ..-1.jpg, -2.jpg etc. theme = "RawTherapee"; maxThumbnailHeight = 250; + maxThumbnailWidth = 800; maxCacheEntries = 20000; thumbInterp = 1; autoSuffix = true; @@ -446,12 +447,16 @@ void Options::setDefaults() histogramBlue = true; histogramLuma = false; histogramChroma = false; - histogramRAW = false; histogramBar = true; histogramHeight = 200; histogramDrawMode = 0; + histogramScopeType = ScopeType::HISTOGRAM; + histogramShowOptionButtons = false; + histogramTraceBrightness = 1; curvebboxpos = 1; complexity = 2; + inspectorWindow = false; + zoomOnScroll = true; prevdemo = PD_Sidecar; rgbDenoiseThreadLimit = 0; @@ -1017,6 +1022,10 @@ void Options::readFromFile(Glib::ustring fname) maxThumbnailHeight = keyFile.get_integer("File Browser", "MaxPreviewHeight"); } + if (keyFile.has_key("File Browser", "MaxPreviewWidth")) { + maxThumbnailWidth = keyFile.get_integer("File Browser", "MaxPreviewWidth"); + } + if (keyFile.has_key("File Browser", "MaxCacheEntries")) { maxCacheEntries = keyFile.get_integer("File Browser", "MaxCacheEntries"); } @@ -1417,7 +1426,10 @@ void Options::readFromFile(Glib::ustring fname) } if (keyFile.has_key("GUI", "HistogramRAW")) { - histogramRAW = keyFile.get_boolean("GUI", "HistogramRAW"); + // Legacy option, replaced by HistogramScopeType. + if (keyFile.get_boolean("GUI", "HistogramRAW")) { + histogramScopeType = ScopeType::HISTOGRAM_RAW; + } } if (keyFile.has_key("GUI", "HistogramBar")) { @@ -1432,6 +1444,18 @@ void Options::readFromFile(Glib::ustring fname) histogramDrawMode = keyFile.get_integer("GUI", "HistogramDrawMode"); } + if (keyFile.has_key("GUI", "HistogramScopeType")) { + histogramScopeType = static_cast(keyFile.get_integer("GUI", "HistogramScopeType")); + } + + if (keyFile.has_key("GUI", "HistogramShowOptionButtons")) { + histogramShowOptionButtons = keyFile.get_boolean("GUI", "HistogramShowOptionButtons"); + } + + if (keyFile.has_key("GUI", "HistogramTraceBrightness")) { + histogramTraceBrightness = keyFile.get_double("GUI", "HistogramTraceBrightness"); + } + if (keyFile.has_key("GUI", "NavigatorRGBUnit")) { navRGBUnit = (NavigatorUnit)keyFile.get_integer("GUI", "NavigatorRGBUnit"); } @@ -1469,6 +1493,13 @@ void Options::readFromFile(Glib::ustring fname) complexity = keyFile.get_integer("GUI", "Complexity"); } + if (keyFile.has_key("GUI", "InspectorWindow")) { + inspectorWindow = keyFile.get_boolean("GUI", "InspectorWindow"); + } + + if (keyFile.has_key("GUI", "ZoomOnScroll")) { + zoomOnScroll = keyFile.get_boolean("GUI", "ZoomOnScroll"); + } } if (keyFile.has_group("Crop Settings")) { @@ -2097,6 +2128,7 @@ void Options::saveToFile(Glib::ustring fname) 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", "MaxPreviewWidth", maxThumbnailWidth); keyFile.set_integer("File Browser", "MaxCacheEntries", maxCacheEntries); Glib::ArrayHandle pext = parseExtensions; keyFile.set_string_list("File Browser", "ParseExtensions", pext); @@ -2251,10 +2283,12 @@ void Options::saveToFile(Glib::ustring fname) keyFile.set_boolean("GUI", "HistogramBlue", histogramBlue); keyFile.set_boolean("GUI", "HistogramLuma", histogramLuma); keyFile.set_boolean("GUI", "HistogramChroma", histogramChroma); - keyFile.set_boolean("GUI", "HistogramRAW", histogramRAW); keyFile.set_boolean("GUI", "HistogramBar", histogramBar); keyFile.set_integer("GUI", "HistogramHeight", histogramHeight); keyFile.set_integer("GUI", "HistogramDrawMode", histogramDrawMode); + keyFile.set_integer("GUI", "HistogramScopeType", rtengine::toUnderlying(histogramScopeType)); + keyFile.set_boolean("GUI", "HistogramShowOptionButtons", histogramShowOptionButtons); + keyFile.set_double("GUI", "HistogramTraceBrightness", histogramTraceBrightness); keyFile.set_integer("GUI", "NavigatorRGBUnit", (int)navRGBUnit); keyFile.set_integer("GUI", "NavigatorHSVUnit", (int)navHSVUnit); keyFile.set_boolean("GUI", "ShowFilmStripToolBar", showFilmStripToolBar); @@ -2264,6 +2298,8 @@ void Options::saveToFile(Glib::ustring fname) keyFile.set_integer("GUI", "CurveBBoxPosition", curvebboxpos); keyFile.set_boolean("GUI", "Showtooltip", showtooltip); keyFile.set_integer("GUI", "Complexity", complexity); + keyFile.set_boolean("GUI", "InspectorWindow", inspectorWindow); + keyFile.set_boolean("GUI", "ZoomOnScroll", zoomOnScroll); //Glib::ArrayHandle crvopen = crvOpen; //keyFile.set_integer_list ("GUI", "CurvePanelsExpanded", crvopen); diff --git a/rtgui/options.h b/rtgui/options.h index 02d62292c..03b551efe 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -168,13 +168,23 @@ private: const Glib::ustring& entryName, Glib::ustring& destination); public: - enum class NavigatorUnit { PERCENT, R0_255, R0_1, _COUNT }; + + enum class ScopeType { + NONE = -1, + HISTOGRAM, + HISTOGRAM_RAW, + PARADE, + VECTORSCOPE_HC, + VECTORSCOPE_HS, + WAVEFORM + }; + bool savesParamsAtExit; SaveFormat saveFormat, saveFormatBatch; Glib::ustring savePathTemplate; @@ -271,6 +281,7 @@ public: CPBKeyType CPBKeys; // Custom Profile Builder's key type int editorToSendTo; int maxThumbnailHeight; + int maxThumbnailWidth; std::size_t maxCacheEntries; int thumbInterp; // 0: nearest, 1: bilinear std::vector parseExtensions; // List containing all extensions type @@ -289,6 +300,8 @@ public: bool internalThumbIfUntouched; bool overwriteOutputFile; int complexity; + bool inspectorWindow; // open inspector in spearate window + bool zoomOnScroll; // translate scroll events to zoom std::vector thumbnailZoomRatios; bool overlayedFileNames; @@ -308,10 +321,13 @@ public: int histogramPosition; // 0=disabled, 1=left pane, 2=right pane bool histogramRed, histogramGreen, histogramBlue; - bool histogramLuma, histogramChroma, histogramRAW; + bool histogramLuma, histogramChroma; bool histogramBar; int histogramHeight; int histogramDrawMode; + ScopeType histogramScopeType; + bool histogramShowOptionButtons; + float histogramTraceBrightness; bool FileBrowserToolbarSingleRow; bool hideTPVScrollbar; int whiteBalanceSpotSize; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 024806556..1fdefc0a3 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -47,6 +47,7 @@ void ParamsEdited::set(bool v) toneCurve.saturation = v; toneCurve.shcompr = v; toneCurve.hlcompr = v; + toneCurve.hlbl = v; toneCurve.hlcomprthresh = v; toneCurve.autoexp = v; toneCurve.clip = v; @@ -244,6 +245,9 @@ void ParamsEdited::set(bool v) colorappearance.curveMode = v; colorappearance.curveMode2 = v; colorappearance.curveMode3 = v; + colorappearance.complexmethod = v; + colorappearance.modelmethod = v; + colorappearance.catmethod = v; colorappearance.tempout = v; colorappearance.autotempout = v; colorappearance.greenout = v; @@ -669,13 +673,15 @@ void ParamsEdited::set(bool v) dehaze.strength = v; dehaze.showDepthMap = v; dehaze.depth = v; - dehaze.luminance = v; + dehaze.saturation = v; metadata.mode = v; filmNegative.enabled = v; filmNegative.redRatio = v; filmNegative.greenExp = v; filmNegative.blueRatio = v; - filmNegative.baseValues = v; + filmNegative.refInput = v; + filmNegative.refOutput = v; + filmNegative.colorSpace = v; raw.preprocessWB.mode = v; exif = v; @@ -715,6 +721,7 @@ void ParamsEdited::initFrom(const std::vector& toneCurve.saturation = toneCurve.saturation && p.toneCurve.saturation == other.toneCurve.saturation; toneCurve.shcompr = toneCurve.shcompr && p.toneCurve.shcompr == other.toneCurve.shcompr; toneCurve.hlcompr = toneCurve.hlcompr && p.toneCurve.hlcompr == other.toneCurve.hlcompr; + toneCurve.hlbl = toneCurve.hlbl && p.toneCurve.hlbl == other.toneCurve.hlbl; toneCurve.hlcomprthresh = toneCurve.hlcomprthresh && p.toneCurve.hlcomprthresh == other.toneCurve.hlcomprthresh; toneCurve.autoexp = toneCurve.autoexp && p.toneCurve.autoexp == other.toneCurve.autoexp; toneCurve.clip = toneCurve.clip && p.toneCurve.clip == other.toneCurve.clip; @@ -912,6 +919,9 @@ void ParamsEdited::initFrom(const std::vector& colorappearance.curveMode = colorappearance.curveMode && p.colorappearance.curveMode == other.colorappearance.curveMode; colorappearance.curveMode2 = colorappearance.curveMode2 && p.colorappearance.curveMode2 == other.colorappearance.curveMode2; colorappearance.curveMode3 = colorappearance.curveMode3 && p.colorappearance.curveMode3 == other.colorappearance.curveMode3; + colorappearance.complexmethod = colorappearance.complexmethod && p.colorappearance.complexmethod == other.colorappearance.complexmethod; + colorappearance.modelmethod = colorappearance.modelmethod && p.colorappearance.modelmethod == other.colorappearance.modelmethod; + colorappearance.catmethod = colorappearance.catmethod && p.colorappearance.catmethod == other.colorappearance.catmethod; colorappearance.tempout = colorappearance.tempout && p.colorappearance.tempout == other.colorappearance.tempout; colorappearance.autotempout = colorappearance.autotempout && p.colorappearance.autotempout == other.colorappearance.autotempout; colorappearance.greenout = colorappearance.greenout && p.colorappearance.greenout == other.colorappearance.greenout; @@ -1068,11 +1078,13 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).balanh = locallab.spots.at(j).balanh && pSpot.balanh == otherSpot.balanh; locallab.spots.at(j).colorde = locallab.spots.at(j).colorde && pSpot.colorde == otherSpot.colorde; locallab.spots.at(j).colorscope = locallab.spots.at(j).colorscope && pSpot.colorscope == otherSpot.colorscope; + locallab.spots.at(j).avoidrad = locallab.spots.at(j).avoidrad && pSpot.avoidrad == otherSpot.avoidrad; locallab.spots.at(j).transitweak = locallab.spots.at(j).transitweak && pSpot.transitweak == otherSpot.transitweak; locallab.spots.at(j).transitgrad = locallab.spots.at(j).transitgrad && pSpot.transitgrad == otherSpot.transitgrad; locallab.spots.at(j).hishow = locallab.spots.at(j).hishow && pSpot.hishow == otherSpot.hishow; locallab.spots.at(j).activ = locallab.spots.at(j).activ && pSpot.activ == otherSpot.activ; locallab.spots.at(j).avoid = locallab.spots.at(j).avoid && pSpot.avoid == otherSpot.avoid; + locallab.spots.at(j).avoidmun = locallab.spots.at(j).avoidmun && pSpot.avoidmun == otherSpot.avoidmun; locallab.spots.at(j).blwh = locallab.spots.at(j).blwh && pSpot.blwh == otherSpot.blwh; locallab.spots.at(j).recurs = locallab.spots.at(j).recurs && pSpot.recurs == otherSpot.recurs; locallab.spots.at(j).laplac = locallab.spots.at(j).laplac && pSpot.laplac == otherSpot.laplac; @@ -1145,6 +1157,10 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).Lmaskcurve = locallab.spots.at(j).Lmaskcurve && pSpot.Lmaskcurve == otherSpot.Lmaskcurve; locallab.spots.at(j).LLmaskcolcurvewav = locallab.spots.at(j).LLmaskcolcurvewav && pSpot.LLmaskcolcurvewav == otherSpot.LLmaskcolcurvewav; locallab.spots.at(j).csthresholdcol = locallab.spots.at(j).csthresholdcol && pSpot.csthresholdcol == otherSpot.csthresholdcol; + locallab.spots.at(j).recothresc = locallab.spots.at(j).recothresc && pSpot.recothresc == otherSpot.recothresc; + locallab.spots.at(j).lowthresc = locallab.spots.at(j).lowthresc && pSpot.lowthresc == otherSpot.lowthresc; + locallab.spots.at(j).higthresc = locallab.spots.at(j).higthresc && pSpot.higthresc == otherSpot.higthresc; + locallab.spots.at(j).decayc = locallab.spots.at(j).decayc && pSpot.decayc == otherSpot.decayc; // Exposure locallab.spots.at(j).visiexpose = locallab.spots.at(j).visiexpose && pSpot.visiexpose == otherSpot.visiexpose; locallab.spots.at(j).expexpose = locallab.spots.at(j).expexpose && pSpot.expexpose == otherSpot.expexpose; @@ -1162,6 +1178,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).strexp = locallab.spots.at(j).strexp && pSpot.strexp == otherSpot.strexp; locallab.spots.at(j).angexp = locallab.spots.at(j).angexp && pSpot.angexp == otherSpot.angexp; locallab.spots.at(j).excurve = locallab.spots.at(j).excurve && pSpot.excurve == otherSpot.excurve; + locallab.spots.at(j).norm = locallab.spots.at(j).norm && pSpot.norm == otherSpot.norm; locallab.spots.at(j).inversex = locallab.spots.at(j).inversex && pSpot.inversex == otherSpot.inversex; locallab.spots.at(j).enaExpMask = locallab.spots.at(j).enaExpMask && pSpot.enaExpMask == otherSpot.enaExpMask; locallab.spots.at(j).enaExpMaskaft = locallab.spots.at(j).enaExpMaskaft && pSpot.enaExpMaskaft == otherSpot.enaExpMaskaft; @@ -1188,6 +1205,10 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).fatdetail = locallab.spots.at(j).fatdetail && pSpot.fatdetail == otherSpot.fatdetail; locallab.spots.at(j).fatanchor = locallab.spots.at(j).fatanchor && pSpot.fatanchor == otherSpot.fatanchor; locallab.spots.at(j).fatlevel = locallab.spots.at(j).fatlevel && pSpot.fatlevel == otherSpot.fatlevel; + locallab.spots.at(j).recothrese = locallab.spots.at(j).recothrese && pSpot.recothrese == otherSpot.recothrese; + locallab.spots.at(j).lowthrese = locallab.spots.at(j).lowthrese && pSpot.lowthrese == otherSpot.lowthrese; + locallab.spots.at(j).higthrese = locallab.spots.at(j).higthrese && pSpot.higthrese == otherSpot.higthrese; + locallab.spots.at(j).decaye = locallab.spots.at(j).decaye && pSpot.decaye == otherSpot.decaye; // Shadow highlight locallab.spots.at(j).visishadhigh = locallab.spots.at(j).visishadhigh && pSpot.visishadhigh == otherSpot.visishadhigh; locallab.spots.at(j).expshadhigh = locallab.spots.at(j).expshadhigh && pSpot.expshadhigh == otherSpot.expshadhigh; @@ -1224,6 +1245,10 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).fatanchorSH = locallab.spots.at(j).fatanchorSH && pSpot.fatanchorSH == otherSpot.fatanchorSH; locallab.spots.at(j).gamSH = locallab.spots.at(j).gamSH && pSpot.gamSH == otherSpot.gamSH; locallab.spots.at(j).sloSH = locallab.spots.at(j).sloSH && pSpot.sloSH == otherSpot.sloSH; + locallab.spots.at(j).recothress = locallab.spots.at(j).recothress && pSpot.recothress == otherSpot.recothress; + locallab.spots.at(j).lowthress = locallab.spots.at(j).lowthress && pSpot.lowthress == otherSpot.lowthress; + locallab.spots.at(j).higthress = locallab.spots.at(j).higthress && pSpot.higthress == otherSpot.higthress; + locallab.spots.at(j).decays = locallab.spots.at(j).decays && pSpot.decays == otherSpot.decays; // Vibrance locallab.spots.at(j).visivibrance = locallab.spots.at(j).visivibrance && pSpot.visivibrance == otherSpot.visivibrance; locallab.spots.at(j).expvibrance = locallab.spots.at(j).expvibrance && pSpot.expvibrance == otherSpot.expvibrance; @@ -1252,6 +1277,10 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).strvibh = locallab.spots.at(j).strvibh && pSpot.strvibh == otherSpot.strvibh; locallab.spots.at(j).angvib = locallab.spots.at(j).angvib && pSpot.angvib == otherSpot.angvib; locallab.spots.at(j).Lmaskvibcurve = locallab.spots.at(j).Lmaskvibcurve && pSpot.Lmaskvibcurve == otherSpot.Lmaskvibcurve; + locallab.spots.at(j).recothresv = locallab.spots.at(j).recothresv && pSpot.recothresv == otherSpot.recothresv; + locallab.spots.at(j).lowthresv = locallab.spots.at(j).lowthresv && pSpot.lowthresv == otherSpot.lowthresv; + locallab.spots.at(j).higthresv = locallab.spots.at(j).higthresv && pSpot.higthresv == otherSpot.higthresv; + locallab.spots.at(j).decayv = locallab.spots.at(j).decayv && pSpot.decayv == otherSpot.decayv; // Soft Light locallab.spots.at(j).visisoft = locallab.spots.at(j).visisoft && pSpot.visisoft == otherSpot.visisoft; locallab.spots.at(j).expsoft = locallab.spots.at(j).expsoft && pSpot.expsoft == otherSpot.expsoft; @@ -1270,14 +1299,30 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).itera = locallab.spots.at(j).itera && pSpot.itera == otherSpot.itera; locallab.spots.at(j).guidbl = locallab.spots.at(j).guidbl && pSpot.guidbl == otherSpot.guidbl; locallab.spots.at(j).strbl = locallab.spots.at(j).strbl && pSpot.strbl == otherSpot.strbl; + locallab.spots.at(j).recothres = locallab.spots.at(j).recothres && pSpot.recothres == otherSpot.recothres; + locallab.spots.at(j).lowthres = locallab.spots.at(j).lowthres && pSpot.lowthres == otherSpot.lowthres; + locallab.spots.at(j).higthres = locallab.spots.at(j).higthres && pSpot.higthres == otherSpot.higthres; + locallab.spots.at(j).recothresd = locallab.spots.at(j).recothresd && pSpot.recothresd == otherSpot.recothresd; + locallab.spots.at(j).lowthresd = locallab.spots.at(j).lowthresd && pSpot.lowthresd == otherSpot.lowthresd; + locallab.spots.at(j).midthresd = locallab.spots.at(j).midthresd && pSpot.midthresd == otherSpot.midthresd; + locallab.spots.at(j).midthresdch = locallab.spots.at(j).midthresdch && pSpot.midthresdch == otherSpot.midthresdch; + locallab.spots.at(j).higthresd = locallab.spots.at(j).higthresd && pSpot.higthresd == otherSpot.higthresd; + locallab.spots.at(j).decayd = locallab.spots.at(j).decayd && pSpot.decayd == otherSpot.decayd; locallab.spots.at(j).isogr = locallab.spots.at(j).isogr && pSpot.isogr == otherSpot.isogr; locallab.spots.at(j).strengr = locallab.spots.at(j).strengr && pSpot.strengr == otherSpot.strengr; locallab.spots.at(j).scalegr = locallab.spots.at(j).scalegr && pSpot.scalegr == otherSpot.scalegr; + locallab.spots.at(j).divgr = locallab.spots.at(j).divgr && pSpot.divgr == otherSpot.divgr; locallab.spots.at(j).epsbl = locallab.spots.at(j).epsbl && pSpot.epsbl == otherSpot.epsbl; locallab.spots.at(j).blMethod = locallab.spots.at(j).blMethod && pSpot.blMethod == otherSpot.blMethod; locallab.spots.at(j).chroMethod = locallab.spots.at(j).chroMethod && pSpot.chroMethod == otherSpot.chroMethod; locallab.spots.at(j).quamethod = locallab.spots.at(j).quamethod && pSpot.quamethod == otherSpot.quamethod; locallab.spots.at(j).blurMethod = locallab.spots.at(j).blurMethod && pSpot.blurMethod == otherSpot.blurMethod; + locallab.spots.at(j).usemask = locallab.spots.at(j).usemask && pSpot.usemask == otherSpot.usemask; + locallab.spots.at(j).invmaskd = locallab.spots.at(j).invmaskd && pSpot.invmaskd == otherSpot.invmaskd; + locallab.spots.at(j).invmask = locallab.spots.at(j).invmask && pSpot.invmask == otherSpot.invmask; + locallab.spots.at(j).levelthr = locallab.spots.at(j).levelthr && pSpot.levelthr == otherSpot.levelthr; + locallab.spots.at(j).lnoiselow = locallab.spots.at(j).lnoiselow && pSpot.lnoiselow == otherSpot.lnoiselow; + locallab.spots.at(j).levelthrlow = locallab.spots.at(j).levelthrlow && pSpot.levelthrlow == otherSpot.levelthrlow; locallab.spots.at(j).medMethod = locallab.spots.at(j).medMethod && pSpot.medMethod == otherSpot.medMethod; locallab.spots.at(j).activlum = locallab.spots.at(j).activlum && pSpot.activlum == otherSpot.activlum; locallab.spots.at(j).noiselumf = locallab.spots.at(j).noiselumf && pSpot.noiselumf == otherSpot.noiselumf; @@ -1291,9 +1336,15 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).noisechrodetail = locallab.spots.at(j).noisechrodetail && pSpot.noisechrodetail == otherSpot.noisechrodetail; locallab.spots.at(j).adjblur = locallab.spots.at(j).adjblur && pSpot.adjblur == otherSpot.adjblur; locallab.spots.at(j).bilateral = locallab.spots.at(j).bilateral && pSpot.bilateral == otherSpot.bilateral; + locallab.spots.at(j).nlstr = locallab.spots.at(j).nlstr && pSpot.nlstr == otherSpot.nlstr; + locallab.spots.at(j).nldet = locallab.spots.at(j).nldet && pSpot.nldet == otherSpot.nldet; + locallab.spots.at(j).nlpat = locallab.spots.at(j).nlpat && pSpot.nlpat == otherSpot.nlpat; + locallab.spots.at(j).nlrad = locallab.spots.at(j).nlrad && pSpot.nlrad == otherSpot.nlrad; + locallab.spots.at(j).nlgam = locallab.spots.at(j).nlgam && pSpot.nlgam == otherSpot.nlgam; locallab.spots.at(j).sensiden = locallab.spots.at(j).sensiden && pSpot.sensiden == otherSpot.sensiden; locallab.spots.at(j).detailthr = locallab.spots.at(j).detailthr && pSpot.detailthr == otherSpot.detailthr; locallab.spots.at(j).locwavcurveden = locallab.spots.at(j).locwavcurveden && pSpot.locwavcurveden == otherSpot.locwavcurveden; + locallab.spots.at(j).locwavcurvehue = locallab.spots.at(j).locwavcurvehue && pSpot.locwavcurvehue == otherSpot.locwavcurvehue; locallab.spots.at(j).showmaskblMethodtyp = locallab.spots.at(j).showmaskblMethodtyp && pSpot.showmaskblMethodtyp == otherSpot.showmaskblMethodtyp; locallab.spots.at(j).CCmaskblcurve = locallab.spots.at(j).CCmaskblcurve && pSpot.CCmaskblcurve == otherSpot.CCmaskblcurve; locallab.spots.at(j).LLmaskblcurve = locallab.spots.at(j).LLmaskblcurve && pSpot.LLmaskblcurve == otherSpot.LLmaskblcurve; @@ -1340,6 +1391,10 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).slomasktm = locallab.spots.at(j).slomasktm && pSpot.slomasktm == otherSpot.slomasktm; locallab.spots.at(j).lapmasktm = locallab.spots.at(j).lapmasktm && pSpot.lapmasktm == otherSpot.lapmasktm; locallab.spots.at(j).Lmasktmcurve = locallab.spots.at(j).Lmasktmcurve && pSpot.Lmasktmcurve == otherSpot.Lmasktmcurve; + locallab.spots.at(j).recothrest = locallab.spots.at(j).recothrest && pSpot.recothrest == otherSpot.recothrest; + locallab.spots.at(j).lowthrest = locallab.spots.at(j).lowthrest && pSpot.lowthrest == otherSpot.lowthrest; + locallab.spots.at(j).higthrest = locallab.spots.at(j).higthrest && pSpot.higthrest == otherSpot.higthrest; + locallab.spots.at(j).decayt = locallab.spots.at(j).decayt && pSpot.decayt == otherSpot.decayt; // Retinex locallab.spots.at(j).visireti = locallab.spots.at(j).visireti && pSpot.visireti == otherSpot.visireti; locallab.spots.at(j).expreti = locallab.spots.at(j).expreti && pSpot.expreti == otherSpot.expreti; @@ -1358,7 +1413,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).inversret = locallab.spots.at(j).inversret && pSpot.inversret == otherSpot.inversret; locallab.spots.at(j).equilret = locallab.spots.at(j).equilret && pSpot.equilret == otherSpot.equilret; locallab.spots.at(j).loglin = locallab.spots.at(j).loglin && pSpot.loglin == otherSpot.loglin; - locallab.spots.at(j).lumonly = locallab.spots.at(j).lumonly && pSpot.lumonly == otherSpot.lumonly; + locallab.spots.at(j).dehazeSaturation = locallab.spots.at(j).dehazeSaturation && pSpot.dehazeSaturation == otherSpot.dehazeSaturation; locallab.spots.at(j).softradiusret = locallab.spots.at(j).softradiusret && pSpot.softradiusret == otherSpot.softradiusret; locallab.spots.at(j).CCmaskreticurve = locallab.spots.at(j).CCmaskreticurve && pSpot.CCmaskreticurve == otherSpot.CCmaskreticurve; locallab.spots.at(j).LLmaskreticurve = locallab.spots.at(j).LLmaskreticurve && pSpot.LLmaskreticurve == otherSpot.LLmaskreticurve; @@ -1378,6 +1433,10 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).cliptm = locallab.spots.at(j).cliptm && pSpot.cliptm == otherSpot.cliptm; locallab.spots.at(j).fftwreti = locallab.spots.at(j).fftwreti && pSpot.fftwreti == otherSpot.fftwreti; locallab.spots.at(j).Lmaskreticurve = locallab.spots.at(j).Lmaskreticurve && pSpot.Lmaskreticurve == otherSpot.Lmaskreticurve; + locallab.spots.at(j).recothresr = locallab.spots.at(j).recothresr && pSpot.recothresr == otherSpot.recothresr; + locallab.spots.at(j).lowthresr = locallab.spots.at(j).lowthresr && pSpot.lowthresr == otherSpot.lowthresr; + locallab.spots.at(j).higthresr = locallab.spots.at(j).higthresr && pSpot.higthresr == otherSpot.higthresr; + locallab.spots.at(j).decayr = locallab.spots.at(j).decayr && pSpot.decayr == otherSpot.decayr; // Sharpening locallab.spots.at(j).visisharp = locallab.spots.at(j).visisharp && pSpot.visisharp == otherSpot.visisharp; locallab.spots.at(j).expsharp = locallab.spots.at(j).expsharp && pSpot.expsharp == otherSpot.expsharp; @@ -1463,6 +1522,10 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).radmasklc = locallab.spots.at(j).radmasklc && pSpot.radmaskcb == otherSpot.radmasklc; locallab.spots.at(j).chromasklc = locallab.spots.at(j).chromasklc && pSpot.chromasklc == otherSpot.chromasklc; locallab.spots.at(j).Lmasklccurve = locallab.spots.at(j).Lmasklccurve && pSpot.Lmasklccurve == otherSpot.Lmasklccurve; + locallab.spots.at(j).recothresw = locallab.spots.at(j).recothresw && pSpot.recothresw == otherSpot.recothresw; + locallab.spots.at(j).lowthresw = locallab.spots.at(j).lowthresw && pSpot.lowthresw == otherSpot.lowthresw; + locallab.spots.at(j).higthresw = locallab.spots.at(j).higthresw && pSpot.higthresw == otherSpot.higthresw; + locallab.spots.at(j).decayw = locallab.spots.at(j).decayw && pSpot.decayw == otherSpot.decayw; // Contrast by detail levels locallab.spots.at(j).visicbdl = locallab.spots.at(j).visicbdl && pSpot.visicbdl == otherSpot.visicbdl; locallab.spots.at(j).expcbdl = locallab.spots.at(j).expcbdl && pSpot.expcbdl == otherSpot.expcbdl; @@ -1489,21 +1552,55 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).slomaskcb = locallab.spots.at(j).slomaskcb && pSpot.slomaskcb == otherSpot.slomaskcb; locallab.spots.at(j).lapmaskcb = locallab.spots.at(j).lapmaskcb && pSpot.lapmaskcb == otherSpot.lapmaskcb; locallab.spots.at(j).Lmaskcbcurve = locallab.spots.at(j).Lmaskcbcurve && pSpot.Lmaskcbcurve == otherSpot.Lmaskcbcurve; + locallab.spots.at(j).recothrescb = locallab.spots.at(j).recothrescb && pSpot.recothrescb == otherSpot.recothrescb; + locallab.spots.at(j).lowthrescb = locallab.spots.at(j).lowthrescb && pSpot.lowthrescb == otherSpot.lowthrescb; + locallab.spots.at(j).higthrescb = locallab.spots.at(j).higthrescb && pSpot.higthrescb == otherSpot.higthrescb; + locallab.spots.at(j).decaycb = locallab.spots.at(j).decaycb && pSpot.decaycb == otherSpot.decaycb; // Log encoding locallab.spots.at(j).visilog = locallab.spots.at(j).visilog && pSpot.visilog == otherSpot.visilog; locallab.spots.at(j).explog = locallab.spots.at(j).explog && pSpot.explog == otherSpot.explog; + locallab.spots.at(j).complexlog = locallab.spots.at(j).complexlog && pSpot.complexlog == otherSpot.complexlog; locallab.spots.at(j).autocompute = locallab.spots.at(j).autocompute && pSpot.autocompute == otherSpot.autocompute; locallab.spots.at(j).sourceGray = locallab.spots.at(j).sourceGray && pSpot.sourceGray == otherSpot.sourceGray; + locallab.spots.at(j).sourceabs = locallab.spots.at(j).sourceabs && pSpot.sourceabs == otherSpot.sourceabs; + locallab.spots.at(j).targabs = locallab.spots.at(j).targabs && pSpot.targabs == otherSpot.targabs; locallab.spots.at(j).targetGray = locallab.spots.at(j).targetGray && pSpot.targetGray == otherSpot.targetGray; + locallab.spots.at(j).catad = locallab.spots.at(j).catad && pSpot.catad == otherSpot.catad; + locallab.spots.at(j).saturl = locallab.spots.at(j).saturl && pSpot.saturl == otherSpot.saturl; + locallab.spots.at(j).lightl = locallab.spots.at(j).lightl && pSpot.lightl == otherSpot.lightl; + locallab.spots.at(j).lightq = locallab.spots.at(j).lightq && pSpot.lightq == otherSpot.lightq; + locallab.spots.at(j).contl = locallab.spots.at(j).contl && pSpot.contl == otherSpot.contl; + locallab.spots.at(j).contthres = locallab.spots.at(j).contthres && pSpot.contthres == otherSpot.contthres; + locallab.spots.at(j).contq = locallab.spots.at(j).contq && pSpot.contq == otherSpot.contq; + locallab.spots.at(j).colorfl = locallab.spots.at(j).colorfl && pSpot.colorfl == otherSpot.colorfl; + locallab.spots.at(j).LcurveL = locallab.spots.at(j).LcurveL && pSpot.LcurveL == otherSpot.LcurveL; locallab.spots.at(j).Autogray = locallab.spots.at(j).Autogray && pSpot.Autogray == otherSpot.Autogray; locallab.spots.at(j).fullimage = locallab.spots.at(j).fullimage && pSpot.fullimage == otherSpot.fullimage; + locallab.spots.at(j).ciecam = locallab.spots.at(j).ciecam && pSpot.ciecam == otherSpot.ciecam; + locallab.spots.at(j).enaLMask = locallab.spots.at(j).enaLMask && pSpot.enaLMask == otherSpot.enaLMask; + locallab.spots.at(j).repar = locallab.spots.at(j).repar && pSpot.repar == otherSpot.repar; locallab.spots.at(j).blackEv = locallab.spots.at(j).blackEv && pSpot.blackEv == otherSpot.blackEv; locallab.spots.at(j).whiteEv = locallab.spots.at(j).whiteEv && pSpot.whiteEv == otherSpot.whiteEv; locallab.spots.at(j).detail = locallab.spots.at(j).detail && pSpot.detail == otherSpot.detail; + locallab.spots.at(j).sursour = locallab.spots.at(j).sursour && pSpot.sursour == otherSpot.sursour; + locallab.spots.at(j).surround = locallab.spots.at(j).surround && pSpot.surround == otherSpot.surround; locallab.spots.at(j).sensilog = locallab.spots.at(j).sensilog && pSpot.sensilog == otherSpot.sensilog; locallab.spots.at(j).baselog = locallab.spots.at(j).baselog && pSpot.baselog == otherSpot.baselog; locallab.spots.at(j).strlog = locallab.spots.at(j).strlog && pSpot.strlog == otherSpot.strlog; locallab.spots.at(j).anglog = locallab.spots.at(j).anglog && pSpot.anglog == otherSpot.anglog; + locallab.spots.at(j).CCmaskcurveL = locallab.spots.at(j).CCmaskcurveL && pSpot.CCmaskcurveL == otherSpot.CCmaskcurveL; + locallab.spots.at(j).LLmaskcurveL = locallab.spots.at(j).LLmaskcurveL && pSpot.LLmaskcurveL == otherSpot.LLmaskcurveL; + locallab.spots.at(j).HHmaskcurveL = locallab.spots.at(j).HHmaskcurveL && pSpot.HHmaskcurveL == otherSpot.HHmaskcurveL; + locallab.spots.at(j).blendmaskL = locallab.spots.at(j).blendmaskL && pSpot.blendmaskL == otherSpot.blendmaskL; + locallab.spots.at(j).radmaskL = locallab.spots.at(j).radmaskL && pSpot.radmaskL == otherSpot.radmaskL; + locallab.spots.at(j).chromaskL = locallab.spots.at(j).chromaskL && pSpot.chromaskL == otherSpot.chromaskL; + locallab.spots.at(j).LmaskcurveL = locallab.spots.at(j).LmaskcurveL && pSpot.LmaskcurveL == otherSpot.LmaskcurveL; + locallab.spots.at(j).recothresl = locallab.spots.at(j).recothresl && pSpot.recothresl == otherSpot.recothresl; + locallab.spots.at(j).lowthresl = locallab.spots.at(j).lowthresl && pSpot.lowthresl == otherSpot.lowthresl; + locallab.spots.at(j).higthresl = locallab.spots.at(j).higthresl && pSpot.higthresl == otherSpot.higthresl; + locallab.spots.at(j).decayl = locallab.spots.at(j).decayl && pSpot.decayl == otherSpot.decayl; + + //mask locallab.spots.at(j).visimask = locallab.spots.at(j).visimask && pSpot.visimask == otherSpot.visimask; locallab.spots.at(j).complexmask = locallab.spots.at(j).complexmask && pSpot.complexmask == otherSpot.complexmask; @@ -1832,15 +1929,15 @@ void ParamsEdited::initFrom(const std::vector& dehaze.strength = dehaze.strength && p.dehaze.strength == other.dehaze.strength; dehaze.showDepthMap = dehaze.showDepthMap && p.dehaze.showDepthMap == other.dehaze.showDepthMap; dehaze.depth = dehaze.depth && p.dehaze.depth == other.dehaze.depth; - dehaze.luminance = dehaze.luminance && p.dehaze.luminance == other.dehaze.luminance; + dehaze.saturation = dehaze.saturation && p.dehaze.saturation == other.dehaze.saturation; metadata.mode = metadata.mode && p.metadata.mode == other.metadata.mode; filmNegative.enabled = filmNegative.enabled && p.filmNegative.enabled == other.filmNegative.enabled; filmNegative.redRatio = filmNegative.redRatio && p.filmNegative.redRatio == other.filmNegative.redRatio; filmNegative.greenExp = filmNegative.greenExp && p.filmNegative.greenExp == other.filmNegative.greenExp; filmNegative.blueRatio = filmNegative.blueRatio && p.filmNegative.blueRatio == other.filmNegative.blueRatio; - filmNegative.baseValues = filmNegative.baseValues && p.filmNegative.redBase == other.filmNegative.redBase - && p.filmNegative.greenBase == other.filmNegative.greenBase - && p.filmNegative.blueBase == other.filmNegative.blueBase; + filmNegative.refInput = filmNegative.refInput && p.filmNegative.refInput == other.filmNegative.refInput; + filmNegative.refOutput = filmNegative.refOutput && p.filmNegative.refOutput == other.filmNegative.refOutput; + filmNegative.colorSpace = filmNegative.colorSpace && p.filmNegative.colorSpace == other.filmNegative.colorSpace; raw.preprocessWB.mode = raw.preprocessWB.mode && p.raw.preprocessWB.mode == other.raw.preprocessWB.mode; // How the hell can we handle that??? @@ -1918,6 +2015,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.toneCurve.method = mods.toneCurve.method; } + if (toneCurve.hlbl) { + toEdit.toneCurve.hlbl = mods.toneCurve.hlbl; + } + if (toneCurve.histmatching) { toEdit.toneCurve.histmatching = mods.toneCurve.histmatching; } @@ -2605,6 +2706,18 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.colorappearance.curveMode3 = mods.colorappearance.curveMode3; } + if (colorappearance.complexmethod) { + toEdit.colorappearance.complexmethod = mods.colorappearance.complexmethod; + } + + if (colorappearance.modelmethod) { + toEdit.colorappearance.modelmethod = mods.colorappearance.modelmethod; + } + + if (colorappearance.catmethod) { + toEdit.colorappearance.catmethod = mods.colorappearance.catmethod; + } + if (colorappearance.enabled) { toEdit.colorappearance.enabled = mods.colorappearance.enabled; } @@ -3204,6 +3317,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).colorscope = mods.locallab.spots.at(i).colorscope; } + if (locallab.spots.at(i).avoidrad) { + toEdit.locallab.spots.at(i).avoidrad = mods.locallab.spots.at(i).avoidrad; + } + if (locallab.spots.at(i).transitweak) { toEdit.locallab.spots.at(i).transitweak = mods.locallab.spots.at(i).transitweak; } @@ -3224,6 +3341,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).avoid = mods.locallab.spots.at(i).avoid; } + if (locallab.spots.at(i).avoidmun) { + toEdit.locallab.spots.at(i).avoidmun = mods.locallab.spots.at(i).avoidmun; + } + if (locallab.spots.at(i).blwh) { toEdit.locallab.spots.at(i).blwh = mods.locallab.spots.at(i).blwh; } @@ -3509,6 +3630,22 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).csthresholdcol = mods.locallab.spots.at(i).csthresholdcol; } + if (locallab.spots.at(i).recothresc) { + toEdit.locallab.spots.at(i).recothresc = mods.locallab.spots.at(i).recothresc; + } + + if (locallab.spots.at(i).lowthresc) { + toEdit.locallab.spots.at(i).lowthresc = mods.locallab.spots.at(i).lowthresc; + } + + if (locallab.spots.at(i).higthresc) { + toEdit.locallab.spots.at(i).higthresc = mods.locallab.spots.at(i).higthresc; + } + + if (locallab.spots.at(i).decayc) { + toEdit.locallab.spots.at(i).decayc = mods.locallab.spots.at(i).decayc; + } + // Exposure if (locallab.spots.at(i).visiexpose) { toEdit.locallab.spots.at(i).visiexpose = mods.locallab.spots.at(i).visiexpose; @@ -3574,6 +3711,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).excurve = mods.locallab.spots.at(i).excurve; } + if (locallab.spots.at(i).norm) { + toEdit.locallab.spots.at(i).norm = mods.locallab.spots.at(i).norm; + } + if (locallab.spots.at(i).inversex) { toEdit.locallab.spots.at(i).inversex = mods.locallab.spots.at(i).inversex; } @@ -3678,6 +3819,22 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).fatlevel = mods.locallab.spots.at(i).fatlevel; } + if (locallab.spots.at(i).recothrese) { + toEdit.locallab.spots.at(i).recothrese = mods.locallab.spots.at(i).recothrese; + } + + if (locallab.spots.at(i).lowthrese) { + toEdit.locallab.spots.at(i).lowthrese = mods.locallab.spots.at(i).lowthrese; + } + + if (locallab.spots.at(i).higthrese) { + toEdit.locallab.spots.at(i).higthrese = mods.locallab.spots.at(i).higthrese; + } + + if (locallab.spots.at(i).decaye) { + toEdit.locallab.spots.at(i).decaye = mods.locallab.spots.at(i).decaye; + } + // Shadow highlight if (locallab.spots.at(i).visishadhigh) { toEdit.locallab.spots.at(i).visishadhigh = mods.locallab.spots.at(i).visishadhigh; @@ -3805,6 +3962,22 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).sloSH = mods.locallab.spots.at(i).sloSH; } + if (locallab.spots.at(i).recothress) { + toEdit.locallab.spots.at(i).recothress = mods.locallab.spots.at(i).recothress; + } + + if (locallab.spots.at(i).lowthress) { + toEdit.locallab.spots.at(i).lowthress = mods.locallab.spots.at(i).lowthress; + } + + if (locallab.spots.at(i).higthress) { + toEdit.locallab.spots.at(i).higthress = mods.locallab.spots.at(i).higthress; + } + + if (locallab.spots.at(i).decays) { + toEdit.locallab.spots.at(i).decays = mods.locallab.spots.at(i).decays; + } + // Vibrance if (locallab.spots.at(i).visivibrance) { toEdit.locallab.spots.at(i).visivibrance = mods.locallab.spots.at(i).visivibrance; @@ -3914,6 +4087,22 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).Lmaskvibcurve = mods.locallab.spots.at(i).Lmaskvibcurve; } + if (locallab.spots.at(i).recothresv) { + toEdit.locallab.spots.at(i).recothresv = mods.locallab.spots.at(i).recothresv; + } + + if (locallab.spots.at(i).lowthresv) { + toEdit.locallab.spots.at(i).lowthresv = mods.locallab.spots.at(i).lowthresv; + } + + if (locallab.spots.at(i).higthresv) { + toEdit.locallab.spots.at(i).higthresv = mods.locallab.spots.at(i).higthresv; + } + + if (locallab.spots.at(i).decayv) { + toEdit.locallab.spots.at(i).decayv = mods.locallab.spots.at(i).decayv; + } + // Soft Light if (locallab.spots.at(i).visisoft) { toEdit.locallab.spots.at(i).visisoft = mods.locallab.spots.at(i).visisoft; @@ -3980,6 +4169,42 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).strbl = mods.locallab.spots.at(i).strbl; } + if (locallab.spots.at(i).recothres) { + toEdit.locallab.spots.at(i).recothres = mods.locallab.spots.at(i).recothres; + } + + if (locallab.spots.at(i).lowthres) { + toEdit.locallab.spots.at(i).lowthres = mods.locallab.spots.at(i).lowthres; + } + + if (locallab.spots.at(i).higthres) { + toEdit.locallab.spots.at(i).higthres = mods.locallab.spots.at(i).higthres; + } + + if (locallab.spots.at(i).recothresd) { + toEdit.locallab.spots.at(i).recothresd = mods.locallab.spots.at(i).recothresd; + } + + if (locallab.spots.at(i).lowthresd) { + toEdit.locallab.spots.at(i).lowthresd = mods.locallab.spots.at(i).lowthresd; + } + + if (locallab.spots.at(i).midthresd) { + toEdit.locallab.spots.at(i).midthresd = mods.locallab.spots.at(i).midthresd; + } + + if (locallab.spots.at(i).midthresdch) { + toEdit.locallab.spots.at(i).midthresdch = mods.locallab.spots.at(i).midthresdch; + } + + if (locallab.spots.at(i).higthresd) { + toEdit.locallab.spots.at(i).higthresd = mods.locallab.spots.at(i).higthresd; + } + + if (locallab.spots.at(i).decayd) { + toEdit.locallab.spots.at(i).decayd = mods.locallab.spots.at(i).decayd; + } + if (locallab.spots.at(i).isogr) { toEdit.locallab.spots.at(i).isogr = mods.locallab.spots.at(i).isogr; } @@ -3992,6 +4217,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).scalegr = mods.locallab.spots.at(i).scalegr; } + if (locallab.spots.at(i).divgr) { + toEdit.locallab.spots.at(i).divgr = mods.locallab.spots.at(i).divgr; + } + if (locallab.spots.at(i).epsbl) { toEdit.locallab.spots.at(i).epsbl = mods.locallab.spots.at(i).epsbl; } @@ -4012,6 +4241,30 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).blurMethod = mods.locallab.spots.at(i).blurMethod; } + if (locallab.spots.at(i).usemask) { + toEdit.locallab.spots.at(i).usemask = mods.locallab.spots.at(i).usemask; + } + + if (locallab.spots.at(i).invmaskd) { + toEdit.locallab.spots.at(i).invmaskd = mods.locallab.spots.at(i).invmaskd; + } + + if (locallab.spots.at(i).invmask) { + toEdit.locallab.spots.at(i).invmask = mods.locallab.spots.at(i).invmask; + } + + if (locallab.spots.at(i).levelthr) { + toEdit.locallab.spots.at(i).levelthr = mods.locallab.spots.at(i).levelthr; + } + + if (locallab.spots.at(i).lnoiselow) { + toEdit.locallab.spots.at(i).lnoiselow = mods.locallab.spots.at(i).lnoiselow; + } + + if (locallab.spots.at(i).levelthrlow) { + toEdit.locallab.spots.at(i).levelthrlow = mods.locallab.spots.at(i).levelthrlow; + } + if (locallab.spots.at(i).medMethod) { toEdit.locallab.spots.at(i).medMethod = mods.locallab.spots.at(i).medMethod; } @@ -4064,6 +4317,26 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).bilateral = mods.locallab.spots.at(i).bilateral; } + if (locallab.spots.at(i).nlstr) { + toEdit.locallab.spots.at(i).nlstr = mods.locallab.spots.at(i).nlstr; + } + + if (locallab.spots.at(i).nldet) { + toEdit.locallab.spots.at(i).nldet = mods.locallab.spots.at(i).nldet; + } + + if (locallab.spots.at(i).nlpat) { + toEdit.locallab.spots.at(i).nlpat = mods.locallab.spots.at(i).nlpat; + } + + if (locallab.spots.at(i).nlrad) { + toEdit.locallab.spots.at(i).nlrad = mods.locallab.spots.at(i).nlrad; + } + + if (locallab.spots.at(i).nlgam) { + toEdit.locallab.spots.at(i).nlgam = mods.locallab.spots.at(i).nlgam; + } + if (locallab.spots.at(i).sensiden) { toEdit.locallab.spots.at(i).sensiden = mods.locallab.spots.at(i).sensiden; } @@ -4076,6 +4349,11 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).locwavcurveden = mods.locallab.spots.at(i).locwavcurveden; } + if (locallab.spots.at(i).locwavcurvehue) { + toEdit.locallab.spots.at(i).locwavcurvehue = mods.locallab.spots.at(i).locwavcurvehue; + } + + if (locallab.spots.at(i).showmaskblMethodtyp) { toEdit.locallab.spots.at(i).showmaskblMethodtyp = mods.locallab.spots.at(i).showmaskblMethodtyp; } @@ -4257,6 +4535,22 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).Lmasktmcurve = mods.locallab.spots.at(i).Lmasktmcurve; } + if (locallab.spots.at(i).recothrest) { + toEdit.locallab.spots.at(i).recothrest = mods.locallab.spots.at(i).recothrest; + } + + if (locallab.spots.at(i).lowthrest) { + toEdit.locallab.spots.at(i).lowthrest = mods.locallab.spots.at(i).lowthrest; + } + + if (locallab.spots.at(i).higthrest) { + toEdit.locallab.spots.at(i).higthrest = mods.locallab.spots.at(i).higthrest; + } + + if (locallab.spots.at(i).decayt) { + toEdit.locallab.spots.at(i).decayt = mods.locallab.spots.at(i).decayt; + } + // Retinex if (locallab.spots.at(i).visireti) { toEdit.locallab.spots.at(i).visireti = mods.locallab.spots.at(i).visireti; @@ -4326,8 +4620,8 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).loglin = mods.locallab.spots.at(i).loglin; } - if (locallab.spots.at(i).lumonly) { - toEdit.locallab.spots.at(i).lumonly = mods.locallab.spots.at(i).lumonly; + if (locallab.spots.at(i).dehazeSaturation) { + toEdit.locallab.spots.at(i).dehazeSaturation = mods.locallab.spots.at(i).dehazeSaturation; } if (locallab.spots.at(i).softradiusret) { @@ -4406,6 +4700,22 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).Lmaskreticurve = mods.locallab.spots.at(i).Lmaskreticurve; } + if (locallab.spots.at(i).recothresr) { + toEdit.locallab.spots.at(i).recothresr = mods.locallab.spots.at(i).recothresr; + } + + if (locallab.spots.at(i).lowthresr) { + toEdit.locallab.spots.at(i).lowthresr = mods.locallab.spots.at(i).lowthresr; + } + + if (locallab.spots.at(i).higthresr) { + toEdit.locallab.spots.at(i).higthresr = mods.locallab.spots.at(i).higthresr; + } + + if (locallab.spots.at(i).decayr) { + toEdit.locallab.spots.at(i).decayr = mods.locallab.spots.at(i).decayr; + } + // Sharpening if (locallab.spots.at(i).visisharp) { toEdit.locallab.spots.at(i).visisharp = mods.locallab.spots.at(i).visisharp; @@ -4741,6 +5051,22 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).Lmasklccurve = mods.locallab.spots.at(i).Lmasklccurve; } + if (locallab.spots.at(i).recothresw) { + toEdit.locallab.spots.at(i).recothresw = mods.locallab.spots.at(i).recothresw; + } + + if (locallab.spots.at(i).lowthresw) { + toEdit.locallab.spots.at(i).lowthresw = mods.locallab.spots.at(i).lowthresw; + } + + if (locallab.spots.at(i).higthresw) { + toEdit.locallab.spots.at(i).higthresw = mods.locallab.spots.at(i).higthresw; + } + + if (locallab.spots.at(i).decayw) { + toEdit.locallab.spots.at(i).decayw = mods.locallab.spots.at(i).decayw; + } + // Contrast by detail levels if (locallab.spots.at(i).visicbdl) { toEdit.locallab.spots.at(i).visicbdl = mods.locallab.spots.at(i).visicbdl; @@ -4828,6 +5154,22 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).Lmaskcbcurve = mods.locallab.spots.at(i).Lmaskcbcurve; } + if (locallab.spots.at(i).recothrescb) { + toEdit.locallab.spots.at(i).recothrescb = mods.locallab.spots.at(i).recothrescb; + } + + if (locallab.spots.at(i).lowthrescb) { + toEdit.locallab.spots.at(i).lowthrescb = mods.locallab.spots.at(i).lowthrescb; + } + + if (locallab.spots.at(i).higthrescb) { + toEdit.locallab.spots.at(i).higthrescb = mods.locallab.spots.at(i).higthrescb; + } + + if (locallab.spots.at(i).decaycb) { + toEdit.locallab.spots.at(i).decaycb = mods.locallab.spots.at(i).decaycb; + } + // Log encoding if (locallab.spots.at(i).visilog) { toEdit.locallab.spots.at(i).visilog = mods.locallab.spots.at(i).visilog; @@ -4837,6 +5179,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).explog = mods.locallab.spots.at(i).explog; } + if (locallab.spots.at(i).complexlog) { + toEdit.locallab.spots.at(i).complexlog = mods.locallab.spots.at(i).complexlog; + } + if (locallab.spots.at(i).autocompute) { toEdit.locallab.spots.at(i).autocompute = mods.locallab.spots.at(i).autocompute; } @@ -4845,10 +5191,54 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).sourceGray = mods.locallab.spots.at(i).sourceGray; } + if (locallab.spots.at(i).sourceabs) { + toEdit.locallab.spots.at(i).sourceabs = mods.locallab.spots.at(i).sourceabs; + } + + if (locallab.spots.at(i).targabs) { + toEdit.locallab.spots.at(i).targabs = mods.locallab.spots.at(i).targabs; + } + if (locallab.spots.at(i).targetGray) { toEdit.locallab.spots.at(i).targetGray = mods.locallab.spots.at(i).targetGray; } + if (locallab.spots.at(i).catad) { + toEdit.locallab.spots.at(i).catad = mods.locallab.spots.at(i).catad; + } + + if (locallab.spots.at(i).saturl) { + toEdit.locallab.spots.at(i).saturl = mods.locallab.spots.at(i).saturl; + } + + if (locallab.spots.at(i).lightl) { + toEdit.locallab.spots.at(i).lightl = mods.locallab.spots.at(i).lightl; + } + + if (locallab.spots.at(i).lightq) { + toEdit.locallab.spots.at(i).lightq = mods.locallab.spots.at(i).lightq; + } + + if (locallab.spots.at(i).contl) { + toEdit.locallab.spots.at(i).contl = mods.locallab.spots.at(i).contl; + } + + if (locallab.spots.at(i).contthres) { + toEdit.locallab.spots.at(i).contthres = mods.locallab.spots.at(i).contthres; + } + + if (locallab.spots.at(i).contq) { + toEdit.locallab.spots.at(i).contq = mods.locallab.spots.at(i).contq; + } + + if (locallab.spots.at(i).colorfl) { + toEdit.locallab.spots.at(i).colorfl = mods.locallab.spots.at(i).colorfl; + } + + if (locallab.spots.at(i).LcurveL) { + toEdit.locallab.spots.at(i).LcurveL = mods.locallab.spots.at(i).LcurveL; + } + if (locallab.spots.at(i).Autogray) { toEdit.locallab.spots.at(i).Autogray = mods.locallab.spots.at(i).Autogray; } @@ -4857,6 +5247,18 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).fullimage = mods.locallab.spots.at(i).fullimage; } + if (locallab.spots.at(i).ciecam) { + toEdit.locallab.spots.at(i).ciecam = mods.locallab.spots.at(i).ciecam; + } + + if (locallab.spots.at(i).enaLMask) { + toEdit.locallab.spots.at(i).enaLMask = mods.locallab.spots.at(i).enaLMask; + } + + if (locallab.spots.at(i).repar) { + toEdit.locallab.spots.at(i).repar = mods.locallab.spots.at(i).repar; + } + if (locallab.spots.at(i).blackEv) { toEdit.locallab.spots.at(i).blackEv = mods.locallab.spots.at(i).blackEv; } @@ -4877,6 +5279,14 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).baselog = mods.locallab.spots.at(i).baselog; } + if (locallab.spots.at(i).sursour) { + toEdit.locallab.spots.at(i).sursour = mods.locallab.spots.at(i).sursour; + } + + if (locallab.spots.at(i).surround) { + toEdit.locallab.spots.at(i).surround = mods.locallab.spots.at(i).surround; + } + if (locallab.spots.at(i).strlog) { toEdit.locallab.spots.at(i).strlog = mods.locallab.spots.at(i).strlog; } @@ -4884,7 +5294,51 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng if (locallab.spots.at(i).anglog) { toEdit.locallab.spots.at(i).anglog = mods.locallab.spots.at(i).anglog; } - + + if (locallab.spots.at(i).CCmaskcurveL) { + toEdit.locallab.spots.at(i).CCmaskcurveL = mods.locallab.spots.at(i).CCmaskcurveL; + } + + if (locallab.spots.at(i).LLmaskcurveL) { + toEdit.locallab.spots.at(i).LLmaskcurveL = mods.locallab.spots.at(i).LLmaskcurveL; + } + + if (locallab.spots.at(i).HHmaskcurveL) { + toEdit.locallab.spots.at(i).HHmaskcurveL = mods.locallab.spots.at(i).HHmaskcurveL; + } + + if (locallab.spots.at(i).blendmaskL) { + toEdit.locallab.spots.at(i).blendmaskL = mods.locallab.spots.at(i).blendmaskL; + } + + if (locallab.spots.at(i).radmaskL) { + toEdit.locallab.spots.at(i).radmaskL = mods.locallab.spots.at(i).radmaskL; + } + + if (locallab.spots.at(i).chromaskL) { + toEdit.locallab.spots.at(i).chromaskL = mods.locallab.spots.at(i).chromaskL; + } + + if (locallab.spots.at(i).LmaskcurveL) { + toEdit.locallab.spots.at(i).LmaskcurveL = mods.locallab.spots.at(i).LmaskcurveL; + } + + if (locallab.spots.at(i).recothresl) { + toEdit.locallab.spots.at(i).recothresl = mods.locallab.spots.at(i).recothresl; + } + + if (locallab.spots.at(i).lowthresl) { + toEdit.locallab.spots.at(i).lowthresl = mods.locallab.spots.at(i).lowthresl; + } + + if (locallab.spots.at(i).higthresl) { + toEdit.locallab.spots.at(i).higthresl = mods.locallab.spots.at(i).higthresl; + } + + if (locallab.spots.at(i).decayl) { + toEdit.locallab.spots.at(i).decayl = mods.locallab.spots.at(i).decayl; + } + // mask if (locallab.spots.at(i).visimask) { toEdit.locallab.spots.at(i).visimask = mods.locallab.spots.at(i).visimask; @@ -6107,8 +6561,8 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.dehaze.showDepthMap = mods.dehaze.showDepthMap; } - if (dehaze.luminance) { - toEdit.dehaze.luminance = mods.dehaze.luminance; + if (dehaze.saturation) { + toEdit.dehaze.saturation = mods.dehaze.saturation; } if (metadata.mode) { @@ -6131,12 +6585,21 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.filmNegative.blueRatio = mods.filmNegative.blueRatio; } - if (filmNegative.baseValues) { - toEdit.filmNegative.redBase = mods.filmNegative.redBase; - toEdit.filmNegative.greenBase = mods.filmNegative.greenBase; - toEdit.filmNegative.blueBase = mods.filmNegative.blueBase; + if (filmNegative.refInput) { + toEdit.filmNegative.refInput = mods.filmNegative.refInput; } + if (filmNegative.refOutput) { + toEdit.filmNegative.refOutput = mods.filmNegative.refOutput; + } + + if (filmNegative.colorSpace) { + toEdit.filmNegative.colorSpace = mods.filmNegative.colorSpace; + } + + // BackCompat param cannot be managed via the GUI, and it's always copied + toEdit.filmNegative.backCompat = mods.filmNegative.backCompat; + if (raw.preprocessWB.mode) { toEdit.raw.preprocessWB.mode = mods.raw.preprocessWB.mode; } @@ -6187,7 +6650,7 @@ bool RetinexParamsEdited::isUnchanged() const bool FilmNegativeParamsEdited::isUnchanged() const { - return enabled && redRatio && greenExp && blueRatio && baseValues; + return enabled && redRatio && greenExp && blueRatio && refInput && refOutput && colorSpace; } LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : @@ -6216,11 +6679,13 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : balanh(v), colorde(v), colorscope(v), + avoidrad(v), transitweak(v), transitgrad(v), hishow(v), activ(v), avoid(v), + avoidmun(v), blwh(v), recurs(v), laplac(v), @@ -6293,6 +6758,10 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : Lmaskcurve(v), LLmaskcolcurvewav(v), csthresholdcol(v), + recothresc(v), + lowthresc(v), + higthresc(v), + decayc(v), // Exposure visiexpose(v), expexpose(v), @@ -6310,6 +6779,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : strexp(v), angexp(v), excurve(v), + norm(v), inversex(v), enaExpMask(v), enaExpMaskaft(v), @@ -6336,6 +6806,10 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : fatdetail(v), fatanchor(v), fatlevel(v), + recothrese(v), + lowthrese(v), + higthrese(v), + decaye(v), // Shadow highlight visishadhigh(v), expshadhigh(v), @@ -6368,6 +6842,10 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : fatanchorSH(v), gamSH(v), sloSH(v), + recothress(v), + lowthress(v), + higthress(v), + decays(v), // Vibrance visivibrance(v), expvibrance(v), @@ -6396,6 +6874,10 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : strvibh(v), angvib(v), Lmaskvibcurve(v), + recothresv(v), + lowthresv(v), + higthresv(v), + decayv(v), // Soft Light visisoft(v), expsoft(v), @@ -6414,13 +6896,29 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : itera(v), guidbl(v), strbl(v), + recothres(v), + lowthres(v), + higthres(v), + recothresd(v), + lowthresd(v), + midthresd(v), + midthresdch(v), + higthresd(v), + decayd(v), isogr(v), strengr(v), scalegr(v), + divgr(v), epsbl(v), blMethod(v), chroMethod(v), quamethod(v), + usemask(v), + invmaskd(v), + invmask(v), + levelthr(v), + lnoiselow(v), + levelthrlow(v), blurMethod(v), medMethod(v), activlum(v), @@ -6435,9 +6933,15 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : noisechrodetail(v), adjblur(v), bilateral(v), + nlstr(v), + nldet(v), + nlpat(v), + nlrad(v), + nlgam(v), sensiden(v), detailthr(v), locwavcurveden(v), + locwavcurvehue(v), showmaskblMethodtyp(v), CCmaskblcurve(v), LLmaskblcurve(v), @@ -6484,6 +6988,10 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : slomasktm(v), lapmasktm(v), Lmasktmcurve(v), + recothrest(v), + lowthrest(v), + higthrest(v), + decayt(v), // Retinex visireti(v), expreti(v), @@ -6502,7 +7010,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : inversret(v), equilret(v), loglin(v), - lumonly(v), + dehazeSaturation(v), softradiusret(v), CCmaskreticurve(v), LLmaskreticurve(v), @@ -6522,6 +7030,10 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : cliptm(v), fftwreti(v), Lmaskreticurve(v), + recothresr(v), + lowthresr(v), + higthresr(v), + decayr(v), // Sharpening visisharp(v), expsharp(v), @@ -6607,6 +7119,10 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : radmasklc(v), chromasklc(v), Lmasklccurve(v), + recothresw(v), + lowthresw(v), + higthresw(v), + decayw(v), // Contrast by detail levels visicbdl(v), expcbdl(v), @@ -6629,21 +7145,53 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : slomaskcb(v), lapmaskcb(v), Lmaskcbcurve(v), + recothrescb(v), + lowthrescb(v), + higthrescb(v), + decaycb(v), // Log encoding visilog(v), explog(v), + complexlog(v), autocompute(v), sourceGray(v), + sourceabs(v), + targabs(v), targetGray(v), + catad(v), + saturl(v), + lightl(v), + lightq(v), + contl(v), + contthres(v), + contq(v), + colorfl(v), + LcurveL(v), Autogray(v), fullimage(v), + repar(v), + ciecam(v), blackEv(v), whiteEv(v), detail(v), + sursour(v), + surround(v), sensilog(v), baselog(v), strlog(v), anglog(v), + CCmaskcurveL(v), + LLmaskcurveL(v), + HHmaskcurveL(v), + enaLMask(v), + blendmaskL(v), + radmaskL(v), + chromaskL(v), + LmaskcurveL(v), + recothresl(v), + lowthresl(v), + higthresl(v), + decayl(v), // mask visimask(v), complexmask(v), @@ -6703,11 +7251,13 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) balanh = v; colorde = v; colorscope = v; + avoidrad = v; transitweak = v; transitgrad = v; hishow = v; activ = v; avoid = v; + avoidmun = v; blwh = v; recurs = v; laplac = v; @@ -6780,6 +7330,10 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) Lmaskcurve = v; LLmaskcolcurvewav = v; csthresholdcol = v; + recothresc = v; + lowthresc = v; + higthresc = v; + decayc = v; // Exposure visiexpose = v; expexpose = v; @@ -6797,6 +7351,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) strexp = v; angexp = v; excurve = v; + norm = v; inversex = v; enaExpMask = v; enaExpMaskaft = v; @@ -6823,6 +7378,10 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) fatdetail = v; fatanchor = v; fatlevel = v; + recothrese = v; + lowthrese = v; + higthrese = v; + decaye = v; // Shadow highlight visishadhigh = v; expshadhigh = v; @@ -6859,6 +7418,10 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) fatanchorSH = v; gamSH = v; sloSH = v; + recothress = v; + lowthress = v; + higthress = v; + decays = v; // Vibrance visivibrance = v; expvibrance = v; @@ -6887,6 +7450,10 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) strvibh = v; angvib = v; Lmaskvibcurve = v; + recothresv = v; + lowthresv = v; + higthresv = v; + decayv = v; // Soft Light visisoft = v; expsoft = v; @@ -6905,13 +7472,29 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) itera = v; guidbl = v; strbl = v; + recothres = v; + lowthres = v; + higthres = v; + recothresd = v; + lowthresd = v; + midthresd = v; + midthresdch = v; + higthresd = v; + decayd = v; isogr = v; strengr = v; scalegr = v; + divgr = v; epsbl = v; blMethod = v; chroMethod = v; quamethod = v; + usemask = v; + invmaskd = v; + invmask = v; + levelthr = v; + lnoiselow = v; + levelthrlow = v; blurMethod = v; medMethod = v; activlum = v; @@ -6926,6 +7509,11 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) noisechrodetail = v; adjblur = v; bilateral = v; + nlstr = v; + nldet = v; + nlpat = v; + nlrad = v; + nlgam = v; sensiden = v; detailthr = v; locwavcurveden = v; @@ -6975,6 +7563,10 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) slomasktm = v; lapmasktm = v; Lmasktmcurve = v; + recothrest = v; + lowthrest = v; + higthrest = v; + decayt = v; // Retinex visireti = v; expreti = v; @@ -6993,7 +7585,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) inversret = v; equilret = v; loglin = v; - lumonly = v; + dehazeSaturation = v; softradiusret = v; CCmaskreticurve = v; LLmaskreticurve = v; @@ -7013,6 +7605,10 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) cliptm = v; fftwreti = v; Lmaskreticurve = v; + recothresr = v; + lowthresr = v; + higthresr = v; + decayr = v; // Sharpening visisharp = v; expsharp = v; @@ -7098,6 +7694,10 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) radmasklc = v; chromasklc = v; Lmasklccurve = v; + recothresw = v; + lowthresw = v; + higthresw = v; + decayw = v; // Contrast by detail levels visicbdl = v; expcbdl = v; @@ -7124,21 +7724,53 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) slomaskcb = v; lapmaskcb = v; Lmaskcbcurve = v; + recothrescb = v; + lowthrescb = v; + higthrescb = v; + decaycb = v; // Log encoding visilog = v; explog = v; + complexlog = v; autocompute = v; sourceGray = v; + sourceabs = v; + targabs = v; targetGray = v; + catad = v; + saturl = v; + lightl = v; + lightq = v; + contl = v; + contthres = v; + contq = v; + colorfl = v; + LcurveL = v; Autogray = v; fullimage = v; + repar = v; + ciecam = v; blackEv = v; whiteEv = v; detail = v; + sursour = v; + surround = v; sensilog = v; baselog = v; strlog = v; anglog = v; + CCmaskcurveL = v; + LLmaskcurveL = v; + HHmaskcurveL = v; + enaLMask = v; + blendmaskL = v; + radmaskL = v; + chromaskL = v; + LmaskcurveL = v; + recothresl = v; + lowthresl = v; + higthresl = v; + decayl = v; // mask visimask = v; complexmask = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index a043688c5..95fc76407 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -51,6 +51,7 @@ struct ToneCurveParamsEdited { bool saturation; bool shcompr; bool hlcompr; + bool hlbl; bool hlcomprthresh; bool autoexp; bool clip; @@ -266,6 +267,9 @@ struct ColorAppearanceParamsEdited { bool curveMode; bool curveMode2; bool curveMode3; + bool complexmethod; + bool modelmethod; + bool catmethod; bool enabled; bool degree; bool autodegree; @@ -413,11 +417,13 @@ public: bool balanh; bool colorde; bool colorscope; + bool avoidrad; bool transitweak; bool transitgrad; bool hishow; bool activ; bool avoid; + bool avoidmun; bool blwh; bool recurs; bool laplac; @@ -490,6 +496,10 @@ public: bool Lmaskcurve; bool LLmaskcolcurvewav; bool csthresholdcol; + bool recothresc; + bool lowthresc; + bool higthresc; + bool decayc; // Exposure bool visiexpose; bool expexpose; @@ -507,6 +517,7 @@ public: bool strexp; bool angexp; bool excurve; + bool norm; bool inversex; bool enaExpMask; bool enaExpMaskaft; @@ -533,6 +544,10 @@ public: bool fatdetail; bool fatanchor; bool fatlevel; + bool recothrese; + bool lowthrese; + bool higthrese; + bool decaye; // Shadow highlight bool visishadhigh; bool expshadhigh; @@ -565,6 +580,10 @@ public: bool fatanchorSH; bool gamSH; bool sloSH; + bool recothress; + bool lowthress; + bool higthress; + bool decays; // Vibrance bool visivibrance; bool expvibrance; @@ -593,6 +612,10 @@ public: bool strvibh; bool angvib; bool Lmaskvibcurve; + bool recothresv; + bool lowthresv; + bool higthresv; + bool decayv; // Soft Light bool visisoft; bool expsoft; @@ -611,13 +634,29 @@ public: bool itera; bool guidbl; bool strbl; + bool recothres; + bool lowthres; + bool higthres; + bool recothresd; + bool lowthresd; + bool midthresd; + bool midthresdch; + bool higthresd; + bool decayd; bool isogr; bool strengr; bool scalegr; + bool divgr; bool epsbl; bool blMethod; bool chroMethod; bool quamethod; + bool usemask; + bool invmaskd; + bool invmask; + bool levelthr; + bool lnoiselow; + bool levelthrlow; bool blurMethod; bool medMethod; bool activlum; @@ -632,9 +671,15 @@ public: bool noisechrodetail; bool adjblur; bool bilateral; + bool nlstr; + bool nldet; + bool nlpat; + bool nlrad; + bool nlgam; bool sensiden; bool detailthr; bool locwavcurveden; + bool locwavcurvehue; bool showmaskblMethodtyp; bool CCmaskblcurve; bool LLmaskblcurve; @@ -681,6 +726,10 @@ public: bool slomasktm; bool lapmasktm; bool Lmasktmcurve; + bool recothrest; + bool lowthrest; + bool higthrest; + bool decayt; // Retinex bool visireti; bool expreti; @@ -699,7 +748,7 @@ public: bool inversret; bool equilret; bool loglin; - bool lumonly; + bool dehazeSaturation; bool softradiusret; bool CCmaskreticurve; bool LLmaskreticurve; @@ -719,6 +768,10 @@ public: bool cliptm; bool fftwreti; bool Lmaskreticurve; + bool recothresr; + bool lowthresr; + bool higthresr; + bool decayr; // Sharpening bool visisharp; bool expsharp; @@ -804,6 +857,10 @@ public: bool radmasklc; bool chromasklc; bool Lmasklccurve; + bool recothresw; + bool lowthresw; + bool higthresw; + bool decayw; // Contrast by detail levels bool visicbdl; bool expcbdl; @@ -826,21 +883,53 @@ public: bool slomaskcb; bool lapmaskcb; bool Lmaskcbcurve; + bool recothrescb; + bool lowthrescb; + bool higthrescb; + bool decaycb; // Log encoding bool visilog; bool explog; + bool complexlog; bool autocompute; bool sourceGray; + bool sourceabs; + bool targabs; bool targetGray; + bool catad; + bool saturl; + bool lightl; + bool lightq; + bool contl; + bool contthres; + bool contq; + bool colorfl; + bool LcurveL; bool Autogray; bool fullimage; + bool repar; + bool ciecam; bool blackEv; bool whiteEv; bool detail; + bool sursour; + bool surround; bool sensilog; bool baselog; bool strlog; bool anglog; + bool CCmaskcurveL; + bool LLmaskcurveL; + bool HHmaskcurveL; + bool enaLMask; + bool blendmaskL; + bool radmaskL; + bool chromaskL; + bool LmaskcurveL; + bool recothresl; + bool lowthresl; + bool higthresl; + bool decayl; //mask bool visimask; bool complexmask; @@ -1182,7 +1271,7 @@ struct DehazeParamsEdited { bool strength; bool showDepthMap; bool depth; - bool luminance; + bool saturation; }; struct RAWParamsEdited { @@ -1279,7 +1368,9 @@ struct FilmNegativeParamsEdited { bool redRatio; bool greenExp; bool blueRatio; - bool baseValues; + bool refInput; + bool refOutput; + bool colorSpace; bool isUnchanged() const; }; diff --git a/rtgui/partialpastedlg.cc b/rtgui/partialpastedlg.cc index 6808a2cc6..c759bcd44 100644 --- a/rtgui/partialpastedlg.cc +++ b/rtgui/partialpastedlg.cc @@ -35,6 +35,9 @@ PartialSpotWidget::PartialSpotWidget(): // Widget listener selListener(nullptr) { + + set_orientation(Gtk::ORIENTATION_VERTICAL); + // Configure tree view treeview->set_model(treemodel); treeview->set_enable_search(false); @@ -311,13 +314,13 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren //--- raw_preprocwb = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PREPROCWB"))); - Gtk::VBox* vboxes[9]; - Gtk::HSeparator* hseps[9]; + Gtk::Box* vboxes[9]; + Gtk::Separator* hseps[9]; for (int i = 0; i < 9; i++) { - vboxes[i] = Gtk::manage (new Gtk::VBox ()); + vboxes[i] = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); vboxes[i]->set_name("PartialPasteGroupContainer"); - hseps[i] = Gtk::manage (new Gtk::HSeparator ()); + hseps[i] = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); hseps[i]->set_name("PartialPasteHeaderSep"); } @@ -355,6 +358,7 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren vboxes[2]->pack_start (*blackwhite, Gtk::PACK_SHRINK, 2); vboxes[2]->pack_start (*hsveq, Gtk::PACK_SHRINK, 2); vboxes[2]->pack_start (*filmSimulation, Gtk::PACK_SHRINK, 2); + vboxes[2]->pack_start (*filmNegative, Gtk::PACK_SHRINK, 2); vboxes[2]->pack_start (*softlight, Gtk::PACK_SHRINK, 2); vboxes[2]->pack_start (*rgbcurves, Gtk::PACK_SHRINK, 2); vboxes[2]->pack_start (*colortoning, Gtk::PACK_SHRINK, 2); @@ -401,36 +405,35 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren vboxes[8]->pack_start (*raw_dcb_iterations, Gtk::PACK_SHRINK, 2); vboxes[8]->pack_start (*raw_dcb_enhance, Gtk::PACK_SHRINK, 2); vboxes[8]->pack_start (*raw_lmmse_iterations, Gtk::PACK_SHRINK, 2); - vboxes[8]->pack_start (*Gtk::manage (new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 0); + vboxes[8]->pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)), Gtk::PACK_SHRINK, 0); vboxes[8]->pack_start (*raw_linenoise, Gtk::PACK_SHRINK, 2); vboxes[8]->pack_start (*raw_greenthresh, Gtk::PACK_SHRINK, 2); vboxes[8]->pack_start (*raw_hotpix_filt, Gtk::PACK_SHRINK, 2); vboxes[8]->pack_start (*raw_deadpix_filt, Gtk::PACK_SHRINK, 2); vboxes[8]->pack_start (*raw_pdaf_lines_filter, Gtk::PACK_SHRINK, 2); - vboxes[8]->pack_start (*Gtk::manage (new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 0); + vboxes[8]->pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)), Gtk::PACK_SHRINK, 0); vboxes[8]->pack_start (*raw_expos, Gtk::PACK_SHRINK, 2); vboxes[8]->pack_start (*raw_black, Gtk::PACK_SHRINK, 2); vboxes[8]->pack_start (*raw_preprocwb, Gtk::PACK_SHRINK, 2); - vboxes[8]->pack_start (*Gtk::manage (new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 0); + vboxes[8]->pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)), Gtk::PACK_SHRINK, 0); vboxes[8]->pack_start (*df_file, Gtk::PACK_SHRINK, 2); vboxes[8]->pack_start (*df_AutoSelect, Gtk::PACK_SHRINK, 2); - vboxes[8]->pack_start (*Gtk::manage (new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 0); + vboxes[8]->pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)), Gtk::PACK_SHRINK, 0); vboxes[8]->pack_start (*ff_file, Gtk::PACK_SHRINK, 2); vboxes[8]->pack_start (*ff_AutoSelect, Gtk::PACK_SHRINK, 2); vboxes[8]->pack_start (*ff_BlurType, Gtk::PACK_SHRINK, 2); vboxes[8]->pack_start (*ff_BlurRadius, Gtk::PACK_SHRINK, 2); vboxes[8]->pack_start (*ff_ClipControl, Gtk::PACK_SHRINK, 2); - vboxes[8]->pack_start (*Gtk::manage (new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 0); + vboxes[8]->pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)), Gtk::PACK_SHRINK, 0); vboxes[8]->pack_start (*raw_ca_autocorrect, Gtk::PACK_SHRINK, 2); vboxes[8]->pack_start (*raw_caredblue, Gtk::PACK_SHRINK, 2); vboxes[8]->pack_start (*raw_ca_avoid_colourshift, Gtk::PACK_SHRINK, 2); - vboxes[8]->pack_start (*Gtk::manage (new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 0); - vboxes[8]->pack_start (*filmNegative, Gtk::PACK_SHRINK, 2); + vboxes[8]->pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)), Gtk::PACK_SHRINK, 0); vboxes[8]->pack_start (*captureSharpening, Gtk::PACK_SHRINK, 2); - Gtk::VBox* vbCol1 = Gtk::manage (new Gtk::VBox ()); - Gtk::VBox* vbCol2 = Gtk::manage (new Gtk::VBox ()); - Gtk::VBox* vbCol3 = Gtk::manage (new Gtk::VBox ()); + Gtk::Box* vbCol1 = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + Gtk::Box* vbCol2 = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + Gtk::Box* vbCol3 = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); for (int i = 0; i < 3; i++) { vbCol1->pack_start (*vboxes[i], Gtk::PACK_SHRINK, 2); @@ -444,18 +447,18 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren vbCol3->pack_start (*vboxes[i], Gtk::PACK_SHRINK, 2); } - Gtk::VBox* vbtop = Gtk::manage (new Gtk::VBox ()); + Gtk::Box* vbtop = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); vbtop->pack_start (*everything, Gtk::PACK_SHRINK, 2); Gtk::Dialog::get_content_area()->pack_start (*vbtop, Gtk::PACK_SHRINK, 2); - Gtk::HBox* hbmain = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* hbmain = Gtk::manage (new Gtk::Box ()); hbmain->pack_start (*vbCol1); - Gtk::VSeparator *vsep1 = Gtk::manage (new Gtk::VSeparator ()); + Gtk::Separator *vsep1 = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)); setExpandAlignProperties(vsep1, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); hbmain->pack_start (*vsep1); hbmain->pack_start (*vbCol2); - Gtk::VSeparator *vsep2 = Gtk::manage (new Gtk::VSeparator ()); + Gtk::Separator *vsep2 = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)); setExpandAlignProperties(vsep2, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); hbmain->pack_start (*vsep2); hbmain->pack_start (*vbCol3); @@ -655,7 +658,6 @@ void PartialPasteDlg::rawToggled () ConnectionBlocker raw_ca_autocorrectBlocker(raw_ca_autocorrectConn); ConnectionBlocker raw_caredblueBlocker(raw_caredblueConn); ConnectionBlocker raw_ca_avoid_colourshiftBlocker(raw_ca_avoid_colourshiftconn); - ConnectionBlocker filmNegativeBlocker(filmNegativeConn); ConnectionBlocker captureSharpeningBlocker(captureSharpeningConn); ConnectionBlocker raw_preprocwbBlocker(raw_preprocwbConn); @@ -686,7 +688,6 @@ void PartialPasteDlg::rawToggled () raw_ca_autocorrect->set_active (raw->get_active ()); raw_caredblue->set_active (raw->get_active ()); raw_ca_avoid_colourshift->set_active (raw->get_active ()); - filmNegative->set_active (raw->get_active()); captureSharpening->set_active (raw->get_active()); raw_preprocwb->set_active (raw->get_active()); } @@ -764,6 +765,7 @@ void PartialPasteDlg::colorToggled () ConnectionBlocker chmixerbwBlocker(chmixerbwConn); ConnectionBlocker hsveqBlocker(hsveqConn); ConnectionBlocker filmSimulationBlocker(filmSimulationConn); + ConnectionBlocker filmNegativeBlocker(filmNegativeConn); ConnectionBlocker softlightBlocker(softlightConn); ConnectionBlocker rgbcurvesBlocker(rgbcurvesConn); ConnectionBlocker colortoningBlocker(colortoningConn); @@ -776,6 +778,7 @@ void PartialPasteDlg::colorToggled () blackwhite->set_active (color->get_active ()); hsveq->set_active (color->get_active ()); filmSimulation->set_active (color->get_active ()); + filmNegative->set_active (color->get_active()); softlight->set_active (color->get_active ()); rgbcurves->set_active (color->get_active ()); colortoning->set_active(color->get_active ()); @@ -1178,7 +1181,9 @@ void PartialPasteDlg::applyPaste (rtengine::procparams::ProcParams* dstPP, Param filterPE.filmNegative.redRatio = falsePE.filmNegative.redRatio; filterPE.filmNegative.greenExp = falsePE.filmNegative.greenExp; filterPE.filmNegative.blueRatio = falsePE.filmNegative.blueRatio; - filterPE.filmNegative.baseValues = falsePE.filmNegative.baseValues; + filterPE.filmNegative.refInput = falsePE.filmNegative.refInput; + filterPE.filmNegative.refOutput = falsePE.filmNegative.refOutput; + filterPE.filmNegative.colorSpace = falsePE.filmNegative.colorSpace; } if (!captureSharpening->get_active ()) { diff --git a/rtgui/partialpastedlg.h b/rtgui/partialpastedlg.h index 94bc2868c..c61408df7 100644 --- a/rtgui/partialpastedlg.h +++ b/rtgui/partialpastedlg.h @@ -54,7 +54,7 @@ public: /* ==== PartialSpotWidget ==== */ class PartialSpotWidget: - public Gtk::VBox + public Gtk::Box { private: // Tree model to manage spot selection widget diff --git a/rtgui/pdsharpening.cc b/rtgui/pdsharpening.cc index 1b98fd3ac..45d5b545c 100644 --- a/rtgui/pdsharpening.cc +++ b/rtgui/pdsharpening.cc @@ -45,7 +45,7 @@ PdSharpening::PdSharpening() : EvPdShrAutoContrast = m->newEvent(CAPTURESHARPEN, "HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST"); EvPdShrAutoRadius = m->newEvent(CAPTURESHARPEN, "HISTORY_MSG_PDSHARPEN_AUTO_RADIUS"); - Gtk::HBox* hb = Gtk::manage(new Gtk::HBox()); + Gtk::Box* hb = Gtk::manage(new Gtk::Box()); hb->show(); contrast = Gtk::manage(new Adjuster(M("TP_SHARPENING_CONTRAST"), 0, 200, 1, 10)); contrast->setAdjusterListener(this); @@ -57,7 +57,7 @@ PdSharpening::PdSharpening() : pack_start(*hb); - Gtk::VBox* rld = Gtk::manage(new Gtk::VBox()); + Gtk::Box* rld = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); dradius = Gtk::manage(new Adjuster(M("TP_SHARPENING_RADIUS"), 0.4, 2.0, 0.01, 0.75)); dradius->addAutoButton(); dradius->setAutoValue(true); diff --git a/rtgui/perspective.cc b/rtgui/perspective.cc index 55013ec4a..b3fabd31a 100644 --- a/rtgui/perspective.cc +++ b/rtgui/perspective.cc @@ -135,7 +135,7 @@ PerspCorrection::PerspCorrection () : FoldableToolPanel(this, "perspective", M(" Gtk::Image* ipers_rotate_left = Gtk::manage(new RTImage("rotate-right-small.png")); Gtk::Image* ipers_rotate_right = Gtk::manage(new RTImage("rotate-left-small.png")); - Gtk::HBox* method_hbox = Gtk::manage (new Gtk::HBox()); + Gtk::Box* method_hbox = Gtk::manage (new Gtk::Box()); Gtk::Label* method_label = Gtk::manage (new Gtk::Label (M("TP_PERSPECTIVE_METHOD") + ": ")); method = Gtk::manage (new MyComboBoxText ()); method->append (M("TP_PERSPECTIVE_METHOD_SIMPLE")); @@ -144,7 +144,7 @@ PerspCorrection::PerspCorrection () : FoldableToolPanel(this, "perspective", M(" method_hbox->pack_start(*method); pack_start(*method_hbox); - simple = Gtk::manage( new Gtk::VBox() ); + simple = Gtk::manage( new Gtk::Box(Gtk::ORIENTATION_VERTICAL) ); vert = Gtk::manage (new Adjuster (M("TP_PERSPECTIVE_VERTICAL"), -100, 100, 0.1, 0, ipersVL, ipersVR)); vert->setAdjusterListener (this); @@ -152,13 +152,13 @@ PerspCorrection::PerspCorrection () : FoldableToolPanel(this, "perspective", M(" horiz = Gtk::manage (new Adjuster (M("TP_PERSPECTIVE_HORIZONTAL"), -100, 100, 0.1, 0, ipersHL, ipersHR)); horiz->setAdjusterListener (this); - camera_based = Gtk::manage( new Gtk::VBox() ); + camera_based = Gtk::manage( new Gtk::Box(Gtk::ORIENTATION_VERTICAL) ); Gtk::Frame* camera_frame = Gtk::manage (new Gtk::Frame (M("TP_PERSPECTIVE_CAMERA_FRAME"))); camera_frame->set_label_align(0.025, 0.5); - Gtk::VBox* camera_vbox = Gtk::manage (new Gtk::VBox()); + Gtk::Box* camera_vbox = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); camera_focal_length = Gtk::manage (new Adjuster (M("TP_PERSPECTIVE_CAMERA_FOCAL_LENGTH"), 0.5, 2000, 0.01, 24)); camera_focal_length->setAdjusterListener (this); @@ -207,7 +207,7 @@ PerspCorrection::PerspCorrection () : FoldableToolPanel(this, "perspective", M(" lines = std::unique_ptr(new ControlLineManager()); lines->callbacks = std::make_shared(this); - Gtk::HBox* control_lines_box = Gtk::manage (new Gtk::HBox()); + Gtk::Box* control_lines_box = Gtk::manage (new Gtk::Box()); Gtk::Label* control_lines_label = Gtk::manage (new Gtk::Label (M("TP_PERSPECTIVE_CONTROL_LINES") + ": ")); control_lines_label->set_tooltip_markup( M("TP_PERSPECTIVE_CONTROL_LINES_TOOLTIP") ); control_lines_box->pack_start(*control_lines_label, Gtk::PACK_SHRINK); @@ -228,7 +228,7 @@ PerspCorrection::PerspCorrection () : FoldableToolPanel(this, "perspective", M(" auto_pitch_yaw->set_image(*ipers_auto_pitch_yaw); auto_pitch_yaw->signal_pressed().connect( sigc::bind(sigc::mem_fun(*this, &PerspCorrection::autoCorrectionPressed), auto_pitch_yaw) ); - Gtk::HBox* auto_hbox = Gtk::manage (new Gtk::HBox()); + Gtk::Box* auto_hbox = Gtk::manage (new Gtk::Box()); Gtk::Label* auto_label = Gtk::manage (new Gtk::Label (M("GENERAL_AUTO") + ": ")); auto_hbox->pack_start(*auto_label, Gtk::PACK_SHRINK); @@ -236,7 +236,7 @@ PerspCorrection::PerspCorrection () : FoldableToolPanel(this, "perspective", M(" (M("TP_PERSPECTIVE_POST_CORRECTION_ADJUSTMENT_FRAME"))); pca_frame->set_label_align(0.025, 0.5); - Gtk::VBox* pca_vbox = Gtk::manage (new Gtk::VBox()); + Gtk::Box* pca_vbox = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); projection_shift_horiz = Gtk::manage (new Adjuster (M("TP_PERSPECTIVE_PROJECTION_SHIFT_HORIZONTAL"), -100, 100, 0.01, 0)); projection_shift_horiz->setAdjusterListener (this); @@ -251,7 +251,7 @@ PerspCorrection::PerspCorrection () : FoldableToolPanel(this, "perspective", M(" (M("TP_PERSPECTIVE_RECOVERY_FRAME"))); recovery_frame->set_label_align(0.025, 0.5); - Gtk::VBox* recovery_vbox = Gtk::manage (new Gtk::VBox()); + Gtk::Box* recovery_vbox = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); projection_pitch = Gtk::manage (new Adjuster (M("TP_PERSPECTIVE_PROJECTION_PITCH"), -60, 60, 0.1, 0, ipers_proj_pitch_left, ipers_proj_pitch_right)); projection_pitch->setAdjusterListener (this); @@ -273,9 +273,9 @@ PerspCorrection::PerspCorrection () : FoldableToolPanel(this, "perspective", M(" camera_vbox->pack_start (*camera_roll); camera_vbox->pack_start (*camera_pitch); camera_vbox->pack_start (*camera_yaw); - camera_vbox->pack_start (*Gtk::manage (new Gtk::HSeparator())); + camera_vbox->pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL))); camera_vbox->pack_start (*control_lines_box); - camera_vbox->pack_start (*Gtk::manage (new Gtk::HSeparator())); + camera_vbox->pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL))); camera_vbox->pack_start (*auto_hbox); camera_frame->add(*camera_vbox); camera_based->pack_start(*camera_frame); diff --git a/rtgui/perspective.h b/rtgui/perspective.h index 6ba169b60..3c677ba6e 100644 --- a/rtgui/perspective.h +++ b/rtgui/perspective.h @@ -42,13 +42,13 @@ class PerspCorrection final : protected: bool render = true; MyComboBoxText* method; - Gtk::VBox* simple; + Gtk::Box* simple; Adjuster* horiz; Adjuster* vert; Gtk::Button* auto_pitch; Gtk::Button* auto_yaw; Gtk::Button* auto_pitch_yaw; - Gtk::VBox* camera_based; + Gtk::Box* camera_based; Adjuster* camera_crop_factor; Adjuster* camera_focal_length; Adjuster* camera_pitch; diff --git a/rtgui/placesbrowser.cc b/rtgui/placesbrowser.cc index f1450cea2..3440080f8 100644 --- a/rtgui/placesbrowser.cc +++ b/rtgui/placesbrowser.cc @@ -31,7 +31,8 @@ PlacesBrowser::PlacesBrowser () { - + set_orientation(Gtk::ORIENTATION_VERTICAL); + scrollw = Gtk::manage (new Gtk::ScrolledWindow ()); scrollw->set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); pack_start (*scrollw); diff --git a/rtgui/placesbrowser.h b/rtgui/placesbrowser.h index d4640fff4..64cd30e3c 100644 --- a/rtgui/placesbrowser.h +++ b/rtgui/placesbrowser.h @@ -23,7 +23,7 @@ #include class PlacesBrowser : - public Gtk::VBox + public Gtk::Box { public: typedef sigc::slot DirSelectionSlot; diff --git a/rtgui/ppversion.h b/rtgui/ppversion.h index 5aef01806..162e63f9e 100644 --- a/rtgui/ppversion.h +++ b/rtgui/ppversion.h @@ -1,11 +1,13 @@ #pragma once // This number has to be incremented whenever the PP3 file format is modified or the behaviour of a tool changes -#define PPVERSION 348 +#define PPVERSION 349 #define PPVERSION_AEXP 301 //value of PPVERSION when auto exposure algorithm was modified /* Log of version changes + 349 2020-10-29 + replaced Haze removal Luminance checkbox with an adjuster to blend between luminance and normal mode 348 2018-09-25 Added Locallab tool parameters 347 2019-11-17 diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index a6a19774b..9d9603297 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -35,7 +35,7 @@ namespace { void placeSpinBox(Gtk::Container* where, Gtk::SpinButton* &spin, const std::string &labelText, int digits, int inc0, int inc1, int maxLength, int range0, int range1, const std::string &toolTip = "") { - Gtk::HBox* HB = Gtk::manage ( new Gtk::HBox () ); + Gtk::Box* HB = Gtk::manage ( new Gtk::Box () ); HB->set_spacing (4); if (!toolTip.empty()) { HB->set_tooltip_text (M (toolTip)); @@ -147,12 +147,12 @@ Gtk::Widget* Preferences::getBatchProcPanel() swBatchProc = Gtk::manage(new Gtk::ScrolledWindow()); swBatchProc->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); - Gtk::VBox* vbBatchProc = Gtk::manage (new Gtk::VBox ()); + Gtk::Box* vbBatchProc = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); Gtk::ScrolledWindow* behscrollw = Gtk::manage(new Gtk::ScrolledWindow()); behscrollw->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); behscrollw->set_size_request(-1, 60); - Gtk::VBox* vbbeh = Gtk::manage(new Gtk::VBox()); + Gtk::Box* vbbeh = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); vbbeh->pack_start(*behscrollw, Gtk::PACK_EXPAND_WIDGET); Gtk::Frame* behFrame = Gtk::manage(new Gtk::Frame(M("PREFERENCES_BEHAVIOR"))); behFrame->add(*vbbeh); @@ -452,7 +452,7 @@ Gtk::Widget* Preferences::getBatchProcPanel() behAddAll->signal_clicked().connect(sigc::mem_fun(*this, &Preferences::behAddAllPressed)); behSetAll->signal_clicked().connect(sigc::mem_fun(*this, &Preferences::behSetAllPressed)); - Gtk::HBox* buttonpanel1 = Gtk::manage(new Gtk::HBox()); + Gtk::Box* buttonpanel1 = Gtk::manage(new Gtk::Box()); buttonpanel1->pack_end(*behSetAll, Gtk::PACK_SHRINK, 4); buttonpanel1->pack_end(*behAddAll, Gtk::PACK_SHRINK, 4); vbbeh->pack_start(*buttonpanel1, Gtk::PACK_SHRINK, 4); @@ -510,10 +510,10 @@ Gtk::Widget* Preferences::getImageProcessingPanel () swImageProcessing = Gtk::manage(new Gtk::ScrolledWindow()); swImageProcessing->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); - Gtk::VBox* vbImageProcessing = Gtk::manage (new Gtk::VBox ()); + Gtk::Box* vbImageProcessing = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); Gtk::Frame* fpp = Gtk::manage(new Gtk::Frame(M("PREFERENCES_IMPROCPARAMS"))); - Gtk::VBox* vbpp = Gtk::manage(new Gtk::VBox()); + Gtk::Box* vbpp = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); Gtk::Label* drlab = Gtk::manage(new Gtk::Label(M("PREFERENCES_FORRAW") + ":", Gtk::ALIGN_START)); rprofiles = Gtk::manage(new ProfileStoreComboBox()); const ProfileStoreEntry* dynpse = ProfileStore::getInstance()->getInternalDynamicPSE(); @@ -527,12 +527,15 @@ Gtk::Widget* Preferences::getImageProcessingPanel () iprofiles->set_size_request(50, -1); setExpandAlignProperties(iprofiles, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); ipconn = iprofiles->signal_changed().connect(sigc::mem_fun(*this, &Preferences::forImageComboChanged)); - Gtk::Table* defpt = Gtk::manage(new Gtk::Table(2, 2)); - defpt->attach(*drlab, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2); - defpt->attach(*rprofiles, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); - defpt->attach(*drimg, 0, 1, 1, 2, Gtk::FILL, Gtk::SHRINK, 2, 2); - defpt->attach(*iprofiles, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); + + Gtk::Grid* defpt = Gtk::manage(new Gtk::Grid()); + defpt->set_row_spacing(2); + defpt->attach(*drlab, 0, 0, 1, 1); + defpt->attach(*rprofiles, 1, 0, 1, 1); + defpt->attach(*drimg, 0, 1, 1, 1); + defpt->attach(*iprofiles, 1, 1, 1, 1); vbpp->pack_start(*defpt, Gtk::PACK_SHRINK, 4); + useBundledProfiles = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_USEBUNDLEDPROFILES"))); bpconn = useBundledProfiles->signal_clicked().connect(sigc::mem_fun(*this, &Preferences::bundledProfilesChanged)); vbpp->pack_start(*useBundledProfiles, Gtk::PACK_SHRINK, 4); @@ -544,39 +547,42 @@ Gtk::Widget* Preferences::getImageProcessingPanel () Gtk::Label* cplab = Gtk::manage(new Gtk::Label(M("PREFERENCES_CUSTPROFBUILDPATH") + ":", Gtk::ALIGN_START)); txtCustProfBuilderPath = Gtk::manage(new Gtk::Entry()); txtCustProfBuilderPath->set_tooltip_markup(M("PREFERENCES_CUSTPROFBUILDHINT")); + txtCustProfBuilderPath->set_hexpand(); Gtk::Label* cpltypelab = Gtk::manage(new Gtk::Label(M("PREFERENCES_CUSTPROFBUILDKEYFORMAT") + ":", Gtk::ALIGN_START)); custProfBuilderLabelType = Gtk::manage(new Gtk::ComboBoxText()); custProfBuilderLabelType->append(M("PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID")); custProfBuilderLabelType->append(M("PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME")); custProfBuilderLabelType->append(M("PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID") + "_" + M("PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME")); - Gtk::Table* cpbt = Gtk::manage(new Gtk::Table(2, 2)); - cpbt->attach(*cplab, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2); - cpbt->attach(*txtCustProfBuilderPath, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); - cpbt->attach(*cpltypelab, 0, 1, 1, 2, Gtk::FILL, Gtk::SHRINK, 2, 2); - cpbt->attach(*custProfBuilderLabelType, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); + Gtk::Grid* cpbt = Gtk::manage(new Gtk::Grid()); + cpbt->set_row_spacing(2); + cpbt->attach(*cplab, 0, 0, 1, 1); + cpbt->attach(*txtCustProfBuilderPath, 1, 0, 1, 1); + cpbt->attach(*cpltypelab, 0, 1, 1, 1); + cpbt->attach(*custProfBuilderLabelType, 1, 1, 1, 1); cpfrm->add(*cpbt); vbImageProcessing->pack_start (*cpfrm, Gtk::PACK_SHRINK, 4); Gtk::Frame* fdp = Gtk::manage(new Gtk::Frame(M("PREFERENCES_PROFILEHANDLING"))); - Gtk::Table* vbdp = Gtk::manage(new Gtk::Table(2, 2)); + Gtk::Grid* vbdp = Gtk::manage(new Gtk::Grid()); saveParamsPreference = Gtk::manage(new Gtk::ComboBoxText()); saveParamsPreference->append(M("PREFERENCES_PROFILESAVEINPUT")); saveParamsPreference->append(M("PREFERENCES_PROFILESAVECACHE")); saveParamsPreference->append(M("PREFERENCES_PROFILESAVEBOTH")); Gtk::Label *splab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_PROFILESAVELOCATION") + ":", Gtk::ALIGN_START)); - vbdp->attach(*splab, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2); - vbdp->attach(*saveParamsPreference, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); Gtk::Label* lplab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_PROFILELOADPR") + ":", Gtk::ALIGN_START)); loadParamsPreference = Gtk::manage(new Gtk::ComboBoxText()); loadParamsPreference->append(M("PREFERENCES_PROFILEPRCACHE")); loadParamsPreference->append(M("PREFERENCES_PROFILEPRFILE")); - vbdp->attach(*lplab, 0, 1, 1, 2, Gtk::FILL, Gtk::SHRINK, 2, 2); - vbdp->attach(*loadParamsPreference, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); + vbdp->set_row_spacing(2); + vbdp->attach(*splab, 0, 0, 1, 1); + vbdp->attach(*saveParamsPreference, 1, 0, 1, 1); + vbdp->attach(*lplab, 0, 1, 1, 1); + vbdp->attach(*loadParamsPreference, 1, 1, 1, 1); fdp->add(*vbdp); vbImageProcessing->pack_start (*fdp, Gtk::PACK_SHRINK, 4); // Gtk::Frame* fdf = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_DARKFRAME")) ); -// Gtk::HBox* hb42 = Gtk::manage (new Gtk::HBox ()); +// Gtk::Box* hb42 = Gtk::manage (new Gtk::Box ()); // darkFrameDir = Gtk::manage (new Gtk::FileChooserButton (M ("PREFERENCES_DIRDARKFRAMES"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); // Directories Gtk::Frame* cdf = Gtk::manage(new Gtk::Frame(M("PREFERENCES_DIRECTORIES"))); @@ -627,6 +633,7 @@ Gtk::Widget* Preferences::getImageProcessingPanel () // Crop Gtk::Frame *cropFrame = Gtk::manage(new Gtk::Frame(M("PREFERENCES_CROP"))); + cropFrame->set_label_align (0.025, 0.5); Gtk::Grid *cropGrid = Gtk::manage(new Gtk::Grid()); Gtk::Label *cropGuidesLbl = Gtk::manage(new Gtk::Label(M("PREFERENCES_CROP_GUIDES") + ": ", Gtk::ALIGN_START)); cropGuidesCombo = Gtk::manage(new Gtk::ComboBoxText()); @@ -653,11 +660,12 @@ Gtk::Widget* Preferences::getPerformancePanel() swPerformance = Gtk::manage(new Gtk::ScrolledWindow()); swPerformance->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); - Gtk::VBox* vbPerformance = Gtk::manage ( new Gtk::VBox () ); + Gtk::Box* vbPerformance = Gtk::manage ( new Gtk::Box(Gtk::ORIENTATION_VERTICAL) ); vbPerformance->set_spacing (4); Gtk::Frame* fprevdemo = Gtk::manage(new Gtk::Frame(M("PREFERENCES_PREVDEMO"))); - Gtk::HBox* hbprevdemo = Gtk::manage(new Gtk::HBox(false, 4)); + Gtk::Box* hbprevdemo = Gtk::manage(new Gtk::Box()); + hbprevdemo->set_spacing(4); Gtk::Label* lprevdemo = Gtk::manage (new Gtk::Label (M("PREFERENCES_PREVDEMO_LABEL"), Gtk::ALIGN_START)); cprevdemo = Gtk::manage(new Gtk::ComboBoxText()); cprevdemo->append(M("PREFERENCES_PREVDEMO_FAST")); @@ -669,7 +677,8 @@ Gtk::Widget* Preferences::getPerformancePanel() vbPerformance->pack_start (*fprevdemo, Gtk::PACK_SHRINK, 4); Gtk::Frame* ftiffserialize = Gtk::manage(new Gtk::Frame(M("PREFERENCES_SERIALIZE_TIFF_READ"))); - Gtk::HBox* htiffserialize = Gtk::manage(new Gtk::HBox(false, 4)); + Gtk::Box* htiffserialize = Gtk::manage(new Gtk::Box()); + htiffserialize->set_spacing(4); ctiffserialize = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_SERIALIZE_TIFF_READ_LABEL"))); ctiffserialize->set_tooltip_text(M("PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP")); htiffserialize->pack_start(*ctiffserialize); @@ -685,9 +694,10 @@ Gtk::Widget* Preferences::getPerformancePanel() vbPerformance->pack_start (*fclut, Gtk::PACK_SHRINK, 4); Gtk::Frame* fchunksize = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CHUNKSIZES")) ); - Gtk::VBox* chunkSizeVB = Gtk::manage ( new Gtk::VBox () ); + fchunksize->set_label_align(0.025, 0.5); + Gtk::Box* chunkSizeVB = Gtk::manage ( new Gtk::Box(Gtk::ORIENTATION_VERTICAL) ); - Gtk::HBox* measureHB = Gtk::manage ( new Gtk::HBox () ); + Gtk::Box* measureHB = Gtk::manage ( new Gtk::Box () ); measureHB->set_spacing (4); measureCB = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_PERFORMANCE_MEASURE")) ); measureCB->set_tooltip_text (M ("PREFERENCES_PERFORMANCE_MEASURE_HINT")); @@ -705,10 +715,11 @@ Gtk::Widget* Preferences::getPerformancePanel() vbPerformance->pack_start (*fchunksize, Gtk::PACK_SHRINK, 4); Gtk::Frame* finspect = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_INSPECT_LABEL")) ); - Gtk::VBox *inspectorvb = Gtk::manage(new Gtk::VBox()); + finspect->set_label_align(0.025, 0.5); + Gtk::Box* inspectorvb = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); placeSpinBox(inspectorvb, maxInspectorBuffersSB, "PREFERENCES_INSPECT_MAXBUFFERS_LABEL", 0, 1, 5, 2, 1, 12, "PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP"); - Gtk::HBox *insphb = Gtk::manage(new Gtk::HBox()); + Gtk::Box* insphb = Gtk::manage(new Gtk::Box()); thumbnailInspectorMode = Gtk::manage(new Gtk::ComboBoxText()); thumbnailInspectorMode->append(M("PREFERENCES_THUMBNAIL_INSPECTOR_JPEG")); thumbnailInspectorMode->append(M("PREFERENCES_THUMBNAIL_INSPECTOR_RAW")); @@ -720,7 +731,8 @@ Gtk::Widget* Preferences::getPerformancePanel() vbPerformance->pack_start (*finspect, Gtk::PACK_SHRINK, 4); Gtk::Frame* threadsFrame = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_PERFORMANCE_THREADS")) ); - Gtk::VBox* threadsVBox = Gtk::manage ( new Gtk::VBox (Gtk::PACK_SHRINK, 4) ); + threadsFrame->set_label_align(0.025, 0.5); + Gtk::Box* threadsVBox = Gtk::manage ( new Gtk::Box(Gtk::ORIENTATION_VERTICAL) ); #ifdef _OPENMP int maxThreadNumber = omp_get_max_threads(); @@ -744,7 +756,7 @@ Gtk::Widget* Preferences::getColorManPanel () swColorMan = Gtk::manage(new Gtk::ScrolledWindow()); swColorMan->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); - Gtk::VBox* vbColorMan = Gtk::manage (new Gtk::VBox ()); + Gtk::Box* vbColorMan = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); vbColorMan->set_spacing (4); iccDir = Gtk::manage(new MyFileChooserButton(M("PREFERENCES_ICCDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); @@ -951,16 +963,27 @@ Gtk::Widget* Preferences::getGeneralPanel() workflowGrid->attach_next_to(*complexityL, *curveBBoxPosL, Gtk::POS_BOTTOM, 1, 1); workflowGrid->attach_next_to(*complexitylocal, *curveBBoxPosC, Gtk::POS_BOTTOM, 1, 1); + zoomOnScrollCB = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_ZOOMONSCROLL"))); + setExpandAlignProperties(zoomOnScrollCB, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + workflowGrid->attach_next_to(*zoomOnScrollCB, *complexityL, Gtk::POS_BOTTOM, 1, 1); + + inspectorWindowCB = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_INSPECTORWINDOW"))); + setExpandAlignProperties(inspectorWindowCB, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + workflowGrid->attach_next_to(*inspectorWindowCB, *complexitylocal, Gtk::POS_BOTTOM, 1, 1); + Gtk::Label* inspectorNextStartL = Gtk::manage(new Gtk::Label(Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")")); + setExpandAlignProperties(inspectorNextStartL, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + workflowGrid->attach_next_to(*inspectorNextStartL, *inspectorWindowCB, Gtk::POS_RIGHT, 1, 1); + ckbHistogramPositionLeft = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_HISTOGRAMPOSITIONLEFT"))); setExpandAlignProperties(ckbHistogramPositionLeft, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - workflowGrid->attach_next_to(*ckbHistogramPositionLeft, *complexityL, Gtk::POS_BOTTOM, 1, 1); + workflowGrid->attach_next_to(*ckbHistogramPositionLeft, *zoomOnScrollCB, Gtk::POS_BOTTOM, 1, 1); ckbFileBrowserToolbarSingleRow = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_FILEBROWSERTOOLBARSINGLEROW"))); setExpandAlignProperties(ckbFileBrowserToolbarSingleRow, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START); ckbShowFilmStripToolBar = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_SHOWFILMSTRIPTOOLBAR"))); setExpandAlignProperties(ckbShowFilmStripToolBar, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START); workflowGrid->attach_next_to(*ckbFileBrowserToolbarSingleRow, *ckbHistogramPositionLeft, Gtk::POS_BOTTOM, 1, 1); - workflowGrid->attach_next_to(*ckbShowFilmStripToolBar, *complexitylocal, Gtk::POS_BOTTOM, 2, 1); + workflowGrid->attach_next_to(*ckbShowFilmStripToolBar, *inspectorWindowCB, Gtk::POS_BOTTOM, 2, 1); Gtk::Label* hb4label = Gtk::manage(new Gtk::Label(M("PREFERENCES_TP_LABEL"))); setExpandAlignProperties(hb4label, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); @@ -1080,7 +1103,7 @@ Gtk::Widget* Preferences::getGeneralPanel() pseudoHiDPI = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_APPEARANCE_PSEUDOHIDPI") + Glib::ustring (" (") + M ("PREFERENCES_APPLNEXTSTARTUP") + ")")); setExpandAlignProperties(pseudoHiDPI, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - Gtk::VSeparator *vSep = Gtk::manage(new Gtk::VSeparator()); + Gtk::Separator *vSep = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)); appearanceGrid->attach(*themeLbl, 0, 0, 1, 1); @@ -1237,7 +1260,7 @@ Gtk::Widget* Preferences::getFileBrowserPanel() swFileBrowser = Gtk::manage(new Gtk::ScrolledWindow()); swFileBrowser->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); - Gtk::VBox* vbFileBrowser = Gtk::manage ( new Gtk::VBox () ); + Gtk::Box* vbFileBrowser = Gtk::manage ( new Gtk::Box(Gtk::ORIENTATION_VERTICAL) ); Gtk::Frame* fsd = Gtk::manage(new Gtk::Frame(M("PREFERENCES_STARTUPIMDIR"))); @@ -1255,11 +1278,11 @@ Gtk::Widget* Preferences::getFileBrowserPanel() sdhome->set_group(opts); sdother->set_group(opts); - Gtk::VBox* vbsd = Gtk::manage(new Gtk::VBox()); + Gtk::Box* vbsd = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); vbsd->pack_start(*sdcurrent, Gtk::PACK_SHRINK, 0); vbsd->pack_start(*sdlast, Gtk::PACK_SHRINK, 0); vbsd->pack_start(*sdhome, Gtk::PACK_SHRINK, 0); - Gtk::HBox* otherbox = Gtk::manage(new Gtk::HBox()); + Gtk::Box* otherbox = Gtk::manage(new Gtk::Box()); otherbox->pack_start(*sdother, Gtk::PACK_SHRINK); otherbox->pack_start(*startupdir); otherbox->pack_end(*sdselect, Gtk::PACK_SHRINK, 4); @@ -1277,9 +1300,9 @@ Gtk::Widget* Preferences::getFileBrowserPanel() showDateTime = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_SHOWDATETIME"))); showBasicExif = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_SHOWBASICEXIF"))); showExpComp = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_SHOWEXPOSURECOMPENSATION"))); - Gtk::VBox* vbro = Gtk::manage(new Gtk::VBox()); - Gtk::HBox* hbro1 = Gtk::manage(new Gtk::HBox()); - Gtk::HBox* hbro0 = Gtk::manage(new Gtk::HBox()); + Gtk::Box* vbro = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + Gtk::Box* hbro1 = Gtk::manage(new Gtk::Box()); + Gtk::Box* hbro0 = Gtk::manage(new Gtk::Box()); overlayedFileNames = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_OVERLAY_FILENAMES"))); filmStripOverlayedFileNames = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_OVERLAY_FILENAMES_FILMSTRIP"))); sameThumbSize = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT"))); @@ -1303,7 +1326,7 @@ Gtk::Widget* Preferences::getFileBrowserPanel() vbro->pack_start(*sameThumbSize, Gtk::PACK_SHRINK, 0); vbro->pack_start(*ckbInternalThumbIfUntouched, Gtk::PACK_SHRINK, 0); - Gtk::HBox* hbrecent = Gtk::manage(new Gtk::HBox()); + Gtk::Box* hbrecent = Gtk::manage(new Gtk::Box()); Gtk::Label* labrecent = Gtk::manage (new Gtk::Label (M("PREFERENCES_MAXRECENTFOLDERS") + ":", Gtk::ALIGN_START)); maxRecentFolders = Gtk::manage(new Gtk::SpinButton()); hbrecent->pack_start(*labrecent, Gtk::PACK_SHRINK, 4); @@ -1343,8 +1366,8 @@ Gtk::Widget* Preferences::getFileBrowserPanel() Gtk::Frame* fre = Gtk::manage(new Gtk::Frame(M("PREFERENCES_PARSEDEXT"))); - Gtk::VBox* vbre = Gtk::manage(new Gtk::VBox()); - Gtk::HBox* hb0 = Gtk::manage(new Gtk::HBox()); + Gtk::Box* vbre = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + Gtk::Box* hb0 = Gtk::manage(new Gtk::Box()); Gtk::Label* elab = Gtk::manage (new Gtk::Label (M("PREFERENCES_PARSEDEXTADD") + ":", Gtk::ALIGN_START)); hb0->pack_start(*elab, Gtk::PACK_SHRINK, 4); extension = Gtk::manage(new Gtk::Entry()); @@ -1388,7 +1411,7 @@ Gtk::Widget* Preferences::getFileBrowserPanel() // Cache Gtk::Frame* frc = Gtk::manage (new Gtk::Frame(M("PREFERENCES_CACHEOPTS"))); - Gtk::VBox* vbc = Gtk::manage (new Gtk::VBox()); + Gtk::Box* vbc = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); frc->add(*vbc); Gtk::Grid* cacheGrid = Gtk::manage(new Gtk::Grid()); @@ -1411,7 +1434,7 @@ Gtk::Widget* Preferences::getFileBrowserPanel() // Separation is needed so that a button is not accidentally clicked when one wanted // to click a spinbox. Ideally, the separation wouldn't require attaching a widget, but how? - Gtk::HSeparator *cacheSeparator = Gtk::manage (new Gtk::HSeparator()); + Gtk::Separator *cacheSeparator = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); cacheSeparator->get_style_context()->add_class("grid-row-separator"); Gtk::Label* clearThumbsLbl = Gtk::manage (new Gtk::Label(M("PREFERENCES_CACHECLEAR_ALLBUTPROFILES"))); @@ -1447,8 +1470,8 @@ Gtk::Widget* Preferences::getFileBrowserPanel() clearSafetyLbl->set_line_wrap(true); vbc->pack_start(*clearSafetyLbl, Gtk::PACK_SHRINK, 4); - Gtk::HBox* hb6 = Gtk::manage(new Gtk::HBox()); - Gtk::VBox* vb6 = Gtk::manage(new Gtk::VBox()); + Gtk::Box* hb6 = Gtk::manage(new Gtk::Box()); + Gtk::Box* vb6 = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); vb6->pack_start(*fro); vb6->pack_start(*frmnu); @@ -1479,20 +1502,20 @@ Gtk::Widget* Preferences::getSoundsPanel () swSounds = Gtk::manage(new Gtk::ScrolledWindow()); swSounds->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); - Gtk::VBox* vbSounds = Gtk::manage(new Gtk::VBox ()); + Gtk::Box* vbSounds = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); ckbSndEnable = Gtk::manage(new Gtk::CheckButton(M("GENERAL_ENABLE"))); sndEnableConn = ckbSndEnable->signal_toggled().connect(sigc::mem_fun(*this, &Preferences::sndEnableToggled)); vbSounds->pack_start (*ckbSndEnable, Gtk::PACK_SHRINK, 4); - Gtk::HBox* hblSndHelp = Gtk::manage(new Gtk::HBox()); + Gtk::Box* hblSndHelp = Gtk::manage(new Gtk::Box()); Gtk::Label* lSndHelp = Gtk::manage (new Gtk::Label (M("PREFERENCES_SND_HELP"), Gtk::ALIGN_START)); hblSndHelp->pack_start(*lSndHelp, Gtk::PACK_SHRINK, 4); vbSounds->pack_start (*hblSndHelp, Gtk::PACK_SHRINK, 4); // BatchQueueDone - Gtk::HBox* pBatchQueueDone = Gtk::manage(new Gtk::HBox()); + Gtk::Box* pBatchQueueDone = Gtk::manage(new Gtk::Box()); Gtk::Label* lSndBatchQueueDone = Gtk::manage (new Gtk::Label (M("PREFERENCES_SND_QUEUEDONE") + Glib::ustring (":"), Gtk::ALIGN_START)); pBatchQueueDone->pack_start (*lSndBatchQueueDone, Gtk::PACK_SHRINK, 4); @@ -1503,7 +1526,7 @@ Gtk::Widget* Preferences::getSoundsPanel () vbSounds->pack_start (*pBatchQueueDone, Gtk::PACK_SHRINK, 4); // LngEditProcDone - Gtk::HBox* pSndLngEditProcDone = Gtk::manage(new Gtk::HBox()); + Gtk::Box* pSndLngEditProcDone = Gtk::manage(new Gtk::Box()); Gtk::Label* lSndLngEditProcDone = Gtk::manage (new Gtk::Label (M("PREFERENCES_SND_LNGEDITPROCDONE") + Glib::ustring (":"), Gtk::ALIGN_START)); pSndLngEditProcDone->pack_start(*lSndLngEditProcDone, Gtk::PACK_SHRINK, 4); @@ -1815,6 +1838,8 @@ void Preferences::storePreferences() moptions.curvebboxpos = curveBBoxPosC->get_active_row_number(); moptions.complexity = complexitylocal->get_active_row_number(); + moptions.inspectorWindow = inspectorWindowCB->get_active(); + moptions.zoomOnScroll = zoomOnScrollCB->get_active(); moptions.histogramPosition = ckbHistogramPositionLeft->get_active() ? 1 : 2; moptions.FileBrowserToolbarSingleRow = ckbFileBrowserToolbarSingleRow->get_active(); moptions.showFilmStripToolBar = ckbShowFilmStripToolBar->get_active(); @@ -2029,6 +2054,8 @@ void Preferences::fillPreferences() curveBBoxPosC->set_active(moptions.curvebboxpos); complexitylocal->set_active(moptions.complexity); + inspectorWindowCB->set_active(moptions.inspectorWindow); + zoomOnScrollCB->set_active(moptions.zoomOnScroll); ckbHistogramPositionLeft->set_active(moptions.histogramPosition == 1); ckbFileBrowserToolbarSingleRow->set_active(moptions.FileBrowserToolbarSingleRow); diff --git a/rtgui/preferences.h b/rtgui/preferences.h index 3cf6b2043..df4e3327a 100644 --- a/rtgui/preferences.h +++ b/rtgui/preferences.h @@ -138,7 +138,7 @@ class Preferences final : Gtk::ComboBoxText* dnliss; Gtk::Frame* waveletFrame; - Gtk::HBox* waveletTileSizeHBox; + Gtk::Box* waveletTileSizeHBox; Gtk::Label* waveletTileSizeLabel; Gtk::ComboBoxText* waveletTileSizeCombo; @@ -148,6 +148,9 @@ class Preferences final : Gtk::ComboBoxText* complexitylocal; + Gtk::CheckButton* inspectorWindowCB; + Gtk::CheckButton* zoomOnScrollCB; + Gtk::ComboBoxText* themeCBT; Gtk::FontButton* mainFontFB; Gtk::FontButton* colorPickerFontFB; diff --git a/rtgui/preprocess.cc b/rtgui/preprocess.cc index f33a87a28..b9326e3ad 100644 --- a/rtgui/preprocess.cc +++ b/rtgui/preprocess.cc @@ -31,7 +31,7 @@ using namespace rtengine::procparams; PreProcess::PreProcess () : FoldableToolPanel(this, "preprocess", M("TP_PREPROCESS_LABEL"), options.prevdemo != PD_Sidecar) { - Gtk::HBox* hotdeadPixel = Gtk::manage( new Gtk::HBox () ); + Gtk::Box* hotdeadPixel = Gtk::manage( new Gtk::Box () ); hotdeadPixel->set_spacing(4); hotPixel = Gtk::manage(new Gtk::CheckButton((M("TP_PREPROCESS_HOTPIXFILT")))); deadPixel = Gtk::manage(new Gtk::CheckButton((M("TP_PREPROCESS_DEADPIXFILT")))); diff --git a/rtgui/preprocesswb.cc b/rtgui/preprocesswb.cc index 170371318..dddd7fdc2 100644 --- a/rtgui/preprocesswb.cc +++ b/rtgui/preprocesswb.cc @@ -34,7 +34,7 @@ PreprocessWB::PreprocessWB() : evPreprocessWBMode(ProcEventMapper::getInstance()->newEvent(FIRST, "HISTORY_MSG_PREPROCWB_MODE")), mode(Gtk::manage(new MyComboBoxText())) { - Gtk::HBox *hb = Gtk::manage(new Gtk::HBox()); + Gtk::Box *hb = Gtk::manage(new Gtk::Box()); hb->pack_start(*Gtk::manage(new Gtk::Label(M("TP_PREPROCWB_MODE") + ": ")), Gtk::PACK_SHRINK, 0); mode->append(M("TP_PREPROCWB_MODE_CAMERA")); diff --git a/rtgui/previewmodepanel.cc b/rtgui/previewmodepanel.cc index 37b3f6468..586923173 100644 --- a/rtgui/previewmodepanel.cc +++ b/rtgui/previewmodepanel.cc @@ -105,7 +105,7 @@ PreviewModePanel::PreviewModePanel (ImageArea* ia) : imageArea(ia) pack_start (*backColor3, Gtk::PACK_SHRINK, 0); pack_start (*backColor2, Gtk::PACK_SHRINK, 0); - pack_start (*Gtk::manage (new Gtk::VSeparator ()), Gtk::PACK_SHRINK, 2); + pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)), Gtk::PACK_SHRINK, 2); pack_start (*previewR, Gtk::PACK_SHRINK, 0); pack_start (*previewG, Gtk::PACK_SHRINK, 0); diff --git a/rtgui/previewmodepanel.h b/rtgui/previewmodepanel.h index 4121dfb92..d475fd4a4 100644 --- a/rtgui/previewmodepanel.h +++ b/rtgui/previewmodepanel.h @@ -22,7 +22,7 @@ class ImageArea; class PreviewModePanel : - public Gtk::HBox + public Gtk::Box { protected: diff --git a/rtgui/profilepanel.cc b/rtgui/profilepanel.cc index c7e889b3f..a13c6421d 100644 --- a/rtgui/profilepanel.cc +++ b/rtgui/profilepanel.cc @@ -531,6 +531,9 @@ void ProfilePanel::load_clicked (GdkEventButton* event) if (!fillMode->get_active()) { *custom->pedited = pe; + } else { + // Resize custom->pedited to be compliant with pe spot size + custom->pedited->locallab.spots.resize(pe.locallab.spots.size(), LocallabParamsEdited::LocallabSpotEdited(true)); } } diff --git a/rtgui/prsharpening.cc b/rtgui/prsharpening.cc index d065dbc07..c79fff1a1 100644 --- a/rtgui/prsharpening.cc +++ b/rtgui/prsharpening.cc @@ -35,7 +35,7 @@ PrSharpening::PrSharpening () : FoldableToolPanel(this, "prsharpening", M("TP_PR //setEnabledTooltipMarkup(M("TP_PRSHARPENING_TOOLTIP")); - Gtk::HBox* hb = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* hb = Gtk::manage (new Gtk::Box ()); hb->show (); contrast = Gtk::manage(new Adjuster (M("TP_SHARPENING_CONTRAST"), 0, 200, 1, 15)); contrast->setAdjusterListener (this); @@ -52,7 +52,7 @@ PrSharpening::PrSharpening () : FoldableToolPanel(this, "prsharpening", M("TP_PR hb->pack_start(*method); pack_start (*hb); - rld = new Gtk::VBox (); + rld = new Gtk::Box(Gtk::ORIENTATION_VERTICAL); dradius = Gtk::manage (new Adjuster (M("TP_SHARPENING_EDRADIUS"), 0.4, 2.5, 0.01, 0.45)); damount = Gtk::manage (new Adjuster (M("TP_SHARPENING_RLD_AMOUNT"), 0.0, 100, 1, 100)); ddamping = Gtk::manage (new Adjuster (M("TP_SHARPENING_RLD_DAMPING"), 0, 100, 1, 0)); @@ -67,10 +67,10 @@ PrSharpening::PrSharpening () : FoldableToolPanel(this, "prsharpening", M("TP_PR diter->show (); rld->show (); - usm = new Gtk::VBox (); + usm = new Gtk::Box(Gtk::ORIENTATION_VERTICAL); usm->show (); - Gtk::HSeparator *hsep6a = Gtk::manage (new Gtk::HSeparator()); + Gtk::Separator* hsep6a = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); amount = Gtk::manage (new Adjuster (M("TP_SHARPENING_AMOUNT"), 1, 1000, 1, 200)); radius = Gtk::manage (new Adjuster (M("TP_SHARPENING_RADIUS"), 0.3, 3, 0.01, 0.5)); threshold = Gtk::manage (new ThresholdAdjuster (M("TP_SHARPENING_THRESHOLD"), 0., 2000., 20., 80., 2000., 1200., 0, false)); @@ -88,10 +88,10 @@ PrSharpening::PrSharpening () : FoldableToolPanel(this, "prsharpening", M("TP_PR amount->show (); threshold->show (); - Gtk::HSeparator *hsep6 = Gtk::manage (new Gtk::HSeparator()); + Gtk::Separator* hsep6 = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); edgesonly = Gtk::manage (new Gtk::CheckButton (M("TP_SHARPENING_ONLYEDGES"))); edgesonly->set_active (false); - edgebox = new Gtk::VBox (); + edgebox = new Gtk::Box(Gtk::ORIENTATION_VERTICAL); eradius = Gtk::manage (new Adjuster (M("TP_SHARPENING_EDRADIUS"), 0.5, 2.5, 0.1, 1.9)); etolerance = Gtk::manage (new Adjuster (M("TP_SHARPENING_EDTOLERANCE"), 10, 10000, 100, 1800)); usm->pack_start(*hsep6, Gtk::PACK_SHRINK, 2); @@ -99,7 +99,7 @@ PrSharpening::PrSharpening () : FoldableToolPanel(this, "prsharpening", M("TP_PR edgebox->pack_start(*eradius); edgebox->pack_start(*etolerance); edgebox->show (); - edgebin = Gtk::manage (new Gtk::VBox ()); + edgebin = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); usm->pack_start (*edgebin); edgebin->show (); hsep6->show(); @@ -107,16 +107,16 @@ PrSharpening::PrSharpening () : FoldableToolPanel(this, "prsharpening", M("TP_PR eradius->show(); etolerance->show(); - Gtk::HSeparator *hsep6b = Gtk::manage (new Gtk::HSeparator()); + Gtk::Separator* hsep6b = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); halocontrol = Gtk::manage (new Gtk::CheckButton (M("TP_SHARPENING_HALOCONTROL"))); halocontrol->set_active (false); - hcbox = new Gtk::VBox (); + hcbox = new Gtk::Box(Gtk::ORIENTATION_VERTICAL); hcamount = Gtk::manage (new Adjuster (M("TP_SHARPENING_HCAMOUNT"), 1, 100, 1, 75)); usm->pack_start(*hsep6b, Gtk::PACK_SHRINK, 2); usm->pack_start(*halocontrol); hcbox->pack_start(*hcamount); hcbox->show (); - hcbin = Gtk::manage (new Gtk::VBox ()); + hcbin = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); usm->pack_start (*hcbin); hcbin->show (); hsep6b->show (); diff --git a/rtgui/prsharpening.h b/rtgui/prsharpening.h index 9738a5cd4..4128bc4c5 100644 --- a/rtgui/prsharpening.h +++ b/rtgui/prsharpening.h @@ -38,18 +38,18 @@ protected: Adjuster* damount; Adjuster* ddamping; Adjuster* diter; - Gtk::VBox* usm; - Gtk::VBox* rld; + Gtk::Box* usm; + Gtk::Box* rld; Adjuster* radius; Adjuster* amount; Adjuster* eradius; Adjuster* etolerance; Adjuster* hcamount; - Gtk::VBox* edgebin; - Gtk::VBox* hcbin; - Gtk::VBox* edgebox; - Gtk::VBox* hcbox; + Gtk::Box* edgebin; + Gtk::Box* hcbin; + Gtk::Box* edgebox; + Gtk::Box* hcbox; ThresholdAdjuster* threshold; Gtk::CheckButton* edgesonly; bool lastEdgesOnly; diff --git a/rtgui/recentbrowser.cc b/rtgui/recentbrowser.cc index fca97cafa..9d3cc1f12 100644 --- a/rtgui/recentbrowser.cc +++ b/rtgui/recentbrowser.cc @@ -24,10 +24,12 @@ using namespace rtengine; RecentBrowser::RecentBrowser () { - + set_orientation(Gtk::ORIENTATION_VERTICAL); + recentDirs = Gtk::manage (new MyComboBoxText ()); Gtk::Frame* frame = Gtk::manage (new Gtk::Frame (M("MAIN_FRAME_RECENT"))); + frame->set_label_align(0.025, 0.5); frame->add (*recentDirs); for(size_t i = 0; i < options.recentFolders.size(); i++) { diff --git a/rtgui/recentbrowser.h b/rtgui/recentbrowser.h index bc8374087..68b3359b2 100644 --- a/rtgui/recentbrowser.h +++ b/rtgui/recentbrowser.h @@ -23,7 +23,7 @@ #include "guiutils.h" class RecentBrowser : - public Gtk::VBox + public Gtk::Box { public: typedef sigc::slot DirSelectionSlot; diff --git a/rtgui/renamedlg.cc b/rtgui/renamedlg.cc index 8908d3419..e35c6268d 100644 --- a/rtgui/renamedlg.cc +++ b/rtgui/renamedlg.cc @@ -25,21 +25,26 @@ RenameDialog::RenameDialog (Gtk::Window* parent) : Gtk::Dialog (M("FILEBROWSER_RENAMEDLGLABEL"), *parent, true), p(parent), imageData(nullptr) { - Gtk::Table* names = Gtk::manage (new Gtk::Table (2, 2)); + Gtk::Grid* names = Gtk::manage (new Gtk::Grid()); Gtk::Label* onlab = Gtk::manage (new Gtk::Label (M("FILEBROWSER_CURRENT_NAME"))); + onlab->set_halign(Gtk::ALIGN_START); Gtk::Label* nnlab = Gtk::manage (new Gtk::Label (M("FILEBROWSER_NEW_NAME"))); - oldName = Gtk::manage (new Gtk::Label ("alma")); - newName = Gtk::manage (new Gtk::Entry ()); - - names->attach (*onlab, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); - names->attach (*oldName, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); - names->attach (*nnlab, 0, 1, 1, 2, Gtk::SHRINK, Gtk::SHRINK, 2, 2); - names->attach (*newName, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); + nnlab->set_halign(Gtk::ALIGN_START); + oldName = Gtk::manage (new Gtk::Label("alma")); + oldName->set_halign(Gtk::ALIGN_START); + newName = Gtk::manage (new Gtk::Entry()); + newName->set_hexpand(); + newName->set_halign(Gtk::ALIGN_FILL); + + names->attach(*onlab, 0, 0, 1, 1); + names->attach(*oldName, 1, 0, 1, 1); + names->attach(*nnlab, 0, 1, 1, 1); + names->attach(*newName, 1, 1, 1, 1); get_content_area()->pack_start (*names, Gtk::PACK_SHRINK, 4); // Issue 316 -// Gtk::HBox* tbox = Gtk::manage (new Gtk::HBox()); +// Gtk::Box* tbox = Gtk::manage (new Gtk::Box()); // useTmpl = Gtk::manage (new Gtk::CheckButton (M("FILEBROWSER_USETEMPLATE"))); // templates = Gtk::manage (new MyComboBox ()); // templateModel = Gtk::ListStore::create (templateColumns); @@ -51,8 +56,8 @@ RenameDialog::RenameDialog (Gtk::Window* parent) // get_content_area()->pack_start (*tbox, Gtk::PACK_SHRINK, 4); - add_button (Gtk::Stock::OK, Gtk::RESPONSE_OK); - add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); + add_button ("_OK", Gtk::RESPONSE_OK); + add_button ("_Cancel", Gtk::RESPONSE_CANCEL); // Issue 316 // all = add_button ("All", RESPONSE_ALL); diff --git a/rtgui/resize.cc b/rtgui/resize.cc index a65875426..314377049 100644 --- a/rtgui/resize.cc +++ b/rtgui/resize.cc @@ -37,26 +37,33 @@ Resize::Resize () : FoldableToolPanel(this, "resize", M("TP_RESIZE_LABEL"), fals cropw = 0; croph = 0; - Gtk::Table* combos = Gtk::manage (new Gtk::Table (2, 2)); + Gtk::Grid* combos = Gtk::manage (new Gtk::Grid()); + combos->set_row_spacing(4); appliesTo = Gtk::manage (new MyComboBoxText ()); appliesTo->append (M("TP_RESIZE_CROPPEDAREA")); appliesTo->append (M("TP_RESIZE_FULLIMAGE")); appliesTo->set_active (0); + appliesTo->set_hexpand(); + appliesTo->set_halign(Gtk::ALIGN_FILL); Gtk::Label *label = Gtk::manage (new Gtk::Label (M("TP_RESIZE_APPLIESTO"), Gtk::ALIGN_START)); - combos->attach (*label, 0, 1, 0, 1, Gtk::SHRINK | Gtk::FILL, Gtk::SHRINK, 2, 2); - combos->attach (*appliesTo, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); + + combos->attach(*label, 0, 0, 1, 1); + combos->attach(*appliesTo, 1, 0, 1, 1); // See Resize::methodChanged() when adding a new method. method = Gtk::manage (new MyComboBoxText ()); method->append (M("TP_RESIZE_LANCZOS")); method->append (M("TP_RESIZE_NEAREST")); method->set_active (0); + method->set_hexpand(); + method->set_halign(Gtk::ALIGN_FILL); label = Gtk::manage (new Gtk::Label (M("TP_RESIZE_METHOD"), Gtk::ALIGN_START)); - combos->attach (*label, 0, 1, 1, 2, Gtk::SHRINK | Gtk::FILL, Gtk::SHRINK, 2, 2); - combos->attach (*method, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); + + combos->attach(*label, 0, 1, 1, 1); + combos->attach(*method, 1, 1, 1, 1); spec = Gtk::manage (new MyComboBoxText ()); spec->append (M("TP_RESIZE_SCALE")); @@ -64,10 +71,13 @@ Resize::Resize () : FoldableToolPanel(this, "resize", M("TP_RESIZE_LABEL"), fals spec->append (M("TP_RESIZE_HEIGHT")); spec->append (M("TP_RESIZE_FITBOX")); spec->set_active (0); + spec->set_hexpand(); + spec->set_halign(Gtk::ALIGN_FILL); label = Gtk::manage (new Gtk::Label (M("TP_RESIZE_SPECIFY"), Gtk::ALIGN_START)); - combos->attach (*label, 0, 1, 2, 3, Gtk::SHRINK | Gtk::FILL, Gtk::SHRINK, 2, 2); - combos->attach (*spec, 1, 2, 2, 3, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); + + combos->attach(*label, 0, 2, 1, 1); + combos->attach(*spec, 1, 2, 1, 1); pack_start (*combos, Gtk::PACK_SHRINK, 4); @@ -76,11 +86,11 @@ Resize::Resize () : FoldableToolPanel(this, "resize", M("TP_RESIZE_LABEL"), fals pack_start (*scale, Gtk::PACK_SHRINK, 4); - sizeBox = Gtk::manage (new Gtk::VBox ()); + sizeBox = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); - Gtk::HBox* sbox = Gtk::manage (new Gtk::HBox ()); - Gtk::HBox* wbox = Gtk::manage (new Gtk::HBox ()); - Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* sbox = Gtk::manage (new Gtk::Box ()); + Gtk::Box* wbox = Gtk::manage (new Gtk::Box ()); + Gtk::Box* hbox = Gtk::manage (new Gtk::Box ()); w = Gtk::manage (new MySpinButton ()); h = Gtk::manage (new MySpinButton ()); wbox->set_spacing(3); diff --git a/rtgui/resize.h b/rtgui/resize.h index 41b54509e..ec4907fd1 100644 --- a/rtgui/resize.h +++ b/rtgui/resize.h @@ -70,7 +70,7 @@ private: rtengine::ProcEvent EvResizeAllowUpscaling; Adjuster* scale; - Gtk::VBox* sizeBox; + Gtk::Box* sizeBox; MyComboBoxText* appliesTo; MyComboBoxText* method; MyComboBoxText* spec; diff --git a/rtgui/retinex.cc b/rtgui/retinex.cc index ec250d69b..a9d7cc376 100644 --- a/rtgui/retinex.cc +++ b/rtgui/retinex.cc @@ -41,7 +41,7 @@ Retinex::Retinex () : FoldableToolPanel (this, "retinex", M ("TP_RETINEX_LABEL") complexmethod->append(M("TP_WAVELET_COMPEXPERT")); complexmethodconn = complexmethod->signal_changed().connect(sigc::mem_fun(*this, &Retinex::complexmethodChanged)); complexmethod->set_tooltip_text(M("TP_WAVELET_COMPLEX_TOOLTIP")); - Gtk::HBox* const complexHBox = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const complexHBox = Gtk::manage(new Gtk::Box()); Gtk::Label* const complexLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_COMPLEXLAB") + ":")); complexHBox->pack_start(*complexLabel, Gtk::PACK_SHRINK, 4); complexHBox->pack_start(*complexmethod); @@ -132,6 +132,7 @@ Retinex::Retinex () : FoldableToolPanel (this, "retinex", M ("TP_RETINEX_LABEL") // Gtk::Frame *maskFrame = Gtk::manage (new Gtk::Frame (M ("TP_RETINEX_LABEL_MASK")) ); maskFrame = Gtk::manage (new Gtk::Frame (M ("TP_RETINEX_LABEL_MASK")) ); + maskFrame->set_label_align(0.025, 0.5); setExpandAlignProperties (maskFrame, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); Gtk::Grid *maskGrid = Gtk::manage ( new Gtk::Grid()); @@ -242,6 +243,7 @@ Retinex::Retinex () : FoldableToolPanel (this, "retinex", M ("TP_RETINEX_LABEL") equalFrame = Gtk::manage (new Gtk::Frame (M ("TP_RETINEX_EQUAL"))); + equalFrame->set_label_align(0.025, 0.5); setExpandAlignProperties (equalFrame, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); //GTK318 #if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 @@ -345,6 +347,7 @@ Retinex::Retinex () : FoldableToolPanel (this, "retinex", M ("TP_RETINEX_LABEL") iterFrame = Gtk::manage (new Gtk::Frame (M ("TP_RETINEX_ITERF"))); + iterFrame->set_label_align(0.025, 0.5); setExpandAlignProperties (iterFrame, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); //GTK318 #if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 @@ -389,6 +392,7 @@ Retinex::Retinex () : FoldableToolPanel (this, "retinex", M ("TP_RETINEX_LABEL") tranFrame = Gtk::manage (new Gtk::Frame (M ("TP_RETINEX_TRANF"))); + tranFrame->set_label_align(0.025, 0.5); setExpandAlignProperties (tranFrame, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); //GTK318 #if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 @@ -444,6 +448,7 @@ Retinex::Retinex () : FoldableToolPanel (this, "retinex", M ("TP_RETINEX_LABEL") gainFrame = Gtk::manage (new Gtk::Frame (M ("TP_RETINEX_GAINOFFS"))); + gainFrame->set_label_align(0.025, 0.5); setExpandAlignProperties (gainFrame, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); //GTK318 #if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 diff --git a/rtgui/rgbcurves.cc b/rtgui/rgbcurves.cc index d501cf449..5e7616e70 100644 --- a/rtgui/rgbcurves.cc +++ b/rtgui/rgbcurves.cc @@ -36,7 +36,7 @@ RGBCurves::RGBCurves () : FoldableToolPanel(this, "rgbcurves", M("TP_RGBCURVES_L lumamode->show (); pack_start (*lumamode); - Gtk::HSeparator *hsep1 = Gtk::manage (new Gtk::HSeparator()); + Gtk::Separator *hsep1 = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); hsep1->show (); pack_start (*hsep1); diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index e1d8c1f84..c0042f949 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -354,7 +354,7 @@ RTWindow::RTWindow () mainNB->set_current_page (mainNB->page_num (*fpanel)); - //Gtk::VBox* mainBox = Gtk::manage (new Gtk::VBox ()); + //Gtk::Box* mainBox = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); //mainBox->pack_start (*mainNB); // filling bottom box diff --git a/rtgui/saveasdlg.cc b/rtgui/saveasdlg.cc index ebf2f5b4a..a4062d502 100644 --- a/rtgui/saveasdlg.cc +++ b/rtgui/saveasdlg.cc @@ -127,22 +127,22 @@ SaveAsDialog::SaveAsDialog (const Glib::ustring &initialDir, Gtk::Window* parent // pack everything // ~~~~~~~~~~~~~~~ - Gtk::VBox* vbox_bottomRight = Gtk::manage(new Gtk::VBox ()); + Gtk::Box* vbox_bottomRight = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); // There is no queue in simple mode, so no need to choose if (!simpleEditor) { vbox_bottomRight->pack_start (*saveMethod[0], Gtk::PACK_SHRINK, 2); vbox_bottomRight->pack_start (*saveMethod[1], Gtk::PACK_SHRINK, 2); vbox_bottomRight->pack_start (*saveMethod[2], Gtk::PACK_SHRINK, 2); - vbox_bottomRight->pack_start (*Gtk::manage(new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 5); + vbox_bottomRight->pack_start (*Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)), Gtk::PACK_SHRINK, 5); } vbox_bottomRight->pack_start (*forceFormatOpts, Gtk::PACK_SHRINK, 4); vbox_bottomRight->pack_start (*autoSuffix, Gtk::PACK_SHRINK, 4); - Gtk::HBox* hbox_bottom = Gtk::manage( new Gtk::HBox() ); + Gtk::Box* hbox_bottom = Gtk::manage( new Gtk::Box() ); hbox_bottom->pack_start (*formatOpts, Gtk::PACK_EXPAND_WIDGET, 2); - hbox_bottom->pack_start (*Gtk::manage(new Gtk::VSeparator ()), Gtk::PACK_SHRINK, 2); + hbox_bottom->pack_start (*Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)), Gtk::PACK_SHRINK, 2); hbox_bottom->pack_start (*vbox_bottomRight, Gtk::PACK_EXPAND_WIDGET, 2); box->pack_start (*fchooser); diff --git a/rtgui/shadowshighlights.cc b/rtgui/shadowshighlights.cc index 3e3c277c7..a168527d6 100644 --- a/rtgui/shadowshighlights.cc +++ b/rtgui/shadowshighlights.cc @@ -28,9 +28,9 @@ using namespace rtengine::procparams; ShadowsHighlights::ShadowsHighlights () : FoldableToolPanel(this, "shadowshighlights", M("TP_SHADOWSHLIGHTS_LABEL"), false, true) { auto m = ProcEventMapper::getInstance(); - EvSHColorspace = m->newEvent(RGBCURVE, "HISTORY_MSG_SH_COLORSPACE"); + EvSHColorspace = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_SH_COLORSPACE"); - Gtk::HBox* hb = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* hb = Gtk::manage (new Gtk::Box ()); hb->pack_start(*Gtk::manage(new Gtk::Label(M("TP_DIRPYRDENOISE_MAIN_COLORSPACE") + ": ")), Gtk::PACK_SHRINK); colorspace = Gtk::manage(new MyComboBoxText()); colorspace->append(M("TP_DIRPYRDENOISE_MAIN_COLORSPACE_RGB")); @@ -38,21 +38,21 @@ ShadowsHighlights::ShadowsHighlights () : FoldableToolPanel(this, "shadowshighli hb->pack_start(*colorspace); pack_start(*hb); - pack_start (*Gtk::manage (new Gtk::HSeparator())); + pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL))); highlights = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_HIGHLIGHTS"), 0, 100, 1, 0)); h_tonalwidth = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_HLTONALW"), 10, 100, 1, 70)); pack_start (*highlights); pack_start (*h_tonalwidth); - pack_start (*Gtk::manage (new Gtk::HSeparator())); + pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL))); shadows = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_SHADOWS"), 0, 100, 1, 0)); s_tonalwidth = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_SHTONALW"), 10, 100, 1, 30)); pack_start (*shadows); pack_start (*s_tonalwidth); - pack_start (*Gtk::manage (new Gtk::HSeparator())); + pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL))); radius = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_RADIUS"), 1, 100, 1, 40)); pack_start (*radius); diff --git a/rtgui/sharpening.cc b/rtgui/sharpening.cc index e16511279..687358349 100644 --- a/rtgui/sharpening.cc +++ b/rtgui/sharpening.cc @@ -29,7 +29,7 @@ Sharpening::Sharpening () : FoldableToolPanel(this, "sharpening", M("TP_SHARPENI EvSharpenContrast = m->newEvent(SHARPENING, "HISTORY_MSG_SHARPENING_CONTRAST"); EvSharpenBlur = m->newEvent(SHARPENING, "HISTORY_MSG_SHARPENING_BLUR"); - Gtk::HBox* hb = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* hb = Gtk::manage (new Gtk::Box ()); hb->show (); contrast = Gtk::manage(new Adjuster (M("TP_SHARPENING_CONTRAST"), 0, 200, 1, 20)); contrast->setAdjusterListener (this); @@ -50,7 +50,7 @@ Sharpening::Sharpening () : FoldableToolPanel(this, "sharpening", M("TP_SHARPENI hb->pack_start(*method); pack_start (*hb); - rld = new Gtk::VBox (); + rld = new Gtk::Box(Gtk::ORIENTATION_VERTICAL); dradius = Gtk::manage (new Adjuster (M("TP_SHARPENING_EDRADIUS"), 0.4, 2.5, 0.01, 0.75)); damount = Gtk::manage (new Adjuster (M("TP_SHARPENING_RLD_AMOUNT"), 0.0, 100, 1, 100)); ddamping = Gtk::manage (new Adjuster (M("TP_SHARPENING_RLD_DAMPING"), 0, 100, 1, 0)); @@ -65,11 +65,11 @@ Sharpening::Sharpening () : FoldableToolPanel(this, "sharpening", M("TP_SHARPENI diter->show (); rld->show (); - usm = new Gtk::VBox (); + usm = new Gtk::Box(Gtk::ORIENTATION_VERTICAL); usm->show (); - Gtk::HSeparator *hsep6a = Gtk::manage (new Gtk::HSeparator()); + Gtk::Separator* hsep6a = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); amount = Gtk::manage (new Adjuster (M("TP_SHARPENING_AMOUNT"), 1, 1000, 1, 200)); radius = Gtk::manage (new Adjuster (M("TP_SHARPENING_RADIUS"), 0.3, 3, 0.01, 0.5)); threshold = Gtk::manage (new ThresholdAdjuster (M("TP_SHARPENING_THRESHOLD"), 0., 2000., 20., 80., 2000., 1200., 0, false)); @@ -86,10 +86,10 @@ Sharpening::Sharpening () : FoldableToolPanel(this, "sharpening", M("TP_SHARPENI threshold->show (); amount->show (); - Gtk::HSeparator *hsep6 = Gtk::manage (new Gtk::HSeparator()); + Gtk::Separator* hsep6 = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); edgesonly = Gtk::manage (new Gtk::CheckButton (M("TP_SHARPENING_ONLYEDGES"))); edgesonly->set_active (false); - edgebox = new Gtk::VBox (); + edgebox = new Gtk::Box(Gtk::ORIENTATION_VERTICAL); eradius = Gtk::manage (new Adjuster (M("TP_SHARPENING_EDRADIUS"), 0.5, 2.5, 0.1, 1.9)); etolerance = Gtk::manage (new Adjuster (M("TP_SHARPENING_EDTOLERANCE"), 10, 10000, 100, 1800)); usm->pack_start(*hsep6, Gtk::PACK_SHRINK, 2); @@ -97,7 +97,7 @@ Sharpening::Sharpening () : FoldableToolPanel(this, "sharpening", M("TP_SHARPENI edgebox->pack_start(*eradius); edgebox->pack_start(*etolerance); edgebox->show (); - edgebin = Gtk::manage (new Gtk::VBox ()); + edgebin = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); usm->pack_start (*edgebin); edgebin->show (); hsep6->show(); @@ -105,16 +105,16 @@ Sharpening::Sharpening () : FoldableToolPanel(this, "sharpening", M("TP_SHARPENI eradius->show(); etolerance->show(); - Gtk::HSeparator *hsep6b = Gtk::manage (new Gtk::HSeparator()); + Gtk::Separator* hsep6b = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); halocontrol = Gtk::manage (new Gtk::CheckButton (M("TP_SHARPENING_HALOCONTROL"))); halocontrol->set_active (false); - hcbox = new Gtk::VBox (); + hcbox = new Gtk::Box(Gtk::ORIENTATION_VERTICAL); hcamount = Gtk::manage (new Adjuster (M("TP_SHARPENING_HCAMOUNT"), 1, 100, 1, 75)); usm->pack_start(*hsep6b, Gtk::PACK_SHRINK, 2); usm->pack_start(*halocontrol); hcbox->pack_start(*hcamount); hcbox->show (); - hcbin = Gtk::manage (new Gtk::VBox ()); + hcbin = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); usm->pack_start (*hcbin); hcbin->show (); hsep6b->show (); diff --git a/rtgui/sharpening.h b/rtgui/sharpening.h index bd5e6f1b7..aa65b3662 100644 --- a/rtgui/sharpening.h +++ b/rtgui/sharpening.h @@ -39,18 +39,18 @@ protected: Adjuster* damount; Adjuster* ddamping; Adjuster* diter; - Gtk::VBox* usm; - Gtk::VBox* rld; + Gtk::Box* usm; + Gtk::Box* rld; Adjuster* radius; Adjuster* amount; Adjuster* eradius; Adjuster* etolerance; Adjuster* hcamount; - Gtk::VBox* edgebin; - Gtk::VBox* hcbin; - Gtk::VBox* edgebox; - Gtk::VBox* hcbox; + Gtk::Box* edgebin; + Gtk::Box* hcbin; + Gtk::Box* edgebox; + Gtk::Box* hcbox; ThresholdAdjuster* threshold; Gtk::CheckButton* edgesonly; bool lastEdgesOnly; diff --git a/rtgui/shcselector.cc b/rtgui/shcselector.cc index db99dece0..175c732a2 100644 --- a/rtgui/shcselector.cc +++ b/rtgui/shcselector.cc @@ -322,7 +322,7 @@ bool SHCSelector::on_motion_notify_event (GdkEventMotion* event) return true; } -void SHCSelector::styleChanged (const Glib::RefPtr& style) +void SHCSelector::styleChanged (const Glib::RefPtr& style) { setDirty(true); diff --git a/rtgui/shcselector.h b/rtgui/shcselector.h index e03ca8e06..2422fdf56 100644 --- a/rtgui/shcselector.h +++ b/rtgui/shcselector.h @@ -78,7 +78,7 @@ public: void setDefaults (double spos, double cpos, double hpos); void setPositions (double spos, double cpos, double hpos); void getPositions (double& spos, double& cpos, double& hpos); - void styleChanged (const Glib::RefPtr& style); + void styleChanged (const Glib::RefPtr& style); bool reset (); void refresh(); }; diff --git a/rtgui/thresholdadjuster.cc b/rtgui/thresholdadjuster.cc index c6ba96111..1f8b1c967 100644 --- a/rtgui/thresholdadjuster.cc +++ b/rtgui/thresholdadjuster.cc @@ -34,6 +34,7 @@ ThresholdAdjuster::ThresholdAdjuster (Glib::ustring label, : tSelector(minValueBottom, maxValueBottom, defBottom, labelBottom, precisionBottom, minValueTop, maxValueTop, defTop, labelTop, precisionTop, curveProvider) { + set_orientation(Gtk::ORIENTATION_VERTICAL); initialDefaultVal[ThresholdSelector::TS_BOTTOMLEFT] = defBottom; initialDefaultVal[ThresholdSelector::TS_TOPLEFT] = defTop; initialDefaultVal[ThresholdSelector::TS_BOTTOMRIGHT] = 0.; // unused @@ -46,6 +47,7 @@ ThresholdAdjuster::ThresholdAdjuster (Glib::ustring label, double minValue, doub double defTop, unsigned int precision, bool startAtOne, bool editedCheckBox) : tSelector(minValue, maxValue, defBottom, defTop, precision, startAtOne) { + set_orientation(Gtk::ORIENTATION_VERTICAL); initialDefaultVal[ThresholdSelector::TS_BOTTOMLEFT] = defBottom; initialDefaultVal[ThresholdSelector::TS_TOPLEFT] = defTop; initialDefaultVal[ThresholdSelector::TS_BOTTOMRIGHT] = maxValue; @@ -60,6 +62,7 @@ ThresholdAdjuster::ThresholdAdjuster (Glib::ustring label, double minValue, doub : tSelector(minValue, maxValue, defBottomLeft, defTopLeft, defBottomRight, defTopRight, precision, startAtOne) { + set_orientation(Gtk::ORIENTATION_VERTICAL); initialDefaultVal[ThresholdSelector::TS_BOTTOMLEFT] = defBottomLeft; initialDefaultVal[ThresholdSelector::TS_TOPLEFT] = defTopLeft; initialDefaultVal[ThresholdSelector::TS_BOTTOMRIGHT] = defBottomRight; @@ -81,7 +84,7 @@ void ThresholdAdjuster::initObject (Glib::ustring label, bool editedcb) set_name("ThresholdAdjuster"); - hbox = Gtk::manage (new Gtk::HBox ()); + hbox = Gtk::manage (new Gtk::Box ()); this->label = Gtk::manage (new Gtk::Label (label, Gtk::ALIGN_START)); diff --git a/rtgui/thresholdadjuster.h b/rtgui/thresholdadjuster.h index b28f68dee..8f67d5ef5 100644 --- a/rtgui/thresholdadjuster.h +++ b/rtgui/thresholdadjuster.h @@ -46,11 +46,11 @@ public: }; -class ThresholdAdjuster : public Gtk::VBox +class ThresholdAdjuster : public Gtk::Box { protected: - Gtk::HBox* hbox; + Gtk::Box* hbox; Gtk::Label* label; ThresholdSelector tSelector; //MySpinButton* spin; diff --git a/rtgui/thresholdselector.cc b/rtgui/thresholdselector.cc index 35d08279c..61043525c 100644 --- a/rtgui/thresholdselector.cc +++ b/rtgui/thresholdselector.cc @@ -714,7 +714,7 @@ void ThresholdSelector::findSecondaryMovedCursor(guint state) } } -void ThresholdSelector::styleChanged (const Glib::RefPtr& style) +void ThresholdSelector::styleChanged (const Glib::RefPtr& style) { queue_draw (); diff --git a/rtgui/thresholdselector.h b/rtgui/thresholdselector.h index 4ae86560e..bf1d7c952 100644 --- a/rtgui/thresholdselector.h +++ b/rtgui/thresholdselector.h @@ -215,7 +215,7 @@ public: { return doubleThresh; } - void styleChanged (const Glib::RefPtr& style); + void styleChanged (const Glib::RefPtr& style); unsigned int getPrecision () { return precisionTop; diff --git a/rtgui/thumbbrowserbase.cc b/rtgui/thumbbrowserbase.cc index c611b252d..06c662e51 100644 --- a/rtgui/thumbbrowserbase.cc +++ b/rtgui/thumbbrowserbase.cc @@ -34,6 +34,9 @@ ThumbBrowserBase::ThumbBrowserBase () { inW = -1; inH = -1; + + hscroll.set_orientation(Gtk::ORIENTATION_HORIZONTAL); + vscroll.set_orientation(Gtk::ORIENTATION_VERTICAL); setExpandAlignProperties(&internal, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); setExpandAlignProperties(&hscroll, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); diff --git a/rtgui/thumbbrowserbase.h b/rtgui/thumbbrowserbase.h index 69017b183..2d41cdfab 100644 --- a/rtgui/thumbbrowserbase.h +++ b/rtgui/thumbbrowserbase.h @@ -116,8 +116,8 @@ protected: virtual int getThumbnailHeight () = 0; Internal internal; - Gtk::HScrollbar hscroll; - Gtk::VScrollbar vscroll; + Gtk::Scrollbar hscroll; + Gtk::Scrollbar vscroll; int inW, inH; diff --git a/rtgui/thumbbrowserentrybase.cc b/rtgui/thumbbrowserentrybase.cc index 3840c8bf9..0c71cea2c 100644 --- a/rtgui/thumbbrowserentrybase.cc +++ b/rtgui/thumbbrowserentrybase.cc @@ -135,7 +135,6 @@ ThumbBrowserEntryBase::ThumbBrowserEntryBase (const Glib::ustring& fname) : textGap(6), sideMargin(8), lowerMargin(8), - preview(nullptr), dispname(Glib::path_get_basename(fname)), buttonSet(nullptr), width(0), @@ -171,7 +170,6 @@ ThumbBrowserEntryBase::ThumbBrowserEntryBase (const Glib::ustring& fname) : ThumbBrowserEntryBase::~ThumbBrowserEntryBase () { - delete[] preview; delete buttonSet; } @@ -207,7 +205,7 @@ void ThumbBrowserEntryBase::updateBackBuffer () bbSelected = selected; bbFramed = framed; - bbPreview = preview; + bbPreview = preview.data(); Cairo::RefPtr cc = Cairo::Context::create(surface); @@ -237,16 +235,20 @@ void ThumbBrowserEntryBase::updateBackBuffer () if (buttonSet) { int tmp; - buttonSet->getAllocatedDimensions (tmp, bsHeight); + buttonSet->getAllocatedDimensions(tmp, bsHeight); } + int infow, infoh; + getTextSizes(infow, infoh); + // draw preview frame //backBuffer->draw_rectangle (cc, false, (exp_width-prew)/2, upperMargin+bsHeight, prew+1, preh+1); // draw thumbnail image - if (preview) { + if (!preview.empty()) { prex = borderWidth + (exp_width - prew) / 2; - prey = upperMargin + bsHeight + borderWidth; - backBuffer->copyRGBCharData(preview, 0, 0, prew, preh, prew * 3, prex, prey); + const int hh = exp_height - (upperMargin + bsHeight + borderWidth + infoh + lowerMargin); + prey = upperMargin + bsHeight + borderWidth + std::max((hh - preh) / 2, 0); + backBuffer->copyRGBCharData(preview.data(), 0, 0, prew, preh, prew * 3, prex, prey); } customBackBufferUpdate (cc); @@ -255,9 +257,6 @@ void ThumbBrowserEntryBase::updateBackBuffer () bbIcons = getIconsOnImageArea (); bbSpecificityIcons = getSpecificityIconsOnImageArea (); - int infow, infoh; - getTextSizes (infow, infoh); - int iofs_x = 4, iofs_y = 4; int istartx = prex; int istarty = prey; @@ -356,7 +355,7 @@ void ThumbBrowserEntryBase::updateBackBuffer () textposx_dt = 0; } - textposy = upperMargin + bsHeight + 2 * borderWidth + preh + borderWidth + textGap; + textposy = exp_height - lowerMargin - infoh; textw = exp_width - 2 * textGap; if (selected) { @@ -556,10 +555,7 @@ void ThumbBrowserEntryBase::resize (int h) } if (preh != old_preh || prew != old_prew) { // if new thumbnail height or new orientation - if (preview) { - delete [] preview; - preview = nullptr; - } + preview.clear(); refreshThumbnailImage (); } else if (backBuffer) { backBuffer->setDirty(true); // This will force a backBuffer update on queue_draw @@ -620,7 +616,7 @@ void ThumbBrowserEntryBase::draw (Cairo::RefPtr cc) bbHeight = backBuffer->getHeight(); } - if (!backBuffer || selected != bbSelected || framed != bbFramed || preview != bbPreview + if (!backBuffer || selected != bbSelected || framed != bbFramed || preview.data() != bbPreview || exp_width != bbWidth || exp_height != bbHeight || getIconsOnImageArea () != bbIcons || getSpecificityIconsOnImageArea() != bbSpecificityIcons || backBuffer->isDirty()) { @@ -680,7 +676,7 @@ rtengine::Coord2D ThumbBrowserEntryBase::getPosInImgSpace (int x, int y) const { rtengine::Coord2D coord(-1., -1.); - if (preview) { + if (!preview.empty()) { x -= ofsX + startx; y -= ofsY + starty; diff --git a/rtgui/thumbbrowserentrybase.h b/rtgui/thumbbrowserentrybase.h index dbc6cf73e..764f806fd 100644 --- a/rtgui/thumbbrowserentrybase.h +++ b/rtgui/thumbbrowserentrybase.h @@ -59,7 +59,7 @@ protected: MyRWMutex lockRW; // Locks access to all image thumb changing actions - guint8* preview; // holds the preview image. used in updateBackBuffer. TODO Olli: Make a cache to reduce mem significantly + std::vector preview; // holds the preview image. used in updateBackBuffer. Glib::ustring dispname; diff --git a/rtgui/thumbnail.cc b/rtgui/thumbnail.cc index 10eb28fae..598fc5efe 100644 --- a/rtgui/thumbnail.cc +++ b/rtgui/thumbnail.cc @@ -184,7 +184,7 @@ void Thumbnail::_generateThumbnailImage () tpp = nullptr; delete [] lastImg; lastImg = nullptr; - tw = -1; + tw = options.maxThumbnailWidth; th = options.maxThumbnailHeight; imgRatio = -1.; @@ -201,20 +201,20 @@ void Thumbnail::_generateThumbnailImage () if (ext == "jpg" || ext == "jpeg") { infoFromImage (fname); - tpp = rtengine::Thumbnail::loadFromImage (fname, tw, th, 1, pparams->wb.equal); + tpp = rtengine::Thumbnail::loadFromImage (fname, tw, th, -1, pparams->wb.equal); if (tpp) { cfs.format = FT_Jpeg; } } else if (ext == "png") { - tpp = rtengine::Thumbnail::loadFromImage (fname, tw, th, 1, pparams->wb.equal); + tpp = rtengine::Thumbnail::loadFromImage (fname, tw, th, -1, pparams->wb.equal); if (tpp) { cfs.format = FT_Png; } } else if (ext == "tif" || ext == "tiff") { infoFromImage (fname); - tpp = rtengine::Thumbnail::loadFromImage (fname, tw, th, 1, pparams->wb.equal); + tpp = rtengine::Thumbnail::loadFromImage (fname, tw, th, -1, pparams->wb.equal); if (tpp) { cfs.format = FT_Tiff; @@ -633,10 +633,13 @@ void Thumbnail::decreaseRef () cachemgr->closeThumbnail (this); } -int Thumbnail::getThumbnailWidth (const int h, const rtengine::procparams::ProcParams *pparams) const +void Thumbnail::getThumbnailSize(int &w, int &h, const rtengine::procparams::ProcParams *pparams) { + MyMutex::MyLock lock(mutex); + int tw_ = tw; int th_ = th; + float imgRatio_ = imgRatio; if (pparams) { @@ -661,10 +664,16 @@ int Thumbnail::getThumbnailWidth (const int h, const rtengine::procparams::ProcP } } - if (imgRatio_ > 0.f) { - return imgRatio_ * h; + if (imgRatio_ > 0.) { + w = imgRatio_ * static_cast(h); } else { - return tw_ * h / th_; + w = tw_ * h / th_; + } + + if (w > options.maxThumbnailWidth) { + const float s = static_cast(options.maxThumbnailWidth) / w; + w = options.maxThumbnailWidth; + h = std::max(h * s, 1); } } diff --git a/rtgui/thumbnail.h b/rtgui/thumbnail.h index aa9416f26..17e26e3c9 100644 --- a/rtgui/thumbnail.h +++ b/rtgui/thumbnail.h @@ -120,7 +120,7 @@ public: // unsigned char* getThumbnailImage (int &w, int &h, int fixwh=1); // fixwh = 0: fix w and calculate h, =1: fix h and calculate w rtengine::IImage8* processThumbImage (const rtengine::procparams::ProcParams& pparams, int h, double& scale); rtengine::IImage8* upgradeThumbImage (const rtengine::procparams::ProcParams& pparams, int h, double& scale); - int getThumbnailWidth (int h, const rtengine::procparams::ProcParams *pparams = nullptr) const; + void getThumbnailSize (int &w, int &h, const rtengine::procparams::ProcParams *pparams = nullptr); void getFinalSize (const rtengine::procparams::ProcParams& pparams, int& w, int& h); void getOriginalSize (int& w, int& h); diff --git a/rtgui/tonecurve.cc b/rtgui/tonecurve.cc index dc9b17fa9..8a33575ca 100644 --- a/rtgui/tonecurve.cc +++ b/rtgui/tonecurve.cc @@ -21,12 +21,9 @@ #include #include "tonecurve.h" - -#include "adjuster.h" #include "curveeditor.h" #include "curveeditorgroup.h" #include "eventmapper.h" -#include "ppversion.h" #include "options.h" #include "../rtengine/procparams.h" @@ -36,135 +33,147 @@ using namespace rtengine; using namespace rtengine::procparams; -ToneCurve::ToneCurve () : FoldableToolPanel(this, "tonecurve", M("TP_EXPOSURE_LABEL")) +ToneCurve::ToneCurve() : FoldableToolPanel(this, "tonecurve", M("TP_EXPOSURE_LABEL")) { auto m = ProcEventMapper::getInstance(); EvHistMatching = m->newEvent(AUTOEXP, "HISTORY_MSG_HISTMATCHING"); EvHistMatchingBatch = m->newEvent(M_VOID, "HISTORY_MSG_HISTMATCHING"); EvClampOOG = m->newEvent(DARKFRAME, "HISTORY_MSG_CLAMPOOG"); + EvHLbl = m->newEvent(DEMOSAIC, "HISTORY_MSG_HLBL"); CurveListener::setMulti(true); std::vector bottomMilestones; - bottomMilestones.push_back( GradientMilestone(0., 0., 0., 0.) ); - bottomMilestones.push_back( GradientMilestone(1., 1., 1., 1.) ); + bottomMilestones.push_back(GradientMilestone(0., 0., 0., 0.)); + bottomMilestones.push_back(GradientMilestone(1., 1., 1., 1.)); //----------- OOG clamping ---------------------------------- clampOOG = Gtk::manage(new Gtk::CheckButton(M("TP_EXPOSURE_CLAMPOOG"))); pack_start(*clampOOG); - pack_start (*Gtk::manage (new Gtk::HSeparator())); + pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL))); clampOOG->signal_toggled().connect(sigc::mem_fun(*this, &ToneCurve::clampOOGChanged)); //----------- Auto Levels ---------------------------------- - abox = Gtk::manage (new Gtk::HBox ()); + abox = Gtk::manage (new Gtk::Box ()); abox->set_spacing (4); - autolevels = Gtk::manage (new Gtk::ToggleButton (M("TP_EXPOSURE_AUTOLEVELS"))); - autolevels->set_tooltip_markup (M("TP_EXPOSURE_AUTOLEVELS_TIP")); - autoconn = autolevels->signal_toggled().connect( sigc::mem_fun(*this, &ToneCurve::autolevels_toggled) ); + autolevels = Gtk::manage(new Gtk::ToggleButton(M("TP_EXPOSURE_AUTOLEVELS"))); + autolevels->set_tooltip_markup(M("TP_EXPOSURE_AUTOLEVELS_TIP")); + autoconn = autolevels->signal_toggled().connect(sigc::mem_fun(*this, &ToneCurve::autolevels_toggled)); - lclip = Gtk::manage (new Gtk::Label (M("TP_EXPOSURE_CLIP"))); - lclip->set_tooltip_text (M("TP_EXPOSURE_CLIP_TIP")); + lclip = Gtk::manage(new Gtk::Label(M("TP_EXPOSURE_CLIP"))); + lclip->set_tooltip_text(M("TP_EXPOSURE_CLIP_TIP")); - sclip = Gtk::manage (new MySpinButton ()); - sclip->set_range (0.0, 0.99); - sclip->set_increments (0.01, 0.10); - sclip->set_value (0.02); - sclip->set_digits (2); + sclip = Gtk::manage(new MySpinButton()); + sclip->set_range(0.0, 0.99); + sclip->set_increments(0.01, 0.10); + sclip->set_value(0.02); + sclip->set_digits(2); sclip->set_width_chars(4); sclip->set_max_width_chars(4); - sclip->signal_value_changed().connect( sigc::mem_fun(*this, &ToneCurve::clip_changed) ); + sclip->signal_value_changed().connect(sigc::mem_fun(*this, &ToneCurve::clip_changed)); - neutral = Gtk::manage (new Gtk::Button (M("TP_NEUTRAL"))); - neutral->set_tooltip_text (M("TP_NEUTRAL_TIP")); - neutralconn = neutral->signal_pressed().connect( sigc::mem_fun(*this, &ToneCurve::neutral_pressed) ); + neutral = Gtk::manage(new Gtk::Button(M("TP_NEUTRAL"))); + neutral->set_tooltip_text(M("TP_NEUTRAL_TIP")); + neutralconn = neutral->signal_pressed().connect(sigc::mem_fun(*this, &ToneCurve::neutral_pressed)); neutral->show(); - abox->pack_start (*autolevels, true, true, 0); + abox->pack_start(*autolevels, true, true, 0); // pack_end is used for these controls as autolevels is replaceable using pack_start in batchmode - abox->pack_end (*neutral, true, true, 0); - abox->pack_end (*sclip, false, false, 0); - abox->pack_end (*lclip, false, false, 0); - pack_start (*abox); + abox->pack_end(*neutral, true, true, 0); + abox->pack_end(*sclip, false, false, 0); + abox->pack_end(*lclip, false, false, 0); + pack_start(*abox); //-------------- Highlight Reconstruction ----------------- - pack_start (*Gtk::manage (new Gtk::HSeparator())); + pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL))); hrenabled = Gtk::manage (new Gtk::CheckButton (M("TP_HLREC_LABEL"))); hrenabled->set_active (false); hrenabled->set_tooltip_markup (M("TP_HLREC_ENA_TOOLTIP")); - pack_start (*hrenabled); method = Gtk::manage (new MyComboBoxText ()); method->append (M("TP_HLREC_LUMINANCE")); method->append (M("TP_HLREC_CIELAB")); method->append (M("TP_HLREC_COLOR")); method->append (M("TP_HLREC_BLEND")); + Gtk::Box *hrVBox; + hrVBox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + hrVBox->set_spacing(2); - method->set_active (0); - hlrbox = Gtk::manage (new Gtk::HBox ()); + method->set_active(0); + Gtk::Frame* const hrFrame = Gtk::manage(new Gtk::Frame()); + hrFrame->set_label_align(0.025, 0.5); + hrFrame->set_label_widget(*hrenabled); + + hlrbox = Gtk::manage (new Gtk::Box ()); Gtk::Label* lab = Gtk::manage (new Gtk::Label (M("TP_HLREC_METHOD"))); - hlrbox->pack_start (*lab, Gtk::PACK_SHRINK, 4); + hlrbox->pack_start (*lab, Gtk::PACK_SHRINK); hlrbox->pack_start (*method); - pack_start (*hlrbox); + hlbl = Gtk::manage(new Adjuster(M("TP_HLREC_HLBLUR"), 0, 4, 1, 0)); + + hrVBox->pack_start(*hlrbox, Gtk::PACK_SHRINK); + hrVBox->pack_start(*hlbl); + hrFrame->add(*hrVBox); + pack_start(*hrFrame); enaconn = hrenabled->signal_toggled().connect( sigc::mem_fun(*this, &ToneCurve::hrenabledChanged) ); methconn = method->signal_changed().connect ( sigc::mem_fun(*this, &ToneCurve::methodChanged) ); //----------- Exposure Compensation --------------------- - pack_start (*Gtk::manage (new Gtk::HSeparator())); + pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL))); - expcomp = Gtk::manage (new Adjuster (M("TP_EXPOSURE_EXPCOMP"), -5, 12, 0.05, 0)); + expcomp = Gtk::manage(new Adjuster(M("TP_EXPOSURE_EXPCOMP"), -5, 12, 0.05, 0)); expcomp->setLogScale(2, 0, true); - pack_start (*expcomp); + pack_start(*expcomp); //----------- Highlight recovery & threshold ------------- - hlcompr = Gtk::manage (new Adjuster (M("TP_EXPOSURE_COMPRHIGHLIGHTS"), 0, 500, 1, 0)); - pack_start (*hlcompr); - hlcomprthresh = Gtk::manage (new Adjuster (M("TP_EXPOSURE_COMPRHIGHLIGHTSTHRESHOLD"), 0, 100, 1, 0)); - pack_start (*hlcomprthresh); + hlcompr = Gtk::manage(new Adjuster(M("TP_EXPOSURE_COMPRHIGHLIGHTS"), 0, 500, 1, 0)); + pack_start(*hlcompr); + hlcomprthresh = Gtk::manage(new Adjuster(M("TP_EXPOSURE_COMPRHIGHLIGHTSTHRESHOLD"), 0, 100, 1, 0)); + pack_start(*hlcomprthresh); //----------- Black Level & Compression ------------------- - black = Gtk::manage (new Adjuster (M("TP_EXPOSURE_BLACKLEVEL"), -16384, 32768, 50, 0)); + black = Gtk::manage(new Adjuster(M("TP_EXPOSURE_BLACKLEVEL"), -16384, 32768, 50, 0)); black->setLogScale(10, 0, true); - pack_start (*black); - shcompr = Gtk::manage (new Adjuster (M("TP_EXPOSURE_COMPRSHADOWS"), 0, 100, 1, 50)); - pack_start (*shcompr); + pack_start(*black); + shcompr = Gtk::manage(new Adjuster(M("TP_EXPOSURE_COMPRSHADOWS"), 0, 100, 1, 50)); + pack_start(*shcompr); - pack_start (*Gtk::manage (new Gtk::HSeparator())); + pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL))); //---------Brightness / Contrast ------------------------- - brightness = Gtk::manage (new Adjuster (M("TP_EXPOSURE_BRIGHTNESS"), -100, 100, 1, 0)); - pack_start (*brightness); - contrast = Gtk::manage (new Adjuster (M("TP_EXPOSURE_CONTRAST"), -100, 100, 1, 0)); - pack_start (*contrast); - saturation = Gtk::manage (new Adjuster (M("TP_EXPOSURE_SATURATION"), -100, 100, 1, 0)); - pack_start (*saturation); + brightness = Gtk::manage(new Adjuster(M("TP_EXPOSURE_BRIGHTNESS"), -100, 100, 1, 0)); + pack_start(*brightness); + contrast = Gtk::manage(new Adjuster(M("TP_EXPOSURE_CONTRAST"), -100, 100, 1, 0)); + pack_start(*contrast); + saturation = Gtk::manage(new Adjuster(M("TP_EXPOSURE_SATURATION"), -100, 100, 1, 0)); + pack_start(*saturation); brightness->setLogScale(2, 0, true); contrast->setLogScale(2, 0, true); saturation->setLogScale(2, 0, true); //----------- Curve 1 ------------------------------ - pack_start (*Gtk::manage (new Gtk::HSeparator())); + pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL))); histmatching = Gtk::manage(new Gtk::ToggleButton(M("TP_EXPOSURE_HISTMATCHING"))); histmatching->set_tooltip_markup(M("TP_EXPOSURE_HISTMATCHING_TOOLTIP")); histmatchconn = histmatching->signal_toggled().connect(sigc::mem_fun(*this, &ToneCurve::histmatchingToggled)); pack_start(*histmatching, true, true, 2); - toneCurveMode = Gtk::manage (new MyComboBoxText ()); - toneCurveMode->append (M("TP_EXPOSURE_TCMODE_STANDARD")); - toneCurveMode->append (M("TP_EXPOSURE_TCMODE_WEIGHTEDSTD")); - toneCurveMode->append (M("TP_EXPOSURE_TCMODE_FILMLIKE")); - toneCurveMode->append (M("TP_EXPOSURE_TCMODE_SATANDVALBLENDING")); - toneCurveMode->append (M("TP_EXPOSURE_TCMODE_LUMINANCE")); - toneCurveMode->append (M("TP_EXPOSURE_TCMODE_PERCEPTUAL")); - toneCurveMode->set_active (0); + toneCurveMode = Gtk::manage(new MyComboBoxText()); + toneCurveMode->append(M("TP_EXPOSURE_TCMODE_STANDARD")); + toneCurveMode->append(M("TP_EXPOSURE_TCMODE_WEIGHTEDSTD")); + toneCurveMode->append(M("TP_EXPOSURE_TCMODE_FILMLIKE")); + toneCurveMode->append(M("TP_EXPOSURE_TCMODE_SATANDVALBLENDING")); + toneCurveMode->append(M("TP_EXPOSURE_TCMODE_LUMINANCE")); + toneCurveMode->append(M("TP_EXPOSURE_TCMODE_PERCEPTUAL")); + toneCurveMode->set_active(0); toneCurveMode->set_tooltip_text(M("TP_EXPOSURE_TCMODE_LABEL1")); - curveEditorG = new CurveEditorGroup (options.lastToneCurvesDir, M("TP_EXPOSURE_CURVEEDITOR1")); - curveEditorG->setCurveListener (this); + curveEditorG = new CurveEditorGroup(options.lastToneCurvesDir, M("TP_EXPOSURE_CURVEEDITOR1")); + curveEditorG->setCurveListener(this); shape = static_cast(curveEditorG->addCurve(CT_Diagonal, "", toneCurveMode)); shape->setEditID(EUID_ToneCurve1, BT_IMAGEFLOAT); @@ -174,24 +183,24 @@ ToneCurve::ToneCurve () : FoldableToolPanel(this, "tonecurve", M("TP_EXPOSURE_LA // This will add the reset button at the end of the curveType buttons curveEditorG->curveListComplete(); - pack_start( *curveEditorG, Gtk::PACK_SHRINK, 2); + pack_start(*curveEditorG, Gtk::PACK_SHRINK, 2); - tcmodeconn = toneCurveMode->signal_changed().connect( sigc::mem_fun(*this, &ToneCurve::curveMode1Changed), true ); + tcmodeconn = toneCurveMode->signal_changed().connect(sigc::mem_fun(*this, &ToneCurve::curveMode1Changed), true); //----------- Curve 2 ------------------------------ - toneCurveMode2 = Gtk::manage (new MyComboBoxText ()); - toneCurveMode2->append (M("TP_EXPOSURE_TCMODE_STANDARD")); - toneCurveMode2->append (M("TP_EXPOSURE_TCMODE_WEIGHTEDSTD")); - toneCurveMode2->append (M("TP_EXPOSURE_TCMODE_FILMLIKE")); - toneCurveMode2->append (M("TP_EXPOSURE_TCMODE_SATANDVALBLENDING")); - toneCurveMode2->append (M("TP_EXPOSURE_TCMODE_LUMINANCE")); - toneCurveMode2->append (M("TP_EXPOSURE_TCMODE_PERCEPTUAL")); - toneCurveMode2->set_active (0); + toneCurveMode2 = Gtk::manage(new MyComboBoxText()); + toneCurveMode2->append(M("TP_EXPOSURE_TCMODE_STANDARD")); + toneCurveMode2->append(M("TP_EXPOSURE_TCMODE_WEIGHTEDSTD")); + toneCurveMode2->append(M("TP_EXPOSURE_TCMODE_FILMLIKE")); + toneCurveMode2->append(M("TP_EXPOSURE_TCMODE_SATANDVALBLENDING")); + toneCurveMode2->append(M("TP_EXPOSURE_TCMODE_LUMINANCE")); + toneCurveMode2->append(M("TP_EXPOSURE_TCMODE_PERCEPTUAL")); + toneCurveMode2->set_active(0); toneCurveMode2->set_tooltip_text(M("TP_EXPOSURE_TCMODE_LABEL2")); - curveEditorG2 = new CurveEditorGroup (options.lastToneCurvesDir, M("TP_EXPOSURE_CURVEEDITOR2")); - curveEditorG2->setCurveListener (this); + curveEditorG2 = new CurveEditorGroup(options.lastToneCurvesDir, M("TP_EXPOSURE_CURVEEDITOR2")); + curveEditorG2->setCurveListener(this); shape2 = static_cast(curveEditorG2->addCurve(CT_Diagonal, "", toneCurveMode2)); shape2->setEditID(EUID_ToneCurve2, BT_IMAGEFLOAT); @@ -202,22 +211,23 @@ ToneCurve::ToneCurve () : FoldableToolPanel(this, "tonecurve", M("TP_EXPOSURE_LA curveEditorG2->curveListComplete(); curveEditorG2->setTooltip(M("TP_EXPOSURE_CURVEEDITOR2_TOOLTIP")); - pack_start( *curveEditorG2, Gtk::PACK_SHRINK, 2); + pack_start(*curveEditorG2, Gtk::PACK_SHRINK, 2); - tcmode2conn = toneCurveMode2->signal_changed().connect( sigc::mem_fun(*this, &ToneCurve::curveMode2Changed), true ); + tcmode2conn = toneCurveMode2->signal_changed().connect(sigc::mem_fun(*this, &ToneCurve::curveMode2Changed), true); // --------- Set Up Listeners ------------- - expcomp->setAdjusterListener (this); - brightness->setAdjusterListener (this); - black->setAdjusterListener (this); - hlcompr->setAdjusterListener (this); - hlcomprthresh->setAdjusterListener (this); - shcompr->setAdjusterListener (this); - contrast->setAdjusterListener (this); - saturation->setAdjusterListener (this); + expcomp->setAdjusterListener(this); + brightness->setAdjusterListener(this); + black->setAdjusterListener(this); + hlcompr->setAdjusterListener(this); + hlbl->setAdjusterListener(this); + hlcomprthresh->setAdjusterListener(this); + shcompr->setAdjusterListener(this); + contrast->setAdjusterListener(this); + saturation->setAdjusterListener(this); } -ToneCurve::~ToneCurve () +ToneCurve::~ToneCurve() { idle_register.destroy(); @@ -225,38 +235,39 @@ ToneCurve::~ToneCurve () delete curveEditorG2; } -void ToneCurve::read (const ProcParams* pp, const ParamsEdited* pedited) +void ToneCurve::read(const ProcParams* pp, const ParamsEdited* pedited) { - disableListener (); + disableListener(); tcmodeconn.block(true); tcmode2conn.block(true); - autoconn.block (true); + autoconn.block(true); - autolevels->set_active (pp->toneCurve.autoexp); + autolevels->set_active(pp->toneCurve.autoexp); lastAuto = pp->toneCurve.autoexp; - sclip->set_value (pp->toneCurve.clip); + sclip->set_value(pp->toneCurve.clip); - expcomp->setValue (pp->toneCurve.expcomp); - black->setValue (pp->toneCurve.black); - hlcompr->setValue (pp->toneCurve.hlcompr); - hlcomprthresh->setValue (pp->toneCurve.hlcomprthresh); - shcompr->setValue (pp->toneCurve.shcompr); + expcomp->setValue(pp->toneCurve.expcomp); + black->setValue(pp->toneCurve.black); + hlcompr->setValue(pp->toneCurve.hlcompr); + hlbl->setValue(pp->toneCurve.hlbl); + hlcomprthresh->setValue(pp->toneCurve.hlcomprthresh); + shcompr->setValue(pp->toneCurve.shcompr); if (!black->getAddMode() && !batchMode) { - shcompr->set_sensitive(!((int)black->getValue () == 0)); //at black=0 shcompr value has no effect + shcompr->set_sensitive(!((int)black->getValue() == 0)); //at black=0 shcompr value has no effect } if (!hlcompr->getAddMode() && !batchMode) { - hlcomprthresh->set_sensitive(!((int)hlcompr->getValue () == 0)); //at hlcompr=0 hlcomprthresh value has no effect + hlcomprthresh->set_sensitive(!((int)hlcompr->getValue() == 0)); //at hlcompr=0 hlcomprthresh value has no effect } - brightness->setValue (pp->toneCurve.brightness); - contrast->setValue (pp->toneCurve.contrast); - saturation->setValue (pp->toneCurve.saturation); - shape->setCurve (pp->toneCurve.curve); - shape2->setCurve (pp->toneCurve.curve2); + brightness->setValue(pp->toneCurve.brightness); + contrast->setValue(pp->toneCurve.contrast); + saturation->setValue(pp->toneCurve.saturation); + shape->setCurve(pp->toneCurve.curve); + shape2->setCurve(pp->toneCurve.curve2); toneCurveMode->set_active(rtengine::toUnderlying(pp->toneCurve.curveMode)); toneCurveMode2->set_active(rtengine::toUnderlying(pp->toneCurve.curveMode2)); @@ -266,19 +277,20 @@ void ToneCurve::read (const ProcParams* pp, const ParamsEdited* pedited) clampOOG->set_active(pp->toneCurve.clampOOG); if (pedited) { - expcomp->setEditedState (pedited->toneCurve.expcomp ? Edited : UnEdited); - black->setEditedState (pedited->toneCurve.black ? Edited : UnEdited); - hlcompr->setEditedState (pedited->toneCurve.hlcompr ? Edited : UnEdited); - hlcomprthresh->setEditedState (pedited->toneCurve.hlcomprthresh ? Edited : UnEdited); - shcompr->setEditedState (pedited->toneCurve.shcompr ? Edited : UnEdited); - brightness->setEditedState (pedited->toneCurve.brightness ? Edited : UnEdited); - contrast->setEditedState (pedited->toneCurve.contrast ? Edited : UnEdited); - saturation->setEditedState (pedited->toneCurve.saturation ? Edited : UnEdited); - autolevels->set_inconsistent (!pedited->toneCurve.autoexp); + expcomp->setEditedState(pedited->toneCurve.expcomp ? Edited : UnEdited); + black->setEditedState(pedited->toneCurve.black ? Edited : UnEdited); + hlcompr->setEditedState(pedited->toneCurve.hlcompr ? Edited : UnEdited); + hlbl->setEditedState(pedited->toneCurve.hlbl ? Edited : UnEdited); + hlcomprthresh->setEditedState(pedited->toneCurve.hlcomprthresh ? Edited : UnEdited); + shcompr->setEditedState(pedited->toneCurve.shcompr ? Edited : UnEdited); + brightness->setEditedState(pedited->toneCurve.brightness ? Edited : UnEdited); + contrast->setEditedState(pedited->toneCurve.contrast ? Edited : UnEdited); + saturation->setEditedState(pedited->toneCurve.saturation ? Edited : UnEdited); + autolevels->set_inconsistent(!pedited->toneCurve.autoexp); clipDirty = pedited->toneCurve.clip; - shape->setUnChanged (!pedited->toneCurve.curve); - shape2->setUnChanged (!pedited->toneCurve.curve2); - hrenabled->set_inconsistent (!pedited->toneCurve.hrenabled); + shape->setUnChanged(!pedited->toneCurve.curve); + shape2->setUnChanged(!pedited->toneCurve.curve2); + hrenabled->set_inconsistent(!pedited->toneCurve.hrenabled); if (!pedited->toneCurve.curveMode) { toneCurveMode->set_active(6); @@ -292,70 +304,65 @@ void ToneCurve::read (const ProcParams* pp, const ParamsEdited* pedited) clampOOG->set_inconsistent(!pedited->toneCurve.clampOOG); } - enaconn.block (true); - hrenabled->set_active (pp->toneCurve.hrenabled); - enaconn.block (false); + enaconn.block(true); + hrenabled->set_active(pp->toneCurve.hrenabled); + enaconn.block(false); if (pedited && !pedited->toneCurve.method) { - method->set_active (4); + method->set_active(4); } else if (pp->toneCurve.method == "Luminance") { - method->set_active (0); + method->set_active(0); } else if (pp->toneCurve.method == "CIELab blending") { - method->set_active (1); + method->set_active(1); } else if (pp->toneCurve.method == "Color") { - method->set_active (2); + method->set_active(2); } else if (pp->toneCurve.method == "Blend") { - method->set_active (3); + method->set_active(3); } - if (!batchMode) { - if (hrenabled->get_active()) { - hlrbox->show(); - } else { - hlrbox->hide(); - } - } + hrenabledChanged(); lasthrEnabled = pp->toneCurve.hrenabled; - autoconn.block (false); + autoconn.block(false); tcmode2conn.block(false); tcmodeconn.block(false); - enableListener (); + enableListener(); } -void ToneCurve::autoOpenCurve () +void ToneCurve::autoOpenCurve() { shape->openIfNonlinear(); shape2->openIfNonlinear(); } -void ToneCurve::setEditProvider (EditDataProvider *provider) +void ToneCurve::setEditProvider(EditDataProvider *provider) { shape->setEditProvider(provider); shape2->setEditProvider(provider); } -void ToneCurve::write (ProcParams* pp, ParamsEdited* pedited) +void ToneCurve::write(ProcParams* pp, ParamsEdited* pedited) { pp->toneCurve.autoexp = autolevels->get_active(); - pp->toneCurve.clip = sclip->get_value (); - pp->toneCurve.expcomp = expcomp->getValue (); - pp->toneCurve.black = (int)black->getValue (); - pp->toneCurve.hlcompr = (int)hlcompr->getValue (); - pp->toneCurve.hlcomprthresh = (int)hlcomprthresh->getValue (); - pp->toneCurve.shcompr = (int)shcompr->getValue (); - pp->toneCurve.brightness = (int)brightness->getValue (); - pp->toneCurve.contrast = (int)contrast->getValue (); - pp->toneCurve.saturation = (int)saturation->getValue (); - pp->toneCurve.curve = shape->getCurve (); - pp->toneCurve.curve2 = shape2->getCurve (); + pp->toneCurve.clip = sclip->get_value(); + pp->toneCurve.expcomp = expcomp->getValue(); + pp->toneCurve.black = black->getValue(); + pp->toneCurve.hlcompr = hlcompr->getValue(); + pp->toneCurve.hlbl = hlbl->getValue(); + pp->toneCurve.hlcomprthresh = hlcomprthresh->getValue(); + pp->toneCurve.shcompr = shcompr->getValue(); + pp->toneCurve.brightness = brightness->getValue(); + pp->toneCurve.contrast = contrast->getValue(); + pp->toneCurve.saturation = saturation->getValue(); + pp->toneCurve.curve = shape->getCurve(); + pp->toneCurve.curve2 = shape2->getCurve(); int tcMode = toneCurveMode->get_active_row_number(); - if (tcMode == 0) { + if (tcMode == 0) { pp->toneCurve.curveMode = ToneCurveMode::STD; } else if (tcMode == 1) { pp->toneCurve.curveMode = ToneCurveMode::WEIGHTEDSTD; @@ -371,7 +378,7 @@ void ToneCurve::write (ProcParams* pp, ParamsEdited* pedited) tcMode = toneCurveMode2->get_active_row_number(); - if (tcMode == 0) { + if (tcMode == 0) { pp->toneCurve.curveMode2 = ToneCurveMode::STD; } else if (tcMode == 1) { pp->toneCurve.curveMode2 = ToneCurveMode::WEIGHTEDSTD; @@ -390,22 +397,23 @@ void ToneCurve::write (ProcParams* pp, ParamsEdited* pedited) pp->toneCurve.clampOOG = clampOOG->get_active(); if (pedited) { - pedited->toneCurve.expcomp = expcomp->getEditedState (); - pedited->toneCurve.black = black->getEditedState (); - pedited->toneCurve.hlcompr = hlcompr->getEditedState (); - pedited->toneCurve.hlcomprthresh = hlcomprthresh->getEditedState (); - pedited->toneCurve.shcompr = shcompr->getEditedState (); - pedited->toneCurve.brightness = brightness->getEditedState (); - pedited->toneCurve.contrast = contrast->getEditedState (); - pedited->toneCurve.saturation = saturation->getEditedState (); - pedited->toneCurve.autoexp = !autolevels->get_inconsistent(); - pedited->toneCurve.clip = clipDirty; - pedited->toneCurve.curve = !shape->isUnChanged (); - pedited->toneCurve.curve2 = !shape2->isUnChanged (); - pedited->toneCurve.curveMode = toneCurveMode->get_active_row_number() != 6; + pedited->toneCurve.expcomp = expcomp->getEditedState(); + pedited->toneCurve.black = black->getEditedState(); + pedited->toneCurve.hlcompr = hlcompr->getEditedState(); + pedited->toneCurve.hlbl = hlbl->getEditedState(); + pedited->toneCurve.hlcomprthresh = hlcomprthresh->getEditedState(); + pedited->toneCurve.shcompr = shcompr->getEditedState(); + pedited->toneCurve.brightness = brightness->getEditedState(); + pedited->toneCurve.contrast = contrast->getEditedState(); + pedited->toneCurve.saturation = saturation->getEditedState(); + pedited->toneCurve.autoexp = !autolevels->get_inconsistent(); + pedited->toneCurve.clip = clipDirty; + pedited->toneCurve.curve = !shape->isUnChanged(); + pedited->toneCurve.curve2 = !shape2->isUnChanged(); + pedited->toneCurve.curveMode = toneCurveMode->get_active_row_number() != 6; pedited->toneCurve.curveMode2 = toneCurveMode2->get_active_row_number() != 6; - pedited->toneCurve.method = method->get_active_row_number() != 4; - pedited->toneCurve.hrenabled = !hrenabled->get_inconsistent(); + pedited->toneCurve.method = method->get_active_row_number() != 4; + pedited->toneCurve.hrenabled = !hrenabled->get_inconsistent(); pedited->toneCurve.histmatching = !histmatching->get_inconsistent(); pedited->toneCurve.fromHistMatching = true; pedited->toneCurve.clampOOG = !clampOOG->get_inconsistent(); @@ -424,60 +432,72 @@ void ToneCurve::write (ProcParams* pp, ParamsEdited* pedited) } } -void ToneCurve::hrenabledChanged () +void ToneCurve::hrenabledChanged() { if (multiImage) { if (hrenabled->get_inconsistent()) { - hrenabled->set_inconsistent (false); - enaconn.block (true); - hrenabled->set_active (false); - enaconn.block (false); + hrenabled->set_inconsistent(false); + enaconn.block(true); + hrenabled->set_active(false); + enaconn.block(false); } else if (lasthrEnabled) { - hrenabled->set_inconsistent (true); + hrenabled->set_inconsistent(true); } - lasthrEnabled = hrenabled->get_active (); + lasthrEnabled = hrenabled->get_active(); } if (!batchMode) { if (hrenabled->get_active()) { hlrbox->show(); + hlrbox->set_sensitive(true); + if (method->get_active_row_number() == 2) { + hlbl->show(); + } else { + hlbl->hide(); + } } else { - hlrbox->hide(); + hlrbox->show(); + hlrbox->set_sensitive(false); + hlbl->hide(); } - } + } if (listener) { // Switch off auto exposure if user changes enabled manually - if (autolevels->get_active() ) { + if (autolevels->get_active()) { autoconn.block(true); - autolevels->set_active (false); + autolevels->set_active(false); autoconn.block(false); - autolevels->set_inconsistent (false); + autolevels->set_inconsistent(false); } setHistmatching(false); - if (hrenabled->get_active ()) { - listener->panelChanged (EvHREnabled, M("GENERAL_ENABLED")); + if (hrenabled->get_active()) { + listener->panelChanged(EvHREnabled, M("GENERAL_ENABLED")); } else { - listener->panelChanged (EvHREnabled, M("GENERAL_DISABLED")); + listener->panelChanged(EvHREnabled, M("GENERAL_DISABLED")); } } } -void ToneCurve::methodChanged () +void ToneCurve::methodChanged() { + if (method->get_active_row_number() == 2) { + hlbl->show(); + } else { + hlbl->hide(); + } if (listener) { setHistmatching(false); - if (hrenabled->get_active ()) { - listener->panelChanged (EvHRMethod, method->get_active_text ()); + if (hrenabled->get_active()) { + listener->panelChanged(EvHRMethod, method->get_active_text()); } } } - void ToneCurve::clampOOGChanged() { if (listener) { @@ -485,96 +505,96 @@ void ToneCurve::clampOOGChanged() } } - - -void ToneCurve::setRaw (bool raw) +void ToneCurve::setRaw(bool raw) { - disableListener (); - method->set_sensitive (raw); - hrenabled->set_sensitive (raw); + disableListener(); + method->set_sensitive(raw); + hlbl->set_sensitive(raw); + hrenabled->set_sensitive(raw); histmatching->set_sensitive(raw); - enableListener (); + enableListener(); } - -void ToneCurve::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited) +void ToneCurve::setDefaults(const ProcParams* defParams, const ParamsEdited* pedited) { - expcomp->setDefault (defParams->toneCurve.expcomp); - brightness->setDefault (defParams->toneCurve.brightness); - black->setDefault (defParams->toneCurve.black); - hlcompr->setDefault (defParams->toneCurve.hlcompr); - hlcomprthresh->setDefault (defParams->toneCurve.hlcomprthresh); - shcompr->setDefault (defParams->toneCurve.shcompr); - contrast->setDefault (defParams->toneCurve.contrast); - saturation->setDefault (defParams->toneCurve.saturation); + expcomp->setDefault(defParams->toneCurve.expcomp); + brightness->setDefault(defParams->toneCurve.brightness); + black->setDefault(defParams->toneCurve.black); + hlcompr->setDefault(defParams->toneCurve.hlcompr); + hlbl->setDefault(defParams->toneCurve.hlbl); + hlcomprthresh->setDefault(defParams->toneCurve.hlcomprthresh); + shcompr->setDefault(defParams->toneCurve.shcompr); + contrast->setDefault(defParams->toneCurve.contrast); + saturation->setDefault(defParams->toneCurve.saturation); if (pedited) { - expcomp->setDefaultEditedState (pedited->toneCurve.expcomp ? Edited : UnEdited); - black->setDefaultEditedState (pedited->toneCurve.black ? Edited : UnEdited); - hlcompr->setDefaultEditedState (pedited->toneCurve.hlcompr ? Edited : UnEdited); - hlcomprthresh->setDefaultEditedState (pedited->toneCurve.hlcomprthresh ? Edited : UnEdited); - shcompr->setDefaultEditedState (pedited->toneCurve.shcompr ? Edited : UnEdited); - brightness->setDefaultEditedState (pedited->toneCurve.brightness ? Edited : UnEdited); - contrast->setDefaultEditedState (pedited->toneCurve.contrast ? Edited : UnEdited); - saturation->setDefaultEditedState (pedited->toneCurve.saturation ? Edited : UnEdited); + expcomp->setDefaultEditedState(pedited->toneCurve.expcomp ? Edited : UnEdited); + black->setDefaultEditedState(pedited->toneCurve.black ? Edited : UnEdited); + hlcompr->setDefaultEditedState(pedited->toneCurve.hlcompr ? Edited : UnEdited); + hlbl->setDefaultEditedState(pedited->toneCurve.hlbl ? Edited : UnEdited); + hlcomprthresh->setDefaultEditedState(pedited->toneCurve.hlcomprthresh ? Edited : UnEdited); + shcompr->setDefaultEditedState(pedited->toneCurve.shcompr ? Edited : UnEdited); + brightness->setDefaultEditedState(pedited->toneCurve.brightness ? Edited : UnEdited); + contrast->setDefaultEditedState(pedited->toneCurve.contrast ? Edited : UnEdited); + saturation->setDefaultEditedState(pedited->toneCurve.saturation ? Edited : UnEdited); } else { - expcomp->setDefaultEditedState (Irrelevant); - black->setDefaultEditedState (Irrelevant); - hlcompr->setDefaultEditedState (Irrelevant); - hlcomprthresh->setDefaultEditedState (Irrelevant); - shcompr->setDefaultEditedState (Irrelevant); - brightness->setDefaultEditedState (Irrelevant); - contrast->setDefaultEditedState (Irrelevant); - saturation->setDefaultEditedState (Irrelevant); + expcomp->setDefaultEditedState(Irrelevant); + black->setDefaultEditedState(Irrelevant); + hlcompr->setDefaultEditedState(Irrelevant); + hlbl->setDefaultEditedState(Irrelevant); + hlcomprthresh->setDefaultEditedState(Irrelevant); + shcompr->setDefaultEditedState(Irrelevant); + brightness->setDefaultEditedState(Irrelevant); + contrast->setDefaultEditedState(Irrelevant); + saturation->setDefaultEditedState(Irrelevant); } + } -void ToneCurve::curveChanged (CurveEditor* ce) +void ToneCurve::curveChanged(CurveEditor* ce) { if (listener) { setHistmatching(false); if (ce == shape) { - listener->panelChanged (EvToneCurve1, M("HISTORY_CUSTOMCURVE")); + listener->panelChanged(EvToneCurve1, M("HISTORY_CUSTOMCURVE")); } else if (ce == shape2) { - listener->panelChanged (EvToneCurve2, M("HISTORY_CUSTOMCURVE")); + listener->panelChanged(EvToneCurve2, M("HISTORY_CUSTOMCURVE")); } } } -void ToneCurve::curveMode1Changed () +void ToneCurve::curveMode1Changed() { - //if (listener) listener->panelChanged (EvToneCurveMode, toneCurveMode->get_active_text()); if (listener) { setHistmatching(false); - Glib::signal_idle().connect (sigc::mem_fun(*this, &ToneCurve::curveMode1Changed_)); + Glib::signal_idle().connect(sigc::mem_fun(*this, &ToneCurve::curveMode1Changed_)); } } -bool ToneCurve::curveMode1Changed_ () +bool ToneCurve::curveMode1Changed_() { if (listener) { - listener->panelChanged (EvToneCurveMode1, toneCurveMode->get_active_text()); + listener->panelChanged(EvToneCurveMode1, toneCurveMode->get_active_text()); } return false; } -void ToneCurve::curveMode2Changed () +void ToneCurve::curveMode2Changed() { - //if (listener) listener->panelChanged (EvToneCurveMode, toneCurveMode->get_active_text()); if (listener) { setHistmatching(false); - Glib::signal_idle().connect (sigc::mem_fun(*this, &ToneCurve::curveMode2Changed_)); + Glib::signal_idle().connect(sigc::mem_fun(*this, &ToneCurve::curveMode2Changed_)); } } -bool ToneCurve::curveMode2Changed_ () +bool ToneCurve::curveMode2Changed_() { if (listener) { - listener->panelChanged (EvToneCurveMode2, toneCurveMode2->get_active_text()); + listener->panelChanged(EvToneCurveMode2, toneCurveMode2->get_active_text()); } return false; @@ -601,9 +621,9 @@ void ToneCurve::adjusterChanged(Adjuster* a, double newval) // Switch off auto exposure if user changes sliders manually if (autolevels->get_active() && (a == expcomp || a == brightness || a == contrast || a == black || a == hlcompr || a == hlcomprthresh)) { autoconn.block(true); - autolevels->set_active (false); + autolevels->set_active(false); autoconn.block(false); - autolevels->set_inconsistent (false); + autolevels->set_inconsistent(false); } if (!listener) { @@ -617,39 +637,41 @@ void ToneCurve::adjusterChanged(Adjuster* a, double newval) Glib::ustring costr; if (a == expcomp) { - costr = Glib::ustring::format (std::setw(3), std::fixed, std::setprecision(2), a->getValue()); + costr = Glib::ustring::format(std::setw(3), std::fixed, std::setprecision(2), a->getValue()); } else { - costr = Glib::ustring::format ((int)a->getValue()); + costr = Glib::ustring::format((int)a->getValue()); } if (a == expcomp) { - listener->panelChanged (EvExpComp, costr); + listener->panelChanged(EvExpComp, costr); } else if (a == brightness) { - listener->panelChanged (EvBrightness, costr); + listener->panelChanged(EvBrightness, costr); } else if (a == black) { - listener->panelChanged (EvBlack, costr); + listener->panelChanged(EvBlack, costr); if (!black->getAddMode() && !batchMode) { - shcompr->set_sensitive(!((int)black->getValue () == 0)); //at black=0 shcompr value has no effect + shcompr->set_sensitive(!((int)black->getValue() == 0)); //at black=0 shcompr value has no effect } } else if (a == contrast) { - listener->panelChanged (EvContrast, costr); + listener->panelChanged(EvContrast, costr); } else if (a == saturation) { - listener->panelChanged (EvSaturation, costr); + listener->panelChanged(EvSaturation, costr); + } else if (a == hlbl) { + listener->panelChanged(EvHLbl, costr); } else if (a == hlcompr) { - listener->panelChanged (EvHLCompr, costr); + listener->panelChanged(EvHLCompr, costr); if (!hlcompr->getAddMode() && !batchMode) { - hlcomprthresh->set_sensitive(!((int)hlcompr->getValue () == 0)); //at hlcompr=0 hlcomprthresh value has no effect + hlcomprthresh->set_sensitive(!((int)hlcompr->getValue() == 0)); //at hlcompr=0 hlcomprthresh value has no effect } } else if (a == hlcomprthresh) { - listener->panelChanged (EvHLComprThreshold, costr); + listener->panelChanged(EvHLComprThreshold, costr); } else if (a == shcompr) { - listener->panelChanged (EvSHCompr, costr); + listener->panelChanged(EvSHCompr, costr); } } -void ToneCurve::neutral_pressed () +void ToneCurve::neutral_pressed() { // This method deselects auto levels and HL reconstruction auto // and sets neutral values to params in exposure panel @@ -657,215 +679,222 @@ void ToneCurve::neutral_pressed () setHistmatching(false); if (batchMode) { - autolevels->set_inconsistent (false); - autoconn.block (true); - autolevels->set_active (false); - autoconn.block (false); + autolevels->set_inconsistent(false); + autoconn.block(true); + autolevels->set_active(false); + autoconn.block(false); - lastAuto = autolevels->get_active (); + lastAuto = autolevels->get_active(); } else { //!batchMode - autolevels->set_active (false); - autolevels->set_inconsistent (false); + autolevels->set_active(false); + autolevels->set_inconsistent(false); } expcomp->setValue(0); hlcompr->setValue(0); + hlbl->setValue(0); hlcomprthresh->setValue(0); brightness->setValue(0); black->setValue(0); shcompr->setValue(50); - enaconn.block (true); - hrenabled->set_active (false); - enaconn.block (false); + enaconn.block(true); + hrenabled->set_active(false); + enaconn.block(false); if (!batchMode) { - hlrbox->hide(); + hlrbox->show(); + hlrbox->set_sensitive(false); + hlbl->hide(); } if (!black->getAddMode() && !batchMode) { - shcompr->set_sensitive(!((int)black->getValue () == 0)); //at black=0 shcompr value has no effect + shcompr->set_sensitive(!((int)black->getValue() == 0)); //at black=0 shcompr value has no effect } if (!hlcompr->getAddMode() && !batchMode) { - hlcomprthresh->set_sensitive(!((int)hlcompr->getValue () == 0)); //at hlcompr=0 hlcomprthresh value has no effect + hlcomprthresh->set_sensitive(!((int)hlcompr->getValue() == 0)); //at hlcompr=0 hlcomprthresh value has no effect } contrast->setValue(0); //saturation->setValue(0); - listener->panelChanged (EvNeutralExp, M("GENERAL_ENABLED")); + listener->panelChanged(EvNeutralExp, M("GENERAL_ENABLED")); } -void ToneCurve::autolevels_toggled () + +void ToneCurve::autolevels_toggled() { setHistmatching(false); - if (batchMode) { if (autolevels->get_inconsistent()) { - autolevels->set_inconsistent (false); - autoconn.block (true); - autolevels->set_active (false); - autoconn.block (false); + autolevels->set_inconsistent(false); + autoconn.block(true); + autolevels->set_active(false); + autoconn.block(false); } else if (lastAuto) { - autolevels->set_inconsistent (true); + autolevels->set_inconsistent(true); } - lastAuto = autolevels->get_active (); + lastAuto = autolevels->get_active(); - expcomp->setEditedState (UnEdited); - brightness->setEditedState (UnEdited); - contrast->setEditedState (UnEdited); - black->setEditedState (UnEdited); - hlcompr->setEditedState (UnEdited); - hlcomprthresh->setEditedState (UnEdited); + expcomp->setEditedState(UnEdited); + brightness->setEditedState(UnEdited); + contrast->setEditedState(UnEdited); + black->setEditedState(UnEdited); + hlcompr->setEditedState(UnEdited); + hlcomprthresh->setEditedState(UnEdited); if (expcomp->getAddMode()) { - expcomp->setValue (0); + expcomp->setValue(0); } if (brightness->getAddMode()) { - brightness->setValue (0); + brightness->setValue(0); } if (contrast->getAddMode()) { - contrast->setValue (0); + contrast->setValue(0); } if (black->getAddMode()) { - black->setValue (0); + black->setValue(0); } if (hlcompr->getAddMode()) { - hlcompr->setValue (0); + hlcompr->setValue(0); } if (hlcomprthresh->getAddMode()) { - hlcomprthresh->setValue (0); + hlcomprthresh->setValue(0); } if (listener) { if (!autolevels->get_inconsistent()) { - if (autolevels->get_active ()) { - listener->panelChanged (EvAutoExp, M("GENERAL_ENABLED")); + if (autolevels->get_active()) { + listener->panelChanged(EvAutoExp, M("GENERAL_ENABLED")); } else { - listener->panelChanged (EvFixedExp, M("GENERAL_DISABLED")); + listener->panelChanged(EvFixedExp, M("GENERAL_DISABLED")); } } } } else if (/* !batchMode && */ listener) { if (autolevels->get_active()) { - listener->panelChanged (EvAutoExp, M("GENERAL_ENABLED")); - waitForAutoExp (); + listener->panelChanged(EvAutoExp, M("GENERAL_ENABLED")); + waitForAutoExp(); if (!black->getAddMode()) { - shcompr->set_sensitive(!((int)black->getValue () == 0)); //at black=0 shcompr value has no effect + shcompr->set_sensitive(!((int)black->getValue() == 0)); //at black=0 shcompr value has no effect } if (!hlcompr->getAddMode() && !batchMode) { - hlcomprthresh->set_sensitive(!((int)hlcompr->getValue () == 0)); //at hlcompr=0 hlcomprthresh value has no effect + hlcomprthresh->set_sensitive(!((int)hlcompr->getValue() == 0)); //at hlcompr=0 hlcomprthresh value has no effect } } else { - listener->panelChanged (EvFixedExp, M("GENERAL_DISABLED")); + listener->panelChanged(EvFixedExp, M("GENERAL_DISABLED")); } } } -void ToneCurve::clip_changed () +void ToneCurve::clip_changed() { clipDirty = true; if (autolevels->get_active() && listener) { - Glib::signal_idle().connect (sigc::mem_fun(*this, &ToneCurve::clip_changed_)); + Glib::signal_idle().connect(sigc::mem_fun(*this, &ToneCurve::clip_changed_)); } } -bool ToneCurve::clip_changed_ () +bool ToneCurve::clip_changed_() { if (listener) { - listener->panelChanged (EvClip, Glib::ustring::format (std::setprecision(5), sclip->get_value())); + listener->panelChanged(EvClip, Glib::ustring::format(std::setprecision(5), sclip->get_value())); if (!batchMode) { - waitForAutoExp (); + waitForAutoExp(); } } return false; } -void ToneCurve::waitForAutoExp () +void ToneCurve::waitForAutoExp() { - sclip->set_sensitive (false); - expcomp->setEnabled (false); - brightness->setEnabled (false); - contrast->setEnabled (false); - black->setEnabled (false); - hlcompr->setEnabled (false); - hlcomprthresh->setEnabled (false); - shcompr->setEnabled (false); - contrast->setEnabled (false); - saturation->setEnabled (false); - curveEditorG->set_sensitive (false); - toneCurveMode->set_sensitive (false); - curveEditorG2->set_sensitive (false); - toneCurveMode2->set_sensitive (false); + sclip->set_sensitive(false); + expcomp->setEnabled(false); + brightness->setEnabled(false); + contrast->setEnabled(false); + black->setEnabled(false); + hlcompr->setEnabled(false); + hlcomprthresh->setEnabled(false); + shcompr->setEnabled(false); + contrast->setEnabled(false); + saturation->setEnabled(false); + curveEditorG->set_sensitive(false); + toneCurveMode->set_sensitive(false); + curveEditorG2->set_sensitive(false); + toneCurveMode2->set_sensitive(false); hrenabled->set_sensitive(false); method->set_sensitive(false); + hlbl->set_sensitive(false); histmatching->set_sensitive(false); } -void ToneCurve::enableAll () +void ToneCurve::enableAll() { - sclip->set_sensitive (true); - expcomp->setEnabled (true); - brightness->setEnabled (true); - black->setEnabled (true); - hlcompr->setEnabled (true); - hlcomprthresh->setEnabled (true); - shcompr->setEnabled (true); - contrast->setEnabled (true); - saturation->setEnabled (true); - curveEditorG->set_sensitive (true); - toneCurveMode->set_sensitive (true); - curveEditorG2->set_sensitive (true); - toneCurveMode2->set_sensitive (true); + sclip->set_sensitive(true); + expcomp->setEnabled(true); + brightness->setEnabled(true); + black->setEnabled(true); + hlcompr->setEnabled(true); + hlbl->setEnabled(true); + hlcomprthresh->setEnabled(true); + shcompr->setEnabled(true); + contrast->setEnabled(true); + saturation->setEnabled(true); + curveEditorG->set_sensitive(true); + toneCurveMode->set_sensitive(true); + curveEditorG2->set_sensitive(true); + toneCurveMode2->set_sensitive(true); hrenabled->set_sensitive(true); method->set_sensitive(true); + hlbl->set_sensitive(true); histmatching->set_sensitive(true); } -void ToneCurve::setBatchMode (bool batchMode) +void ToneCurve::setBatchMode(bool batchMode) { - ToolPanel::setBatchMode (batchMode); - method->append (M("GENERAL_UNCHANGED")); + ToolPanel::setBatchMode(batchMode); + method->append(M("GENERAL_UNCHANGED")); - removeIfThere (abox, autolevels, false); - autolevels = Gtk::manage (new Gtk::CheckButton (M("TP_EXPOSURE_AUTOLEVELS"))); - autolevels->set_tooltip_markup (M("TP_EXPOSURE_AUTOLEVELS_TIP")); - autoconn = autolevels->signal_toggled().connect( sigc::mem_fun(*this, &ToneCurve::autolevels_toggled) ); - abox->pack_start (*autolevels); + removeIfThere(abox, autolevels, false); + autolevels = Gtk::manage(new Gtk::CheckButton(M("TP_EXPOSURE_AUTOLEVELS"))); + autolevels->set_tooltip_markup(M("TP_EXPOSURE_AUTOLEVELS_TIP")); + autoconn = autolevels->signal_toggled().connect(sigc::mem_fun(*this, &ToneCurve::autolevels_toggled)); + abox->pack_start(*autolevels); - ToolPanel::setBatchMode (batchMode); - expcomp->showEditedCB (); - black->showEditedCB (); - hlcompr->showEditedCB (); - hlcomprthresh->showEditedCB (); - shcompr->showEditedCB (); - brightness->showEditedCB (); - contrast->showEditedCB (); - saturation->showEditedCB (); + ToolPanel::setBatchMode(batchMode); + expcomp->showEditedCB(); + black->showEditedCB(); + hlcompr->showEditedCB(); + hlbl->showEditedCB(); + hlcomprthresh->showEditedCB(); + shcompr->showEditedCB(); + brightness->showEditedCB(); + contrast->showEditedCB(); + saturation->showEditedCB(); - toneCurveMode->append (M("GENERAL_UNCHANGED")); - toneCurveMode2->append (M("GENERAL_UNCHANGED")); + toneCurveMode->append(M("GENERAL_UNCHANGED")); + toneCurveMode2->append(M("GENERAL_UNCHANGED")); - curveEditorG->setBatchMode (batchMode); - curveEditorG2->setBatchMode (batchMode); + curveEditorG->setBatchMode(batchMode); + curveEditorG2->setBatchMode(batchMode); } -void ToneCurve::setAdjusterBehavior (bool expadd, bool hlcompadd, bool hlcompthreshadd, bool bradd, bool blackadd, bool shcompadd, bool contradd, bool satadd) +void ToneCurve::setAdjusterBehavior(bool expadd, bool hlcompadd, bool hlcompthreshadd, bool bradd, bool blackadd, bool shcompadd, bool contradd, bool satadd) { expcomp->setAddMode(expadd); @@ -878,7 +907,7 @@ void ToneCurve::setAdjusterBehavior (bool expadd, bool hlcompadd, bool hlcompthr saturation->setAddMode(satadd); } -void ToneCurve::trimValues (rtengine::procparams::ProcParams* pp) +void ToneCurve::trimValues(rtengine::procparams::ProcParams* pp) { expcomp->trimValue(pp->toneCurve.expcomp); @@ -907,7 +936,6 @@ void ToneCurve::updateCurveBackgroundHistogram( shape->updateBackgroundHistogram(histToneCurve); } - void ToneCurve::setHistmatching(bool enabled) { fromHistMatching = enabled; @@ -919,7 +947,6 @@ void ToneCurve::setHistmatching(bool enabled) } } - void ToneCurve::histmatchingToggled() { if (listener) { @@ -966,8 +993,16 @@ void ToneCurve::autoExpChanged(double expcomp, int bright, int contr, int black, if (nextHLRecons) { hlrbox->show(); + hlrbox->set_sensitive(true); + if (method->get_active_row_number() == 2) { + hlbl->show(); + } else { + hlbl->hide(); + } } else if (!batchMode) { - hlrbox->hide(); + hlrbox->show(); + hlrbox->set_sensitive(false); + hlbl->hide(); } if (!this->black->getAddMode() && !batchMode) { @@ -1007,7 +1042,7 @@ void ToneCurve::autoMatchedToneCurveChanged(rtengine::procparams::ToneCurveMode hlcomprthresh->set_sensitive(static_cast(hlcompr->getValue())); //at hlcompr=0 hlcomprthresh value has no effect } - if (autolevels->get_active() ) { + if (autolevels->get_active()) { expcomp->setValue(0); autoconn.block(true); autolevels->set_active(false); diff --git a/rtgui/tonecurve.h b/rtgui/tonecurve.h index e0482c5da..6dd77951d 100644 --- a/rtgui/tonecurve.h +++ b/rtgui/tonecurve.h @@ -47,9 +47,10 @@ protected: sigc::connection methconn; sigc::connection enaconn; bool lasthrEnabled; + Adjuster* hlbl; - Gtk::HBox* abox; - Gtk::HBox* hlrbox; + Gtk::Box* abox; + Gtk::Box* hlrbox; Gtk::ToggleButton* autolevels; Gtk::Label* lclip; @@ -80,6 +81,7 @@ protected: rtengine::ProcEvent EvHistMatching; rtengine::ProcEvent EvHistMatchingBatch; rtengine::ProcEvent EvClampOOG; + rtengine::ProcEvent EvHLbl; // used temporarily in eventing double nextExpcomp; diff --git a/rtgui/toolbar.h b/rtgui/toolbar.h index 85a0c3345..41ae2c680 100644 --- a/rtgui/toolbar.h +++ b/rtgui/toolbar.h @@ -39,7 +39,7 @@ public: virtual void editModeSwitchedOff() = 0; }; -class ToolBar final : public Gtk::HBox +class ToolBar final : public Gtk::Box { private: std::unique_ptr handimg; diff --git a/rtgui/toolpanel.cc b/rtgui/toolpanel.cc index b1282f523..cfc53639b 100644 --- a/rtgui/toolpanel.cc +++ b/rtgui/toolpanel.cc @@ -27,6 +27,7 @@ using namespace rtengine::procparams; ToolVBox::ToolVBox() { + set_orientation(Gtk::ORIENTATION_VERTICAL); //GTK318 #if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 set_spacing(1); // Vertical space between tools @@ -36,6 +37,7 @@ ToolVBox::ToolVBox() { } ToolParamBlock::ToolParamBlock() { + set_orientation(Gtk::ORIENTATION_VERTICAL); //GTK318 #if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 set_spacing(2); // Vertical space between parameters in a single tool @@ -52,10 +54,10 @@ FoldableToolPanel::FoldableToolPanel(Gtk::Box* content, Glib::ustring toolName, // exp->set_use_markup (true); if (need11) { - Gtk::HBox *titleHBox = Gtk::manage(new Gtk::HBox()); + Gtk::Box *titleHBox = Gtk::manage(new Gtk::Box()); Gtk::Label *label = Gtk::manage(new Gtk::Label()); - label->set_markup(Glib::ustring("") + escapeHtmlChars(UILabel) + Glib::ustring("")); + label->set_markup(escapeHtmlChars(UILabel)); label->set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_CENTER); titleHBox->pack_start(*label, Gtk::PACK_EXPAND_WIDGET, 0); diff --git a/rtgui/toolpanel.h b/rtgui/toolpanel.h index 12b3eebcc..f07f5f0a1 100644 --- a/rtgui/toolpanel.h +++ b/rtgui/toolpanel.h @@ -49,7 +49,7 @@ public: /// @brief This class control the space around the group of tools inside a tab, as well as the space separating each tool. */ class ToolVBox : - public Gtk::VBox + public Gtk::Box { public: ToolVBox(); @@ -57,7 +57,7 @@ public: /// @brief This class control the space around a tool's block of parameter. */ class ToolParamBlock : - public Gtk::VBox + public Gtk::Box { public: ToolParamBlock(); diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc index b5d133775..920585aed 100644 --- a/rtgui/toolpanelcoord.cc +++ b/rtgui/toolpanelcoord.cc @@ -99,7 +99,7 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favorit bayerrawexposure = Gtk::manage(new BayerRAWExposure()); xtransrawexposure = Gtk::manage(new XTransRAWExposure()); fattal = Gtk::manage(new FattalToneMapping()); - filmNegative = Gtk::manage (new FilmNegative ()); + filmNegative = Gtk::manage (new FilmNegative()); pdSharpening = Gtk::manage (new PdSharpening()); // So Demosaic, Line noise filter, Green Equilibration, Ca-Correction (garder le nom de section identique!) and Black-Level will be moved in a "Bayer sensor" tool, // and a separate Demosaic and Black Level tool will be created in an "X-Trans sensor" tool @@ -123,6 +123,7 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favorit addfavoritePanel (detailsPanel, sharpenMicro); addfavoritePanel (colorPanel, hsvequalizer); addfavoritePanel (colorPanel, filmSimulation); + addfavoritePanel (colorPanel, filmNegative); addfavoritePanel (colorPanel, softlight); addfavoritePanel (colorPanel, rgbcurves); addfavoritePanel (colorPanel, colortoning); @@ -165,7 +166,6 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favorit addfavoritePanel (rawPanel, preprocess); addfavoritePanel (rawPanel, darkframe); addfavoritePanel (rawPanel, flatfield); - addfavoritePanel (rawPanel, filmNegative); addfavoritePanel (rawPanel, pdSharpening); int favoriteCount = 0; @@ -191,7 +191,7 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favorit // load panel endings for (int i = 0; i < 8; i++) { - vbPanelEnd[i] = Gtk::manage (new Gtk::VBox ()); + vbPanelEnd[i] = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); imgPanelEnd[i] = Gtk::manage (new RTImage ("ornament1.png")); imgPanelEnd[i]->show(); vbPanelEnd[i]->pack_start(*imgPanelEnd[i], Gtk::PACK_SHRINK); @@ -200,37 +200,29 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favorit if(favoriteCount > 0) { favoritePanelSW = Gtk::manage(new MyScrolledWindow()); favoritePanelSW->add(*favoritePanel); - favoritePanel->pack_start(*Gtk::manage(new Gtk::HSeparator), Gtk::PACK_SHRINK, 0); favoritePanel->pack_start(*vbPanelEnd[0], Gtk::PACK_SHRINK, 4); } updateVScrollbars(options.hideTPVScrollbar); exposurePanelSW->add (*exposurePanel); - exposurePanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0); exposurePanel->pack_start (*vbPanelEnd[1], Gtk::PACK_SHRINK, 4); detailsPanelSW->add (*detailsPanel); - detailsPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0); detailsPanel->pack_start (*vbPanelEnd[2], Gtk::PACK_SHRINK, 4); colorPanelSW->add (*colorPanel); - colorPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0); colorPanel->pack_start (*vbPanelEnd[3], Gtk::PACK_SHRINK, 4); advancedPanelSW->add (*advancedPanel); - advancedPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0); advancedPanel->pack_start (*vbPanelEnd[6], Gtk::PACK_SHRINK, 0); locallabPanelSW->add(*locallabPanel); - locallabPanel->pack_start(*Gtk::manage(new Gtk::HSeparator), Gtk::PACK_SHRINK, 0); locallabPanel->pack_start(*vbPanelEnd[7], Gtk::PACK_SHRINK, 4); transformPanelSW->add (*transformPanel); - transformPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0); transformPanel->pack_start (*vbPanelEnd[4], Gtk::PACK_SHRINK, 4); rawPanelSW->add (*rawPanel); - rawPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0); rawPanel->pack_start (*vbPanelEnd[5], Gtk::PACK_SHRINK, 0); toiF = Gtk::manage (new TextOrIcon ("star.png", M ("MAIN_TAB_FAVORITES"), M ("MAIN_TAB_FAVORITES_TOOLTIP"))); @@ -286,7 +278,7 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favorit distortion->setLensGeomListener(this); crop->setCropPanelListener(this); icm->setICMPanelListener(this); - filmNegative->setFilmNegProvider (this); + filmNegative->setFilmNegProvider(this); toolBar = new ToolBar(); toolBar->setToolBarListener(this); @@ -359,14 +351,15 @@ void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtr rawPanelSW->set_sensitive(true); sensorxtrans->FoldableToolPanel::hide(); xtransprocess->FoldableToolPanel::hide(); + bayerrawexposure->FoldableToolPanel::show(); xtransrawexposure->FoldableToolPanel::hide(); sensorbayer->FoldableToolPanel::show(); bayerprocess->FoldableToolPanel::show(); bayerpreprocess->FoldableToolPanel::show(); rawcacorrection->FoldableToolPanel::show(); + preprocessWB->FoldableToolPanel::show(); preprocess->FoldableToolPanel::show(); flatfield->FoldableToolPanel::show(); - filmNegative->FoldableToolPanel::show(); pdSharpening->FoldableToolPanel::show(); retinex->FoldableToolPanel::setGrayedOut(false); return false; @@ -380,13 +373,14 @@ void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtr sensorxtrans->FoldableToolPanel::show(); xtransprocess->FoldableToolPanel::show(); xtransrawexposure->FoldableToolPanel::show(); + bayerrawexposure->FoldableToolPanel::hide(); sensorbayer->FoldableToolPanel::hide(); bayerprocess->FoldableToolPanel::hide(); bayerpreprocess->FoldableToolPanel::hide(); rawcacorrection->FoldableToolPanel::hide(); + preprocessWB->FoldableToolPanel::show(); preprocess->FoldableToolPanel::show(); flatfield->FoldableToolPanel::show(); - filmNegative->FoldableToolPanel::show(); pdSharpening->FoldableToolPanel::show(); retinex->FoldableToolPanel::setGrayedOut(false); return false; @@ -407,7 +401,6 @@ void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtr preprocessWB->FoldableToolPanel::hide(); preprocess->FoldableToolPanel::hide(); flatfield->FoldableToolPanel::show(); - filmNegative->FoldableToolPanel::hide(); pdSharpening->FoldableToolPanel::show(); retinex->FoldableToolPanel::setGrayedOut(false); return false; @@ -428,7 +421,6 @@ void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtr preprocessWB->FoldableToolPanel::hide(); preprocess->FoldableToolPanel::hide(); flatfield->FoldableToolPanel::hide(); - filmNegative->FoldableToolPanel::hide(); pdSharpening->FoldableToolPanel::hide(); retinex->FoldableToolPanel::setGrayedOut(false); return false; @@ -450,7 +442,6 @@ void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtr preprocessWB->FoldableToolPanel::hide(); preprocess->FoldableToolPanel::hide(); flatfield->FoldableToolPanel::hide(); - filmNegative->FoldableToolPanel::hide(); pdSharpening->FoldableToolPanel::hide(); retinex->FoldableToolPanel::setGrayedOut(true); return false; @@ -535,12 +526,12 @@ void ToolPanelCoordinator::panelChanged(const rtengine::ProcEvent& event, const ipc->setLocallabMaskVisibility(maskStruc.previewDeltaE, maskStruc.colorMask, maskStruc.colorMaskinv, maskStruc.expMask, maskStruc.expMaskinv, maskStruc.SHMask, maskStruc.SHMaskinv, maskStruc.vibMask, maskStruc.softMask, maskStruc.blMask, maskStruc.tmMask, maskStruc.retiMask, maskStruc.sharMask, - maskStruc.lcMask, maskStruc.cbMask, maskStruc.maskMask); + maskStruc.lcMask, maskStruc.cbMask, maskStruc.logMask, maskStruc.maskMask); } else if (event == rtengine::EvLocallabSpotCreated || event == rtengine::EvLocallabSpotSelectedWithMask || event == rtengine::EvLocallabSpotDeleted || event == rtengine::Evlocallabshowreset || event == rtengine::EvlocallabToolRemovedWithRefresh) { locallab->resetMaskVisibility(); - ipc->setLocallabMaskVisibility(false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + ipc->setLocallabMaskVisibility(false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } ipc->endUpdateParams(changeFlags); // starts the IPC processing @@ -611,7 +602,7 @@ void ToolPanelCoordinator::profileChange( lParams[1] = *mergedParams; pe.initFrom(lParams); - filterRawRefresh = pe.raw.isUnchanged() && pe.lensProf.isUnchanged() && pe.retinex.isUnchanged() && pe.filmNegative.isUnchanged() && pe.pdsharpening.isUnchanged(); + filterRawRefresh = pe.raw.isUnchanged() && pe.lensProf.isUnchanged() && pe.retinex.isUnchanged() && pe.pdsharpening.isUnchanged(); } *params = *mergedParams; @@ -650,7 +641,7 @@ void ToolPanelCoordinator::profileChange( // Reset Locallab mask visibility locallab->resetMaskVisibility(); - ipc->setLocallabMaskVisibility(false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + ipc->setLocallabMaskVisibility(false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // start the IPC processing if (filterRawRefresh) { @@ -730,7 +721,7 @@ void ToolPanelCoordinator::initImage(rtengine::StagedImageProcessor* ipc_, bool ipc->setSizeListener(resize); ipc->setLocallabListener(locallab); ipc->setImageTypeListener(this); - ipc->setFilmNegListener (filmNegative); + ipc->setFilmNegListener(filmNegative); flatfield->setShortcutPath(Glib::path_get_dirname(ipc->getInitialImage()->getFileName())); icm->setRawMeta(raw, (const rtengine::FramesData*)pMetaData); @@ -1171,14 +1162,12 @@ void ToolPanelCoordinator::updateVScrollbars(bool hide) rawPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy); advancedPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy); locallabPanelSW->set_policy(Gtk::POLICY_AUTOMATIC, policy); - for (auto currExp : expList) { currExp->updateVScrollbars(hide); } } - void ToolPanelCoordinator::updateTPVScrollbar(bool hide) { updateVScrollbars(hide); @@ -1278,12 +1267,7 @@ void ToolPanelCoordinator::setEditProvider(EditDataProvider *provider) } } -bool ToolPanelCoordinator::getFilmNegativeExponents(rtengine::Coord spotA, rtengine::Coord spotB, std::array& newExps) +bool ToolPanelCoordinator::getFilmNegativeSpot(rtengine::Coord spot, int spotSize, RGB &refInput, RGB &refOutput) { - return ipc && ipc->getFilmNegativeExponents(spotA.x, spotA.y, spotB.x, spotB.y, newExps); -} - -bool ToolPanelCoordinator::getRawSpotValues(rtengine::Coord spot, int spotSize, std::array& rawValues) -{ - return ipc && ipc->getRawSpotValues(spot.x, spot.y, spotSize, rawValues); + return ipc && ipc->getFilmNegativeSpot(spot.x, spot.y, spotSize, refInput, refOutput); } diff --git a/rtgui/toolpanelcoord.h b/rtgui/toolpanelcoord.h index 0dcee59eb..675b77de7 100644 --- a/rtgui/toolpanelcoord.h +++ b/rtgui/toolpanelcoord.h @@ -193,7 +193,7 @@ protected: TextOrIcon* toiL; Gtk::Image* imgPanelEnd[8]; - Gtk::VBox* vbPanelEnd[8]; + Gtk::Box* vbPanelEnd[8]; Gtk::ScrolledWindow* favoritePanelSW; Gtk::ScrolledWindow* exposurePanelSW; @@ -308,8 +308,7 @@ public: Glib::ustring GetCurrentImageFilePath() override; // FilmNegProvider interface - bool getFilmNegativeExponents(rtengine::Coord spotA, rtengine::Coord spotB, std::array& newExps) override; - bool getRawSpotValues(rtengine::Coord spot, int spotSize, std::array& rawValues) override; + bool getFilmNegativeSpot(rtengine::Coord spot, int spotSize, RGB &refInput, RGB &refOutput) override; // rotatelistener interface void straightenRequested () override; diff --git a/rtgui/wavelet.cc b/rtgui/wavelet.cc index c7647798a..448141497 100644 --- a/rtgui/wavelet.cc +++ b/rtgui/wavelet.cc @@ -69,8 +69,8 @@ Wavelet::Wavelet() : curveEditorbl(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_BLCURVE"))), curveEditorRES(new CurveEditorGroup(options.lastWaveletCurvesDir)), curveEditorGAM(new CurveEditorGroup(options.lastWaveletCurvesDir)), - separatorNeutral(Gtk::manage(new Gtk::HSeparator())), - separatoredge(Gtk::manage(new Gtk::HSeparator())), + separatorNeutral(Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL))), + separatoredge(Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL))), opaCurveEditorG(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_COLORT"))), opacityCurveEditorG(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_OPACITY"))), CurveEditorwavnoise(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_DENOISE"))), @@ -93,7 +93,7 @@ Wavelet::Wavelet() : offset(Gtk::manage(new Adjuster(M("TP_WAVELET_WAVOFFSET"), 0.33, 1.66, 0.01, 1., Gtk::manage(new RTImage("circle-black-small.png")), Gtk::manage(new RTImage("circle-white-small.png"))))), lowthr(Gtk::manage(new Adjuster(M("TP_WAVELET_WAVLOWTHR"), 20., 100., 0.5, 40.))), rescon(Gtk::manage(new Adjuster(M("TP_WAVELET_RESCON"), -100, 100, 1, 0))), - resconH(Gtk::manage(new Adjuster(M("TP_WAVELET_RESCONH"), -100, 100, 1, 0))), + resconH(Gtk::manage(new Adjuster(M("TP_WAVELET_RESCONH"), 0, 100, 1, 0))), reschro(Gtk::manage(new Adjuster(M("TP_WAVELET_RESCHRO"), -100, 100, 1, 0))), resblur(Gtk::manage(new Adjuster(M("TP_WAVELET_RESBLUR"), 0, 100, 1, 0))), resblurc(Gtk::manage(new Adjuster(M("TP_WAVELET_RESBLURC"), 0, 100, 1, 0))), @@ -209,14 +209,14 @@ Wavelet::Wavelet() : exptoning(Gtk::manage(new MyExpander(true, M("TP_WAVELET_TON")))), expclari(Gtk::manage(new MyExpander(true, M("TP_WAVELET_CLARI")))), expbl(Gtk::manage(new MyExpander(true, M("TP_WAVELET_BL")))), - neutrHBox(Gtk::manage(new Gtk::HBox())), - usharpHBox(Gtk::manage(new Gtk::HBox())), - ctboxch(Gtk::manage(new Gtk::HBox())), - quaHBox(Gtk::manage(new Gtk::HBox())), - sliHBox(Gtk::manage(new Gtk::HBox())), - denHBox(Gtk::manage(new Gtk::HBox())), - mixHBox(Gtk::manage(new Gtk::HBox())), - ctboxBA(Gtk::manage(new Gtk::VBox())) + neutrHBox(Gtk::manage(new Gtk::Box())), + usharpHBox(Gtk::manage(new Gtk::Box())), + ctboxch(Gtk::manage(new Gtk::Box())), + quaHBox(Gtk::manage(new Gtk::Box())), + sliHBox(Gtk::manage(new Gtk::Box())), + denHBox(Gtk::manage(new Gtk::Box())), + mixHBox(Gtk::manage(new Gtk::Box())), + ctboxBA(Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL))) { CurveListener::setMulti(true); @@ -319,7 +319,7 @@ Wavelet::Wavelet() : complexmethod->append(M("TP_WAVELET_COMPEXPERT")); complexmethodconn = complexmethod->signal_changed().connect(sigc::mem_fun(*this, &Wavelet::complexmethodChanged)); complexmethod->set_tooltip_text(M("TP_WAVELET_COMPLEX_TOOLTIP")); - Gtk::HBox* const complexHBox = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const complexHBox = Gtk::manage(new Gtk::Box()); Gtk::Label* const complexLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_COMPLEXLAB") + ":")); complexHBox->pack_start(*complexLabel, Gtk::PACK_SHRINK, 4); complexHBox->pack_start(*complexmethod); @@ -330,7 +330,7 @@ Wavelet::Wavelet() : // Tilesmethod->append(M("TP_WAVELET_TILESLIT")); Tilesmethodconn = Tilesmethod->signal_changed().connect(sigc::mem_fun(*this, &Wavelet::TilesmethodChanged)); Tilesmethod->set_tooltip_text(M("TP_WAVELET_TILES_TOOLTIP")); - Gtk::HBox* const tilesizeHBox = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const tilesizeHBox = Gtk::manage(new Gtk::Box()); Gtk::Label* const tilesizeLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_TILESIZE") + ":")); tilesizeHBox->pack_start(*tilesizeLabel, Gtk::PACK_SHRINK, 4); tilesizeHBox->pack_start(*Tilesmethod); @@ -344,7 +344,7 @@ Wavelet::Wavelet() : daubcoeffmethodconn = daubcoeffmethod->signal_changed().connect(sigc::mem_fun(*this, &Wavelet::daubcoeffmethodChanged)); daubcoeffmethod->set_tooltip_text(M("TP_WAVELET_DAUB_TOOLTIP")); Gtk::Label* const daubcoeffLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_DAUB") + ":")); - Gtk::HBox* const daubcoeffHBox = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const daubcoeffHBox = Gtk::manage(new Gtk::Box()); daubcoeffHBox->pack_start(*daubcoeffLabel, Gtk::PACK_SHRINK, 4); daubcoeffHBox->pack_start(*daubcoeffmethod); @@ -352,7 +352,7 @@ Wavelet::Wavelet() : Backmethod->append(M("TP_WAVELET_B1")); Backmethod->append(M("TP_WAVELET_B2")); Backmethodconn = Backmethod->signal_changed().connect(sigc::mem_fun(*this, &Wavelet::BackmethodChanged)); - Gtk::HBox* const backgroundHBox = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const backgroundHBox = Gtk::manage(new Gtk::Box()); Gtk::Label* const backgroundLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_BACKGROUND") + ":")); backgroundHBox->pack_start(*backgroundLabel, Gtk::PACK_SHRINK, 4); backgroundHBox->pack_start(*Backmethod); @@ -362,7 +362,7 @@ Wavelet::Wavelet() : CLmethod->append(M("TP_WAVELET_LEVDIR_SUP")); CLmethod->append(M("TP_WAVELET_LEVDIR_ALL")); CLmethodconn = CLmethod->signal_changed().connect(sigc::mem_fun(*this, &Wavelet::CLmethodChanged)); - Gtk::HBox* const levdirMainHBox = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const levdirMainHBox = Gtk::manage(new Gtk::Box()); Gtk::Label* const levdirMainLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_PROC") + ":")); levdirMainHBox->pack_start(*levdirMainLabel, Gtk::PACK_SHRINK, 4); levdirMainHBox->pack_start(*CLmethod); //same @@ -387,7 +387,7 @@ Wavelet::Wavelet() : Dirmethod->append(M("TP_WAVELET_DALL")); Lmethodconn = Lmethod->signal_changed().connect(sigc::mem_fun(*this, &Wavelet::LmethodChanged)); Dirmethodconn = Dirmethod->signal_changed().connect(sigc::mem_fun(*this, &Wavelet::DirmethodChanged)); - Gtk::HBox* const levdirSubHBox = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const levdirSubHBox = Gtk::manage(new Gtk::Box()); levdirSubHBox->pack_start(*Lmethod); levdirSubHBox->pack_start(*Dirmethod, Gtk::PACK_EXPAND_WIDGET, 2); // same, but 2 not 4? @@ -403,7 +403,9 @@ Wavelet::Wavelet() : // Contrast ToolParamBlock* const levBox = Gtk::manage(new ToolParamBlock()); - Gtk::HBox* const buttonBox = Gtk::manage(new Gtk::HBox(true, 10)); + Gtk::Box* const buttonBox = Gtk::manage(new Gtk::Box()); + buttonBox->set_spacing(10); + buttonBox->set_homogeneous(true); levBox->pack_start(*buttonBox, Gtk::PACK_SHRINK, 2); Gtk::Button* const contrastMinusButton = Gtk::manage(new Gtk::Button(M("TP_WAVELET_CONTRAST_MINUS"))); @@ -442,7 +444,7 @@ Wavelet::Wavelet() : } levBox->pack_start(*sup); sup->setAdjusterListener(this); - Gtk::HSeparator* const separatorcont = Gtk::manage(new Gtk::HSeparator()); + Gtk::Separator* const separatorcont = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); levBox->pack_start(*separatorcont); sigma->setAdjusterListener(this); @@ -458,7 +460,7 @@ Wavelet::Wavelet() : wavLabels->show(); levBox->pack_start(*wavLabels); - Gtk::VBox* const contrastSHVBox = Gtk::manage(new Gtk::VBox); + Gtk::Box* const contrastSHVBox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); contrastSHVBox->set_spacing(2); HSmethod->append(M("TP_WAVELET_HS1")); @@ -509,7 +511,7 @@ Wavelet::Wavelet() : ToolParamBlock* const chBox = Gtk::manage(new ToolParamBlock()); Gtk::Label* const labmch = Gtk::manage(new Gtk::Label(M("TP_WAVELET_CHTYPE") + ":")); -// Gtk::HBox* const ctboxch = Gtk::manage(new Gtk::HBox()); +// Gtk::Box* const ctboxch = Gtk::manage(new Gtk::Box()); ctboxch->pack_start(*labmch, Gtk::PACK_SHRINK, 1); CHmethod->append(M("TP_WAVELET_CH1")); @@ -519,7 +521,7 @@ Wavelet::Wavelet() : ctboxch->pack_start(*CHmethod); chBox->pack_start(*ctboxch); - Gtk::HBox* const ctboxCH = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const ctboxCH = Gtk::manage(new Gtk::Box()); ctboxCH->pack_start(*labmC, Gtk::PACK_SHRINK, 1); CHSLmethod->append(M("TP_WAVELET_CHSL")); @@ -527,7 +529,7 @@ Wavelet::Wavelet() : CHSLmethodconn = CHSLmethod->signal_changed().connect(sigc::mem_fun(*this, &Wavelet::CHSLmethodChanged)); ctboxCH->pack_start(*CHSLmethod); - Gtk::HSeparator* const separatorChromaMethod = Gtk::manage(new Gtk::HSeparator()); + Gtk::Separator* const separatorChromaMethod = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); chBox->pack_start(*separatorChromaMethod, Gtk::PACK_SHRINK, 2); chroma->set_tooltip_text(M("TP_WAVELET_CHRO_TOOLTIP")); @@ -549,7 +551,9 @@ Wavelet::Wavelet() : chBox->pack_start(*chro); chBox->pack_start(*sigmacol); - Gtk::HBox* const buttonchBox = Gtk::manage(new Gtk::HBox(true, 10)); + Gtk::Box* const buttonchBox = Gtk::manage(new Gtk::Box()); + buttonchBox->set_spacing(10); + buttonchBox->set_homogeneous(true); neutralchPressedConn = neutralchButton->signal_pressed().connect(sigc::mem_fun(*this, &Wavelet::neutralchPressed)); chBox->pack_start(*separatorNeutral, Gtk::PACK_SHRINK, 2); buttonchBox->pack_start(*neutralchButton); @@ -687,7 +691,7 @@ Wavelet::Wavelet() : denmethod->append(M("TP_WAVELET_DEN12LOW")); denmethodconn = denmethod->signal_changed().connect(sigc::mem_fun(*this, &Wavelet::denmethodChanged)); denmethod->set_tooltip_text(M("TP_WAVELET_DENEQUAL_TOOLTIP")); -// Gtk::HBox* const denHBox = Gtk::manage(new Gtk::HBox()); +// Gtk::Box* const denHBox = Gtk::manage(new Gtk::Box()); Gtk::Label* const denLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_DENCONTRAST") + ":")); denHBox->pack_start(*denLabel, Gtk::PACK_SHRINK, 4); denHBox->pack_start(*denmethod); @@ -817,7 +821,7 @@ Wavelet::Wavelet() : edgBox->pack_start(*edgthresh); Gtk::Label* const labmedgr = Gtk::manage(new Gtk::Label(M("TP_WAVELET_MEDGREINF") + ":")); - Gtk::HBox* const edbox = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const edbox = Gtk::manage(new Gtk::Box()); edbox->pack_start(*labmedgr, Gtk::PACK_SHRINK, 1); Medgreinf->append(M("TP_WAVELET_RE1")); @@ -828,11 +832,11 @@ Wavelet::Wavelet() : edbox->pack_start(*Medgreinf); edgBox->pack_start(*edbox); - Gtk::HSeparator* const separatorlc = Gtk::manage(new Gtk::HSeparator()); + Gtk::Separator* const separatorlc = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); edgBox->pack_start(*separatorlc, Gtk::PACK_SHRINK, 2); Gtk::Label* const labmED = Gtk::manage(new Gtk::Label(M("TP_WAVELET_EDTYPE") + ":")); - Gtk::HBox* const ctboxED = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const ctboxED = Gtk::manage(new Gtk::Box()); ctboxED->pack_start(*labmED, Gtk::PACK_SHRINK, 1); EDmethod->append(M("TP_WAVELET_EDSL")); @@ -865,10 +869,10 @@ Wavelet::Wavelet() : medianlevConn = medianlev->signal_toggled().connect(sigc::mem_fun(*this, &Wavelet::medianlevToggled)); medianlev->set_tooltip_text(M("TP_WAVELET_MEDILEV_TOOLTIP")); - Gtk::HSeparator* const separatored1 = Gtk::manage(new Gtk::HSeparator()); + Gtk::Separator* const separatored1 = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); edgBox->pack_start(*separatored1, Gtk::PACK_SHRINK, 2); - Gtk::HBox* const eddebox = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const eddebox = Gtk::manage(new Gtk::Box()); edgBox->pack_start(*eddebox); edgBox->pack_start(*medianlev); @@ -896,11 +900,11 @@ Wavelet::Wavelet() : edgeampli->setAdjusterListener(this); edgBox->pack_start(*edgeampli); - Gtk::VBox* const ctboxES = Gtk::manage(new Gtk::VBox()); + Gtk::Box* const ctboxES = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); ctboxES->set_spacing(2); - Gtk::HBox* const ctboxNP = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const ctboxNP = Gtk::manage(new Gtk::Box()); ctboxNP->pack_start(*labmNP, Gtk::PACK_SHRINK, 1); NPmethod->append(M("TP_WAVELET_NPNONE")); @@ -1040,10 +1044,10 @@ Wavelet::Wavelet() : chromaFrame->add(*chromaBox); Gtk::Label* const labmTM = Gtk::manage(new Gtk::Label(M("TP_WAVELET_TMTYPE") + ":")); - Gtk::HBox* const ctboxTM = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const ctboxTM = Gtk::manage(new Gtk::Box()); ctboxTM->pack_start(*labmTM, Gtk::PACK_SHRINK, 1); -// Gtk::HSeparator* const separatorR0 = Gtk::manage(new Gtk::HSeparator()); +// Gtk::Separator* const separatorR0 = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); // resBox->pack_start(*separatorR0, Gtk::PACK_SHRINK, 2); TMmethod->append(M("TP_WAVELET_COMPCONT")); @@ -1077,7 +1081,7 @@ Wavelet::Wavelet() : contFrame->add(*contBox); resBox->pack_start(*contFrame); -// Gtk::HSeparator* const separatorR1 = Gtk::manage(new Gtk::HSeparator()); +// Gtk::Separator* const separatorR1 = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); // resBox->pack_start(*separatorR1, Gtk::PACK_SHRINK, 2); hueskin2->set_tooltip_markup(M("TP_WAVELET_HUESKY_TOOLTIP")); @@ -1104,11 +1108,11 @@ Wavelet::Wavelet() : resBox->pack_start(*curveEditorRES, Gtk::PACK_SHRINK, 4); // Toning and Color Balance - Gtk::HSeparator* const separatorCB = Gtk::manage(new Gtk::HSeparator()); + Gtk::Separator* const separatorCB = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); - Gtk::VBox* const chanMixerHLBox = Gtk::manage(new Gtk::VBox()); - Gtk::VBox* const chanMixerMidBox = Gtk::manage(new Gtk::VBox()); - Gtk::VBox* const chanMixerShadowsBox = Gtk::manage(new Gtk::VBox()); + Gtk::Box* const chanMixerHLBox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + Gtk::Box* const chanMixerMidBox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); + Gtk::Box* const chanMixerShadowsBox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); cbenab->set_active(true); cbenabConn = cbenab->signal_toggled().connect(sigc::mem_fun(*this, &Wavelet::cbenabToggled)); @@ -1172,14 +1176,14 @@ Wavelet::Wavelet() : resBox->pack_start(*neutrHBox); // Final Touchup - // Gtk::VBox* const ctboxBA = Gtk::manage(new Gtk::VBox()); + // Gtk::Box* const ctboxBA = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); ctboxBA->set_spacing(2); - //Gtk::HSeparator *separatorfin = Gtk::manage (new Gtk::HSeparator()); + //Gtk::Separator *separatorfin = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); //ctboxBA->pack_start(*separatorfin, Gtk::PACK_SHRINK, 2); Gtk::Label* const labmBA = Gtk::manage(new Gtk::Label(M("TP_WAVELET_BATYPE") + ":")); - Gtk::HBox* const ctboxFI = Gtk::manage(new Gtk::HBox()); + Gtk::Box* const ctboxFI = Gtk::manage(new Gtk::Box()); ctboxFI->pack_start(*labmBA, Gtk::PACK_SHRINK, 1); BAmethod->append(M("TP_WAVELET_BANONE")); @@ -1211,7 +1215,7 @@ Wavelet::Wavelet() : iter->set_tooltip_text(M("TP_WAVELET_ITER_TOOLTIP")); sigmadir->setAdjusterListener(this); -// Gtk::HSeparator* const separatorbalend = Gtk::manage(new Gtk::HSeparator()); +// Gtk::Separator* const separatorbalend = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); opacityCurveEditorWL->setCurveListener(this); @@ -3254,9 +3258,9 @@ void Wavelet::convertParamToNormal() levelsigm->setValue(def_params.levelsigm); leveldenoise->setValue(def_params.leveldenoise); limden->setValue(def_params.limden); - + thrden->setValue(def_params.thrden); // quamethod->set_active(0); -// sigm->setValue(def_params.sigm); + sigm->setValue(def_params.sigm); //toning exptoning->setEnabled(def_params.exptoning); //gamut @@ -3309,12 +3313,12 @@ void Wavelet::updateGUIToMode(int mode) denHBox->hide(); mixHBox->hide(); sliHBox->hide(); - sigm->show(); + sigm->hide(); levelsigm->hide(); CurveEditorwavnoiseh->hide(); CurveEditorwavnoise->hide(); // levden->hide(); - thrden->show(); + thrden->hide(); leveldenoise->hide(); limden->hide(); } else { diff --git a/rtgui/wavelet.h b/rtgui/wavelet.h index c7e002a64..bdbf7bbc3 100644 --- a/rtgui/wavelet.h +++ b/rtgui/wavelet.h @@ -197,8 +197,8 @@ private: CurveEditorGroup* const curveEditorbl; CurveEditorGroup* const curveEditorRES; CurveEditorGroup* const curveEditorGAM; - Gtk::HSeparator* const separatorNeutral; - Gtk::HSeparator* const separatoredge; + Gtk::Separator* const separatorNeutral; + Gtk::Separator* const separatoredge; CurveEditorGroup* const opaCurveEditorG; FlatCurveEditor* opacityShapeRG; @@ -387,14 +387,14 @@ private: MyExpander* const expclari; MyExpander* const expbl; - Gtk::HBox* const neutrHBox; - Gtk::HBox* const usharpHBox; - Gtk::HBox* const ctboxch; - Gtk::HBox* const quaHBox; - Gtk::HBox* const sliHBox; - Gtk::HBox* const denHBox; - Gtk::HBox* const mixHBox; - Gtk::VBox* const ctboxBA;// = Gtk::manage(new Gtk::VBox()); + Gtk::Box* const neutrHBox; + Gtk::Box* const usharpHBox; + Gtk::Box* const ctboxch; + Gtk::Box* const quaHBox; + Gtk::Box* const sliHBox; + Gtk::Box* const denHBox; + Gtk::Box* const mixHBox; + Gtk::Box* const ctboxBA;// = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); sigc::connection enableChromaConn, enableContrastConn, enableEdgeConn, enabletmConn, enableFinalConn, enableclariConn; sigc::connection enableNoiseConn, enableResidConn, enableToningConn; diff --git a/rtgui/whitebalance.cc b/rtgui/whitebalance.cc index 5d1c907df..ba8ad6157 100644 --- a/rtgui/whitebalance.cc +++ b/rtgui/whitebalance.cc @@ -311,7 +311,7 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB spotgrid->attach (*wbsizehelper, 2, 0, 1, 1); pack_start (*spotgrid, Gtk::PACK_SHRINK, 0 ); - Gtk::HSeparator *separator = Gtk::manage (new Gtk::HSeparator()); + Gtk::Separator *separator = Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); separator->get_style_context()->add_class("grid-row-separator"); pack_start (*separator, Gtk::PACK_SHRINK, 0); @@ -341,7 +341,7 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB equal->show (); tempBias->show (); - /* Gtk::HBox* boxgreen = Gtk::manage (new Gtk::HBox ()); + /* Gtk::Box* boxgreen = Gtk::manage (new Gtk::Box ()); boxgreen->show (); boxgreen->pack_start(*igreenL); diff --git a/rtgui/xtransprocess.cc b/rtgui/xtransprocess.cc index db63c68be..89fd0f8a4 100644 --- a/rtgui/xtransprocess.cc +++ b/rtgui/xtransprocess.cc @@ -34,7 +34,7 @@ XTransProcess::XTransProcess () : FoldableToolPanel(this, "xtransprocess", M("TP EvDemosaicContrast = m->newEvent(DEMOSAIC, "HISTORY_MSG_DUALDEMOSAIC_CONTRAST"); EvDemosaicAutoContrast = m->newEvent(DEMOSAIC, "HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST"); - Gtk::HBox* hb1 = Gtk::manage (new Gtk::HBox ()); + Gtk::Box* hb1 = Gtk::manage (new Gtk::Box ()); hb1->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_RAW_DMETHOD") + ": ")), Gtk::PACK_SHRINK, 4); method = Gtk::manage (new MyComboBoxText ()); @@ -72,7 +72,7 @@ XTransProcess::XTransProcess () : FoldableToolPanel(this, "xtransprocess", M("TP hb1->pack_end (*method, Gtk::PACK_EXPAND_WIDGET, 4); pack_start( *hb1, Gtk::PACK_SHRINK, 4); - dualDemosaicOptions = Gtk::manage (new Gtk::VBox ()); + dualDemosaicOptions = Gtk::manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); dualDemosaicContrast = Gtk::manage(new Adjuster (M("TP_RAW_DUALDEMOSAICCONTRAST"), 0, 100, 1, 20)); dualDemosaicContrast->setAdjusterListener (this); @@ -85,7 +85,7 @@ XTransProcess::XTransProcess () : FoldableToolPanel(this, "xtransprocess", M("TP dualDemosaicOptions->pack_start(*dualDemosaicContrast); pack_start( *dualDemosaicOptions, Gtk::PACK_SHRINK, 4); - borderbox = Gtk::manage(new Gtk::HBox()); + borderbox = Gtk::manage(new Gtk::Box()); border = Gtk::manage(new Adjuster(M("TP_RAW_BORDER"), 0, 16, 1, 7)); border->setAdjusterListener (this); @@ -95,7 +95,7 @@ XTransProcess::XTransProcess () : FoldableToolPanel(this, "xtransprocess", M("TP borderbox->pack_start(*border); pack_start(*borderbox, Gtk::PACK_SHRINK, 4); - pack_start( *Gtk::manage( new Gtk::HSeparator()), Gtk::PACK_SHRINK, 0 ); + pack_start( *Gtk::manage( new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)), Gtk::PACK_SHRINK, 0 ); ccSteps = Gtk::manage (new Adjuster (M("TP_RAW_FALSECOLOR"), 0, 5, 1, 0 )); ccSteps->setAdjusterListener (this); diff --git a/rtgui/xtransprocess.h b/rtgui/xtransprocess.h index fc0dd7502..4725f4a6d 100644 --- a/rtgui/xtransprocess.h +++ b/rtgui/xtransprocess.h @@ -36,10 +36,10 @@ class XTransProcess final : protected: MyComboBoxText* method; - Gtk::HBox* borderbox; + Gtk::Box* borderbox; Adjuster* border; Adjuster* ccSteps; - Gtk::VBox *dualDemosaicOptions; + Gtk::Box* dualDemosaicOptions; Adjuster* dualDemosaicContrast; bool lastAutoContrast;