Auto CA correction settings in .PP3 files

I am currently doing some benchmarking of RAW development tools, and I was trying to run RT in batch mode with Auto-CA enabled. Here is the .PP3 file that I have been using:

neutral-noicm-cacorr.pp3 (9.9 KB)

I created it by opening a RAW image, setting the initial profile to neutral, then setting the ICC and RAW CA parameter as follows:

1652

and then saving the processing profile to disk.

Looking into the PP3 file, I see the following:

[RAW]
DarkFrame=/szeva
DarkFrameAuto=false
FlatFieldFile=/szeva
FlatFieldAutoSelect=false
FlatFieldBlurRadius=32
FlatFieldBlurType=Area Flatfield
FlatFieldAutoClipControl=false
FlatFieldClipControl=false
CA=true
CARed=0
CABlue=0
HotPixelFilter=false
DeadPixelFilter=false
HotDeadPixelThresh=100
PreExposure=1
PrePreserv=0

CA is set to true but nowhere the Auto-CA is specified. Also, when processing an image with this PP3 like this

rawtherapee-cli -q -p neutral-noicm-cacorr.pp3 -t -Y -o test.tif -c 810_3438-UNCOMPRESSED-14-bit.NEF  

the program does not seem to perform the automatic calculation of the CA correction parameters, and the processing time is very close to the one with CA=false. On the other hand, when enabling the auto-CA in the UI, one can clearly see the cursor progress during the CA processing, taking it seems at least half of what is needed by the AmAzE demosaicing…

I am using version 5.2 under Linux, installed from the myway PPA.

@Carmelo_DrRaw Please try with this raw. If there is no difference between auto-ca enabled and disabled, then there is a bug. But I bet there is none :wink:

Left is without, right with raw auto-ca-correction

That means auto correction is enabled. The correction parameters are per tile and not written into the pp3.

Edit:

CA=true means raw ca auto-correction is enabled and CARed and CABlue are ignored.
CA=false means the CARed and CaBlue values are used for the whole raw, except if both are zero, then raw ca correction is skipped.

I just tested full processing (in rt queue) of amsterdam.pef (10 MP) on my 8-core. Neutral needs 1270 ms while neutral + auto-ca-correction needs 1330 ms.

I checked, and indeed there is a difference. What puzzles me a bit is that if I export the file directly from the UI (export button below preview) I can clearly see the progress bar advancing during the automatic CA correction, for a time which is more than 1/10 of the Amaze demosaicing phase… however, if I use rawtherapee-cli there is little difference in processing time with and without auto-CA.

How I can print the time required to process a file in the queue?

Thanks!

Currently there is no timing code for queue processing. But you can add it using this patch:

diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc
index f128c145..68f78fdf 100644
--- a/rtengine/simpleprocess.cc
+++ b/rtengine/simpleprocess.cc
@@ -30,7 +30,8 @@
 #include "../rtgui/multilangmgr.h"
 #include "mytime.h"
 #undef THREAD_PRIORITY_NORMAL
-
+#define BENCHMARK
+#include "StopWatch.h"
 namespace rtengine
 {
 extern const Settings* settings;
@@ -78,6 +79,7 @@ public:
 private:
     Image16 *normal_pipeline()
     {
+        BENCHFUN
         if (!stage_init()) {
             return nullptr;
         }

Thanks! I’ll publish some initial benchmark comparison a bit later.

On a side note: do you have an idea of the gain introduced in RT by the SSE2 optimizations for Amaze?

I just tested amaze demosaic with and without SSE2 code using a 100MP file;

with SSE2 code ~1400 ms
without SSE2 code ~3300 ms

Thanks! Very impressive…