From 13abcd0f6c5519744cd6acb523c2a1a86bfa4847 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sun, 28 Oct 2018 20:37:34 +0100 Subject: [PATCH] vng4 demosaic: another very small speedup, #4633 --- rtengine/rawimagesource.h | 2 +- rtengine/vng4_demosaic_RT.cc | 104 +++++++++++++++-------------------- 2 files changed, 46 insertions(+), 60 deletions(-) diff --git a/rtengine/rawimagesource.h b/rtengine/rawimagesource.h index f78a4121b..8ee403ea2 100644 --- a/rtengine/rawimagesource.h +++ b/rtengine/rawimagesource.h @@ -269,7 +269,7 @@ protected: void nodemosaic(bool bw); void eahd_demosaic(); void hphd_demosaic(); - void vng4_demosaic(const array2D &rawData, array2D &red, array2D &green, array2D &blue, bool keepGreens = false); + void vng4_demosaic(const array2D &rawData, array2D &red, array2D &green, array2D &blue); void ppg_demosaic(); void jdl_interpolate_omp(); void igv_interpolate(int winw, int winh); diff --git a/rtengine/vng4_demosaic_RT.cc b/rtengine/vng4_demosaic_RT.cc index 5ed0b35c7..ed3ef8802 100644 --- a/rtengine/vng4_demosaic_RT.cc +++ b/rtengine/vng4_demosaic_RT.cc @@ -31,7 +31,7 @@ namespace rtengine { #define fc(row,col) (prefilters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3) -void RawImageSource::vng4_demosaic (const array2D &rawData, array2D &red, array2D &green, array2D &blue, bool keepGreens) +void RawImageSource::vng4_demosaic (const array2D &rawData, array2D &red, array2D &green, array2D &blue) { BENCHFUN const signed short int *cp, terms[] = { @@ -227,67 +227,53 @@ void RawImageSource::vng4_demosaic (const array2D &rawData, array2D firstRow) { interpolate_row_rb_mul_pp(rawData, red[row - 1], blue[row - 1], green[row - 2], green[row - 1], green[row], row - 1, 1.0, 1.0, 1.0, 0, W, 1);