i noticed that automatic lens correction (currently DK 5.5) is very slow and uses only one CPU core. When doing this in Gimp (lensfun-plugin), its way faster and uses all cores. This is in Manjaro on a Core-i5 So please enable all cores (port to QtConcurrent). Thanks
Created attachment 105056 [details] Parallel processing of stage 1,2,3 of Lensfun filter. The patch attached process in parallel all filters used with Lensfun interface. The image is cut as portions, depending of CPU available and forked on each core with QtConcurent. It still certainly a race condition at init. Sometime the final redering is corrupted at the first time, but changing a settings give a good result finaly. So the main changes are here, but a polish is required before to be applied on git/master. Gilles Caulier
Maik, If you can reproduce the problem, please take a look in code. Personalty, i don't see the dysfunction. Perhaps the problem is located on front of filter, when the GUI scan metadata to found right settings from image... Gilles
I identified that Geometry correction introduce the problem at first time when option is only selected. After to select Distortion, for ex, all is fine. Deselecting Distortion and only select Geometry give a good result. Gilles
Created attachment 105057 [details] Screenshot of wrong result at init with Geometry correction selected.
Created attachment 105058 [details] Screenshot of good result after to apply Distorsion + Geometry corrections, and finally let's Geometry alone selected...
Created attachment 105059 [details] Test JPEG image to reproduce the dysfunction.
Yes, I can confirm the dysfunction. Another thing is the chromatic aberration correction. Does not look correct either. I'm looking at it tonight. Maik
Created attachment 105063 [details] lensfunfilter.patch fix vignetting / color correction and distortion / geometry corrections. Maik
Comment on attachment 105063 [details] lensfunfilter.patch You have right Maik, This version of the patch fix the problem. I forget to catch loop variable at end of last filter stage. So you can apply this patch over git/master now, and close this entry. Thanks Gilles
Git commit 0238f8a8234154b3d4c8877de94b72505f55ad7d by Maik Qualmann. Committed on 17/04/2017 at 20:57. Pushed by mqualmann into branch 'master'. use QtConcurrent to parallelize the Lensfun filter and use all CPU cores FIXED-IN: 5.6.0 M +2 -1 NEWS M +119 -87 libs/dimg/filters/lens/lensfunfilter.cpp M +3 -0 libs/dimg/filters/lens/lensfunfilter.h https://commits.kde.org/digikam/0238f8a8234154b3d4c8877de94b72505f55ad7d