Done.
https://github.com/CodeFHD/LuxCore/blob ... l_oidn.cpp
https://github.com/CodeFHD/LuxCore/blob ... tel_oidn.h
https://github.com/CodeFHD/LuxCore/blob ... mparse.cpp
I have included another keyword for testing. If you set film.imagepipelines.[...].oidnbench = 1 in the render.cfg, it will first execute the tiled and then the single OIDN. This makes it easier to compare performance for large renders without having to re-render everything. I also added timing counters over the entire function, not only each filter execution to include the buffer-writing and overlap computation.
Two quick performance meaurements on the LuxMark-Hotel scene:
At 3840x2160 (not exceeding my RAM):
tiled OIDN 7.5s, single OIDN 5.5s. For comparison, the render-time to 20 Samples was 270s on an i5-9600K (0.7% penalty)
At 7680x4320 (exceeding my RAM):
tiled OIDN 26s, single OIDN 74s. For comparison, the render-time to 20 Samples was 1185s on an i5-9600K (4% gain)
Are there any more sugegstions for now?
P.S.: It seems to me that the line that caused OIDN to be executed twice was:
periodicsave.film.outputs.period = 600
which appears to be executed even if the total rendering time is below 600s.