Merge branch 'dev' into blur-flat-regions
This commit is contained in:
BIN
rtdata/images/themed/png/dark/curve-catmullrom-small.png
Normal file
BIN
rtdata/images/themed/png/dark/curve-catmullrom-small.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 430 B |
BIN
rtdata/images/themed/png/dark/curve-catmullrom.png
Normal file
BIN
rtdata/images/themed/png/dark/curve-catmullrom.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 463 B |
BIN
rtdata/images/themed/png/light/curve-catmullrom-small.png
Normal file
BIN
rtdata/images/themed/png/light/curve-catmullrom-small.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 437 B |
BIN
rtdata/images/themed/png/light/curve-catmullrom.png
Normal file
BIN
rtdata/images/themed/png/light/curve-catmullrom.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 490 B |
159
rtdata/images/themed/svg/curve-catmullrom-small.svg
Normal file
159
rtdata/images/themed/svg/curve-catmullrom-small.svg
Normal file
@@ -0,0 +1,159 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="16"
|
||||
height="16"
|
||||
viewBox="0 0 16 16"
|
||||
version="1.1"
|
||||
id="SVGRoot"
|
||||
inkscape:export-filename="/tmp/template.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:version="0.92.2 2405546, 2018-03-11"
|
||||
sodipodi:docname="curve-catmullrom-small.svg">
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#E0E1E2"
|
||||
bordercolor="#666768"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="50.5"
|
||||
inkscape:cx="8"
|
||||
inkscape:cy="8"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:pagecheckerboard="false"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:bbox-nodes="true"
|
||||
inkscape:snap-others="false"
|
||||
inkscape:object-nodes="true"
|
||||
inkscape:snap-grids="true"
|
||||
inkscape:snap-bbox-midpoints="false"
|
||||
inkscape:object-paths="true"
|
||||
inkscape:snap-intersection-paths="true"
|
||||
inkscape:snap-smooth-nodes="true"
|
||||
inkscape:snap-midpoints="true"
|
||||
inkscape:snap-object-midpoints="true"
|
||||
inkscape:snap-nodes="false"
|
||||
showborder="true"
|
||||
borderlayer="false"
|
||||
inkscape:showpageshadow="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid1374"
|
||||
originx="1"
|
||||
originy="1"
|
||||
empspacing="7"
|
||||
dotted="false" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs815" />
|
||||
<metadata
|
||||
id="metadata818">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Maciej Dworak</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title />
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:description>RawTherapee icon.</dc:description>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="Layer 1"
|
||||
transform="translate(0,-8)">
|
||||
<circle
|
||||
r="2.1000001"
|
||||
cy="-7.5"
|
||||
cx="10.5"
|
||||
id="circle3732"
|
||||
style="opacity:0.7;fill:#2a7fff;fill-opacity:1;fill-rule:nonzero;stroke:#2a7fff;stroke-width:0.80000007;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:2.00314951;stroke-opacity:1;paint-order:normal" />
|
||||
<circle
|
||||
style="opacity:0.7;fill:#2a7fff;fill-opacity:1;fill-rule:nonzero;stroke:#2a7fff;stroke-width:0.80000007;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:2.00314951;stroke-opacity:1;paint-order:normal"
|
||||
id="circle3734"
|
||||
cx="6.5"
|
||||
cy="0.5"
|
||||
r="2.1000001" />
|
||||
<path
|
||||
sodipodi:nodetypes="caac"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3736"
|
||||
d="M 2,2 C 2,2 5.336352,1.536652 6.539604,0.490099 8.782506,-1.46071 8.57285,-5.236736 10.5,-7.5 11.429492,-8.591604 14,-10 14,-10"
|
||||
style="opacity:0.9;vector-effect:none;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#2a7fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
|
||||
<circle
|
||||
r="2.6000001"
|
||||
cy="-8"
|
||||
cx="30"
|
||||
id="circle4393"
|
||||
style="opacity:0.7;fill:#2a7fff;fill-opacity:1;fill-rule:nonzero;stroke:#2a7fff;stroke-width:0.80000007;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:2.00314951;stroke-opacity:1;paint-order:normal" />
|
||||
<circle
|
||||
style="opacity:0.7;fill:#2a7fff;fill-opacity:1;fill-rule:nonzero;stroke:#2a7fff;stroke-width:0.80000007;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:2.00314951;stroke-opacity:1;paint-order:normal"
|
||||
id="circle4395"
|
||||
cx="26"
|
||||
cy="0"
|
||||
r="2.6000001" />
|
||||
<path
|
||||
sodipodi:nodetypes="caac"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4397"
|
||||
d="m 22,2 c 0,0 2.945907,-0.945907 4,-2 2.108185,-2.108185 1.891815,-5.891815 4,-8 1.054093,-1.054093 4,-2 4,-2"
|
||||
style="opacity:0.9;vector-effect:none;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#2a7fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
|
||||
<path
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.7;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#2a7fff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000007;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:2.00314951;stroke-opacity:1;paint-order:normal;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 13.957617,9.0010308 a 0.99703958,0.99930081 0 0 0 -0.445902,0.128803 c 0,0 -0.669824,0.3673832 -1.458413,0.8762522 -0.134886,0.08704 -0.27712,0.195722 -0.416691,0.288832 -0.342359,-0.177992 -0.724456,-0.288832 -1.135186,-0.288832 -1.3717587,0 -2.4923491,1.123128 -2.4923491,2.498002 0,0.549878 0.1839155,1.055935 0.4867858,1.469528 -0.3263981,0.787192 -0.5622541,1.587644 -0.8002735,2.336023 -0.202987,0.638199 -0.4127132,1.221238 -0.6522978,1.750553 -0.1713441,-0.03761 -0.3473737,-0.0605 -0.5296243,-0.0605 -1.3717594,0 -2.4923497,1.123128 -2.4923497,2.498002 0,0.01 0.00179,0.0193 0.00189,0.02928 -0.1454635,0.04365 -0.2824131,0.102887 -0.424477,0.138561 -0.9240894,0.232048 -1.7076443,0.341524 -1.7076443,0.341524 a 0.99703958,0.99930081 0 1 0 0.2726033,1.978885 c 0,0 0.8810157,-0.121637 1.9198869,-0.382506 0.2647274,-0.06648 0.5384671,-0.139215 0.8158557,-0.220527 0.4365799,0.376198 0.996262,0.612788 1.6142351,0.612788 1.3717594,0 2.4923497,-1.123127 2.4923497,-2.498002 0,-0.438945 -0.1230822,-0.846798 -0.3232278,-1.206066 0.3946885,-0.776236 0.6653676,-1.595807 0.9132168,-2.375054 0.2181704,-0.685981 0.4272682,-1.338908 0.6620272,-1.939855 0.08137,0.0081 0.159969,0.02537 0.243393,0.02537 1.37176,0 2.49235,-1.123128 2.49235,-2.498002 0,-0.226332 -0.0405,-0.44107 -0.09736,-0.649871 0.08068,-0.05425 0.158822,-0.11703 0.237551,-0.167834 0.724416,-0.467449 1.33575,-0.804045 1.33575,-0.804045 A 0.99703958,0.99930081 0 0 0 13.957617,9.0010308 Z"
|
||||
id="circle4399"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.7;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#2a7fff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000007;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:2.00314951;stroke-opacity:1;paint-order:normal;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 33.95898,8.996094 a 1.0001,1.0001 0 0 0 -0.26562,0.05273 c 0,0 -0.77575,0.247246 -1.68945,0.634765 -0.026,0.01104 -0.0539,0.02398 -0.0801,0.03516 C 31.40115,9.277093 30.735,9 30,9 c -1.65212,0 -3,1.347884 -3,3 0,0.717059 0.26501,1.367657 0.6875,1.884766 -0.24334,0.608424 -0.45019,1.221586 -0.63867,1.808593 -0.15423,0.480329 -0.31093,0.93057 -0.47461,1.363282 C 26.38812,17.020277 26.19646,17 26,17 c -1.65212,0 -3,1.347884 -3,3 0,0.183819 0.0228,0.362261 0.0547,0.537109 -0.74094,0.305136 -1.36133,0.511719 -1.36133,0.511719 a 1.0001,1.0001 0 1 0 0.61328,1.902344 c 0,0 0.77575,-0.247247 1.68945,-0.634766 0.026,-0.01103 0.0539,-0.02398 0.0801,-0.03516 C 24.59885,22.722907 25.265,23 26,23 c 1.65212,0 3,-1.347884 3,-3 0,-0.717059 -0.26501,-1.367657 -0.6875,-1.884766 0.24334,-0.608424 0.45019,-1.221586 0.63867,-1.808593 0.15423,-0.480329 0.31093,-0.93057 0.47461,-1.363282 C 29.61188,14.979723 29.80354,15 30,15 c 1.65212,0 3,-1.347884 3,-3 0,-0.183819 -0.0228,-0.362261 -0.0547,-0.537109 0.74094,-0.305136 1.36133,-0.511719 1.36133,-0.511719 a 1.0001,1.0001 0 0 0 -0.24805,-1.955078 1.0001,1.0001 0 0 0 -0.0996,0 z"
|
||||
id="circle4405"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 11 KiB |
131
rtdata/images/themed/svg/curve-catmullrom.svg
Normal file
131
rtdata/images/themed/svg/curve-catmullrom.svg
Normal file
@@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="24px"
|
||||
height="24px"
|
||||
viewBox="0 0 24 24"
|
||||
version="1.1"
|
||||
id="SVGRoot"
|
||||
inkscape:export-filename="/tmp/template.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:version="0.92.2 2405546, 2018-03-11"
|
||||
sodipodi:docname="curve-catmullrom.svg">
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#E0E1E2"
|
||||
bordercolor="#666768"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="33.666667"
|
||||
inkscape:cx="12"
|
||||
inkscape:cy="12"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:pagecheckerboard="false"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:bbox-nodes="true"
|
||||
inkscape:snap-others="true"
|
||||
inkscape:object-nodes="true"
|
||||
inkscape:snap-grids="true"
|
||||
inkscape:snap-bbox-midpoints="true"
|
||||
inkscape:snap-intersection-paths="false"
|
||||
inkscape:object-paths="true"
|
||||
inkscape:snap-smooth-nodes="false"
|
||||
inkscape:snap-midpoints="false"
|
||||
inkscape:snap-object-midpoints="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid1374"
|
||||
originx="1"
|
||||
originy="1"
|
||||
empspacing="11"
|
||||
dotted="false" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs815" />
|
||||
<metadata
|
||||
id="metadata818">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Maciej Dworak</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title />
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:description>RawTherapee icon.</dc:description>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="Layer 1">
|
||||
<path
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.7;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#2a7fff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 21.961385,1.0008339 a 0.99786946,0.99965853 0 0 0 -0.446268,0.1249448 c 0,0 -1.320539,0.7149725 -2.872486,1.7101822 -0.726935,0.4661586 -1.500431,0.9886892 -2.23134,1.5422877 -0.422327,-0.229707 -0.896874,-0.3728822 -1.407011,-0.3728822 -1.641341,0 -2.993309,1.3543922 -2.993309,2.9986757 0,0.7218688 0.270322,1.3795002 0.701557,1.8995517 -0.64861,1.4824552 -1.035206,3.0616262 -1.445987,4.5448682 -0.377799,1.364155 -0.775111,2.628847 -1.331009,3.713203 -0.2915113,-0.09608 -0.5961135,-0.162037 -0.9178702,-0.162037 -1.6413407,0 -2.9933091,1.354392 -2.9933091,2.998676 0,0.08674 0.017964,0.168817 0.025334,0.253794 -0.4669772,0.137993 -0.9444077,0.264577 -1.4089603,0.357264 -1.453702,0.290044 -2.689301,0.392405 -2.689301,0.392405 a 0.99786946,0.99965853 0 1 0 0.1636965,1.991308 c 0,0 1.336573,-0.108641 2.9153582,-0.423641 0.6045648,-0.120624 1.2415233,-0.274321 1.8708182,-0.458782 0.543473,0.546411 1.293738,0.886327 2.1163631,0.886327 1.6413416,0 2.9933096,-1.354391 2.9933096,-2.998675 0,-0.580391 -0.175599,-1.119993 -0.465756,-1.581333 0.775824,-1.387713 1.230097,-2.936322 1.644762,-4.433589 0.394368,-1.423985 0.765718,-2.808151 1.268648,-4.0353276 0.177472,0.033413 0.359151,0.054663 0.545655,0.054663 1.641341,0 2.993309,-1.3543916 2.993309,-2.998675 0,-0.3989768 -0.08399,-0.7787742 -0.228006,-1.1284079 C 18.400516,5.4015772 19.076546,4.930379 19.718352,4.518811 21.202494,3.5670816 22.462218,2.8867193 22.462218,2.8867193 A 0.99786946,0.99965853 0 0 0 21.961385,1.0008339 Z"
|
||||
id="circle817"
|
||||
inkscape:connector-curvature="0" />
|
||||
<circle
|
||||
style="opacity:0.7;fill:#2a7fff;fill-opacity:1;stroke:#2a7fff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
id="circle5141"
|
||||
cx="-25"
|
||||
cy="7"
|
||||
r="2" />
|
||||
<circle
|
||||
r="2"
|
||||
cy="20"
|
||||
cx="-31"
|
||||
id="circle5143"
|
||||
style="opacity:0.7;fill:#2a7fff;fill-opacity:1;stroke:#2a7fff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal" />
|
||||
<path
|
||||
sodipodi:nodetypes="caac"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5145"
|
||||
d="m -38,22 c 0,0 5.157064,-0.421242 7,-2 3.62451,-3.104949 2.956624,-9.323638 6,-13 1.828498,-2.2088042 7,-5 7,-5"
|
||||
style="opacity:0.7;vector-effect:none;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#2a7fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:2.00314951;stroke-opacity:1;paint-order:normal" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 7.1 KiB |
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
This file is part of RawTherapee.
|
||||
|
||||
Copyright (c) 2016-2018 TooWaBoo
|
||||
Version 2.98
|
||||
Version 3.00
|
||||
|
||||
RawTherapee is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -1191,7 +1191,7 @@ window.csd:not(.fullscreen) #MainNotebook > header.top {
|
||||
/*** end ***************************************************************************************/
|
||||
|
||||
/*** Context & popups menus *****************************************************************************/
|
||||
.popup > decoration {
|
||||
.csd.popup > decoration {
|
||||
background-image: none;
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
@@ -1245,47 +1245,47 @@ menu image:not(.dummy),
|
||||
}
|
||||
|
||||
/*** Selection popup list (used in filechooser) ***/
|
||||
entry > window > frame {
|
||||
entry > window > frame:not(.dummy) {
|
||||
background-color: @bg-dark-grey;
|
||||
padding: 0;
|
||||
}
|
||||
entry > window > frame > border {
|
||||
entry > window > frame > border:not(.dummy) {
|
||||
background-color: @bg-dark-grey;
|
||||
padding: 0.083333333333333333em;
|
||||
border: 0.083333333333333333em solid @accent-color;
|
||||
}
|
||||
entry > window > frame > border {
|
||||
margin: 0.083333333333333333em;
|
||||
border: 0.083333333333333333em solid @accent-color;
|
||||
}
|
||||
/* end */
|
||||
|
||||
/*** end ***************************************************************************************/
|
||||
|
||||
/*** Popover *** Context menu filechooser ******************************************************/
|
||||
|
||||
popover.background {
|
||||
popover {
|
||||
box-shadow: 0 1px 6px 1px rgba(0, 0, 0, 0.5), 0 0 0 1px @bg-dark-grey;
|
||||
}
|
||||
popover {
|
||||
background-color: @bg-dark-grey;
|
||||
border: 0.083333333333333333em solid @accent-color;
|
||||
border-radius: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
box-shadow: 0 1px 6px 1px rgba(0, 0, 0, 0.5), 0 0 0 1px @bg-dark-grey;
|
||||
}
|
||||
popover.background > box {
|
||||
popover > box {
|
||||
padding: 0;
|
||||
margin: -9px;
|
||||
}
|
||||
popover.background modelbutton {
|
||||
popover modelbutton {
|
||||
min-height: 2em;
|
||||
padding: 0 0.416666666666666666em;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
popover.background label {
|
||||
popover label {
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
popover.background modelbutton:hover label,
|
||||
popover.background modelbutton:hover {
|
||||
popover modelbutton:hover label,
|
||||
popover modelbutton:hover {
|
||||
background-color: @accent-color;
|
||||
color: @text-hl-color;
|
||||
}
|
||||
@@ -2042,7 +2042,7 @@ entry:focus > selection {
|
||||
/*** end ***************************************************************************************/
|
||||
|
||||
/*** Window Layout *****************************************************************************/
|
||||
:not(.popup):not(tooltip) > decoration {
|
||||
.csd:not(.popup):not(tooltip) > decoration {
|
||||
background-color: @winHeaderbar;
|
||||
background-image: none;
|
||||
border-radius: 0.416666666666666666em 0.416666666666666666em 0 0;
|
||||
@@ -2057,14 +2057,10 @@ headerbar {
|
||||
background-image: linear-gradient(shade(@winHeaderbar,1.14), shade(@winHeaderbar,.86));
|
||||
border-bottom: 0.083333333333333333em solid @bg-dark-grey;
|
||||
border-radius: 0.416666666666666666em 0.416666666666666666em 0 0;
|
||||
min-height: 2.333333333333333333em;
|
||||
min-height: 2em;
|
||||
padding: 0.083333333333333333em 0.416666666666666666em 0;
|
||||
margin: 0;
|
||||
}
|
||||
messagedialog headerbar {
|
||||
min-height: 2em;
|
||||
|
||||
}
|
||||
headerbar .title{
|
||||
color: @winTitle;
|
||||
}
|
||||
@@ -2076,7 +2072,7 @@ headerbar .title{
|
||||
/**/
|
||||
|
||||
/* Window in background */
|
||||
:not(.popup):not(tooltip) > decoration:backdrop {
|
||||
.csd:not(.popup):not(tooltip) > decoration:backdrop {
|
||||
box-shadow: 0 0.25em 0.75em 0.083333333333333333em rgba(0, 0, 0, 0.3), 0 0 0 0.083333333333333333em @bg-dark-grey;
|
||||
}
|
||||
headerbar:backdrop {
|
||||
|
@@ -20,6 +20,7 @@
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
#ifdef _OPENMP
|
||||
@@ -31,7 +32,6 @@
|
||||
#include "rt_algo.h"
|
||||
#include "rt_math.h"
|
||||
#include "sleef.c"
|
||||
#include "jaggedarray.h"
|
||||
|
||||
namespace {
|
||||
float calcBlendFactor(float val, float threshold) {
|
||||
@@ -51,6 +51,113 @@ vfloat calcBlendFactor(vfloat valv, vfloat thresholdv) {
|
||||
return onev / (onev + xexpf(c16v - c16v * valv / thresholdv));
|
||||
}
|
||||
#endif
|
||||
|
||||
float tileAverage(float **data, size_t tileY, size_t tileX, size_t tilesize) {
|
||||
|
||||
float avg = 0.f;
|
||||
#ifdef __SSE2__
|
||||
vfloat avgv = ZEROV;
|
||||
#endif
|
||||
for (std::size_t y = tileY; y < tileY + tilesize; ++y) {
|
||||
std::size_t x = tileX;
|
||||
#ifdef __SSE2__
|
||||
for (; x < tileX + tilesize - 3; x += 4) {
|
||||
avgv += LVFU(data[y][x]);
|
||||
}
|
||||
#endif
|
||||
for (; x < tileX + tilesize; ++x) {
|
||||
avg += data[y][x];
|
||||
}
|
||||
}
|
||||
#ifdef __SSE2__
|
||||
avg += vhadd(avgv);
|
||||
#endif
|
||||
return avg / rtengine::SQR(tilesize);
|
||||
}
|
||||
|
||||
float tileVariance(float **data, size_t tileY, size_t tileX, size_t tilesize, float avg) {
|
||||
|
||||
float var = 0.f;
|
||||
#ifdef __SSE2__
|
||||
vfloat varv = ZEROV;
|
||||
const vfloat avgv = F2V(avg);
|
||||
#endif
|
||||
for (std::size_t y = tileY; y < tileY + tilesize; ++y) {
|
||||
std::size_t x = tileX;
|
||||
#ifdef __SSE2__
|
||||
for (; x < tileX + tilesize - 3; x += 4) {
|
||||
varv += SQRV(LVFU(data[y][x]) - avgv);
|
||||
}
|
||||
#endif
|
||||
for (; x < tileX + tilesize; ++x) {
|
||||
var += rtengine::SQR(data[y][x] - avg);
|
||||
}
|
||||
}
|
||||
#ifdef __SSE2__
|
||||
var += vhadd(varv);
|
||||
#endif
|
||||
return var / (rtengine::SQR(tilesize) * avg);
|
||||
}
|
||||
|
||||
float calcContrastThreshold(float** luminance, int tileY, int tileX, int tilesize) {
|
||||
|
||||
constexpr float scale = 0.0625f / 327.68f;
|
||||
std::vector<std::vector<float>> blend(tilesize - 4, std::vector<float>(tilesize - 4));
|
||||
|
||||
#ifdef __SSE2__
|
||||
const vfloat scalev = F2V(scale);
|
||||
#endif
|
||||
|
||||
for(int j = tileY + 2; j < tileY + tilesize - 2; ++j) {
|
||||
int i = tileX + 2;
|
||||
#ifdef __SSE2__
|
||||
for(; i < tileX + tilesize - 5; i += 4) {
|
||||
vfloat contrastv = vsqrtf(SQRV(LVFU(luminance[j][i+1]) - LVFU(luminance[j][i-1])) + SQRV(LVFU(luminance[j+1][i]) - LVFU(luminance[j-1][i])) +
|
||||
SQRV(LVFU(luminance[j][i+2]) - LVFU(luminance[j][i-2])) + SQRV(LVFU(luminance[j+2][i]) - LVFU(luminance[j-2][i]))) * scalev;
|
||||
STVFU(blend[j - tileY - 2][i - tileX - 2], contrastv);
|
||||
}
|
||||
#endif
|
||||
for(; i < tileX + tilesize - 2; ++i) {
|
||||
|
||||
float contrast = sqrtf(rtengine::SQR(luminance[j][i+1] - luminance[j][i-1]) + rtengine::SQR(luminance[j+1][i] - luminance[j-1][i]) +
|
||||
rtengine::SQR(luminance[j][i+2] - luminance[j][i-2]) + rtengine::SQR(luminance[j+2][i] - luminance[j-2][i])) * scale;
|
||||
|
||||
blend[j - tileY - 2][i - tileX - 2] = contrast;
|
||||
}
|
||||
}
|
||||
|
||||
const float limit = rtengine::SQR(tilesize - 4) / 100.f;
|
||||
|
||||
int c;
|
||||
for (c = 1; c < 100; ++c) {
|
||||
const float contrastThreshold = c / 100.f;
|
||||
float sum = 0.f;
|
||||
#ifdef __SSE2__
|
||||
const vfloat contrastThresholdv = F2V(contrastThreshold);
|
||||
vfloat sumv = ZEROV;
|
||||
#endif
|
||||
|
||||
for(int j = 0; j < tilesize - 4; ++j) {
|
||||
int i = 0;
|
||||
#ifdef __SSE2__
|
||||
for(; i < tilesize - 7; i += 4) {
|
||||
sumv += calcBlendFactor(LVFU(blend[j][i]), contrastThresholdv);
|
||||
}
|
||||
#endif
|
||||
for(; i < tilesize - 4; ++i) {
|
||||
sum += calcBlendFactor(blend[j][i], contrastThreshold);
|
||||
}
|
||||
}
|
||||
#ifdef __SSE2__
|
||||
sum += vhadd(sumv);
|
||||
#endif
|
||||
if (sum <= limit) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return c / 100.f;
|
||||
}
|
||||
}
|
||||
|
||||
namespace rtengine
|
||||
@@ -194,230 +301,173 @@ void findMinMaxPercentile(const float* data, size_t size, float minPrct, float&
|
||||
|
||||
void buildBlendMask(float** luminance, float **blend, int W, int H, float &contrastThreshold, float amount, bool autoContrast) {
|
||||
|
||||
if(contrastThreshold == 0.f && !autoContrast) {
|
||||
if (autoContrast) {
|
||||
constexpr float minLuminance = 2000.f;
|
||||
constexpr float maxLuminance = 20000.f;
|
||||
constexpr float minTileVariance = 0.5f;
|
||||
for (int pass = 0; pass < 2; ++pass) {
|
||||
const int tilesize = 80 / (pass + 1);
|
||||
const int skip = pass == 0 ? tilesize : tilesize / 4;
|
||||
const int numTilesW = W / skip - 3 * pass;
|
||||
const int numTilesH = H / skip - 3 * pass;
|
||||
std::vector<std::vector<float>> variances(numTilesH, std::vector<float>(numTilesW));
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for schedule(dynamic)
|
||||
#endif
|
||||
for (int i = 0; i < numTilesH; ++i) {
|
||||
const int tileY = i * skip;
|
||||
for (int j = 0; j < numTilesW; ++j) {
|
||||
const int tileX = j * skip;
|
||||
const float avg = tileAverage(luminance, tileY, tileX, tilesize);
|
||||
if (avg < minLuminance || avg > maxLuminance) {
|
||||
// too dark or too bright => skip the tile
|
||||
variances[i][j] = RT_INFINITY_F;
|
||||
continue;
|
||||
} else {
|
||||
variances[i][j] = tileVariance(luminance, tileY, tileX, tilesize, avg);
|
||||
// exclude tiles with a variance less than minTileVariance
|
||||
variances[i][j] = variances[i][j] < minTileVariance ? RT_INFINITY_F : variances[i][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float minvar = RT_INFINITY_F;
|
||||
int minI = 0, minJ = 0;
|
||||
for (int i = 0; i < numTilesH; ++i) {
|
||||
for (int j = 0; j < numTilesW; ++j) {
|
||||
if (variances[i][j] < minvar) {
|
||||
minvar = variances[i][j];
|
||||
minI = i;
|
||||
minJ = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (minvar <= 1.f || pass == 1) {
|
||||
const int minY = skip * minI;
|
||||
const int minX = skip * minJ;
|
||||
if (pass == 0) {
|
||||
// a variance <= 1 means we already found a flat region and can skip second pass
|
||||
contrastThreshold = calcContrastThreshold(luminance, minY, minX, tilesize);
|
||||
break;
|
||||
} else {
|
||||
// in second pass we allow a variance of 4
|
||||
// we additionally scan the tiles +-skip pixels around the best tile from pass 2
|
||||
// Means we scan (2 * skip + 1)^2 tiles in this step to get a better hit rate
|
||||
// fortunately the scan is quite fast, so we use only one core and don't parallelize
|
||||
const int topLeftYStart = std::max(minY - skip, 0);
|
||||
const int topLeftXStart = std::max(minX - skip, 0);
|
||||
const int topLeftYEnd = std::min(minY + skip, H - tilesize);
|
||||
const int topLeftXEnd = std::min(minX + skip, W - tilesize);
|
||||
const int numTilesH = topLeftYEnd - topLeftYStart + 1;
|
||||
const int numTilesW = topLeftXEnd - topLeftXStart + 1;
|
||||
|
||||
std::vector<std::vector<float>> variances(numTilesH, std::vector<float>(numTilesW));
|
||||
for (int i = 0; i < numTilesH; ++i) {
|
||||
const int tileY = topLeftYStart + i;
|
||||
for (int j = 0; j < numTilesW; ++j) {
|
||||
const int tileX = topLeftXStart + j;
|
||||
const float avg = tileAverage(luminance, tileY, tileX, tilesize);
|
||||
|
||||
if (avg < minLuminance || avg > maxLuminance) {
|
||||
// too dark or too bright => skip the tile
|
||||
variances[i][j] = RT_INFINITY_F;
|
||||
continue;
|
||||
} else {
|
||||
variances[i][j] = tileVariance(luminance, tileY, tileX, tilesize, avg);
|
||||
// exclude tiles with a variance less than minTileVariance
|
||||
variances[i][j] = variances[i][j] < minTileVariance ? RT_INFINITY_F : variances[i][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float minvar = RT_INFINITY_F;
|
||||
int minI = 0, minJ = 0;
|
||||
for (int i = 0; i < numTilesH; ++i) {
|
||||
for (int j = 0; j < numTilesW; ++j) {
|
||||
if (variances[i][j] < minvar) {
|
||||
minvar = variances[i][j];
|
||||
minI = i;
|
||||
minJ = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
contrastThreshold = minvar <= 4.f ? calcContrastThreshold(luminance, topLeftYStart + minI, topLeftXStart + minJ, tilesize) : 0.f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(contrastThreshold == 0.f) {
|
||||
for(int j = 0; j < H; ++j) {
|
||||
for(int i = 0; i < W; ++i) {
|
||||
blend[j][i] = amount;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (autoContrast) {
|
||||
for (int pass = 0; pass < 2; ++pass) {
|
||||
const int tilesize = 80 / (pass + 1);
|
||||
const int skip = pass == 0 ? tilesize : tilesize / 4;
|
||||
const int numTilesW = W / skip - 3 * pass;
|
||||
const int numTilesH = H / skip - 3 * pass;
|
||||
std::vector<std::vector<float>> variances(numTilesH, std::vector<float>(numTilesW));
|
||||
|
||||
constexpr float scale = 0.0625f / 327.68f;
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for schedule(dynamic)
|
||||
#pragma omp parallel
|
||||
#endif
|
||||
for (int i = 0; i < numTilesH; ++i) {
|
||||
const int tileY = i * skip;
|
||||
for (int j = 0; j < numTilesW; ++j) {
|
||||
const int tileX = j * skip;
|
||||
{
|
||||
#ifdef __SSE2__
|
||||
vfloat avgv = ZEROV;
|
||||
for (int y = tileY; y < tileY + tilesize; ++y) {
|
||||
for (int x = tileX; x < tileX + tilesize; x += 4) {
|
||||
avgv += LVFU(luminance[y][x]);
|
||||
}
|
||||
}
|
||||
float avg = vhadd(avgv);
|
||||
#else
|
||||
float avg = 0.f;
|
||||
for (int y = tileY; y < tileY + tilesize; ++y) {
|
||||
for (int x = tileX; x < tileX + tilesize; ++x) {
|
||||
avg += luminance[y][x];
|
||||
}
|
||||
}
|
||||
const vfloat contrastThresholdv = F2V(contrastThreshold);
|
||||
const vfloat scalev = F2V(scale);
|
||||
const vfloat amountv = F2V(amount);
|
||||
#endif
|
||||
avg /= SQR(tilesize);
|
||||
if (avg < 2000.f || avg > 20000.f) {
|
||||
// too dark or too bright => skip the tile
|
||||
variances[i][j] = RT_INFINITY_F;
|
||||
continue;
|
||||
}
|
||||
#ifdef _OPENMP
|
||||
#pragma omp for schedule(dynamic,16)
|
||||
#endif
|
||||
|
||||
for(int j = 2; j < H - 2; ++j) {
|
||||
int i = 2;
|
||||
#ifdef __SSE2__
|
||||
vfloat varv = ZEROV;
|
||||
avgv = F2V(avg);
|
||||
for (int y = tileY; y < tileY + tilesize; ++y) {
|
||||
for (int x = tileX; x < tileX + tilesize; x +=4) {
|
||||
varv += SQRV(LVFU(luminance[y][x]) - avgv);
|
||||
}
|
||||
}
|
||||
float var = vhadd(varv);
|
||||
#else
|
||||
float var = 0.f;
|
||||
for (int y = tileY; y < tileY + tilesize; ++y) {
|
||||
for (int x = tileX; x < tileX + tilesize; ++x) {
|
||||
var += SQR(luminance[y][x] - avg);
|
||||
}
|
||||
}
|
||||
for(; i < W - 5; i += 4) {
|
||||
vfloat contrastv = vsqrtf(SQRV(LVFU(luminance[j][i+1]) - LVFU(luminance[j][i-1])) + SQRV(LVFU(luminance[j+1][i]) - LVFU(luminance[j-1][i])) +
|
||||
SQRV(LVFU(luminance[j][i+2]) - LVFU(luminance[j][i-2])) + SQRV(LVFU(luminance[j+2][i]) - LVFU(luminance[j-2][i]))) * scalev;
|
||||
|
||||
STVFU(blend[j][i], amountv * calcBlendFactor(contrastv, contrastThresholdv));
|
||||
}
|
||||
#endif
|
||||
var /= (SQR(tilesize) * avg);
|
||||
variances[i][j] = var;
|
||||
}
|
||||
}
|
||||
for(; i < W - 2; ++i) {
|
||||
|
||||
float minvar = RT_INFINITY_F;
|
||||
int minI = 0, minJ = 0;
|
||||
for (int i = 0; i < numTilesH; ++i) {
|
||||
for (int j = 0; j < numTilesW; ++j) {
|
||||
if (variances[i][j] < minvar) {
|
||||
minvar = variances[i][j];
|
||||
minI = i;
|
||||
minJ = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
float contrast = sqrtf(rtengine::SQR(luminance[j][i+1] - luminance[j][i-1]) + rtengine::SQR(luminance[j+1][i] - luminance[j-1][i]) +
|
||||
rtengine::SQR(luminance[j][i+2] - luminance[j][i-2]) + rtengine::SQR(luminance[j+2][i] - luminance[j-2][i])) * scale;
|
||||
|
||||
const int minY = skip * minI;
|
||||
const int minX = skip * minJ;
|
||||
|
||||
if (minvar <= 1.f || pass == 1) {
|
||||
// a variance <= 1 means we already found a flat region and can skip second pass
|
||||
// in second pass we allow a variance of 2
|
||||
JaggedArray<float> Lum(tilesize, tilesize);
|
||||
JaggedArray<float> Blend(tilesize, tilesize);
|
||||
for (int i = 0; i < tilesize; ++i) {
|
||||
for (int j = 0; j < tilesize; ++j) {
|
||||
Lum[i][j] = luminance[i + minY][j + minX];
|
||||
}
|
||||
}
|
||||
contrastThreshold = (pass == 0 || minvar <= 4.f) ? calcContrastThreshold(Lum, Blend, tilesize, tilesize) / 100.f : 0.f;
|
||||
break;
|
||||
blend[j][i] = amount * calcBlendFactor(contrast, contrastThreshold);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(contrastThreshold == 0.f) {
|
||||
for(int j = 0; j < H; ++j) {
|
||||
for(int i = 0; i < W; ++i) {
|
||||
blend[j][i] = amount;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
constexpr float scale = 0.0625f / 327.68f;
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel
|
||||
#pragma omp single
|
||||
#endif
|
||||
{
|
||||
#ifdef __SSE2__
|
||||
const vfloat contrastThresholdv = F2V(contrastThreshold);
|
||||
const vfloat scalev = F2V(scale);
|
||||
const vfloat amountv = F2V(amount);
|
||||
#endif
|
||||
#ifdef _OPENMP
|
||||
#pragma omp for schedule(dynamic,16)
|
||||
#endif
|
||||
|
||||
for(int j = 2; j < H - 2; ++j) {
|
||||
int i = 2;
|
||||
#ifdef __SSE2__
|
||||
for(; i < W - 5; i += 4) {
|
||||
vfloat contrastv = vsqrtf(SQRV(LVFU(luminance[j][i+1]) - LVFU(luminance[j][i-1])) + SQRV(LVFU(luminance[j+1][i]) - LVFU(luminance[j-1][i])) +
|
||||
SQRV(LVFU(luminance[j][i+2]) - LVFU(luminance[j][i-2])) + SQRV(LVFU(luminance[j+2][i]) - LVFU(luminance[j-2][i]))) * scalev;
|
||||
|
||||
STVFU(blend[j][i], amountv * calcBlendFactor(contrastv, contrastThresholdv));
|
||||
}
|
||||
#endif
|
||||
for(; i < W - 2; ++i) {
|
||||
|
||||
float contrast = sqrtf(rtengine::SQR(luminance[j][i+1] - luminance[j][i-1]) + rtengine::SQR(luminance[j+1][i] - luminance[j-1][i]) +
|
||||
rtengine::SQR(luminance[j][i+2] - luminance[j][i-2]) + rtengine::SQR(luminance[j+2][i] - luminance[j-2][i])) * scale;
|
||||
|
||||
blend[j][i] = amount * calcBlendFactor(contrast, contrastThreshold);
|
||||
// upper border
|
||||
for(int j = 0; j < 2; ++j) {
|
||||
for(int i = 2; i < W - 2; ++i) {
|
||||
blend[j][i] = blend[2][i];
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp single
|
||||
#endif
|
||||
{
|
||||
// upper border
|
||||
for(int j = 0; j < 2; ++j) {
|
||||
for(int i = 2; i < W - 2; ++i) {
|
||||
blend[j][i] = blend[2][i];
|
||||
}
|
||||
}
|
||||
// lower border
|
||||
for(int j = H - 2; j < H; ++j) {
|
||||
for(int i = 2; i < W - 2; ++i) {
|
||||
blend[j][i] = blend[H-3][i];
|
||||
}
|
||||
}
|
||||
for(int j = 0; j < H; ++j) {
|
||||
// left border
|
||||
blend[j][0] = blend[j][1] = blend[j][2];
|
||||
// right border
|
||||
blend[j][W - 2] = blend[j][W - 1] = blend[j][W - 3];
|
||||
// lower border
|
||||
for(int j = H - 2; j < H; ++j) {
|
||||
for(int i = 2; i < W - 2; ++i) {
|
||||
blend[j][i] = blend[H-3][i];
|
||||
}
|
||||
}
|
||||
|
||||
// blur blend mask to smooth transitions
|
||||
gaussianBlur(blend, blend, W, H, 2.0);
|
||||
for(int j = 0; j < H; ++j) {
|
||||
// left border
|
||||
blend[j][0] = blend[j][1] = blend[j][2];
|
||||
// right border
|
||||
blend[j][W - 2] = blend[j][W - 1] = blend[j][W - 3];
|
||||
}
|
||||
}
|
||||
|
||||
// blur blend mask to smooth transitions
|
||||
gaussianBlur(blend, blend, W, H, 2.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int calcContrastThreshold(float** luminance, float **blend, int W, int H) {
|
||||
|
||||
constexpr float scale = 0.0625f / 327.68f;
|
||||
|
||||
#ifdef __SSE2__
|
||||
const vfloat scalev = F2V(scale);
|
||||
#endif
|
||||
|
||||
for(int j = 2; j < H - 2; ++j) {
|
||||
int i = 2;
|
||||
#ifdef __SSE2__
|
||||
for(; i < W - 5; i += 4) {
|
||||
vfloat contrastv = vsqrtf(SQRV(LVFU(luminance[j][i+1]) - LVFU(luminance[j][i-1])) + SQRV(LVFU(luminance[j+1][i]) - LVFU(luminance[j-1][i])) +
|
||||
SQRV(LVFU(luminance[j][i+2]) - LVFU(luminance[j][i-2])) + SQRV(LVFU(luminance[j+2][i]) - LVFU(luminance[j-2][i]))) * scalev;
|
||||
STVFU(blend[j -2 ][i - 2], contrastv);
|
||||
}
|
||||
#endif
|
||||
for(; i < W - 2; ++i) {
|
||||
|
||||
float contrast = sqrtf(rtengine::SQR(luminance[j][i+1] - luminance[j][i-1]) + rtengine::SQR(luminance[j+1][i] - luminance[j-1][i]) +
|
||||
rtengine::SQR(luminance[j][i+2] - luminance[j][i-2]) + rtengine::SQR(luminance[j+2][i] - luminance[j-2][i])) * scale;
|
||||
|
||||
blend[j -2][i- 2] = contrast;
|
||||
}
|
||||
}
|
||||
|
||||
const float limit = (W - 4) * (H - 4) / 100.f;
|
||||
|
||||
int c;
|
||||
for (c = 1; c < 100; ++c) {
|
||||
const float contrastThreshold = c / 100.f;
|
||||
float sum = 0.f;
|
||||
#ifdef __SSE2__
|
||||
const vfloat contrastThresholdv = F2V(contrastThreshold);
|
||||
vfloat sumv = ZEROV;
|
||||
#endif
|
||||
|
||||
for(int j = 0; j < H - 4; ++j) {
|
||||
int i = 0;
|
||||
#ifdef __SSE2__
|
||||
for(; i < W - 7; i += 4) {
|
||||
sumv += calcBlendFactor(LVFU(blend[j][i]), contrastThresholdv);
|
||||
}
|
||||
#endif
|
||||
for(; i < W - 4; ++i) {
|
||||
sum += calcBlendFactor(blend[j][i], contrastThreshold);
|
||||
}
|
||||
}
|
||||
#ifdef __SSE2__
|
||||
sum += vhadd(sumv);
|
||||
#endif
|
||||
if (sum <= limit) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
@@ -25,5 +25,4 @@ namespace rtengine
|
||||
{
|
||||
void findMinMaxPercentile(const float* data, size_t size, float minPrct, float& minOut, float maxPrct, float& maxOut, bool multiThread = true);
|
||||
void buildBlendMask(float** luminance, float **blend, int W, int H, float &contrastThreshold, float amount = 1.f, bool autoContrast = false);
|
||||
int calcContrastThreshold(float** luminance, float **blend, int W, int H);
|
||||
}
|
||||
|
@@ -307,8 +307,6 @@ void ProfilePanel::save_clicked (GdkEventButton* event)
|
||||
do {
|
||||
if (dialog.run() == Gtk::RESPONSE_OK) {
|
||||
|
||||
dialog.hide();
|
||||
|
||||
std::string fname = dialog.get_filename();
|
||||
Glib::ustring ext = getExtension (fname);
|
||||
|
||||
|
Reference in New Issue
Block a user