diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index c2c2d0838..ffbae35f2 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -800,10 +800,11 @@ int RawImageSource::load (Glib::ustring fname, bool batch) { // check if it is an olympus E camera, if yes, compute G channel pre-compensation factors if (settings->greenthresh || (((idata->getMake().size()>=7 && idata->getMake().substr(0,7)=="OLYMPUS" && idata->getModel()[0]=='E') || (idata->getMake().size()>=9 && idata->getMake().substr(0,7)=="Panasonic")) && settings->demosaicMethod!="vng4" && ri->filters) ) { // global correction - int ng1=0, ng2=0; - double avgg1=0, avgg2=0; -//#pragma omp parallel for //TODO This causes grid patterns in some Olympus raw files - for (int i=border; idata[i][j] = CLIP(ri->data[i][j] * (i%2 ? corrg2 : corrg1)); + if (ISGREEN(ri,i,j)) { + unsigned short currData; + currData = (unsigned short)(ri->data[i][j] * (i%2 ? corrg2 : corrg1)); + ri->data[i][j] = CLIP(currData); + } } - + // local correction in a 9x9 box if (settings->greenthresh) {