diff --git a/AUTHORS.txt b/AUTHORS.txt
index 002f4969a..a1733a88e 100644
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -38,6 +38,7 @@ Other contributors (profiles, ideas, mockups, testing, forum activity, translati
Fernando Carello
Reine Edvardsson
André Gauthier
+ Sébastien Guyader
M. Dávid Gyurkó
Arturs Jekabsons
Marián Kyral
diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais
index a1401fb2a..bd0e1416b 100644
--- a/rtdata/languages/Francais
+++ b/rtdata/languages/Francais
@@ -498,6 +498,11 @@ HISTORY_MSG_277;Virage partiel - Ombres
HISTORY_MSG_278;Virage partiel - Hautes Lumières
HISTORY_MSG_279;Virage partiel - Protect. Saturé
HISTORY_MSG_280;Virage partiel - Seuil de Protection
+HISTORY_MSG_288;Champ Uniforme - Ctrl de l'Écrêtage
+HISTORY_MSG_289;Champ Uniforme - Ctrl Auto de l'Écrêtage
+HISTORY_MSG_290;Niveau de noir - Rouge
+HISTORY_MSG_291;Niveau de noir - Vert
+HISTORY_MSG_292;Niveau de noir - Bleu
HISTORY_NEWSNAPSHOT;Ajouter
HISTORY_NEWSNAPSHOT_TOOLTIP;Raccourci: Alt-s
HISTORY_SNAPSHOTS;Captures
@@ -660,6 +665,7 @@ PARTIALPASTE_EXPOSURE;Exposition
PARTIALPASTE_FLATFIELDAUTOSELECT;Sélection auto du Champ Uniforme
PARTIALPASTE_FLATFIELDBLURRADIUS;Rayon de floutage du Champ Uniforme
PARTIALPASTE_FLATFIELDBLURTYPE;Type de floutage du Champ Uniforme
+PARTIALPASTE_FLATFIELDCLIPCONTROL;Contrôle de l'écrêtage du Champs Uniforme
PARTIALPASTE_FLATFIELDFILE;Fichier de Champ Uniforme
PARTIALPASTE_GRADIENT;Filtre Dégradé
PARTIALPASTE_HSVEQUALIZER;Égaliseur TSV
@@ -1169,7 +1175,8 @@ TP_EPD_REWEIGHTINGITERATES;Itérations de la pondération
TP_EPD_SCALE;Échelle
TP_EPD_STRENGTH;Force
TP_EPD_TOOLTIP;Vous pouvez choisir entre le mode Lab (standard) ou le mode CIECAM02.\n En activant "Compression tonale avec brillance Q CIECAM" dans le menu "Brillance + Niveau de couleur CIECAM"
-TP_EXPOSCORR_LABEL;Points Noir & Blanc Raw
+TP_EXPOS_BLACKPOINT_LABEL;Points Noir Raw
+TP_EXPOS_WHITEPOINT_LABEL;Points Blanc Raw
TP_EXPOSURE_AUTOLEVELS;Niveaux Auto
TP_EXPOSURE_AUTOLEVELS_TIP;Bascule l'usage de Niveaux automatiques afin de régler automatiquement les valeurs basé sur l'analyse de l'image\nActive la Reconstruction des Hautes Lumières si nécessaire.
TP_EXPOSURE_BLACKLEVEL;Noir
@@ -1199,6 +1206,7 @@ TP_FLATFIELD_BT_AREA;Zone
TP_FLATFIELD_BT_HORIZONTAL;Horizontal
TP_FLATFIELD_BT_VERTHORIZ;Vert. + Horiz.
TP_FLATFIELD_BT_VERTICAL;Vertical
+TP_FLATFIELD_CLIPCONTROL;Control de l'écrêtage
TP_FLATFIELD_LABEL;Champ Uniforme
TP_GAMMA_CURV;Gamma
TP_GAMMA_FREE;Manuel
@@ -1326,13 +1334,17 @@ TP_PREPROCESS_NO_FOUND;Aucun trouvé
TP_RAWCACORR_AUTO;Correction automatique
TP_RAWCACORR_CABLUE;Bleu
TP_RAWCACORR_CARED;Rouge
-TP_RAWEXPOS_BLACKONE;Niveau de noir: Rouge
TP_RAWEXPOS_BLACKS;Niveaux de noir
-TP_RAWEXPOS_BLACKTHREE;Niveau de noir: Vert 2
-TP_RAWEXPOS_BLACKTWO;Niveau de noir: Bleu
-TP_RAWEXPOS_BLACKZERO;Niveau de noir: Vert 1 (maître)
+TP_RAWEXPOS_BLACK_0;Vert 1 (maître)
+TP_RAWEXPOS_BLACK_1;Rouge
+TP_RAWEXPOS_BLACK_2;Bleu
+TP_RAWEXPOS_BLACK_3;Vert 2
+TP_RAWEXPOS_BLACK_RED;Rouge
+TP_RAWEXPOS_BLACK_GREEN;Vert
+TP_RAWEXPOS_BLACK_BLUE;Bleu
TP_RAWEXPOS_LINEAR;Corr. du Point Blanc
TP_RAWEXPOS_PRESER;Préservation des HL
+TP_RAWEXPOS_RGB;Rouge, Vert, Bleu
TP_RAWEXPOS_TWOGREEN;Lier les verts
TP_RAW_ALLENHANCE;Réduction de bruit/artefact post-dématriçage
TP_RAW_DCBENHANCE;Amélioration de DCB
@@ -1345,6 +1357,8 @@ TP_RAW_FALSECOLOR;Itérations pour la suppression\ndes fausses couleurs
TP_RAW_LABEL;Dématriçage
TP_RAW_LMMSEITERATIONS;Niveau d'amélioration LMMSE
TP_RAW_LMMSE_TOOLTIP;Ajoute gamma (niveau 1) + médian (niveau 2-4) + affinage (niveau 5-6) pour réduire les artéfacts et améliorer le rapport signal/bruit
+TP_RAW_SENSOR_BAYER_LABEL;Capteur à matrice de Bayer
+TP_RAW_SENSOR_XTRANS_LABEL;Capteur à matrice X-Trans
TP_RESIZE_APPLIESTO;S'applique à :
TP_RESIZE_BICUBICSF;Bicubique (Plus doux)
TP_RESIZE_BICUBICSH;Bicubique (Plus net)
diff --git a/rtdata/languages/default b/rtdata/languages/default
index ea31ecc9c..3bcf84379 100644
--- a/rtdata/languages/default
+++ b/rtdata/languages/default
@@ -508,6 +508,11 @@ HISTORY_MSG_284;Color Toning - Auto saturation
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 Automatic Clip Control
+HISTORY_MSG_290;Black Level - Red
+HISTORY_MSG_291;Black Level - Green
+HISTORY_MSG_292;Black Level - Blue
HISTORY_NEWSNAPSHOT;Add
HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s
HISTORY_SNAPSHOTS;Snapshots
@@ -662,6 +667,7 @@ PARTIALPASTE_EXPOSURE;Exposure
PARTIALPASTE_FLATFIELDAUTOSELECT;Flat-field auto-selection
PARTIALPASTE_FLATFIELDBLURRADIUS;Flat-field blur radius
PARTIALPASTE_FLATFIELDBLURTYPE;Flat-field blur type
+PARTIALPASTE_FLATFIELDCLIPCONTROL;Flat-field clip control
PARTIALPASTE_FLATFIELDFILE;Flat-field file
PARTIALPASTE_GRADIENT;Graduated filter
PARTIALPASTE_HSVEQUALIZER;HSV equalizer
@@ -1210,7 +1216,8 @@ TP_EPD_REWEIGHTINGITERATES;Reweighting Iterates
TP_EPD_SCALE;Scale
TP_EPD_STRENGTH;Strength
TP_EPD_TOOLTIP;Tone mapping is possible via Lab mode (standard) and CIECAM02 mode.\n\nTo engage CIECAM02 tone mapping mode enable the following settings:\n1. CIECAM02\n2. Algorithm="Brightness + Colorfulness (QM)"\n3. "Tone mapping using CIECAM02 brightness (Q)"
-TP_EXPOSCORR_LABEL;Raw White & Black Points
+TP_EXPOS_BLACKPOINT_LABEL;Raw Black Points
+TP_EXPOS_WHITEPOINT_LABEL;Raw White Points
TP_EXPOSURE_AUTOLEVELS;Auto Levels
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_BLACKLEVEL;Black
@@ -1240,6 +1247,8 @@ TP_FLATFIELD_BT_AREA;Area
TP_FLATFIELD_BT_HORIZONTAL;Horizontal
TP_FLATFIELD_BT_VERTHORIZ;Vertical + Horizontal
TP_FLATFIELD_BT_VERTICAL;Vertical
+TP_FLATFIELD_CLIPCONTROL;Clip control
+TP_FLATFIELD_CLIPCONTROL_TOOLTIP;Clip control avoids clipped highlights caused by applying the flat field. If there are already clipped highlights before applying the flat field, clip control can lead to color cast.
TP_FLATFIELD_LABEL;Flat-Field
TP_GAMMA_CURV;Gamma
TP_GAMMA_FREE;Free gamma
@@ -1368,13 +1377,17 @@ TP_PREPROCESS_NO_FOUND;None found
TP_RAWCACORR_AUTO;Auto-correction
TP_RAWCACORR_CABLUE;Blue
TP_RAWCACORR_CARED;Red
-TP_RAWEXPOS_BLACKONE;Black Level: Red
TP_RAWEXPOS_BLACKS;Black Levels
-TP_RAWEXPOS_BLACKTHREE;Black Level: Green 2
-TP_RAWEXPOS_BLACKTWO;Black Level: Blue
-TP_RAWEXPOS_BLACKZERO;Black Level: Green 1 (lead)
+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_RED;Red
+TP_RAWEXPOS_BLACK_GREEN;Green
+TP_RAWEXPOS_BLACK_BLUE;Blue
TP_RAWEXPOS_LINEAR;White Point Correction
TP_RAWEXPOS_PRESER;Highlight Preservation
+TP_RAWEXPOS_RGB;Red, Green, Blue
TP_RAWEXPOS_TWOGREEN;Link greens
TP_RAW_ALLENHANCE;Post-Demosaic Artifact/Noise Reduction
TP_RAW_DCBENHANCE;DCB Enhancement
@@ -1387,6 +1400,9 @@ TP_RAW_FALSECOLOR;False Color Suppression Steps
TP_RAW_LABEL;Demosaicing
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_SENSOR_BAYER_LABEL;Sensor with Bayer matrix
+TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans matrix
+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.
TP_RESIZE_APPLIESTO;Applies to:
TP_RESIZE_BICUBICSF;Bicubic (Softer)
TP_RESIZE_BICUBICSH;Bicubic (Sharper)
diff --git a/rtengine/amaze_demosaic_RT.cc b/rtengine/amaze_demosaic_RT.cc
index 165a17d3d..03efa62cd 100644
--- a/rtengine/amaze_demosaic_RT.cc
+++ b/rtengine/amaze_demosaic_RT.cc
@@ -83,7 +83,7 @@ SSEFUNCTION void RawImageSource::amaze_demosaic_RT(int winx, int winy, int winw,
// Issue 1676
// Moved from inside the parallel section
if (plistener) {
- plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), RAWParams::methodstring[RAWParams::amaze]));
+ plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::amaze]));
plistener->setProgress (0.0);
}
struct s_hv {
@@ -1417,4 +1417,4 @@ SSEFUNCTION void RawImageSource::amaze_demosaic_RT(int winx, int winy, int winw,
#undef TS
}
-}
\ No newline at end of file
+}
diff --git a/rtengine/camconst.json b/rtengine/camconst.json
index efb7e7532..62a00bb9c 100755
--- a/rtengine/camconst.json
+++ b/rtengine/camconst.json
@@ -336,7 +336,7 @@ For Panasonic raws beginning from Dcraw v9.21 Dcraw/RT reads base BL from exif d
define in "ranges": { "black": the needed offset of around 15. The (total) BL RT displays is base+offset
In all, you typically should not care about the black level in camconst.json,
any information that can be derived from the raw file itself should not be specified in camconst.json!
-Sony's ARW2 is one of the few exceptions (which has a single black level around 512),
+Sony's ARW2 is one of the few exceptions (with single black level around 512, or 800 for RX10/100 models),
but DCraw generally has good constants for these already.
Currently we have chosen not to provide any guide how to measure black levels
@@ -432,11 +432,11 @@ Quality X: unknown, ie we knowing to little about the camera properties to know
{ "aperture": 2.0, "scale_factor": 1.025 },
{ "aperture": 2.2, "scale_factor": 1.020 },
{ "aperture": 2.5, "scale_factor": 1.015 },
- { "aperture": 2.8, "scale_factor": 1.010 },
- { "aperture": 3.2, "scale_factor": 1.005 },
- { "aperture": 3.5, "scale_factor": 1.002 }
- ]
- }
+ { "aperture": 2.8, "scale_factor": 1.010 },
+ { "aperture": 3.2, "scale_factor": 1.005 },
+ { "aperture": 3.5, "scale_factor": 1.002 }
+ ]
+ }
},
{ // Quality A, some missing scaling factors are safelly guessed - most samples by sfink16 at RT forums
"make_model": "Canon EOS 6D",
@@ -588,7 +588,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know
{ "aperture": 2.2, "scale_factor": 1.060 }, // 11971/11222 = 1.066
{ "aperture": 2.5, "scale_factor": 1.050 }, // guessed
{ "aperture": 2.8, "scale_factor": 1.030 }, // iso100: 14042/13584=1.0336 - iso200 15820/15303 = 1.0348
- { "aperture": 3.2, "scale_factor": 1.00 }, //
+ { "aperture": 3.2, "scale_factor": 1.000 }, //
{ "aperture": 3.5, "scale_factor": 1.000 } //
]
}
@@ -668,27 +668,39 @@ Quality X: unknown, ie we knowing to little about the camera properties to know
"ranges": { "white": 4050 }
},
- { // Quality A
- "make_model": "FUJIFILM S1",
- "dcraw_matrix": [ 11705,-4262,-1107,-2282,10791,1709,-555,1713,4945 ] // MATRIX FROM FUJI SL1000
- },
+ { // Quality A
+ "make_model": "FUJIFILM S1",
+ // "dcraw_matrix": [ 11705,-4262,-1107,-2282,10791,1709,-555,1713,4945 ] // MATRIX FROM FUJI SL1000
+ "dcraw_matrix": [ 12297,-4882,-1202,-2106,10691,1623,-88,1312,4790 ] // DNG_v8.5 D65
+ },
+
+ { // Quality B
+ "make_model": [ "FUJIFILM X-T1", "FUJIFILM X-E2" ],
+ "dcraw_matrix": [ 8458,-2451,-855,-4597,12447,2407,-1475,2482,6526 ], // DNG D65
+// "dcraw_matrix": [ 9289,-3279,-632,-3539,11137,2758,-1049,1950,6544 ], // X-RITE D55
+ "ranges": { "white": 16100 }
+ },
+
- // { // Quality C, PRELIMINARY - new model not supported by dcraw9.20 or dng 8.4
- // "make_model": "Nikon 1 V3",
- // "dcraw_matrix": [ 5306,-1066,-469,-3865,11189,3076,-399,1341,5120 ], // matrix dXo D50
- // // "dcraw_matrix": [ 6588,-1305,-693,-3277,10987,2634,-355,2016,5106 ], // copy from 1 V2
- // "ranges": { "black": 200, "white": 4080 } // exif 800
- // },
+ { // Quality B,
+ "make_model": [ "Nikon 1 V3", "Ninon 1 J4" ], // Same format
+ "dcraw_matrix": [ 5958,-1559,-571,-4021,11453,2939,-634,1548,5087 ], // matrix from DNG_v8.5 d65
+ // "dcraw_matrix": [ 5306,-1066,-469,-3865,11189,3076,-399,1341,5120 ], // matrix dXo D50,
+ "ranges": { "black": 200, "white": 4080 } // exif 800
+ },
+ { // Quality B, conflict with "Nikon 1 " in Dcraw_v9.21_r1.464 2014/06/13
+ "make_model": "Nikon 1 S2", //
+ "dcraw_matrix": [ 6612,-1342,-618,-3338,11055,2623,-174,1792,5075 ], // matrix from DNG_v8.5 d65
+ "ranges": { "black": 200, "white": 4080 } // exif 800
+ },
+
+ { // quality B, lacks aperture and ISO scaling, known to exist, but little to gain as the levels are so close to white_max
+ "make_model": "Nikon D7000",
+ "dcraw_matrix": [ 7530,-1942,-255,-4318,11390,3362,-926,1694,7649 ], // matrix provided by Tanveer(tsk1979)
+ "ranges": {
+ // measured at ISO 100. ISO differences not measured, but known to exist
+ "white": [ 16370, 15760, 16370 ], // typical R 16383, G 15778, B 16383
- { // quality B, lacks aperture and ISO scaling, known to exist, but little to gain as the levels are so close to white_max
- "make_model": "Nikon D7000",
- "dcraw_matrix": [ 7530,-1942,-255,-4318,11390,3362,-926,1694,7649 ], // matrix provided by Tanveer(tsk1979)
- "ranges": {
- // measured at ISO 100. ISO differences not measured, but known to exist
- "white": [ 16370, // 16383 typical
- 15760, // 15778 typical
- 16370 // 16383 typical
- ],
"white_max": 16383
// aperture scaling not measured, but known to exist, at f/1.8 the G channels hits white_max
}
@@ -746,7 +758,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know
{ // Quality A , replicated from rawimage.cc
"make_model": "Panasonic DMC-FZ150",
- "dcraw_matrix": [ 10435,-3208,-72,-2293,10506,2067,-486,1725,4682 ], // RT
+ "dcraw_matrix": [ 10435,-3208,-72,-2293,10506,2067,-486,1725,4682 ], // RT, copy from custom dcp d55
"ranges": { "black": 15, "white": 4050 } // 15 is BL offstet. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset
},
{ // Quality A
@@ -849,7 +861,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know
}
},
- { // Quality B, BL is floating and should be extracted from exif maker data
+ { // Quality B, variable WL
"make_model": "Panasonic DMC-GH3",
"dcraw_matrix": [ 6559,-1752,-491,-3672,11407,2586,-962,1875,5130 ], // dcp d65
"ranges": {
@@ -861,9 +873,10 @@ Quality X: unknown, ie we knowing to little about the camera properties to know
}
},
- { // Quality C, preliminary support, not yet supported by Dcraw or Adobe
+ { // Quality B, some ISO WLevels are safely guessed
"make_model": "Panasonic DMC-GH4",
- "dcraw_matrix": [ 5545,-878,-249,-4592,12128,2709,-1225,1928,5260 ], // calculated from dxo D50 matrix
+ "dcraw_matrix": [ 7122,-2108,-512,-3155,11201,2231,-541,1423,5045 ], // dng_v8.5 d65
+ // "dcraw_matrix": [ 5545,-878,-249,-4592,12128,2709,-1225,1928,5260 ], // calculated from dxo D50 matrix
"ranges": {
"black": 16, // // 15 is BL offstet. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset
"white": [
@@ -918,14 +931,15 @@ Quality X: unknown, ie we knowing to little about the camera properties to know
{ // Quality B, color looks bad with Dcraw matrix - corrections for raw crop vs Dcraw9.21, matched to Samsung's default
"make_model": "Samsung NX mini",
- "dcraw_matrix": [ 5222,-1196,-550,-6540,14649,2009,-1666,2819,5657 ], // Dcraw921
+ "dcraw_matrix": [ 5222,-1196,-550,-6540,14649,2009,-1666,2819,5657 ], // Dcraw921
+// "dcraw_matrix": [ 5863,-1465,-760,-5714,13956,1883,-1075,1696,7136 ], // calculated from exif WB 11504/4096/6256 and color matrix 428,-170,-2,-36,352,-60,10,-104,350
"raw_crop": [ 128, 36, 5480, 3656 ], // jpeg 5472x3648 - full raw: 5664 x 3710 - Samsung's official crop: 132, 40, 5604, 3688
"ranges": { "white": 4030 } // double clipping point for each channel at a) 4095 and b) bell distribution with peak at 4038 .. used the conservative one
},
- { // Quality A,
- "make_model": "Samsung NX30",
- "dcraw_matrix": [ 7557,-2522,-739,-4679,12949,1894,-840,1777,5311 ] // D65 matrix from Adobe's Dcp profile - DxoD50 6661,-1695,-616,-6456,14646,1913,-1417,2142,5646
- },
+ { // Quality A, Conflict with "Samsung NX30" in Dcraw_v9.21_r1.414
+ "make_model": "Samsung NX3000",
+ "dcraw_matrix": [ 8060,-2933,-761,-4504,12890,1762,-630,1489,5227 ] // D65 from Adobe's Dcp profile
+ },
{ // Quality A, correction for frame width
"make_model": "Sony NEX-5N",
@@ -933,7 +947,13 @@ Quality X: unknown, ie we knowing to little about the camera properties to know
"raw_crop": [ 0, 0, 4920, 3276 ],
"ranges": { "black": 512, "white": 16300 }
},
- { // Quality A, correction for frame width black level and color matrix
+ { // Quality A,
+ "make_model": "Sony ILCA-77M2",
+ "dcraw_matrix": [ 5991,-1732,-443,-4100,11989,2381,-704,1467,5992 ], // adobe dcp d65
+ "raw_crop": [ 0, 0, 6024, 4024 ],
+ "ranges": { "black": 512, "white": 16300 }
+ },
+ { // Quality A, correction for frame width black level and color matrix
"make_model": "Sony ILCE-3000",
"dcraw_matrix": [ 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 ], // adobe dcp d65
"ranges": { "black": 512, "white": 16300 },
@@ -945,7 +965,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know
"ranges": { "black": 512, "white": 16300 },
"raw_crop": [ 0, 0, 5476, 3656 ]
},
- { // Quality A, new model not supported in dcraw 9.20
+ { // Quality A
"make_model": "Sony ILCE-6000",
"dcraw_matrix": [ 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 ], // adobe dcp d65
// "dcraw_matrix": [ 5012,-901,-206,-4034,11428,2984,-1104,1718,6377 ], // IR_x-rite D55
@@ -959,6 +979,19 @@ Quality X: unknown, ie we knowing to little about the camera properties to know
"raw_crop": [ 0, 0, 7372, 4920 ],
"ranges": { "black": 512, "white": 16300 }
},
+ { // Quality B, correction for frame width
+ "make_model": "Sony ILCE-7S",
+ "dcraw_matrix": [ 5838,-1430,-246,-3497,11477,2297,-748,1885,5778 ], // DNG D65
+ "raw_crop": [ 0, 0, 4254, 2848 ],
+ "ranges": { "black": 512, "white": 16300 }
+ },
+ { // Quality A,
+ "make_model": "Sony DSC-RX100M3",
+ "dcraw_matrix": [ 6596,-2079,-562,-4782,13016,1933,-970,1581,5181 ], // DNG D65
+ "ranges": { "black": 800, "white": 16300 }
+ },
+
+
// No need for these Sony models anymore
// { // quality A
// "make_model": "Sony SLT-A77",
diff --git a/rtengine/dcraw.c b/rtengine/dcraw.c
index ed86154e0..c5edada64 100644
--- a/rtengine/dcraw.c
+++ b/rtengine/dcraw.c
@@ -19,11 +19,11 @@
*If you have not modified dcraw.c in any way, a link to my
homepage qualifies as "full source code".
- $Revision: 1.463 $
- $Date: 2014/05/05 22:03:20 $
+ $Revision: 1.467 $
+ $Date: 2014/07/03 21:19:24 $
*/
-#define DCRAW_VERSION "9.21"
+#define DCRAW_VERSION "9.22"
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
@@ -113,7 +113,7 @@ typedef unsigned long long UINT64;
FILE *ifp, *ofp;
short order;
const char *ifname;
-char *meta_data, xtrans[6][6];
+char *meta_data, xtrans[6][6], xtrans_abs[6][6];
char cdesc[5], desc[512], make[64], model[64], model2[64], artist[64];
float flash_used, canon_ev, iso_speed, shutter, aperture, focal_len;
time_t timestamp;
@@ -254,7 +254,7 @@ int CLASS fcol (int row, int col)
{ 0,3,1,0,0,2,0,3,2,1,3,1,1,3,1,3 } };
if (filters == 1) return filter[(row+top_margin)&15][(col+left_margin)&15];
- if (filters == 9) return xtrans[(row+top_margin+6)%6][(col+left_margin+6)%6];
+ if (filters == 9) return xtrans[(row+6) % 6][(col+6) % 6];
return FC(row,col);
}
@@ -375,14 +375,15 @@ void CLASS read_shorts (ushort *pixel, int count)
void CLASS cubic_spline (const int *x_, const int *y_, const int len)
{
- float A[2*len][2*len], b[2*len], c[2*len], d[2*len];
- float x[len], y[len];
+ float **A, *b, *c, *d, *x, *y;
int i, j;
- memset (A, 0, sizeof(A));
- memset (b, 0, sizeof(b));
- memset (c, 0, sizeof(c));
- memset (d, 0, sizeof(d));
+ A = (float **) calloc (((2*len + 4)*sizeof **A + sizeof *A), 2*len);
+ if (!A) return;
+ A[0] = (float *) (A + 2*len);
+ for (i = 1; i < 2*len; i++)
+ A[i] = A[0] + 2*len*i;
+ y = len + (x = i + (d = i + (c = i + (b = A[0] + i*i))));
for (i = 0; i < len; i++) {
x[i] = x_[i] / 65535.0;
y[i] = y_[i] / 65535.0;
@@ -424,6 +425,7 @@ void CLASS cubic_spline (const int *x_, const int *y_, const int len)
curve[i] = y_out < 0.0 ? 0 : (y_out >= 1.0 ? 65535 :
(ushort)(y_out * 65535.0 + 0.5));
}
+ free (A);
}
void CLASS canon_600_fixed_wb (int temp)
@@ -3874,8 +3876,8 @@ void CLASS colorcheck()
{ 0.310, 0.316, 9.0 }, // Neutral 3.5
{ 0.310, 0.316, 3.1 } }; // Black
double gmb_cam[NSQ][4], gmb_xyz[NSQ][3];
- double inverse[NSQ][3], cam_xyz[4][3], num;
- int c, i, j, k, sq, row, col, count[4];
+ double inverse[NSQ][3], cam_xyz[4][3], balance[4], num;
+ int c, i, j, k, sq, row, col, pass, count[4];
memset (gmb_cam, 0, sizeof gmb_cam);
for (sq=0; sq < NSQ; sq++) {
@@ -3884,7 +3886,8 @@ void CLASS colorcheck()
for (col=cut[sq][2]; col < cut[sq][2]+cut[sq][0]; col++) {
c = FC(row,col);
if (c >= colors) c -= 2;
- gmb_cam[sq][c] += BAYER(row,col);
+ gmb_cam[sq][c] += BAYER2(row,col);
+ BAYER2(row,col) = black + (BAYER2(row,col)-black)/2;
count[c]++;
}
FORCC gmb_cam[sq][c] = gmb_cam[sq][c]/count[c] - black;
@@ -3894,11 +3897,16 @@ void CLASS colorcheck()
(1 - gmb_xyY[sq][0] - gmb_xyY[sq][1]) / gmb_xyY[sq][1];
}
pseudoinverse (gmb_xyz, inverse, NSQ);
- for (raw_color = i=0; i < colors; i++)
- for (j=0; j < 3; j++)
- for (cam_xyz[i][j] = k=0; k < NSQ; k++)
- cam_xyz[i][j] += gmb_cam[k][i] * inverse[k][j];
- cam_xyz_coeff (rgb_cam, cam_xyz);
+ for (pass=0; pass < 2; pass++) {
+ for (raw_color = i=0; i < colors; i++)
+ for (j=0; j < 3; j++)
+ for (cam_xyz[i][j] = k=0; k < NSQ; k++)
+ cam_xyz[i][j] += gmb_cam[k][i] * inverse[k][j];
+ cam_xyz_coeff (rgb_cam, cam_xyz);
+ FORCC balance[c] = pre_mul[c] * gmb_cam[20][c];
+ for (sq=0; sq < NSQ; sq++)
+ FORCC gmb_cam[sq][c] *= balance[c];
+ }
if (verbose) {
printf (" { \"%s %s\", %d,\n\t{", make, model, black);
num = 10000 / (cam_xyz[1][0] + cam_xyz[1][1] + cam_xyz[1][2]);
@@ -4449,7 +4457,7 @@ void CLASS cielab (ushort rgb[3], short lab[3])
}
#define TS 512 /* Tile Size */
-#define fcol(row,col) xtrans[(row+top_margin+6)%6][(col+left_margin+6)%6]
+#define fcol(row,col) xtrans[(row+6) % 6][(col+6) % 6]
/*
Frank Markesteijn's algorithm for Fuji X-Trans sensors
@@ -4934,7 +4942,7 @@ void CLASS tiff_get (unsigned base,
*type = get2();
*len = get4();
*save = ftell(ifp) + 4;
- if (*len * ("11124811248488"[*type < 14 ? *type:0]-'0') > 4)
+ if (*len * ("11124811248484"[*type < 14 ? *type:0]-'0') > 4)
fseek (ifp, get4()+base, SEEK_SET);
}
@@ -5229,7 +5237,7 @@ get2_256:
cam_mul[0] = get2() / 256.0;
cam_mul[2] = get2() / 256.0;
}
- if ((tag | 0x70) == 0x2070 && type == 4)
+ if ((tag | 0x70) == 0x2070 && (type == 4 || type == 13))
fseek (ifp, get4()+base, SEEK_SET);
if (tag == 0x2020)
parse_thumb_note (base, 257, 258);
@@ -5523,6 +5531,7 @@ int CLASS parse_tiff_ifd (int base)
thumb_length = len;
break;
case 61440: /* Fuji HS10 table */
+ fseek (ifp, get4()+base, SEEK_SET);
parse_tiff_ifd (base);
break;
case 2: case 256: case 61441: /* ImageWidth */
@@ -5673,8 +5682,7 @@ int CLASS parse_tiff_ifd (int base)
break;
case 33422: /* CFAPattern */
if (filters == 9) {
- FORC(36)
- xtrans[(c/6+top_margin)%6][(c+left_margin)%6] = fgetc(ifp) & 3;
+ FORC(36) xtrans[0][c] = fgetc(ifp) & 3;
break;
}
case 64777: /* Kodak P-series */
@@ -6493,7 +6501,7 @@ void CLASS parse_fuji (int offset)
fuji_width = !(fgetc(ifp) & 8);
} else if (tag == 0x131) {
filters = 9;
- FORC(36) xtrans[0][35-c] = fgetc(ifp) & 3;
+ FORC(36) xtrans_abs[0][35-c] = fgetc(ifp) & 3;
} else if (tag == 0x2ff0) {
FORC4 cam_mul[c ^ 1] = get2();
} else if (tag == 0xc000) {
@@ -7215,6 +7223,8 @@ void CLASS adobe_coeff (const char *make, const char *model)
{ 8139,-2171,-663,-8747,16541,2295,-1925,2008,8093 } },
{ "Nikon D70", 0, 0,
{ 7732,-2422,-789,-8238,15884,2498,-859,783,7330 } },
+ { "Nikon D810", 596, 0, /* DJC */
+ { 6502,-2328,154,-4249,9943,4307,-1303,2538,8108 } },
{ "Nikon D800", 0, 0,
{ 7866,-2108,-555,-4869,12483,2681,-1176,2069,7501 } },
{ "Nikon D80", 0, 0,
@@ -7268,14 +7278,18 @@ void CLASS adobe_coeff (const char *make, const char *model)
{ "Nikon COOLPIX P7800", 200, 0,
{ 10321,-3920,-931,-2750,11146,1824,-442,1545,5539 } },
{ "Nikon 1 V3", 200, 0,
- { 6588,-1305,-693,-3277,10987,2634,-355,2016,5106 } },
+ { 5958,-1559,-571,-4021,11453,2939,-634,1548,5087 } },
+ { "Nikon 1 J4", 200, 0,
+ { 5958,-1559,-571,-4021,11453,2939,-634,1548,5087 } },
+ { "Nikon 1 S2", 200, 0,
+ { 6612,-1342,-618,-3338,11055,2623,-174,1792,5075 } },
{ "Nikon 1 V2", 0, 0,
{ 6588,-1305,-693,-3277,10987,2634,-355,2016,5106 } },
{ "Nikon 1 J3", 0, 0,
{ 6588,-1305,-693,-3277,10987,2634,-355,2016,5106 } },
{ "Nikon 1 AW1", 0, 0,
{ 6588,-1305,-693,-3277,10987,2634,-355,2016,5106 } },
- { "Nikon 1 ", 0, 0,
+ { "Nikon 1 ", 0, 0, /* J1, J2, S1, V1 */
{ 8994,-2667,-865,-4594,12324,2552,-699,1786,6260 } },
{ "Olympus C5050", 0, 0,
{ 10508,-3124,-1273,-6079,14294,1901,-1653,2306,6237 } },
@@ -7463,6 +7477,8 @@ void CLASS adobe_coeff (const char *make, const char *model)
{ 10148,-3743,-991,-2837,11366,1659,-701,1893,4899 } },
{ "Leica D-LUX 6", 15, 0,
{ 10148,-3743,-991,-2837,11366,1659,-701,1893,4899 } },
+ { "Panasonic DMC-FZ1000", 15, 0, /* DJC */
+ { 5686,-2219,-68,-4143,9912,4232,-1244,2246,5917 } },
{ "Panasonic DMC-FZ100", 15, 0xfff,
{ 16197,-6146,-1761,-2393,10765,1869,366,2238,5248 } },
{ "Leica V-LUX 2", 15, 0xfff,
@@ -7505,6 +7521,8 @@ void CLASS adobe_coeff (const char *make, const char *model)
{ 7780,-2410,-806,-3913,11724,2484,-1018,2390,5298 } },
{ "Panasonic DMC-GH3", 15, 0,
{ 6559,-1752,-491,-3672,11407,2586,-962,1875,5130 } },
+ { "Panasonic DMC-GH4", 15, 0,
+ { 7122,-2108,-512,-3155,11201,2231,-541,1423,5045 } },
{ "Panasonic DMC-GM1", 15, 0,
{ 6770,-1895,-744,-5232,13145,2303,-1664,2691,5703 } },
{ "Panasonic DMC-GX1", 15, 0,
@@ -7605,6 +7623,10 @@ void CLASS adobe_coeff (const char *make, const char *model)
{ 5413,-1162,-365,-5665,13098,2866,-608,1179,8440 } },
{ "Sony DSLR-A900", 128, 0,
{ 5209,-1072,-397,-8845,16120,2919,-1618,1803,8654 } },
+ { "Sony ILCA-77M2", 128, 0,
+ { 5991,-1732,-443,-4100,11989,2381,-704,1467,5992 } },
+ { "Sony ILCE-7S", 128, 0,
+ { 5838,-1430,-246,-3497,11477,2297,-748,1885,5778 } },
{ "Sony ILCE-7R", 128, 0,
{ 4913,-541,-202,-6130,13513,2906,-1564,2151,7183 } },
{ "Sony ILCE-7", 128, 0,
@@ -8439,6 +8461,9 @@ canon_a5:
filters = 0x16161616;
}
if (fuji_layout) raw_width *= is_raw;
+ if (filters == 9)
+ FORC(36) xtrans[0][c] =
+ xtrans_abs[(c/6+top_margin) % 6][(c+left_margin) % 6];
} else if (!strcmp(model,"KD-400Z")) {
height = 1712;
width = 2312;
@@ -8684,6 +8709,8 @@ konica_400z:
adobe_coeff ("Sony","DSC-R1");
width = 3925;
order = 0x4d4d;
+ } else if (!strcmp(make,"Sony") && raw_width == 4288) {
+ width -= 32;
} else if (!strcmp(make,"Sony") && raw_width == 4928) {
if (height < 3280) width -= 8;
} else if (!strcmp(make,"Sony") && raw_width == 5504) {
diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc
index 28a5bf78a..621e1602a 100644
--- a/rtengine/dcraw.cc
+++ b/rtengine/dcraw.cc
@@ -31,11 +31,11 @@
*If you have not modified dcraw.c in any way, a link to my
homepage qualifies as "full source code".
- $Revision: 1.463 $
- $Date: 2014/05/05 22:03:20 $
+ $Revision: 1.467 $
+ $Date: 2014/07/03 21:19:24 $
*/
-#define DCRAW_VERSION "9.21"
+#define DCRAW_VERSION "9.22"
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
@@ -215,7 +215,7 @@ int CLASS fcol (int row, int col)
{ 0,3,1,0,0,2,0,3,2,1,3,1,1,3,1,3 } };
if (filters == 1) return filter[(row+top_margin)&15][(col+left_margin)&15];
- if (filters == 9) return xtrans[(row+top_margin+6)%6][(col+left_margin+6)%6];
+ if (filters == 9) return xtrans[(row+6) % 6][(col+6) % 6];
return FC(row,col);
}
@@ -338,14 +338,15 @@ void CLASS read_shorts (ushort *pixel, int count)
void CLASS cubic_spline (const int *x_, const int *y_, const int len)
{
- float A[2*len][2*len], b[2*len], c[2*len], d[2*len];
- float x[len], y[len];
+ float **A, *b, *c, *d, *x, *y;
int i, j;
- memset (A, 0, sizeof(A));
- memset (b, 0, sizeof(b));
- memset (c, 0, sizeof(c));
- memset (d, 0, sizeof(d));
+ A = (float **) calloc (((2*len + 4)*sizeof **A + sizeof *A), 2*len);
+ if (!A) return;
+ A[0] = (float *) (A + 2*len);
+ for (i = 1; i < 2*len; i++)
+ A[i] = A[0] + 2*len*i;
+ y = len + (x = i + (d = i + (c = i + (b = A[0] + i*i))));
for (i = 0; i < len; i++) {
x[i] = x_[i] / 65535.0;
y[i] = y_[i] / 65535.0;
@@ -387,6 +388,7 @@ void CLASS cubic_spline (const int *x_, const int *y_, const int len)
curve[i] = y_out < 0.0 ? 0 : (y_out >= 1.0 ? 65535 :
(ushort)(y_out * 65535.0 + 0.5));
}
+ free (A);
}
void CLASS canon_600_fixed_wb (int temp)
@@ -3841,8 +3843,8 @@ void CLASS colorcheck()
{ 0.310, 0.316, 9.0 }, // Neutral 3.5
{ 0.310, 0.316, 3.1 } }; // Black
double gmb_cam[NSQ][4], gmb_xyz[NSQ][3];
- double inverse[NSQ][3], cam_xyz[4][3], num;
- int c, i, j, k, sq, row, col, count[4];
+ double inverse[NSQ][3], cam_xyz[4][3], balance[4], num;
+ int c, i, j, k, sq, row, col, pass, count[4];
memset (gmb_cam, 0, sizeof gmb_cam);
for (sq=0; sq < NSQ; sq++) {
@@ -3851,7 +3853,8 @@ void CLASS colorcheck()
for (col=cut[sq][2]; col < cut[sq][2]+cut[sq][0]; col++) {
c = FC(row,col);
if (c >= colors) c -= 2;
- gmb_cam[sq][c] += BAYER(row,col);
+ gmb_cam[sq][c] += BAYER2(row,col);
+ BAYER2(row,col) = black + (BAYER2(row,col)-black)/2;
count[c]++;
}
FORCC gmb_cam[sq][c] = gmb_cam[sq][c]/count[c] - black;
@@ -3861,11 +3864,16 @@ void CLASS colorcheck()
(1 - gmb_xyY[sq][0] - gmb_xyY[sq][1]) / gmb_xyY[sq][1];
}
pseudoinverse (gmb_xyz, inverse, NSQ);
- for (raw_color = i=0; i < colors; i++)
- for (j=0; j < 3; j++)
- for (cam_xyz[i][j] = k=0; k < NSQ; k++)
- cam_xyz[i][j] += gmb_cam[k][i] * inverse[k][j];
- cam_xyz_coeff (rgb_cam, cam_xyz);
+ for (pass=0; pass < 2; pass++) {
+ for (raw_color = i=0; i < colors; i++)
+ for (j=0; j < 3; j++)
+ for (cam_xyz[i][j] = k=0; k < NSQ; k++)
+ cam_xyz[i][j] += gmb_cam[k][i] * inverse[k][j];
+ cam_xyz_coeff (rgb_cam, cam_xyz);
+ FORCC balance[c] = pre_mul[c] * gmb_cam[20][c];
+ for (sq=0; sq < NSQ; sq++)
+ FORCC gmb_cam[sq][c] *= balance[c];
+ }
if (verbose) {
printf (" { \"%s %s\", %d,\n\t{", make, model, black);
num = 10000 / (cam_xyz[1][0] + cam_xyz[1][1] + cam_xyz[1][2]);
@@ -4185,7 +4193,7 @@ void CLASS cielab (ushort rgb[3], short lab[3])
}
#define TS 512 /* Tile Size */
-#define fcol(row,col) xtrans[(row+top_margin+6)%6][(col+left_margin+6)%6]
+#define fcol(row,col) xtrans[(row+6) % 6][(col+6) % 6]
/*
Frank Markesteijn's algorithm for Fuji X-Trans sensors
@@ -4565,7 +4573,7 @@ void CLASS tiff_get (unsigned base,
*type = get2();
*len = get4();
*save = ftell(ifp) + 4;
- if (*len * ("11124811248488"[*type < 14 ? *type:0]-'0') > 4)
+ if (*len * ("11124811248484"[*type < 14 ? *type:0]-'0') > 4)
fseek (ifp, get4()+base, SEEK_SET);
}
@@ -4861,7 +4869,7 @@ get2_256:
cam_mul[0] = get2() / 256.0;
cam_mul[2] = get2() / 256.0;
}
- if ((tag | 0x70) == 0x2070 && type == 4)
+ if ((tag | 0x70) == 0x2070 && (type == 4 || type == 13))
fseek (ifp, get4()+base, SEEK_SET);
if (tag == 0x2020)
parse_thumb_note (base, 257, 258);
@@ -5157,6 +5165,7 @@ int CLASS parse_tiff_ifd (int base)
thumb_length = len;
break;
case 61440: /* Fuji HS10 table */
+ fseek (ifp, get4()+base, SEEK_SET);
parse_tiff_ifd (base);
break;
case 2: case 256: case 61441: /* ImageWidth */
@@ -5317,8 +5326,7 @@ int CLASS parse_tiff_ifd (int base)
break;
case 33422: /* CFAPattern */
if (filters == 9) {
- FORC(36)
- xtrans[(c/6+top_margin)%6][(c+left_margin)%6] = fgetc(ifp) & 3;
+ FORC(36) xtrans[0][c] = fgetc(ifp) & 3;
break;
}
case 64777: /* Kodak P-series */
@@ -6157,7 +6165,7 @@ void CLASS parse_fuji (int offset)
fuji_width = !(fgetc(ifp) & 8);
} else if (tag == 0x131) {
filters = 9;
- FORC(36) xtrans[0][35-c] = fgetc(ifp) & 3;
+ FORC(36) xtrans_abs[0][35-c] = fgetc(ifp) & 3;
} else if (tag == 0x2ff0) {
FORC4 cam_mul[c ^ 1] = get2();
} else if (tag == 0xc000) {
@@ -6884,6 +6892,8 @@ void CLASS adobe_coeff (const char *make, const char *model)
{ 8139,-2171,-663,-8747,16541,2295,-1925,2008,8093 } },
{ "Nikon D70", 0, 0,
{ 7732,-2422,-789,-8238,15884,2498,-859,783,7330 } },
+ { "Nikon D810", 596, 0, /* DJC */
+ { 6502,-2328,154,-4249,9943,4307,-1303,2538,8108 } },
{ "Nikon D800", 0, 0,
{ 7866,-2108,-555,-4869,12483,2681,-1176,2069,7501 } },
{ "Nikon D80", 0, 0,
@@ -6937,14 +6947,18 @@ void CLASS adobe_coeff (const char *make, const char *model)
{ "Nikon COOLPIX P7800", 200, 0,
{ 10321,-3920,-931,-2750,11146,1824,-442,1545,5539 } },
{ "Nikon 1 V3", 200, 0,
- { 6588,-1305,-693,-3277,10987,2634,-355,2016,5106 } },
+ { 5958,-1559,-571,-4021,11453,2939,-634,1548,5087 } },
+ { "Nikon 1 J4", 200, 0,
+ { 5958,-1559,-571,-4021,11453,2939,-634,1548,5087 } },
+ { "Nikon 1 S2", 200, 0,
+ { 6612,-1342,-618,-3338,11055,2623,-174,1792,5075 } },
{ "Nikon 1 V2", 0, 0,
{ 6588,-1305,-693,-3277,10987,2634,-355,2016,5106 } },
{ "Nikon 1 J3", 0, 0,
{ 6588,-1305,-693,-3277,10987,2634,-355,2016,5106 } },
{ "Nikon 1 AW1", 0, 0,
{ 6588,-1305,-693,-3277,10987,2634,-355,2016,5106 } },
- { "Nikon 1 ", 0, 0,
+ { "Nikon 1 ", 0, 0, /* J1, J2, S1, V1 */
{ 8994,-2667,-865,-4594,12324,2552,-699,1786,6260 } },
{ "Olympus C5050", 0, 0,
{ 10508,-3124,-1273,-6079,14294,1901,-1653,2306,6237 } },
@@ -7132,6 +7146,8 @@ void CLASS adobe_coeff (const char *make, const char *model)
{ 10148,-3743,-991,-2837,11366,1659,-701,1893,4899 } },
{ "Leica D-LUX 6", 15, 0,
{ 10148,-3743,-991,-2837,11366,1659,-701,1893,4899 } },
+ { "Panasonic DMC-FZ1000", 15, 0, /* DJC */
+ { 5686,-2219,-68,-4143,9912,4232,-1244,2246,5917 } },
{ "Panasonic DMC-FZ100", 15, 0xfff,
{ 16197,-6146,-1761,-2393,10765,1869,366,2238,5248 } },
{ "Leica V-LUX 2", 15, 0xfff,
@@ -7174,6 +7190,8 @@ void CLASS adobe_coeff (const char *make, const char *model)
{ 7780,-2410,-806,-3913,11724,2484,-1018,2390,5298 } },
{ "Panasonic DMC-GH3", 15, 0,
{ 6559,-1752,-491,-3672,11407,2586,-962,1875,5130 } },
+ { "Panasonic DMC-GH4", 15, 0,
+ { 7122,-2108,-512,-3155,11201,2231,-541,1423,5045 } },
{ "Panasonic DMC-GM1", 15, 0,
{ 6770,-1895,-744,-5232,13145,2303,-1664,2691,5703 } },
{ "Panasonic DMC-GX1", 15, 0,
@@ -7274,6 +7292,10 @@ void CLASS adobe_coeff (const char *make, const char *model)
{ 5413,-1162,-365,-5665,13098,2866,-608,1179,8440 } },
{ "Sony DSLR-A900", 128, 0,
{ 5209,-1072,-397,-8845,16120,2919,-1618,1803,8654 } },
+ { "Sony ILCA-77M2", 128, 0,
+ { 5991,-1732,-443,-4100,11989,2381,-704,1467,5992 } },
+ { "Sony ILCE-7S", 128, 0,
+ { 5838,-1430,-246,-3497,11477,2297,-748,1885,5778 } },
{ "Sony ILCE-7R", 128, 0,
{ 4913,-541,-202,-6130,13513,2906,-1564,2151,7183 } },
{ "Sony ILCE-7", 128, 0,
@@ -8141,6 +8163,9 @@ canon_a5:
filters = 0x16161616;
}
if (fuji_layout) raw_width *= is_raw;
+ if (filters == 9)
+ FORC(36) xtrans[0][c] =
+ xtrans_abs[(c/6+top_margin) % 6][(c+left_margin) % 6];
} else if (!strcmp(model,"KD-400Z")) {
height = 1712;
width = 2312;
@@ -8407,6 +8432,8 @@ konica_400z:
adobe_coeff ("Sony","DSC-R1");
width = 3925;
order = 0x4d4d;
+ } else if (!strcmp(make,"Sony") && raw_width == 4288) {
+ width -= 32;
} else if (!strcmp(make,"Sony") && raw_width == 4928) {
if (height < 3280) width -= 8;
} else if (!strcmp(make,"Sony") && raw_width == 5504) {
diff --git a/rtengine/dcraw.h b/rtengine/dcraw.h
index d5357cc53..f9e6389ce 100644
--- a/rtengine/dcraw.h
+++ b/rtengine/dcraw.h
@@ -75,7 +75,7 @@ protected:
FILE *ofp;
short order;
const char *ifname;
- char *meta_data, xtrans[6][6];
+ char *meta_data, xtrans[6][6],xtrans_abs[6][6];
char cdesc[5], desc[512], make[64], model[64], model2[64], model3[64], artist[64];
float flash_used, canon_ev, iso_speed, shutter, aperture, focal_len;
time_t timestamp;
diff --git a/rtengine/dcraw.patch b/rtengine/dcraw.patch
index 3ca0a6dbc..44f6a6f3a 100755
--- a/rtengine/dcraw.patch
+++ b/rtengine/dcraw.patch
@@ -1,5 +1,5 @@
---- dcraw.c 2014-06-18 17:38:12 +0000
-+++ dcraw.cc 2014-06-18 17:46:28 +0000
+--- dcraw.c 2014-07-09 20:35:27 +0000
++++ dcraw.cc 2014-07-09 10:46:35 +0000
@@ -1,3 +1,15 @@
+/*RT*/#include
+/*RT*/#include
@@ -77,7 +77,7 @@
-FILE *ifp, *ofp;
-short order;
-const char *ifname;
--char *meta_data, xtrans[6][6];
+-char *meta_data, xtrans[6][6], xtrans_abs[6][6];
-char cdesc[5], desc[512], make[64], model[64], model2[64], artist[64];
-float flash_used, canon_ev, iso_speed, shutter, aperture, focal_len;
-time_t timestamp;
@@ -160,7 +160,7 @@
@@ -255,6 +216,7 @@
if (filters == 1) return filter[(row+top_margin)&15][(col+left_margin)&15];
- if (filters == 9) return xtrans[(row+top_margin+6)%6][(col+left_margin+6)%6];
+ if (filters == 9) return xtrans[(row+6) % 6][(col+6) % 6];
+
return FC(row,col);
}
@@ -182,7 +182,7 @@
}
void CLASS cubic_spline (const int *x_, const int *y_, const int len)
-@@ -595,10 +558,10 @@
+@@ -597,10 +560,10 @@
return 0;
}
@@ -196,7 +196,7 @@
unsigned c;
if (nbits > 25) return 0;
-@@ -1263,14 +1226,14 @@
+@@ -1265,14 +1228,14 @@
int i, nz;
char tail[424];
@@ -213,7 +213,7 @@
void CLASS ppm_thumb()
{
-@@ -1632,10 +1595,10 @@
+@@ -1634,10 +1597,10 @@
}
}
@@ -227,7 +227,7 @@
unsigned c;
if (nbits == -1)
-@@ -1901,10 +1864,10 @@
+@@ -1903,10 +1866,10 @@
maximum = curve[0x3ff];
}
@@ -241,7 +241,7 @@
int byte;
if (!nbits) return vbits=0;
-@@ -2193,11 +2156,11 @@
+@@ -2195,11 +2158,11 @@
METHODDEF(boolean)
fill_input_buffer (j_decompress_ptr cinfo)
{
@@ -255,7 +255,7 @@
cinfo->src->next_input_byte = jpeg_buffer;
cinfo->src->bytes_in_buffer = nbytes;
return TRUE;
-@@ -2522,10 +2485,9 @@
+@@ -2524,10 +2487,9 @@
maximum = (1 << (thumb_misc & 31)) - 1;
}
@@ -268,7 +268,7 @@
if (start) {
for (p=0; p < 4; p++)
pad[p] = key = key * 48828125 + 1;
-@@ -2610,11 +2572,13 @@
+@@ -2612,11 +2574,13 @@
bit += 7;
}
for (i=0; i < 16; i++, col+=2)
@@ -283,7 +283,7 @@
}
void CLASS samsung_load_raw()
-@@ -2861,7 +2825,7 @@
+@@ -2863,7 +2827,7 @@
void CLASS foveon_decoder (unsigned size, unsigned code)
{
@@ -292,7 +292,7 @@
struct decode *cur;
int i, len;
-@@ -3584,10 +3548,13 @@
+@@ -3586,10 +3550,13 @@
}
}
} else {
@@ -308,7 +308,7 @@
if (mask[0][3] > 0) goto mask_set;
if (load_raw == &CLASS canon_load_raw ||
load_raw == &CLASS lossless_jpeg_load_raw) {
-@@ -4183,239 +4150,8 @@
+@@ -4191,239 +4158,8 @@
}
}
@@ -549,7 +549,7 @@
void CLASS cielab (ushort rgb[3], short lab[3])
{
-@@ -4676,112 +4412,7 @@
+@@ -4684,112 +4420,7 @@
}
#undef fcol
@@ -662,7 +662,7 @@
#undef TS
void CLASS median_filter()
-@@ -4951,7 +4582,7 @@
+@@ -4959,7 +4590,7 @@
}
}
@@ -671,7 +671,7 @@
void CLASS parse_makernote (int base, int uptag)
{
-@@ -5108,7 +4739,8 @@
+@@ -5116,7 +4747,8 @@
cam_mul[2] = get4() << 2;
}
}
@@ -681,7 +681,7 @@
fread (model, 64, 1, ifp);
if (strstr(make,"PENTAX")) {
if (tag == 0x1b) tag = 0x1018;
-@@ -5359,7 +4991,7 @@
+@@ -5367,7 +4999,7 @@
{ "","DCB2","Volare","Cantare","CMost","Valeo 6","Valeo 11","Valeo 22",
"Valeo 11p","Valeo 17","","Aptus 17","Aptus 22","Aptus 75","Aptus 65",
"Aptus 54S","Aptus 65S","Aptus 75S","AFi 5","AFi 6","AFi 7",
@@ -690,7 +690,7 @@
"","","","","Aptus-II 10R","Aptus-II 8","","Aptus-II 12","","AFi-II 12" };
float romm_cam[3][3];
-@@ -5448,6 +5080,8 @@
+@@ -5456,6 +5088,8 @@
wbi = -2;
}
if (tag == 2118) wbtemp = getint(type);
@@ -699,7 +699,7 @@
if (tag == 2130 + wbi)
FORC3 mul[c] = getreal(type);
if (tag == 2140 + wbi && wbi >= 0)
-@@ -5467,8 +5101,8 @@
+@@ -5475,8 +5109,8 @@
}
}
@@ -710,7 +710,7 @@
int CLASS parse_tiff_ifd (int base)
{
-@@ -5481,7 +5115,7 @@
+@@ -5489,7 +5123,7 @@
unsigned sony_curve[] = { 0,0,0,0,0,4095 };
unsigned *buf, sony_offset=0, sony_length=0, sony_key=0;
struct jhead jh;
@@ -719,7 +719,7 @@
if (tiff_nifds >= sizeof tiff_ifd / sizeof tiff_ifd[0])
return 1;
-@@ -5555,7 +5189,8 @@
+@@ -5564,7 +5198,8 @@
fgets (make, 64, ifp);
break;
case 272: /* Model */
@@ -729,7 +729,7 @@
break;
case 280: /* Panasonic RW2 offset */
if (type != 4) break;
-@@ -5611,6 +5246,9 @@
+@@ -5620,6 +5255,9 @@
case 315: /* Artist */
fread (artist, 64, 1, ifp);
break;
@@ -739,7 +739,7 @@
case 322: /* TileWidth */
tiff_ifd[ifd].tile_width = getint(type);
break;
-@@ -5626,6 +5264,9 @@
+@@ -5635,6 +5273,9 @@
is_raw = 5;
}
break;
@@ -749,7 +749,7 @@
case 330: /* SubIFDs */
if (!strcmp(model,"DSLR-A100") && tiff_ifd[ifd].width == 3872) {
load_raw = &CLASS sony_arw_load_raw;
-@@ -5639,6 +5280,9 @@
+@@ -5648,6 +5289,9 @@
fseek (ifp, i+4, SEEK_SET);
}
break;
@@ -759,7 +759,7 @@
case 400:
strcpy (make, "Sarnoff");
maximum = 0xfff;
-@@ -5820,6 +5464,9 @@
+@@ -5828,6 +5472,9 @@
if (!make[0]) strcpy (make, "DNG");
is_raw = 1;
break;
@@ -769,7 +769,7 @@
case 50710: /* CFAPlaneColor */
if (filters == 9) break;
if (len > 4) len = 4;
-@@ -5851,10 +5498,21 @@
+@@ -5859,10 +5506,21 @@
case 61450:
cblack[4] = cblack[5] = MIN(sqrt(len),64);
case 50714: /* BlackLevel */
@@ -795,7 +795,7 @@
case 50715: /* BlackLevelDeltaH */
case 50716: /* BlackLevelDeltaV */
for (num=i=0; i < len; i++)
-@@ -5932,12 +5590,15 @@
+@@ -5940,12 +5598,15 @@
fread (buf, sony_length, 1, ifp);
sony_decrypt (buf, sony_length/4, 1, sony_key);
sfp = ifp;
@@ -817,7 +817,7 @@
ifp = sfp;
free (buf);
}
-@@ -5961,6 +5622,7 @@
+@@ -5969,6 +5630,7 @@
int CLASS parse_tiff (int base)
{
int doff;
@@ -825,7 +825,7 @@
fseek (ifp, base, SEEK_SET);
order = get2();
-@@ -6038,7 +5700,7 @@
+@@ -6046,7 +5708,7 @@
case 8: load_raw = &CLASS eight_bit_load_raw; break;
case 12: if (tiff_ifd[raw].phint == 2)
load_flags = 6;
@@ -834,7 +834,7 @@
case 14: load_flags = 0;
case 16: load_raw = &CLASS unpacked_load_raw;
if (!strncmp(make,"OLYMPUS",7) &&
-@@ -6071,6 +5733,7 @@
+@@ -6079,6 +5741,7 @@
case 32803: load_raw = &CLASS kodak_65000_load_raw;
}
case 32867: case 34892: break;
@@ -842,7 +842,7 @@
default: is_raw = 0;
}
if (!dng_version)
-@@ -6156,7 +5819,7 @@
+@@ -6164,7 +5827,7 @@
{
const char *file, *ext;
char *jname, *jfile, *jext;
@@ -851,7 +851,7 @@
ext = strrchr (ifname, '.');
file = strrchr (ifname, '/');
-@@ -6178,13 +5841,14 @@
+@@ -6186,13 +5849,14 @@
} else
while (isdigit(*--jext)) {
if (*jext != '9') {
@@ -868,7 +868,7 @@
if (verbose)
fprintf (stderr,_("Reading metadata from %s ...\n"), jname);
parse_tiff (12);
-@@ -6529,7 +6193,11 @@
+@@ -6537,7 +6201,11 @@
order = get2();
hlen = get4();
if (get4() == 0x48454150) /* "HEAP" */
@@ -880,7 +880,7 @@
if (parse_tiff (save+6)) apply_tiff();
fseek (ifp, save+len, SEEK_SET);
}
-@@ -6781,7 +6449,8 @@
+@@ -6789,7 +6457,8 @@
{
static const struct {
const char *prefix;
@@ -890,7 +890,7 @@
} table[] = {
{ "AgfaPhoto DC-833m", 0, 0, /* DJC */
{ 11438,-3762,-1115,-2409,9914,2497,-1227,2295,5300 } },
-@@ -7668,6 +7337,27 @@
+@@ -7690,6 +7359,27 @@
}
break;
}
@@ -918,7 +918,7 @@
}
void CLASS simple_coeff (int index)
-@@ -7945,7 +7635,7 @@
+@@ -7967,7 +7657,7 @@
tiff_flip = flip = filters = UINT_MAX; /* unknown */
raw_height = raw_width = fuji_width = fuji_layout = cr2_slice[0] = 0;
maximum = height = width = top_margin = left_margin = 0;
@@ -927,7 +927,7 @@
iso_speed = shutter = aperture = focal_len = unique_id = 0;
tiff_nifds = 0;
memset (tiff_ifd, 0, sizeof tiff_ifd);
-@@ -7977,13 +7667,20 @@
+@@ -7999,13 +7689,20 @@
fread (head, 1, 32, ifp);
fseek (ifp, 0, SEEK_END);
flen = fsize = ftell(ifp);
@@ -950,7 +950,7 @@
parse_ciff (hlen, flen-hlen, 0);
load_raw = &CLASS canon_load_raw;
} else if (parse_tiff(0)) apply_tiff();
-@@ -8029,6 +7726,7 @@
+@@ -8051,6 +7748,7 @@
fseek (ifp, 100+28*(shot_select > 0), SEEK_SET);
parse_tiff (data_offset = get4());
parse_tiff (thumb_offset+12);
@@ -958,7 +958,7 @@
apply_tiff();
} else if (!memcmp (head,"RIFF",4)) {
fseek (ifp, 0, SEEK_SET);
-@@ -8138,15 +7836,18 @@
+@@ -8160,15 +7858,18 @@
if (make[0] == 0) parse_smal (0, flen);
if (make[0] == 0) {
parse_jpeg(0);
@@ -986,7 +986,7 @@
}
for (i=0; i < sizeof corp / sizeof *corp; i++)
-@@ -8179,7 +7880,7 @@
+@@ -8201,7 +7902,7 @@
if (height == 3136 && width == 4864) /* Pentax K20D and Samsung GX20 */
{ height = 3124; width = 4688; filters = 0x16161616; }
if (width == 4352 && (!strcmp(model,"K-r") || !strcmp(model,"K-x")))
@@ -995,7 +995,7 @@
if (width >= 4960 && !strncmp(model,"K-5",3))
{ left_margin = 10; width = 4950; filters = 0x16161616; }
if (width == 4736 && !strcmp(model,"K-7"))
-@@ -8198,6 +7899,7 @@
+@@ -8220,6 +7921,7 @@
switch (tiff_compress) {
case 1: load_raw = &CLASS packed_dng_load_raw; break;
case 7: load_raw = &CLASS lossless_dng_load_raw; break;
@@ -1003,7 +1003,7 @@
case 34892: load_raw = &CLASS lossy_dng_load_raw; break;
default: load_raw = 0;
}
-@@ -8325,7 +8027,7 @@
+@@ -8347,7 +8049,7 @@
width -= 44;
} else if (!strcmp(model,"D3200") ||
!strcmp(model,"D600") ||
@@ -1012,7 +1012,7 @@
width -= 46;
} else if (!strcmp(model,"D4") ||
!strcmp(model,"Df")) {
-@@ -8542,6 +8244,7 @@
+@@ -8567,6 +8269,7 @@
if (load_raw == &CLASS lossless_jpeg_load_raw)
load_raw = &CLASS hasselblad_load_raw;
if (raw_width == 7262) {
@@ -1020,7 +1020,7 @@
height = 5444;
width = 7248;
top_margin = 4;
-@@ -8553,13 +8256,31 @@
+@@ -8578,13 +8281,31 @@
top_margin = 4;
left_margin = 41;
filters = 0x61616161;
@@ -1054,7 +1054,7 @@
} else if (raw_width == 4090) {
strcpy (model, "V96C");
height -= (top_margin = 6);
-@@ -8612,6 +8333,7 @@
+@@ -8637,6 +8358,7 @@
filters = 0x16161616;
}
} else if (!strcmp(make,"Leica") || !strcmp(make,"Panasonic")) {
@@ -1062,7 +1062,7 @@
if ((flen - data_offset) / (raw_width*8/7) == raw_height)
load_raw = &CLASS panasonic_load_raw;
if (!load_raw) {
-@@ -8629,6 +8351,7 @@
+@@ -8654,6 +8376,7 @@
}
filters = 0x01010101 * (uchar) "\x94\x61\x49\x16"
[((filters-1) ^ (left_margin & 1) ^ (top_margin << 1)) & 3];
@@ -1070,7 +1070,7 @@
} else if (!strcmp(model,"C770UZ")) {
height = 1718;
width = 2304;
-@@ -8856,6 +8579,10 @@
+@@ -8883,6 +8606,10 @@
memcpy (rgb_cam, cmatrix, sizeof cmatrix);
raw_color = 0;
}
@@ -1081,7 +1081,7 @@
if (raw_color) adobe_coeff (make, model);
if (load_raw == &CLASS kodak_radc_load_raw)
if (raw_color) adobe_coeff ("Apple","Quicktake");
-@@ -8872,7 +8599,7 @@
+@@ -8899,7 +8626,7 @@
if (!tiff_bps) tiff_bps = 12;
if (!maximum) maximum = (1 << tiff_bps) - 1;
if (!load_raw || height < 22 || width < 22 ||
@@ -1090,7 +1090,7 @@
is_raw = 0;
#ifdef NO_JASPER
if (load_raw == &CLASS redcine_load_raw) {
-@@ -8951,194 +8678,245 @@
+@@ -8978,194 +8705,245 @@
}
#endif
@@ -1511,7 +1511,7 @@
struct tiff_tag {
ushort tag, type;
-@@ -9161,585 +8939,12 @@
+@@ -9188,585 +8966,12 @@
unsigned gps[26];
char desc[512], make[64], model[64], soft[32], date[20], artist[64];
};
diff --git a/rtengine/demosaic_algos.cc b/rtengine/demosaic_algos.cc
index 8de8d9074..f9c826bcc 100644
--- a/rtengine/demosaic_algos.cc
+++ b/rtengine/demosaic_algos.cc
@@ -63,7 +63,7 @@ extern const Settings* settings;
void RawImageSource::eahd_demosaic () {
if (plistener) {
- plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), RAWParams::methodstring[RAWParams::eahd]));
+ plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::eahd]));
plistener->setProgress (0.0);
}
@@ -499,7 +499,7 @@ void RawImageSource::hphd_green (float** hpmap) {
void RawImageSource::hphd_demosaic () {
if (plistener) {
- plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), RAWParams::methodstring[RAWParams::hphd]));
+ plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::hphd]));
plistener->setProgress (0.0);
}
@@ -597,7 +597,7 @@ void RawImageSource::vng4_demosaic () {
const bool plistenerActive = plistener;
if (plistenerActive) {
- plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), RAWParams::methodstring[RAWParams::vng4]));
+ plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::vng4]));
plistener->setProgress (progress);
}
@@ -1223,7 +1223,7 @@ void RawImageSource::lmmse_interpolate_omp(int winw, int winh, int iterations)
if(iterations==0) {applyGamma=false;iter=0;} else applyGamma=true;
if (plistener) {
- plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), RAWParams::methodstring[RAWParams::lmmse]));
+ plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::lmmse]));
plistener->setProgress (0.0);
}
float (*image)[3];
@@ -1611,7 +1611,7 @@ SSEFUNCTION void RawImageSource::igv_interpolate(int winw, int winh)
border_interpolate2(winw,winh,7);
if (plistener) {
- plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), RAWParams::methodstring[RAWParams::igv]));
+ plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::igv]));
plistener->setProgress (0.0);
}
#ifdef _OPENMP
@@ -2199,7 +2199,7 @@ void RawImageSource::ahd_demosaic(int winx, int winy, int winw, int winh)
const float d65_white[3] = { 0.950456, 1, 1.088754 };
if (plistener) {
- plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), RAWParams::methodstring[RAWParams::ahd]));
+ plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::ahd]));
plistener->setProgress (0.0);
}
@@ -2361,12 +2361,18 @@ void RawImageSource::nodemosaic(bool bw)
for (int j=0; jgetSensorType()!=ST_FUJI_XTRANS){
switch( FC(i,j)) {
case 0: red[i][j] = rawData[i][j]; green[i][j]=blue[i][j]=0; break;
case 1: green[i][j] = rawData[i][j]; red[i][j]=blue[i][j]=0; break;
case 2: blue[i][j] = rawData[i][j]; red[i][j]=green[i][j]=0; break;
}
+ } else {
+ switch( ri->XTRANSFC(i,j)) {
+ case 0: red[i][j] = rawData[i][j]; green[i][j]=blue[i][j]=0; break;
+ case 1: green[i][j] = rawData[i][j]; red[i][j]=blue[i][j]=0; break;
+ case 2: blue[i][j] = rawData[i][j]; red[i][j]=green[i][j]=0; break;
+ }
}
}
}
@@ -3071,7 +3077,7 @@ void RawImageSource::dcb_demosaic(int iterations, bool dcb_enhance)
{
double currentProgress=0.0;
if(plistener) {
- plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), RAWParams::methodstring[RAWParams::dcb]));
+ plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::dcb]));
plistener->setProgress (currentProgress);
}
@@ -3190,6 +3196,595 @@ void RawImageSource::dcb_demosaic(int iterations, bool dcb_enhance)
if(plistener) plistener->setProgress (1.0);
}
+
+const double xyz_rgb[3][3] = { // XYZ from RGB
+ { 0.412453, 0.357580, 0.180423 },
+ { 0.212671, 0.715160, 0.072169 },
+ { 0.019334, 0.119193, 0.950227 } };
+const float d65_white[3] = { 0.950456, 1, 1.088754 };
+
+void RawImageSource::cielab (const float (*rgb)[3], float* l, float* a, float *b, const int width, const int height, const int labWidth, const float xyz_cam[3][3])
+{
+ static float cbrt[0x10000];
+ static bool cbrtinit = false;
+ if (!rgb) {
+ int i, j, k;
+ float r;
+ if(!cbrtinit) {
+ for (i=0; i < 0x10000; i++) {
+ r = i / 65535.f;
+ cbrt[i] = r > 0.008856f ? xcbrtf(r) : 7.787f*r + 16.f/116.f;
+ }
+ cbrtinit = true;
+ }
+ return;
+ }
+
+ int rgbOffset = (width - labWidth);
+ for(int i=0;igetXtransMatrix(xtrans);
+
+ for (int row=0; row < height; row++)
+ for (int col=0; col < width; col++) {
+ if (col==border && row >= border && row < height-border)
+ col = width-border;
+ float sum[6] = {0.f};
+ for (int y=MAX(0,row-1); y <= MIN(row+1,height-1); y++)
+ for (int x=MAX(0,col-1); x <= MIN(col+1,width-1); x++) {
+ int f = fcol(y,x);
+ sum[f] += rawData[y][x];
+ sum[f+3]++;
+ }
+
+ switch(fcol(row,col)) {
+ case 0: red[row][col] = rawData[row][col];
+ green[row][col] = (sum[1]/sum[4]);
+ blue[row][col] = (sum[2]/sum[5]);
+ break;
+ case 1: if(sum[3]==0.f) { // at the 4 corner pixels it can happen, that we have only green pixels in 2x2 area
+ red[row][col] = green[row][col] = blue[row][col] = rawData[row][col];
+ } else {
+ red[row][col] = (sum[0]/sum[3]);
+ green[row][col] = rawData[row][col];
+ blue[row][col] = (sum[2]/sum[5]);
+ }
+ break;
+ case 2: red[row][col] = (sum[0]/sum[3]);
+ green[row][col] = (sum[1]/sum[4]);
+ blue[row][col] = rawData[row][col];
+ }
+ }
+}
+
+/*
+ Frank Markesteijn's algorithm for Fuji X-Trans sensors
+ adapted to RT by Ingo Weyrich 2014
+*/
+
+#define TS 122 /* Tile Size */
+
+void RawImageSource::xtrans_interpolate (int passes, bool useCieLab)
+{
+ double progress = 0.0;
+ const bool plistenerActive = plistener;
+
+ if (plistenerActive) {
+ plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), "Xtrans"));
+ plistener->setProgress (progress);
+ }
+
+ char xtrans[6][6];
+ ri->getXtransMatrix(xtrans);
+
+ static const short orth[12] = { 1,0,0,1,-1,0,0,-1,1,0,0,1 },
+ patt[2][16] = { { 0,1,0,-1,2,0,-1,0,1,1,1,-1,0,0,0,0 },
+ { 0,1,0,-2,1,0,-2,0,1,1,-2,-2,1,-1,-1,1 } },
+ dir[4] = { 1,TS,TS+1,TS-1 };
+
+ short allhex[2][3][3][8];
+
+ // sgrow/sgcol is the offset in the sensor matrix of the solitary
+ // green pixels
+ ushort sgrow, sgcol;
+
+ const int height = H, width = W;
+
+ if (settings->verbose)
+ printf("%d-pass X-Trans interpolation using %s conversion...\n", passes, useCieLab ? "lab" : "yuv");
+
+ xtransborder_interpolate(6);
+
+ float xyz_cam[3][3];
+ {
+ float rgb_cam[3][4];
+ ri->getRgbCam(rgb_cam);
+ int k;
+ for (int i=0; i < 3; i++)
+ for (int j=0; j < 3; j++)
+ for (xyz_cam[i][j] = k=0; k < 3; k++)
+ xyz_cam[i][j] += xyz_rgb[i][k] * rgb_cam[k][j] / d65_white[i];
+ }
+
+/* Map a green hexagon around each non-green pixel and vice versa: */
+{
+ int gint, d, h, v, ng, row, col, c;
+
+ for (row=0; row < 3; row++)
+ for (col=0; col < 3; col++) {
+ gint = fcol(row,col) == 1;
+ for (ng=d=0; d < 10; d+=2) {
+ if (fcol(row+orth[d]+6,col+orth[d+2]+6) == 1)
+ ng=0;
+ else
+ ng++;
+ if (ng == 4) {
+ // if there are four non-green pixels adjacent in cardinal
+ // directions, this is the solitary green pixel
+ sgrow = row;
+ sgcol = col;
+ }
+ if (ng == gint+1)
+ FORC(8) {
+ v = orth[d]*patt[gint][c*2] + orth[d+1]*patt[gint][c*2+1];
+ h = orth[d+2]*patt[gint][c*2] + orth[d+3]*patt[gint][c*2+1];
+ allhex[0][row][col][c^(gint*2 & d)] = h + v*width;
+ allhex[1][row][col][c^(gint*2 & d)] = h + v*TS;
+ }
+ }
+ }
+
+}
+ if(plistenerActive) {
+ progress += 0.05;
+ plistener->setProgress(progress);
+ }
+
+
+ double progressInc = 36.0*(1.0-progress)/((H*W)/((TS-16)*(TS-16)));
+ const int ndir = 4 << (passes > 1);
+ cielab (0,0,0,0,0,0,0,0);
+ struct s_minmaxgreen {
+ float min;
+ float max;
+ };
+
+ int RightShift[6];
+ for(int row=0;row<6;row++) {
+ // count number of green pixels in three cols
+ int greencount = 0;
+ for(int col=0;col<3;col++)
+ greencount += (fcol(row,col) == 1);
+ RightShift[row] = (greencount == 2);
+ }
+
+
+#pragma omp parallel
+{
+ int progressCounter = 0;
+ short *hex;
+ int c, d, f, h, i, v, mrow, mcol;
+ int pass;
+ float color[3][8], g, val;
+ float (*rgb)[TS][TS][3], (*rix)[3];
+ float (*lab)[TS-8][TS-8];
+ float (*drv)[TS-10][TS-10], diff[6], tr;
+ s_minmaxgreen (*greenminmaxtile)[TS];
+ uint8_t (*homo)[TS][TS];
+ uint8_t (*homosum)[TS][TS];
+ float *buffer;
+ buffer = (float *) malloc ((TS*TS*(ndir*3+11)+128)*sizeof(float));
+ rgb = (float(*)[TS][TS][3]) buffer;
+ lab = (float (*) [TS-8][TS-8])(buffer + TS*TS*(ndir*3));
+ drv = (float (*)[TS-10][TS-10]) (buffer + TS*TS*(ndir*3+3));
+ homo = (uint8_t (*)[TS][TS]) (lab); // we can reuse the lab-buffer because they are not used together
+ greenminmaxtile = (s_minmaxgreen(*)[TS]) (lab); // we can reuse the lab-buffer because they are not used together
+ homosum = (uint8_t (*)[TS][TS]) (drv); // we can reuse the drv-buffer because they are not used together
+
+#pragma omp for collapse(2) schedule(dynamic) nowait
+ for (int top=3; top < height-19; top += TS-16)
+ for (int left=3; left < width-19; left += TS-16) {
+ int mrow = MIN (top+TS, height-3);
+ int mcol = MIN (left+TS, width-3);
+ memset(rgb,0,TS*TS*3*sizeof(float));
+ for (int row=top; row < mrow; row++)
+ for (int col=left; col < mcol; col++) {
+ rgb[0][row-top][col-left][fcol(row,col)] = rawData[row][col];
+ }
+ FORC3 memcpy (rgb[c+1], rgb[0], sizeof *rgb);
+
+ /* Set green1 and green3 to the minimum and maximum allowed values: */
+ for (int row=top; row < mrow; row++) {
+ float minval=FLT_MAX;
+ float maxval=0.f;
+ int shiftindex = RightShift[(row)%6];
+ for (int col=left; col < mcol; col++) {
+ if (fcol(row,col) == 1) {
+ minval=FLT_MAX;
+ maxval=0.f;
+ continue;
+ }
+ float *pix = &rawData[row][col];
+ hex = allhex[0][row % 3][col % 3];
+ if (maxval==0.f)
+ FORC(6) {
+ val = pix[hex[c]];
+ if (minval > val)
+ minval = val;
+ if (maxval < val)
+ maxval = val;
+ }
+ greenminmaxtile[row-top][(col-left)>>shiftindex].min = minval;
+ greenminmaxtile[row-top][(col-left)>>shiftindex].max = maxval;
+ switch ((row-sgrow) % 3) {
+ case 1: if (row < mrow-1) {
+ row++;
+ shiftindex = RightShift[(row)%6];
+ col--;
+ }
+ break;
+ case 2: minval=FLT_MAX;
+ maxval=0.f;
+ if ((col+=2) < mcol-1 && row > top+1) {
+ row--;
+ shiftindex = RightShift[(row)%6];
+ }
+ }
+ }
+ }
+
+ /* Interpolate green horizontally, vertically, and along both diagonals: */
+ for (int row=top; row < mrow; row++) {
+ // find first non-green pixel
+ int leftstart = left;
+ for(;leftstart>shiftindex].min,greenminmaxtile[row-top][(col-left)>>shiftindex].max);
+ }
+ }
+ for (pass=0; pass < passes; pass++) {
+ if (pass == 1)
+ memcpy (rgb+=4, buffer, 4*sizeof *rgb);
+
+/* Recalculate green from interpolated values of closer pixels: */
+ if (pass) {
+ for (int row=top+2; row < mrow-2; row++) {
+ int leftstart = left+2;
+ for(;leftstart>shiftindex].min,greenminmaxtile[row-top][(col-left)>>shiftindex].max);
+ }
+ }
+ }
+ }
+
+/* Interpolate red and blue values for solitary green pixels: */
+ for (int row=(top-sgrow+4)/3*3+sgrow; row < mrow-2; row+=3)
+ for (int col=(left-sgcol+4)/3*3+sgcol; col < mcol-2; col+=3) {
+ rix = &rgb[0][row-top][col-left];
+ h = fcol(row,col+1);
+ memset (diff, 0, sizeof diff);
+ for (i=1, d=0; d < 6; d++, i^=TS^1, h^=2) {
+ for (c=0; c < 2; c++, h^=2) {
+ g = rix[0][1] + rix[0][1] - rix[i< 1)
+ diff[d] += SQR (rix[i< 2 && (d & 1)) // 3, 5
+ if (diff[d-1] < diff[d])
+ FORC(2)
+ color[c*2][d] = color[c*2][d-1];
+ if ((d & 1) || d < 2) { // d: 0, 1, 3, 5
+ FORC(2)
+ rix[0][c*2] = CLIP(0.5f*color[c*2][d]);
+ rix += TS*TS;
+ }
+ }
+ }
+
+/* Interpolate red for blue pixels and vice versa: */
+ for (int row=top+1; row < mrow-1; row++) {
+ i = (row-sgrow) % 3 ? TS:1;
+ int leftstart = left+1;
+ for(;leftstart hm[d])
+ hm[d] = 0;
+ }
+ maxval -= maxval >> 3;
+ float avg[4] = {0.f};
+ for (d=0; d < ndir; d++)
+ if (hm[d] >= maxval) {
+ FORC3 avg[c] += rgb[d][row][col][c];
+ avg[3]++;
+ }
+
+ red[row+top][col+left] = (avg[0]/avg[3]);
+ green[row+top][col+left] = (avg[1]/avg[3]);
+ blue[row+top][col+left] = (avg[2]/avg[3]);
+ }
+
+ if(plistenerActive && ((++progressCounter) % 32 == 0)) {
+#ifdef _OPENMP
+#pragma omp critical (xtransdemosaic)
+#endif
+{
+ progress += progressInc;
+ progress = min(1.0,progress);
+ plistener->setProgress (progress);
+}
+ }
+
+
+ }
+ free(buffer);
+}
+
+}
+
+#undef TS
+
+void RawImageSource::fast_xtrans_interpolate ()
+{
+ if (settings->verbose)
+ printf("fast X-Trans interpolation...\n");
+
+ double progress = 0.0;
+ const bool plistenerActive = plistener;
+
+ if (plistenerActive) {
+ plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), "fast Xtrans"));
+ plistener->setProgress (progress);
+ }
+
+ const int height = H, width = W;
+
+ xtransborder_interpolate (1);
+ char xtrans[6][6];
+ ri->getXtransMatrix(xtrans);
+
+#pragma omp parallel for
+ for(int row=1;rowsetProgress (1.0);
+ }
+}
+#undef fcol
+
+
+
#undef TILEBORDER
#undef TILESIZE
#undef CACHESIZE
diff --git a/rtengine/dfmanager.cc b/rtengine/dfmanager.cc
index 1a13812cc..4d95fa93e 100644
--- a/rtengine/dfmanager.cc
+++ b/rtengine/dfmanager.cc
@@ -120,7 +120,7 @@ void dfInfo::updateRawImage()
int H = ri->get_height();
int W = ri->get_width();
ri->compress_image();
- int rSize = W*(ri->isBayer()?1:3);
+ int rSize = W*((ri->getSensorType()!=ST_NONE)?1:3);
acc_t **acc = new acc_t*[H];
for( int row=0; rowloadRaw(true)){
temp->compress_image(); //\ TODO would be better working on original, because is temporary
nFiles++;
- if( ri->isBayer() ){
+ if( ri->getSensorType()!=ST_NONE ){
for( int row=0; rowdata[row][col];
@@ -173,7 +173,7 @@ void dfInfo::updateRawImage()
void dfInfo::updateBadPixelList( RawImage *df )
{
const int threshold=10;
- if( df->isBayer() ){
+ if( ri->getSensorType()!=ST_NONE ){
for( int row=2; rowget_height()-2; row++)
for( int col=2; col < df->get_width()-2; col++){
int m = (df->data[row-2][col-2] + df->data[row-2][col] + df->data[row-2][col+2]+
diff --git a/rtengine/expo_before_b.cc b/rtengine/expo_before_b.cc
index 6dfe33665..f5574a5c1 100644
--- a/rtengine/expo_before_b.cc
+++ b/rtengine/expo_before_b.cc
@@ -24,7 +24,11 @@
// Jacques Desmis
// use fast-demo(provisional) from Emil Martinec
-// inspired from work Guillermo Luijk and Manuel LLorens(Perfectraw)
+// inspired from work Guillermo Luijk and Manuel LLorens(Perfectraw)
+// Ingo Weyrich (2014-07-07)
+// optimized the highlight protection case
+// needs 2*width*height*sizeof(float) byte less memory than before
+// needs about 60% less processing time than before
//
// This function uses parameters:
// exposure (linear): 2^(-8..0..8): currently 0.5 +3
@@ -34,7 +38,6 @@
#include "rawimagesource.h"
#include "mytime.h"
#include "rt_math.h"
-#include "../rtgui/options.h"
namespace rtengine {
@@ -42,122 +45,107 @@ extern const Settings* settings;
void RawImageSource::processRawWhitepoint(float expos, float preser) {
MyTime t1e,t2e;
- t1e.set();
+ if (settings->verbose)
+ t1e.set();
int width=W, height=H;
-
// exposure correction inspired from G.Luijk
- if (fabs(preser)<0.001) {
+
+ for (int c=0; c<4; c++)
+ chmax[c] *= expos;
+
+ if (fabs(preser)<0.001f) {
// No highlight protection - simple mutiplication
- for (int c=0; c<4; c++) chmax[c] *= expos;
- #pragma omp parallel for
- for (int row=0;rowisBayer()) {
- rawData[row][col] *= expos;
- } else {
- rawData[row][col*3] *= expos;
- rawData[row][col*3+1] *= expos;
- rawData[row][col*3+2] *= expos;
- }
- }
+ if (ri->getSensorType()!=ST_NONE)
+ #pragma omp parallel for
+ for (int row=0;rowisBayer()) {
- // save old image as it's overwritten by demosaic
- float** imgd = allocArray< float >(W,H);
-
- // with memcpy it's faster than for (...)
- for (int i=0; i(imgd, H);
- } else {
- // Non-Bayers are already RGB
-
- // CIE luminosity
- #pragma omp parallel for
- for(int row=0;rowgetSensorType()!=ST_NONE) {
+ // Demosaic to allow calculation of luminosity.
+ if(ri->getSensorType()==ST_BAYER)
+ fast_demosaic (0,0,W,H);
+ else
+ fast_xtrans_interpolate();
}
// Find maximum to adjust LUTs. New float engines clips only at the very end
- int maxVal=0;
- for(int row=0;rowisBayer()) {
- if (rawData[row][col]>maxVal) maxVal = rawData[row][col];
- } else {
- for (int c=0;c<3;c++) if (rawData[row][col*3+c]>maxVal) maxVal = rawData[row][col*3+c];
- }
- }
-
- // Exposure correction with highlight preservation
- LUTf lut(maxVal+1);
- if(expos>1){
- // Positive exposure
-
- float K = (float) maxVal / expos*exp(-preser*log(2.0));
- for (int j=0;j<=maxVal;j++)
- lut[(int)j]=(((float)maxVal-K*expos)/((float)maxVal-K)*(j-maxVal)+(float) maxVal) / j;
-
- for (int c=0; c<4; c++) chmax[c] *= expos;
-
- #pragma omp parallel for
+ float maxValFloat = 0.f;
+#pragma omp parallel
+{
+ float maxValFloatThr = 0.f;
+ if (ri->getSensorType()!=ST_NONE)
+#pragma omp for schedule(dynamic,16) nowait
for(int row=0;rowisBayer()) {
- rawData[row][col] *= fac;
- } else {
- for (int c=0;c<3;c++) rawData[row][col*3+c] *= fac;
- }
+ for (int col=0;colmaxValFloatThr)
+ maxValFloatThr = rawData[row][col];
+ }
+ else
+#pragma omp for schedule(dynamic,16) nowait
+ for(int row=0;rowmaxValFloatThr)
+ maxValFloatThr = rawData[row][col*3+c];
}
+
+#pragma omp critical
+{
+ if(maxValFloatThr > maxValFloat)
+ maxValFloat = maxValFloatThr;
+}
+}
+
+ // Exposure correction with highlight preservation
+ int maxVal = maxValFloat;
+ LUTf lut(maxVal+1);
+ float K;
+ if(expos>1){
+ // Positive exposure
+ K = (float) maxVal / expos*exp(-preser*log(2.0));
+ for (int j=0;j<=maxVal;j++)
+ lut[(int)j]=(((float)maxVal-K*expos)/((float)maxVal-K)*(j-maxVal)+(float) maxVal) / j;
} else {
// Negative exposure
float EV=log(expos)/log(2.0); // Convert exp. linear to EV
- float K = (float)maxVal * exp(-preser * log(2.0));
+ K = (float)maxVal * exp(-preser * log(2.0));
for (int j=0;j<=maxVal;j++)
lut[(int)j] = exp(EV*((float)maxVal-j) / ((float)maxVal-K) * log(2.0));
-
- #pragma omp parallel for
- for(int row=0;rowisBayer()) {
- rawData[row][col] *= fac;
- } else {
- for (int c=0;c<3;c++) rawData[row][col*3+c] *= fac;
- }
- }
+ if (ri->getSensorType()!=ST_NONE)
+ #pragma omp parallel for schedule(dynamic,16)
+ for(int row=0;rowverbose)
- printf("Exposure before %d usec\n", t2e.etime(t1e));
+ if (settings->verbose) {
+ t2e.set();
+ printf("Exposure before %d usec\n", t2e.etime(t1e));
+ }
}
diff --git a/rtengine/fast_demo.cc b/rtengine/fast_demo.cc
index c82446548..7654d3586 100644
--- a/rtengine/fast_demo.cc
+++ b/rtengine/fast_demo.cc
@@ -61,7 +61,7 @@ SSEFUNCTION void RawImageSource::fast_demosaic(int winx, int winy, int winw, int
//int winw=W, winh=H;
if (plistener) {
- plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), RAWParams::methodstring[RAWParams::fast]));
+ plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::fast]));
plistener->setProgress (progress);
}
diff --git a/rtengine/ffmanager.cc b/rtengine/ffmanager.cc
index f888c5983..709f7b044 100644
--- a/rtengine/ffmanager.cc
+++ b/rtengine/ffmanager.cc
@@ -19,7 +19,6 @@
#include "ffmanager.h"
#include "../rtgui/options.h"
#include
-#include "../rtgui/guiutils.h"
#include "safegtk.h"
#include "rawimage.h"
#include
@@ -116,7 +115,7 @@ void ffInfo::updateRawImage()
int H = ri->get_height();
int W = ri->get_width();
ri->compress_image();
- int rSize = W*(ri->isBayer()?1:3);
+ int rSize = W*((ri->getSensorType()!=ST_NONE)?1:3);
acc_t **acc = new acc_t*[H];
for( int row=0; rowloadRaw(true)){
temp->compress_image(); //\ TODO would be better working on original, because is temporary
nFiles++;
- if( ri->isBayer() ){
+ if( ri->getSensorType()!=ST_NONE ){
for( int row=0; rowdata[row][col];
@@ -161,8 +160,9 @@ void ffInfo::updateRawImage()
if( ri->loadRaw(true)){
delete ri;
ri=NULL;
- }else
+ }else {
ri->compress_image();
+ }
}
}
diff --git a/rtengine/hlmultipliers.cc b/rtengine/hlmultipliers.cc
index f22a52517..e43a16a8f 100644
--- a/rtengine/hlmultipliers.cc
+++ b/rtengine/hlmultipliers.cc
@@ -249,10 +249,10 @@ void RawImageSource::updateHLRecoveryMap_ColorPropagation () {
for (int i=32; iISRED(i,j) || !ri->isBayer()) && red[j] > maxr) maxr = red[j];
- if ((ri->ISGREEN(i,j) || !ri->isBayer()) && green[i][j] > maxg) maxg = green[i][j];
- if ((ri->ISBLUE(i,j) || !ri->isBayer()) && blue[j] > maxb) maxb = blue[j];
- }
+ if ((ri->ISRED(i,j) || ri->getSensorType()!=ST_BAYER) && red[j] > maxr) maxr = red[j];
+ if ((ri->ISGREEN(i,j) || ri->getSensorType()!=ST_BAYER) && green[i][j] > maxg) maxg = green[i][j];
+ if ((ri->ISBLUE(i,j) || ri->getSensorType()!=ST_BAYER) && blue[j] > maxb) maxb = blue[j];
+ }
}
delete [] red;
delete [] blue;
diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc
index 21f3302e0..f9829c0b6 100644
--- a/rtengine/imagedata.cc
+++ b/rtengine/imagedata.cc
@@ -215,7 +215,11 @@ void ImageData::extractInfo () {
// Sometimes (e.g. DNG) EXIF already contains lens data
- if (root->findTag("MakerNote")) {
+ if(!make.compare (0, 8, "FUJIFILM")) {
+ if(exif->getTag ("LensModel")) {
+ lens = exif->getTag ("LensModel")->valueToString ();
+ }
+ } else if (root->findTag("MakerNote")) {
rtexif::TagDirectory* mnote = root->findTag("MakerNote")->getDirectory();
if (mnote && !make.compare (0, 5, "NIKON")) {
// ISO at max value supported, check manufacturer specific
diff --git a/rtengine/imageio.h b/rtengine/imageio.h
index 409852eea..81b64fd8a 100644
--- a/rtengine/imageio.h
+++ b/rtengine/imageio.h
@@ -58,6 +58,14 @@ namespace rtengine {
IIOSA_PLANAR
} IIOSampleArrangement;
+ typedef enum SensorType {
+ ST_NONE, // use this value if the image is already demosaiced (i.e. not a raw file)
+ ST_BAYER,
+ ST_FUJI_XTRANS,
+ //ST_FOVEON,
+ //ST_FUJI_EXR
+ } eSensorType;
+
class ImageIO : virtual public ImageDatas {
protected:
diff --git a/rtengine/imagesource.h b/rtengine/imagesource.h
index de7cbe6b8..b2d3b74b9 100644
--- a/rtengine/imagesource.h
+++ b/rtengine/imagesource.h
@@ -74,6 +74,7 @@ class ImageSource : public InitialImage {
// use right after demosaicing image, add coarse transformation and put the result in the provided Imagefloat*
virtual void getImage (ColorTemp ctemp, int tran, Imagefloat* image, PreviewProps pp, ToneCurveParams hlp, ColorManagementParams cmp, RAWParams raw) {}
+ virtual eSensorType getSensorType () { return ST_NONE; }
// true is ready to provide the AutoWB, i.e. when the image has been demosaiced for RawImageSource
virtual bool isWBProviderReady () =0;
diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc
index d11aac46c..d07acc454 100644
--- a/rtengine/improccoordinator.cc
+++ b/rtengine/improccoordinator.cc
@@ -146,12 +146,17 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) {
RAWParams rp = params.raw;
if( !highDetailNeeded ){
// if below 100% magnification, take a fast path
- if(rp.dmethod != RAWParams::methodstring[RAWParams::none] && rp.dmethod != RAWParams::methodstring[RAWParams::mono])
- rp.dmethod = RAWParams::methodstring[RAWParams::fast];
+ if(rp.bayersensor.method != RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::none] && rp.bayersensor.method != RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::mono])
+ rp.bayersensor.method = RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::fast];
+ //bayerrp.all_enhance = false;
+
+ if(rp.xtranssensor.method != RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::none] && rp.xtranssensor.method != RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::mono])
+ rp.xtranssensor.method = RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::fast];
+
+ rp.bayersensor.ccSteps = 0;
+ rp.xtranssensor.ccSteps = 0;
rp.hotdeadpix_filt = false;
- rp.ccSteps = 0;
- //rp.all_enhance = false;
- }
+ }
progress ("Applying white balance, color correction & sRGB conversion...",100*readyphase/numofphases);
// raw auto CA is bypassed if no high detail is needed, so we have to compute it when high detail is needed
@@ -181,7 +186,13 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) {
|| (!params.toneCurve.hrenabled && params.toneCurve.method=="Color" && imgsrc->IsrgbSourceModified()))
{
- if (settings->verbose) printf("Demosaic %s\n",rp.dmethod.c_str());
+ if (settings->verbose) {
+ if (imgsrc->getSensorType() == ST_BAYER)
+ printf("Demosaic Bayer image using method: %s\n",rp.bayersensor.method.c_str());
+ else if (imgsrc->getSensorType() == ST_FUJI_XTRANS)
+ printf("Demosaic X-Trans image with using method: %s\n",rp.xtranssensor.method.c_str());
+ }
+ imgsrc->isRAW();
imgsrc->demosaic( rp );
diff --git a/rtengine/procevents.h b/rtengine/procevents.h
index 2fb46b293..18acfdbc1 100644
--- a/rtengine/procevents.h
+++ b/rtengine/procevents.h
@@ -188,7 +188,7 @@ enum ProcEvent {
EvRGBgCurve=163,
EvRGBbCurve=164,
EvNeutralExp=165,
- EvDemosaicMethodPreProc=166,
+ EvDemosaicMethodPreProc=166,
EvLCCCurve=167,
EvLCHCurve=168,
EvVibranceSkinTonesCurve=169,
@@ -312,8 +312,12 @@ enum ProcEvent {
EvDPDNmetmed=284,
EvDPDNrgbmet=285,
EvDPDNpasses=286,
-
- NUMOFEVENTS=287
+ EvFlatFieldClipControl=287,
+ EvFlatFieldAutoClipControl=288,
+ EvPreProcessExpBlackRed=289,
+ EvPreProcessExpBlackGreen=290,
+ EvPreProcessExpBlackBlue=291,
+ NUMOFEVENTS
};
}
#endif
diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc
index 3ba3becc7..05427352c 100644
--- a/rtengine/procparams.cc
+++ b/rtengine/procparams.cc
@@ -42,7 +42,8 @@ using namespace std;
namespace rtengine {
namespace procparams {
- const char *RAWParams::methodstring[RAWParams::numMethods]={"amaze","igv","lmmse","eahd", "hphd", "vng4", "dcb", "ahd", "fast", "mono", "none" };
+ const char *RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::numMethods]={"amaze","igv","lmmse","eahd", "hphd", "vng4", "dcb", "ahd", "fast", "mono", "none" };
+ const char *RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::numMethods]={"3-pass (best)", "1-pass (medium)", "fast", "mono", "none" };
const char *RAWParams::ff_BlurTypestring[RAWParams::numFlatFileBlurTypes]={/*"Parametric",*/ "Area Flatfield", "Vertical Flatfield", "Horizontal Flatfield", "V+H Flatfield"};
std::vector WBParams::wbEntries;
@@ -769,33 +770,39 @@ void ProcParams::setDefaults () {
hsvequalizer.scurve.push_back (FCT_Linear);
hsvequalizer.vcurve.clear ();
hsvequalizer.vcurve.push_back (FCT_Linear);
+ raw.bayersensor.method = RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::amaze];
+ raw.bayersensor.ccSteps = 0;
+ raw.bayersensor.dcb_iterations = 2;
+ raw.bayersensor.dcb_enhance = false;
+ //raw.bayersensor.all_enhance = false;
+ raw.bayersensor.lmmse_iterations = 2;
+ raw.bayersensor.black0 = 0.0;
+ raw.bayersensor.black1 = 0.0;
+ raw.bayersensor.black2 = 0.0;
+ raw.bayersensor.black3 = 0.0;
+ raw.bayersensor.twogreen = true;
+ raw.bayersensor.linenoise = 0;
+ raw.bayersensor.greenthresh = 0;
+
+ raw.xtranssensor.method = RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::threePass];
+ raw.xtranssensor.ccSteps = 0;
+ raw.xtranssensor.blackred = 0.0;
+ raw.xtranssensor.blackgreen = 0.0;
+ raw.xtranssensor.blackblue = 0.0;
+
+ raw.expos=1.0;
+ raw.preser=0.0;
raw.df_autoselect = false;
raw.ff_AutoSelect = false;
raw.ff_BlurRadius = 32;
raw.ff_BlurType = RAWParams::ff_BlurTypestring[RAWParams::area_ff];
+ raw.ff_AutoClipControl = false;
+ raw.ff_clipControl = 0;
raw.cared = 0;
raw.cablue = 0;
raw.ca_autocorrect = false;
raw.hotdeadpix_filt = false;
raw.hotdeadpix_thresh = 40;
- raw.linenoise = 0;
- raw.greenthresh = 0;
- raw.ccSteps = 0;
- raw.dmethod = RAWParams::methodstring[RAWParams::amaze];;
- raw.dcb_iterations=2;
- raw.dcb_enhance=false;
- raw.lmmse_iterations=2;
-
- //raw.all_enhance=false;
-
- // exposure before interpolation
- raw.expos=1.0;
- raw.preser=0.0;
- raw.blackzero=0.0;
- raw.blackone=0.0;
- raw.blacktwo=0.0;
- raw.blackthree=0.0;
- raw.twogreen=true;
exif.clear ();
iptc.clear ();
@@ -1432,35 +1439,44 @@ int ProcParams::save (Glib::ustring fname, Glib::ustring fname2, bool fnameAbsol
}
// save raw parameters
- if (!pedited || pedited->raw.darkFrame) keyFile.set_string ("RAW", "DarkFrame", relativePathIfInside(fname, fnameAbsolute, raw.dark_frame) );
- if (!pedited || pedited->raw.dfAuto) keyFile.set_boolean ("RAW", "DarkFrameAuto", raw.df_autoselect );
- if (!pedited || pedited->raw.ff_file) keyFile.set_string ("RAW", "FlatFieldFile", relativePathIfInside(fname, fnameAbsolute, raw.ff_file) );
- if (!pedited || pedited->raw.ff_AutoSelect) keyFile.set_boolean ("RAW", "FlatFieldAutoSelect", raw.ff_AutoSelect );
- if (!pedited || pedited->raw.ff_BlurRadius) keyFile.set_integer ("RAW", "FlatFieldBlurRadius", raw.ff_BlurRadius );
- if (!pedited || pedited->raw.ff_BlurType) keyFile.set_string ("RAW", "FlatFieldBlurType", raw.ff_BlurType );
- if (!pedited || pedited->raw.caCorrection) keyFile.set_boolean ("RAW", "CA", raw.ca_autocorrect );
- if (!pedited || pedited->raw.caRed) keyFile.set_double ("RAW", "CARed", raw.cared );
- if (!pedited || pedited->raw.caBlue) keyFile.set_double ("RAW", "CABlue", raw.cablue );
- if (!pedited || pedited->raw.hotDeadPixelFilter) keyFile.set_boolean ("RAW", "HotDeadPixels", raw.hotdeadpix_filt );
- if (!pedited || pedited->raw.hotDeadPixelThresh) keyFile.set_integer ("RAW", "HotDeadPixelThresh", raw.hotdeadpix_thresh );
- if (!pedited || pedited->raw.linenoise) keyFile.set_integer ("RAW", "LineDenoise", raw.linenoise);
- if (!pedited || pedited->raw.greenEq) keyFile.set_integer ("RAW", "GreenEqThreshold", raw.greenthresh);
- if (!pedited || pedited->raw.ccSteps) keyFile.set_integer ("RAW", "CcSteps", raw.ccSteps);
- if (!pedited || pedited->raw.dmethod) keyFile.set_string ("RAW", "Method", raw.dmethod );
- if (!pedited || pedited->raw.dcbIterations) keyFile.set_integer ("RAW", "DCBIterations", raw.dcb_iterations );
- if (!pedited || pedited->raw.dcbEnhance) keyFile.set_boolean ("RAW", "DCBEnhance", raw.dcb_enhance );
- if (!pedited || pedited->raw.lmmseIterations) keyFile.set_integer ("RAW", "LMMSEIterations", raw.lmmse_iterations );
-
- //if (!pedited || pedited->raw.allEnhance) keyFile.set_boolean ("RAW", "ALLEnhance", raw.all_enhance );
+ if (!pedited || pedited->raw.darkFrame) keyFile.set_string ("RAW", "DarkFrame", relativePathIfInside(fname, fnameAbsolute, raw.dark_frame) );
+ if (!pedited || pedited->raw.dfAuto) keyFile.set_boolean ("RAW", "DarkFrameAuto", raw.df_autoselect );
+ if (!pedited || pedited->raw.ff_file) keyFile.set_string ("RAW", "FlatFieldFile", relativePathIfInside(fname, fnameAbsolute, raw.ff_file) );
+ if (!pedited || pedited->raw.ff_AutoSelect) keyFile.set_boolean ("RAW", "FlatFieldAutoSelect", raw.ff_AutoSelect );
+ if (!pedited || pedited->raw.ff_BlurRadius) keyFile.set_integer ("RAW", "FlatFieldBlurRadius", raw.ff_BlurRadius );
+ if (!pedited || pedited->raw.ff_BlurType) keyFile.set_string ("RAW", "FlatFieldBlurType", raw.ff_BlurType );
+ if (!pedited || pedited->raw.ff_AutoClipControl) keyFile.set_boolean ("RAW", "FlatFieldAutoClipControl", raw.ff_AutoClipControl );
+ if (!pedited || pedited->raw.ff_clipControl) keyFile.set_boolean ("RAW", "FlatFieldClipControl", raw.ff_clipControl );
+ if (!pedited || pedited->raw.caCorrection) keyFile.set_boolean ("RAW", "CA", raw.ca_autocorrect );
+ if (!pedited || pedited->raw.caRed) keyFile.set_double ("RAW", "CARed", raw.cared );
+ if (!pedited || pedited->raw.caBlue) keyFile.set_double ("RAW", "CABlue", raw.cablue );
+ if (!pedited || pedited->raw.hotDeadPixelFilter) keyFile.set_boolean ("RAW", "HotDeadPixels", raw.hotdeadpix_filt );
+ if (!pedited || pedited->raw.hotDeadPixelThresh) keyFile.set_integer ("RAW", "HotDeadPixelThresh", raw.hotdeadpix_thresh );
+
+ if (!pedited || pedited->raw.bayersensor.method) keyFile.set_string ("RAW Bayer", "Method", raw.bayersensor.method );
+ if (!pedited || pedited->raw.bayersensor.ccSteps) keyFile.set_integer ("RAW Bayer", "CcSteps", raw.bayersensor.ccSteps);
+ if (!pedited || pedited->raw.bayersensor.exBlack0) keyFile.set_double ("RAW Bayer", "PreBlack0", raw.bayersensor.black0 );
+ if (!pedited || pedited->raw.bayersensor.exBlack1) keyFile.set_double ("RAW Bayer", "PreBlack1", raw.bayersensor.black1 );
+ if (!pedited || pedited->raw.bayersensor.exBlack2) keyFile.set_double ("RAW Bayer", "PreBlack2", raw.bayersensor.black2 );
+ if (!pedited || pedited->raw.bayersensor.exBlack3) keyFile.set_double ("RAW Bayer", "PreBlack3", raw.bayersensor.black3 );
+ if (!pedited || pedited->raw.bayersensor.exTwoGreen) keyFile.set_boolean ("RAW Bayer", "PreTwoGreen", raw.bayersensor.twogreen );
+ if (!pedited || pedited->raw.bayersensor.linenoise) keyFile.set_integer ("RAW Bayer", "LineDenoise", raw.bayersensor.linenoise);
+ if (!pedited || pedited->raw.bayersensor.greenEq) keyFile.set_integer ("RAW Bayer", "GreenEqThreshold", raw.bayersensor.greenthresh);
+ if (!pedited || pedited->raw.bayersensor.dcbIterations) keyFile.set_integer ("RAW Bayer", "DCBIterations", raw.bayersensor.dcb_iterations );
+ if (!pedited || pedited->raw.bayersensor.dcbEnhance) keyFile.set_boolean ("RAW Bayer", "DCBEnhance", raw.bayersensor.dcb_enhance );
+ if (!pedited || pedited->raw.bayersensor.lmmseIterations) keyFile.set_integer ("RAW Bayer", "LMMSEIterations", raw.bayersensor.lmmse_iterations );
+ //if (!pedited || pedited->raw.bayersensor.allEnhance) keyFile.set_boolean ("RAW Bayer", "ALLEnhance", raw.bayersensor.all_enhance );
+
+ if (!pedited || pedited->raw.xtranssensor.method) keyFile.set_string ("RAW X-Trans", "Method", raw.xtranssensor.method );
+ if (!pedited || pedited->raw.xtranssensor.ccSteps) keyFile.set_integer ("RAW X-Trans", "CcSteps", raw.xtranssensor.ccSteps);
+ if (!pedited || pedited->raw.xtranssensor.exBlackRed) keyFile.set_double ("RAW X-Trans", "PreBlackRed", raw.xtranssensor.blackred );
+ if (!pedited || pedited->raw.xtranssensor.exBlackGreen) keyFile.set_double ("RAW X-Trans", "PreBlackGreen", raw.xtranssensor.blackgreen );
+ if (!pedited || pedited->raw.xtranssensor.exBlackBlue) keyFile.set_double ("RAW X-Trans", "PreBlackBlue", raw.xtranssensor.blackblue );
+
// save raw exposition
if (!pedited || pedited->raw.exPos) keyFile.set_double ("RAW", "PreExposure", raw.expos );
if (!pedited || pedited->raw.exPreser) keyFile.set_double ("RAW", "PrePreserv", raw.preser );
- if (!pedited || pedited->raw.exBlackzero) keyFile.set_double ("RAW", "PreBlackzero", raw.blackzero );
- if (!pedited || pedited->raw.exBlackone) keyFile.set_double ("RAW", "PreBlackone", raw.blackone );
- if (!pedited || pedited->raw.exBlacktwo) keyFile.set_double ("RAW", "PreBlacktwo", raw.blacktwo );
- if (!pedited || pedited->raw.exBlackthree) keyFile.set_double ("RAW", "PreBlackthree", raw.blackthree );
- if (!pedited || pedited->raw.exTwoGreen) keyFile.set_boolean ("RAW", "PreTwoGreen", raw.twogreen );
// save exif change list
if (!pedited || pedited->exif) {
@@ -2114,34 +2130,63 @@ if (keyFile.has_group ("ColorToning")) {
// load raw settings
if (keyFile.has_group ("RAW")) {
- if (keyFile.has_key ("RAW", "DarkFrame")) { raw.dark_frame = expandRelativePath(fname, "", keyFile.get_string ("RAW", "DarkFrame" )); if (pedited) pedited->raw.darkFrame = true; }
- if (keyFile.has_key ("RAW", "DarkFrameAuto")) { raw.df_autoselect = keyFile.get_boolean ("RAW", "DarkFrameAuto" ); if (pedited) pedited->raw.dfAuto = true; }
- if (keyFile.has_key ("RAW", "FlatFieldFile")) { raw.ff_file = expandRelativePath(fname, "", keyFile.get_string ("RAW", "FlatFieldFile" )); if (pedited) pedited->raw.ff_file = true; }
- if (keyFile.has_key ("RAW", "FlatFieldAutoSelect")) { raw.ff_AutoSelect = keyFile.get_boolean ("RAW", "FlatFieldAutoSelect" ); if (pedited) pedited->raw.ff_AutoSelect = true; }
- if (keyFile.has_key ("RAW", "FlatFieldBlurRadius")) { raw.ff_BlurRadius = keyFile.get_integer ("RAW", "FlatFieldBlurRadius" ); if (pedited) pedited->raw.ff_BlurRadius = true; }
- if (keyFile.has_key ("RAW", "FlatFieldBlurType")) { raw.ff_BlurType = keyFile.get_string ("RAW", "FlatFieldBlurType" ); if (pedited) pedited->raw.ff_BlurType = true; }
- if (keyFile.has_key ("RAW", "CA")) { raw.ca_autocorrect = keyFile.get_boolean ("RAW", "CA" ); if (pedited) pedited->raw.caCorrection = true; }
- if (keyFile.has_key ("RAW", "CARed")) { raw.cared = keyFile.get_double ("RAW", "CARed" ); if (pedited) pedited->raw.caRed = true; }
- if (keyFile.has_key ("RAW", "CABlue")) { raw.cablue = keyFile.get_double ("RAW", "CABlue" ); if (pedited) pedited->raw.caBlue = true; }
- if (keyFile.has_key ("RAW", "HotDeadPixels")) { raw.hotdeadpix_filt = keyFile.get_boolean ("RAW", "HotDeadPixels" ); if (pedited) pedited->raw.hotDeadPixelFilter = true; }
- if (keyFile.has_key ("RAW", "HotDeadPixelThresh")) { raw.hotdeadpix_thresh = keyFile.get_integer ("RAW", "HotDeadPixelThresh" ); if (pedited) pedited->raw.hotDeadPixelThresh = true; }
- if (keyFile.has_key ("RAW", "LineDenoise")) { raw.linenoise = keyFile.get_integer ("RAW", "LineDenoise" ); if (pedited) pedited->raw.linenoise = true; }
- if (keyFile.has_key ("RAW", "GreenEqThreshold")) { raw.greenthresh= keyFile.get_integer ("RAW", "GreenEqThreshold"); if (pedited) pedited->raw.greenEq = true; }
- if (keyFile.has_key ("RAW", "CcSteps")) { raw.ccSteps = keyFile.get_integer ("RAW", "CcSteps"); if (pedited) pedited->raw.ccSteps = true; }
- if (keyFile.has_key ("RAW", "Method")) { raw.dmethod = keyFile.get_string ("RAW", "Method"); if (pedited) pedited->raw.dmethod = true; }
- if (keyFile.has_key ("RAW", "DCBIterations")) { raw.dcb_iterations = keyFile.get_integer("RAW", "DCBIterations"); if (pedited) pedited->raw.dcbIterations = true; }
- if (keyFile.has_key ("RAW", "DCBEnhance")) { raw.dcb_enhance =keyFile.get_boolean("RAW", "DCBEnhance"); if (pedited) pedited->raw.dcbEnhance = true; }
- if (keyFile.has_key ("RAW", "LMMSEIterations")) { raw.lmmse_iterations = keyFile.get_integer("RAW", "LMMSEIterations"); if (pedited) pedited->raw.lmmseIterations = true; }
- //if (keyFile.has_key ("RAW", "ALLEnhance")) { raw.all_enhance =keyFile.get_boolean("RAW", "ALLEnhance"); if (pedited) pedited->raw.allEnhance = true; }
+ if (keyFile.has_key ("RAW", "DarkFrame")) { raw.dark_frame = expandRelativePath(fname, "", keyFile.get_string ("RAW", "DarkFrame" )); if (pedited) pedited->raw.darkFrame = true; }
+ if (keyFile.has_key ("RAW", "DarkFrameAuto")) { raw.df_autoselect = keyFile.get_boolean ("RAW", "DarkFrameAuto" ); if (pedited) pedited->raw.dfAuto = true; }
+ if (keyFile.has_key ("RAW", "FlatFieldFile")) { raw.ff_file = expandRelativePath(fname, "", keyFile.get_string ("RAW", "FlatFieldFile" )); if (pedited) pedited->raw.ff_file = true; }
+ if (keyFile.has_key ("RAW", "FlatFieldAutoSelect")) { raw.ff_AutoSelect = keyFile.get_boolean ("RAW", "FlatFieldAutoSelect" ); if (pedited) pedited->raw.ff_AutoSelect = true; }
+ if (keyFile.has_key ("RAW", "FlatFieldBlurRadius")) { raw.ff_BlurRadius = keyFile.get_integer ("RAW", "FlatFieldBlurRadius" ); if (pedited) pedited->raw.ff_BlurRadius = true; }
+ if (keyFile.has_key ("RAW", "FlatFieldBlurType")) { raw.ff_BlurType = keyFile.get_string ("RAW", "FlatFieldBlurType" ); if (pedited) pedited->raw.ff_BlurType = true; }
+ if (keyFile.has_key ("RAW", "FlatFieldAutoClipControl")) { raw.ff_AutoClipControl = keyFile.get_boolean ("RAW", "FlatFieldAutoClipControl" ); if (pedited) pedited->raw.ff_AutoClipControl = true; }
+ if (keyFile.has_key ("RAW", "FlatFieldClipControl")) { raw.ff_clipControl = keyFile.get_boolean ("RAW", "FlatFieldClipControl" ); if (pedited) pedited->raw.ff_clipControl = true; }
+ if (keyFile.has_key ("RAW", "CA")) { raw.ca_autocorrect = keyFile.get_boolean ("RAW", "CA" ); if (pedited) pedited->raw.caCorrection = true; }
+ if (keyFile.has_key ("RAW", "CARed")) { raw.cared = keyFile.get_double ("RAW", "CARed" ); if (pedited) pedited->raw.caRed = true; }
+ if (keyFile.has_key ("RAW", "CABlue")) { raw.cablue = keyFile.get_double ("RAW", "CABlue" ); if (pedited) pedited->raw.caBlue = true; }
+ if (keyFile.has_key ("RAW", "HotDeadPixels")) { raw.hotdeadpix_filt = keyFile.get_boolean ("RAW", "HotDeadPixels" ); if (pedited) pedited->raw.hotDeadPixelFilter = true; }
+ if (keyFile.has_key ("RAW", "HotDeadPixelThresh")) { raw.hotdeadpix_thresh = keyFile.get_integer ("RAW", "HotDeadPixelThresh" ); if (pedited) pedited->raw.hotDeadPixelThresh = true; }
+ if (keyFile.has_key ("RAW", "PreExposure")) { raw.expos =keyFile.get_double("RAW", "PreExposure"); if (pedited) pedited->raw.exPos = true; }
+ if (keyFile.has_key ("RAW", "PrePreserv")) { raw.preser =keyFile.get_double("RAW", "PrePreserv"); if (pedited) pedited->raw.exPreser = true; }
- if (keyFile.has_key ("RAW", "PreExposure")) { raw.expos =keyFile.get_double("RAW", "PreExposure"); if (pedited) pedited->raw.exPos = true; }
- if (keyFile.has_key ("RAW", "PrePreserv")) { raw.preser =keyFile.get_double("RAW", "PrePreserv"); if (pedited) pedited->raw.exPreser = true; }
- if (keyFile.has_key ("RAW", "PreBlackzero")) { raw.blackzero =keyFile.get_double("RAW", "PreBlackzero"); if (pedited) pedited->raw.exBlackzero = true; }
- if (keyFile.has_key ("RAW", "PreBlackone")) { raw.blackone =keyFile.get_double("RAW", "PreBlackone"); if (pedited) pedited->raw.exBlackone = true; }
- if (keyFile.has_key ("RAW", "PreBlacktwo")) { raw.blacktwo =keyFile.get_double("RAW", "PreBlacktwo"); if (pedited) pedited->raw.exBlacktwo = true; }
- if (keyFile.has_key ("RAW", "PreBlackthree")) { raw.blackthree =keyFile.get_double("RAW", "PreBlackthree"); if (pedited) pedited->raw.exBlackthree = true; }
- if (keyFile.has_key ("RAW", "PreTwoGreen")) { raw.twogreen =keyFile.get_boolean("RAW", "PreTwoGreen"); if (pedited) pedited->raw.exTwoGreen = true; }
+ if (ppVersion < 320) {
+ if (keyFile.has_key ("RAW", "Method")) { raw.bayersensor.method = keyFile.get_string ("RAW", "Method"); if (pedited) pedited->raw.bayersensor.method = true; }
+ if (keyFile.has_key ("RAW", "CcSteps")) { raw.bayersensor.ccSteps = keyFile.get_integer ("RAW", "CcSteps"); if (pedited) pedited->raw.bayersensor.ccSteps = true; }
+ if (keyFile.has_key ("RAW", "LineDenoise")) { raw.bayersensor.linenoise = keyFile.get_integer ("RAW", "LineDenoise" ); if (pedited) pedited->raw.bayersensor.linenoise = true; }
+ if (keyFile.has_key ("RAW", "GreenEqThreshold")) { raw.bayersensor.greenthresh= keyFile.get_integer ("RAW", "GreenEqThreshold"); if (pedited) pedited->raw.bayersensor.greenEq = true; }
+ if (keyFile.has_key ("RAW", "DCBIterations")) { raw.bayersensor.dcb_iterations = keyFile.get_integer("RAW", "DCBIterations"); if (pedited) pedited->raw.bayersensor.dcbIterations = true; }
+ if (keyFile.has_key ("RAW", "DCBEnhance")) { raw.bayersensor.dcb_enhance = keyFile.get_boolean("RAW", "DCBEnhance"); if (pedited) pedited->raw.bayersensor.dcbEnhance = true; }
+ if (keyFile.has_key ("RAW", "LMMSEIterations")) { raw.bayersensor.lmmse_iterations = keyFile.get_integer("RAW", "LMMSEIterations"); if (pedited) pedited->raw.bayersensor.lmmseIterations = true; }
+ if (keyFile.has_key ("RAW", "PreBlackzero")) { raw.bayersensor.black0 = keyFile.get_double("RAW", "PreBlackzero"); if (pedited) pedited->raw.bayersensor.exBlack0 = true; }
+ if (keyFile.has_key ("RAW", "PreBlackone")) { raw.bayersensor.black1 = keyFile.get_double("RAW", "PreBlackone"); if (pedited) pedited->raw.bayersensor.exBlack1 = true; }
+ if (keyFile.has_key ("RAW", "PreBlacktwo")) { raw.bayersensor.black2 = keyFile.get_double("RAW", "PreBlacktwo"); if (pedited) pedited->raw.bayersensor.exBlack2 = true; }
+ if (keyFile.has_key ("RAW", "PreBlackthree")) { raw.bayersensor.black3 = keyFile.get_double("RAW", "PreBlackthree"); if (pedited) pedited->raw.bayersensor.exBlack3 = true; }
+ if (keyFile.has_key ("RAW", "PreTwoGreen")) { raw.bayersensor.twogreen = keyFile.get_boolean("RAW", "PreTwoGreen"); if (pedited) pedited->raw.bayersensor.exTwoGreen = true; }
+ //if (keyFile.has_key ("RAW", "ALLEnhance")) { raw.bayersensor.all_enhance = keyFile.get_boolean("RAW", "ALLEnhance"); if (pedited) pedited->raw.bayersensor.allEnhance = true; }
+ }
+}
+// load Bayer sensors' raw settings
+if (keyFile.has_group ("RAW Bayer")) {
+ if (keyFile.has_key ("RAW Bayer", "Method")) { raw.bayersensor.method = keyFile.get_string ("RAW Bayer", "Method"); if (pedited) pedited->raw.bayersensor.method = true; }
+ if (keyFile.has_key ("RAW Bayer", "CcSteps")) { raw.bayersensor.ccSteps = keyFile.get_integer ("RAW Bayer", "CcSteps"); if (pedited) pedited->raw.bayersensor.ccSteps = true; }
+ if (keyFile.has_key ("RAW Bayer", "PreBlack0")) { raw.bayersensor.black0 = keyFile.get_double("RAW Bayer", "PreBlack0"); if (pedited) pedited->raw.bayersensor.exBlack0 = true; }
+ if (keyFile.has_key ("RAW Bayer", "PreBlack1")) { raw.bayersensor.black1 = keyFile.get_double("RAW Bayer", "PreBlack1"); if (pedited) pedited->raw.bayersensor.exBlack1 = true; }
+ if (keyFile.has_key ("RAW Bayer", "PreBlack2")) { raw.bayersensor.black2 = keyFile.get_double("RAW Bayer", "PreBlack2"); if (pedited) pedited->raw.bayersensor.exBlack2 = true; }
+ if (keyFile.has_key ("RAW Bayer", "PreBlack3")) { raw.bayersensor.black3 = keyFile.get_double("RAW Bayer", "PreBlack3"); if (pedited) pedited->raw.bayersensor.exBlack3 = true; }
+ if (keyFile.has_key ("RAW Bayer", "PreTwoGreen")) { raw.bayersensor.twogreen = keyFile.get_boolean("RAW Bayer", "PreTwoGreen"); if (pedited) pedited->raw.bayersensor.exTwoGreen = true; }
+ if (keyFile.has_key ("RAW Bayer", "LineDenoise")) { raw.bayersensor.linenoise = keyFile.get_integer ("RAW Bayer", "LineDenoise" ); if (pedited) pedited->raw.bayersensor.linenoise = true; }
+ if (keyFile.has_key ("RAW Bayer", "GreenEqThreshold")) { raw.bayersensor.greenthresh= keyFile.get_integer ("RAW Bayer", "GreenEqThreshold"); if (pedited) pedited->raw.bayersensor.greenEq = true; }
+ if (keyFile.has_key ("RAW Bayer", "DCBIterations")) { raw.bayersensor.dcb_iterations = keyFile.get_integer("RAW Bayer", "DCBIterations"); if (pedited) pedited->raw.bayersensor.dcbIterations = true; }
+ if (keyFile.has_key ("RAW Bayer", "DCBEnhance")) { raw.bayersensor.dcb_enhance = keyFile.get_boolean("RAW Bayer", "DCBEnhance"); if (pedited) pedited->raw.bayersensor.dcbEnhance = true; }
+ if (keyFile.has_key ("RAW Bayer", "LMMSEIterations")) { raw.bayersensor.lmmse_iterations = keyFile.get_integer("RAW Bayer", "LMMSEIterations"); if (pedited) pedited->raw.bayersensor.lmmseIterations = true; }
+ //if (keyFile.has_key ("RAW Bayer", "ALLEnhance")) { raw.bayersensor.all_enhance = keyFile.get_boolean("RAW Bayer", "ALLEnhance"); if (pedited) pedited->raw.bayersensor.allEnhance = true; }
+}
+
+// load X-Trans sensors' raw settings
+if (keyFile.has_group ("RAW X-Trans")) {
+ if (keyFile.has_key ("RAW X-Trans", "Method")) { raw.xtranssensor.method = keyFile.get_string ("RAW X-Trans", "Method"); if (pedited) pedited->raw.xtranssensor.method = true; }
+ if (keyFile.has_key ("RAW X-Trans", "CcSteps")) { raw.xtranssensor.ccSteps = keyFile.get_integer ("RAW X-Trans", "CcSteps"); if (pedited) pedited->raw.xtranssensor.ccSteps = true; }
+ if (keyFile.has_key ("RAW X-Trans", "PreBlackRed")) { raw.xtranssensor.blackred = keyFile.get_double("RAW X-Trans", "PreBlackRed"); if (pedited) pedited->raw.xtranssensor.exBlackRed = true; }
+ if (keyFile.has_key ("RAW X-Trans", "PreBlackGreen")) { raw.xtranssensor.blackgreen = keyFile.get_double("RAW X-Trans", "PreBlackGreen"); if (pedited) pedited->raw.xtranssensor.exBlackGreen = true; }
+ if (keyFile.has_key ("RAW X-Trans", "PreBlackBlue")) { raw.xtranssensor.blackblue = keyFile.get_double("RAW X-Trans", "PreBlackBlue"); if (pedited) pedited->raw.xtranssensor.exBlackBlue = true; }
}
// load exif change settings
@@ -2434,23 +2479,37 @@ bool ProcParams::operator== (const ProcParams& other) {
&& resize.dataspec == other.resize.dataspec
&& resize.width == other.resize.width
&& resize.height == other.resize.height
+ && raw.bayersensor.method == other.raw.bayersensor.method
+ && raw.bayersensor.ccSteps == other.raw.bayersensor.ccSteps
+ && raw.bayersensor.black0==other.raw.bayersensor.black0
+ && raw.bayersensor.black1==other.raw.bayersensor.black1
+ && raw.bayersensor.black2==other.raw.bayersensor.black2
+ && raw.bayersensor.black3==other.raw.bayersensor.black3
+ && raw.bayersensor.twogreen==other.raw.bayersensor.twogreen
+ && raw.bayersensor.greenthresh == other.raw.bayersensor.greenthresh
+ && raw.bayersensor.linenoise == other.raw.bayersensor.linenoise
+ && raw.bayersensor.dcb_enhance == other.raw.bayersensor.dcb_enhance
+ && raw.bayersensor.dcb_iterations == other.raw.bayersensor.dcb_iterations
+ && raw.xtranssensor.method == other.raw.xtranssensor.method
+ && raw.xtranssensor.ccSteps == other.raw.xtranssensor.ccSteps
+ && raw.xtranssensor.blackred==other.raw.xtranssensor.blackred
+ && raw.xtranssensor.blackgreen==other.raw.xtranssensor.blackgreen
+ && raw.xtranssensor.blackblue==other.raw.xtranssensor.blackblue
&& raw.dark_frame == other.raw.dark_frame
&& raw.df_autoselect == other.raw.df_autoselect
&& raw.ff_file == other.raw.ff_file
&& raw.ff_AutoSelect == other.raw.ff_AutoSelect
&& raw.ff_BlurRadius == other.raw.ff_BlurRadius
- && raw.ff_BlurType == other.raw.ff_BlurType
- && raw.dcb_enhance == other.raw.dcb_enhance
- && raw.dcb_iterations == other.raw.dcb_iterations
- && raw.ccSteps == other.raw.ccSteps
+ && raw.ff_BlurType == other.raw.ff_BlurType
+ && raw.ff_AutoClipControl == other.raw.ff_AutoClipControl
+ && raw.ff_clipControl == other.raw.ff_clipControl
+ && raw.expos==other.raw.expos
+ && raw.preser==other.raw.preser
&& raw.ca_autocorrect == other.raw.ca_autocorrect
&& raw.cared == other.raw.cared
&& raw.cablue == other.raw.cablue
&& raw.hotdeadpix_filt == other.raw.hotdeadpix_filt
&& raw.hotdeadpix_thresh == other.raw.hotdeadpix_thresh
- && raw.dmethod == other.raw.dmethod
- && raw.greenthresh == other.raw.greenthresh
- && raw.linenoise == other.raw.linenoise
&& icm.input == other.icm.input
&& icm.toneCurve == other.icm.toneCurve
&& icm.blendCMSMatrix == other.icm.blendCMSMatrix
@@ -2498,16 +2557,7 @@ bool ProcParams::operator== (const ProcParams& other) {
&& colorToning.greenhigh == other.colorToning.greenhigh
&& colorToning.bluehigh == other.colorToning.bluehigh
&& exif==other.exif
- && iptc==other.iptc
- && raw.expos==other.raw.expos
- && raw.preser==other.raw.preser
- && raw.preser==other.raw.preser
- && raw.blackzero==other.raw.blackzero
- && raw.blackone==other.raw.blackone
- && raw.blacktwo==other.raw.blacktwo
- && raw.blackthree==other.raw.blackthree
- && raw.twogreen==other.raw.twogreen;
-
+ && iptc==other.iptc;
}
bool ProcParams::operator!= (const ProcParams& other) {
diff --git a/rtengine/procparams.h b/rtengine/procparams.h
index e22722038..72fa73290 100644
--- a/rtengine/procparams.h
+++ b/rtengine/procparams.h
@@ -790,13 +790,12 @@ class ColorManagementParams {
int dcpIlluminant;
Glib::ustring working;
Glib::ustring output;
- static const Glib::ustring NoICMString;
-
+ static const Glib::ustring NoICMString;
+
Glib::ustring gamma;
- double gampos;
- double slpos;
- bool freegamma;
-
+ double gampos;
+ double slpos;
+ bool freegamma;
};
/**
@@ -813,82 +812,106 @@ typedef std::map > IPTCPairs;
* Directional pyramid equalizer params
*/
class DirPyrEqualizerParams {
-
- public:
- bool enabled;
- bool gamutlab;
- double mult[5];
- double threshold;
- double skinprotect;
- Threshold hueskin;
- // Glib::ustring algo;
- DirPyrEqualizerParams() : hueskin(20, 80, 2000, 1200, false) {};
+ public:
+ bool enabled;
+ bool gamutlab;
+ double mult[5];
+ double threshold;
+ double skinprotect;
+ Threshold hueskin;
+ //Glib::ustring algo;
+
+ DirPyrEqualizerParams() : hueskin(20, 80, 2000, 1200, false) {};
};
/**
* HSV equalizer params
*/
class HSVEqualizerParams {
-
- public:
- std::vector hcurve;
- std::vector scurve;
- std::vector vcurve;
-
+
+ public:
+ std::vector hcurve;
+ std::vector scurve;
+ std::vector vcurve;
};
-
-
/**
- * Parameters for RAW demosaicing
+ * Parameters for RAW demosaicing, common to all sensor type
*/
class RAWParams {
public:
- // enum eMethod{eahd,hphd,vng4,dcb,amaze,ahd,IGV_noise,fast,
- // numMethods }; // This MUST be the last enum
- enum eMethod{amaze,igv,lmmse,eahd,hphd,vng4,dcb,ahd,fast,mono,none,
- numMethods }; // This MUST be the last enum
-
- static const char *methodstring[numMethods];
+ /**
+ * Parameters for RAW demosaicing specific to Bayer sensors
+ */
+ class BayerSensor {
+ public:
+ //enum eMethod{ eahd,hphd,vng4,dcb,amaze,ahd,IGV_noise,fast,
+ //numMethods }; // This MUST be the last enum
+ enum eMethod{ amaze, igv, lmmse, eahd, hphd, vng4, dcb, ahd, fast, mono, none,
+ numMethods }; // This MUST be the last enum
+ static const char *methodstring[numMethods];
- enum eFlatFileBlurType{/*parametric,*/area_ff,v_ff,h_ff,vh_ff,
- numFlatFileBlurTypes }; // This MUST be the last enum
- static const char *ff_BlurTypestring[numFlatFileBlurTypes];
-
+ Glib::ustring method;
+ int ccSteps;
+ double black0;
+ double black1;
+ double black2;
+ double black3;
+ bool twogreen;
+ int linenoise;
+ int greenthresh;
+ int dcb_iterations;
+ int lmmse_iterations;
+ bool dcb_enhance;
+ //bool all_enhance;
+ };
- Glib::ustring dark_frame;
- bool df_autoselect;
-
- Glib::ustring ff_file;
- bool ff_AutoSelect;
- int ff_BlurRadius;
- Glib::ustring ff_BlurType;
-
- bool ca_autocorrect;
- double cared;
- double cablue;
+ /**
+ * Parameters for RAW demosaicing specific to X-Trans sensors
+ */
+ class XTransSensor {
+ public:
+ enum eMethod{ threePass, onePass, fast, mono, none,
+ numMethods }; // This MUST be the last enum
+ static const char *methodstring[numMethods];
- // exposure before interpolation
- double expos;
- double preser;
- double blackzero;
- double blackone;
- double blacktwo;
- double blackthree;
- bool twogreen;
- bool hotdeadpix_filt;
- int hotdeadpix_thresh;
- int linenoise;
- int greenthresh;
- int ccSteps;
- Glib::ustring dmethod;
- int dcb_iterations;
- int lmmse_iterations;
-
- bool dcb_enhance;
- //bool all_enhance;
+ Glib::ustring method;
+ int ccSteps;
+ double blackred;
+ double blackgreen;
+ double blackblue;
+ };
+
+ BayerSensor bayersensor; ///< RAW parameters for Bayer sensors
+ XTransSensor xtranssensor; ///< RAW parameters for X-Trans sensors
+
+ enum eFlatFileBlurType{ /*parametric,*/area_ff,v_ff,h_ff,vh_ff,
+ numFlatFileBlurTypes }; // This MUST be the last enum
+
+ static const char *ff_BlurTypestring[numFlatFileBlurTypes];
+
+ Glib::ustring dark_frame;
+ bool df_autoselect;
+
+ Glib::ustring ff_file;
+ bool ff_AutoSelect;
+ int ff_BlurRadius;
+ Glib::ustring ff_BlurType;
+ bool ff_AutoClipControl;
+ int ff_clipControl;
+
+ bool ca_autocorrect;
+ double cared;
+ double cablue;
+
+ // exposure before interpolation
+ double expos;
+ double preser;
+
+ bool hotdeadpix_filt;
+ int hotdeadpix_thresh;
};
/**
diff --git a/rtengine/rawimage.cc b/rtengine/rawimage.cc
index 5056105b8..855f0584c 100755
--- a/rtengine/rawimage.cc
+++ b/rtengine/rawimage.cc
@@ -45,24 +45,36 @@ RawImage::~RawImage()
if(profile_data){ delete [] profile_data; profile_data=NULL;}
}
+eSensorType RawImage::getSensorType() {
+ if (isBayer())
+ return ST_BAYER;
+ else if (isXtrans())
+ return ST_FUJI_XTRANS;
+
+ return ST_NONE;
+}
+
/* Similar to dcraw scale_colors for coeff. calculation, but without actual pixels scaling.
* need pixels in data[][] available
*/
void RawImage::get_colorsCoeff( float *pre_mul_, float *scale_mul_, float *cblack_, bool forceAutoWB) {
-
unsigned row, col, x, y, c, sum[8];
unsigned W = this->get_width();
unsigned H = this->get_height();
float val;
double dsum[8], dmin, dmax;
-
-
if ((this->get_cblack(4)+1)/2 == 1 && (this->get_cblack(5)+1)/2 == 1) {
for (int c = 0; c < 4; c++){
cblack_[FC(c/2,c%2)] = this->get_cblack(6 + c/2 % this->get_cblack(4) * this->get_cblack(5) + c%2 % this->get_cblack(5));
pre_mul_[c] = this->get_pre_mul(c);
}
+ } else if(isXtrans()) {
+ // for xtrans files dcraw stores black levels in cblack[6] .. cblack[41], but all are equal, so we just use cblack[6]
+ for (int c = 0; c < 4; c++){
+ cblack_[c] = (float) this->get_cblack(6);
+ pre_mul_[c] = this->get_pre_mul(c);
+ }
} else {
for (int c = 0; c < 4; c++){
cblack_[c] = (float) this->get_cblack(c);
@@ -129,6 +141,44 @@ skip_block2: ;
for(int c=0;c<4;c++)
dsum[c] -= cblack_[c] * dsum[c+4];
+ } else if(isXtrans()) {
+#pragma omp parallel
+{
+ double dsumthr[8];
+ memset(dsumthr, 0, sizeof dsumthr);
+ float sum[8];
+ // make local copies of the black and white values to avoid calculations and conversions
+ float whitefloat[4];
+ for (int c = 0; c < 4; c++) {
+ whitefloat[c] = this->get_white(c) - 25;
+ }
+
+#pragma omp for nowait
+ for (int row = 0; row < H; row += 8)
+ for (int col = 0; col < W ; col += 8) {
+ memset(sum, 0, sizeof sum);
+ for (int y = row; y < row + 8 && y < H; y++)
+ for (int x = col; x < col + 8 && x < W; x++) {
+ int c = XTRANSFC(y, x);
+ float val = data[y][x];
+ if (val > whitefloat[c])
+ goto skip_block3;
+ if ((val -= cblack_[c]) < 0)
+ val = 0;
+ sum[c] += val;
+ sum[c + 4]++;
+ }
+ for (int c = 0; c < 8; c++)
+ dsumthr[c] += sum[c];
+skip_block3: ;
+ }
+#pragma omp critical
+{
+ for (int c = 0; c < 8; c++)
+ dsum[c] += dsumthr[c];
+
+}
+}
} else if (colors == 1) {
for (int c = 0; c < 4; c++)
pre_mul_[c] = 1;
@@ -386,8 +436,11 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene
}
}
if (black_c4[0] == -1) {
+ if(isXtrans())
+ for (int c=0; c < 4; c++) black_c4[c] = cblack[6];
+ else
// RT constants not set, bring in the DCRAW single channel black constant
- for (int c=0; c < 4; c++) black_c4[c] = black + cblack[c];
+ for (int c=0; c < 4; c++) black_c4[c] = black + cblack[c];
} else {
black_from_cc = true;
}
@@ -428,7 +481,7 @@ float** RawImage::compress_image()
{
if( !image )
return NULL;
- if (filters) {
+ if (isBayer() || isXtrans()) {
if (!allocation) {
allocation = new float[height * width];
data = new float*[height];
@@ -460,11 +513,16 @@ float** RawImage::compress_image()
this->data[row][col] = float_raw_image[(row + top_margin) * raw_width + col + left_margin];
delete [] float_raw_image;
float_raw_image = NULL;
- } else if (filters != 0) {
+ } else if (filters != 0 && !isXtrans()) {
#pragma omp parallel for
for (int row = 0; row < height; row++)
for (int col = 0; col < width; col++)
this->data[row][col] = image[row * width + col][FC(row, col)];
+ } else if (isXtrans()) {
+ #pragma omp parallel for
+ for (int row = 0; row < height; row++)
+ for (int col = 0; col < width; col++)
+ this->data[row][col] = image[row * width + col][XTRANSFC(row, col)];
} else if (colors == 1) {
#pragma omp parallel for
for (int row = 0; row < height; row++)
@@ -479,8 +537,8 @@ float** RawImage::compress_image()
this->data[row][3 * col + 2] = image[row * width + col][2];
}
}
- free(image); // we don't need this anymore
- image=NULL;
+ free(image); // we don't need this anymore
+ image=NULL;
return data;
}
@@ -493,6 +551,21 @@ RawImage::is_supportedThumb() const
!thumb_load_raw );
}
+void RawImage::getXtransMatrix( char XtransMatrix[6][6])
+{
+ for(int row=0;row<6;row++)
+ for(int col=0;col<6;col++)
+ XtransMatrix[row][col] = xtrans[row][col];
+}
+
+void RawImage::getRgbCam (float rgbcam[3][4])
+{
+ for(int row=0;row<3;row++)
+ for(int col=0;col<4;col++)
+ rgbcam[row][col] = rgb_cam[row][col];
+
+}
+
bool
RawImage::get_thumbSwap() const
{
diff --git a/rtengine/rawimage.h b/rtengine/rawimage.h
index 800a7c985..809b914bd 100755
--- a/rtengine/rawimage.h
+++ b/rtengine/rawimage.h
@@ -22,6 +22,7 @@
#include
#include
#include "dcraw.h"
+#include "imageio.h"
namespace rtengine {
@@ -86,6 +87,7 @@ public:
class RawImage: public DCraw
{
public:
+
RawImage( const Glib::ustring name );
~RawImage();
@@ -107,6 +109,8 @@ protected:
char* profile_data; // Embedded ICC color profile
float* allocation; // pointer to allocated memory
int maximum_c4[4];
+ bool isBayer() const { return (filters!=0 && filters!=9); }
+ bool isXtrans() const { return filters==9; }
public:
@@ -115,7 +119,11 @@ public:
int get_width() const { return width; }
int get_height() const { return height; }
int get_FujiWidth() const { return fuji_width; }
- bool isBayer() const { return filters!=0; }
+ eSensorType getSensorType();
+
+ void getRgbCam (float rgbcam[3][4]);
+ void getXtransMatrix ( char xtransMatrix[6][6]);
+ void clearXtransCblack( ) { for(int c=0;c<4;c++) cblack[c] = 0;}
unsigned get_filters() const { return filters; }
int get_colors() const { return colors;}
int get_cblack(int i) const {return cblack[i];}
@@ -150,7 +158,7 @@ public:
unsigned get_thumbLength(){ return thumb_length;}
public:
// dcraw functions
- void scale_colors(){ DCraw::scale_colors(); }
+ void scale_colors(){ if(isXtrans()) clearXtransCblack( ); DCraw::scale_colors(); }
void pre_interpolate() { DCraw::pre_interpolate(); }
public:
@@ -158,6 +166,11 @@ public:
bool ISGREEN(unsigned row, unsigned col) const { return ((filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3)==1);}
bool ISBLUE (unsigned row, unsigned col) const { return ((filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3)==2);}
unsigned FC (unsigned row, unsigned col) const { return (filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3); }
+ bool ISXTRANSRED (unsigned row, unsigned col) const { return ((xtrans[(row)%6][(col)%6])==0);}
+ bool ISXTRANSGREEN(unsigned row, unsigned col) const { return ((xtrans[(row)%6][(col)%6])==1);}
+ bool ISXTRANSBLUE (unsigned row, unsigned col) const { return ((xtrans[(row)%6][(col)%6])==2);}
+ unsigned XTRANSFC (unsigned row, unsigned col) const { return (xtrans[(row)%6][(col)%6]);}
+
};
}
diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc
index 0900fa850..625fb7bb2 100644
--- a/rtengine/rawimagesource.cc
+++ b/rtengine/rawimagesource.cc
@@ -204,9 +204,9 @@ void RawImageSource::transformRect (PreviewProps pp, int tran, int &ssx1, int &s
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
static float
-calculate_scale_mul(float scale_mul[4], const float pre_mul_[4], const float c_white[4], const float c_black[4], const RAWParams &raw, int colors)
+calculate_scale_mul(float scale_mul[4], const float pre_mul_[4], const float c_white[4], const float c_black[4], bool isMono, int colors)
{
- if (raw.dmethod == RAWParams::methodstring[RAWParams::mono] || colors == 1) {
+ if (isMono || colors == 1) {
for (int c = 0; c < 4; c++) {
scale_mul[c] = 65535.0 / (c_white[c] - c_black[c]);
}
@@ -245,7 +245,10 @@ void RawImageSource::getImage (ColorTemp ctemp, int tran, Imagefloat* image, Pre
// 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];
- float gain = calculate_scale_mul(new_scale_mul, new_pre_mul, c_white, cblacksom, raw, ri->get_colors());
+
+ bool isMono = (ri->getSensorType()==ST_FUJI_XTRANS && raw.xtranssensor.method == RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::mono])
+ || (ri->getSensorType()==ST_BAYER && raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::mono]);
+ 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;
@@ -320,7 +323,7 @@ void RawImageSource::getImage (ColorTemp ctemp, int tran, Imagefloat* image, Pre
#pragma omp for
#endif
for (int ix=0; ix=maxy-skip) i=maxy-skip-1; // avoid trouble
- if (ri->isBayer() || ri->get_colors() == 1) {
+ if (ri->getSensorType()!=ST_NONE || ri->get_colors() == 1) {
for (int j=0,jx=sx1; j=maxx-skip) jx=maxx-skip-1; // avoid trouble
float rtot,gtot,btot;
rtot=gtot=btot=0;
@@ -434,10 +437,14 @@ void RawImageSource::getImage (ColorTemp ctemp, int tran, Imagefloat* image, Pre
hflip (image);
if (tran & TR_VFLIP)
vflip (image);
-
+
// Color correction (only when running on full resolution)
- if (ri->isBayer() && pp.skip==1)
- processFalseColorCorrection (image, raw.ccSteps);
+ if (ri->getSensorType()!=ST_NONE && pp.skip==1) {
+ if (ri->getSensorType()==ST_BAYER)
+ processFalseColorCorrection (image, raw.bayersensor.ccSteps);
+ else if (ri->getSensorType()==ST_FUJI_XTRANS)
+ processFalseColorCorrection (image, raw.xtranssensor.ccSteps);
+ }
// *** colorSpaceConversion was here ***
//colorSpaceConversion (image, cmp, raw, embProfile, camProfile, xyz_cam, (static_cast(getMetaData()))->getCamera());
}
@@ -880,6 +887,10 @@ int RawImageSource::load (Glib::ustring fname, bool batch) {
d1x = ! ri->get_model().compare("D1X");
if (d1x)
border = 8;
+
+ if(ri->getSensorType()==ST_FUJI_XTRANS)
+ border = 7;
+
if ( ri->get_profile() )
embProfile = cmsOpenProfileFromMem (ri->get_profile(), ri->get_profileLen());
@@ -1084,7 +1095,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le
cfaCleanFromMap( bitmapBads );
// check if it is an olympus E camera, if yes, compute G channel pre-compensation factors
- if ( raw.greenthresh || (((idata->getMake().size()>=7 && idata->getMake().substr(0,7)=="OLYMPUS" && idata->getModel()[0]=='E') || (idata->getMake().size()>=9 && idata->getMake().substr(0,9)=="Panasonic")) && raw.dmethod != RAWParams::methodstring[ RAWParams::vng4] && ri->isBayer()) ) {
+ if ( ri->getSensorType()==ST_BAYER && (raw.bayersensor.greenthresh || (((idata->getMake().size()>=7 && idata->getMake().substr(0,7)=="OLYMPUS" && idata->getModel()[0]=='E') || (idata->getMake().size()>=9 && idata->getMake().substr(0,9)=="Panasonic")) && raw.bayersensor.method != RAWParams::BayerSensor::methodstring[ RAWParams::BayerSensor::vng4])) ) {
// global correction
int ng1=0, ng2=0, i=0;
double avgg1=0., avgg2=0.;
@@ -1115,25 +1126,25 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le
}
}
- if ( raw.greenthresh >0) {
+ if ( ri->getSensorType()==ST_BAYER && raw.bayersensor.greenthresh >0) {
if (plistener) {
plistener->setProgressStr ("Green equilibrate...");
plistener->setProgress (0.0);
}
- green_equilibrate(0.01*(raw.greenthresh));
+ green_equilibrate(0.01*(raw.bayersensor.greenthresh));
}
- if ( raw.linenoise >0 ) {
+ if ( ri->getSensorType()==ST_BAYER && raw.bayersensor.linenoise >0 ) {
if (plistener) {
plistener->setProgressStr ("Line Denoise...");
plistener->setProgress (0.0);
}
- cfa_linedn(0.00002*(raw.linenoise));
+ cfa_linedn(0.00002*(raw.bayersensor.linenoise));
}
- if ( raw.ca_autocorrect || fabs(raw.cared)>0.001 || fabs(raw.cablue)>0.001 ) {
+ if ( (raw.ca_autocorrect || fabs(raw.cared)>0.001 || fabs(raw.cablue)>0.001) && ri->getSensorType()!=ST_FUJI_XTRANS ) { // Auto CA correction disabled for X-Trans, for now...
if (plistener) {
plistener->setProgressStr ("CA Auto Correction...");
plistener->setProgress (0.0);
@@ -1162,43 +1173,60 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le
void RawImageSource::demosaic(const RAWParams &raw)
{
- if (ri->isBayer()) {
- MyTime t1,t2;
- t1.set();
- if ( raw.dmethod == RAWParams::methodstring[RAWParams::hphd] )
- hphd_demosaic ();
- else if (raw.dmethod == RAWParams::methodstring[RAWParams::vng4] )
- vng4_demosaic ();
- else if (raw.dmethod == RAWParams::methodstring[RAWParams::ahd] )
- ahd_demosaic (0,0,W,H);
- else if (raw.dmethod == RAWParams::methodstring[RAWParams::amaze] )
- amaze_demosaic_RT (0,0,W,H);
- else if (raw.dmethod == RAWParams::methodstring[RAWParams::dcb] )
- dcb_demosaic(raw.dcb_iterations, raw.dcb_enhance);
- else if (raw.dmethod == RAWParams::methodstring[RAWParams::eahd])
- eahd_demosaic ();
- else if (raw.dmethod == RAWParams::methodstring[RAWParams::igv])
- igv_interpolate(W,H);
- else if (raw.dmethod == RAWParams::methodstring[RAWParams::lmmse])
- lmmse_interpolate_omp(W,H,raw.lmmse_iterations);
- else if (raw.dmethod == RAWParams::methodstring[RAWParams::fast] )
- fast_demosaic (0,0,W,H);
- else if (raw.dmethod == RAWParams::methodstring[RAWParams::mono] )
- nodemosaic(true);
- else
- nodemosaic(false);
- t2.set();
- if( settings->verbose )
- printf("Demosaicing: %s - %d usec\n",raw.dmethod.c_str(), t2.etime(t1));
+ MyTime t1,t2;
+ t1.set();
+
+ if (ri->getSensorType()==ST_BAYER) {
+ if ( raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::hphd] )
+ hphd_demosaic ();
+ else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::vng4] )
+ vng4_demosaic ();
+ else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::ahd] )
+ ahd_demosaic (0,0,W,H);
+ else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::amaze] )
+ amaze_demosaic_RT (0,0,W,H);
+ else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::dcb] )
+ dcb_demosaic(raw.bayersensor.dcb_iterations, raw.bayersensor.dcb_enhance);
+ else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::eahd])
+ eahd_demosaic ();
+ else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::igv])
+ igv_interpolate(W,H);
+ else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::lmmse])
+ lmmse_interpolate_omp(W,H,raw.bayersensor.lmmse_iterations);
+ else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::fast] )
+ fast_demosaic (0,0,W,H);
+ else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::mono] )
+ nodemosaic(true);
+ else
+ nodemosaic(false);
- //if (raw.all_enhance) refinement_lassus();
-
- rgbSourceModified = false;
+ //if (raw.all_enhance) refinement_lassus();
+
+ } else if (ri->getSensorType()==ST_FUJI_XTRANS) {
+ if (raw.xtranssensor.method == RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::fast] )
+ fast_xtrans_interpolate();
+ else if (raw.xtranssensor.method == RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::onePass])
+ xtrans_interpolate(1,false);
+ else if (raw.xtranssensor.method == RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::threePass] )
+ xtrans_interpolate(3,true);
+ else if(raw.xtranssensor.method == RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::mono] )
+ nodemosaic(true);
+ else
+ nodemosaic(false);
} else if (ri->get_colors() == 1) {
// Monochrome
nodemosaic(true);
- rgbSourceModified = false;
}
+ t2.set();
+
+ rgbSourceModified = false;
+ if( settings->verbose ) {
+ if (getSensorType() == ST_BAYER)
+ printf("Demosaicing Bayer data: %s - %d usec\n",raw.bayersensor.method.c_str(), t2.etime(t1));
+ else if (getSensorType() == ST_FUJI_XTRANS)
+ printf("Demosaicing X-Trans data: %s - %d usec\n",raw.xtranssensor.method.c_str(), t2.etime(t1));
+ }
+
}
void RawImageSource::flushRawData() {
@@ -1237,6 +1265,191 @@ void RawImageSource::HLRecovery_Global(ToneCurveParams hrp )
}
+void RawImageSource::processFlatField(const RAWParams &raw, RawImage *riFlatFile, unsigned short black[4])
+{
+ float (*cfablur);
+ cfablur = (float (*)) calloc (H*W, sizeof *cfablur);
+ int BS = raw.ff_BlurRadius;
+ BS += BS&1;
+
+ //function call to cfabloxblur
+ if (raw.ff_BlurType == RAWParams::ff_BlurTypestring[RAWParams::v_ff])
+ cfaboxblur(riFlatFile, cfablur, 2*BS, 0);
+ else if (raw.ff_BlurType == RAWParams::ff_BlurTypestring[RAWParams::h_ff])
+ cfaboxblur(riFlatFile, cfablur, 0, 2*BS);
+ else if (raw.ff_BlurType == RAWParams::ff_BlurTypestring[RAWParams::vh_ff])
+ //slightly more complicated blur if trying to correct both vertical and horizontal anomalies
+ cfaboxblur(riFlatFile, cfablur, BS, BS);//first do area blur to correct vignette
+ else //(raw.ff_BlurType == RAWParams::ff_BlurTypestring[RAWParams::area_ff])
+ cfaboxblur(riFlatFile, cfablur, BS, BS);
+
+ if(ri->getSensorType()==ST_BAYER) {
+ float refcolor[2][2];
+ //find center ave values by channel
+ for (int m=0; m<2; m++)
+ for (int n=0; n<2; n++) {
+ int row = 2*(H>>2)+m;
+ int col = 2*(W>>2)+n;
+ int c = FC(row, col);
+ int c4 = ( c == 1 && !(row&1) ) ? 3 : c;
+ refcolor[m][n] = max(0.0f,cfablur[row*W+col] - black[c4]);
+ }
+
+ float limitFactor = 1.f;
+
+ if(raw.ff_AutoClipControl) {
+ for (int m=0; m<2; m++)
+ for (int n=0; n<2; n++) {
+ float maxval = 0.f;
+ int c = FC(m, n);
+ int c4 = ( c == 1 && !(m&1) ) ? 3 : c;
+#pragma omp parallel
+{
+ float maxvalthr = 0.f;
+#pragma omp for
+ for (int row = 0; row< H-m; row+=2) {
+ for (int col = 0; col < W-n; col+=2) {
+ float tempval = (rawData[row+m][col+n]-black[c4]) * ( refcolor[m][n]/max(1e-5f,cfablur[(row+m)*W+col+n]-black[c4]) );
+ if(tempval > maxvalthr)
+ maxvalthr = tempval;
+ }
+ }
+#pragma omp critical
+{
+
+ if(maxvalthr>maxval)
+ maxval = maxvalthr;
+
+}
+}
+ // now we have the max value for the channel
+ // if it clips, calculate factor to avoid clipping
+ if(maxval + black[c4] >= ri->get_white(c4))
+ limitFactor = min(limitFactor,ri->get_white(c4) / (maxval + black[c4]));
+ }
+ } else {
+ limitFactor = max((float)(100 - raw.ff_clipControl)/100.f,0.01f);
+ }
+ for (int m=0; m<2; m++)
+ for (int n=0; n<2; n++)
+ refcolor[m][n] *= limitFactor;
+
+
+ for (int m=0; m<2; m++)
+ for (int n=0; n<2; n++) {
+#pragma omp parallel
+{
+ int c = FC(m, n);
+ int c4 = ( c == 1 && !(m&1) ) ? 3 : c;
+#pragma omp for
+ for (int row = 0; row< H-m; row+=2) {
+ for (int col = 0; col < W-n; col+=2) {
+ float vignettecorr = ( refcolor[m][n]/max(1e-5f,cfablur[(row+m)*W+col+n]-black[c4]) );
+ rawData[row+m][col+n] = (rawData[row+m][col+n]-black[c4]) * vignettecorr + black[c4];
+ }
+ }
+}
+ }
+ } else if(ri->getSensorType()==ST_FUJI_XTRANS) {
+ float refcolor[3] = {0.f};
+ int cCount[3] = {0};
+ //find center ave values by channel
+ for (int m=-3; m<3; m++)
+ for (int n=-3; n<3; n++) {
+ int row = 2*(H>>2)+m;
+ int col = 2*(W>>2)+n;
+ int c = riFlatFile->XTRANSFC(row, col);
+ refcolor[c] += max(0.0f,cfablur[row*W+col] - black[c]);
+ cCount[c] ++;
+ }
+ for(int c=0;c<3;c++)
+ refcolor[c] = refcolor[c] / cCount[c];
+
+ float limitFactor;
+
+ if(raw.ff_AutoClipControl) {
+ // determine maximum calculated value to avoid clipping
+ float maxval = 0.f;
+ // xtrans files have only one black level actually, so we can simplify the code a bit
+#pragma omp parallel
+{
+ float maxvalthr = 0.f;
+#pragma omp for schedule(dynamic,16) nowait
+ for (int row = 0; row< H; row++) {
+ for (int col = 0; col < W; col++) {
+ float tempval = (rawData[row][col]-black[0]) * ( refcolor[ri->XTRANSFC(row, col)]/max(1e-5f,cfablur[(row)*W+col]-black[0]) );
+ if(tempval > maxvalthr)
+ maxvalthr = tempval;
+ }
+ }
+#pragma omp critical
+{
+ if(maxvalthr>maxval)
+ maxval = maxvalthr;
+}
+}
+ // there's only one white level for xtrans
+ if(maxval + black[0] > ri->get_white(0))
+ limitFactor = ri->get_white(0) / (maxval + black[0]);
+ } else {
+ limitFactor = max((float)(100 - raw.ff_clipControl)/100.f,0.01f);
+ }
+
+
+ for(int c=0;c<3;c++)
+ refcolor[c] *= limitFactor;
+
+#pragma omp parallel for
+ for (int row = 0; row< H; row++) {
+ for (int col = 0; col < W; col++) {
+ int c = ri->XTRANSFC(row, col);
+ float vignettecorr = ( refcolor[c]/max(1e-5f,cfablur[(row)*W+col]-black[c]) );
+ rawData[row][col] = (rawData[row][col]-black[c]) * vignettecorr + black[c];
+ }
+ }
+ }
+ if (raw.ff_BlurType == RAWParams::ff_BlurTypestring[RAWParams::vh_ff]) {
+ float (*cfablur1);
+ cfablur1 = (float (*)) calloc (H*W, sizeof *cfablur1);
+ float (*cfablur2);
+ cfablur2 = (float (*)) calloc (H*W, sizeof *cfablur2);
+ //slightly more complicated blur if trying to correct both vertical and horizontal anomalies
+ cfaboxblur(riFlatFile, cfablur1, 0, 2*BS);//now do horizontal blur
+ cfaboxblur(riFlatFile, cfablur2, 2*BS, 0);//now do vertical blur
+
+ if(ri->getSensorType()==ST_BAYER) {
+ for (int m=0; m<2; m++)
+ for (int n=0; n<2; n++) {
+#pragma omp parallel for
+ for (int row = 0; row< H-m; row+=2) {
+ int c = FC(row, 0);
+ int c4 = ( c == 1 && !(row&1) ) ? 3 : c;
+ for (int col = 0; col < W-n; col+=2) {
+ float hlinecorr = (max(1e-5f,cfablur[(row+m)*W+col+n]-black[c4])/max(1e-5f,cfablur1[(row+m)*W+col+n]-black[c4]) );
+ float vlinecorr = (max(1e-5f,cfablur[(row+m)*W+col+n]-black[c4])/max(1e-5f,cfablur2[(row+m)*W+col+n]-black[c4]) );
+ rawData[row+m][col+n] = ((rawData[row+m][col+n]-black[c4]) * hlinecorr * vlinecorr + black[c4]);
+ }
+ }
+ }
+ } else if(ri->getSensorType()==ST_FUJI_XTRANS) {
+#pragma omp parallel for
+ for (int row = 0; row< H; row++) {
+ for (int col = 0; col < W; col++) {
+ int c = ri->XTRANSFC(row, col);
+ float hlinecorr = (max(1e-5f,cfablur[(row)*W+col]-black[c])/max(1e-5f,cfablur1[(row)*W+col]-black[c]) );
+ float vlinecorr = (max(1e-5f,cfablur[(row)*W+col]-black[c])/max(1e-5f,cfablur2[(row)*W+col]-black[c]) );
+ rawData[row][col] = ((rawData[row][col]-black[c]) * hlinecorr * vlinecorr + black[c]);
+ }
+ }
+
+ }
+ free (cfablur1);
+ free (cfablur2);
+ }
+
+ free (cfablur);
+}
+
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/* Copy original pixel data and
@@ -1246,10 +1459,10 @@ void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, Raw
{
unsigned short black[4]={ri->get_cblack(0),ri->get_cblack(1),ri->get_cblack(2),ri->get_cblack(3)};
- if (ri->isBayer()) {
+ if (ri->getSensorType()!=ST_NONE) {
if (!rawData)
rawData(W,H);
- if (riDark && W == riDark->get_width() && H == riDark->get_height()) {
+ if (riDark && W == riDark->get_width() && H == riDark->get_height()) { // This works also for xtrans-sensors, because black[0] to black[4] are equal for these
for (int row = 0; row < H; row++) {
for (int col = 0; col < W; col++) {
int c = FC(row, col);
@@ -1267,82 +1480,7 @@ void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, Raw
if (riFlatFile && W == riFlatFile->get_width() && H == riFlatFile->get_height()) {
-
- //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- float (*cfablur);
- cfablur = (float (*)) calloc (H*W, sizeof *cfablur);
-//#define BS 32
- int BS = raw.ff_BlurRadius;
- if (BS&1) BS++;
-
- //function call to cfabloxblur
- if (raw.ff_BlurType == RAWParams::ff_BlurTypestring[RAWParams::v_ff])
- cfaboxblur(riFlatFile, cfablur, 2*BS, 0);
- else if (raw.ff_BlurType == RAWParams::ff_BlurTypestring[RAWParams::h_ff])
- cfaboxblur(riFlatFile, cfablur, 0, 2*BS);
- else if (raw.ff_BlurType == RAWParams::ff_BlurTypestring[RAWParams::vh_ff])
- //slightly more complicated blur if trying to correct both vertical and horizontal anomalies
- cfaboxblur(riFlatFile, cfablur, BS, BS);//first do area blur to correct vignette
- else //(raw.ff_BlurType == RAWParams::ff_BlurTypestring[RAWParams::area_ff])
- cfaboxblur(riFlatFile, cfablur, BS, BS);
-
- float refcolor[2][2];
- //find center ave values by channel
- for (int m=0; m<2; m++)
- for (int n=0; n<2; n++) {
- int row = 2*(H>>2)+m;
- int col = 2*(W>>2)+n;
- int c = FC(row, col);
- int c4 = ( c == 1 && !(row&1) ) ? 3 : c;
- refcolor[m][n] = max(0.0f,cfablur[row*W+col] - black[c4]);
- }
-
- for (int m=0; m<2; m++)
- for (int n=0; n<2; n++) {
-#pragma omp parallel for
- for (int row = 0; row< H-m; row+=2) {
- int c = FC(row, 0);
- int c4 = ( c == 1 && !(row&1) ) ? 3 : c;
- for (int col = 0; col < W-n; col+=2) {
-// int c = FC(row, col);
-// int c4 = ( c == 1 && !(row&1) ) ? 3 : c;
- float vignettecorr = ( refcolor[m][n]/max(1e-5f,cfablur[(row+m)*W+col+n]-black[c4]) );
- rawData[row+m][col+n] = (rawData[row+m][col+n]-black[c4]) * vignettecorr + black[c4];
- }
- }
- }
-
- if (raw.ff_BlurType == RAWParams::ff_BlurTypestring[RAWParams::vh_ff]) {
- float (*cfablur1);
- cfablur1 = (float (*)) calloc (H*W, sizeof *cfablur1);
- float (*cfablur2);
- cfablur2 = (float (*)) calloc (H*W, sizeof *cfablur2);
- //slightly more complicated blur if trying to correct both vertical and horizontal anomalies
- cfaboxblur(riFlatFile, cfablur1, 0, 2*BS);//now do horizontal blur
- cfaboxblur(riFlatFile, cfablur2, 2*BS, 0);//now do vertical blur
-
- for (int m=0; m<2; m++)
- for (int n=0; n<2; n++) {
-#pragma omp parallel for
- for (int row = 0; row< H-m; row+=2) {
- int c = FC(row, 0);
- int c4 = ( c == 1 && !(row&1) ) ? 3 : c;
- for (int col = 0; col < W-n; col+=2) {
- float hlinecorr = (max(1e-5f,cfablur[(row+m)*W+col+n]-black[c4])/max(1e-5f,cfablur1[(row+m)*W+col+n]-black[c4]) );
- float vlinecorr = (max(1e-5f,cfablur[(row+m)*W+col+n]-black[c4])/max(1e-5f,cfablur2[(row+m)*W+col+n]-black[c4]) );
- rawData[row+m][col+n] = ((rawData[row+m][col+n]-black[c4]) * hlinecorr * vlinecorr + black[c4]);
- }
- }
- }
- free (cfablur1);
- free (cfablur2);
- }
-
- free (cfablur);
- //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-//#undef BS
-
-
+ processFlatField(raw, riFlatFile, black);
} // flatfield
} else if (ri->get_colors() == 1) {
// Monochrome
@@ -1566,20 +1704,35 @@ void RawImageSource::scaleColors(int winx,int winy,int winw,int winh, const RAWP
float black_lev[4];//black level
//adjust black level (eg Canon)
- black_lev[0]=raw.blackone;//R
- black_lev[1]=raw.blackzero;//G1
- black_lev[2]=raw.blacktwo;//B
- black_lev[3]=raw.blackthree;//G2 (only used with a Bayer filter)
+ bool isMono = false;
+ if (getSensorType()==ST_BAYER) {
+
+ black_lev[0]=raw.bayersensor.black1;//R
+ black_lev[1]=raw.bayersensor.black0;//G1
+ black_lev[2]=raw.bayersensor.black2;//B
+ black_lev[3]=raw.bayersensor.black3;//G2
+
+ isMono = RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::mono] == raw.bayersensor.method;
+ }
+ else if (getSensorType()==ST_FUJI_XTRANS) {
+
+ black_lev[0]=raw.xtranssensor.blackred;//R
+ black_lev[1]=raw.xtranssensor.blackgreen;//G1
+ black_lev[2]=raw.xtranssensor.blackblue;//B
+ black_lev[3]=raw.xtranssensor.blackgreen;//G2 (set, only used with a Bayer filter)
+
+ isMono = RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::mono] == raw.xtranssensor.method;
+ }
for(int i=0; i<4 ;i++) cblacksom[i] = max( c_black[i]+black_lev[i], 0.0f ); // adjust black level
- initialGain = calculate_scale_mul(scale_mul, ref_pre_mul, c_white, cblacksom, raw, ri->get_colors()); // recalculate scale colors with adjusted levels
+ initialGain = calculate_scale_mul(scale_mul, ref_pre_mul, c_white, cblacksom, isMono, ri->get_colors()); // recalculate scale colors with adjusted levels
//fprintf(stderr, "recalc: %f [%f %f %f %f]\n", initialGain, scale_mul[0], scale_mul[1], scale_mul[2], scale_mul[3]);
// this seems strange, but it works
// scale image colors
-
- if( ri->isBayer() ){
+
+ if( ri->getSensorType()==ST_BAYER){
#pragma omp parallel
{
float tmpchmax[3];
@@ -1605,7 +1758,7 @@ void RawImageSource::scaleColors(int winx,int winy,int winw,int winh, const RAWP
chmax[2] = max(tmpchmax[2],chmax[2]);
}
}
- }else if ( ri->get_colors() == 1 ) {
+ } else if ( ri->get_colors() == 1 ) {
#pragma omp parallel
{
float tmpchmax = 0.0f;
@@ -1625,7 +1778,32 @@ void RawImageSource::scaleColors(int winx,int winy,int winw,int winh, const RAWP
chmax[0] = chmax[1] = chmax[2] = chmax[3] = max(tmpchmax,chmax[0]);
}
}
- }else{
+ } else if(ri->getSensorType()==ST_FUJI_XTRANS) {
+#pragma omp parallel
+{
+ float tmpchmax[3];
+ tmpchmax[0] = tmpchmax[1] = tmpchmax[2] = 0.0f;
+
+#pragma omp for nowait
+ for (int row = winy; row < winy+winh; row ++){
+ for (int col = winx; col < winx+winw; col++) {
+ float val = rawData[row][col];
+ int c = ri->XTRANSFC(row, col);
+ val-=cblacksom[c];
+ val*=scale_mul[c];
+
+ rawData[row][col] = (val);
+ tmpchmax[c] = max(tmpchmax[c],val);
+ }
+ }
+#pragma omp critical
+{
+ chmax[0] = max(tmpchmax[0],chmax[0]);
+ chmax[1] = max(tmpchmax[1],chmax[1]);
+ chmax[2] = max(tmpchmax[2],chmax[2]);
+}
+}
+ } else {
#pragma omp parallel
{
float tmpchmax[3];
@@ -1650,8 +1828,6 @@ void RawImageSource::scaleColors(int winx,int winy,int winw,int winh, const RAWP
chmax[2] = max(tmpchmax[2],chmax[2]);
}
}
-
-
chmax[3]=chmax[1];
}
@@ -2560,33 +2736,39 @@ void RawImageSource::getAutoExpHistogram (LUTu & histogram, int& histcompr) {
histogram(65536>>histcompr);
histogram.clear();
+
#pragma omp parallel
{
LUTu tmphistogram(65536>>histcompr);
tmphistogram.clear();
-
#pragma omp for nowait
for (int i=border; iisBayer()) {
+ if (ri->getSensorType()==ST_BAYER) {
for (int j=start; jISGREEN(i,j)) tmphistogram[CLIP((int)(refwb_green*rawData[i][j]))>>histcompr]+=4;
- else if (ri->ISRED(i,j)) tmphistogram[CLIP((int)(refwb_red* rawData[i][j]))>>histcompr]+=4;
- else if (ri->ISBLUE(i,j)) tmphistogram[CLIP((int)(refwb_blue* rawData[i][j]))>>histcompr]+=4;
+ if (ri->ISGREEN(i,j)) tmphistogram[CLIP((int)(refwb_green*rawData[i][j]))>>histcompr]+=4;
+ else if (ri->ISRED(i,j)) tmphistogram[CLIP((int)(refwb_red* rawData[i][j]))>>histcompr]+=4;
+ else if (ri->ISBLUE(i,j)) tmphistogram[CLIP((int)(refwb_blue* rawData[i][j]))>>histcompr]+=4;
}
- } else if (ri->get_colors() == 1) {
+ } else if (ri->getSensorType()==ST_FUJI_XTRANS) {
for (int j=start; j>histcompr]++;
- }
- } else {
- for (int j=start; j>histcompr]++;
- tmphistogram[CLIP((int)(refwb_green*rawData[i][3*j+1]))>>histcompr]+=2;
- tmphistogram[CLIP((int)(refwb_blue* rawData[i][3*j+2]))>>histcompr]++;
- }
+ if (ri->ISXTRANSGREEN(i,j)) tmphistogram[CLIP((int)(refwb_green*rawData[i][j]))>>histcompr]+=4;
+ else if (ri->ISXTRANSRED(i,j)) tmphistogram[CLIP((int)(refwb_red* rawData[i][j]))>>histcompr]+=4;
+ else if (ri->ISXTRANSBLUE(i,j)) tmphistogram[CLIP((int)(refwb_blue* rawData[i][j]))>>histcompr]+=4;
+ }
+ } else if (ri->get_colors() == 1) {
+ for (int j=start; j>histcompr]++;
}
+ } else {
+ for (int j=start; j>histcompr]++;
+ tmphistogram[CLIP((int)(refwb_green*rawData[i][3*j+1]))>>histcompr]+=2;
+ tmphistogram[CLIP((int)(refwb_blue* rawData[i][3*j+2]))>>histcompr]++;
+ }
+ }
}
#pragma omp critical
{
@@ -2625,7 +2807,7 @@ void RawImageSource::getRAWHistogram (LUTu & histRedRaw, LUTu & histGreenRaw, LU
int start, end;
getRowStartEnd (i, start, end);
- if (ri->isBayer()) {
+ if (ri->getSensorType()==ST_BAYER) {
int j;
int c1 = FC(i,start);
c1 = ( c1 == 1 && !(i&1) ) ? 3 : c1;
@@ -2644,6 +2826,11 @@ void RawImageSource::getRAWHistogram (LUTu & histRedRaw, LUTu & histGreenRaw, LU
tmphist[c][(int)ri->data[i][j]]++;
}
}
+ } else if(ri->getSensorType()==ST_FUJI_XTRANS) {
+ for (int j=start; jXTRANSFC(i,j);
+ tmphist[c][(int)ri->data[i][j]]++;
+ }
} else {
for (int j=start; jisBayer())
+
+ if (ri->getSensorType()==ST_BAYER) // since there are twice as many greens, correct for it
for (int i=0;i<256;i++)
histGreenRaw[i]>>=1;
+ else if(ri->getSensorType()==ST_FUJI_XTRANS) // since Xtrans has 2.5 as many greens, correct for it
+ for (int i=0;i<256;i++)
+ histGreenRaw[i] = (histGreenRaw[i]*2)/5;
+
}
@@ -2723,7 +2914,7 @@ void RawImageSource::getRowStartEnd (int x, int &start, int &end) {
int start = ABS(fw-i) + 32;
int end = min(H+W-fw-i, fw+i) - 32;
for (int j=start; jisBayer()) {
+ if (ri->getSensorType()!=ST_BAYER) {
double dr = CLIP(initialGain*(rawData[i][3*j] ));
double dg = CLIP(initialGain*(rawData[i][3*j+1]));
double db = CLIP(initialGain*(rawData[i][3*j+2]));
@@ -2756,20 +2947,48 @@ void RawImageSource::getRowStartEnd (int x, int &start, int &end) {
}
}
else {
- if (!ri->isBayer()) {
- for (int i=32; igetSensorType()!=ST_BAYER) {
+ if(ri->getSensorType()==ST_FUJI_XTRANS) {
+ for (int i=32; iISXTRANSRED(i,j)) {
+ float dr = CLIP(initialGain*(rawData[i][j]));
+ if (dr>64000.f)
+ continue;
+ avg_r += dr;
+ rn ++;
+ }
+ if(ri->ISXTRANSGREEN(i,j)) {
+ float dg = CLIP(initialGain*(rawData[i][j]));
+ if (dg>64000.f)
+ continue;
+ avg_g += dg;
+ gn ++;
+ }
+ if(ri->ISXTRANSBLUE(i,j)) {
+ float db = CLIP(initialGain*(rawData[i][j]));
+ if (db>64000.f)
+ continue;
+ avg_b += db;
+ bn ++;
+ }
+ }
+ } else {
+ for (int i=32; i64000. || dg>64000. || db>64000.) continue;
- avg_r += dr; rn++;
- avg_g += dg;
- avg_b += db;
- }
- gn = rn; bn=rn;
+ double dr = CLIP(initialGain*(rawData[i][3*j] ));
+ double dg = CLIP(initialGain*(rawData[i][3*j+1]));
+ double db = CLIP(initialGain*(rawData[i][3*j+2]));
+ if (dr>64000. || dg>64000. || db>64000.) continue;
+ avg_r += dr; rn++;
+ avg_g += dg;
+ avg_b += db;
+ }
+ gn = rn; bn=rn;
+ }
} else {
//determine GRBG coset; (ey,ex) is the offset of the R subarray
int ey, ex;
@@ -2828,25 +3047,59 @@ void RawImageSource::getRowStartEnd (int x, int &start, int &end) {
double reds = 0, greens = 0, blues = 0;
int rn = 0;
- if (!ri->isBayer()) {
- int xmin, xmax, ymin, ymax;
- int xr, xg, xb, yr, yg, yb;
- for (size_t i=0; i52500 ||
- initialGain*(rawData[yg][3*xg+1])>52500 ||
- initialGain*(rawData[yb][3*xb+2])>52500) continue;
- xmin = min(xr,xg,xb);
- xmax = max(xr,xg,xb);
- ymin = min(yr,yg,yb);
- ymax = max(yr,yg,yb);
- if (xmin>=0 && ymin>=0 && xmaxgetSensorType()!=ST_BAYER) {
+ if(ri->getSensorType()==ST_FUJI_XTRANS) {
+ int d[9][2] = {{0,0}, {-1,-1}, {-1,0}, {-1,1}, {0,-1}, {0,1}, {1,-1}, {1,0}, {1,1}};
+ double rloc, gloc, bloc;
+ int rnbrs, gnbrs, bnbrs;
+ for (size_t i=0; i=0 && yv>=0 && xvISXTRANSRED(yv,xv)) { //RED
+ rloc += (rawData[yv][xv]);
+ rnbrs++;
+ continue;
+ } else if (ri->ISXTRANSBLUE(yv,xv)) { //BLUE
+ bloc += (rawData[yv][xv]);
+ bnbrs++;
+ continue;
+ } else { // GREEN
+ gloc += (rawData[yv][xv]);
+ gnbrs++;
+ continue;
+ }
+ }
+ }
+ rloc /= rnbrs; gloc /= gnbrs; bloc /= bnbrs;
+ if (rloc*initialGain<64000. && gloc*initialGain<64000. && bloc*initialGain<64000.) {
+ reds += rloc; greens += gloc; blues += bloc; rn++;
+ }
+ }
+
+ } else {
+ int xmin, xmax, ymin, ymax;
+ int xr, xg, xb, yr, yg, yb;
+ for (size_t i=0; i52500 ||
+ initialGain*(rawData[yg][3*xg+1])>52500 ||
+ initialGain*(rawData[yb][3*xb+2])>52500) continue;
+ xmin = min(xr,xg,xb);
+ xmax = max(xr,xg,xb);
+ ymin = min(yr,yg,yb);
+ ymax = max(yr,yg,yb);
+ if (xmin>=0 && ymin>=0 && xmax=0 && yv>=0 && xv=0 && yv>=0 && xv=0 && yv>=0 && xv=0 && yv>=0 && xv=0 && yv>=0 && xv=0 && yv>=0 && xv=0 && yv>=0 && xv=0 && yv>=0 && xv=0 && yv>=0 && xvgetSensorType() : ST_NONE; }
ColorTemp getWB () { return camera_wb; }
void getAutoWBMultipliers (double &rm, double &gm, double &bm);
ColorTemp getSpotWB (std::vector &red, std::vector &green, std::vector &blue, int tran, double equal);
@@ -253,7 +255,10 @@ class RawImageSource : public ImageSource {
void restore_from_buffer(float (*image)[4], float (*image2)[3]);
void dcb_refinement(float (*image)[4], int x0, int y0);
void dcb_color_full(float (*image)[4], int x0, int y0, float (*chroma)[2]);
-
+ void cielab (const float (*rgb)[3], float* l, float* a, float *b, const int width, const int height, const int labWidth, const float xyz_cam[3][3]);
+ void xtransborder_interpolate (int border);
+ void xtrans_interpolate (int passes, bool useCieLab);
+ void fast_xtrans_interpolate ();
void transLine (float* red, float* green, float* blue, int i, Imagefloat* image, int tran, int imw, int imh, int fw);
void hflip (Imagefloat* im);
void vflip (Imagefloat* im);
diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc
index b2aa9b6e1..53ce32d94 100644
--- a/rtengine/refreshmap.cc
+++ b/rtengine/refreshmap.cc
@@ -308,9 +308,13 @@ RGBCURVE, //EvColorToningStrProtection
RGBCURVE, //EvColorToningautosat
ALLNORAW, //EvDPDNmetmed
ALLNORAW, //EvDPDNrgbmet
-ALLNORAW //EvDPDNpasses
+ALLNORAW, //EvDPDNpasses
+FLATFIELD, // EvFlatFieldClipControl
+FLATFIELD, // EvFlatFieldAutoClipControl
+DARKFRAME, // EvPreProcessExpBlackRed
+DARKFRAME, // EvPreProcessExpBlackGreen
+DARKFRAME, // EvPreProcessExpBlackBlue
-//LUMINANCECURVE // EvCATsharpcie
};
diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc
index a355b0c39..2a97351fc 100644
--- a/rtengine/rtthumbnail.cc
+++ b/rtengine/rtthumbnail.cc
@@ -283,8 +283,9 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati
unsigned filter = ri->get_filters();
int firstgreen = 1;
// locate first green location in the first row
- while (!FISGREEN(filter,1,firstgreen))
- firstgreen++;
+ if(ri->getSensorType()!=ST_FUJI_XTRANS)
+ while (!FISGREEN(filter,1,firstgreen))
+ firstgreen++;
int skip = 1;
if (ri->get_FujiWidth() != 0){
@@ -314,7 +315,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati
DCraw::dcrawImage_t image = ri->get_image();
Imagefloat* tmpImg = new Imagefloat(tmpw, tmph);
- if (ri->isBayer()) {
+ if (ri->getSensorType()==ST_BAYER) {
// demosaicing! (sort of)
for (int row = 1, y = 0; row < height - 1 && y < tmph; row += vskip, y++) {
rofs = row * width;
@@ -344,14 +345,37 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati
}
}
} else {
- for (int row = 1, y = 0; row < height - 1 && y < tmph; row += vskip, y++) {
- rofs = row * width;
- for (int col = firstgreen, x = 0; col < width - 1 && x < tmpw; col
- += hskip, x++) {
- int ofs = rofs + col;
- tmpImg->r(y,x) = image[ofs][0];
- tmpImg->g(y,x) = image[ofs][1];
- tmpImg->b(y,x) = image[ofs][2];
+ if(ri->getSensorType()==ST_FUJI_XTRANS) {
+ for( int row=1, y = 0; row < height-1 && y < tmph; row+=vskip, y++) {
+ rofs = row * width;
+ for( int col=1, x = 0; col < width-1 && x < tmpw; col+=hskip, x++ ) {
+ int ofs = rofs + col;
+ float sum[3] = {};
+ int c;
+ for(int v=-1;v<=1;v++) {
+ for(int h=-1;h<=1;h++) {
+ c = ri->XTRANSFC(row+v,col+h);
+ sum[c] += image[ofs + v*width + h][c];
+ }
+ }
+ c = ri->XTRANSFC(row,col);
+
+ switch (c) {
+ case 0: tmpImg->r(y,x) = image[ofs][0]; tmpImg->g(y,x) = sum[1] / 5.f; tmpImg->b(y,x) = sum[2] / 3.f; break;
+ case 1: tmpImg->r(y,x) = sum[0] / 2.f; tmpImg->g(y,x) = image[ofs][1]; tmpImg->b(y,x) = sum[2] / 2.f; break;
+ case 2: tmpImg->r(y,x) = sum[0] / 3.f; tmpImg->g(y,x) = sum[1] / 5.f; tmpImg->b(y,x) = image[ofs][2]; break;
+ }
+ }
+ }
+ } else {
+ for (int row = 1, y = 0; row < height - 1 && y < tmph; row += vskip, y++) {
+ rofs = row * width;
+ for (int col = firstgreen, x = 0; col < width - 1 && x < tmpw; col += hskip, x++) {
+ int ofs = rofs + col;
+ tmpImg->r(y,x) = image[ofs][0];
+ tmpImg->g(y,x) = image[ofs][1];
+ tmpImg->b(y,x) = image[ofs][2];
+ }
}
}
}
@@ -422,7 +446,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati
tpp->aeHistogram[((int)(image[i* width+j][0]))>>tpp->aeHistCompression]+=gadd;
tpp->aeHistogram[((int)(image[i* width+j][0]))>>tpp->aeHistCompression]+=badd;
}
- } else {
+ } else if(ri->getSensorType()!=ST_FUJI_XTRANS) {
for (int j = start; j < end; j++)
if (FISGREEN(filter,i,j))
tpp->aeHistogram[((int)(tpp->camwbGreen*image[i* width+j][1]))>>tpp->aeHistCompression]+=gadd;
@@ -430,6 +454,14 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati
tpp->aeHistogram[((int)(tpp->camwbRed * image[i* width+j][0]))>>tpp->aeHistCompression]+=radd;
else if (FISBLUE(filter,i,j))
tpp->aeHistogram[((int)(tpp->camwbBlue *image[i* width+j][2]))>>tpp->aeHistCompression]+=badd;
+ } else {
+ for (int j = start; j < end; j++)
+ if (ri->ISXTRANSGREEN(i,j))
+ tpp->aeHistogram[((int)(tpp->camwbGreen*image[i* width+j][1]))>>tpp->aeHistCompression]+=gadd;
+ else if (ri->ISXTRANSRED(i,j))
+ tpp->aeHistogram[((int)(tpp->camwbRed * image[i* width+j][0]))>>tpp->aeHistCompression]+=radd;
+ else if (ri->ISXTRANSBLUE(i,j))
+ tpp->aeHistogram[((int)(tpp->camwbBlue *image[i* width+j][2]))>>tpp->aeHistCompression]+=badd;
}
}
@@ -451,33 +483,59 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati
start = 32;
end = width - 32;
}
- for (int j = start; j < end; j++) {
- if (!filter) {
- double d = tpp->defGain * image[i * width + j][0];
- if (d > 64000.)
- continue;
- avg_g += d; avg_r += d; avg_b += d;
- rn++; gn++; bn++;
- } else if (FISGREEN(filter,i,j)) {
- double d = tpp->defGain * image[i * width + j][1];
- if (d > 64000.)
- continue;
- avg_g += d;
- gn++;
+ if(ri->getSensorType()!=ST_FUJI_XTRANS) {
+ for (int j = start; j < end; j++) {
+ if (!filter) {
+ double d = tpp->defGain * image[i * width + j][0];
+ if (d > 64000.)
+ continue;
+ avg_g += d; avg_r += d; avg_b += d;
+ rn++; gn++; bn++;
+ } else if (FISGREEN(filter,i,j)) {
+ double d = tpp->defGain * image[i * width + j][1];
+ if (d > 64000.)
+ continue;
+ avg_g += d;
+ gn++;
+ }
+ else if (FISRED(filter,i,j)) {
+ double d = tpp->defGain * image[i * width + j][0];
+ if (d > 64000.)
+ continue;
+ avg_r += d;
+ rn++;
+ }
+ else if (FISBLUE(filter,i,j)) {
+ double d = tpp->defGain * image[i * width + j][2];
+ if (d > 64000.)
+ continue;
+ avg_b += d;
+ bn++;
+ }
}
- else if (FISRED(filter,i,j)) {
- double d = tpp->defGain * image[i * width + j][0];
- if (d > 64000.)
- continue;
- avg_r += d;
- rn++;
- }
- else if (FISBLUE(filter,i,j)) {
- double d = tpp->defGain * image[i * width + j][2];
- if (d > 64000.)
- continue;
- avg_b += d;
- bn++;
+ } else {
+ for (int j = start; j < end; j++) {
+ if (ri->ISXTRANSGREEN(i,j)) {
+ double d = tpp->defGain * image[i * width + j][1];
+ if (d > 64000.)
+ continue;
+ avg_g += d;
+ gn++;
+ }
+ else if (ri->ISXTRANSRED(i,j)) {
+ double d = tpp->defGain * image[i * width + j][0];
+ if (d > 64000.)
+ continue;
+ avg_r += d;
+ rn++;
+ }
+ else if (ri->ISXTRANSBLUE(i,j)) {
+ double d = tpp->defGain * image[i * width + j][2];
+ if (d > 64000.)
+ continue;
+ avg_b += d;
+ bn++;
+ }
}
}
}
diff --git a/rtgui/CMakeLists.txt b/rtgui/CMakeLists.txt
index 528b5a970..8ceec7d5d 100644
--- a/rtgui/CMakeLists.txt
+++ b/rtgui/CMakeLists.txt
@@ -25,7 +25,8 @@ set (BASESOURCEFILES
thumbbrowserentrybase.cc batchqueueentry.cc
batchqueue.cc lwbutton.cc lwbuttonset.cc
batchqueuebuttonset.cc browserfilter.cc exiffiltersettings.cc
- profilestore.cc partialpastedlg.cc rawprocess.cc preprocess.cc
+ profilestore.cc partialpastedlg.cc
+ sensorbayer.cc sensorxtrans.cc preprocess.cc bayerpreprocess.cc bayerprocess.cc bayerrawexposure.cc xtransprocess.cc xtransrawexposure.cc
darkframe.cc flatfield.cc rawcacorrection.cc rawexposure.cc
dirpyrequalizer.cc hsvequalizer.cc defringe.cc
popupcommon.cc popupbutton.cc popuptogglebutton.cc sharpenedge.cc sharpenmicro.cc colorappearance.cc)
diff --git a/rtgui/addsetids.h b/rtgui/addsetids.h
index 98235c0df..4133cb24f 100644
--- a/rtgui/addsetids.h
+++ b/rtgui/addsetids.h
@@ -83,8 +83,9 @@
#define ADDSET_COLORTONING_BALANCE 75
#define ADDSET_COLORTONING_STRPROTECT 76
#define ADDSET_DIRPYRDN_PASSES 77
+#define ADDSET_RAWFFCLIPCONTROL 78
// When adding items, make sure to update ADDSET_PARAM_NUM
-#define ADDSET_PARAM_NUM 78 // THIS IS USED AS A DELIMITER!!
+#define ADDSET_PARAM_NUM 79 // THIS IS USED AS A DELIMITER!!
#endif
diff --git a/rtgui/batchtoolpanelcoord.cc b/rtgui/batchtoolpanelcoord.cc
index 5cdb62441..a4318d74f 100644
--- a/rtgui/batchtoolpanelcoord.cc
+++ b/rtgui/batchtoolpanelcoord.cc
@@ -148,9 +148,12 @@ void BatchToolPanelCoordinator::initSession () {
shadowshighlights->setAdjusterBehavior (false, false, false);
dirpyrequalizer->setAdjusterBehavior (false, false, false);
dirpyrdenoise->setAdjusterBehavior (false, false,false,false,false,false, false);
- preprocess->setAdjusterBehavior (false, false);
+ bayerpreprocess->setAdjusterBehavior (false, false);
rawcacorrection->setAdjusterBehavior (false);
- rawexposure->setAdjusterBehavior (false, false, false);
+ flatfield->setAdjusterBehavior(false);
+ rawexposure->setAdjusterBehavior (false, false);
+ bayerrawexposure->setAdjusterBehavior (false);
+ xtransrawexposure->setAdjusterBehavior (false);
}
else {
@@ -180,10 +183,13 @@ void BatchToolPanelCoordinator::initSession () {
shadowshighlights->setAdjusterBehavior (options.baBehav[ADDSET_SH_HIGHLIGHTS], options.baBehav[ADDSET_SH_SHADOWS], options.baBehav[ADDSET_SH_LOCALCONTRAST]);
dirpyrequalizer->setAdjusterBehavior (options.baBehav[ADDSET_DIRPYREQ], options.baBehav[ADDSET_DIRPYREQ_THRESHOLD], options.baBehav[ADDSET_DIRPYREQ_SKINPROTECT]);
dirpyrdenoise->setAdjusterBehavior (options.baBehav[ADDSET_DIRPYRDN_LUMA],options.baBehav[ADDSET_DIRPYRDN_LUMDET],options.baBehav[ADDSET_DIRPYRDN_CHROMA],options.baBehav[ADDSET_DIRPYRDN_CHROMARED],options.baBehav[ADDSET_DIRPYRDN_CHROMABLUE], options.baBehav[ADDSET_DIRPYRDN_GAMMA], options.baBehav[ADDSET_DIRPYRDN_PASSES]);
- preprocess->setAdjusterBehavior (options.baBehav[ADDSET_PREPROCESS_LINEDENOISE], options.baBehav[ADDSET_PREPROCESS_GREENEQUIL]);
+ bayerpreprocess->setAdjusterBehavior (options.baBehav[ADDSET_PREPROCESS_LINEDENOISE], options.baBehav[ADDSET_PREPROCESS_GREENEQUIL]);
rawcacorrection->setAdjusterBehavior (options.baBehav[ADDSET_RAWCACORR]);
- rawexposure->setAdjusterBehavior (options.baBehav[ADDSET_RAWEXPOS_LINEAR], options.baBehav[ADDSET_RAWEXPOS_PRESER], options.baBehav[ADDSET_RAWEXPOS_BLACKS]);
-
+ flatfield->setAdjusterBehavior(options.baBehav[ADDSET_RAWFFCLIPCONTROL]);
+ rawexposure->setAdjusterBehavior (options.baBehav[ADDSET_RAWEXPOS_LINEAR], options.baBehav[ADDSET_RAWEXPOS_PRESER]);
+ bayerrawexposure->setAdjusterBehavior (options.baBehav[ADDSET_RAWEXPOS_BLACKS]);
+ xtransrawexposure->setAdjusterBehavior (options.baBehav[ADDSET_RAWEXPOS_BLACKS]);
+
if (options.baBehav[ADDSET_TC_EXPCOMP]) pparams.toneCurve.expcomp = 0;
if (options.baBehav[ADDSET_TC_HLCOMPAMOUNT]) pparams.toneCurve.hlcompr = 0;
if (options.baBehav[ADDSET_TC_HLCOMPTHRESH]) pparams.toneCurve.hlcomprthresh = 0;
@@ -282,12 +288,17 @@ void BatchToolPanelCoordinator::initSession () {
// pparams.dirpyrDenoise.Ldetail = pparams.dirpyrDenoise.luma = pparams.dirpyrDenoise.chroma = 0;
if (options.baBehav[ADDSET_DIRPYRDN_GAMMA]) pparams.dirpyrDenoise.gamma = 0;
- if (options.baBehav[ADDSET_PREPROCESS_GREENEQUIL]) pparams.raw.greenthresh = 0;
- if (options.baBehav[ADDSET_PREPROCESS_LINEDENOISE]) pparams.raw.linenoise = 0;
if (options.baBehav[ADDSET_RAWCACORR]) pparams.raw.cablue = pparams.raw.cared = 0;
if (options.baBehav[ADDSET_RAWEXPOS_LINEAR]) pparams.raw.expos = 0;
if (options.baBehav[ADDSET_RAWEXPOS_PRESER]) pparams.raw.preser = 0;
- if (options.baBehav[ADDSET_RAWEXPOS_BLACKS]) pparams.raw.blackzero = pparams.raw.blackone = pparams.raw.blacktwo = pparams.raw.blackthree = 0;
+ if (options.baBehav[ADDSET_RAWEXPOS_BLACKS]) {
+ pparams.raw.bayersensor.black0 = pparams.raw.bayersensor.black1 = pparams.raw.bayersensor.black2 = pparams.raw.bayersensor.black3 = 0;
+ pparams.raw.xtranssensor.blackred = pparams.raw.xtranssensor.blackgreen = pparams.raw.xtranssensor.blackblue = 0;
+ }
+ if (options.baBehav[ADDSET_RAWFFCLIPCONTROL]) pparams.raw.ff_clipControl = 0;
+
+ if (options.baBehav[ADDSET_PREPROCESS_GREENEQUIL]) pparams.raw.bayersensor.greenthresh = 0;
+ if (options.baBehav[ADDSET_PREPROCESS_LINEDENOISE]) pparams.raw.bayersensor.linenoise = 0;
}
for (size_t i=0; i
+ *
+ * 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 "bayerpreprocess.h"
+#include "guiutils.h"
+#include "../rtengine/safegtk.h"
+#include
+
+using namespace rtengine;
+using namespace rtengine::procparams;
+
+BayerPreProcess::BayerPreProcess () : FoldableToolPanel(this)
+{
+ lineDenoise = Gtk::manage(new Adjuster (M("TP_PREPROCESS_LINEDENOISE"),0,1000,1,0));
+ lineDenoise->setAdjusterListener (this);
+ if (lineDenoise->delay < 1000) lineDenoise->delay = 1000;
+ lineDenoise->show();
+
+ greenEqThreshold = Gtk::manage(new Adjuster (M("TP_PREPROCESS_GREENEQUIL"),0,100,1,0));
+ greenEqThreshold->setAdjusterListener (this);
+ if (greenEqThreshold->delay < 1000) greenEqThreshold->delay = 1000;
+ greenEqThreshold->show();
+
+ pack_start( *lineDenoise, Gtk::PACK_SHRINK, 4);
+
+ pack_start( *Gtk::manage (new Gtk::HSeparator()));
+
+ pack_start( *greenEqThreshold, Gtk::PACK_SHRINK, 4);
+
+}
+
+void BayerPreProcess::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited)
+{
+ disableListener ();
+
+ if(pedited ){
+ lineDenoise->setEditedState( pedited->raw.bayersensor.linenoise ? Edited : UnEdited );
+ greenEqThreshold->setEditedState( pedited->raw.bayersensor.greenEq ? Edited : UnEdited );
+ }
+
+ lineDenoise->setValue (pp->raw.bayersensor.linenoise);
+ greenEqThreshold->setValue (pp->raw.bayersensor.greenthresh);
+
+ enableListener ();
+}
+
+void BayerPreProcess::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited)
+{
+ pp->raw.bayersensor.linenoise = lineDenoise->getIntValue();
+ pp->raw.bayersensor.greenthresh = greenEqThreshold->getIntValue();
+
+ if (pedited) {
+ pedited->raw.bayersensor.linenoise = lineDenoise->getEditedState ();
+ pedited->raw.bayersensor.greenEq= greenEqThreshold->getEditedState ();
+ }
+}
+
+void BayerPreProcess::adjusterChanged (Adjuster* a, double newval)
+{
+ if (listener) {
+
+ Glib::ustring value = a->getTextValue();
+
+ if (a == greenEqThreshold)
+ listener->panelChanged (EvPreProcessGEquilThresh, value );
+ else if (a == lineDenoise)
+ listener->panelChanged (EvPreProcessLineDenoise, value );
+ }
+}
+
+void BayerPreProcess::setBatchMode(bool batchMode)
+{
+ ToolPanel::setBatchMode (batchMode);
+ lineDenoise->showEditedCB ();
+ greenEqThreshold->showEditedCB ();
+}
+
+void BayerPreProcess::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
+{
+ lineDenoise->setDefault( defParams->raw.bayersensor.linenoise);
+ greenEqThreshold->setDefault (defParams->raw.bayersensor.greenthresh);
+
+ if (pedited) {
+ lineDenoise->setDefaultEditedState( pedited->raw.bayersensor.linenoise ? Edited : UnEdited);
+ greenEqThreshold->setDefaultEditedState(pedited->raw.bayersensor.greenEq ? Edited : UnEdited);
+ } else {
+ lineDenoise->setDefaultEditedState( Irrelevant );
+ greenEqThreshold->setDefaultEditedState(Irrelevant );
+ }
+}
+
+void BayerPreProcess::setAdjusterBehavior (bool linedenoiseadd, bool greenequiladd) {
+
+ lineDenoise->setAddMode(linedenoiseadd);
+ greenEqThreshold->setAddMode(greenequiladd);
+}
+
+void BayerPreProcess::trimValues (rtengine::procparams::ProcParams* pp) {
+
+ lineDenoise->trimValue(pp->raw.bayersensor.linenoise);
+ greenEqThreshold->trimValue(pp->raw.bayersensor.greenthresh);
+}
diff --git a/rtgui/bayerpreprocess.h b/rtgui/bayerpreprocess.h
new file mode 100644
index 000000000..5c2ec4cdb
--- /dev/null
+++ b/rtgui/bayerpreprocess.h
@@ -0,0 +1,49 @@
+/*
+ * 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 .
+ */
+#ifndef _BAYERPREPROCESS_H_
+#define _BAYERPREPROCESS_H_
+
+#include
+#include "adjuster.h"
+#include "toolpanel.h"
+#include "../rtengine/rawimage.h"
+
+class BayerPreProcess : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel {
+
+ protected:
+
+ Adjuster* lineDenoise;
+ Adjuster* greenEqThreshold;
+
+ public:
+
+ BayerPreProcess ();
+
+ void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited=NULL);
+ void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL);
+ void setBatchMode (bool batchMode);
+ void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL);
+
+ void adjusterChanged (Adjuster* a, double newval);
+ void hotDeadPixelChanged();
+ void setAdjusterBehavior (bool linedenoiseadd, bool greenequiladd);
+ void trimValues (rtengine::procparams::ProcParams* pp);
+};
+
+#endif
diff --git a/rtgui/bayerprocess.cc b/rtgui/bayerprocess.cc
new file mode 100644
index 000000000..f5b5a4e59
--- /dev/null
+++ b/rtgui/bayerprocess.cc
@@ -0,0 +1,270 @@
+/*
+ * 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 .
+ */
+#include "bayerprocess.h"
+#include "options.h"
+#include "guiutils.h"
+using namespace rtengine;
+using namespace rtengine::procparams;
+
+BayerProcess::BayerProcess () : FoldableToolPanel(this)
+{
+ Gtk::HBox* hb1 = Gtk::manage (new Gtk::HBox ());
+ hb1->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_RAW_DMETHOD") +": ")),Gtk::PACK_SHRINK, 4);
+ method = Gtk::manage (new MyComboBoxText ());
+ for( size_t i=0; iappend_text(procparams::RAWParams::BayerSensor::methodstring[i]);
+
+ method->set_active(0);
+ hb1->set_tooltip_markup (M("TP_RAW_DMETHOD_TOOLTIP"));
+
+ hb1->pack_end (*method, Gtk::PACK_EXPAND_WIDGET, 4);
+ pack_start( *hb1, Gtk::PACK_SHRINK, 4);
+
+ dcbOptions = Gtk::manage (new Gtk::VBox ());
+ dcbOptions->set_border_width(4);
+
+ dcbIterations = Gtk::manage (new Adjuster (M("TP_RAW_DCBITERATIONS"),0,5,1,2));
+ dcbIterations->setAdjusterListener (this);
+ if (dcbIterations->delay < 1000) dcbIterations->delay = 1000;
+ dcbIterations->show();
+ dcbEnhance = Gtk::manage (new Gtk::CheckButton(M("TP_RAW_DCBENHANCE")));
+ dcbOptions->pack_start(*dcbIterations);
+ dcbOptions->pack_start(*dcbEnhance);
+ pack_start( *dcbOptions, Gtk::PACK_SHRINK, 4);
+
+ lmmseOptions = Gtk::manage (new Gtk::VBox ());
+ lmmseOptions->set_border_width(4);
+
+ lmmseIterations = Gtk::manage (new Adjuster (M("TP_RAW_LMMSEITERATIONS"),0,6,1,2));
+ lmmseIterations->setAdjusterListener (this);
+ lmmseIterations->set_tooltip_markup (M("TP_RAW_LMMSE_TOOLTIP"));
+
+ if (lmmseIterations->delay < 1000) lmmseIterations->delay = 1000;
+ lmmseIterations->show();
+ lmmseOptions->pack_start(*lmmseIterations);
+ pack_start( *lmmseOptions, Gtk::PACK_SHRINK, 4);
+
+ pack_start( *Gtk::manage( new Gtk::HSeparator()), Gtk::PACK_SHRINK, 0 );
+ ccSteps = Gtk::manage (new Adjuster (M("TP_RAW_FALSECOLOR"),0,5,1,0 ));
+ ccSteps->setAdjusterListener (this);
+ if (ccSteps->delay < 1000) ccSteps->delay = 1000;
+ ccSteps->show();
+ pack_start( *ccSteps, Gtk::PACK_SHRINK, 4);
+
+ //pack_start( *Gtk::manage( new Gtk::HSeparator()), Gtk::PACK_SHRINK, 0 );
+ //allOptions = Gtk::manage (new Gtk::VBox ());
+ //allOptions->set_border_width(2);
+ //allEnhance = Gtk::manage (new Gtk::CheckButton(M("TP_RAW_ALLENHANCE")));
+ //allOptions->pack_start(*allEnhance);
+ //pack_start( *allOptions, Gtk::PACK_SHRINK, 4);
+
+ methodconn = method->signal_changed().connect( sigc::mem_fun(*this, &BayerProcess::methodChanged) );
+ dcbEnhconn = dcbEnhance->signal_toggled().connect ( sigc::mem_fun(*this, &BayerProcess::dcbEnhanceChanged), true);
+ //allEnhconn = allEnhance->signal_toggled().connect ( sigc::mem_fun(*this, &BayerProcess::allEnhanceChanged), true);
+}
+
+
+void BayerProcess::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited)
+{
+ disableListener ();
+ methodconn.block (true);
+ dcbEnhconn.block (true);
+ //allEnhconn.block (true);
+
+ method->set_active(procparams::RAWParams::BayerSensor::numMethods);
+ for( size_t i=0; i< procparams::RAWParams::BayerSensor::numMethods; i++)
+ if( pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[i]){
+ method->set_active(i);
+ oldSelection = i;
+ break;
+ }
+
+ if(pedited ){
+ ccSteps->setEditedState (pedited->raw.bayersensor.ccSteps ? Edited : UnEdited);
+ dcbIterations->setEditedState ( pedited->raw.bayersensor.dcbIterations ? Edited : UnEdited);
+ dcbEnhance->set_inconsistent(!pedited->raw.bayersensor.dcbEnhance);
+ //allEnhance->set_inconsistent(!pedited->raw.bayersensor.allEnhance);
+ lmmseIterations->setEditedState ( pedited->raw.bayersensor.lmmseIterations ? Edited : UnEdited);
+
+ if( !pedited->raw.bayersensor.method )
+ method->set_active(procparams::RAWParams::BayerSensor::numMethods); // No name
+ }
+
+ //allEnhance->set_active(pp->raw.bayersensor.all_enhance);
+
+ dcbIterations->setValue (pp->raw.bayersensor.dcb_iterations);
+ dcbEnhance->set_active(pp->raw.bayersensor.dcb_enhance);
+ ccSteps->setValue (pp->raw.bayersensor.ccSteps);
+ if (pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[procparams::RAWParams::BayerSensor::dcb] ||
+ method->get_active_row_number() == procparams::RAWParams::BayerSensor::numMethods)
+ dcbOptions->show();
+ else
+ dcbOptions->hide();
+
+ lmmseIterations->setValue (pp->raw.bayersensor.lmmse_iterations);
+ if (pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[procparams::RAWParams::BayerSensor::lmmse] ||
+ method->get_active_row_number() == procparams::RAWParams::BayerSensor::numMethods)
+ lmmseOptions->show();
+ else
+ lmmseOptions->hide();
+
+ // Flase color suppression is applied to all demozaicing method, so don't hide anything
+ /*if (pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[procparams::RAWParams::BayerSensor::eahd] ||
+ pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[procparams::RAWParams::BayerSensor::hphd] ||
+ pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[procparams::RAWParams::BayerSensor::vng4])
+ ccSteps->show();
+ else
+ ccSteps->hide();*/
+
+ lastDCBen = pp->raw.bayersensor.dcb_enhance;
+ //lastALLen = pp->raw.bayersensor.all_enhance;
+
+ methodconn.block (false);
+ dcbEnhconn.block (false);
+ //allEnhconn.block (false);
+
+ enableListener ();
+}
+
+void BayerProcess::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited)
+{
+ pp->raw.bayersensor.ccSteps = ccSteps->getIntValue();
+ pp->raw.bayersensor.dcb_iterations = dcbIterations->getIntValue();
+ pp->raw.bayersensor.dcb_enhance = dcbEnhance->get_active();
+ //pp->raw.bayersensor.all_enhance = allEnhance->get_active();
+ pp->raw.bayersensor.lmmse_iterations = lmmseIterations->getIntValue();
+
+ int currentRow = method->get_active_row_number();
+ if( currentRow>=0 && currentRow < procparams::RAWParams::BayerSensor::numMethods)
+ pp->raw.bayersensor.method = procparams::RAWParams::BayerSensor::methodstring[currentRow];
+
+ if (pedited) {
+ pedited->raw.bayersensor.ccSteps = ccSteps->getEditedState ();
+ pedited->raw.bayersensor.method = method->get_active_row_number() != procparams::RAWParams::BayerSensor::numMethods;
+ pedited->raw.bayersensor.dcbIterations = dcbIterations->getEditedState ();
+ pedited->raw.bayersensor.dcbEnhance = !dcbEnhance->get_inconsistent();
+ //pedited->raw.bayersensor.allEnhance = !allEnhance->get_inconsistent();
+ pedited->raw.bayersensor.lmmseIterations = lmmseIterations->getEditedState ();
+
+ }
+}
+
+void BayerProcess::setBatchMode(bool batchMode)
+{
+ method->append_text (M("GENERAL_UNCHANGED"));
+ method->set_active(procparams::RAWParams::BayerSensor::numMethods); // No name
+ dcbOptions->hide();
+ lmmseOptions->hide();
+ ToolPanel::setBatchMode (batchMode);
+ ccSteps->showEditedCB ();
+ dcbIterations->showEditedCB ();
+ lmmseIterations->showEditedCB ();
+}
+
+void BayerProcess::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
+{
+ dcbIterations->setDefault( defParams->raw.bayersensor.dcb_iterations);
+ lmmseIterations->setDefault( defParams->raw.bayersensor.lmmse_iterations);
+ ccSteps->setDefault (defParams->raw.bayersensor.ccSteps);
+ if (pedited) {
+ dcbIterations->setDefaultEditedState( pedited->raw.bayersensor.dcbIterations ? Edited : UnEdited);
+ lmmseIterations->setDefaultEditedState( pedited->raw.bayersensor.lmmseIterations ? Edited : UnEdited);
+ ccSteps->setDefaultEditedState(pedited->raw.bayersensor.ccSteps ? Edited : UnEdited);
+ }else{
+ dcbIterations->setDefaultEditedState( Irrelevant );
+ lmmseIterations->setDefaultEditedState( Irrelevant );
+ ccSteps->setDefaultEditedState(Irrelevant );
+ }
+}
+
+void BayerProcess::adjusterChanged (Adjuster* a, double newval)
+{
+ if (listener) {
+ if (a == dcbIterations)
+ listener->panelChanged (EvDemosaicDCBIter, a->getTextValue() );
+ else if (a == ccSteps)
+ listener->panelChanged (EvDemosaicFalseColorIter, a->getTextValue() );
+ else if (a == lmmseIterations)
+ listener->panelChanged (EvDemosaicLMMSEIter, a->getTextValue() );
+ }
+}
+
+void BayerProcess::methodChanged ()
+{
+ int curSelection = method->get_active_row_number();
+ if ( curSelection == procparams::RAWParams::BayerSensor::dcb){
+ dcbOptions->show();
+ }else{
+ dcbOptions->hide();
+ }
+ if ( curSelection == procparams::RAWParams::BayerSensor::lmmse){
+ lmmseOptions->show();
+ }else{
+ lmmseOptions->hide();
+ }
+
+ Glib::ustring methodName="";
+ bool ppreq = false;
+ if( curSelection>=0 && curSelection < procparams::RAWParams::BayerSensor::numMethods) {
+ methodName = procparams::RAWParams::BayerSensor::methodstring[curSelection];
+ if (curSelection == procparams::RAWParams::BayerSensor::mono || oldSelection == procparams::RAWParams::BayerSensor::mono) {
+ ppreq = true;
+ }
+ }
+ oldSelection = curSelection;
+
+ if (listener)
+ listener->panelChanged (ppreq ? EvDemosaicMethodPreProc : EvDemosaicMethod, methodName);
+}
+
+void BayerProcess::dcbEnhanceChanged ()
+{
+ if (batchMode) {
+ if (dcbEnhance->get_inconsistent()) {
+ dcbEnhance->set_inconsistent (false);
+ dcbEnhconn.block (true);
+ dcbEnhance->set_active (false);
+ dcbEnhconn.block (false);
+ }
+ else if (lastDCBen)
+ dcbEnhance->set_inconsistent (true);
+
+ lastDCBen = dcbEnhance->get_active ();
+ }
+ if (listener)
+ listener->panelChanged (EvDemosaicDCBEnhanced, dcbEnhance->get_active()?M("GENERAL_ENABLED"):M("GENERAL_DISABLED"));
+}
+
+/*void BayerProcess::allEnhanceChanged ()
+{
+ if (batchMode) {
+ if (allEnhance->get_inconsistent()) {
+ allEnhance->set_inconsistent (false);
+ allEnhconn.block (true);
+ allEnhance->set_active (false);
+ allEnhconn.block (false);
+ }
+ else if (lastALLen)
+ allEnhance->set_inconsistent (true);
+
+ lastALLen = allEnhance->get_active ();
+ }
+ if (listener)
+ listener->panelChanged (EvDemosaicALLEnhanced, allEnhance->get_active()?M("GENERAL_ENABLED"):M("GENERAL_DISABLED"));
+}*/
diff --git a/rtgui/bayerprocess.h b/rtgui/bayerprocess.h
new file mode 100644
index 000000000..cb281832b
--- /dev/null
+++ b/rtgui/bayerprocess.h
@@ -0,0 +1,61 @@
+/*
+ * 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 .
+ */
+#ifndef _BAYERPROCESS_H_
+#define _BAYERPROCESS_H_
+
+#include
+#include "adjuster.h"
+#include "guiutils.h"
+#include "toolpanel.h"
+
+
+class BayerProcess : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel{
+
+ protected:
+
+ MyComboBoxText* method;
+ Adjuster* ccSteps;
+ Gtk::VBox *dcbOptions;
+ Adjuster* dcbIterations;
+ Gtk::CheckButton* dcbEnhance;
+ //Gtk::VBox *allOptions;
+ //Gtk::CheckButton* allEnhance;
+ Gtk::VBox *lmmseOptions;
+ Adjuster* lmmseIterations;
+
+ bool lastDCBen;
+ int oldSelection;
+ //bool lastALLen;
+ sigc::connection methodconn,dcbEnhconn; //,allEnhconn;
+ public:
+
+ BayerProcess ();
+
+ void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited=NULL);
+ void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL);
+ void setBatchMode (bool batchMode);
+ void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL);
+
+ void methodChanged ();
+ void adjusterChanged (Adjuster* a, double newval);
+ void dcbEnhanceChanged();
+ //void allEnhanceChanged();
+};
+
+#endif
diff --git a/rtgui/bayerrawexposure.cc b/rtgui/bayerrawexposure.cc
new file mode 100644
index 000000000..141a29fe9
--- /dev/null
+++ b/rtgui/bayerrawexposure.cc
@@ -0,0 +1,185 @@
+/*
+ * 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 .
+ */
+#include "bayerrawexposure.h"
+#include "guiutils.h"
+#include "../rtengine/safegtk.h"
+#include
+
+using namespace rtengine;
+using namespace rtengine::procparams;
+
+BayerRAWExposure::BayerRAWExposure () : FoldableToolPanel(this)
+{
+ PexBlack1 = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_1"),-2048,2048,0.1,0));//black level
+ PexBlack1->setAdjusterListener (this);
+ if (PexBlack1->delay < 1000) PexBlack1->delay = 1000;
+ PexBlack1->show();
+ PexBlack2 = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_2"),-2048,2048,0.1,0));//black level
+ PexBlack2->setAdjusterListener (this);
+ if (PexBlack2->delay < 1000) PexBlack2->delay = 1000;
+ PexBlack2->show();
+ PexBlack3 = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_3"),-2048,2048,0.1,0));//black level
+ PexBlack3->setAdjusterListener (this);
+ if (PexBlack3->delay < 1000) PexBlack3->delay = 1000;
+ PexBlack3->show();
+ PexBlack0 = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_0"),-2048,2048,0.1,0));//black level
+ PexBlack0->setAdjusterListener (this);
+ if (PexBlack0->delay < 1000) PexBlack0->delay = 1000;
+ PexBlack0->show();
+ PextwoGreen = Gtk::manage(new Gtk::CheckButton((M("TP_RAWEXPOS_TWOGREEN"))));// two green
+ PextwoGreen->set_active (true);
+ greenconn = PextwoGreen->signal_toggled().connect ( sigc::mem_fun(*this, &BayerRAWExposure::GreenChanged));
+
+ pack_start( *PexBlack1, Gtk::PACK_SHRINK, 0);//black R
+ pack_start( *PexBlack0, Gtk::PACK_SHRINK, 0);//black G1
+ pack_start( *PexBlack3, Gtk::PACK_SHRINK, 0);//black G2
+ pack_start( *PexBlack2, Gtk::PACK_SHRINK, 0);//black B
+ pack_start( *PextwoGreen, Gtk::PACK_SHRINK, 0);//black 2 green
+}
+
+void BayerRAWExposure::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited)
+{
+ disableListener ();
+
+ if(pedited ){
+ PexBlack0->setEditedState( pedited->raw.bayersensor.exBlack0 ? Edited : UnEdited );
+ PexBlack1->setEditedState( pedited->raw.bayersensor.exBlack1 ? Edited : UnEdited );
+ PexBlack2->setEditedState( pedited->raw.bayersensor.exBlack2 ? Edited : UnEdited );
+ PexBlack3->setEditedState( pedited->raw.bayersensor.exBlack3 ? Edited : UnEdited );
+ }
+ greenconn.block (true);
+ PextwoGreen->set_active (pp->raw.bayersensor.twogreen);
+ greenconn.block (false);
+ lastPextwoGreen = pp->raw.bayersensor.twogreen;
+
+ PexBlack0->setValue (pp->raw.bayersensor.black0);//black
+ PexBlack1->setValue (pp->raw.bayersensor.black1);//black
+ PexBlack2->setValue (pp->raw.bayersensor.black2);//black
+
+ if(!PextwoGreen->get_active())PexBlack3->setValue (pp->raw.bayersensor.black3);else PexBlack3->setValue (PexBlack0->getValue());
+
+ enableListener ();
+}
+
+void BayerRAWExposure::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited)
+{
+ pp->raw.bayersensor.black0 = PexBlack0->getValue();// black
+ pp->raw.bayersensor.black1 = PexBlack1->getValue();// black
+ pp->raw.bayersensor.black2 = PexBlack2->getValue();// black
+ pp->raw.bayersensor.twogreen=PextwoGreen->get_active();
+ if(PextwoGreen->get_active()){pp->raw.bayersensor.black3=pp->raw.bayersensor.black0;} else {pp->raw.bayersensor.black3 = PexBlack3->getValue();}// active or desactive 2 green together
+
+ if (pedited) {
+ pedited->raw.bayersensor.exBlack0 = PexBlack0->getEditedState ();//black
+ pedited->raw.bayersensor.exBlack1 = PexBlack1->getEditedState ();//black
+ pedited->raw.bayersensor.exBlack2 = PexBlack2->getEditedState ();//black
+ pedited->raw.bayersensor.exBlack3 = PexBlack3->getEditedState ();//black
+ pedited->raw.bayersensor.exTwoGreen =!PextwoGreen->get_inconsistent();
+ }
+
+}
+
+void BayerRAWExposure::adjusterChanged (Adjuster* a, double newval)
+{
+ if (listener) {
+ Glib::ustring value = a->getTextValue();
+ if (a == PexBlack0) {if(!PextwoGreen->get_active())
+ listener->panelChanged (EvPreProcessExpBlackzero, value ); else {listener->panelChanged (EvPreProcessExpBlackzero, value );PexBlack3->setValue (PexBlack0->getValue());}}
+ else if (a == PexBlack1)
+ listener->panelChanged (EvPreProcessExpBlackone, value );
+ else if (a == PexBlack2)
+ listener->panelChanged (EvPreProcessExpBlacktwo, value );
+ else if (a == PexBlack3) {if(!PextwoGreen->get_active())
+ listener->panelChanged (EvPreProcessExpBlackthree, value ); else {listener->panelChanged (EvPreProcessExpBlackthree, value );PexBlack0->setValue (PexBlack3->getValue());}}
+ }
+}
+void BayerRAWExposure::GreenChanged() {
+ if (batchMode) {
+ if (PextwoGreen->get_inconsistent()) {
+ PextwoGreen->set_inconsistent (false);
+ greenconn.block (true);
+ PextwoGreen->set_active (false);
+ greenconn.block (false);
+ }
+ else if (lastPextwoGreen)
+ PextwoGreen->set_inconsistent (true);
+ lastPextwoGreen = PextwoGreen->get_active ();
+ }
+
+ if (listener) {
+ if (PextwoGreen->get_active())
+ { listener->panelChanged (EvPreProcessExptwoGreen, M("GENERAL_ENABLED"));
+ PexBlack3->setValue (PexBlack0->getValue());//two green together
+ }
+
+ else
+ { listener->panelChanged (EvPreProcessExptwoGreen, M("GENERAL_DISABLED"));
+ }
+
+ }
+
+}
+
+void BayerRAWExposure::setBatchMode(bool batchMode)
+{
+ ToolPanel::setBatchMode (batchMode);
+ PexBlack0->showEditedCB ();//black
+ PexBlack1->showEditedCB ();//black
+ PexBlack2->showEditedCB ();//black
+ PexBlack3->showEditedCB ();//black
+
+}
+
+void BayerRAWExposure::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
+{
+ PexBlack0->setDefault( defParams->raw.bayersensor.black0);
+ PexBlack1->setDefault( defParams->raw.bayersensor.black1);
+ PexBlack2->setDefault( defParams->raw.bayersensor.black2);
+ PexBlack3->setDefault( defParams->raw.bayersensor.black3);
+
+ if (pedited) {
+ PexBlack0->setDefaultEditedState( pedited->raw.bayersensor.exBlack0 ? Edited : UnEdited);
+ PexBlack1->setDefaultEditedState( pedited->raw.bayersensor.exBlack1 ? Edited : UnEdited);
+ PexBlack2->setDefaultEditedState( pedited->raw.bayersensor.exBlack2 ? Edited : UnEdited);
+ PexBlack3->setDefaultEditedState( pedited->raw.bayersensor.exBlack3 ? Edited : UnEdited);
+
+ } else {
+ PexBlack0->setDefaultEditedState( Irrelevant );
+ PexBlack1->setDefaultEditedState( Irrelevant );
+ PexBlack2->setDefaultEditedState( Irrelevant );
+ PexBlack3->setDefaultEditedState( Irrelevant );
+
+ }
+}
+
+void BayerRAWExposure::setAdjusterBehavior (bool pexblackadd) {
+
+ PexBlack0->setAddMode(pexblackadd);
+ PexBlack1->setAddMode(pexblackadd);
+ PexBlack2->setAddMode(pexblackadd);
+ PexBlack3->setAddMode(pexblackadd);
+}
+
+void BayerRAWExposure::trimValues (rtengine::procparams::ProcParams* pp) {
+
+ PexBlack0->trimValue(pp->raw.bayersensor.black0);
+ PexBlack1->trimValue(pp->raw.bayersensor.black1);
+ PexBlack2->trimValue(pp->raw.bayersensor.black2);
+ PexBlack3->trimValue(pp->raw.bayersensor.black3);
+}
diff --git a/rtgui/bayerrawexposure.h b/rtgui/bayerrawexposure.h
new file mode 100644
index 000000000..e485fb12b
--- /dev/null
+++ b/rtgui/bayerrawexposure.h
@@ -0,0 +1,54 @@
+/*
+ * 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 .
+ */
+#ifndef _BAYERRAWEXPOSURE_H_
+#define _BAYERRAWEXPOSURE_H_
+
+#include
+#include "adjuster.h"
+#include "toolpanel.h"
+#include "../rtengine/rawimage.h"
+
+class BayerRAWExposure : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel {
+
+protected:
+ Adjuster* PexBlack0;
+ Adjuster* PexBlack1;
+ Adjuster* PexBlack2;
+ Adjuster* PexBlack3;
+ bool lastPextwoGreen;
+ sigc::connection greenconn;
+ Gtk::CheckButton* PextwoGreen;
+
+private:
+// Gtk::CheckButton* PextwoGreen;
+public:
+
+ BayerRAWExposure ();
+
+ void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited=NULL);
+ void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL);
+ void setBatchMode (bool batchMode);
+ void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL);
+ void GreenChanged() ;
+ void adjusterChanged (Adjuster* a, double newval);
+ void setAdjusterBehavior (bool pexblackadd);
+ void trimValues (rtengine::procparams::ProcParams* pp);
+};
+
+#endif
diff --git a/rtgui/darkframe.cc b/rtgui/darkframe.cc
index 9f62ab7ee..e980c0706 100644
--- a/rtgui/darkframe.cc
+++ b/rtgui/darkframe.cc
@@ -29,21 +29,22 @@ using namespace rtengine::procparams;
DarkFrame::DarkFrame () : FoldableToolPanel(this)
{
hbdf = Gtk::manage(new Gtk::HBox());
+ hbdf->set_spacing(4);
darkFrameFile = Gtk::manage(new MyFileChooserButton(M("TP_DARKFRAME_LABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN));
darkFrameFilePersister.reset(new FileChooserLastFolderPersister(darkFrameFile, options.lastDarkframeDir));
dfLabel = Gtk::manage(new Gtk::Label(M("GENERAL_FILE")));
btnReset = Gtk::manage(new Gtk::Button());
btnReset->set_image (*Gtk::manage(new RTImage ("gtk-cancel.png")));
- hbdf->pack_start(*dfLabel, Gtk::PACK_SHRINK, 4);
+ hbdf->pack_start(*dfLabel, Gtk::PACK_SHRINK, 0);
hbdf->pack_start(*darkFrameFile);
- hbdf->pack_start(*btnReset, Gtk::PACK_SHRINK, 4);
+ hbdf->pack_start(*btnReset, Gtk::PACK_SHRINK, 0);
dfAuto = Gtk::manage(new Gtk::CheckButton((M("TP_DARKFRAME_AUTOSELECT"))));
dfInfo = Gtk::manage(new Gtk::Label(""));
dfInfo->set_alignment(0,0); //left align
- pack_start( *hbdf, Gtk::PACK_SHRINK, 4);
- pack_start( *dfAuto, Gtk::PACK_SHRINK, 4);
- pack_start( *dfInfo, Gtk::PACK_SHRINK, 4);
+ pack_start( *hbdf, Gtk::PACK_SHRINK, 0);
+ pack_start( *dfAuto, Gtk::PACK_SHRINK, 0);
+ pack_start( *dfInfo, Gtk::PACK_SHRINK, 0);
dfautoconn = dfAuto->signal_toggled().connect ( sigc::mem_fun(*this, &DarkFrame::dfAutoChanged), true);
dfFile = darkFrameFile->signal_file_set().connect ( sigc::mem_fun(*this, &DarkFrame::darkFrameChanged), true);
@@ -55,6 +56,8 @@ void DarkFrame::read(const rtengine::procparams::ProcParams* pp, const ParamsEdi
disableListener ();
dfautoconn.block(true);
+ dfAuto->set_active( pp->raw.df_autoselect );
+
if(pedited ){
dfAuto->set_inconsistent(!pedited->raw.dfAuto );
}
@@ -66,7 +69,7 @@ void DarkFrame::read(const rtengine::procparams::ProcParams* pp, const ParamsEdi
lastDFauto = pp->raw.df_autoselect;
- if( pp->raw.df_autoselect && dfp && !batchMode){
+ if( pp->raw.df_autoselect && dfp && !multiImage){
// retrieve the auto-selected df filename
rtengine::RawImage *img = dfp->getDF();
if( img ){
@@ -77,7 +80,6 @@ void DarkFrame::read(const rtengine::procparams::ProcParams* pp, const ParamsEdi
}
else dfInfo->set_text("");
- dfAuto->set_active( pp->raw.df_autoselect );
dfChanged = false;
dfautoconn.block(false);
diff --git a/rtgui/exportpanel.cc b/rtgui/exportpanel.cc
index 13c78e148..579fb1015 100644
--- a/rtgui/exportpanel.cc
+++ b/rtgui/exportpanel.cc
@@ -49,27 +49,49 @@ ExportPanel::ExportPanel () : listener (NULL) {
bypass_dirpyrDenoise = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_DIRPYRDENOISE")));
bypass_sh_hq = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_SH_HQ")));
bypass_dirpyrequalizer = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_DIRPYREQUALIZER")));
- //bypass_raw_all_enhance = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_ALL_ENHANCE")));
bypass_raw_ccSteps = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_CCSTEPS")));
- bypass_raw_linenoise = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_LINENOISE")));
- bypass_raw_greenthresh = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_GREENTHRESH")));
bypass_raw_ca = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_CA")));
bypass_raw_df = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_DF")));
bypass_raw_ff = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_FF")));
- bypass_raw_dcb_iterations = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_DCB_ITERATIONS")));
- bypass_raw_dcb_enhance = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_DCB_ENHANCE")));
- bypass_raw_lmmse_iterations = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_LMMSE_ITERATIONS")));
- Gtk::HBox* hb_raw_dmethod = Gtk::manage (new Gtk::HBox ());
- hb_raw_dmethod->pack_start (*Gtk::manage (new Gtk::Label ( M("EXPORT_RAW_DMETHOD") +": ")),Gtk::PACK_SHRINK, 4);
- raw_dmethod = Gtk::manage (new MyComboBoxText ());
- for( size_t i=0; i< procparams::RAWParams::numMethods;i++)
- raw_dmethod->append_text(procparams::RAWParams::methodstring[i]);
+ // ---------------------- Bayer sensor frame -----------------------
- raw_dmethod->set_active(0);
- hb_raw_dmethod->pack_end (*raw_dmethod, Gtk::PACK_EXPAND_WIDGET, 4);
+ Gtk::Frame *bayerFrame = Gtk::manage( new Gtk::Frame(M("TP_RAW_SENSOR_BAYER")));
+ Gtk::VBox* bayerFrameVBox = Gtk::manage (new Gtk::VBox ());
- // start packing
+ Gtk::HBox* hb_raw_bayer_method = Gtk::manage (new Gtk::HBox ());
+ 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 ());
+ for( size_t i=0; i< procparams::RAWParams::BayerSensor::numMethods;i++)
+ raw_bayer_method->append_text(procparams::RAWParams::BayerSensor::methodstring[i]);
+
+ raw_bayer_method->set_active(0);
+ hb_raw_bayer_method->pack_end (*raw_bayer_method, Gtk::PACK_EXPAND_WIDGET, 4);
+
+ //bypass_raw_all_enhance = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_ALL_ENHANCE")));
+ bypass_raw_bayer_linenoise = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_LINENOISE")));
+ bypass_raw_bayer_greenthresh = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_GREENTHRESH")));
+ bypass_raw_bayer_dcb_iterations = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_DCB_ITERATIONS")));
+ bypass_raw_bayer_dcb_enhance = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_DCB_ENHANCE")));
+ bypass_raw_bayer_lmmse_iterations = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_LMMSE_ITERATIONS")));
+
+ // ---------------------- Bayer sensor frame -----------------------
+
+ Gtk::Frame *xtransFrame = Gtk::manage( new Gtk::Frame(M("TP_RAW_SENSOR_XTRANS")));
+ Gtk::VBox* xtransFrameVBox = Gtk::manage (new Gtk::VBox ());
+
+ Gtk::HBox* hb_raw_xtrans_method = Gtk::manage (new Gtk::HBox ());
+ 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 ());
+ for( size_t i=0; i< procparams::RAWParams::XTransSensor::numMethods;i++)
+ raw_xtrans_method->append_text(procparams::RAWParams::XTransSensor::methodstring[i]);
+
+ raw_xtrans_method->set_active(0);
+ hb_raw_xtrans_method->pack_end (*raw_xtrans_method, Gtk::PACK_EXPAND_WIDGET, 4);
+
+ // ----------------------------------------------------------------
+
+ // start global packing
pack_start(*bypass_ALL , Gtk::PACK_SHRINK, 4);
pack_start(*Gtk::manage(new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 4);
pack_start(*bypass_sharpening , Gtk::PACK_SHRINK, 4);
@@ -82,16 +104,21 @@ ExportPanel::ExportPanel () : listener (NULL) {
pack_start(*bypass_sh_hq , Gtk::PACK_SHRINK, 4);
pack_start(*bypass_dirpyrequalizer , Gtk::PACK_SHRINK, 4);
- pack_start(*hb_raw_dmethod , Gtk::PACK_SHRINK, 4);
- //pack_start(*bypass_raw_all_enhance , Gtk::PACK_SHRINK, 4);
- pack_start(*bypass_raw_ccSteps , Gtk::PACK_SHRINK, 4);
- pack_start(*bypass_raw_dcb_iterations, Gtk::PACK_SHRINK, 4);
- pack_start(*bypass_raw_dcb_enhance , Gtk::PACK_SHRINK, 4);
- pack_start(*bypass_raw_ca , Gtk::PACK_SHRINK, 4);
- pack_start(*bypass_raw_lmmse_iterations, Gtk::PACK_SHRINK, 4);
+ bayerFrameVBox->pack_start(*hb_raw_bayer_method, Gtk::PACK_SHRINK, 4);
+ //bayerFrameVBox->pack_start(*bypass_raw_all_enhance , Gtk::PACK_SHRINK, 4);
+ bayerFrameVBox->pack_start(*bypass_raw_bayer_dcb_iterations, Gtk::PACK_SHRINK, 4);
+ bayerFrameVBox->pack_start(*bypass_raw_bayer_dcb_enhance , Gtk::PACK_SHRINK, 4);
+ bayerFrameVBox->pack_start(*bypass_raw_bayer_lmmse_iterations, Gtk::PACK_SHRINK, 4);
+ bayerFrameVBox->pack_start(*bypass_raw_bayer_linenoise , Gtk::PACK_SHRINK, 4);
+ bayerFrameVBox->pack_start(*bypass_raw_bayer_greenthresh , Gtk::PACK_SHRINK, 4);
+ bayerFrame->add(*bayerFrameVBox);
+
+ xtransFrameVBox->pack_start(*hb_raw_xtrans_method, Gtk::PACK_SHRINK, 4);
+ xtransFrame->add(*xtransFrameVBox);
+
+ pack_start(*bypass_raw_ccSteps , Gtk::PACK_SHRINK, 4);
+ pack_start(*bypass_raw_ca , Gtk::PACK_SHRINK, 4);
- pack_start(*bypass_raw_linenoise , Gtk::PACK_SHRINK, 4);
- pack_start(*bypass_raw_greenthresh , Gtk::PACK_SHRINK, 4);
pack_start(*bypass_raw_df , Gtk::PACK_SHRINK, 4);
pack_start(*bypass_raw_ff , Gtk::PACK_SHRINK, 4);
@@ -154,25 +181,25 @@ ExportPanel::ExportPanel () : listener (NULL) {
//btnExportSaveSettings->signal_clicked().connect( sigc::mem_fun(*this, &ExportPanel::SaveSettings) );
bypass_ALLconn = bypass_ALL->signal_toggled().connect (sigc::mem_fun(*this, &ExportPanel::bypassALL_Toggled));
- bypass_sharpeningConn = bypass_sharpening->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
- bypass_sharpenEdgeConn = bypass_sharpenEdge->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
- bypass_sharpenMicroConn = bypass_sharpenMicro->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
+ bypass_sharpeningConn = bypass_sharpening->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
+ bypass_sharpenEdgeConn = bypass_sharpenEdge->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
+ bypass_sharpenMicroConn = bypass_sharpenMicro->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
//bypass_lumaDenoiseConn = bypass_lumaDenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
//bypass_colorDenoiseConn = bypass_colorDenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
- bypass_defringeConn = bypass_defringe->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
- bypass_dirpyrDenoiseConn = bypass_dirpyrDenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
- bypass_sh_hqConn = bypass_sh_hq->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
- bypass_dirpyrequalizerConn = bypass_dirpyrequalizer->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
- //bypass_raw_all_enhanceConn = bypass_raw_all_enhance->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
- bypass_raw_ccStepsConn = bypass_raw_ccSteps->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
- bypass_raw_dcb_iterationsConn = bypass_raw_dcb_iterations->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
- bypass_raw_dcb_enhanceConn = bypass_raw_dcb_enhance->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
- bypass_raw_lmmse_iterationsConn = bypass_raw_lmmse_iterations->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
- bypass_raw_caConn = bypass_raw_ca->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
- bypass_raw_linenoiseConn = bypass_raw_linenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
- bypass_raw_greenthreshConn = bypass_raw_greenthresh->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
- bypass_raw_dfConn = bypass_raw_df->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
- bypass_raw_ffConn = bypass_raw_ff->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
+ bypass_defringeConn = bypass_defringe->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
+ bypass_dirpyrDenoiseConn = bypass_dirpyrDenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
+ bypass_sh_hqConn = bypass_sh_hq->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
+ bypass_dirpyrequalizerConn = bypass_dirpyrequalizer->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
+ //bypass_raw_all_enhanceConn = bypass_raw_bayer_all_enhance->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
+ bypass_raw_bayer_dcb_iterationsConn = bypass_raw_bayer_dcb_iterations->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
+ bypass_raw_bayer_dcb_enhanceConn = bypass_raw_bayer_dcb_enhance->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
+ bypass_raw_bayer_lmmse_iterationsConn = bypass_raw_bayer_lmmse_iterations->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
+ bypass_raw_bayer_linenoiseConn = bypass_raw_bayer_linenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
+ bypass_raw_bayer_greenthreshConn = bypass_raw_bayer_greenthresh->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
+ bypass_raw_ccStepsConn = bypass_raw_ccSteps->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
+ bypass_raw_caConn = bypass_raw_ca->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
+ bypass_raw_dfConn = bypass_raw_df->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
+ bypass_raw_ffConn = bypass_raw_ff->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
LoadDefaultSettings();
}
@@ -194,30 +221,35 @@ void ExportPanel::FastExportPressed (){
void ExportPanel::SaveSettingsAsDefault(){
// Save fast export settings to options
- options.fastexport_bypass_sharpening = bypass_sharpening->get_active ();
- options.fastexport_bypass_sharpenEdge = bypass_sharpenEdge->get_active ();
- options.fastexport_bypass_sharpenMicro = bypass_sharpenMicro->get_active ();
+ options.fastexport_bypass_sharpening = bypass_sharpening->get_active ();
+ options.fastexport_bypass_sharpenEdge = bypass_sharpenEdge->get_active ();
+ options.fastexport_bypass_sharpenMicro = bypass_sharpenMicro->get_active ();
//options.fastexport_bypass_lumaDenoise = bypass_lumaDenoise->get_active ();
//options.fastexport_bypass_colorDenoise = bypass_colorDenoise->get_active ();
- options.fastexport_bypass_defringe = bypass_defringe->get_active ();
- options.fastexport_bypass_dirpyrDenoise = bypass_dirpyrDenoise->get_active ();
- options.fastexport_bypass_sh_hq = bypass_sh_hq->get_active ();
- options.fastexport_bypass_dirpyrequalizer = bypass_dirpyrequalizer->get_active ();
- //options.fastexport_bypass_raw_all_enhance = bypass_raw_all_enhance->get_active ();
- options.fastexport_bypass_raw_ccSteps = bypass_raw_ccSteps->get_active ();
- options.fastexport_bypass_raw_dcb_iterations = bypass_raw_dcb_iterations->get_active();
- options.fastexport_bypass_raw_dcb_enhance = bypass_raw_dcb_enhance->get_active ();
- options.fastexport_bypass_raw_lmmse_iterations = bypass_raw_lmmse_iterations->get_active();
- options.fastexport_bypass_raw_ca = bypass_raw_ca->get_active ();
- options.fastexport_bypass_raw_linenoise = bypass_raw_linenoise->get_active ();
- options.fastexport_bypass_raw_greenthresh = bypass_raw_greenthresh->get_active ();
- options.fastexport_bypass_raw_df = bypass_raw_df->get_active ();
- options.fastexport_bypass_raw_ff = bypass_raw_ff->get_active ();
+ options.fastexport_bypass_defringe = bypass_defringe->get_active ();
+ options.fastexport_bypass_dirpyrDenoise = bypass_dirpyrDenoise->get_active ();
+ options.fastexport_bypass_sh_hq = bypass_sh_hq->get_active ();
+ options.fastexport_bypass_dirpyrequalizer = bypass_dirpyrequalizer->get_active ();
+ //options.fastexport_bypass_raw_bayer_all_enhance = bypass_raw_all_enhance->get_active ();
+ options.fastexport_bypass_raw_bayer_dcb_iterations = bypass_raw_bayer_dcb_iterations->get_active ();
+ options.fastexport_bypass_raw_bayer_dcb_enhance = bypass_raw_bayer_dcb_enhance->get_active ();
+ options.fastexport_bypass_raw_bayer_lmmse_iterations = bypass_raw_bayer_lmmse_iterations->get_active();
+ options.fastexport_bypass_raw_bayer_linenoise = bypass_raw_bayer_linenoise->get_active ();
+ options.fastexport_bypass_raw_bayer_greenthresh = bypass_raw_bayer_greenthresh->get_active ();
+ options.fastexport_bypass_raw_ccSteps = bypass_raw_ccSteps->get_active ();
+ options.fastexport_bypass_raw_ca = bypass_raw_ca->get_active ();
+ options.fastexport_bypass_raw_df = bypass_raw_df->get_active ();
+ options.fastexport_bypass_raw_ff = bypass_raw_ff->get_active ();
- //saving demosaic_method
- int currentRow = raw_dmethod->get_active_row_number();
- if( currentRow>=0 && currentRow < procparams::RAWParams::numMethods)
- options.fastexport_raw_dmethod = procparams::RAWParams::methodstring[currentRow];
+ //saving Bayer demosaic_method
+ int currentRow = raw_bayer_method->get_active_row_number();
+ if( currentRow>=0 && currentRow < procparams::RAWParams::BayerSensor::numMethods)
+ options.fastexport_raw_bayer_method = procparams::RAWParams::BayerSensor::methodstring[currentRow];
+
+ //saving X-Trans demosaic_method
+ currentRow = raw_xtrans_method->get_active_row_number();
+ if( currentRow>=0 && currentRow < procparams::RAWParams::XTransSensor::numMethods)
+ options.fastexport_raw_xtrans_method = procparams::RAWParams::XTransSensor::methodstring[currentRow];
// options.fastexport_icm_input = icm_input ;
// options.fastexport_icm_working = icm_working ;
@@ -251,30 +283,38 @@ void ExportPanel::LoadDefaultSettings(){
bypass_sharpening->set_active (options.fastexport_bypass_sharpening );
bypass_sharpenEdge->set_active (options.fastexport_bypass_sharpenEdge );
bypass_sharpenMicro->set_active (options.fastexport_bypass_sharpenMicro );
- //bypass_lumaDenoise->set_active (options.fastexport_bypass_lumaDenoise );
- //bypass_colorDenoise->set_active (options.fastexport_bypass_colorDenoise );
+ //bypass_lumaDenoise->set_active (options.fastexport_bypass_lumaDenoise );
+ //bypass_colorDenoise->set_active (options.fastexport_bypass_colorDenoise );
bypass_defringe->set_active (options.fastexport_bypass_defringe );
bypass_dirpyrDenoise->set_active (options.fastexport_bypass_dirpyrDenoise );
bypass_sh_hq->set_active (options.fastexport_bypass_sh_hq );
bypass_dirpyrequalizer->set_active (options.fastexport_bypass_dirpyrequalizer );
- //bypass_raw_all_enhance->set_active (options.fastexport_bypass_raw_all_enhance );
+ //bypass_raw_bayer_all_enhance->set_active (options.fastexport_bypass_raw_bayer_all_enhance );
+ bypass_raw_bayer_dcb_iterations->set_active (options.fastexport_bypass_raw_bayer_dcb_iterations );
+ bypass_raw_bayer_dcb_enhance->set_active (options.fastexport_bypass_raw_bayer_dcb_enhance );
+ bypass_raw_bayer_lmmse_iterations->set_active(options.fastexport_bypass_raw_bayer_lmmse_iterations);
+ bypass_raw_bayer_linenoise->set_active (options.fastexport_bypass_raw_bayer_linenoise );
+ bypass_raw_bayer_greenthresh->set_active (options.fastexport_bypass_raw_bayer_greenthresh );
bypass_raw_ccSteps->set_active (options.fastexport_bypass_raw_ccSteps );
- bypass_raw_dcb_iterations->set_active(options.fastexport_bypass_raw_dcb_iterations );
- bypass_raw_dcb_enhance->set_active (options.fastexport_bypass_raw_dcb_enhance );
- bypass_raw_lmmse_iterations->set_active(options.fastexport_bypass_raw_lmmse_iterations );
bypass_raw_ca->set_active (options.fastexport_bypass_raw_ca );
- bypass_raw_linenoise->set_active (options.fastexport_bypass_raw_linenoise );
- bypass_raw_greenthresh->set_active (options.fastexport_bypass_raw_greenthresh );
bypass_raw_df->set_active (options.fastexport_bypass_raw_df );
bypass_raw_ff->set_active (options.fastexport_bypass_raw_ff );
- //demosaic method
- raw_dmethod->set_active(procparams::RAWParams::numMethods);
- for( size_t i=0; i< procparams::RAWParams::numMethods;i++)
- if( options.fastexport_raw_dmethod == procparams::RAWParams::methodstring[i]){
- raw_dmethod->set_active(i);
- break;
- }
+ // Bayer demosaic method
+ raw_bayer_method->set_active(procparams::RAWParams::BayerSensor::numMethods);
+ for( size_t i=0; i< procparams::RAWParams::BayerSensor::numMethods;i++)
+ if( options.fastexport_raw_bayer_method == procparams::RAWParams::BayerSensor::methodstring[i]) {
+ raw_bayer_method->set_active(i);
+ break;
+ }
+
+ // X-Trans demosaic method
+ raw_xtrans_method->set_active(procparams::RAWParams::XTransSensor::numMethods);
+ for( size_t i=0; i< procparams::RAWParams::XTransSensor::numMethods;i++)
+ if( options.fastexport_raw_xtrans_method == procparams::RAWParams::XTransSensor::methodstring[i]) {
+ raw_xtrans_method->set_active(i);
+ break;
+ }
// icm_input = options.fastexport_icm_input ;
// icm_working = options.fastexport_icm_working ;
@@ -327,14 +367,14 @@ void ExportPanel::bypassALL_Toggled(){
bypass_dirpyrDenoiseConn.block (true);
bypass_sh_hqConn.block (true);
bypass_dirpyrequalizerConn.block (true);
- //bypass_raw_all_enhanceConn.block (true);
+ //bypass_raw_bayer_all_enhanceConn.block (true);
+ bypass_raw_bayer_dcb_iterationsConn.block (true);
+ bypass_raw_bayer_dcb_enhanceConn.block (true);
+ bypass_raw_bayer_lmmse_iterationsConn.block (true);
+ bypass_raw_bayer_linenoiseConn.block (true);
+ bypass_raw_bayer_greenthreshConn.block (true);
bypass_raw_ccStepsConn.block (true);
- bypass_raw_dcb_iterationsConn.block (true);
- bypass_raw_dcb_enhanceConn.block (true);
- bypass_raw_lmmse_iterationsConn.block (true);
bypass_raw_caConn.block (true);
- bypass_raw_linenoiseConn.block (true);
- bypass_raw_greenthreshConn.block (true);
bypass_raw_dfConn.block (true);
bypass_raw_ffConn.block (true);
@@ -349,36 +389,36 @@ void ExportPanel::bypassALL_Toggled(){
bypass_dirpyrDenoise->set_active(bypass_ALL->get_active());
bypass_sh_hq->set_active(bypass_ALL->get_active());
bypass_dirpyrequalizer->set_active(bypass_ALL->get_active());
- //bypass_raw_all_enhance->set_active(bypass_ALL->get_active());
+ //bypass_raw_bayer_all_enhance->set_active(bypass_ALL->get_active());
+ bypass_raw_bayer_dcb_iterations->set_active(bypass_ALL->get_active());
+ bypass_raw_bayer_dcb_enhance->set_active(bypass_ALL->get_active());
+ bypass_raw_bayer_lmmse_iterations->set_active(bypass_ALL->get_active());
+ bypass_raw_bayer_linenoise->set_active(bypass_ALL->get_active());
+ bypass_raw_bayer_greenthresh->set_active(bypass_ALL->get_active());
bypass_raw_ccSteps->set_active(bypass_ALL->get_active());
- bypass_raw_dcb_iterations->set_active(bypass_ALL->get_active());
- bypass_raw_dcb_enhance->set_active(bypass_ALL->get_active());
- bypass_raw_lmmse_iterations->set_active(bypass_ALL->get_active());
bypass_raw_ca->set_active(bypass_ALL->get_active());
- bypass_raw_linenoise->set_active(bypass_ALL->get_active());
- bypass_raw_greenthresh->set_active(bypass_ALL->get_active());
bypass_raw_df->set_active(bypass_ALL->get_active());
bypass_raw_ff->set_active(bypass_ALL->get_active());
- bypass_sharpeningConn.block (false);
- bypass_sharpenEdgeConn.block (false);
- bypass_sharpenMicroConn.block (false);
+ bypass_sharpeningConn.block (false);
+ bypass_sharpenEdgeConn.block (false);
+ bypass_sharpenMicroConn.block (false);
//bypass_lumaDenoiseConn.block (false);
//bypass_colorDenoiseConn.block (false);
- bypass_defringeConn.block (false);
- bypass_dirpyrDenoiseConn.block (false);
- bypass_sh_hqConn.block (false);
- bypass_dirpyrequalizerConn.block (false);
- //bypass_raw_all_enhanceConn.block (false);
- bypass_raw_ccStepsConn.block (false);
- bypass_raw_dcb_iterationsConn.block (false);
- bypass_raw_dcb_enhanceConn.block (false);
- bypass_raw_lmmse_iterationsConn.block (false);
- bypass_raw_caConn.block (false);
- bypass_raw_linenoiseConn.block (false);
- bypass_raw_greenthreshConn.block (false);
- bypass_raw_dfConn.block (false);
- bypass_raw_ffConn.block (false);
+ bypass_defringeConn.block (false);
+ bypass_dirpyrDenoiseConn.block (false);
+ bypass_sh_hqConn.block (false);
+ bypass_dirpyrequalizerConn.block (false);
+ //bypass_raw_bayer_all_enhanceConn.block (false);
+ bypass_raw_bayer_dcb_iterationsConn.block (false);
+ bypass_raw_bayer_dcb_enhanceConn.block (false);
+ bypass_raw_bayer_lmmse_iterationsConn.block (false);
+ bypass_raw_bayer_linenoiseConn.block (false);
+ bypass_raw_bayer_greenthreshConn.block (false);
+ bypass_raw_ccStepsConn.block (false);
+ bypass_raw_caConn.block (false);
+ bypass_raw_dfConn.block (false);
+ bypass_raw_ffConn.block (false);
}
/*
@@ -391,16 +431,17 @@ fastexport_bypass_defringe
fastexport_bypass_dirpyrDenoise
fastexport_bypass_sh_hq
fastexport_bypass_dirpyrequalizer
-fastexport_bypass_raw_all_enhance
+fastexport_raw_bayer_method
+fastexport_bypass_raw_bayer_all_enhance
+fastexport_bypass_raw_bayer_dcb_iterations
+fastexport_bypass_raw_bayer_dcb_enhance
+fastexport_bypass_raw_bayer_linenoise
+fastexport_bypass_raw_bayer_greenthresh
+fastexport_raw_xtrans_method
fastexport_bypass_raw_ccSteps
-fastexport_bypass_raw_dcb_iterations
-fastexport_bypass_raw_dcb_enhance
fastexport_bypass_raw_ca
-fastexport_bypass_raw_linenoise
-fastexport_bypass_raw_greenthresh
fastexport_bypass_raw_df
fastexport_bypass_raw_ff
-fastexport_raw_dmethod
fastexport_icm_input
fastexport_icm_working
fastexport_icm_output
diff --git a/rtgui/exportpanel.h b/rtgui/exportpanel.h
index 566fb76ae..cea3f0db5 100644
--- a/rtgui/exportpanel.h
+++ b/rtgui/exportpanel.h
@@ -53,21 +53,25 @@ class ExportPanel : public Gtk::VBox {
Gtk::CheckButton* bypass_dirpyrequalizer; // also could leave untouched but disable only small radius adjustments
//Gtk::CheckButton* bypass_raw_all_enhance;
- Gtk::CheckButton* bypass_raw_ca; // wraps raw.cared, raw.cablue, raw.ca_autocorrect
+ MyComboBoxText* raw_bayer_method;
+
+ Gtk::CheckButton* bypass_raw_bayer_dcb_iterations;
+ Gtk::CheckButton* bypass_raw_bayer_dcb_enhance;
+ Gtk::CheckButton* bypass_raw_bayer_lmmse_iterations;
+ //Gtk::CheckButton* bypass_raw_bayer_all_enhance;
+ Gtk::CheckButton* bypass_raw_bayer_linenoise;
+ Gtk::CheckButton* bypass_raw_bayer_greenthresh;
+
+ Gtk::CheckButton* bypass_raw_ccSteps;
+ Gtk::CheckButton* bypass_raw_ca; //wraps raw.cared, raw.cablue, raw.ca_autocorrect
Gtk::CheckButton* bypass_raw_df; //wraps raw.dark_frame, raw.df_AutoSelect
Gtk::CheckButton* bypass_raw_ff; //wraps raw.ff_file, raw.ff_AutoSelect
- MyComboBoxText* raw_dmethod;
+
+ MyComboBoxText* raw_xtrans_method;
+
MyComboBoxText* resize_method;
- Gtk::CheckButton* bypass_raw_dcb_iterations;
- Gtk::CheckButton* bypass_raw_dcb_enhance;
- Gtk::CheckButton* bypass_raw_lmmse_iterations;
- Gtk::CheckButton* bypass_raw_ccSteps;
- Gtk::CheckButton* raw_all_enhance;
- Gtk::CheckButton* bypass_raw_linenoise;
- Gtk::CheckButton* bypass_raw_greenthresh;
-
- Gtk::Button* btnFastExport;
+ Gtk::Button* btnFastExport;
Gtk::Button* btnExportLoadSettings;
Gtk::Button* btnExportSaveSettings;
@@ -78,20 +82,20 @@ class ExportPanel : public Gtk::VBox {
sigc::connection bypass_sharpeningConn ;
sigc::connection bypass_sharpenEdgeConn ;
sigc::connection bypass_sharpenMicroConn ;
- //sigc::connection bypass_lumaDenoiseConn ;
- //sigc::connection bypass_colorDenoiseConn ;
+ //sigc::connection bypass_lumaDenoiseConn ;
+ //sigc::connection bypass_colorDenoiseConn ;
sigc::connection bypass_defringeConn ;
sigc::connection bypass_dirpyrDenoiseConn ;
sigc::connection bypass_sh_hqConn ;
sigc::connection bypass_dirpyrequalizerConn ;
- //sigc::connection bypass_raw_all_enhanceConn ;
+ //sigc::connection bypass_raw_bayer_all_enhanceConn ;
+ sigc::connection bypass_raw_bayer_dcb_iterationsConn ;
+ sigc::connection bypass_raw_bayer_dcb_enhanceConn ;
+ sigc::connection bypass_raw_bayer_lmmse_iterationsConn;
+ sigc::connection bypass_raw_bayer_linenoiseConn ;
+ sigc::connection bypass_raw_bayer_greenthreshConn ;
sigc::connection bypass_raw_ccStepsConn ;
- sigc::connection bypass_raw_dcb_iterationsConn;
- sigc::connection bypass_raw_dcb_enhanceConn ;
- sigc::connection bypass_raw_lmmse_iterationsConn;
sigc::connection bypass_raw_caConn ;
- sigc::connection bypass_raw_linenoiseConn ;
- sigc::connection bypass_raw_greenthreshConn ;
sigc::connection bypass_raw_dfConn ;
sigc::connection bypass_raw_ffConn ;
diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc
index 52f14a337..6e55d47e3 100644
--- a/rtgui/filecatalog.cc
+++ b/rtgui/filecatalog.cc
@@ -895,34 +895,35 @@ void FileCatalog::developRequested (std::vector tbe, bool fas
if (options.fastexport_bypass_sharpening ) params.sharpening.enabled = false;
if (options.fastexport_bypass_sharpenEdge ) params.sharpenEdge.enabled = false;
if (options.fastexport_bypass_sharpenMicro ) params.sharpenMicro.enabled = false;
- //if (options.fastexport_bypass_lumaDenoise ) params.lumaDenoise.enabled = false;
- //if (options.fastexport_bypass_colorDenoise ) params.colorDenoise.enabled = false;
+ //if (options.fastexport_bypass_lumaDenoise ) params.lumaDenoise.enabled = false;
+ //if (options.fastexport_bypass_colorDenoise ) params.colorDenoise.enabled = false;
if (options.fastexport_bypass_defringe ) params.defringe.enabled = false;
if (options.fastexport_bypass_dirpyrDenoise ) params.dirpyrDenoise.enabled = false;
if (options.fastexport_bypass_sh_hq ) params.sh.hq = false;
if (options.fastexport_bypass_dirpyrequalizer ) params.dirpyrequalizer.enabled = false;
- //if (options.fastexport_bypass_raw_all_enhance ) params.raw.all_enhance = false;
- if (options.fastexport_bypass_raw_ccSteps ) params.raw.ccSteps = 0;
- if (options.fastexport_bypass_raw_dcb_iterations ) params.raw.dcb_iterations = 0;
- if (options.fastexport_bypass_raw_dcb_enhance ) params.raw.dcb_enhance = false;
- if (options.fastexport_bypass_raw_lmmse_iterations ) params.raw.lmmse_iterations = 0;
- if (options.fastexport_bypass_raw_ca ) {params.raw.ca_autocorrect =false; params.raw.cared=0; params.raw.cablue=0;}
- if (options.fastexport_bypass_raw_linenoise ) params.raw.linenoise = 0;
- if (options.fastexport_bypass_raw_greenthresh ) params.raw.greenthresh = 0;
- if (options.fastexport_bypass_raw_df ) {params.raw.df_autoselect = false; params.raw.dark_frame="";}
- if (options.fastexport_bypass_raw_ff ) {params.raw.ff_AutoSelect = false; params.raw.ff_file="";}
- params.raw.dmethod = options.fastexport_raw_dmethod ;
- params.icm.input = options.fastexport_icm_input ;
- params.icm.working = options.fastexport_icm_working ;
- params.icm.output = options.fastexport_icm_output ;
- params.icm.gamma = options.fastexport_icm_gamma ;
- params.resize.enabled = options.fastexport_resize_enabled ;
- params.resize.scale = options.fastexport_resize_scale ;
- params.resize.appliesTo = options.fastexport_resize_appliesTo;
- params.resize.method = options.fastexport_resize_method ;
- params.resize.dataspec = options.fastexport_resize_dataspec ;
- params.resize.width = options.fastexport_resize_width ;
- params.resize.height = options.fastexport_resize_height ;
+ //if (options.fastexport_bypass_raw_bayer_all_enhance ) params.raw.bayersensor.all_enhance = false;
+ if (options.fastexport_bypass_raw_bayer_dcb_iterations ) params.raw.bayersensor.dcb_iterations = 0;
+ if (options.fastexport_bypass_raw_bayer_dcb_enhance ) params.raw.bayersensor.dcb_enhance = false;
+ if (options.fastexport_bypass_raw_bayer_lmmse_iterations) params.raw.bayersensor.lmmse_iterations = 0;
+ if (options.fastexport_bypass_raw_bayer_linenoise ) params.raw.bayersensor.linenoise = 0;
+ if (options.fastexport_bypass_raw_bayer_greenthresh ) params.raw.bayersensor.greenthresh = 0;
+ if (options.fastexport_bypass_raw_ccSteps ) {params.raw.bayersensor.ccSteps = params.raw.xtranssensor.ccSteps = 0;}
+ if (options.fastexport_bypass_raw_ca ) {params.raw.ca_autocorrect = false; params.raw.cared=0; params.raw.cablue=0;}
+ if (options.fastexport_bypass_raw_df ) {params.raw.df_autoselect = false; params.raw.dark_frame="";}
+ if (options.fastexport_bypass_raw_ff ) {params.raw.ff_AutoSelect = false; params.raw.ff_file="";}
+ params.raw.bayersensor.method = options.fastexport_raw_bayer_method ;
+ params.raw.xtranssensor.method = options.fastexport_raw_xtrans_method;
+ params.icm.input = options.fastexport_icm_input ;
+ params.icm.working = options.fastexport_icm_working ;
+ params.icm.output = options.fastexport_icm_output ;
+ params.icm.gamma = options.fastexport_icm_gamma ;
+ params.resize.enabled = options.fastexport_resize_enabled ;
+ params.resize.scale = options.fastexport_resize_scale ;
+ params.resize.appliesTo = options.fastexport_resize_appliesTo ;
+ params.resize.method = options.fastexport_resize_method ;
+ params.resize.dataspec = options.fastexport_resize_dataspec ;
+ params.resize.width = options.fastexport_resize_width ;
+ params.resize.height = options.fastexport_resize_height ;
}
rtengine::ProcessingJob* pjob = rtengine::ProcessingJob::create (fbe->filename, th->getType()==FT_Raw, params);
diff --git a/rtgui/flatfield.cc b/rtgui/flatfield.cc
index e6642a5c9..407025615 100755
--- a/rtgui/flatfield.cc
+++ b/rtgui/flatfield.cc
@@ -29,14 +29,15 @@ using namespace rtengine::procparams;
FlatField::FlatField () : FoldableToolPanel(this)
{
hbff = Gtk::manage(new Gtk::HBox());
+ hbff->set_spacing(2);
flatFieldFile = Gtk::manage(new MyFileChooserButton(M("TP_FLATFIELD_LABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN));
flatFieldFilePersister.reset(new FileChooserLastFolderPersister(flatFieldFile, options.lastFlatfieldDir));
ffLabel = Gtk::manage(new Gtk::Label(M("GENERAL_FILE")));
flatFieldFileReset = Gtk::manage(new Gtk::Button());
flatFieldFileReset->set_image (*Gtk::manage(new RTImage ("gtk-cancel.png")));
- hbff->pack_start(*ffLabel, Gtk::PACK_SHRINK, 4);
+ hbff->pack_start(*ffLabel, Gtk::PACK_SHRINK, 0);
hbff->pack_start(*flatFieldFile);
- hbff->pack_start(*flatFieldFileReset, Gtk::PACK_SHRINK, 4);
+ hbff->pack_start(*flatFieldFileReset, Gtk::PACK_SHRINK, 0);
flatFieldAutoSelect = Gtk::manage(new Gtk::CheckButton((M("TP_FLATFIELD_AUTOSELECT"))));
ffInfo = Gtk::manage(new Gtk::Label(""));
ffInfo->set_alignment(0,0); //left align
@@ -46,7 +47,8 @@ FlatField::FlatField () : FoldableToolPanel(this)
flatFieldBlurRadius->show();
Gtk::HBox* hbffbt = Gtk::manage (new Gtk::HBox ());
- hbffbt->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_FLATFIELD_BLURTYPE") +": ")));
+ hbffbt->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_FLATFIELD_BLURTYPE") +":")));
+ hbffbt->set_spacing(4);
flatFieldBlurType = Gtk::manage (new MyComboBoxText ());
flatFieldBlurType->append_text(M("TP_FLATFIELD_BT_AREA"));
flatFieldBlurType->append_text(M("TP_FLATFIELD_BT_VERTICAL"));
@@ -55,11 +57,19 @@ FlatField::FlatField () : FoldableToolPanel(this)
flatFieldBlurType->set_active(0);
hbffbt->pack_end (*flatFieldBlurType);
- pack_start( *hbff, Gtk::PACK_SHRINK, 4);
- pack_start( *flatFieldAutoSelect, Gtk::PACK_SHRINK, 4);
- pack_start( *ffInfo, Gtk::PACK_SHRINK, 4);
- pack_start( *hbffbt, Gtk::PACK_SHRINK, 4);
- pack_start( *flatFieldBlurRadius, Gtk::PACK_SHRINK, 4);
+ flatFieldClipControl = Gtk::manage (new Adjuster(M("TP_FLATFIELD_CLIPCONTROL"), 0., 100., 1., 0.));
+ flatFieldClipControl->setAdjusterListener(this);
+ flatFieldClipControl->addAutoButton("");
+ if (flatFieldClipControl->delay < 1000) flatFieldClipControl->delay = 1000;
+ flatFieldClipControl->show();
+ flatFieldClipControl->set_tooltip_markup (M("TP_FLATFIELD_CLIPCONTROL_TOOLTIP"));
+
+ pack_start( *hbff, Gtk::PACK_SHRINK, 0);
+ pack_start( *flatFieldAutoSelect, Gtk::PACK_SHRINK, 0);
+ pack_start( *ffInfo, Gtk::PACK_SHRINK, 0);
+ pack_start( *hbffbt, Gtk::PACK_SHRINK, 0);
+ pack_start( *flatFieldBlurRadius, Gtk::PACK_SHRINK, 0);
+ pack_start( *flatFieldClipControl, Gtk::PACK_SHRINK, 0);
flatFieldFileconn = flatFieldFile->signal_file_set().connect ( sigc::mem_fun(*this, &FlatField::flatFieldFileChanged), true);
flatFieldFileReset->signal_clicked().connect( sigc::mem_fun(*this, &FlatField::flatFieldFile_Reset), true );
@@ -74,9 +84,28 @@ void FlatField::read(const rtengine::procparams::ProcParams* pp, const ParamsEdi
flatFieldAutoSelectconn.block (true);
flatFieldBlurTypeconn.block (true);
+ //flatFieldBlurType
+ for( size_t i=0; i< procparams::RAWParams::numFlatFileBlurTypes;i++)
+ if( pp->raw.ff_BlurType == procparams::RAWParams::ff_BlurTypestring[i]){
+ flatFieldBlurType->set_active(i);
+ break;
+ }
+
+ if (multiImage || pp->raw.ff_BlurType == procparams::RAWParams::ff_BlurTypestring[procparams::RAWParams::area_ff])
+ flatFieldClipControl->show();
+ else
+ flatFieldClipControl->hide();
+
+ flatFieldAutoSelect->set_active (pp->raw.ff_AutoSelect);
+ flatFieldBlurRadius->setValue (pp->raw.ff_BlurRadius);
+ flatFieldClipControl->setValue (pp->raw.ff_clipControl);
+ flatFieldClipControl->setAutoValue (pp->raw.ff_AutoClipControl);
+
if(pedited ){
flatFieldAutoSelect->set_inconsistent (!pedited->raw.ff_AutoSelect);
flatFieldBlurRadius->setEditedState( pedited->raw.ff_BlurRadius ? Edited : UnEdited );
+ flatFieldClipControl->setEditedState( pedited->raw.ff_clipControl ? Edited : UnEdited );
+ flatFieldClipControl->setAutoInconsistent(multiImage && !pedited->raw.ff_AutoClipControl);
if( !pedited->raw.ff_BlurType )
flatFieldBlurType->set_active(procparams::RAWParams::numFlatFileBlurTypes); // No name
}
@@ -87,6 +116,8 @@ void FlatField::read(const rtengine::procparams::ProcParams* pp, const ParamsEdi
hbff->set_sensitive( !pp->raw.ff_AutoSelect );
lastFFAutoSelect = pp->raw.ff_AutoSelect;
+ lastFFAutoClipCtrl = pp->raw.ff_AutoClipControl;
+
if( pp->raw.ff_AutoSelect && ffp && !batchMode){
// retrieve the auto-selected ff filename
rtengine::RawImage *img = ffp->getFF();
@@ -98,20 +129,6 @@ void FlatField::read(const rtengine::procparams::ProcParams* pp, const ParamsEdi
}
else ffInfo->set_text("");
- flatFieldAutoSelect ->set_active(pp->raw.ff_AutoSelect);
- flatFieldBlurRadius->setValue (pp->raw.ff_BlurRadius);
- flatFieldBlurType->set_active(procparams::RAWParams::numFlatFileBlurTypes);
-
- //flatFieldBlurType
- for( size_t i=0; i< procparams::RAWParams::numFlatFileBlurTypes;i++)
- if( pp->raw.ff_BlurType == procparams::RAWParams::ff_BlurTypestring[i]){
- flatFieldBlurType->set_active(i);
- break;
- }
-
- flatFieldAutoSelect->set_active (pp->raw.ff_AutoSelect);
- flatFieldBlurRadius->setValue (pp->raw.ff_BlurRadius);
-
ffChanged = false;
flatFieldAutoSelectconn.block (false);
@@ -124,6 +141,8 @@ void FlatField::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedit
pp->raw.ff_file = flatFieldFile->get_filename();
pp->raw.ff_AutoSelect = flatFieldAutoSelect->get_active();
pp->raw.ff_BlurRadius = flatFieldBlurRadius->getIntValue();
+ pp->raw.ff_clipControl = flatFieldClipControl->getIntValue();
+ pp->raw.ff_AutoClipControl = flatFieldClipControl->getAutoValue();
int currentRow = flatFieldBlurType->get_active_row_number();
if( currentRow>=0 && currentRow < procparams::RAWParams::numFlatFileBlurTypes)
@@ -133,6 +152,8 @@ void FlatField::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedit
pedited->raw.ff_file = ffChanged;
pedited->raw.ff_AutoSelect = !flatFieldAutoSelect->get_inconsistent();
pedited->raw.ff_BlurRadius = flatFieldBlurRadius->getEditedState ();
+ pedited->raw.ff_clipControl = flatFieldClipControl->getEditedState ();
+ pedited->raw.ff_AutoClipControl = !flatFieldClipControl->getAutoInconsistent();
pedited->raw.ff_BlurType = flatFieldBlurType->get_active_row_number() != procparams::RAWParams::numFlatFileBlurTypes;
}
@@ -144,7 +165,36 @@ void FlatField::adjusterChanged (Adjuster* a, double newval)
Glib::ustring value = a->getTextValue();
- listener->panelChanged (EvFlatFieldBlurRadius, value );
+ if (a==flatFieldBlurRadius)
+ listener->panelChanged (EvFlatFieldBlurRadius, value);
+ else if (a==flatFieldClipControl)
+ listener->panelChanged (EvFlatFieldClipControl, value);
+ }
+}
+
+void FlatField::adjusterAutoToggled (Adjuster* a, bool newval) {
+
+ if (multiImage) {
+ if (flatFieldClipControl->getAutoInconsistent()) {
+ flatFieldClipControl->setAutoInconsistent(false);
+ flatFieldClipControl->setAutoValue(false);
+ }
+ else if (lastFFAutoClipCtrl)
+ flatFieldClipControl->setAutoInconsistent(true);
+
+ lastFFAutoClipCtrl = flatFieldClipControl->getAutoValue();
+
+ }
+
+ if (listener) {
+ if(a==flatFieldClipControl) {
+ if (flatFieldClipControl->getAutoInconsistent())
+ listener->panelChanged (EvFlatFieldAutoClipControl, M("GENERAL_UNCHANGED"));
+ else if (flatFieldClipControl->getAutoValue())
+ listener->panelChanged (EvFlatFieldAutoClipControl, M("GENERAL_ENABLED"));
+ else
+ listener->panelChanged (EvFlatFieldAutoClipControl, M("GENERAL_DISABLED"));
+ }
}
}
@@ -152,16 +202,28 @@ void FlatField::setBatchMode(bool batchMode)
{
ToolPanel::setBatchMode (batchMode);
flatFieldBlurRadius->showEditedCB ();
+ flatFieldClipControl->showEditedCB ();
+}
+
+void FlatField::setAdjusterBehavior (bool clipctrladd) {
+ flatFieldClipControl->setAddMode(clipctrladd);
+}
+
+void FlatField::trimValues (rtengine::procparams::ProcParams* pp) {
+ flatFieldClipControl->trimValue(pp->raw.ff_clipControl);
}
void FlatField::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
{
flatFieldBlurRadius->setDefault( defParams->raw.ff_BlurRadius);
+ flatFieldClipControl->setDefault( defParams->raw.ff_clipControl);
if (pedited) {
flatFieldBlurRadius->setDefaultEditedState( pedited->raw.ff_BlurRadius ? Edited : UnEdited);
+ flatFieldClipControl->setDefaultEditedState( pedited->raw.ff_clipControl ? Edited : UnEdited);
} else {
flatFieldBlurRadius->setDefaultEditedState( Irrelevant );
+ flatFieldClipControl->setDefaultEditedState( Irrelevant );
}
}
@@ -198,6 +260,11 @@ void FlatField::flatFieldBlurTypeChanged ()
if( curSelection>=0 && curSelection < procparams::RAWParams::numFlatFileBlurTypes)
s = flatFieldBlurType->get_active_text();
+ if (multiImage || curSelection == procparams::RAWParams::area_ff)
+ flatFieldClipControl->show();
+ else
+ flatFieldClipControl->hide();
+
if (listener)
listener->panelChanged (EvFlatFieldBlurType, s);
}
diff --git a/rtgui/flatfield.h b/rtgui/flatfield.h
index 2b79e0bae..1fc3a1fb7 100755
--- a/rtgui/flatfield.h
+++ b/rtgui/flatfield.h
@@ -43,25 +43,30 @@ protected:
Gtk::Label *ffInfo;
Gtk::Button *flatFieldFileReset;
Gtk::CheckButton* flatFieldAutoSelect;
+ Adjuster* flatFieldClipControl;
Adjuster* flatFieldBlurRadius;
MyComboBoxText* flatFieldBlurType;
Gtk::HBox *hbff;
bool ffChanged;
bool lastFFAutoSelect;
+ bool lastFFAutoClipCtrl;
FFProvider *ffp;
sigc::connection flatFieldFileconn, flatFieldAutoSelectconn, flatFieldBlurTypeconn;
- Glib::ustring lastShortcutPath;
+ Glib::ustring lastShortcutPath;
public:
FlatField ();
- void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited=NULL);
- void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL);
- void setBatchMode (bool batchMode);
- void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL);
+ void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited=NULL);
+ void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL);
+ void setBatchMode (bool batchMode);
+ void setAdjusterBehavior (bool clipctrladd);
+ void trimValues (rtengine::procparams::ProcParams* pp);
+ void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL);
void adjusterChanged (Adjuster* a, double newval);
+ void adjusterAutoToggled (Adjuster* a, bool newval);
void flatFieldFileChanged ();
void flatFieldFile_Reset ();
void flatFieldAutoSelectChanged ();
diff --git a/rtgui/options.cc b/rtgui/options.cc
index 3dc2f59ad..ea7a1ac1c 100644
--- a/rtgui/options.cc
+++ b/rtgui/options.cc
@@ -372,17 +372,18 @@ void Options::setDefaults () {
fastexport_bypass_dirpyrDenoise = true;
fastexport_bypass_sh_hq = true;
fastexport_bypass_dirpyrequalizer = true;
- //fastexport_bypass_raw_all_enhance = true;
+ fastexport_raw_bayer_method = "fast";
+ //fastexport_bypass_raw_bayer_all_enhance = true;
+ fastexport_bypass_raw_bayer_dcb_iterations = true;
+ fastexport_bypass_raw_bayer_dcb_enhance = true;
+ fastexport_bypass_raw_bayer_lmmse_iterations = true;
+ fastexport_bypass_raw_bayer_linenoise = true;
+ fastexport_bypass_raw_bayer_greenthresh = true;
+ fastexport_raw_xtrans_method = "fast";
fastexport_bypass_raw_ccSteps = true;
- fastexport_bypass_raw_dcb_iterations = true;
- fastexport_bypass_raw_dcb_enhance = true;
- fastexport_bypass_raw_lmmse_iterations = true;
fastexport_bypass_raw_ca = true;
- fastexport_bypass_raw_linenoise = true;
- fastexport_bypass_raw_greenthresh = true;
fastexport_bypass_raw_df = true;
fastexport_bypass_raw_ff = true;
- fastexport_raw_dmethod = "fast";
fastexport_icm_input = "(camera)";
fastexport_icm_working = "ProPhoto";
fastexport_icm_output = "RT_sRGB";
@@ -488,7 +489,7 @@ void Options::setDefaults () {
0, // ADDSET_DIRPYREQ_SKINPROTECT
0, // ADDSET_COLORTONING_SPLIT
0, //ADDSET_DIRPYRDN_PASSES
-
+ 0, // ADDSET_RAWFFCLIPCONTROL
};
baBehav = std::vector (babehav, babehav+ADDSET_PARAM_NUM);
@@ -810,23 +811,30 @@ if (keyFile.has_group ("Fast Export")) {
if (keyFile.has_key ("Fast Export", "fastexport_bypass_sharpening" )) fastexport_bypass_sharpening = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sharpening" );
if (keyFile.has_key ("Fast Export", "fastexport_bypass_sharpenEdge" )) fastexport_bypass_sharpenEdge = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sharpenEdge" );
if (keyFile.has_key ("Fast Export", "fastexport_bypass_sharpenMicro" )) fastexport_bypass_sharpenMicro = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sharpenMicro" );
- //if (keyFile.has_key ("Fast Export", "fastexport_bypass_lumaDenoise" )) fastexport_bypass_lumaDenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_lumaDenoise" );
- //if (keyFile.has_key ("Fast Export", "fastexport_bypass_colorDenoise" )) fastexport_bypass_colorDenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_colorDenoise" );
+ //if (keyFile.has_key ("Fast Export", "fastexport_bypass_lumaDenoise" )) fastexport_bypass_lumaDenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_lumaDenoise" );
+ //if (keyFile.has_key ("Fast Export", "fastexport_bypass_colorDenoise" )) fastexport_bypass_colorDenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_colorDenoise" );
if (keyFile.has_key ("Fast Export", "fastexport_bypass_defringe" )) fastexport_bypass_defringe = keyFile.get_boolean ("Fast Export", "fastexport_bypass_defringe" );
if (keyFile.has_key ("Fast Export", "fastexport_bypass_dirpyrDenoise" )) fastexport_bypass_dirpyrDenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_dirpyrDenoise" );
if (keyFile.has_key ("Fast Export", "fastexport_bypass_sh_hq" )) fastexport_bypass_sh_hq = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sh_hq" );
if (keyFile.has_key ("Fast Export", "fastexport_bypass_dirpyrequalizer" )) fastexport_bypass_dirpyrequalizer = keyFile.get_boolean ("Fast Export", "fastexport_bypass_dirpyrequalizer" );
- //if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_all_enhance" )) fastexport_bypass_raw_all_enhance = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_all_enhance" );
+ if (keyFile.has_key ("Fast Export", "fastexport_raw_dmethod" )) fastexport_raw_bayer_method = keyFile.get_string ("Fast Export", "fastexport_raw_dmethod" );
+ if (keyFile.has_key ("Fast Export", "fastexport_raw_bayer_method" )) fastexport_raw_bayer_method = keyFile.get_string ("Fast Export", "fastexport_raw_bayer_method" );
+ //if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_all_enhance" )) fastexport_bypass_raw_bayer_all_enhance = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_all_enhance" );
+ if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_dcb_iterations" )) fastexport_bypass_raw_bayer_dcb_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_dcb_iterations" );
+ if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_dcb_iterations" )) fastexport_bypass_raw_bayer_dcb_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_iterations" );
+ if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_dcb_enhance" )) fastexport_bypass_raw_bayer_dcb_enhance = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_dcb_enhance" );
+ if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_dcb_enhance" )) fastexport_bypass_raw_bayer_dcb_enhance = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_enhance" );
+ if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_lmmse_iterations" )) fastexport_bypass_raw_bayer_lmmse_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_lmmse_iterations" );
+ if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_lmmse_iterations")) fastexport_bypass_raw_bayer_lmmse_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_lmmse_iterations");
+ if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_linenoise" )) fastexport_bypass_raw_bayer_linenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_linenoise" );
+ if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_linenoise" )) fastexport_bypass_raw_bayer_linenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_linenoise" );
+ if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_greenthresh" )) fastexport_bypass_raw_bayer_greenthresh = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_greenthresh" );
+ if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_greenthresh" )) fastexport_bypass_raw_bayer_greenthresh = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_greenthresh" );
+ if (keyFile.has_key ("Fast Export", "fastexport_raw_xtrans_method" )) fastexport_raw_xtrans_method = keyFile.get_string ("Fast Export", "fastexport_raw_xtrans_method" );
if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_ccSteps" )) fastexport_bypass_raw_ccSteps = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_ccSteps" );
- if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_dcb_iterations")) fastexport_bypass_raw_dcb_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_dcb_iterations");
- if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_dcb_enhance" )) fastexport_bypass_raw_dcb_enhance = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_dcb_enhance" );
- if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_lmmse_iterations")) fastexport_bypass_raw_lmmse_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_lmmse_iterations");
if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_ca" )) fastexport_bypass_raw_ca = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_ca" );
- if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_linenoise" )) fastexport_bypass_raw_linenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_linenoise" );
- if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_greenthresh" )) fastexport_bypass_raw_greenthresh = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_greenthresh" );
if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_df" )) fastexport_bypass_raw_df = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_df" );
if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_ff" )) fastexport_bypass_raw_ff = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_ff" );
- if (keyFile.has_key ("Fast Export", "fastexport_raw_dmethod" )) fastexport_raw_dmethod = keyFile.get_string ("Fast Export", "fastexport_raw_dmethod" );
if (keyFile.has_key ("Fast Export", "fastexport_icm_input" )) fastexport_icm_input = keyFile.get_string ("Fast Export", "fastexport_icm_input" );
if (keyFile.has_key ("Fast Export", "fastexport_icm_working" )) fastexport_icm_working = keyFile.get_string ("Fast Export", "fastexport_icm_working" );
if (keyFile.has_key ("Fast Export", "fastexport_icm_output" )) fastexport_icm_output = keyFile.get_string ("Fast Export", "fastexport_icm_output" );
@@ -1098,23 +1106,24 @@ int Options::saveToFile (Glib::ustring fname) {
keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpening" , fastexport_bypass_sharpening );
keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpenEdge" , fastexport_bypass_sharpenEdge );
keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpenMicro" , fastexport_bypass_sharpenMicro );
- //keyFile.set_boolean ("Fast Export", "fastexport_bypass_lumaDenoise" , fastexport_bypass_lumaDenoise );
- //keyFile.set_boolean ("Fast Export", "fastexport_bypass_colorDenoise" , fastexport_bypass_colorDenoise );
+ //keyFile.set_boolean ("Fast Export", "fastexport_bypass_lumaDenoise" , fastexport_bypass_lumaDenoise );
+ //keyFile.set_boolean ("Fast Export", "fastexport_bypass_colorDenoise" , fastexport_bypass_colorDenoise );
keyFile.set_boolean ("Fast Export", "fastexport_bypass_defringe" , fastexport_bypass_defringe );
keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrDenoise" , fastexport_bypass_dirpyrDenoise );
keyFile.set_boolean ("Fast Export", "fastexport_bypass_sh_hq" , fastexport_bypass_sh_hq );
keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrequalizer" , fastexport_bypass_dirpyrequalizer );
- //keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_all_enhance" , fastexport_bypass_raw_all_enhance );
+ keyFile.set_string ("Fast Export", "fastexport_raw_bayer_method" , fastexport_raw_bayer_method );
+ //keyFile.set_boolean ("Fast Export", "fastexport_bypass_bayer_raw_all_enhance" , fastexport_bypass_raw_bayer_all_enhance );
+ keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_iterations" , fastexport_bypass_raw_bayer_dcb_iterations );
+ keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_enhance" , fastexport_bypass_raw_bayer_dcb_enhance );
+ keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_lmmse_iterations", fastexport_bypass_raw_bayer_lmmse_iterations);
+ keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_linenoise" , fastexport_bypass_raw_bayer_linenoise );
+ keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_greenthresh" , fastexport_bypass_raw_bayer_greenthresh );
+ keyFile.set_string ("Fast Export", "fastexport_raw_xtrans_method" , fastexport_raw_xtrans_method );
keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ccSteps" , fastexport_bypass_raw_ccSteps );
- keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_dcb_iterations" , fastexport_bypass_raw_dcb_iterations);
- keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_dcb_enhance" , fastexport_bypass_raw_dcb_enhance );
- keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_lmmse_iterations" , fastexport_bypass_raw_lmmse_iterations);
- keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ca" , fastexport_bypass_raw_ca );
- keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_linenoise" , fastexport_bypass_raw_linenoise );
- keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_greenthresh" , fastexport_bypass_raw_greenthresh );
+ keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ca" , fastexport_bypass_raw_ca );
keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_df" , fastexport_bypass_raw_df );
keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ff" , fastexport_bypass_raw_ff );
- keyFile.set_string ("Fast Export", "fastexport_raw_dmethod" , fastexport_raw_dmethod );
keyFile.set_string ("Fast Export", "fastexport_icm_input" , fastexport_icm_input );
keyFile.set_string ("Fast Export", "fastexport_icm_working" , fastexport_icm_working );
keyFile.set_string ("Fast Export", "fastexport_icm_output" , fastexport_icm_output );
diff --git a/rtgui/options.h b/rtgui/options.h
index a9b4b7b71..7af267d43 100644
--- a/rtgui/options.h
+++ b/rtgui/options.h
@@ -231,17 +231,18 @@ class Options {
bool fastexport_bypass_dirpyrDenoise;
bool fastexport_bypass_sh_hq;
bool fastexport_bypass_dirpyrequalizer;
- //bool fastexport_bypass_raw_all_enhance;
+ Glib::ustring fastexport_raw_bayer_method;
+ //bool fastexport_bypass_raw_bayer_all_enhance;
+ bool fastexport_bypass_raw_bayer_dcb_iterations;
+ bool fastexport_bypass_raw_bayer_dcb_enhance;
+ bool fastexport_bypass_raw_bayer_lmmse_iterations;
+ bool fastexport_bypass_raw_bayer_linenoise;
+ bool fastexport_bypass_raw_bayer_greenthresh;
+ Glib::ustring fastexport_raw_xtrans_method;
bool fastexport_bypass_raw_ccSteps;
- bool fastexport_bypass_raw_dcb_iterations;
- bool fastexport_bypass_raw_dcb_enhance;
- bool fastexport_bypass_raw_lmmse_iterations;
bool fastexport_bypass_raw_ca;
- bool fastexport_bypass_raw_linenoise;
- bool fastexport_bypass_raw_greenthresh;
bool fastexport_bypass_raw_df;
bool fastexport_bypass_raw_ff;
- Glib::ustring fastexport_raw_dmethod;
Glib::ustring fastexport_icm_input;
Glib::ustring fastexport_icm_working;
Glib::ustring fastexport_icm_output;
diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc
index 1e880634d..1f9640c15 100644
--- a/rtgui/paramsedited.cc
+++ b/rtgui/paramsedited.cc
@@ -34,8 +34,8 @@ void ParamsEdited::set (bool v) {
toneCurve.curve = v;
toneCurve.curve2 = v;
- toneCurve.curveMode = v;
- toneCurve.curveMode2 = v;
+ toneCurve.curveMode = v;
+ toneCurve.curveMode2 = v;
toneCurve.brightness = v;
toneCurve.black = v;
toneCurve.contrast = v;
@@ -221,10 +221,10 @@ void ParamsEdited::set (bool v) {
commonTrans.autofill = v;
rotate.degree = v;
distortion.amount = v;
- lensProf.lcpFile = v;
- lensProf.useDist = v;
- lensProf.useVign = v;
- lensProf.useCA = v;
+ lensProf.lcpFile = v;
+ lensProf.useDist = v;
+ lensProf.useVign = v;
+ lensProf.useCA = v;
perspective.horizontal = v;
perspective.vertical = v;
gradient.enabled = v;
@@ -285,42 +285,48 @@ void ParamsEdited::set (bool v) {
resize.height = v;
resize.enabled = v;
icm.input = v;
- icm.toneCurve = v;
- icm.blendCMSMatrix = v;
- icm.dcpIlluminant = v;
+ icm.toneCurve = v;
+ icm.blendCMSMatrix = v;
+ icm.dcpIlluminant = v;
icm.working = v;
icm.output = v;
icm.gamma = v;
icm.freegamma = v;
icm.gampos = v;
icm.slpos = v;
- raw.ccSteps = v;
- raw.dmethod = v;
- raw.dcbIterations = v;
- raw.dcbEnhance = v;
- raw.lmmseIterations = v;
-
- //raw.allEnhance = v;
+ raw.bayersensor.method = v;
+ raw.bayersensor.ccSteps = v;
+ raw.bayersensor.exBlack0 = v;
+ raw.bayersensor.exBlack1 = v;
+ raw.bayersensor.exBlack2 = v;
+ raw.bayersensor.exBlack3 = v;
+ raw.bayersensor.exTwoGreen=v;
+ raw.bayersensor.dcbIterations = v;
+ raw.bayersensor.dcbEnhance = v;
+ //raw.bayersensor.allEnhance = v;
+ raw.bayersensor.lmmseIterations = v;
+ raw.bayersensor.greenEq = v;
+ raw.bayersensor.linenoise = v;
+ raw.xtranssensor.method = v;
+ raw.xtranssensor.ccSteps = v;
+ raw.xtranssensor.exBlackRed= v;
+ raw.xtranssensor.exBlackGreen = v;
+ raw.xtranssensor.exBlackBlue = v;
raw.caCorrection = v;
raw.caBlue = v;
raw.caRed = v;
- raw.greenEq = v;
raw.hotDeadPixelFilter = v;
raw.hotDeadPixelThresh = v;
- raw.linenoise = v;
raw.darkFrame = v;
- raw.dfAuto = v;
+ raw.dfAuto = v;
raw.ff_file = v;
raw.ff_AutoSelect = v;
raw.ff_BlurRadius = v;
raw.ff_BlurType = v;
+ raw.ff_AutoClipControl = v;
+ raw.ff_clipControl = v;
raw.exPos = v;
raw.exPreser = v;
- raw.exBlackzero = v;
- raw.exBlackone = v;
- raw.exBlacktwo = v;
- raw.exBlackthree = v;
- raw.exTwoGreen=v;
dirpyrequalizer.enabled = v;
dirpyrequalizer.gamutlab = v;
@@ -614,32 +620,39 @@ void ParamsEdited::initFrom (const std::vector
icm.freegamma = icm.freegamma && p.icm.freegamma == other.icm.freegamma;
icm.gampos = icm.gampos && p.icm.gampos == other.icm.gampos;
icm.slpos = icm.slpos && p.icm.slpos == other.icm.slpos;
- raw.ccSteps = raw.ccSteps && p.raw.ccSteps == other.raw.ccSteps;
- raw.dmethod = raw.dmethod && p.raw.dmethod == other.raw.dmethod;
- raw.dcbIterations = raw.dcbIterations && p.raw.dcb_iterations == other.raw.dcb_iterations;
- raw.dcbEnhance = raw.dcbEnhance && p.raw.dcb_enhance == other.raw.dcb_enhance;
- raw.lmmseIterations = raw.lmmseIterations && p.raw.lmmse_iterations == other.raw.lmmse_iterations;
- //raw.allEnhance = raw.allEnhance && p.raw.all_enhance == other.raw.all_enhance;
+ raw.bayersensor.method = raw.bayersensor.method && p.raw.bayersensor.method == other.raw.bayersensor.method;
+ raw.bayersensor.ccSteps = raw.bayersensor.ccSteps && p.raw.bayersensor.ccSteps == other.raw.bayersensor.ccSteps;
+ raw.bayersensor.exBlack0 = raw.bayersensor.exBlack0 && p.raw.bayersensor.black0 == other.raw.bayersensor.black0;
+ raw.bayersensor.exBlack1 = raw.bayersensor.exBlack1 && p.raw.bayersensor.black1 == other.raw.bayersensor.black1;
+ raw.bayersensor.exBlack2 = raw.bayersensor.exBlack2 && p.raw.bayersensor.black2 == other.raw.bayersensor.black2;
+ raw.bayersensor.exBlack3 = raw.bayersensor.exBlack3 && p.raw.bayersensor.black3 == other.raw.bayersensor.black3;
+ raw.bayersensor.exTwoGreen = raw.bayersensor.exTwoGreen && p.raw.bayersensor.twogreen == other.raw.bayersensor.twogreen;
+ raw.bayersensor.dcbIterations = raw.bayersensor.dcbIterations && p.raw.bayersensor.dcb_iterations == other.raw.bayersensor.dcb_iterations;
+ raw.bayersensor.dcbEnhance = raw.bayersensor.dcbEnhance && p.raw.bayersensor.dcb_enhance == other.raw.bayersensor.dcb_enhance;
+ //raw.bayersensor.allEnhance = raw.bayersensor.allEnhance && p.raw.bayersensor.all_enhance == other.raw.bayersensor.all_enhance;
+ raw.bayersensor.lmmseIterations = raw.bayersensor.lmmseIterations && p.raw.bayersensor.lmmse_iterations == other.raw.bayersensor.lmmse_iterations;
+ raw.bayersensor.greenEq = raw.bayersensor.greenEq && p.raw.bayersensor.greenthresh == other.raw.bayersensor.greenthresh;
+ raw.bayersensor.linenoise = raw.bayersensor.linenoise && p.raw.bayersensor.linenoise == other.raw.bayersensor.linenoise;
+ raw.xtranssensor.method = raw.xtranssensor.method && p.raw.xtranssensor.method == other.raw.xtranssensor.method;
+ raw.xtranssensor.ccSteps = raw.xtranssensor.ccSteps && p.raw.xtranssensor.ccSteps == other.raw.xtranssensor.ccSteps;
+ raw.xtranssensor.exBlackRed = raw.xtranssensor.exBlackRed && p.raw.xtranssensor.blackred == other.raw.xtranssensor.blackred;
+ raw.xtranssensor.exBlackGreen = raw.xtranssensor.exBlackGreen && p.raw.xtranssensor.blackgreen == other.raw.xtranssensor.blackgreen;
+ raw.xtranssensor.exBlackBlue = raw.xtranssensor.exBlackBlue && p.raw.xtranssensor.blackblue == other.raw.xtranssensor.blackblue;
raw.caCorrection = raw.caCorrection && p.raw.ca_autocorrect == other.raw.ca_autocorrect;
raw.caRed = raw.caRed && p.raw.cared == other.raw.cared;
raw.caBlue = raw.caBlue && p.raw.cablue == other.raw.cablue;
- raw.greenEq = raw.greenEq && p.raw.greenthresh == other.raw.greenthresh;
raw.hotDeadPixelFilter = raw.hotDeadPixelFilter && p.raw.hotdeadpix_filt == other.raw.hotdeadpix_filt;
raw.hotDeadPixelThresh = raw.hotDeadPixelThresh && p.raw.hotdeadpix_thresh == other.raw.hotdeadpix_thresh;
- raw.linenoise = raw.linenoise && p.raw.linenoise == other.raw.linenoise;
raw.darkFrame = raw.darkFrame && p.raw.dark_frame == other.raw.dark_frame;
raw.dfAuto = raw.dfAuto && p.raw.df_autoselect == other.raw.df_autoselect;
raw.ff_file = raw.ff_file && p.raw.ff_file == other.raw.ff_file;
raw.ff_AutoSelect = raw.ff_AutoSelect && p.raw.ff_AutoSelect == other.raw.ff_AutoSelect;
raw.ff_BlurRadius = raw.ff_BlurRadius && p.raw.ff_BlurRadius == other.raw.ff_BlurRadius;
raw.ff_BlurType = raw.ff_BlurType && p.raw.ff_BlurType == other.raw.ff_BlurType;
+ raw.ff_AutoClipControl = raw.ff_AutoClipControl && p.raw.ff_AutoClipControl == other.raw.ff_AutoClipControl;
+ raw.ff_clipControl = raw.ff_clipControl && p.raw.ff_clipControl == other.raw.ff_clipControl;
raw.exPos = raw.exPos && p.raw.expos == other.raw.expos;
raw.exPreser = raw.exPreser && p.raw.preser == other.raw.preser;
- raw.exBlackzero = raw.exBlackzero && p.raw.blackzero == other.raw.blackzero;
- raw.exBlackone = raw.exBlackone && p.raw.blackone == other.raw.blackone;
- raw.exBlacktwo = p.raw.blacktwo == other.raw.blacktwo;
- raw.exBlackthree = p.raw.blackthree == other.raw.blackthree;
- raw.exTwoGreen = p.raw.twogreen == other.raw.twogreen;
dirpyrequalizer.enabled = dirpyrequalizer.enabled && p.dirpyrequalizer.enabled == other.dirpyrequalizer.enabled;
dirpyrequalizer.gamutlab = dirpyrequalizer.gamutlab && p.dirpyrequalizer.gamutlab == other.dirpyrequalizer.gamutlab;
@@ -937,35 +950,43 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
if (icm.slpos) toEdit.icm.slpos = dontforceSet && options.baBehav[ADDSET_FREE_OUTPUT_SLOPE] ? toEdit.icm.slpos + mods.icm.slpos : mods.icm.slpos;
if (icm.gamma) toEdit.icm.gamma = mods.icm.gamma;
if (icm.freegamma) toEdit.icm.freegamma = mods.icm.freegamma;
- if (raw.ccSteps) toEdit.raw.ccSteps = mods.raw.ccSteps;
- if (raw.dmethod) toEdit.raw.dmethod = mods.raw.dmethod;
- if (raw.dcbIterations) toEdit.raw.dcb_iterations = mods.raw.dcb_iterations;
- if (raw.dcbEnhance) toEdit.raw.dcb_enhance = mods.raw.dcb_enhance;
- if (raw.lmmseIterations) toEdit.raw.lmmse_iterations = mods.raw.lmmse_iterations;
- //if (raw.allEnhance) toEdit.raw.all_enhance = mods.raw.all_enhance;
-
- if (raw.caCorrection) toEdit.raw.ca_autocorrect = mods.raw.ca_autocorrect;
+ if (raw.bayersensor.method) toEdit.raw.bayersensor.method = mods.raw.bayersensor.method;
+ if (raw.bayersensor.ccSteps) toEdit.raw.bayersensor.ccSteps = mods.raw.bayersensor.ccSteps;
+ if (raw.bayersensor.exBlack0) toEdit.raw.bayersensor.black0 = dontforceSet && options.baBehav[ADDSET_RAWEXPOS_BLACKS] ? toEdit.raw.bayersensor.black0 + mods.raw.bayersensor.black0 : mods.raw.bayersensor.black0;
+ if (raw.bayersensor.exBlack1) toEdit.raw.bayersensor.black1 = dontforceSet && options.baBehav[ADDSET_RAWEXPOS_BLACKS] ? toEdit.raw.bayersensor.black1 + mods.raw.bayersensor.black1 : mods.raw.bayersensor.black1;
+ if (raw.bayersensor.exBlack2) toEdit.raw.bayersensor.black2 = dontforceSet && options.baBehav[ADDSET_RAWEXPOS_BLACKS] ? toEdit.raw.bayersensor.black2 + mods.raw.bayersensor.black2 : mods.raw.bayersensor.black2;
+ if (raw.bayersensor.exBlack3) toEdit.raw.bayersensor.black3 = dontforceSet && options.baBehav[ADDSET_RAWEXPOS_BLACKS] ? toEdit.raw.bayersensor.black3 + mods.raw.bayersensor.black3 : mods.raw.bayersensor.black3;
+ if (raw.bayersensor.exTwoGreen) toEdit.raw.bayersensor.twogreen = mods.raw.bayersensor.twogreen;
+ if (raw.bayersensor.dcbIterations) toEdit.raw.bayersensor.dcb_iterations = mods.raw.bayersensor.dcb_iterations;
+ if (raw.bayersensor.dcbEnhance) toEdit.raw.bayersensor.dcb_enhance = mods.raw.bayersensor.dcb_enhance;
+ if (raw.bayersensor.lmmseIterations) toEdit.raw.bayersensor.lmmse_iterations = mods.raw.bayersensor.lmmse_iterations;
+ //if (raw.bayersensor.allEnhance) toEdit.raw.bayersensor.all_enhance = mods.raw.bayersensor.all_enhance;
+ if (raw.bayersensor.greenEq) toEdit.raw.bayersensor.greenthresh = dontforceSet && options.baBehav[ADDSET_PREPROCESS_GREENEQUIL] ? toEdit.raw.bayersensor.greenthresh + mods.raw.bayersensor.greenthresh : mods.raw.bayersensor.greenthresh;
+ if (raw.bayersensor.linenoise) toEdit.raw.bayersensor.linenoise = dontforceSet && options.baBehav[ADDSET_PREPROCESS_LINEDENOISE] ? toEdit.raw.bayersensor.linenoise + mods.raw.bayersensor.linenoise : mods.raw.bayersensor.linenoise;
+
+ if (raw.xtranssensor.method) toEdit.raw.xtranssensor.method = mods.raw.xtranssensor.method;
+ if (raw.xtranssensor.ccSteps) toEdit.raw.xtranssensor.ccSteps = mods.raw.xtranssensor.ccSteps;
+ if (raw.xtranssensor.exBlackRed) toEdit.raw.xtranssensor.blackred = dontforceSet && options.baBehav[ADDSET_RAWEXPOS_BLACKS] ? toEdit.raw.xtranssensor.blackred + mods.raw.xtranssensor.blackred : mods.raw.xtranssensor.blackred;
+ if (raw.xtranssensor.exBlackGreen) toEdit.raw.xtranssensor.blackgreen = dontforceSet && options.baBehav[ADDSET_RAWEXPOS_BLACKS] ? toEdit.raw.xtranssensor.blackgreen + mods.raw.xtranssensor.blackgreen : mods.raw.xtranssensor.blackgreen;
+ if (raw.xtranssensor.exBlackBlue) toEdit.raw.xtranssensor.blackblue = dontforceSet && options.baBehav[ADDSET_RAWEXPOS_BLACKS] ? toEdit.raw.xtranssensor.blackblue + mods.raw.xtranssensor.blackblue : mods.raw.xtranssensor.blackblue;
+
+ if (raw.caCorrection) toEdit.raw.ca_autocorrect = mods.raw.ca_autocorrect;
if (raw.caRed) toEdit.raw.cared = dontforceSet && options.baBehav[ADDSET_RAWCACORR] ? toEdit.raw.cared + mods.raw.cared : mods.raw.cared;
- if (raw.caBlue) toEdit.raw.cablue = dontforceSet && options.baBehav[ADDSET_RAWCACORR] ? toEdit.raw.cablue + mods.raw.cablue : mods.raw.cablue;
+ if (raw.caBlue) toEdit.raw.cablue = dontforceSet && options.baBehav[ADDSET_RAWCACORR] ? toEdit.raw.cablue + mods.raw.cablue : mods.raw.cablue;
if (raw.exPos) toEdit.raw.expos = dontforceSet && options.baBehav[ADDSET_RAWEXPOS_LINEAR] ? toEdit.raw.expos + mods.raw.expos : mods.raw.expos;
if (raw.exPreser) toEdit.raw.preser = dontforceSet && options.baBehav[ADDSET_RAWEXPOS_PRESER] ? toEdit.raw.preser + mods.raw.preser : mods.raw.preser;
- if (raw.exBlackzero) toEdit.raw.blackzero = dontforceSet && options.baBehav[ADDSET_RAWEXPOS_BLACKS] ? toEdit.raw.blackzero + mods.raw.blackzero : mods.raw.blackzero;
- if (raw.exBlackone) toEdit.raw.blackone = dontforceSet && options.baBehav[ADDSET_RAWEXPOS_BLACKS] ? toEdit.raw.blackone + mods.raw.blackone : mods.raw.blackone;
- if (raw.exBlacktwo) toEdit.raw.blacktwo = dontforceSet && options.baBehav[ADDSET_RAWEXPOS_BLACKS] ? toEdit.raw.blacktwo + mods.raw.blacktwo : mods.raw.blacktwo;
- if (raw.exBlackthree) toEdit.raw.blackthree = dontforceSet && options.baBehav[ADDSET_RAWEXPOS_BLACKS] ? toEdit.raw.blackthree + mods.raw.blackthree : mods.raw.blackthree;
- if (raw.exTwoGreen) toEdit.raw.twogreen = mods.raw.twogreen;
- if (raw.greenEq) toEdit.raw.greenthresh = dontforceSet && options.baBehav[ADDSET_PREPROCESS_GREENEQUIL] ? toEdit.raw.greenthresh + mods.raw.greenthresh : mods.raw.greenthresh;
- if (raw.hotDeadPixelFilter) toEdit.raw.hotdeadpix_filt = mods.raw.hotdeadpix_filt;
- if (raw.hotDeadPixelThresh) toEdit.raw.hotdeadpix_thresh = mods.raw.hotdeadpix_thresh;
- if (raw.linenoise) toEdit.raw.linenoise = dontforceSet && options.baBehav[ADDSET_PREPROCESS_LINEDENOISE] ? toEdit.raw.linenoise + mods.raw.linenoise : mods.raw.linenoise;
- if (raw.darkFrame) toEdit.raw.dark_frame = mods.raw.dark_frame;
- if (raw.dfAuto) toEdit.raw.df_autoselect = mods.raw.df_autoselect;
+ if (raw.hotDeadPixelFilter) toEdit.raw.hotdeadpix_filt = mods.raw.hotdeadpix_filt;
+ if (raw.hotDeadPixelThresh) toEdit.raw.hotdeadpix_thresh = mods.raw.hotdeadpix_thresh;
+ if (raw.darkFrame) toEdit.raw.dark_frame = mods.raw.dark_frame;
+ if (raw.dfAuto) toEdit.raw.df_autoselect = mods.raw.df_autoselect;
- if (raw.ff_file) toEdit.raw.ff_file = mods.raw.ff_file;
- if (raw.ff_AutoSelect) toEdit.raw.ff_AutoSelect = mods.raw.ff_AutoSelect;
- if (raw.ff_BlurRadius) toEdit.raw.ff_BlurRadius = mods.raw.ff_BlurRadius;
- if (raw.ff_BlurType) toEdit.raw.ff_BlurType = mods.raw.ff_BlurType;
+ if (raw.ff_file) toEdit.raw.ff_file = mods.raw.ff_file;
+ if (raw.ff_AutoSelect) toEdit.raw.ff_AutoSelect = mods.raw.ff_AutoSelect;
+ if (raw.ff_BlurRadius) toEdit.raw.ff_BlurRadius = mods.raw.ff_BlurRadius;
+ if (raw.ff_BlurType) toEdit.raw.ff_BlurType = mods.raw.ff_BlurType;
+ if (raw.ff_AutoClipControl) toEdit.raw.ff_AutoClipControl = mods.raw.ff_AutoClipControl;
+ if (raw.ff_clipControl) toEdit.raw.ff_clipControl = dontforceSet && options.baBehav[ADDSET_RAWFFCLIPCONTROL] ? toEdit.raw.ff_clipControl + mods.raw.ff_clipControl : mods.raw.ff_clipControl;
if (dirpyrequalizer.enabled) toEdit.dirpyrequalizer.enabled = mods.dirpyrequalizer.enabled;
if (dirpyrequalizer.gamutlab) toEdit.dirpyrequalizer.gamutlab = mods.dirpyrequalizer.gamutlab;
@@ -993,10 +1014,18 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
}
}
+bool RAWParamsEdited::BayerSensor::isUnchanged() const {
+ return method && ccSteps && dcbIterations && dcbEnhance && lmmseIterations/*&& allEnhance*/ && greenEq
+ && linenoise && exBlack0 && exBlack1 && exBlack2 && exBlack3 && exTwoGreen;
+}
+
+bool RAWParamsEdited::XTransSensor::isUnchanged() const {
+ return method && ccSteps && exBlackRed && exBlackGreen && exBlackBlue;
+}
+
bool RAWParamsEdited::isUnchanged() const {
- return ccSteps && dmethod && dcbIterations && dcbEnhance && lmmseIterations/*&& allEnhance*/ && caCorrection && caRed && caBlue && greenEq
- && hotDeadPixelFilter && hotDeadPixelThresh && linenoise && darkFrame && dfAuto && ff_file && ff_AutoSelect && ff_BlurRadius && ff_BlurType
- && exPos && exPreser && exBlackzero && exBlackone && exBlacktwo && exBlackthree && exTwoGreen;
+ return bayersensor.isUnchanged() && xtranssensor.isUnchanged() && caCorrection && caRed && caBlue && hotDeadPixelFilter && hotDeadPixelThresh && darkFrame
+ && dfAuto && ff_file && ff_AutoSelect && ff_BlurRadius && ff_BlurType && exPos && exPreser && ff_AutoClipControl && ff_clipControl;
}
bool LensProfParamsEdited::isUnchanged() const {
diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h
index ddbec2e13..84bbdbb2d 100644
--- a/rtgui/paramsedited.h
+++ b/rtgui/paramsedited.h
@@ -490,32 +490,56 @@ class HSVEqualizerParamsEdited {
class RAWParamsEdited {
public:
- bool ccSteps;
- bool dmethod;
- bool dcbIterations;
- bool dcbEnhance;
- bool lmmseIterations;
- //bool allEnhance;
+ class BayerSensor {
+
+ public:
+ bool method;
+ bool ccSteps;
+ bool exBlack0;
+ bool exBlack1;
+ bool exBlack2;
+ bool exBlack3;
+ bool exTwoGreen;
+ bool dcbIterations;
+ bool dcbEnhance;
+ bool lmmseIterations;
+ //bool allEnhance;
+ bool greenEq;
+ bool linenoise;
+
+ bool isUnchanged() const;
+ };
+
+ class XTransSensor {
+
+ public:
+ bool method;
+ bool ccSteps;
+ bool exBlackRed;
+ bool exBlackGreen;
+ bool exBlackBlue;
+
+ bool isUnchanged() const;
+ };
+
+ BayerSensor bayersensor;
+ XTransSensor xtranssensor;
+
bool caCorrection;
bool caRed;
bool caBlue;
- bool greenEq;
bool hotDeadPixelFilter;
bool hotDeadPixelThresh;
- bool linenoise;
bool darkFrame;
bool dfAuto;
bool ff_file;
bool ff_AutoSelect;
bool ff_BlurRadius;
bool ff_BlurType;
+ bool ff_AutoClipControl;
+ bool ff_clipControl;
bool exPos;
bool exPreser;
- bool exBlackzero;
- bool exBlackone;
- bool exBlacktwo;
- bool exBlackthree;
- bool exTwoGreen;
bool isUnchanged() const;
};
diff --git a/rtgui/partialpastedlg.cc b/rtgui/partialpastedlg.cc
index 869f36434..c4a6cddb9 100644
--- a/rtgui/partialpastedlg.cc
+++ b/rtgui/partialpastedlg.cc
@@ -90,28 +90,29 @@ PartialPasteDlg::PartialPasteDlg (Glib::ustring title) {
gam = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_ICMGAMMA")));
// options in raw:
- raw_expos = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWEXPOS_LINEAR")));
- raw_preser = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWEXPOS_PRESER")));
- raw_black = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWEXPOS_BLACK")));
- raw_ca_autocorrect = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWCACORR_AUTO")));
- raw_cared = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWCACORR_CARED")));
- raw_cablue = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWCACORR_CABLUE")));
- raw_hotdeadpix_filt = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PREPROCESS_HOTDEADPIXFILT")));
- raw_linenoise = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PREPROCESS_LINEDENOISE")));
- raw_greenthresh = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PREPROCESS_GREENEQUIL")));
- raw_dmethod = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_DMETHOD")));
- raw_ccSteps = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_FALSECOLOR")));
- raw_dcb_iterations = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_DCBITERATIONS")));
- raw_dcb_enhance = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_DCBENHANCE")));
- //raw_all_enhance = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_ALLENHANCE")));
+ raw_expos = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWEXPOS_LINEAR")));
+ raw_preser = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWEXPOS_PRESER")));
+ raw_black = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWEXPOS_BLACK")));
+ raw_ca_autocorrect = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWCACORR_AUTO")));
+ raw_cared = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWCACORR_CARED")));
+ raw_cablue = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWCACORR_CABLUE")));
+ raw_hotdeadpix_filt = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PREPROCESS_HOTDEADPIXFILT")));
+ raw_linenoise = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PREPROCESS_LINEDENOISE")));
+ raw_greenthresh = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PREPROCESS_GREENEQUIL")));
+ raw_method = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_DMETHOD")));
+ raw_ccSteps = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_FALSECOLOR")));
+ raw_dcb_iterations = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_DCBITERATIONS")));
+ raw_dcb_enhance = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_DCBENHANCE")));
+ //raw_all_enhance = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_ALLENHANCE")));
raw_lmmse_iterations= Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_LMMSEITERATIONS")));
- df_file = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_DARKFRAMEFILE")));
- df_AutoSelect = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_DARKFRAMEAUTOSELECT")));
- ff_file = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_FLATFIELDFILE")));
- ff_AutoSelect = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_FLATFIELDAUTOSELECT")));
- ff_BlurRadius = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_FLATFIELDBLURRADIUS")));
- ff_BlurType = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_FLATFIELDBLURTYPE")));
+ df_file = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_DARKFRAMEFILE")));
+ df_AutoSelect = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_DARKFRAMEAUTOSELECT")));
+ ff_file = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_FLATFIELDFILE")));
+ ff_AutoSelect = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_FLATFIELDAUTOSELECT")));
+ ff_BlurRadius = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_FLATFIELDBLURRADIUS")));
+ ff_BlurType = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_FLATFIELDBLURTYPE")));
+ ff_ClipControl = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_FLATFIELDCLIPCONTROL")));
Gtk::VBox* vboxes[7];
Gtk::HSeparator* hseps[7];
@@ -178,7 +179,7 @@ PartialPasteDlg::PartialPasteDlg (Glib::ustring title) {
vboxes[6]->pack_start (*raw, Gtk::PACK_SHRINK, 2);
vboxes[6]->pack_start (*hseps[6], Gtk::PACK_SHRINK, 2);
- vboxes[6]->pack_start (*raw_dmethod, Gtk::PACK_SHRINK, 2);
+ vboxes[6]->pack_start (*raw_method, Gtk::PACK_SHRINK, 2);
vboxes[6]->pack_start (*raw_ccSteps, Gtk::PACK_SHRINK, 2);
vboxes[6]->pack_start (*raw_dcb_iterations, Gtk::PACK_SHRINK, 2);
vboxes[6]->pack_start (*raw_dcb_enhance, Gtk::PACK_SHRINK, 2);
@@ -200,6 +201,7 @@ PartialPasteDlg::PartialPasteDlg (Glib::ustring title) {
vboxes[6]->pack_start (*ff_AutoSelect, Gtk::PACK_SHRINK, 2);
vboxes[6]->pack_start (*ff_BlurType, Gtk::PACK_SHRINK, 2);
vboxes[6]->pack_start (*ff_BlurRadius, Gtk::PACK_SHRINK, 2);
+ vboxes[6]->pack_start (*ff_ClipControl, Gtk::PACK_SHRINK, 2);
vboxes[6]->pack_start (*Gtk::manage (new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 0);
vboxes[6]->pack_start (*raw_ca_autocorrect, Gtk::PACK_SHRINK, 2);
vboxes[6]->pack_start (*raw_cared, Gtk::PACK_SHRINK, 2);
@@ -289,7 +291,7 @@ PartialPasteDlg::PartialPasteDlg (Glib::ustring title) {
icmConn = icm->signal_toggled().connect (sigc::bind (sigc::mem_fun(*metaicm, &Gtk::CheckButton::set_inconsistent), true));
gamcsconn = gam->signal_toggled().connect (sigc::bind (sigc::mem_fun(*metaicm, &Gtk::CheckButton::set_inconsistent), true));
- raw_dmethodConn = raw_dmethod->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
+ raw_methodConn = raw_method->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
raw_ccStepsConn = raw_ccSteps->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
raw_dcb_iterationsConn = raw_dcb_iterations->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
raw_dcb_enhanceConn = raw_dcb_enhance->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
@@ -311,6 +313,7 @@ PartialPasteDlg::PartialPasteDlg (Glib::ustring title) {
ff_AutoSelectConn = ff_AutoSelect->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
ff_BlurRadiusConn = ff_BlurRadius->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
ff_BlurTypeConn = ff_BlurType->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
+ ff_ClipControlConn = ff_ClipControl->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
add_button (Gtk::StockID("gtk-ok"), Gtk::RESPONSE_OK);
add_button (Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL);
@@ -360,7 +363,7 @@ void PartialPasteDlg::everythingToggled () {
void PartialPasteDlg::rawToggled () {
- raw_dmethodConn.block (true);
+ raw_methodConn.block (true);
raw_ccStepsConn.block (true);
raw_dcb_iterationsConn.block (true);
raw_dcb_enhanceConn.block (true);
@@ -381,10 +384,11 @@ void PartialPasteDlg::rawToggled () {
ff_AutoSelectConn.block (true);
ff_BlurRadiusConn.block (true);
ff_BlurTypeConn.block (true);
+ ff_ClipControlConn.block (true);
raw->set_inconsistent (false);
- raw_dmethod->set_active (raw->get_active ());
+ raw_method->set_active (raw->get_active ());
raw_ccSteps->set_active (raw->get_active ());
raw_dcb_iterations->set_active (raw->get_active ());
raw_dcb_enhance->set_active (raw->get_active ());
@@ -405,8 +409,9 @@ void PartialPasteDlg::rawToggled () {
ff_AutoSelect->set_active (raw->get_active ());
ff_BlurRadius->set_active (raw->get_active ());
ff_BlurType->set_active (raw->get_active ());
+ ff_ClipControl->set_active (raw->get_active ());
- raw_dmethodConn.block (false);
+ raw_methodConn.block (false);
raw_ccStepsConn.block (false);
raw_dcb_iterationsConn.block (false);
raw_dcb_enhanceConn.block (false);
@@ -427,6 +432,7 @@ void PartialPasteDlg::rawToggled () {
ff_AutoSelectConn.block (false);
ff_BlurRadiusConn.block (false);
ff_BlurTypeConn.block (false);
+ ff_ClipControlConn.block (false);
}
void PartialPasteDlg::basicToggled () {
@@ -652,33 +658,39 @@ void PartialPasteDlg::applyPaste (rtengine::procparams::ProcParams* dstPP, Param
if (!iptc->get_active ()) filterPE.iptc = falsePE.iptc;
if (!icm->get_active ()) filterPE.icm = falsePE.icm;
- if (!raw_dmethod->get_active ()) filterPE.raw.dmethod = falsePE.raw.dmethod;
- if (!raw_ccSteps->get_active ()) filterPE.raw.ccSteps = falsePE.raw.ccSteps;
- if (!raw_dcb_iterations->get_active ()) filterPE.raw.dcbIterations = falsePE.raw.dcbIterations;
- if (!raw_dcb_enhance->get_active ()) filterPE.raw.dcbEnhance = falsePE.raw.dcbEnhance;
- //if (!raw_all_enhance->get_active ()) filterPE.raw.allEnhance = falsePE.raw.allEnhance;
- if (!raw_lmmse_iterations->get_active ()) filterPE.raw.lmmseIterations = falsePE.raw.lmmseIterations;
-
+ if (!raw_method->get_active ()) { filterPE.raw.bayersensor.method = falsePE.raw.bayersensor.method;
+ filterPE.raw.xtranssensor.method = falsePE.raw.xtranssensor.method; }
+ if (!raw_ccSteps->get_active ()) { filterPE.raw.bayersensor.ccSteps = falsePE.raw.bayersensor.ccSteps;
+ filterPE.raw.xtranssensor.ccSteps = falsePE.raw.xtranssensor.ccSteps; }
+ if (!raw_dcb_iterations->get_active ()) filterPE.raw.bayersensor.dcbIterations = falsePE.raw.bayersensor.dcbIterations;
+ if (!raw_dcb_enhance->get_active ()) filterPE.raw.bayersensor.dcbEnhance = falsePE.raw.bayersensor.dcbEnhance;
+ //if (!raw_all_enhance->get_active ()) filterPE.raw.bayersensor.allEnhance = falsePE.raw.bayersensor.allEnhance;
+ if (!raw_lmmse_iterations->get_active ()) filterPE.raw.bayersensor.lmmseIterations = falsePE.raw.bayersensor.lmmseIterations;
+ if (!raw_black->get_active ()) { filterPE.raw.bayersensor.exBlack0 = falsePE.raw.bayersensor.exBlack0;
+ filterPE.raw.bayersensor.exBlack1 = falsePE.raw.bayersensor.exBlack1;
+ filterPE.raw.bayersensor.exBlack2 = falsePE.raw.bayersensor.exBlack2;
+ filterPE.raw.bayersensor.exBlack3 = falsePE.raw.bayersensor.exBlack3;
+ filterPE.raw.bayersensor.exTwoGreen = falsePE.raw.bayersensor.exTwoGreen;
+ filterPE.raw.xtranssensor.exBlackRed = falsePE.raw.xtranssensor.exBlackRed;
+ filterPE.raw.xtranssensor.exBlackGreen = falsePE.raw.xtranssensor.exBlackGreen;
+ filterPE.raw.xtranssensor.exBlackBlue = falsePE.raw.xtranssensor.exBlackBlue; }
+ if (!raw_linenoise->get_active ()) filterPE.raw.bayersensor.linenoise = falsePE.raw.bayersensor.linenoise;
+ if (!raw_greenthresh->get_active ()) filterPE.raw.bayersensor.greenEq = falsePE.raw.bayersensor.greenEq;
if (!raw_expos->get_active ()) filterPE.raw.exPos = falsePE.raw.exPos;
if (!raw_preser->get_active ()) filterPE.raw.exPreser = falsePE.raw.exPreser;
- if (!raw_black->get_active ()) { filterPE.raw.exBlackzero = falsePE.raw.exBlackzero;
- filterPE.raw.exBlackone = falsePE.raw.exBlackone;
- filterPE.raw.exBlacktwo = falsePE.raw.exBlacktwo;
- filterPE.raw.exBlackthree = falsePE.raw.exBlackthree;
- filterPE.raw.exTwoGreen = falsePE.raw.exTwoGreen; }
if (!raw_ca_autocorrect->get_active ()) filterPE.raw.caCorrection = falsePE.raw.caCorrection;
if (!raw_cared->get_active ()) filterPE.raw.caRed = falsePE.raw.caRed;
if (!raw_cablue->get_active ()) filterPE.raw.caBlue = falsePE.raw.caBlue;
if (!raw_hotdeadpix_filt->get_active ()) { filterPE.raw.hotDeadPixelFilter = falsePE.raw.hotDeadPixelFilter;
filterPE.raw.hotDeadPixelThresh = falsePE.raw.hotDeadPixelThresh; }
- if (!raw_linenoise->get_active ()) filterPE.raw.linenoise = falsePE.raw.linenoise;
- if (!raw_greenthresh->get_active ()) filterPE.raw.greenEq = falsePE.raw.greenEq;
if (!df_file->get_active ()) filterPE.raw.darkFrame = falsePE.raw.darkFrame;
if (!df_AutoSelect->get_active ()) filterPE.raw.dfAuto = falsePE.raw.dfAuto;
if (!ff_file->get_active ()) filterPE.raw.ff_file = falsePE.raw.ff_file;
if (!ff_AutoSelect->get_active ()) filterPE.raw.ff_AutoSelect = falsePE.raw.ff_AutoSelect;
if (!ff_BlurRadius->get_active ()) filterPE.raw.ff_BlurRadius = falsePE.raw.ff_BlurRadius;
if (!ff_BlurType->get_active ()) filterPE.raw.ff_BlurType = falsePE.raw.ff_BlurType;
+ if (!ff_ClipControl->get_active ()) { filterPE.raw.ff_clipControl = falsePE.raw.ff_clipControl;
+ filterPE.raw.ff_AutoClipControl = falsePE.raw.ff_AutoClipControl; }
if (dstPE) *dstPE = filterPE;
diff --git a/rtgui/partialpastedlg.h b/rtgui/partialpastedlg.h
index 361ef1005..1c1d66156 100644
--- a/rtgui/partialpastedlg.h
+++ b/rtgui/partialpastedlg.h
@@ -96,7 +96,7 @@ class PartialPasteDlg : public Gtk::Dialog {
Gtk::CheckButton* raw_hotdeadpix_filt;
Gtk::CheckButton* raw_linenoise;
Gtk::CheckButton* raw_greenthresh;
- Gtk::CheckButton* raw_dmethod;
+ Gtk::CheckButton* raw_method;
Gtk::CheckButton* raw_ccSteps;
Gtk::CheckButton* raw_dcb_iterations;
Gtk::CheckButton* raw_dcb_enhance;
@@ -109,6 +109,7 @@ class PartialPasteDlg : public Gtk::Dialog {
Gtk::CheckButton* ff_AutoSelect;
Gtk::CheckButton* ff_BlurRadius;
Gtk::CheckButton* ff_BlurType;
+ Gtk::CheckButton* ff_ClipControl;
sigc::connection everythingConn, basicConn, detailConn, colorConn, lensConn, compositionConn, metaicmConn, rawConn;
@@ -118,8 +119,8 @@ class PartialPasteDlg : public Gtk::Dialog {
sigc::connection distortionConn, cacorrConn, vignettingConn, lcpConn;
sigc::connection coarserotConn, finerotConn, cropConn, resizeConn, perspectiveConn, commonTransConn;
sigc::connection exifchConn, iptcConn, icmConn, gamcsconn;
- sigc::connection df_fileConn, df_AutoSelectConn, ff_fileConn, ff_AutoSelectConn, ff_BlurRadiusConn, ff_BlurTypeConn;
- sigc::connection raw_caredConn, raw_cablueConn, raw_ca_autocorrectConn, raw_hotdeadpix_filtConn, raw_linenoiseConn, raw_greenthreshConn, raw_ccStepsConn, raw_dmethodConn, raw_dcb_iterationsConn, raw_lmmse_iterationsConn, raw_dcb_enhanceConn, raw_exposConn, raw_preserConn, raw_blackConn; //,raw_all_enhanceConn
+ sigc::connection df_fileConn, df_AutoSelectConn, ff_fileConn, ff_AutoSelectConn, ff_BlurRadiusConn, ff_BlurTypeConn, ff_ClipControlConn;
+ sigc::connection raw_caredConn, raw_cablueConn, raw_ca_autocorrectConn, raw_hotdeadpix_filtConn, raw_linenoiseConn, raw_greenthreshConn, raw_ccStepsConn, raw_methodConn, raw_dcb_iterationsConn, raw_lmmse_iterationsConn, raw_dcb_enhanceConn, raw_exposConn, raw_preserConn, raw_blackConn; //,raw_all_enhanceConn
public:
PartialPasteDlg (Glib::ustring title);
diff --git a/rtgui/ppversion.h b/rtgui/ppversion.h
index 1639e7fbc..ea50fcbaa 100644
--- a/rtgui/ppversion.h
+++ b/rtgui/ppversion.h
@@ -6,7 +6,9 @@
#define PPVERSION_AEXP 301 //value of PPVERSION when auto exposure algorithm was modified
/*
- Log of version changes
+ Log of version changes
+ 320 2014-07-02
+ New [RAW Bayer] and [RAW X-Trans] sections, with some parameters transfered from [RAW] to [RAW Bayer]
316 2014-03-29
[ColorToning] new tool for color toning
319 2014-02-11
diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc
index cb59f7492..3782dc01d 100644
--- a/rtgui/preferences.cc
+++ b/rtgui/preferences.cc
@@ -298,10 +298,17 @@ Gtk::Widget* Preferences::getBatchProcPanel () {
appendBehavList (mi, M("TP_PREPROCESS_LINEDENOISE"), ADDSET_PREPROCESS_LINEDENOISE, true);
mi = behModel->append ();
- mi->set_value (behavColumns.label, M("TP_EXPOSCORR_LABEL"));
+ mi->set_value (behavColumns.label, M("TP_EXPOS_WHITEPOINT_LABEL"));
appendBehavList (mi, M("TP_RAWEXPOS_LINEAR"), ADDSET_RAWEXPOS_LINEAR, false);
appendBehavList (mi, M("TP_RAWEXPOS_PRESER"), ADDSET_RAWEXPOS_PRESER, false);
- appendBehavList (mi, M("TP_RAWEXPOS_BLACKS"), ADDSET_RAWEXPOS_BLACKS, false);
+
+ mi = behModel->append ();
+ mi->set_value (behavColumns.label, M("TP_RAWEXPOS_BLACKS"));
+ appendBehavList (mi, M("TP_RAWEXPOS_RGB"), ADDSET_RAWEXPOS_BLACKS, false);
+
+ mi = behModel->append ();
+ mi->set_value (behavColumns.label, M("TP_FLATFIELD_LABEL"));
+ appendBehavList (mi, M("TP_FLATFIELD_CLIPCONTROL"), ADDSET_RAWFFCLIPCONTROL, true);
mi = behModel->append ();
mi->set_value (behavColumns.label, M("TP_CHROMATABERR_LABEL"));
diff --git a/rtgui/preprocess.cc b/rtgui/preprocess.cc
index 783cabed2..f965f2492 100644
--- a/rtgui/preprocess.cc
+++ b/rtgui/preprocess.cc
@@ -29,24 +29,6 @@ PreProcess::PreProcess () : FoldableToolPanel(this)
hotDeadPixel = Gtk::manage(new Gtk::CheckButton((M("TP_PREPROCESS_HOTDEADPIXFILT"))));
hotDeadPixel->set_tooltip_markup (M("TP_PREPROCESS_HOTDEADPIXFILT_TOOLTIP"));
- lineDenoise = Gtk::manage(new Adjuster (M("TP_PREPROCESS_LINEDENOISE"),0,1000,1,0));
- lineDenoise->setAdjusterListener (this);
- if (lineDenoise->delay < 1000) lineDenoise->delay = 1000;
- lineDenoise->show();
-
- greenEqThreshold = Gtk::manage(new Adjuster (M("TP_PREPROCESS_GREENEQUIL"),0,100,1,0));
- greenEqThreshold->setAdjusterListener (this);
- if (greenEqThreshold->delay < 1000) greenEqThreshold->delay = 1000;
- greenEqThreshold->show();
-
- pack_start( *lineDenoise, Gtk::PACK_SHRINK, 4);
-
- pack_start( *Gtk::manage (new Gtk::HSeparator()));
-
- pack_start( *greenEqThreshold, Gtk::PACK_SHRINK, 4);
-
- pack_start( *Gtk::manage (new Gtk::HSeparator()));
-
pack_start( *hotDeadPixel, Gtk::PACK_SHRINK, 4);
hdpixelconn = hotDeadPixel->signal_toggled().connect ( sigc::mem_fun(*this, &PreProcess::hotDeadPixelChanged), true);
@@ -59,15 +41,11 @@ void PreProcess::read(const rtengine::procparams::ProcParams* pp, const ParamsEd
if(pedited ){
hotDeadPixel->set_inconsistent (!pedited->raw.hotDeadPixelFilter);
- lineDenoise->setEditedState( pedited->raw.linenoise ? Edited : UnEdited );
- greenEqThreshold->setEditedState( pedited->raw.greenEq ? Edited : UnEdited );
}
lastHot = pp->raw.hotdeadpix_filt;
hotDeadPixel->set_active (pp->raw.hotdeadpix_filt);
- lineDenoise->setValue (pp->raw.linenoise);
- greenEqThreshold->setValue (pp->raw.greenthresh);
hdpixelconn.block (false);
enableListener ();
@@ -76,76 +54,26 @@ void PreProcess::read(const rtengine::procparams::ProcParams* pp, const ParamsEd
void PreProcess::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited)
{
pp->raw.hotdeadpix_filt = hotDeadPixel->get_active();
- pp->raw.linenoise = lineDenoise->getIntValue();
- pp->raw.greenthresh = greenEqThreshold->getIntValue();
if (pedited) {
- pedited->raw.linenoise = lineDenoise->getEditedState ();
- pedited->raw.greenEq= greenEqThreshold->getEditedState ();
pedited->raw.hotDeadPixelFilter = !hotDeadPixel->get_inconsistent();
}
}
-void PreProcess::adjusterChanged (Adjuster* a, double newval)
-{
- if (listener) {
-
- Glib::ustring value = a->getTextValue();
-
- if (a == greenEqThreshold)
- listener->panelChanged (EvPreProcessGEquilThresh, value );
- else if (a == lineDenoise)
- listener->panelChanged (EvPreProcessLineDenoise, value );
- }
-}
-
-void PreProcess::setBatchMode(bool batchMode)
-{
- ToolPanel::setBatchMode (batchMode);
- lineDenoise->showEditedCB ();
- greenEqThreshold->showEditedCB ();
-}
-
-void PreProcess::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
-{
- lineDenoise->setDefault( defParams->raw.linenoise);
- greenEqThreshold->setDefault (defParams->raw.greenthresh);
-
- if (pedited) {
- lineDenoise->setDefaultEditedState( pedited->raw.linenoise ? Edited : UnEdited);
- greenEqThreshold->setDefaultEditedState(pedited->raw.greenEq ? Edited : UnEdited);
- } else {
- lineDenoise->setDefaultEditedState( Irrelevant );
- greenEqThreshold->setDefaultEditedState(Irrelevant );
- }
-}
-
void PreProcess::hotDeadPixelChanged ()
{
- if (batchMode) {
- if (hotDeadPixel->get_inconsistent()) {
- hotDeadPixel->set_inconsistent (false);
- hdpixelconn.block (true);
- hotDeadPixel->set_active (false);
- hdpixelconn.block (false);
- }
- else if (lastHot)
- hotDeadPixel->set_inconsistent (true);
+ if (batchMode) {
+ if (hotDeadPixel->get_inconsistent()) {
+ hotDeadPixel->set_inconsistent (false);
+ hdpixelconn.block (true);
+ hotDeadPixel->set_active (false);
+ hdpixelconn.block (false);
+ }
+ else if (lastHot)
+ hotDeadPixel->set_inconsistent (true);
- lastHot = hotDeadPixel->get_active ();
- }
- if (listener)
- listener->panelChanged (EvPreProcessHotDeadPixel, hotDeadPixel->get_active()?M("GENERAL_ENABLED"):M("GENERAL_DISABLED"));
-}
-
-void PreProcess::setAdjusterBehavior (bool linedenoiseadd, bool greenequiladd) {
-
- lineDenoise->setAddMode(linedenoiseadd);
- greenEqThreshold->setAddMode(greenequiladd);
-}
-
-void PreProcess::trimValues (rtengine::procparams::ProcParams* pp) {
-
- lineDenoise->trimValue(pp->raw.linenoise);
- greenEqThreshold->trimValue(pp->raw.greenthresh);
+ lastHot = hotDeadPixel->get_active ();
+ }
+ if (listener)
+ listener->panelChanged (EvPreProcessHotDeadPixel, hotDeadPixel->get_active()?M("GENERAL_ENABLED"):M("GENERAL_DISABLED"));
}
diff --git a/rtgui/preprocess.h b/rtgui/preprocess.h
index 345672b4e..116cb585e 100644
--- a/rtgui/preprocess.h
+++ b/rtgui/preprocess.h
@@ -20,20 +20,17 @@
#define _PREPROCESS_H_
#include
-#include "adjuster.h"
+//#include "adjuster.h"
#include "toolpanel.h"
#include "../rtengine/rawimage.h"
-class PreProcess : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel {
+class PreProcess : public ToolParamBlock, /*public AdjusterListener,*/ public FoldableToolPanel {
protected:
- Adjuster* lineDenoise;
-
- Adjuster* greenEqThreshold;
Gtk::CheckButton* hotDeadPixel;
- bool lastHot;
- sigc::connection hdpixelconn;
+ bool lastHot;
+ sigc::connection hdpixelconn;
public:
@@ -41,13 +38,14 @@ class PreProcess : public ToolParamBlock, public AdjusterListener, public Foldab
void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited=NULL);
void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL);
- void setBatchMode (bool batchMode);
- void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL);
+ //void setBatchMode (bool batchMode);
+ //void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL);
- void adjusterChanged (Adjuster* a, double newval);
void hotDeadPixelChanged();
- void setAdjusterBehavior (bool linedenoiseadd, bool greenequiladd);
- void trimValues (rtengine::procparams::ProcParams* pp);
+
+ //void adjusterChanged (Adjuster* a, double newval);
+ //void setAdjusterBehavior (bool linedenoiseadd, bool greenequiladd);
+ //void trimValues (rtengine::procparams::ProcParams* pp);
};
#endif
diff --git a/rtgui/rawexposure.cc b/rtgui/rawexposure.cc
index 4992d6b2f..1af57ce1a 100644
--- a/rtgui/rawexposure.cc
+++ b/rtgui/rawexposure.cc
@@ -34,36 +34,9 @@ RAWExposure::RAWExposure () : FoldableToolPanel(this)
PexPreser->setAdjusterListener (this);
if (PexPreser->delay < 1000) PexPreser->delay = 1000;
PexPreser->show();
- PexBlackone = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACKONE"),-2048,2048,0.1,0));//black level
- PexBlackone->setAdjusterListener (this);
- if (PexBlackone->delay < 1000) PexBlackone->delay = 1000;
- PexBlackone->show();
- PexBlacktwo = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACKTWO"),-2048,2048,0.1,0));//black level
- PexBlacktwo->setAdjusterListener (this);
- if (PexBlacktwo->delay < 1000) PexBlacktwo->delay = 1000;
- PexBlacktwo->show();
- PexBlackthree = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACKTHREE"),-2048,2048,0.1,0));//black level
- PexBlackthree->setAdjusterListener (this);
- if (PexBlackthree->delay < 1000) PexBlackthree->delay = 1000;
- PexBlackthree->show();
- PexBlackzero = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACKZERO"),-2048,2048,0.1,0));//black level
- PexBlackzero->setAdjusterListener (this);
- if (PexBlackzero->delay < 1000) PexBlackzero->delay = 1000;
- PexBlackzero->show();
- PextwoGreen = Gtk::manage(new Gtk::CheckButton((M("TP_RAWEXPOS_TWOGREEN"))));// two green
- PextwoGreen->set_active (true);
- greenconn = PextwoGreen->signal_toggled().connect ( sigc::mem_fun(*this, &RAWExposure::GreenChanged));
-
-
pack_start( *PexPos, Gtk::PACK_SHRINK, 4);//exposi
pack_start( *PexPreser, Gtk::PACK_SHRINK, 4);
- pack_start( *PexBlackone, Gtk::PACK_SHRINK, 4);//black
- pack_start( *PexBlackzero, Gtk::PACK_SHRINK, 4);//black
- pack_start( *PexBlacktwo, Gtk::PACK_SHRINK, 4);//black
- pack_start( *PexBlackthree, Gtk::PACK_SHRINK, 4);//black
- pack_start( *PextwoGreen, Gtk::PACK_SHRINK, 4);//black 2 green
-
}
void RAWExposure::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited)
@@ -73,25 +46,10 @@ void RAWExposure::read(const rtengine::procparams::ProcParams* pp, const ParamsE
if(pedited ){
PexPos->setEditedState( pedited->raw.exPos ? Edited : UnEdited );
PexPreser->setEditedState( pedited->raw.exPreser ? Edited : UnEdited );
- PexBlackzero->setEditedState( pedited->raw.exBlackzero ? Edited : UnEdited );
- PexBlackone->setEditedState( pedited->raw.exBlackone ? Edited : UnEdited );
- PexBlacktwo->setEditedState( pedited->raw.exBlacktwo ? Edited : UnEdited );
- PexBlackthree->setEditedState( pedited->raw.exBlackthree ? Edited : UnEdited );
-
}
- greenconn.block (true);
- PextwoGreen->set_active (pp->raw.twogreen);
- greenconn.block (false);
- lastPextwoGreen = pp->raw.twogreen;
-
-
+
PexPos->setValue (pp->raw.expos);
PexPreser->setValue (pp->raw.preser);//exposi
- PexBlackzero->setValue (pp->raw.blackzero);//black
- PexBlackone->setValue (pp->raw.blackone);//black
- PexBlacktwo->setValue (pp->raw.blacktwo);//black
-
- if(!PextwoGreen->get_active())PexBlackthree->setValue (pp->raw.blackthree);else PexBlackthree->setValue (PexBlackzero->getValue());
enableListener ();
}
@@ -100,23 +58,10 @@ void RAWExposure::write( rtengine::procparams::ProcParams* pp, ParamsEdited* ped
{
pp->raw.expos = PexPos->getValue();
pp->raw.preser = PexPreser->getValue();//exposi
- pp->raw.blackzero = PexBlackzero->getValue();// black
- pp->raw.blackone = PexBlackone->getValue();// black
- pp->raw.blacktwo = PexBlacktwo->getValue();// black
- pp->raw.twogreen=PextwoGreen->get_active();
- if(PextwoGreen->get_active()){pp->raw.blackthree=pp->raw.blackzero;} else {pp->raw.blackthree = PexBlackthree->getValue();}// active or desactive 2 green together
-
if (pedited) {
pedited->raw.exPos = PexPos->getEditedState ();
pedited->raw.exPreser = PexPreser->getEditedState ();//exposi
- pedited->raw.exBlackzero = PexBlackzero->getEditedState ();//black
- pedited->raw.exBlackone = PexBlackone->getEditedState ();//black
- pedited->raw.exBlacktwo = PexBlacktwo->getEditedState ();//black
- pedited->raw.exBlackthree = PexBlackthree->getEditedState ();//black
- pedited->raw.exTwoGreen =!PextwoGreen->get_inconsistent();
-
-
}
}
@@ -125,107 +70,43 @@ void RAWExposure::adjusterChanged (Adjuster* a, double newval)
{
if (listener) {
Glib::ustring value = a->getTextValue();
- {
-
+
if (a == PexPos )
listener->panelChanged (EvPreProcessExpCorrLinear, value );
else if (a == PexPreser && ABS(PexPos->getValue()-1.0)>0.0001) // update takes long, only do it if it would have an effect
listener->panelChanged (EvPreProcessExpCorrPH, value );
- else if (a == PexBlackzero) {if(!PextwoGreen->get_active())
- listener->panelChanged (EvPreProcessExpBlackzero, value ); else {listener->panelChanged (EvPreProcessExpBlackzero, value );PexBlackthree->setValue (PexBlackzero->getValue());}}
- else if (a == PexBlackone)
- listener->panelChanged (EvPreProcessExpBlackone, value );
- else if (a == PexBlacktwo)
- listener->panelChanged (EvPreProcessExpBlacktwo, value );
- else if (a == PexBlackthree) {if(!PextwoGreen->get_active())
- listener->panelChanged (EvPreProcessExpBlackthree, value ); else {listener->panelChanged (EvPreProcessExpBlackthree, value );PexBlackzero->setValue (PexBlackthree->getValue());}}
- }
-
}
}
-void RAWExposure::GreenChanged() {
- if (batchMode) {
- if (PextwoGreen->get_inconsistent()) {
- PextwoGreen->set_inconsistent (false);
- greenconn.block (true);
- PextwoGreen->set_active (false);
- greenconn.block (false);
- }
- else if (lastPextwoGreen)
- PextwoGreen->set_inconsistent (true);
- lastPextwoGreen = PextwoGreen->get_active ();
- }
-
- if (listener) {
- if (PextwoGreen->get_active())
- { listener->panelChanged (EvPreProcessExptwoGreen, M("GENERAL_ENABLED"));
- PexBlackthree->setValue (PexBlackzero->getValue());//two green together
- }
-
- else
- { listener->panelChanged (EvPreProcessExptwoGreen, M("GENERAL_DISABLED"));
- }
-
- }
-
-}
void RAWExposure::setBatchMode(bool batchMode)
{
ToolPanel::setBatchMode (batchMode);
PexPos->showEditedCB ();
PexPreser->showEditedCB ();//exposure
- PexBlackzero->showEditedCB ();//black
- PexBlackone->showEditedCB ();//black
- PexBlacktwo->showEditedCB ();//black
- PexBlackthree->showEditedCB ();//black
-
}
void RAWExposure::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
{
PexPos->setDefault( defParams->raw.expos);
PexPreser->setDefault( defParams->raw.preser);
- PexBlackzero->setDefault( defParams->raw.blackzero);
- PexBlackone->setDefault( defParams->raw.blackone);
- PexBlacktwo->setDefault( defParams->raw.blacktwo);
- PexBlackthree->setDefault( defParams->raw.blackthree);
if (pedited) {
PexPos->setDefaultEditedState( pedited->raw.exPos ? Edited : UnEdited);
PexPreser->setDefaultEditedState( pedited->raw.exPreser ? Edited : UnEdited);
- PexBlackzero->setDefaultEditedState( pedited->raw.exBlackzero ? Edited : UnEdited);
- PexBlackone->setDefaultEditedState( pedited->raw.exBlackone ? Edited : UnEdited);
- PexBlacktwo->setDefaultEditedState( pedited->raw.exBlacktwo ? Edited : UnEdited);
- PexBlackthree->setDefaultEditedState( pedited->raw.exBlackthree ? Edited : UnEdited);
-
} else {
PexPos->setDefaultEditedState( Irrelevant );
PexPreser->setDefaultEditedState( Irrelevant );
- PexBlackzero->setDefaultEditedState( Irrelevant );
- PexBlackone->setDefaultEditedState( Irrelevant );
- PexBlacktwo->setDefaultEditedState( Irrelevant );
- PexBlackthree->setDefaultEditedState( Irrelevant );
-
}
}
-void RAWExposure::setAdjusterBehavior (bool pexposadd, bool pexpreseradd, bool pexblackadd) {
+void RAWExposure::setAdjusterBehavior (bool pexposadd, bool pexpreseradd) {
PexPos->setAddMode(pexposadd);
PexPreser->setAddMode(pexpreseradd);
- PexBlackzero->setAddMode(pexblackadd);
- PexBlackone->setAddMode(pexblackadd);
- PexBlacktwo->setAddMode(pexblackadd);
- PexBlackthree->setAddMode(pexblackadd);
}
void RAWExposure::trimValues (rtengine::procparams::ProcParams* pp) {
PexPos->trimValue(pp->raw.expos);
PexPreser->trimValue(pp->raw.preser);
- PexBlackzero->trimValue(pp->raw.blackzero);
- PexBlackone->trimValue(pp->raw.blackone);
- PexBlacktwo->trimValue(pp->raw.blacktwo);
- PexBlackthree->trimValue(pp->raw.blackthree);
}
diff --git a/rtgui/rawexposure.h b/rtgui/rawexposure.h
index 2c0b3cd09..16e0aa741 100644
--- a/rtgui/rawexposure.h
+++ b/rtgui/rawexposure.h
@@ -29,13 +29,6 @@ class RAWExposure : public ToolParamBlock, public AdjusterListener, public Folda
protected:
Adjuster* PexPos;
Adjuster* PexPreser;
- Adjuster* PexBlackzero;
- Adjuster* PexBlackone;
- Adjuster* PexBlacktwo;
- Adjuster* PexBlackthree;
- bool lastPextwoGreen;
- sigc::connection greenconn;
- Gtk::CheckButton* PextwoGreen;
private:
// Gtk::CheckButton* PextwoGreen;
@@ -47,9 +40,8 @@ public:
void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL);
void setBatchMode (bool batchMode);
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL);
- void GreenChanged() ;
void adjusterChanged (Adjuster* a, double newval);
- void setAdjusterBehavior (bool pexposadd, bool pexpreseradd, bool pexblackadd);
+ void setAdjusterBehavior (bool pexposadd, bool pexpreseradd);
void trimValues (rtengine::procparams::ProcParams* pp);
};
diff --git a/rtgui/sensorbayer.cc b/rtgui/sensorbayer.cc
new file mode 100644
index 000000000..3bfc1eaa7
--- /dev/null
+++ b/rtgui/sensorbayer.cc
@@ -0,0 +1,32 @@
+/*
+ * 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 .
+ */
+#include "sensorbayer.h"
+#include "guiutils.h"
+#include "rtimage.h"
+
+using namespace rtengine;
+using namespace rtengine::procparams;
+
+SensorBayer::SensorBayer () : FoldableToolPanel(this) {
+
+ packBox = Gtk::manage (new ToolParamBlock ());
+ pack_start (*packBox);
+
+ show_all ();
+}
diff --git a/rtgui/sensorbayer.h b/rtgui/sensorbayer.h
new file mode 100644
index 000000000..419ac26b9
--- /dev/null
+++ b/rtgui/sensorbayer.h
@@ -0,0 +1,37 @@
+/*
+ * 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 .
+ */
+#ifndef _SENSORBAYER_H_
+#define _SENSORBAYER_H_
+
+#include
+#include "toolpanel.h"
+
+class SensorBayer : public ToolParamBlock, public FoldableToolPanel {
+
+ protected:
+ ToolParamBlock* packBox;
+
+ public:
+
+ SensorBayer ();
+
+ Gtk::Box* getPackBox () { return packBox; }
+};
+
+#endif
diff --git a/rtgui/sensorxtrans.cc b/rtgui/sensorxtrans.cc
new file mode 100644
index 000000000..1793948cf
--- /dev/null
+++ b/rtgui/sensorxtrans.cc
@@ -0,0 +1,32 @@
+/*
+ * 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 .
+ */
+#include "sensorxtrans.h"
+#include "guiutils.h"
+#include "rtimage.h"
+
+using namespace rtengine;
+using namespace rtengine::procparams;
+
+SensorXTrans::SensorXTrans () : FoldableToolPanel(this) {
+
+ packBox = Gtk::manage (new ToolParamBlock ());
+ pack_start (*packBox);
+
+ show_all ();
+}
diff --git a/rtgui/sensorxtrans.h b/rtgui/sensorxtrans.h
new file mode 100644
index 000000000..80318a901
--- /dev/null
+++ b/rtgui/sensorxtrans.h
@@ -0,0 +1,37 @@
+/*
+ * 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 .
+ */
+#ifndef _SENSORXTRANS_H_
+#define _SENSORXTRANS_H_
+
+#include
+#include "toolpanel.h"
+
+class SensorXTrans : public ToolParamBlock, public FoldableToolPanel {
+
+ protected:
+ ToolParamBlock* packBox;
+
+ public:
+
+ SensorXTrans ();
+
+ Gtk::Box* getPackBox () { return packBox; }
+};
+
+#endif
diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc
index 0f35c8627..4036417cf 100644
--- a/rtgui/toolpanelcoord.cc
+++ b/rtgui/toolpanelcoord.cc
@@ -73,50 +73,73 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(NULL) {
iptcpanel = Gtk::manage (new IPTCPanel ());
dirpyrequalizer = Gtk::manage (new DirPyrEqualizer ());
hsvequalizer = Gtk::manage (new HSVEqualizer ());
- rawprocess = Gtk::manage (new RawProcess ());
+ sensorbayer = Gtk::manage (new SensorBayer ());
+ sensorxtrans = Gtk::manage (new SensorXTrans ());
+ bayerprocess = Gtk::manage (new BayerProcess ());
+ xtransprocess = Gtk::manage (new XTransProcess ());
+ bayerpreprocess = Gtk::manage (new BayerPreProcess ());
preprocess = Gtk::manage (new PreProcess ());
darkframe = Gtk::manage (new DarkFrame ());
flatfield = Gtk::manage (new FlatField ());
rawcacorrection = Gtk::manage (new RAWCACorr ());
rawexposure = Gtk::manage (new RAWExposure ());
+ bayerrawexposure = Gtk::manage (new BayerRAWExposure ());
+ xtransrawexposure = Gtk::manage (new XTransRAWExposure ());
- addPanel (colorPanel, whitebalance, M("TP_WBALANCE_LABEL")); toolPanels.push_back (whitebalance);
- addPanel (exposurePanel, toneCurve, M("TP_EXPOSURE_LABEL")); toolPanels.push_back (toneCurve);
- addPanel (colorPanel, vibrance, M("TP_VIBRANCE_LABEL")); toolPanels.push_back (vibrance);
- addPanel (colorPanel, chmixer, M("TP_CHMIXER_LABEL")); toolPanels.push_back (chmixer);
- addPanel (colorPanel, blackwhite, M("TP_BWMIX_LABEL")); toolPanels.push_back (blackwhite);
- addPanel (exposurePanel, shadowshighlights, M("TP_SHADOWSHLIGHTS_LABEL")); toolPanels.push_back (shadowshighlights);
- addPanel (detailsPanel, sharpening, M("TP_SHARPENING_LABEL"), true); toolPanels.push_back (sharpening);
- addPanel (detailsPanel, sharpenEdge, M("TP_SHARPENEDGE_LABEL"), true); toolPanels.push_back (sharpenEdge);
- addPanel (detailsPanel, sharpenMicro, M("TP_SHARPENMICRO_LABEL"), true); toolPanels.push_back (sharpenMicro);
- addPanel (colorPanel, hsvequalizer, M("TP_HSVEQUALIZER_LABEL")); toolPanels.push_back (hsvequalizer);
- addPanel (colorPanel, rgbcurves, M("TP_RGBCURVES_LABEL")); toolPanels.push_back (rgbcurves);
- addPanel (colorPanel, colortoning, M("TP_COLORTONING_LABEL")); toolPanels.push_back (colortoning);
- addPanel (exposurePanel, epd, M("TP_EPD_LABEL"), true); toolPanels.push_back (epd);
- addPanel (exposurePanel, pcvignette, M("TP_PCVIGNETTE_LABEL")); toolPanels.push_back (pcvignette);
- addPanel (exposurePanel, gradient, M("TP_GRADIENT_LABEL")); toolPanels.push_back (gradient);
- addPanel (exposurePanel, lcurve, M("TP_LABCURVE_LABEL")); toolPanels.push_back (lcurve);
- addPanel (exposurePanel, colorappearance, M("TP_COLORAPP_LABEL")); toolPanels.push_back (colorappearance);
- addPanel (detailsPanel, impulsedenoise, M("TP_IMPULSEDENOISE_LABEL"), true); toolPanels.push_back (impulsedenoise);
- addPanel (detailsPanel, dirpyrdenoise, M("TP_DIRPYRDENOISE_LABEL"), true); toolPanels.push_back (dirpyrdenoise);
- addPanel (detailsPanel, defringe, M("TP_DEFRINGE_LABEL"), true); toolPanels.push_back (defringe);
- addPanel (detailsPanel, dirpyrequalizer, M("TP_DIRPYREQUALIZER_LABEL"), true); toolPanels.push_back (dirpyrequalizer);
- addPanel (transformPanel, crop, M("TP_CROP_LABEL")); toolPanels.push_back (crop);
- addPanel (transformPanel, resize, M("TP_RESIZE_LABEL")); toolPanels.push_back (resize);
- addPanel (transformPanel, lensgeom, M("TP_LENSGEOM_LABEL")); toolPanels.push_back (lensgeom);
- addPanel (lensgeom->getPackBox(), rotate, M("TP_ROTATE_LABEL")); toolPanels.push_back (rotate);
- addPanel (lensgeom->getPackBox(), perspective, M("TP_PERSPECTIVE_LABEL")); toolPanels.push_back (perspective);
- addPanel (lensgeom->getPackBox(), lensProf, M("TP_LENSPROFILE_LABEL")); toolPanels.push_back (lensProf);
- addPanel (lensgeom->getPackBox(), distortion, M("TP_DISTORTION_LABEL")); toolPanels.push_back (distortion);
- addPanel (lensgeom->getPackBox(), cacorrection, M("TP_CACORRECTION_LABEL")); toolPanels.push_back (cacorrection);
- addPanel (lensgeom->getPackBox(), vignetting, M("TP_VIGNETTING_LABEL")); toolPanels.push_back (vignetting);
- addPanel (colorPanel, icm, M("TP_ICM_LABEL")); toolPanels.push_back (icm);
- addPanel (rawPanel, rawprocess, M("TP_RAW_LABEL"), true); toolPanels.push_back (rawprocess);
- addPanel (rawPanel, preprocess, M("TP_PREPROCESS_LABEL"), true); toolPanels.push_back (preprocess);
- addPanel (rawPanel, rawexposure, M("TP_EXPOSCORR_LABEL")); toolPanels.push_back (rawexposure);
- addPanel (rawPanel, darkframe, M("TP_DARKFRAME_LABEL")); toolPanels.push_back (darkframe);
- addPanel (rawPanel, flatfield, M("TP_FLATFIELD_LABEL")); toolPanels.push_back (flatfield);
- addPanel (rawPanel, rawcacorrection, M("TP_CHROMATABERR_LABEL")); toolPanels.push_back (rawcacorrection);
+ // 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
+
+ // X-Trans demozaic methods: "3-pass (best), 1-pass (medium), fast"
+ // Mettre à jour les profils fournis pour inclure les nouvelles section Raw, notamment pour "Default High ISO"
+ // Valeurs par défaut:
+ // Best -> low ISO
+ // Medium -> High ISO
+
+ addPanel (colorPanel, whitebalance, M("TP_WBALANCE_LABEL")); toolPanels.push_back (whitebalance);
+ addPanel (exposurePanel, toneCurve, M("TP_EXPOSURE_LABEL")); toolPanels.push_back (toneCurve);
+ addPanel (colorPanel, vibrance, M("TP_VIBRANCE_LABEL")); toolPanels.push_back (vibrance);
+ addPanel (colorPanel, chmixer, M("TP_CHMIXER_LABEL")); toolPanels.push_back (chmixer);
+ addPanel (colorPanel, blackwhite, M("TP_BWMIX_LABEL")); toolPanels.push_back (blackwhite);
+ addPanel (exposurePanel, shadowshighlights, M("TP_SHADOWSHLIGHTS_LABEL")); toolPanels.push_back (shadowshighlights);
+ addPanel (detailsPanel, sharpening, M("TP_SHARPENING_LABEL"), true); toolPanels.push_back (sharpening);
+ addPanel (detailsPanel, sharpenEdge, M("TP_SHARPENEDGE_LABEL"), true); toolPanels.push_back (sharpenEdge);
+ addPanel (detailsPanel, sharpenMicro, M("TP_SHARPENMICRO_LABEL"), true); toolPanels.push_back (sharpenMicro);
+ addPanel (colorPanel, hsvequalizer, M("TP_HSVEQUALIZER_LABEL")); toolPanels.push_back (hsvequalizer);
+ addPanel (colorPanel, rgbcurves, M("TP_RGBCURVES_LABEL")); toolPanels.push_back (rgbcurves);
+ addPanel (colorPanel, colortoning, M("TP_COLORTONING_LABEL")); toolPanels.push_back (colortoning);
+ addPanel (exposurePanel, epd, M("TP_EPD_LABEL"), true); toolPanels.push_back (epd);
+ addPanel (exposurePanel, pcvignette, M("TP_PCVIGNETTE_LABEL")); toolPanels.push_back (pcvignette);
+ addPanel (exposurePanel, gradient, M("TP_GRADIENT_LABEL")); toolPanels.push_back (gradient);
+ addPanel (exposurePanel, lcurve, M("TP_LABCURVE_LABEL")); toolPanels.push_back (lcurve);
+ addPanel (exposurePanel, colorappearance, M("TP_COLORAPP_LABEL")); toolPanels.push_back (colorappearance);
+ addPanel (detailsPanel, impulsedenoise, M("TP_IMPULSEDENOISE_LABEL"), true); toolPanels.push_back (impulsedenoise);
+ addPanel (detailsPanel, dirpyrdenoise, M("TP_DIRPYRDENOISE_LABEL"), true); toolPanels.push_back (dirpyrdenoise);
+ addPanel (detailsPanel, defringe, M("TP_DEFRINGE_LABEL"), true); toolPanels.push_back (defringe);
+ addPanel (detailsPanel, dirpyrequalizer, M("TP_DIRPYREQUALIZER_LABEL"), true); toolPanels.push_back (dirpyrequalizer);
+ addPanel (transformPanel, crop, M("TP_CROP_LABEL")); toolPanels.push_back (crop);
+ addPanel (transformPanel, resize, M("TP_RESIZE_LABEL")); toolPanels.push_back (resize);
+ addPanel (transformPanel, lensgeom, M("TP_LENSGEOM_LABEL")); toolPanels.push_back (lensgeom);
+ addPanel (lensgeom->getPackBox(), rotate, M("TP_ROTATE_LABEL")); toolPanels.push_back (rotate);
+ addPanel (lensgeom->getPackBox(), perspective, M("TP_PERSPECTIVE_LABEL")); toolPanels.push_back (perspective);
+ addPanel (lensgeom->getPackBox(), lensProf, M("TP_LENSPROFILE_LABEL")); toolPanels.push_back (lensProf);
+ addPanel (lensgeom->getPackBox(), distortion, M("TP_DISTORTION_LABEL")); toolPanels.push_back (distortion);
+ addPanel (lensgeom->getPackBox(), cacorrection, M("TP_CACORRECTION_LABEL")); toolPanels.push_back (cacorrection);
+ addPanel (lensgeom->getPackBox(), vignetting, M("TP_VIGNETTING_LABEL")); toolPanels.push_back (vignetting);
+ addPanel (colorPanel, icm, M("TP_ICM_LABEL")); toolPanels.push_back (icm);
+ addPanel (rawPanel, sensorbayer, M("TP_RAW_SENSOR_BAYER_LABEL")); toolPanels.push_back (sensorbayer);
+ addPanel (sensorbayer->getPackBox(), bayerprocess, M("TP_RAW_LABEL"), true); toolPanels.push_back (bayerprocess);
+ addPanel (sensorbayer->getPackBox(), bayerrawexposure, M("TP_EXPOS_BLACKPOINT_LABEL")); toolPanels.push_back (bayerrawexposure);
+ addPanel (sensorbayer->getPackBox(), bayerpreprocess, M("TP_PREPROCESS_LABEL"), true); toolPanels.push_back (bayerpreprocess);
+ addPanel (sensorbayer->getPackBox(), rawcacorrection, M("TP_CHROMATABERR_LABEL")); toolPanels.push_back (rawcacorrection);
+ addPanel (rawPanel, sensorxtrans, M("TP_RAW_SENSOR_XTRANS_LABEL")); toolPanels.push_back (sensorxtrans);
+ addPanel (sensorxtrans->getPackBox(), xtransprocess, M("TP_RAW_LABEL"), true); toolPanels.push_back (xtransprocess);
+ addPanel (sensorxtrans->getPackBox(), xtransrawexposure, M("TP_EXPOS_BLACKPOINT_LABEL")); toolPanels.push_back (xtransrawexposure);
+ addPanel (rawPanel, rawexposure, M("TP_EXPOS_WHITEPOINT_LABEL")); toolPanels.push_back (rawexposure);
+ addPanel (rawPanel, preprocess, M("TP_PREPROCESS_LABEL"), true); toolPanels.push_back (preprocess);
+ addPanel (rawPanel, darkframe, M("TP_DARKFRAME_LABEL")); toolPanels.push_back (darkframe);
+ addPanel (rawPanel, flatfield, M("TP_FLATFIELD_LABEL")); toolPanels.push_back (flatfield);
+
+
toolPanels.push_back (coarse);
toolPanels.push_back (exifpanel);
@@ -303,7 +326,7 @@ void ToolPanelCoordinator::profileChange (const PartialProfile *nparams, rtengi
pe.set(true);
pe.initFrom (lParams);
- filterRawRefresh=pe.raw.isUnchanged() && pe.lensProf.isUnchanged();
+ filterRawRefresh = pe.raw.isUnchanged() && pe.lensProf.isUnchanged();
}
*params = *mergedParams;
diff --git a/rtgui/toolpanelcoord.h b/rtgui/toolpanelcoord.h
index d6a74e8a6..22aa35a92 100644
--- a/rtgui/toolpanelcoord.h
+++ b/rtgui/toolpanelcoord.h
@@ -59,12 +59,18 @@
#include "dirselectionlistener.h"
#include "dirpyrequalizer.h"
#include "hsvequalizer.h"
-#include "rawprocess.h"
#include "preprocess.h"
+#include "bayerpreprocess.h"
+#include "bayerprocess.h"
+#include "xtransprocess.h"
#include "darkframe.h"
#include "flatfield.h"
+#include "sensorbayer.h"
+#include "sensorxtrans.h"
#include "rawcacorrection.h"
#include "rawexposure.h"
+#include "bayerrawexposure.h"
+#include "xtransrawexposure.h"
#include "sharpenmicro.h"
#include "sharpenedge.h"
#include "rgbcurves.h"
@@ -118,12 +124,18 @@ class ToolPanelCoordinator : public ToolPanelListener,
ColorToning* colortoning;
DirPyrEqualizer* dirpyrequalizer;
HSVEqualizer* hsvequalizer;
- RawProcess* rawprocess;
+ SensorBayer * sensorbayer;
+ SensorXTrans * sensorxtrans;
+ BayerProcess* bayerprocess;
+ XTransProcess* xtransprocess;
+ BayerPreProcess* bayerpreprocess;
PreProcess* preprocess;
DarkFrame* darkframe;
FlatField* flatfield;
RAWCACorr* rawcacorrection;
RAWExposure* rawexposure;
+ BayerRAWExposure* bayerrawexposure;
+ XTransRAWExposure* xtransrawexposure;
std::vector paramcListeners;
diff --git a/rtgui/xtransprocess.cc b/rtgui/xtransprocess.cc
new file mode 100644
index 000000000..706305e9c
--- /dev/null
+++ b/rtgui/xtransprocess.cc
@@ -0,0 +1,132 @@
+/*
+ * 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 .
+ */
+#include "xtransprocess.h"
+#include "options.h"
+#include "guiutils.h"
+using namespace rtengine;
+using namespace rtengine::procparams;
+
+XTransProcess::XTransProcess () : FoldableToolPanel(this)
+{
+ Gtk::HBox* hb1 = Gtk::manage (new Gtk::HBox ());
+ hb1->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_RAW_DMETHOD") +": ")),Gtk::PACK_SHRINK, 4);
+ method = Gtk::manage (new MyComboBoxText ());
+ for( size_t i=0; iappend_text(procparams::RAWParams::XTransSensor::methodstring[i]);
+
+ method->set_active(0);
+ hb1->set_tooltip_markup (M("TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP"));
+
+ hb1->pack_end (*method, Gtk::PACK_EXPAND_WIDGET, 4);
+ pack_start( *hb1, Gtk::PACK_SHRINK, 4);
+
+ pack_start( *Gtk::manage( new Gtk::HSeparator()), Gtk::PACK_SHRINK, 0 );
+ ccSteps = Gtk::manage (new Adjuster (M("TP_RAW_FALSECOLOR"),0,5,1,0 ));
+ ccSteps->setAdjusterListener (this);
+ if (ccSteps->delay < 1000) ccSteps->delay = 1000;
+ ccSteps->show();
+ pack_start( *ccSteps, Gtk::PACK_SHRINK, 4);
+
+ methodconn = method->signal_changed().connect( sigc::mem_fun(*this, &XTransProcess::methodChanged) );
+}
+
+
+void XTransProcess::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited)
+{
+ disableListener ();
+ methodconn.block (true);
+
+ method->set_active(procparams::RAWParams::XTransSensor::numMethods);
+ for( size_t i=0; i< procparams::RAWParams::XTransSensor::numMethods; i++)
+ if( pp->raw.xtranssensor.method == procparams::RAWParams::XTransSensor::methodstring[i]) {
+ method->set_active(i);
+ oldSelection = i;
+ break;
+ }
+
+ if(pedited ){
+ ccSteps->setEditedState (pedited->raw.xtranssensor.ccSteps ? Edited : UnEdited);
+ if( !pedited->raw.xtranssensor.method )
+ method->set_active(procparams::RAWParams::XTransSensor::numMethods); // No name
+ }
+
+ ccSteps->setValue (pp->raw.xtranssensor.ccSteps);
+
+ methodconn.block (false);
+
+ enableListener ();
+}
+
+void XTransProcess::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited)
+{
+ pp->raw.xtranssensor.ccSteps = ccSteps->getIntValue();
+
+ int currentRow = method->get_active_row_number();
+ if( currentRow>=0 && currentRow < procparams::RAWParams::XTransSensor::numMethods)
+ pp->raw.xtranssensor.method = procparams::RAWParams::XTransSensor::methodstring[currentRow];
+
+ if (pedited) {
+ pedited->raw.xtranssensor.method = method->get_active_row_number() != procparams::RAWParams::XTransSensor::numMethods;
+ pedited->raw.xtranssensor.ccSteps = ccSteps->getEditedState ();
+ }
+}
+
+void XTransProcess::setBatchMode(bool batchMode)
+{
+ method->append_text (M("GENERAL_UNCHANGED"));
+ method->set_active(procparams::RAWParams::XTransSensor::numMethods); // No name
+ ToolPanel::setBatchMode (batchMode);
+ ccSteps->showEditedCB ();
+}
+
+void XTransProcess::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
+{
+ ccSteps->setDefault (defParams->raw.xtranssensor.ccSteps);
+ if (pedited) {
+ ccSteps->setDefaultEditedState(pedited->raw.xtranssensor.ccSteps ? Edited : UnEdited);
+ }else{
+ ccSteps->setDefaultEditedState(Irrelevant );
+ }
+}
+
+void XTransProcess::adjusterChanged (Adjuster* a, double newval)
+{
+ if (listener) {
+ if (a == ccSteps)
+ listener->panelChanged (EvDemosaicFalseColorIter, a->getTextValue() );
+ }
+}
+
+void XTransProcess::methodChanged ()
+{
+ int curSelection = method->get_active_row_number();
+
+ Glib::ustring methodName="";
+ bool ppreq = false;
+ if( curSelection>=0 && curSelection < procparams::RAWParams::XTransSensor::numMethods) {
+ methodName = procparams::RAWParams::XTransSensor::methodstring[curSelection];
+ if (curSelection == procparams::RAWParams::XTransSensor::mono || oldSelection == procparams::RAWParams::XTransSensor::mono) {
+ ppreq = true;
+ }
+ }
+ oldSelection = curSelection;
+
+ if (listener)
+ listener->panelChanged (ppreq ? EvDemosaicMethodPreProc : EvDemosaicMethod, methodName);
+}
diff --git a/rtgui/xtransprocess.h b/rtgui/xtransprocess.h
new file mode 100644
index 000000000..ad83ffaad
--- /dev/null
+++ b/rtgui/xtransprocess.h
@@ -0,0 +1,51 @@
+/*
+ * 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 .
+ */
+#ifndef _XTRANSPROCESS_H_
+#define _XTRANSPROCESS_H_
+
+#include
+#include "adjuster.h"
+#include "guiutils.h"
+#include "toolpanel.h"
+
+
+class XTransProcess : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel{
+
+ protected:
+
+ MyComboBoxText* method;
+ Adjuster* ccSteps;
+
+ int oldSelection;
+ sigc::connection methodconn;
+
+ public:
+
+ XTransProcess ();
+
+ void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited=NULL);
+ void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL);
+ void setBatchMode (bool batchMode);
+ void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL);
+
+ void methodChanged ();
+ void adjusterChanged (Adjuster* a, double newval);
+};
+
+#endif
diff --git a/rtgui/xtransrawexposure.cc b/rtgui/xtransrawexposure.cc
new file mode 100644
index 000000000..d9a610f27
--- /dev/null
+++ b/rtgui/xtransrawexposure.cc
@@ -0,0 +1,131 @@
+/*
+ * 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 .
+ */
+#include "xtransrawexposure.h"
+#include "guiutils.h"
+#include "../rtengine/safegtk.h"
+#include
+
+using namespace rtengine;
+using namespace rtengine::procparams;
+
+XTransRAWExposure::XTransRAWExposure () : FoldableToolPanel(this)
+{
+ PexBlackRed = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_RED"),-2048,2048,0.1,0));//black level
+ PexBlackRed->setAdjusterListener (this);
+ if (PexBlackRed->delay < 1000) PexBlackRed->delay = 1000;
+ PexBlackRed->show();
+ PexBlackGreen = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_GREEN"),-2048,2048,0.1,0));//black level
+ PexBlackGreen->setAdjusterListener (this);
+ if (PexBlackGreen->delay < 1000) PexBlackGreen->delay = 1000;
+ PexBlackGreen->show();
+ PexBlackBlue = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_BLUE"),-2048,2048,0.1,0));//black level
+ PexBlackBlue->setAdjusterListener (this);
+ if (PexBlackBlue->delay < 1000) PexBlackBlue->delay = 1000;
+ PexBlackBlue->show();
+
+ pack_start( *PexBlackRed, Gtk::PACK_SHRINK, 0);//black
+ pack_start( *PexBlackGreen, Gtk::PACK_SHRINK, 0);//black
+ pack_start( *PexBlackBlue, Gtk::PACK_SHRINK, 0);//black
+}
+
+void XTransRAWExposure::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited)
+{
+ disableListener ();
+
+ if(pedited ){
+ PexBlackRed->setEditedState( pedited->raw.xtranssensor.exBlackRed ? Edited : UnEdited );
+ PexBlackGreen->setEditedState( pedited->raw.xtranssensor.exBlackGreen ? Edited : UnEdited );
+ PexBlackBlue->setEditedState( pedited->raw.xtranssensor.exBlackBlue ? Edited : UnEdited );
+ }
+
+ PexBlackRed->setValue (pp->raw.xtranssensor.blackred);//black
+ PexBlackGreen->setValue (pp->raw.xtranssensor.blackgreen);//black
+ PexBlackBlue->setValue (pp->raw.xtranssensor.blackblue);//black
+
+ enableListener ();
+}
+
+void XTransRAWExposure::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited)
+{
+ pp->raw.xtranssensor.blackred = PexBlackRed->getValue();// black
+ pp->raw.xtranssensor.blackgreen = PexBlackGreen->getValue();// black
+ pp->raw.xtranssensor.blackblue = PexBlackBlue->getValue();// black
+
+ if (pedited) {
+ pedited->raw.xtranssensor.exBlackRed = PexBlackRed->getEditedState ();//black
+ pedited->raw.xtranssensor.exBlackGreen = PexBlackGreen->getEditedState ();//black
+ pedited->raw.xtranssensor.exBlackBlue = PexBlackBlue->getEditedState ();//black
+ }
+
+}
+
+void XTransRAWExposure::adjusterChanged (Adjuster* a, double newval)
+{
+ if (listener) {
+ Glib::ustring value = a->getTextValue();
+ if (a == PexBlackRed)
+ listener->panelChanged (EvPreProcessExpBlackRed, value);
+ else if (a == PexBlackGreen)
+ listener->panelChanged (EvPreProcessExpBlackGreen, value);
+ else if (a == PexBlackBlue)
+ listener->panelChanged (EvPreProcessExpBlackBlue, value);
+ }
+}
+
+void XTransRAWExposure::setBatchMode(bool batchMode)
+{
+ ToolPanel::setBatchMode (batchMode);
+ PexBlackRed->showEditedCB ();//black
+ PexBlackGreen->showEditedCB ();//black
+ PexBlackBlue->showEditedCB ();//black
+
+}
+
+void XTransRAWExposure::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
+{
+ PexBlackRed->setDefault( defParams->raw.xtranssensor.blackred);
+ PexBlackGreen->setDefault( defParams->raw.xtranssensor.blackgreen);
+ PexBlackBlue->setDefault( defParams->raw.xtranssensor.blackblue);
+
+ if (pedited) {
+ PexBlackRed->setDefaultEditedState( pedited->raw.xtranssensor.exBlackRed ? Edited : UnEdited);
+ PexBlackGreen->setDefaultEditedState( pedited->raw.xtranssensor.exBlackGreen ? Edited : UnEdited);
+ PexBlackBlue->setDefaultEditedState( pedited->raw.xtranssensor.exBlackBlue ? Edited : UnEdited);
+
+ } else {
+ PexBlackRed->setDefaultEditedState( Irrelevant );
+ PexBlackGreen->setDefaultEditedState( Irrelevant );
+ PexBlackBlue->setDefaultEditedState( Irrelevant );
+
+ }
+}
+
+void XTransRAWExposure::setAdjusterBehavior (bool pexblackadd) {
+
+ PexBlackRed->setAddMode(pexblackadd);
+ PexBlackGreen->setAddMode(pexblackadd);
+ PexBlackBlue->setAddMode(pexblackadd);
+}
+
+void XTransRAWExposure::trimValues (rtengine::procparams::ProcParams* pp) {
+
+ PexBlackRed->trimValue(pp->raw.xtranssensor.blackred);
+ PexBlackGreen->trimValue(pp->raw.xtranssensor.blackgreen);
+ PexBlackBlue->trimValue(pp->raw.xtranssensor.blackblue);
+}
diff --git a/rtgui/xtransrawexposure.h b/rtgui/xtransrawexposure.h
new file mode 100644
index 000000000..80f803406
--- /dev/null
+++ b/rtgui/xtransrawexposure.h
@@ -0,0 +1,49 @@
+/*
+ * 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 .
+ */
+#ifndef _XTRANSRAWEXPOSURE_H_
+#define _XTRANSRAWEXPOSURE_H_
+
+#include
+#include "adjuster.h"
+#include "toolpanel.h"
+#include "../rtengine/rawimage.h"
+
+class XTransRAWExposure : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel {
+
+protected:
+ Adjuster* PexBlackRed;
+ Adjuster* PexBlackGreen;
+ Adjuster* PexBlackBlue;
+
+private:
+// Gtk::CheckButton* PextwoGreen;
+public:
+
+ XTransRAWExposure ();
+
+ void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited=NULL);
+ void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL);
+ void setBatchMode (bool batchMode);
+ void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL);
+ void adjusterChanged (Adjuster* a, double newval);
+ void setAdjusterBehavior (bool pexblackadd);
+ void trimValues (rtengine::procparams::ProcParams* pp);
+};
+
+#endif