From 271e2bef40e009d67ceaf9874ed5c67f4b2139ed Mon Sep 17 00:00:00 2001 From: Lukas Middendorf Date: Wed, 13 Sep 2017 23:03:37 +0200 Subject: [PATCH 01/11] Show clipped shadow indicator only when all channels are clipped --- rtgui/cropwindow.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index 93426a1c6..4e5e885ea 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -1623,7 +1623,7 @@ void CropWindow::expose (Cairo::RefPtr cr) const int shThreshold = options.shadowThreshold; const float ShawdowFac = 64.f / (options.shadowThreshold + 1); const float HighlightFac = 64.f / (256 - options.highlightThreshold); - const bool showclippedAny = (!showR && !showG && !showB && !showL); // will show clipping if any of RGB chanels is clipped + const bool showclippedAny = (!showR && !showG && !showB && !showL); // will show clipping if any (all) of RGB chanels is (shadow) clipped #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) @@ -1681,17 +1681,21 @@ void CropWindow::expose (Cairo::RefPtr cr) } if (showcs) { - if ((showclippedAny || showR) && currWS[0] <= shThreshold ) { + bool scR = currWS[0] <= shThreshold; + bool scG = currWS[1] <= shThreshold; + bool scB = currWS[2] <= shThreshold; + + if (((showclippedAny && (scG && scB)) || showR) && scR ) { delta += currWS[0]; changedSH = true; } - if ((showclippedAny || showG) && currWS[1] <= shThreshold ) { + if (((showclippedAny && (scR && scB)) || showG) && scG ) { delta += currWS[1]; changedSH = true; } - if ((showclippedAny || showB) && currWS[2] <= shThreshold ) { + if (((showclippedAny && (scR && scG)) || showB) && scB ) { delta += currWS[2]; changedSH = true; } From f52cd3be6443ca1089e4e4d9c6d9c53989c63b17 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Thu, 21 Sep 2017 21:30:40 +0200 Subject: [PATCH 02/11] Added timing code to sony_arw_load_raw --- rtengine/dcraw.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 0976278f0..db2173908 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -25,6 +25,8 @@ /*RT*/#include "jpeg.h" #include "opthelper.h" +#define BENCHMARK +#include "StopWatch.h" /* dcraw.c -- Dave Coffin's raw photo decoder @@ -3058,6 +3060,7 @@ void CLASS sony_arw_load_raw() void CLASS sony_arw2_load_raw() { + BENCHFUN uchar *data, *dp; ushort pix[16]; int row, col, val, max, min, imax, imin, sh, bit, i; From 6da935f9e7b7ac8e19dcbef24c2574eaf39e8b59 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Thu, 21 Sep 2017 21:49:05 +0200 Subject: [PATCH 03/11] multithreaded arw2 decode mockup --- rtengine/dcraw.cc | 52 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index db2173908..159957035 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -3060,20 +3060,45 @@ void CLASS sony_arw_load_raw() void CLASS sony_arw2_load_raw() { - BENCHFUN - uchar *data, *dp; - ushort pix[16]; - int row, col, val, max, min, imax, imin, sh, bit, i; + BENCHFUN +// uchar *data, *dp; +// ushort pix[16]; +// int row, col, val, max, min, imax, imin, sh, bit, i; - data = (uchar *) malloc (raw_width+1); - merror (data, "sony_arw2_load_raw()"); - for (row=0; row < height; row++) { - fread (data, 1, raw_width, ifp); +// data = (uchar *) malloc (raw_width+1); +// merror (data, "sony_arw2_load_raw()"); +#pragma omp parallel +{ + IMFILE *ifpthr = new IMFILE; + ifpthr->fd = ifp->fd; + ifpthr->pos = ifp->pos; + ifpthr->size = ifp->size; + ifpthr->data = ifp->data; + ifpthr->eof = ifp->eof; + ifpthr->plistener = nullptr; + ifpthr->progress_range = ifp->progress_range; + ifpthr->progress_next = ifp->progress_next; + ifpthr->progress_current = ifp->progress_current; + uchar *data, *dp; + data = (uchar *) malloc (raw_width+1); + merror (data, "sony_arw2_load_raw()"); + ushort pix[16]; + int val; + int col; + int sh; + int i; + int bit; + int pos = ifpthr->pos; +#pragma omp for + + for (int row=0; row < height; row++) { + fseek(ifpthr, pos + row * raw_width, SEEK_SET); + fread (data, 1, raw_width, ifpthr); for (dp=data, col=0; col < raw_width-30; dp+=16) { - max = 0x7ff & (val = sget4(dp)); - min = 0x7ff & val >> 11; - imax = 0x0f & val >> 22; - imin = 0x0f & val >> 26; + int max = 0x7ff & (val = sget4(dp)); + int min = 0x7ff & val >> 11; + int imax = 0x0f & val >> 22; + int imin = 0x0f & val >> 26; for (sh=0; sh < 4 && 0x80 << sh <= max-min; sh++); for (bit=30, i=0; i < 16; i++) if (i == imax) pix[i] = max; @@ -3089,6 +3114,9 @@ void CLASS sony_arw2_load_raw() } } free (data); + delete ifpthr; + +} maximum = curve[0x7ff << 1]; // RT: fix maximum. maximum = 16300; // RT: conservative white level tested on various ARW2 cameras. This constant was set in 2013-12-17, may need re-evaluation in the future. } From 973656fd82720e029c2fb60be8fb33e7d2ad461a Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 22 Sep 2017 14:03:40 +0200 Subject: [PATCH 04/11] Multithreaded sony_arw2_load_raw() --- rtengine/dcraw.cc | 98 +++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 50 deletions(-) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 159957035..c1c08a725 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -3061,61 +3061,59 @@ void CLASS sony_arw_load_raw() void CLASS sony_arw2_load_raw() { BENCHFUN -// uchar *data, *dp; -// ushort pix[16]; -// int row, col, val, max, min, imax, imin, sh, bit, i; -// data = (uchar *) malloc (raw_width+1); -// merror (data, "sony_arw2_load_raw()"); +#if defined( _OPENMP ) && defined( MYFILE_MMAP ) #pragma omp parallel +#endif { - IMFILE *ifpthr = new IMFILE; - ifpthr->fd = ifp->fd; - ifpthr->pos = ifp->pos; - ifpthr->size = ifp->size; - ifpthr->data = ifp->data; - ifpthr->eof = ifp->eof; - ifpthr->plistener = nullptr; - ifpthr->progress_range = ifp->progress_range; - ifpthr->progress_next = ifp->progress_next; - ifpthr->progress_current = ifp->progress_current; - uchar *data, *dp; - data = (uchar *) malloc (raw_width+1); - merror (data, "sony_arw2_load_raw()"); - ushort pix[16]; - int val; - int col; - int sh; - int i; - int bit; - int pos = ifpthr->pos; -#pragma omp for - - for (int row=0; row < height; row++) { - fseek(ifpthr, pos + row * raw_width, SEEK_SET); - fread (data, 1, raw_width, ifpthr); - for (dp=data, col=0; col < raw_width-30; dp+=16) { - int max = 0x7ff & (val = sget4(dp)); - int min = 0x7ff & val >> 11; - int imax = 0x0f & val >> 22; - int imin = 0x0f & val >> 26; - for (sh=0; sh < 4 && 0x80 << sh <= max-min; sh++); - for (bit=30, i=0; i < 16; i++) - if (i == imax) pix[i] = max; - else if (i == imin) pix[i] = min; - else { - pix[i] = ((sget2(dp+(bit >> 3)) >> (bit & 7) & 0x7f) << sh) + min; - if (pix[i] > 0x7ff) pix[i] = 0x7ff; - bit += 7; - } - for (i=0; i < 16; i++, col+=2) - RAW(row,col) = curve[pix[i] << 1]; // >> 2; RT: disabled shifting to avoid precision loss - col -= col & 1 ? 1:31; + IMFILE ifpthr = *ifp; +#if defined( _OPENMP ) && defined( MYFILE_MMAP ) + #pragma omp master +#endif + { + ifpthr.plistener = ifp->plistener; } - } - free (data); - delete ifpthr; + uchar *data = new (std::nothrow) uchar[raw_width + 1]; + merror(data, "sony_arw2_load_raw()"); + ushort pix[16]; + int pos = ifpthr.pos; +#if defined( _OPENMP ) && defined( MYFILE_MMAP ) + #pragma omp for schedule(dynamic,16) nowait +#endif + + for (int row = 0; row < height; row++) { + fseek(&ifpthr, pos + row * raw_width, SEEK_SET); + fread (data, 1, raw_width, &ifpthr); + uchar *dp = data; + for (int col = 0; col < raw_width - 30; dp += 16) { + int val = sget4(dp); + int max = 0x7ff & val; + int min = 0x7ff & val >> 11; + int imax = 0x0f & val >> 22; + int imin = 0x0f & val >> 26; + int bit = 30; + for (int i=0; i < 16; i++) { + if (i == imax) { + pix[i] = max; + } else if (i == imin) { + pix[i] = min; + } else { + int sh; + for (sh = 0; sh < 4 && 0x80 << sh <= max-min; sh++) + ; + pix[i] = ((sget2(dp + (bit >> 3)) >> (bit & 7) & 0x7f) << sh) + min; + pix[i] = std::min(pix[i], (ushort)0x7ff); + bit += 7; + } + } + for (int i = 0; i < 16; i++, col += 2) { + RAW(row,col) = curve[pix[i] << 1]; // >> 2; RT: disabled shifting to avoid precision loss + } + col -= col & 1 ? 1:31; + } + } + delete [] data; } maximum = curve[0x7ff << 1]; // RT: fix maximum. maximum = 16300; // RT: conservative white level tested on various ARW2 cameras. This constant was set in 2013-12-17, may need re-evaluation in the future. From f49d1c776254b96a941e540425fc66321319dd18 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 22 Sep 2017 16:01:53 +0200 Subject: [PATCH 05/11] sony_arw2_load_raw() : let only master thread update the progress bar --- rtengine/dcraw.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index c1c08a725..b40b51bf5 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -3066,25 +3066,25 @@ void CLASS sony_arw2_load_raw() #pragma omp parallel #endif { + uchar *data = new (std::nothrow) uchar[raw_width + 1]; + merror(data, "sony_arw2_load_raw()"); IMFILE ifpthr = *ifp; + int pos = ifpthr.pos; + ushort pix[16]; + #if defined( _OPENMP ) && defined( MYFILE_MMAP ) + // only master thread will update the progress bar + ifpthr.plistener = nullptr; #pragma omp master -#endif { ifpthr.plistener = ifp->plistener; } - uchar *data = new (std::nothrow) uchar[raw_width + 1]; - merror(data, "sony_arw2_load_raw()"); - ushort pix[16]; - int pos = ifpthr.pos; - -#if defined( _OPENMP ) && defined( MYFILE_MMAP ) #pragma omp for schedule(dynamic,16) nowait #endif for (int row = 0; row < height; row++) { fseek(&ifpthr, pos + row * raw_width, SEEK_SET); - fread (data, 1, raw_width, &ifpthr); + fread(data, 1, raw_width, &ifpthr); uchar *dp = data; for (int col = 0; col < raw_width - 30; dp += 16) { int val = sget4(dp); @@ -3093,14 +3093,14 @@ void CLASS sony_arw2_load_raw() int imax = 0x0f & val >> 22; int imin = 0x0f & val >> 26; int bit = 30; - for (int i=0; i < 16; i++) { + for (int i = 0; i < 16; i++) { if (i == imax) { pix[i] = max; } else if (i == imin) { pix[i] = min; } else { int sh; - for (sh = 0; sh < 4 && 0x80 << sh <= max-min; sh++) + for (sh = 0; sh < 4 && 0x80 << sh <= max - min; sh++) ; pix[i] = ((sget2(dp + (bit >> 3)) >> (bit & 7) & 0x7f) << sh) + min; pix[i] = std::min(pix[i], (ushort)0x7ff); From e29334a4dcf175b7816bd31923aa45272f66b519 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 22 Sep 2017 18:00:15 +0200 Subject: [PATCH 06/11] rawtherapee-cli: use jpeg compression 92 instead of 0 when called with -j --- rtgui/main-cli.cc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/rtgui/main-cli.cc b/rtgui/main-cli.cc index 54f536f3a..74f2e1b65 100644 --- a/rtgui/main-cli.cc +++ b/rtgui/main-cli.cc @@ -424,12 +424,16 @@ int processLineParams ( int argc, char **argv ) } } else { outputType = "jpg"; - compression = atoi (currParam.substr (2).c_str()); + if(currParam.size() < 3) { + compression = 92; + } else { + compression = atoi (currParam.substr (2).c_str()); - if (compression < 0 || compression > 100) { - std::cerr << "Error: the value accompanying the -j switch has to be in the [0-100] range!" << std::endl; - deleteProcParams (processingParams); - return -3; + if (compression < 0 || compression > 100) { + std::cerr << "Error: the value accompanying the -j switch has to be in the [0-100] range!" << std::endl; + deleteProcParams (processingParams); + return -3; + } } } From d733c403464a6a4af092b1688ee1089e968cb935 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 22 Sep 2017 19:11:55 +0200 Subject: [PATCH 07/11] Fixed two bugs in lens correction gui, fixes #4098 --- rtgui/lensprofile.cc | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index f95e27321..fb4c34069 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -182,7 +182,9 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa updateDisabled(false); } else if (LCPStore::getInstance()->isValidLCPFileName(pp->lensProf.lcpFile)) { fcbLCPFile->set_filename (pp->lensProf.lcpFile); - updateDisabled(true); + if(corrLcpFile->get_active()) { + updateDisabled(true); + } } else { fcbLCPFile->unselect_filename(fcbLCPFile->get_filename()); updateDisabled(false); @@ -194,17 +196,18 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa const LFDatabase *db = LFDatabase::getInstance(); LFCamera c; - LFLens l; - if (metadata) { - c = db->findCamera(metadata->getMake(), metadata->getModel()); - l = db->findLens(c, metadata->getLens()); - } if (!setLensfunCamera(pp->lensProf.lfCameraMake, pp->lensProf.lfCameraModel) && !pp->lensProf.lfManual()) { - setLensfunCamera(c.getMake(), c.getModel()); + if (metadata) { + c = db->findCamera(metadata->getMake(), metadata->getModel()); + setLensfunCamera(c.getMake(), c.getModel()); + } } if (!setLensfunLens(pp->lensProf.lfLens) && !pp->lensProf.lfManual()) { - setLensfunLens(l.getLens()); + if (metadata) { + LFLens l = db->findLens(c, metadata->getLens()); + setLensfunLens(l.getLens()); + } } lcModeChanged = lcpFileChanged = useDistChanged = useVignChanged = useCAChanged = false; @@ -231,7 +234,7 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa void LensProfilePanel::updateLensfunWarning() { warning->hide(); - if (corrLensfunManual->get_active()) { + if (corrLensfunManual->get_active() || corrLensfunAuto->get_active()) { const LFDatabase *db = LFDatabase::getInstance(); auto itc = lensfunCameras->get_active(); From 5247e61040e231e54cca70c65819a87bdcd575df Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sat, 23 Sep 2017 11:39:14 +0200 Subject: [PATCH 08/11] sony_arw2_load_raw() : removed timing code --- rtengine/dcraw.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index b40b51bf5..6e73a70c8 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -25,8 +25,6 @@ /*RT*/#include "jpeg.h" #include "opthelper.h" -#define BENCHMARK -#include "StopWatch.h" /* dcraw.c -- Dave Coffin's raw photo decoder @@ -3060,7 +3058,6 @@ void CLASS sony_arw_load_raw() void CLASS sony_arw2_load_raw() { - BENCHFUN #if defined( _OPENMP ) && defined( MYFILE_MMAP ) #pragma omp parallel From 8fae2727e21646ce9eb6344f41b471c5ccbfcfc0 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sat, 23 Sep 2017 13:53:54 +0200 Subject: [PATCH 09/11] Updated rtexif using ExifTool-10.61 --- rtexif/canonattribs.cc | 27 +++++-- rtexif/nikonattribs.cc | 6 +- rtexif/pentaxattribs.cc | 2 + rtexif/sonyminoltaattribs.cc | 72 ++++++++++++++----- ...generateLensList => generateRtexifUpdates} | 27 +++---- 5 files changed, 97 insertions(+), 37 deletions(-) rename tools/{generateLensList => generateRtexifUpdates} (66%) diff --git a/rtexif/canonattribs.cc b/rtexif/canonattribs.cc index 01b00dd53..cabafad32 100644 --- a/rtexif/canonattribs.cc +++ b/rtexif/canonattribs.cc @@ -785,6 +785,7 @@ public: choices.insert (p_t (183, "Sigma 180mm f/2.8 EX DG OS HSM APO Macro")); choices.insert (p_t (183, "Sigma 150-600mm f/5-6.3 DG OS HSM | C")); choices.insert (p_t (183, "Sigma 150-600mm f/5-6.3 DG OS HSM | S")); + choices.insert (p_t (183, "Sigma 100-400mm f/5-6.3 DG OS HSM")); choices.insert (p_t (184, "Canon EF 400mm f/2.8L + 2x")); choices.insert (p_t (185, "Canon EF 600mm f/4L IS")); choices.insert (p_t (186, "Canon EF 70-200mm f/4L")); @@ -797,7 +798,8 @@ public: choices.insert (p_t (194, "Canon EF 80-200mm f/4.5-5.6 USM")); choices.insert (p_t (195, "Canon EF 35-105mm f/4.5-5.6 USM")); choices.insert (p_t (196, "Canon EF 75-300mm f/4-5.6 USM")); - choices.insert (p_t (197, "Canon EF 75-300mm f/4-5.6 IS USM")); + choices.insert (p_t (197, "Canon EF 75-300mm f/4-5.6 IS USM or Sigma Lens")); + choices.insert (p_t (197, "Sigma 18-300mm f/3.5-6.3 DC Macro OS HS")); choices.insert (p_t (198, "Canon EF 50mm f/1.4 USM or Zeiss Lens")); choices.insert (p_t (198, "Zeiss Otus 55mm f/1.4 ZE")); choices.insert (p_t (198, "Zeiss Otus 85mm f/1.4 ZE")); @@ -859,11 +861,13 @@ public: choices.insert (p_t (490, "Canon EF 8-15mm f/4L Fisheye USM")); choices.insert (p_t (491, "Canon EF 300mm f/2.8L IS II USM or Tamron Lens")); choices.insert (p_t (491, "Tamron SP 70-200mm f/2.8 Di VC USD G2 (A025)")); + choices.insert (p_t (491, "Tamron 18-400mm f/3.5-6.3 Di II VC HLD (B028)")); choices.insert (p_t (492, "Canon EF 400mm f/2.8L IS II USM")); choices.insert (p_t (493, "Canon EF 500mm f/4L IS II USM or EF 24-105mm f4L IS USM")); choices.insert (p_t (493, "Canon EF 24-105mm f/4L IS USM")); choices.insert (p_t (494, "Canon EF 600mm f/4.0L IS II USM")); - choices.insert (p_t (495, "Canon EF 24-70mm f/2.8L II USM")); + choices.insert (p_t (495, "Canon EF 24-70mm f/2.8L II USM or Sigma Lens")); + choices.insert (p_t (495, "Sigma 24-70mm F2.8 DG OS HSM | A")); choices.insert (p_t (496, "Canon EF 200-400mm f/4L IS USM")); choices.insert (p_t (499, "Canon EF 200-400mm f/4L IS USM + 1.4x")); choices.insert (p_t (502, "Canon EF 28mm f/2.8 IS USM")); @@ -872,7 +876,8 @@ public: choices.insert (p_t (505, "Canon EF 35mm f/2 IS USM")); choices.insert (p_t (506, "Canon EF 400mm f/4 DO IS II USM")); choices.insert (p_t (507, "Canon EF 16-35mm f/4L IS USM")); - choices.insert (p_t (508, "Canon EF 11-24mm f/4L USM")); + choices.insert (p_t (508, "Canon EF 11-24mm f/4L USM or Tamron Lens")); + choices.insert (p_t (508, "Tamron 10-24mm f/3.5-4.5 Di II VC HLD")); choices.insert (p_t (747, "Canon EF 100-400mm f/4.5-5.6L IS II USM or Tamron Lens")); choices.insert (p_t (747, "Tamron SP 150-600mm F5-6.3 Di VC USD G2")); choices.insert (p_t (748, "Canon EF 100-400mm f/4.5-5.6L IS II USM + 1.4x")); @@ -896,8 +901,10 @@ public: choices.insert (p_t (4156, "Canon EF 50mm f/1.8 STM")); choices.insert (p_t (4157, "Canon EF-M 18-150mm 1:3.5-6.3 IS STM")); choices.insert (p_t (4158, "Canon EF-S 18-55mm f/4-5.6 IS STM")); + choices.insert (p_t (4160, "Canon EF-S 35mm f/2.8 Macro IS STM")); choices.insert (p_t (36910, "Canon EF 70-300mm f/4-5.6 IS II USM")); choices.insert (p_t (36912, "Canon EF-S 18-135mm f/3.5-5.6 IS USM")); + choices.insert (p_t (61494, "Canon CN-E 85mm T1.3 L F")); choices.insert (p_t (65535, "n/a")); } @@ -1577,7 +1584,7 @@ public: choices[41353216] = "PowerShot SD940 IS / Digital IXUS 120 IS / IXY Digital 220 IS"; choices[41943040] = "PowerShot A495"; choices[42008576] = "PowerShot A490"; - choices[42074112] = "PowerShot A3100 IS / A3150 IS"; + choices[42074112] = "PowerShot A3100/A3150 IS"; choices[42139648] = "PowerShot A3000 IS"; choices[42205184] = "PowerShot SD1400 IS / IXUS 130 / IXY 400F"; choices[42270720] = "PowerShot SD1300 IS / IXUS 105 / IXY 200F"; @@ -1621,7 +1628,7 @@ public: choices[52887552] = "PowerShot A2400 IS"; choices[52953088] = "PowerShot A2300"; choices[53673984] = "PowerShot G15"; - choices[53739520] = "PowerShot SX50"; + choices[53739520] = "PowerShot SX50 HS"; choices[53805056] = "PowerShot SX160 IS"; choices[53870592] = "PowerShot S110 (new)"; choices[53936128] = "PowerShot SX500 IS"; @@ -1631,6 +1638,7 @@ public: choices[54591488] = "PowerShot SX270 HS"; choices[54657024] = "PowerShot A3500 IS"; choices[54722560] = "PowerShot A2600"; + choices[54788096] = "PowerShot SX275 HS"; choices[54853632] = "PowerShot A1400"; choices[54919168] = "PowerShot ELPH 130 IS / IXUS 140 / IXY 110F"; choices[54984704] = "PowerShot ELPH 115/120 IS / IXUS 132/135 / IXY 90F/100F"; @@ -1679,6 +1687,11 @@ public: choices[67371009] = "IXY 180"; choices[67436544] = "PowerShot SX720 HS"; choices[67502080] = "PowerShot SX620 HS"; + choices[67567616] = "EOS M6"; + choices[68157440] = "PowerShot G9 X Mark II"; + choices[68485120] = "PowerShot ELPH 185 / IXUS 185 / IXY 200"; + choices[68550656] = "PowerShot SX430 IS"; + choices[68616192] = "PowerShot SX730 HS"; choices[100925440] = "PowerShot S100 / Digital IXUS / IXY Digital"; choices[1074255475] = "DC19/DC21/DC22"; choices[1074255476] = "XH A1"; @@ -1763,6 +1776,10 @@ public: choices[2147484563] = "EOS Rebel T6i / 750D / Kiss X8i"; choices[2147484673] = "EOS 5DS R"; choices[2147484676] = "EOS Rebel T6 / 1300D / Kiss X80"; + choices[2147484677] = "EOS Rebel T7i / 800D / Kiss X9i"; + choices[2147484678] = "EOS 6D Mark II"; + choices[2147484680] = "EOS 77D / 9000D"; + choices[2147484695] = "EOS Rebel SL2 / 200D / Kiss X9"; } }; CAModelIDInterpreter caModelIDInterpreter; diff --git a/rtexif/nikonattribs.cc b/rtexif/nikonattribs.cc index bf4fc5a6b..ac8e69ead 100644 --- a/rtexif/nikonattribs.cc +++ b/rtexif/nikonattribs.cc @@ -680,6 +680,7 @@ const std::map NALensDataInterpreter::lenses = { {"10 3D 3C 60 2C 3C D2 02", "Tamron AF 28-80mm f/3.5-5.6 Aspherical (177D)"}, {"10 48 8E 8E 30 30 08 00", "AF Nikkor 300mm f/4 IF-ED"}, {"11 48 44 5C 24 24 08 00", "AF Zoom-Nikkor 35-70mm f/2.8"}, + {"11 48 44 5C 24 24 15 00", "AF Zoom-Nikkor 35-70mm f/2.8"}, {"12 36 5C 81 35 3D 09 00", "Cosina AF Zoom 70-210mm f/4.5-5.6 MC Macro"}, {"12 36 69 97 35 42 09 00", "Soligor AF Zoom 100-400mm 1:4.5-6.7 MC"}, {"12 38 69 97 35 42 09 02", "Promaster Spectrum 7 100-400mm f/4.5-6.7"}, @@ -1002,6 +1003,7 @@ const std::map NALensDataInterpreter::lenses = { {"A7 3C 53 80 30 3C C2 0E", "AF-S DX Nikkor 55-200mm f/4-5.6G ED VR II"}, {"A7 49 80 A0 24 24 4B 06", "Sigma APO 200-500mm f/2.8 EX DG"}, {"A7 4B 62 62 2C 2C A9 0E", "AF-S DX Micro Nikkor 85mm f/3.5G ED VR"}, + {"A8 38 18 30 34 3C D3 8E", "AF-P DX Nikkor 10-20mm f/4.5-5.6G VR"}, {"A8 48 80 98 30 30 AA 0E", "AF-S VR Zoom-Nikkor 200-400mm f/4G IF-ED II"}, {"A8 48 8E 8E 30 30 C3 0E", "AF-S Nikkor 300mm f/4E PF ED VR"}, {"A8 48 8E 8E 30 30 C3 4E", "AF-S Nikkor 300mm f/4E PF ED VR"}, @@ -1030,6 +1032,8 @@ const std::map NALensDataInterpreter::lenses = { {"B6 48 37 56 24 24 1C 02", "Sigma 24-60mm f/2.8 EX DG"}, {"B7 44 60 98 34 3C B9 0E", "AF-S Nikkor 80-400mm f/4.5-5.6G ED VR"}, {"B8 40 2D 44 2C 34 BA 06", "AF-S Nikkor 18-35mm f/3.5-4.5G ED"}, + {"BF 4E 26 26 1E 1E 01 04", "Irix 15mm f/2.4 Firefly"}, + {"C3 34 68 98 38 40 4B 4E", "Sigma 100-400mm f/5-6.3 DG OS HSM | C"}, {"CC 4C 50 68 14 14 4B 06", "Sigma 50-100mm f/1.8 DC HSM | A"}, {"CD 3D 2D 70 2E 3C 4B 0E", "Sigma 18-125mm f/3.8-5.6 DC OS HSM"}, {"CE 34 76 A0 38 40 4B 0E", "Sigma 150-500mm f/5-6.3 DG OS APO HSM"}, @@ -1083,7 +1087,7 @@ const std::map NALensDataInterpreter::lenses = { {"FE 53 5C 80 24 24 84 06", "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)"}, {"FE 54 5C 80 24 24 DF 0E", "Tamron SP 70-200mm f/2.8 Di VC USD (A009)"}, {"FE 54 64 64 24 24 DF 0E", "Tamron SP 90mm f/2.8 Di VC USD Macro 1:1 (F004)"}, - {"FF 40 2D 80 2C 40 4B 06", "Sigma 18-200mm f/3.5-6.3 DC"} + {"FF 40 2D 80 2C 40 4B 06", "Sigma 18-200mm f/3.5-6.3 DC"}, }; const TagAttrib nikonISOInfoAttribs[] = { diff --git a/rtexif/pentaxattribs.cc b/rtexif/pentaxattribs.cc index 2c52a0c88..a1f752f5e 100644 --- a/rtexif/pentaxattribs.cc +++ b/rtexif/pentaxattribs.cc @@ -928,6 +928,7 @@ public: choices.insert (p_t (256 * 8 + 30, "Sigma 17-70mm f/2.8-4 DC Macro HSM | C")); choices.insert (p_t (256 * 8 + 31, "Sigma 18-35mm f/1.8 DC HSM")); choices.insert (p_t (256 * 8 + 32, "Sigma 30mm f/1.4 DC HSM | A")); + choices.insert (p_t (256 * 8 + 33, "Sigma 18-200mm f/3.5-6.3 DC MACRO HSM")); choices.insert (p_t (256 * 8 + 34, "Sigma 18-300mm f/3.5-6.3 DC Macro HSM")); choices.insert (p_t (256 * 8 + 59, "HD PENTAX-D FA 150-450mm f/4.5-5.6 ED DC AW")); choices.insert (p_t (256 * 8 + 60, "HD PENTAX-D FA* 70-200mm f/2.8 ED DC AW")); @@ -977,6 +978,7 @@ public: choices.insert (p_t (256 * 13 + 19, "smc PENTAX-D FA 645 25mm f/4 AL [IF] SDM AW")); choices.insert (p_t (256 * 13 + 20, "HD PENTAX-D FA 645 90mm f/2.8 ED AW SR")); choices.insert (p_t (256 * 13 + 253, "HD PENTAX-DA 645 28-45mm f/4.5 ED AW SR")); + choices.insert (p_t (256 * 13 + 254, "smc PENTAX-DA 645 25mm f/4 AL [IF] SDM AW")); choices.insert (p_t (256 * 21 + 0, "Pentax Q Manual Lens")); choices.insert (p_t (256 * 21 + 1, "01 Standard Prime 8.5mm f/1.9")); choices.insert (p_t (256 * 21 + 2, "02 Standard Zoom 5-15mm f/2.8-4.5")); diff --git a/rtexif/sonyminoltaattribs.cc b/rtexif/sonyminoltaattribs.cc index 7195bf8e5..4e5fa4ba2 100644 --- a/rtexif/sonyminoltaattribs.cc +++ b/rtexif/sonyminoltaattribs.cc @@ -664,7 +664,7 @@ public: {128, "Sigma 35mm f/1.4 DG HSM"}, {128, "Sigma 18-35mm f/1.8 DC HSM"}, {128, "Sigma 50-500mm f/4.5-6.3 APO DG OS HSM"}, - {128, "Sigma 24-105mm f/4 DG HSM | Art 013"}, + {128, "Sigma 24-105mm f/4 DG HSM | A"}, {129, "Tamron Lens (129)"}, {129, "Tamron 200-400mm f/5.6 LD"}, {129, "Tamron 70-300mm f/4-5.6 LD"}, @@ -684,6 +684,8 @@ public: {213, "Tamron 16-300mm f/3.5-6.3 Di II PZD Macro"}, {214, "Tamron SP 150-600mm f/5-6.3 Di USD"}, {215, "Tamron SP 15-30mm f/2.8 Di USD"}, + {216, "Tamron SP 45mm f/1.8 Di USD"}, + {217, "Tamron SP 35mm f/1.8 Di USD"}, {218, "Tamron SP 90mm f/2.8 Di Macro 1:1 USD (F017)"}, {224, "Tamron SP 90mm f/2.8 Di Macro 1:1 USD (F004)"}, {255, "Tamron Lens (255)"}, @@ -838,6 +840,7 @@ public: {6553, "Sony E 20mm f/2.8"}, {6553, "Sony E 35mm f/1.8 OSS"}, {6553, "Sony E PZ 18-105mm f/4 G OSS"}, + {6553, "Sony FE 12-24mm f/4 G"}, {6553, "Sony FE 90mm f/2.8 Macro G OSS"}, {6553, "Sony E 18-50mm f/4-5.6"}, {6553, "Sony E PZ 18-200mm f/3.5-6.3 OSS"}, @@ -851,6 +854,7 @@ public: {6553, "Sony FE 28mm f/2"}, {6553, "Sony FE PZ 28-135mm f/4 G OSS"}, {6553, "Sony FE 100mm f/2.8 STF GM OSS"}, + {6553, "Sony E PZ 18-110mm f/4 G OSS"}, {6553, "Sony FE 24-70mm f/2.8 GM"}, {6553, "Sony FE 50mm f/1.4 ZA"}, {6553, "Sony FE 85mm f/1.4 GM"}, @@ -858,17 +862,27 @@ public: {6553, "Sony FE 21mm f/2.8 (SEL28F20 + SEL075UWC)"}, {6553, "Sony FE 16mm f/3.5 Fisheye (SEL28F20 + SEL057FEC)"}, {6553, "Sony FE 70-300mm f/4.5-5.6 G OSS"}, + {6553, "Sony FE 100-400mm f/4.5-5.6 GM OSS"}, {6553, "Sony FE 70-200mm f/2.8 GM OSS"}, + {6553, "Sony FE 16-35mm f/2.8 GM"}, {6553, "Sony FE 70-200mm f/2.8 GM OSS + 1.4X Teleconverter"}, {6553, "Sony FE 70-200mm f/2.8 GM OSS + 2X Teleconverter"}, + {6553, "Sony FE 100-400mm f/4.5-5.6 GM OSS + 1.4X Teleconverter"}, + {6553, "Sony FE 100-400mm f/4.5-5.6 GM OSS + 2X Teleconverter"}, {6553, "Samyang AF 50mm f/1.4 FE"}, {6553, "Samyang AF 14mm f/2.8 FE"}, + {6553, "Samyang AF 35mm f/2.8 FE"}, {6553, "Sigma 19mm f/2.8 [EX] DN"}, {6553, "Sigma 30mm f/2.8 [EX] DN"}, {6553, "Sigma 60mm f/2.8 DN"}, - {6553, "Sigma 30mm f/1.4 DC DN | C 016"}, + {6553, "Sigma 30mm f/1.4 DC DN | C"}, {6553, "Tamron 18-200mm f/3.5-6.3 Di III VC"}, {6553, "Tokina Firin 20mm f/2 FE MF"}, + {6553, "Voigtlander SUPER WIDE-HELIAR 15mm f/4.5 III"}, + {6553, "Voigtlander HELIAR-HYPER WIDE 10mm f/5.6"}, + {6553, "Voigtlander ULTRA WIDE-HELIAR 12mm f/5.6 III"}, + {6553, "Voigtlander MACRO APO-LANTHAR 65mm f/2 Aspherical"}, + {6553, "Voigtlander NOKTON 40mm f/1.2 Aspherical"}, {6553, "Zeiss Touit 12mm f/2.8"}, {6553, "Zeiss Touit 32mm f/1.8"}, {6553, "Zeiss Touit 50mm f/2.8 Macro"}, @@ -1029,6 +1043,7 @@ public: {65535, "Sony E 20mm f/2.8"}, {65535, "Sony E 35mm f/1.8 OSS"}, {65535, "Sony E PZ 18-105mm f/4 G OSS"}, + {65535, "Sony FE 12-24mm f/4 G"}, {65535, "Sony FE 90mm f/2.8 Macro G OSS"}, {65535, "Sony E 18-50mm f/4-5.6"}, {65535, "Sony E PZ 18-200mm f/3.5-6.3 OSS"}, @@ -1042,6 +1057,7 @@ public: {65535, "Sony FE 28mm f/2"}, {65535, "Sony FE PZ 28-135mm f/4 G OSS"}, {65535, "Sony FE 100mm f/2.8 STF GM OSS"}, + {65535, "Sony E PZ 18-110mm f/4 G OSS"}, {65535, "Sony FE 24-70mm f/2.8 GM"}, {65535, "Sony FE 50mm f/1.4 ZA"}, {65535, "Sony FE 85mm f/1.4 GM"}, @@ -1049,17 +1065,27 @@ public: {65535, "Sony FE 21mm f/2.8 (SEL28F20 + SEL075UWC)"}, {65535, "Sony FE 16mm f/3.5 Fisheye (SEL28F20 + SEL057FEC)"}, {65535, "Sony FE 70-300mm f/4.5-5.6 G OSS"}, + {65535, "Sony FE 100-400mm f/4.5-5.6 GM OSS"}, {65535, "Sony FE 70-200mm f/2.8 GM OSS"}, + {65535, "Sony FE 16-35mm f/2.8 GM"}, {65535, "Sony FE 70-200mm f/2.8 GM OSS + 1.4X Teleconverter"}, {65535, "Sony FE 70-200mm f/2.8 GM OSS + 2X Teleconverter"}, + {65535, "Sony FE 100-400mm f/4.5-5.6 GM OSS + 1.4X Teleconverter"}, + {65535, "Sony FE 100-400mm f/4.5-5.6 GM OSS + 2X Teleconverter"}, {65535, "Samyang AF 50mm f/1.4 FE"}, {65535, "Samyang AF 14mm f/2.8 FE"}, + {65535, "Samyang AF 35mm f/2.8 FE"}, {65535, "Sigma 19mm f/2.8 [EX] DN"}, {65535, "Sigma 30mm f/2.8 [EX] DN"}, {65535, "Sigma 60mm f/2.8 DN"}, - {65535, "Sigma 30mm f/1.4 DC DN | C 016"}, + {65535, "Sigma 30mm f/1.4 DC DN | C"}, {65535, "Tamron 18-200mm f/3.5-6.3 Di III VC"}, {65535, "Tokina Firin 20mm f/2 FE MF"}, + {65535, "Voigtlander SUPER WIDE-HELIAR 15mm f/4.5 III"}, + {65535, "Voigtlander HELIAR-HYPER WIDE 10mm f/5.6"}, + {65535, "Voigtlander ULTRA WIDE-HELIAR 12mm f/5.6 III"}, + {65535, "Voigtlander MACRO APO-LANTHAR 65mm f/2 Aspherical"}, + {65535, "Voigtlander NOKTON 40mm f/1.2 Aspherical"}, {65535, "Zeiss Touit 12mm f/2.8"}, {65535, "Zeiss Touit 32mm f/1.8"}, {65535, "Zeiss Touit 50mm f/2.8 Macro"}, @@ -1121,7 +1147,7 @@ public: SALensID2Interpreter () { choices.insert (p_t (0, "Unknown E-mount lens or other lens")); - choices.insert (p_t (1, "Sony LA-EA1 Adapter")); + choices.insert (p_t (1, "Sony LA-EA1 or Sigma MC-11 Adapter")); choices.insert (p_t (2, "Sony LA-EA2 Adapter")); choices.insert (p_t (3, "Sony LA-EA3 Adapter")); choices.insert (p_t (6, "Sony LA-EA4 Adapter")); @@ -1148,6 +1174,7 @@ public: choices.insert (p_t (32798, "Sony E 20mm f/2.8")); choices.insert (p_t (32799, "Sony E 35mm f/1.8 OSS")); choices.insert (p_t (32800, "Sony E PZ 18-105mm f/4 G OSS")); + choices.insert (p_t (32801, "Sony FE 12-24mm f/4 G")); choices.insert (p_t (32802, "Sony FE 90mm f/2.8 Macro G OSS")); choices.insert (p_t (32803, "Sony E 18-50mm f/4-5.6")); choices.insert (p_t (32807, "Sony E PZ 18-200mm f/3.5-6.3 OSS")); @@ -1161,6 +1188,7 @@ public: choices.insert (p_t (32816, "Sony FE 28mm f/2")); choices.insert (p_t (32817, "Sony FE PZ 28-135mm f/4 G OSS")); choices.insert (p_t (32819, "Sony FE 100mm f/2.8 STF GM OSS")); + choices.insert (p_t (32820, "Sony E PZ 18-110mm f/4 G OSS")); choices.insert (p_t (32821, "Sony FE 24-70mm f/2.8 GM")); choices.insert (p_t (32822, "Sony FE 50mm f/1.4 ZA")); choices.insert (p_t (32823, "Sony FE 85mm f/1.4 GM")); @@ -1168,11 +1196,15 @@ public: choices.insert (p_t (32826, "Sony FE 21mm f/2.8 (SEL28F20 + SEL075UWC)")); choices.insert (p_t (32827, "Sony FE 16mm f/3.5 Fisheye (SEL28F20 + SEL057FEC)")); choices.insert (p_t (32828, "Sony FE 70-300mm f/4.5-5.6 G OSS")); + choices.insert (p_t (32829, "Sony FE 100-400mm f/4.5-5.6 GM OSS")); choices.insert (p_t (32830, "Sony FE 70-200mm f/2.8 GM OSS")); - choices.insert (p_t (33002, "Sigma 85mm f/1.4 DG HSM | A 016 (+ Metabones Ver.50)")); + choices.insert (p_t (32831, "Sony FE 16-35mm f/2.8 GM")); + choices.insert (p_t (33002, "Sigma 85mm f/1.4 DG HSM | A (+ Metabones Ver.50)")); choices.insert (p_t (33072, "Sony FE 70-200mm f/2.8 GM OSS + 1.4X Teleconverter")); choices.insert (p_t (33073, "Sony FE 70-200mm f/2.8 GM OSS + 2X Teleconverter")); choices.insert (p_t (33076, "Sony FE 100mm f/2.8 STF GM OSS (macro mode)")); + choices.insert (p_t (33077, "Sony FE 100-400mm f/4.5-5.6 GM OSS + 1.4X Teleconverter")); + choices.insert (p_t (33078, "Sony FE 100-400mm f/4.5-5.6 GM OSS + 2X Teleconverter")); choices.insert (p_t (49201, "Zeiss Touit 12mm f/2.8")); choices.insert (p_t (49202, "Zeiss Touit 32mm f/1.8")); choices.insert (p_t (49203, "Zeiss Touit 50mm f/2.8 Macro")); @@ -1184,24 +1216,26 @@ public: choices.insert (p_t (49233, "Zeiss Loxia 35mm f/2")); choices.insert (p_t (49234, "Zeiss Loxia 21mm f/2.8")); choices.insert (p_t (49235, "Zeiss Loxia 85mm f/2.4")); - choices.insert (p_t (50480, "Sigma 30mm f/1.4 DC DN | C 016")); - choices.insert (p_t (50481, "Sigma 50mm f/1.4 DG HSM | A 014 + MC-11")); - choices.insert (p_t (50482, "Sigma 18-300mm f/3.5-6.3 DC MACRO OS HSM | C 014 + MC-11")); - choices.insert (p_t (50483, "Sigma 18-35mm f/1.8 DC HSM | A 013 + MC-11")); - choices.insert (p_t (50484, "Sigma 24-35mm f/2 DG HSM | A 015 + MC-11")); - choices.insert (p_t (50486, "Sigma 150-600mm f/5-6.3 DG OS HSM | C 015 + MC-11")); - choices.insert (p_t (50487, "Sigma 20mm f/1.4 DG HSM | A 015 + MC-11")); - choices.insert (p_t (50488, "Sigma 35mm f/1.4 DG HSM | A 012 + MC-11")); - choices.insert (p_t (50489, "Sigma 150-600mm f/5-6.3 DG OS HSM | S 014 + MC-11")); - choices.insert (p_t (50490, "Sigma 120-300mm f/2.8 DG OS HSM | S 013 + MC-11")); - choices.insert (p_t (50492, "Sigma 24-105mm f/4 DG OS HSM | A 013 + MC-11")); - choices.insert (p_t (50493, "Sigma 17-70mm f/2.8-4 DC MACRO OS HSM | C 013 + MC-11")); - choices.insert (p_t (50495, "Sigma 50-100mm f/1.8 DC HSM | A 016 + MC-11")); + choices.insert (p_t (50480, "Sigma 30mm f/1.4 DC DN | C")); + choices.insert (p_t (50481, "Sigma 50mm f/1.4 DG HSM | A + MC-11")); + choices.insert (p_t (50482, "Sigma 18-300mm f/3.5-6.3 DC MACRO OS HSM | C + MC-11")); + choices.insert (p_t (50483, "Sigma 18-35mm f/1.8 DC HSM | A + MC-11")); + choices.insert (p_t (50484, "Sigma 24-35mm f/2 DG HSM | A + MC-11")); + choices.insert (p_t (50486, "Sigma 150-600mm f/5-6.3 DG OS HSM | C + MC-11")); + choices.insert (p_t (50487, "Sigma 20mm f/1.4 DG HSM | A + MC-11")); + choices.insert (p_t (50488, "Sigma 35mm f/1.4 DG HSM | A + MC-11")); + choices.insert (p_t (50489, "Sigma 150-600mm f/5-6.3 DG OS HSM | S + MC-11")); + choices.insert (p_t (50490, "Sigma 120-300mm f/2.8 DG OS HSM | S + MC-11")); + choices.insert (p_t (50492, "Sigma 24-105mm f/4 DG OS HSM | A + MC-11")); + choices.insert (p_t (50493, "Sigma 17-70mm f/2.8-4 DC MACRO OS HSM | C + MC-11")); + choices.insert (p_t (50495, "Sigma 50-100mm f/1.8 DC HSM | A + MC-11")); choices.insert (p_t (50992, "Voigtlander SUPER WIDE-HELIAR 15mm f/4.5 III")); choices.insert (p_t (50993, "Voigtlander HELIAR-HYPER WIDE 10mm f/5.6")); choices.insert (p_t (50994, "Voigtlander ULTRA WIDE-HELIAR 12mm f/5.6 III")); + choices.insert (p_t (50995, "Voigtlander MACRO APO-LANTHAR 65mm f/2 Aspherical")); choices.insert (p_t (50996, "Voigtlander NOKTON 40mm f/1.2 Aspherical")); - choices.insert (p_t (51505, "Samyang AF 14mm f/2.8 FE")); + choices.insert (p_t (51505, "Samyang AF 14mm f/2.8 FE or Samyang AF 35mm f/2.8 FE")); + choices.insert (p_t (51505, "Samyang AF 35mm f/2.8 FE")); } virtual std::string toString (Tag* t) diff --git a/tools/generateLensList b/tools/generateRtexifUpdates similarity index 66% rename from tools/generateLensList rename to tools/generateRtexifUpdates index 13738a359..95a32c088 100755 --- a/tools/generateLensList +++ b/tools/generateRtexifUpdates @@ -1,24 +1,24 @@ #!/usr/bin/env bash # This Bash4 script generates lens ID and other parameter lists for rtexif/*.cc -# files using ExifTool. It uses xmlstarlet to parse ExifTool's output. +# using ExifTool. It uses xmlstarlet to parse ExifTool's output. # # Run the script from the project root: -# ./tools/generateLensList +# ./tools/generateRtexifUpdates # -# Manually replace old code in rtexif/* with new from /tmp/rt-generateLensList/* +# Manually replace old code in rtexif/* with new from /tmp/rt-generateRtexifUpdates/* # # Blame DrSlony # Please report bugs or enhancements to https://github.com/Beep6581/RawTherapee -et="$HOME/programs/code-exiftool/exiftool" +et="$HOME/programs/Image-ExifTool-10.61/exiftool" hash "$et" 2>/dev/null || { echo >&2 "ExifTool not found, install it first."; exit 1; } hash xmlstarlet 2>/dev/null || { echo >&2 "XMLStarlet not found, install it first."; exit 1; } unset cam cams -tmpdir="/tmp/rt-generateLensList" +tmpdir="/tmp/rt-generateRtexifUpdates" printf '%s\n' "ExifTool version: $("$et" -ver)" "" "XMLStarlet version: $(xmlstarlet --version)" | sed 's/^/# /' @@ -30,15 +30,18 @@ mkdir -p "$tmpdir" || { printf '%s\n' "Error creating $tmpdir" ""; exit 1; } echo # Canon -printf '%s\n' "Saving ${tmpdir}/canon" -xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensType']/values/key" -v "concat(@id,' ',val)" -n < <("$et" -listx -canon:all) | sort -fuV > "${tmpdir}/canon" -sed -r -i -e '/-1\tn\/a/d' -e 's/([0-9]+)[0-9.]*\t/\1, "/' -e 's/^/ choices.insert(p_t(/' -e 's/$/"));/' -e 's| F/([0-9]+)| f/\1|' "${tmpdir}/canon" +printf '%s\n' "Saving ${tmpdir}/canon_lenses" +xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensType']/values/key" -v "concat(@id,' ',val)" -n < <("$et" -listx -canon:all) | sort -fuV > "${tmpdir}/canon_lenses" +sed -r -i -e '/-1\tn\/a/d' -e 's/([0-9]+)[0-9.]*\t/\1, "/' -e 's/^/ choices.insert (p_t (/' -e 's/$/"));/' -e 's| F/([0-9]+)| f/\1|' "${tmpdir}/canon_lenses" # xmlstarlet sel -T -t -m "taginfo/table/tag[@name='EasyMode']/values/key" -v "concat(@id,' ',val)" -n < <(exiftool -listx -canon:all) | sed -r -e '/-1\tn\/a/d' -e 's/([0-9]+)[0-9.]*\t/\1] = "/' -e 's/^/ choices[/' -e 's/$/";/' +printf '%s\n' "Saving ${tmpdir}/canon_cameras" +xmlstarlet sel -T -t -m "taginfo/table/tag[@name='CanonModelID']/values/key" -v "concat(@id,' ',val)" -n < <("$et" -listx -canon:all) | sort -fuV > "${tmpdir}/canon_cameras" +sed -r -i -e 's/^/ choices[/' -e 's/\t/] = "/' -e 's/$/";/' "${tmpdir}/canon_cameras" # Nikon LensIDs are composite tags printf '%s\n' "Saving ${tmpdir}/nikon" xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensID']/values/key" -v "concat(@id,' ',val)" -n < <("$et" -listx -composite:all) > "${tmpdir}/nikon" -sed -r -i -e '/^... /d' -e 's/^/ {"/' -e 's/([A-F0-9]+)[A-F0-9.]*\t/\1", "/' -e 's/$/"},/' -e 's|(.* ")(.*) F([0-9]+)|\1\2 f/\3|' -e 's| F/([0-9]+)| f/\1|' "${tmpdir}/nikon" +sed -r -i -e '/^... /d' -e 's/^/ {"/' -e 's/([A-F0-9]+)[A-F0-9.]*\t/\1", "/' -e 's/$/"},/' -e 's|(.* ")(.*) F([0-9]+)|\1\2 f/\3|' -e 's| F/([0-9]+)| f/\1|' "${tmpdir}/nikon" # Olympus printf '%s\n' "Saving ${tmpdir}/olympus" @@ -48,7 +51,7 @@ sed -r -i -e '/0 00 00\tNone/d' -e 's/^/ lenses["0/' -e 's/\t/"] = "/' -e # Pentax printf '%s\n' "Saving ${tmpdir}/pentax" xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensType']/values/key" -v "concat(@id,' ',val)" -n < <("$et" -listx -pentax:all) | sort -fuV > "${tmpdir}/pentax" -sed -r -i -e 's/^/ choices.insert(p_t(256 * /' -e 's/([0-9]+) ([0-9]+)([0-9.]*)/\1 + \2/' -e 's/\t/, "/' -e 's/$/"));/' -e 's| F([0-9]+)| f/\1|' "${tmpdir}/pentax" +sed -r -i -e 's/^/ choices.insert (p_t (256 * /' -e 's/([0-9]+) ([0-9]+)([0-9.]*)/\1 + \2/' -e 's/\t/, "/' -e 's/$/"));/' -e 's| F([0-9]+)| f/\1|' "${tmpdir}/pentax" # Sony printf '%s\n' "Saving ${tmpdir}/sony" @@ -56,6 +59,6 @@ xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensType']/values/key" -v "con # Sony has more lenses under the LensType2 tag printf '%s\n' "Saving ${tmpdir}/sony-lenstype2" xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensType2']/values/key" -v "concat(@id,' ',val)" -n < <("$et" -listx -sony:all) | sort -fuV > "${tmpdir}/sony-lenstype2" -sed -r -i -e 's/^/ {/' -e 's/([0-9]+)[0-9.]*\t/\1, "/' -e 's/$/"},/' -e 's| F([0-9]+)| f/\1|g' "${tmpdir}/sony" -sed -r -i -e '/255\tTamron Lens (255)/d' -e 's/([0-9]+)[0-9.]*\t/\1, "/' -e 's/^/ choices.insert(p_t(/' -e 's/$/"));/' -e 's| F([0-9]+)| f/\1|g' "${tmpdir}/sony-lenstype2" +sed -r -i -e 's/^/ {/' -e 's/([0-9]+)[0-9.]*\t/\1, "/' -e 's/$/"},/' -e 's| F([0-9]+)| f/\1|g' "${tmpdir}/sony" +sed -r -i -e '/255\tTamron Lens (255)/d' -e 's/([0-9]+)[0-9.]*\t/\1, "/' -e 's/^/ choices.insert (p_t (/' -e 's/$/"));/' -e 's| F([0-9]+)| f/\1|g' "${tmpdir}/sony-lenstype2" From 18f09dcbee6dfd466022e13eb80f3882dd2076ce Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sat, 23 Sep 2017 16:20:50 +0200 Subject: [PATCH 10/11] Fix wrong thumbnails for Canon G3 and G5, fixes #4000, fixes #4099 --- rtengine/rawimage.cc | 13 +++++++++---- rtengine/rawimage.h | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/rtengine/rawimage.cc b/rtengine/rawimage.cc index f36e798d9..de392623d 100644 --- a/rtengine/rawimage.cc +++ b/rtengine/rawimage.cc @@ -112,7 +112,10 @@ void RawImage::get_colorsCoeff( float *pre_mul_, float *scale_mul_, float *cblac } } - if (data && (this->get_cam_mul(0) == -1 || forceAutoWB)) { + if (this->get_cam_mul(0) == -1 || forceAutoWB) { + if(!data) { // this happens only for thumbnail creation when get_cam_mul(0) == -1 + compress_image(0, false); + } memset(dsum, 0, sizeof dsum); if (this->isBayer()) { @@ -673,7 +676,7 @@ int RawImage::loadRaw (bool loadData, unsigned int imageNum, bool closeFile, Pro return 0; } -float** RawImage::compress_image(int frameNum) +float** RawImage::compress_image(int frameNum, bool freeImage) { if( !image ) { return nullptr; @@ -757,8 +760,10 @@ float** RawImage::compress_image(int frameNum) } } - free(image); // we don't need this anymore - image = nullptr; + if(freeImage) { + free(image); // we don't need this anymore + image = nullptr; + } return data; } diff --git a/rtengine/rawimage.h b/rtengine/rawimage.h index c2cdcb6ec..b8a45d708 100644 --- a/rtengine/rawimage.h +++ b/rtengine/rawimage.h @@ -121,7 +121,7 @@ public: { return image; } - float** compress_image(int frameNum); // revert to compressed pixels format and release image data + float** compress_image(int frameNum, bool freeImage = true); // revert to compressed pixels format and release image data float** data; // holds pixel values, data[i][j] corresponds to the ith row and jth column unsigned prefilters; // original filters saved ( used for 4 color processing ) unsigned int getFrameCount() const { return is_raw; } From 4b1adc2178a769ac1cb0c6b6a3b1c208adc9224e Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Sun, 24 Sep 2017 00:14:08 +0200 Subject: [PATCH 11/11] RT-Theme: radio and check button fix --- rtdata/themes/RawTherapee-GTK3-20_.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtdata/themes/RawTherapee-GTK3-20_.css b/rtdata/themes/RawTherapee-GTK3-20_.css index 398bb97d4..e0e6fe096 100644 --- a/rtdata/themes/RawTherapee-GTK3-20_.css +++ b/rtdata/themes/RawTherapee-GTK3-20_.css @@ -31,7 +31,7 @@ scrollbar:not(.overlay-indicator):hover { color: #666666; } -.view:selected { +.view:selected:not(check):not(radio) { color: #262626; background-color: #AAAAAA }