diff --git a/rtdata/dcpprofiles/Canon EOS 1300D.dcp b/rtdata/dcpprofiles/Canon EOS 1300D.dcp new file mode 100644 index 000000000..e6fa7ac41 Binary files /dev/null and b/rtdata/dcpprofiles/Canon EOS 1300D.dcp differ diff --git a/rtdata/dcpprofiles/Canon EOS 60D.dcp b/rtdata/dcpprofiles/Canon EOS 60D.dcp new file mode 100644 index 000000000..24e7e04b6 Binary files /dev/null and b/rtdata/dcpprofiles/Canon EOS 60D.dcp differ diff --git a/rtdata/dcpprofiles/Canon EOS 6D Mark II.dcp b/rtdata/dcpprofiles/Canon EOS 6D Mark II.dcp new file mode 100644 index 000000000..69a131bd3 Binary files /dev/null and b/rtdata/dcpprofiles/Canon EOS 6D Mark II.dcp differ diff --git a/rtdata/dcpprofiles/Panasonic DC-TZ91.dcp b/rtdata/dcpprofiles/Panasonic DC-TZ91.dcp new file mode 100644 index 000000000..2a3abfaed Binary files /dev/null and b/rtdata/dcpprofiles/Panasonic DC-TZ91.dcp differ diff --git a/rtengine/camconst.json b/rtengine/camconst.json index 137339ceb..b13dd00f9 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -1244,6 +1244,13 @@ Camera constants: "ranges": { "white": 4050 } }, + { // Quality B + "make_model": "FUJIFILM X-A10", + "dcraw_matrix": [ 11540,-4999,-991,-2949,10963,2278,-382,1049,5605 ], // DNGv9.12 D65 + "raw_crop": [ 0, 0, 4912, 3278 ], // full raw 4912x3278, fuji official borders 10,11,9,8 + "ranges": { "white": 4050 } + }, + { // Quality B "make_model": [ "FUJIFILM X-T1", "FUJIFILM X-T10", "FUJIFILM X-E2" ], "dcraw_matrix": [ 8458,-2451,-855,-4597,12447,2407,-1475,2482,6526 ], // DNG D65 @@ -1501,6 +1508,38 @@ Camera constants: "ranges": { "white": 16300 } // WL values for 14-bit files, RT auto adapts it for 12-bit files. Typical WL at 16383 }, + { // Quality A, Samples by zorgtool at RT forums + "make_model": "Nikon D850", + "dcraw_matrix": [ 10405,-3755,-1270,-5461,13787,1793,-1040,2015,6785 ], // DNGv9.12.1 d65 + "ranges": { + "white": [ + { "iso": [ 64, 80, 100, 125, 160, 200, 250, 320 ], "levels": [ 16250, 16050, 16250 ] }, // R,B 16383 G1,G2 16145-16155 + { "iso": [ 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500 ], "levels": [ 16150, 15950, 16150 ] }, // G1,G2 16110-16145 + { "iso": [ 3200, 4000, 5000 ], "levels": 16000 }, // G1,G2 16120-16145 + { "iso": [ 6400, 8000, 10000 ], "levels": 15700 }, // G1,G2 16120-16145 + { "iso": [ 12800, 16000 ], "levels": 15400 }, // 16383 + { "iso": [ 20000, 25600 ], "levels": 15000 }, // 16383 + { "iso": [ 32000 ], "levels": 14500 }, // 16383 + { "iso": [ 40000 ], "levels": 14000 }, // 16383 + { "iso": [ 51200 ], "levels": 13500 }, // nominal 16383 + { "iso": [ 102400 ], "levels": 12000 } // nominal 16383 + ], + "white_max": 16383, + "aperture_scaling": [ + // need for more data to properly fill all scale factors + { "aperture": 1.4, "scale_factor": 1.050 }, // 37/35 + { "aperture": 1.6, "scale_factor": 1.040 }, // 68/65 + { "aperture": 1.8, "scale_factor": 1.030 }, // 65/63 + { "aperture": 2.0, "scale_factor": 1.000 }, // + { "aperture": 2.2, "scale_factor": 1.000 }, // + { "aperture": 2.5, "scale_factor": 1.000 }, // + { "aperture": 2.8, "scale_factor": 1.000 }, // + { "aperture": 3.2, "scale_factor": 1.000 }, // + { "aperture": 3.5, "scale_factor": 1.000 } // + ] + } + }, + { // Quality B "make_model": "Nikon D80", "dcraw_matrix": [ 8629,-2410,-883,-9055,16940,2171,-1490,1363,8520 ], // Dcraw.c d65 @@ -1535,8 +1574,8 @@ Camera constants: { // Quality B, 20Mp and 80Mp raw frames, "make_model": "OLYMPUS E-M1MarkII", - //"dcraw_matrix": [ 9422,-3258,-711,-2655,10898,2015,-512,1354,5512 ], // E-M5II dng_v9.5 D65 - "dcraw_matrix": [ 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 ], // beta, dng_v9.8 D65 + "dcraw_matrix": [ 9383,-3170,-763,-2457,10702,2020,-384,1236,5552 ], // dng_V9.10 D65 + //"dcraw_matrix": [ 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 ], // beta, dng_v9.8 D65 "raw_crop": [ 8, 8, -16, -8 ], // full raw 5240X3912, jpeg top12,left12,5184x3888, full hires 10400X7792, jpeg crop 8,8,10368x7776 "ranges": { "white": [ @@ -1555,7 +1594,7 @@ Camera constants: }, { // Quality B, crop correction - "make_model": [ "OLYMPUS E-M10", "OLYMPUS E-M10MarkII" ], + "make_model": [ "OLYMPUS E-M10", "OLYMPUS E-M10MarkII", "OLYMPUS E-M10 Mark III" ], "dcraw_matrix": [ 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 ], "raw_crop": [ 0, 0, 4624, 3472 ], // largest valid - full frame is 4640x3472 //"raw_crop": [ 4, 4, 4616, 3464 ], // olympus jpeg crop 8, 8, 4608, 3456 @@ -1604,6 +1643,13 @@ Camera constants: } }, + { // Quality B + "make_model": [ "Panasonic DC-FZ80", "Panasonic DC-FZ81", "Panasonic DC-FZ82", "Panasonic DC-FZ83" ], + "dcraw_matrix": [ 8550,-2908,-842,-3195,11529,1881,-338,1603,4631 ], // DNGv9.10.1 D65 + "raw_crop": [ 0, 6, -8, -2 ], // fullraw4/3 5040x3688 official 8,8,4904,3680 = 4896X3672. Dcraw 0,0,4912,3688 RT's frame gets smaller than dcraw but works better with auto distortion + "ranges": { "black": 15, "white": 4050 } // 15 is BL offset. dcraw/RT read the base offset from Exif and calculates total BL = BLbase+BLoffset + }, + { // Quality A, replicated from rawimage.cc "make_model": "Panasonic DMC-FZ150", "dcraw_matrix": [ 10435,-3208,-72,-2293,10506,2067,-486,1725,4682 ], // RT, copy from custom dcp d55 @@ -1672,10 +1718,17 @@ Camera constants: { // Quality B "make_model": [ "Panasonic DMC-TZ70", "Panasonic DMC-TZ71", "Panasonic DMC-ZS50", "Panasonic DMC-ZS51" ], "dcraw_matrix": [ 8802,-3135,-789,-3151,11468,1904,-550,1745,4810 ], // DNG_V8.8 D65 - "raw_crop": [ 4, 4, -4, -4 ], // full raw 4/3 4144x3016 8,8,3008,4008 = 4000X3000. RT's frame gets smaller than dcraw but works better with auto distortion + "raw_crop": [ 0, 0, -4, -4 ], // full raw 4/3 4144x3016 8,8,3008,4008 = 4000X3000. RT's frame gets smaller than dcraw but works better with auto distortion "ranges": { "black": 14, "white": 4050 } // 12+1+1 is BL offset }, + { // Quality A, samples by Hombre + "make_model": [ "Panasonic DC-ZS70", "Panasonic DC-TZ90", "Panasonic DC-TZ91", "Panasonic DC-TZ92", "Panasonic DC-TZ93" ], + "dcraw_matrix": [ 9052,-3117,-883,-3045,11346,1927,-205,1520,4730 ], // DNG_V9.10.1 D65 + "raw_crop": [ 0, 6, -8, -2 ], // fullraw4/3 5264x3904 official 8,8,3896,5192 = 5184X3888. Dcraw 0,0,5200,3904 RT's frame gets smaller than dcraw but works better with auto distortion + "ranges": { "black": 16, "white": 4050 } // 12+3+1 is BL offset + }, + // Panasonic DMC-FZ150,G10,G1,G2,G3,G5,GF1,GF2,GF3 are included as overwrites of the same items of rawimage.cc to test the dcraw9.21 patch { // Quality A, Replicated from rawimage.cc @@ -2055,7 +2108,7 @@ Camera constants: "raw_crop": [ 92, 38, 5480, 3656 ] // jpeg 5472x3648 - full raw: 5600 x 3714 - Samsung's official crop: 96, 42, 5568, 3690 }, - { // Quality B, RT normally use the embedded data with DNGs but because various DNG use different color matrix adobe_coeff setting is used in dcraw.cc to always use the data from camconst.json for NX1 + { // Quality B, RT normally use the embedded data with DNGs but because various DNGs use different color matrix, adobe_coeff setting is used in dcraw.cc to always use the data from camconst.json for NX1 "make_model": [ "Samsung NX1", "Samsung NX500" ], "dcraw_matrix": [ 10686,-4042,-1052,-3595,13238,276,-464,1259,5931 ], // DNG_v8.7 D65 //"dcraw_matrix": [ 13298,-6099,-296,-5243,16153,-1235,-508,1220,7758 ], // DNG_v8.7 Standard Light A @@ -2227,7 +2280,7 @@ Camera constants: }, { // Quality B - "make_model": [ "Sony DSC-RX10M2", "Sony DSC-RX10M3" ], + "make_model": [ "Sony DSC-RX10M2", "Sony DSC-RX10M3", "Sony DSC-RX10M4" ], "dcraw_matrix": [ 6679,-1825,-745,-5047,13256,1953,-1580,2422,5183 ], // DNG_v9.6 D65 "ranges": { "black": 800, "white": 16300 } }, diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 6e73a70c8..f8918896b 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -9060,6 +9060,10 @@ canon_a5: flip = 6; } else if (load_raw != &CLASS packed_load_raw) maximum = (is_raw == 2 && shot_select) ? 0x2f00 : 0x3e00; + if (!strncmp(model,"X-A10",5)) { + raw_width = 4912; + raw_height = 3278; + } top_margin = (raw_height - height) >> 2 << 1; left_margin = (raw_width - width ) >> 2 << 1; if (width == 2848 || width == 3664) filters = 0x16161616; @@ -9546,7 +9550,7 @@ dng_skip: adobe_coeff (make, model); if(!strncmp(make, "Samsung", 7) && !strncmp(model, "NX1",3)) adobe_coeff (make, model); - if((!strncmp(make, "Pentax", 6) && (!strncmp(model, "K10D",4) || !strncmp(model, "K-70",4) || !strncmp(model, "K-1",3))) && filters != 0) + if((!strncmp(make, "Pentax", 6) && (!strncmp(model, "K10D",4) || !strncmp(model, "K-70",4) || !strncmp(model, "K-1",3) || !strncmp(model, "KP",2))) && filters != 0) adobe_coeff (make, model); if(!strncmp(make, "Leica", 5) && !strncmp(model, "Q",1)) adobe_coeff (make, model); diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 1dfa69ede..ad7543e8e 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -1794,7 +1794,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } float sum = 0.f; - float sumQ = 0.f; +// float sumQ = 0.f; #ifdef _OPENMP const int numThreads = min (max (width * height / 65536, 1), omp_get_max_threads()); @@ -1814,8 +1814,10 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int hist16Qthr.clear(); } - #pragma omp for reduction(+:sum,sumQ) + // #pragma omp for reduction(+:sum,sumQ) + #pragma omp for reduction(+:sum) + for (int i = 0; i < height; i++) for (int j = 0; j < width; j++) { //rough correspondence between L and J float currL = lab->L[i][j] / 327.68f; @@ -1860,6 +1862,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } //estimation of wh only with La +/* float whestim = 500.f; if (la < 200.f) { @@ -1869,7 +1872,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } else { whestim = 500.f; } - +*/ if (needQ) { hist16Qthr[CLIP ((int) (32768.f * sqrt ((koef * (lab->L[i][j])) / 32768.f)))]++; //for brightness Q : approximation for Q=wh*sqrt(J/100) J not equal L //perhaps needs to introduce whestim ?? @@ -1877,7 +1880,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } sum += koef * lab->L[i][j]; //evaluate mean J to calculate Yb - sumQ += whestim * sqrt ((koef * (lab->L[i][j])) / 32768.f); + // sumQ += whestim * sqrt ((koef * (lab->L[i][j])) / 32768.f); //can be used in case of... } diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index db63df7c4..271fcc05a 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -714,9 +714,8 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati double avg_r = 0; double avg_g = 0; double avg_b = 0; - const float eps = 1e-5; //tolerance to avoid dividing by zero - float rn = eps, gn = eps, bn = eps; + unsigned int rn = 0, gn = 0, bn = 0; for (int i = 32; i < height - 32; i++) { int start, end; @@ -831,9 +830,9 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati } } - double reds = avg_r / rn * tpp->camwbRed; - double greens = avg_g / gn * tpp->camwbGreen; - double blues = avg_b / bn * tpp->camwbBlue; + double reds = avg_r / std::max(rn, 1u) * tpp->camwbRed; + double greens = avg_g / std::max(gn, 1u) * tpp->camwbGreen; + double blues = avg_b / std::max(bn, 1u) * tpp->camwbBlue; tpp->redAWBMul = ri->get_rgb_cam (0, 0) * reds + ri->get_rgb_cam (0, 1) * greens + ri->get_rgb_cam (0, 2) * blues; tpp->greenAWBMul = ri->get_rgb_cam (1, 0) * reds + ri->get_rgb_cam (1, 1) * greens + ri->get_rgb_cam (1, 2) * blues; diff --git a/rtgui/filebrowser.cc b/rtgui/filebrowser.cc index 10d4809ed..b9c5baafb 100644 --- a/rtgui/filebrowser.cc +++ b/rtgui/filebrowser.cc @@ -975,15 +975,11 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) bppcl->endBatchPParamsChange(); } } else if (m == clearFromCache) { - for (size_t i = 0; i < mselected.size(); i++) { - tbl->clearFromCacheRequested (mselected, false); - } + tbl->clearFromCacheRequested (mselected, false); //queue_draw (); } else if (m == clearFromCacheFull) { - for (size_t i = 0; i < mselected.size(); i++) { - tbl->clearFromCacheRequested (mselected, true); - } + tbl->clearFromCacheRequested (mselected, true); //queue_draw (); } else if (miOpenDefaultViewer != nullptr && m == miOpenDefaultViewer) { diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index 40cfe195f..250bc23e2 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -154,6 +154,10 @@ ditto {"${GTK_PREFIX}","${RESOURCES}"}/share/icons/Adwaita/index.theme # cp -RL "${GTK_PREFIX}/etc/fonts" "${ETC}" # fi +# Copy the Lensfun database into the app bundle +mkdir -p "${RESOURCES}/share/lensfun" +cp /opt/local/share/lensfun/version_1/* "${RESOURCES}/share/lensfun" + # Install names find -E "${CONTENTS}" -type f -regex '.*/(rawtherapee-cli|rawtherapee|.*\.(dylib|so))' | while read -r x; do msg "Modifying install names: ${x}"