From d2366e633c61792fc1d5ae2d7caf76de5a2a0005 Mon Sep 17 00:00:00 2001 From: rom9 <4711834+rom9@users.noreply.github.com> Date: Sun, 9 Jun 2019 13:09:29 +0200 Subject: [PATCH] Enabled bad pixels interpolation for ST_XTRANS after upstream fix c0a033e --- rtengine/filmnegativeproc.cc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/rtengine/filmnegativeproc.cc b/rtengine/filmnegativeproc.cc index dba623ab4..d2a798abe 100644 --- a/rtengine/filmnegativeproc.cc +++ b/rtengine/filmnegativeproc.cc @@ -307,7 +307,21 @@ void RawImageSource::filmNegativeProcess(const procparams::FilmNegativeParams &p } else if(ri->getSensorType() == ST_FUJI_XTRANS) { - // TODO +#ifdef _OPENMP + #pragma omp parallel for reduction(+:totBP) schedule(dynamic,16) +#endif + + for(int i = 0; i < H; i++) + for(int j = 0; j < W; j++) { + if (rawData[i][j] >= MAX_OUT_VALUE) { + bitmapBads.set(j, i); + totBP++; + } + } + + if (totBP > 0) { + interpolateBadPixelsXtrans( bitmapBads ); + } }