CA_correct_RT(), minor change

This commit is contained in:
heckflosse
2018-09-05 20:33:48 +02:00
parent ac1db99220
commit 5fcb64634d

View File

@@ -27,6 +27,7 @@
#include "rawimagesource.h"
#include "rt_math.h"
#include "median.h"
//#define BENCHMARK
#include "StopWatch.h"
namespace {
@@ -125,6 +126,7 @@ float* RawImageSource::CA_correct_RT(
bool freeBuffer
)
{
BENCHFUN
// multithreaded and vectorized by Ingo Weyrich
constexpr int ts = 128;
constexpr int tsh = ts / 2;
@@ -178,13 +180,8 @@ float* RawImageSource::CA_correct_RT(
? std::max<size_t>(autoIterations, 1)
: 1;
for (size_t it = 0; it < iterations && processpasstwo; ++it) {
float blockave[2][2] = {};
float blocksqave[2][2] = {};
float blockdenom[2][2] = {};
float blockvar[2][2];
const bool fitParamsSet = fitParamsTransfer && fitParamsIn;
if(autoCA && fitParamsSet && iterations < 2) {
const bool fitParamsSet = fitParamsTransfer && fitParamsIn && iterations < 2;
if(autoCA && fitParamsSet) {
// use stored parameters
int index = 0;
for(int c = 0; c < 2; ++c) {
@@ -195,6 +192,13 @@ float* RawImageSource::CA_correct_RT(
}
}
}
for (size_t it = 0; it < iterations && processpasstwo; ++it) {
float blockave[2][2] = {};
float blocksqave[2][2] = {};
float blockdenom[2][2] = {};
float blockvar[2][2];
//order of 2d polynomial fit (polyord), and numpar=polyord^2
int polyord = 4, numpar = 16;