Fixed bug (uninitialized values) in ImProcFunctions::Median_Denoise
The code was not copying border pixels from medianOut to dst, leading to the use of uninitialized values. This was not visible in RT because Median_Denoise was always called with src == dst, so not copying the border causes no harm
This commit is contained in:
@@ -366,9 +366,8 @@ void ImProcFunctions::Median_Denoise(float **src, float **dst, const int width,
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for num_threads(numThreads) if (numThreads>1)
|
||||
#endif
|
||||
|
||||
for (int i = border; i < height - border; ++i) {
|
||||
for (int j = border; j < width - border; ++j) {
|
||||
for (int i = 0; i < height; ++i) {
|
||||
for (int j = 0; j < width; ++j) {
|
||||
dst[i][j] = medianOut[i][j];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user