From f832d479e95e1809901c26740a53740a298fd3f5 Mon Sep 17 00:00:00 2001 From: Roel Baars <6567747+Thanatomanic@users.noreply.github.com> Date: Mon, 22 Oct 2018 20:32:55 +0200 Subject: [PATCH 1/5] Fixes #4883 --- rtengine/improccoordinator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 832d193a2..8532a2382 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -896,7 +896,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) // process crop, if needed for (size_t i = 0; i < crops.size(); i++) - if (crops[i]->hasListener() && (panningRelatedChange || (todo & (M_MONITOR | M_RGBCURVE | M_LUMACURVE)) || crops[i]->get_skip() == 1)) { + if (crops[i]->hasListener() && (panningRelatedChange || (highDetailNeeded && options.prevdemo != PD_Sidecar) || (todo & (M_MONITOR | M_RGBCURVE | M_LUMACURVE)) || crops[i]->get_skip() == 1)) { crops[i]->update(todo); // may call ourselves } From 2696037cb8a18bc149e3caa623655b14af59105a Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 23 Oct 2018 15:36:07 +0200 Subject: [PATCH 2/5] Batch edit is broken, fixes #4886 --- rtgui/batchtoolpanelcoord.cc | 12 ++++++++---- rtgui/batchtoolpanelcoord.h | 28 +++++++++++++++++----------- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/rtgui/batchtoolpanelcoord.cc b/rtgui/batchtoolpanelcoord.cc index b31f41e4f..0b17d9bd3 100644 --- a/rtgui/batchtoolpanelcoord.cc +++ b/rtgui/batchtoolpanelcoord.cc @@ -383,9 +383,8 @@ void BatchToolPanelCoordinator::initSession () } } -void BatchToolPanelCoordinator::panelChanged (rtengine::ProcEvent event, const Glib::ustring& descr) +void BatchToolPanelCoordinator::panelChanged(const rtengine::ProcEvent& event, const Glib::ustring& descr) { - if (selected.empty()) { return; } @@ -611,9 +610,14 @@ void BatchToolPanelCoordinator::endBatchPParamsChange() * Using a Profile panel in the batch tool panel editor is actually * not supported by BatchToolPanelCoordinator::profileChange! */ -void BatchToolPanelCoordinator::profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited) +void BatchToolPanelCoordinator::profileChange( + const PartialProfile* nparams, + const rtengine::ProcEvent& event, + const Glib::ustring& descr, + const ParamsEdited* paramsEdited, + bool fromLastSave +) { - if (event == rtengine::EvProfileChanged) { // a profile has been selected in a hypothetical Profile panel // -> ACTUALLY NOT SUPPORTED diff --git a/rtgui/batchtoolpanelcoord.h b/rtgui/batchtoolpanelcoord.h index 4efcea6fa..204750047 100644 --- a/rtgui/batchtoolpanelcoord.h +++ b/rtgui/batchtoolpanelcoord.h @@ -51,30 +51,36 @@ public: explicit BatchToolPanelCoordinator (FilePanel* parent); // FileSelectionChangeListener interface - void selectionChanged (const std::vector& selected); + void selectionChanged (const std::vector& selected) override; // toolpanellistener interface - void panelChanged (rtengine::ProcEvent event, const Glib::ustring& descr); + void panelChanged(const rtengine::ProcEvent& event, const Glib::ustring& descr) override; // profilechangelistener interface - void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = nullptr); + void profileChange( + const rtengine::procparams::PartialProfile* nparams, + const rtengine::ProcEvent& event, + const Glib::ustring& descr, + const ParamsEdited* paramsEdited = nullptr, + bool fromLastSave = false + ) override; // wbprovider interface - void getAutoWB (double& temp, double& green, double equal, double tempBias); + void getAutoWB (double& temp, double& green, double equal, double tempBias) override; void getCamWB (double& temp, double& green); // thumbnaillistener interface - void procParamsChanged (Thumbnail* thm, int whoChangedIt); + void procParamsChanged (Thumbnail* thm, int whoChangedIt) override; // batchpparamschangelistener interface - void beginBatchPParamsChange(int numberOfEntries); - void endBatchPParamsChange(); + void beginBatchPParamsChange(int numberOfEntries) override; + void endBatchPParamsChange() override; // imageareatoollistener interface - void spotWBselected (int x, int y, Thumbnail* thm = nullptr); - void cropSelectionReady (); - void rotateSelectionReady (double rotate_deg, Thumbnail* thm = nullptr); - CropGUIListener* startCropEditing (Thumbnail* thm = nullptr); + void spotWBselected (int x, int y, Thumbnail* thm = nullptr) override; + void cropSelectionReady () override; + void rotateSelectionReady (double rotate_deg, Thumbnail* thm = nullptr) override; + CropGUIListener* startCropEditing (Thumbnail* thm = nullptr) override; void optionsChanged (); }; From ed3b54e4eb3cea21099023f685b0908a09e616d0 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 23 Oct 2018 15:43:24 +0200 Subject: [PATCH 3/5] DNG files from DJI FC6310 open extremely slow, fixes #4888 --- rtengine/dcraw.cc | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 73f9c948f..f1e2b73bb 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -6462,17 +6462,20 @@ guess_cfa_pc: unsigned oldOrder = order; order = 0x4d4d; // always big endian per definition in https://www.adobe.com/content/dam/acom/en/products/photoshop/pdfs/dng_spec_1.4.0.0.pdf chapter 7 unsigned ntags = get4(); // read the number of opcodes - while (ntags--) { - unsigned opcode = get4(); - fseek (ifp, 8, SEEK_CUR); // skip 8 bytes as they don't interest us currently - if (opcode == 4) { // FixBadPixelsConstant - fseek (ifp, 4, SEEK_CUR); // skip 4 bytes as we know that the opcode 4 takes 4 byte - if(get4() == 0) { // if raw 0 values should be treated as bad pixels, set zero_is_bad to true (1). That's the only value currently supported by rt - zero_is_bad = 1; + + if (ntags < ifp->size / 12) { // rough check for wrong value (happens for example with DNG files from DJI FC6310) + while (ntags-- && !ifp->eof) { + unsigned opcode = get4(); + fseek (ifp, 8, SEEK_CUR); // skip 8 bytes as they don't interest us currently + if (opcode == 4) { // FixBadPixelsConstant + fseek (ifp, 4, SEEK_CUR); // skip 4 bytes as we know that the opcode 4 takes 4 byte + if(get4() == 0) { // if raw 0 values should be treated as bad pixels, set zero_is_bad to true (1). That's the only value currently supported by rt + zero_is_bad = 1; + } + } else { + fseek (ifp, get4(), SEEK_CUR); + } } - } else { - fseek (ifp, get4(), SEEK_CUR); - } } order = oldOrder; break; From b404268c7a5595c6e327780cef9315eb7b2e1470 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 23 Oct 2018 15:48:30 +0200 Subject: [PATCH 4/5] Better white level for DJI FC6310 --- rtengine/camconst.json | 5 +++++ rtengine/dcraw.cc | 2 ++ 2 files changed, 7 insertions(+) diff --git a/rtengine/camconst.json b/rtengine/camconst.json index 37c42350d..a9b078f41 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -1225,6 +1225,11 @@ Camera constants: } }, + { // Quality C + "make_model": "DJI FC6310", + "ranges": { "white": 64886 } + }, + { // Quality B "make_model": "FUJIFILM GFX 50S", "dcraw_matrix": [ 11756,-4754,-874,-3056,11045,2305,-381,1457,6006 ], // DNGv9.9 D65 diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index f1e2b73bb..a45fd5b49 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -10065,6 +10065,8 @@ dng_skip: adobe_coeff (make, model); if((!strncmp(make, "XIAOYI", 6) || !strncmp(make, "YI", 2)) && !strncmp(model, "M1",2)) adobe_coeff (make, model); + if(!strncmp(make, "DJI", 3) && !strncmp(model, "FC6310", 6)) // DNG files from this camera have wrong (too high) white level + adobe_coeff (make, model); if (raw_color) adobe_coeff (make, model); if (load_raw == &CLASS kodak_radc_load_raw) if (raw_color) adobe_coeff ("Apple","Quicktake"); From 8ed760c6391735825e04a7741825bcfc401c50dc Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 23 Oct 2018 15:54:07 +0200 Subject: [PATCH 5/5] LG Mobile LG-H850 (LG G5) raw support, fixes #3655 --- rtengine/camconst.json | 4 ++-- rtengine/dcraw.cc | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/rtengine/camconst.json b/rtengine/camconst.json index a9b078f41..eb4174577 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -1343,13 +1343,13 @@ Camera constants: "make_model": "LG mobile LG-H815", "dcraw_matrix": [ 5859,547,-1250,-6484,15547,547,-2422,5625,3906 ], // DNG D65 //"dcraw_matrix": [ 11563,-2891,-3203,-5313,15625,625,-781,2813,5625 ], // DNG A - "ranges": { "white_max": 1000 } + "ranges": { "white": 1000 } }, { // Quality C "make_model": "LG mobile LG-H850", //"dcraw_matrix": [ 10000,-2188,-2813,-5156,15469,625,-703,2734,5078 ], // DNG A "dcraw_matrix": [ 5313,1016,-1172,-6250,15391,547,-2344,5547,3359 ], // DNG D65 - "ranges": { "white_max": 1000 } + "ranges": { "white": 1000 } }, { // Quality A diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index a45fd5b49..035dab2b2 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -10067,6 +10067,8 @@ dng_skip: adobe_coeff (make, model); if(!strncmp(make, "DJI", 3) && !strncmp(model, "FC6310", 6)) // DNG files from this camera have wrong (too high) white level adobe_coeff (make, model); + if (!strncmp(make, "LG", 2) && (!strncmp(model, "LG-H850",7) || !strncmp(model, "LG-H815",7))) + adobe_coeff (make, model); if (raw_color) adobe_coeff (make, model); if (load_raw == &CLASS kodak_radc_load_raw) if (raw_color) adobe_coeff ("Apple","Quicktake");