dual demosaic auto contrast: fix segfault when falling back to zero, #4866
This commit is contained in:
@@ -286,6 +286,13 @@ void buildBlendMask(float** luminance, float **blend, int W, int H, float &contr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(contrastThreshold == 0.f) {
|
||||||
|
for(int j = 0; j < H; ++j) {
|
||||||
|
for(int i = 0; i < W; ++i) {
|
||||||
|
blend[j][i] = amount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#pragma omp parallel
|
#pragma omp parallel
|
||||||
#endif
|
#endif
|
||||||
@@ -347,6 +354,7 @@ void buildBlendMask(float** luminance, float **blend, int W, int H, float &contr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int calcContrastThreshold(float** luminance, float **blend, int W, int H) {
|
int calcContrastThreshold(float** luminance, float **blend, int W, int H) {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user