Demosaicing method used for the preview at <100% zoom, issue 2664

This commit is contained in:
DrSlony
2015-02-15 19:47:03 +01:00
parent de22b61e98
commit ec2f378bbf
7 changed files with 84 additions and 75 deletions

View File

@@ -136,8 +136,12 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) {
// Tells to the ImProcFunctions' tools what is the preview scale, which may lead to some simplifications
ipf.setScale (scale);
bool highDetailNeeded = false;
if (options.prevdemo==PD_Sidecar) highDetailNeeded = true; //i#2664
else highDetailNeeded = (todo & M_HIGHQUAL);
// Check if any detail crops need high detail. If not, take a fast path short cut
bool highDetailNeeded = (todo & M_HIGHQUAL);
if (!highDetailNeeded) {
for (size_t i=0; i<crops.size(); i++)
if (crops[i]->get_skip() == 1 ) { // skip=1 -> full resolution
@@ -158,9 +162,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) {
rp.bayersensor.ccSteps = 0;
rp.xtranssensor.ccSteps = 0;
/* Commented out the following line so that the hot pixel filter works at <100% zoom levels too, to fix issue 2535.
* rp.deadPixelFilter = rp.hotPixelFilter = false;
*/
//rp.deadPixelFilter = rp.hotPixelFilter = false;
}
progress ("Applying white balance, color correction & sRGB conversion...",100*readyphase/numofphases);
@@ -293,13 +295,13 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) {
if((noiseLCurve || noiseCCurve) && denoiseParams.enabled && (scale==1)){//only allocate memory if enabled and scale=1
// we only need image reduced to 1/4 here
calclum = new Imagefloat ((pW+1)/2, (pH+1)/2);//for luminance denoise curve
for(int ii=0;ii<pH;ii+=2){
for(int ii=0;ii<pH;ii+=2){
for(int jj=0;jj<pW;jj+=2){
calclum->r(ii>>1,jj>>1) = orig_prev->r(ii,jj);
calclum->g(ii>>1,jj>>1) = orig_prev->g(ii,jj);
calclum->b(ii>>1,jj>>1) = orig_prev->b(ii,jj);
}
}
}
imgsrc->convertColorSpace(calclum, params.icm, currWB, params.raw);//claculate values after colorspace conversion
}
//always enabled to calculated auto Chroma