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
|
||||
#pragma omp parallel
|
||||
#endif
|
||||
@@ -346,6 +353,7 @@ void buildBlendMask(float** luminance, float **blend, int W, int H, float &contr
|
||||
gaussianBlur(blend, blend, W, H, 2.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int calcContrastThreshold(float** luminance, float **blend, int W, int H) {
|
||||
|
Reference in New Issue
Block a user