RenderKit / oidn

Intel® Open Image Denoise library
https://www.openimagedenoise.org/
Apache License 2.0
1.79k stars 164 forks source link

progressMonitorFunction slow to interrupt filter #240

Closed fluidray closed 1 week ago

fluidray commented 3 weeks ago

In recent versions of OIDN and using the CPU device, returning false from the progress monitor function takes a while to interrupt the filter. I noticed that the problem is more pronounced when executing the filter with cleanAux=true and high quality mode, but it also present when pre filtering the albedo and normal buffers. For real-time editing applications it would be necessary to interrupt the filter quickly to keep interactivity.

atafra commented 3 weeks ago

Unfortunately this isn't enough information to debug this issue. I did a quick check but I don't see anything unusual. Denoising should stop very soon after returning false in the progress callback. There is some additional delay possible since v2.3 but this should be minor, and it shouldn't depend at all on cleanAux or pre-filtering. Perhaps this additional delay is what you're experiencing but it shouldn't be so large to break interactivity. I'm not sure at this point.

Could you please be more specific? E.g. which is the first OIDN version that has this issue, what exactly do you mean by "slow", etc. But some measurements or a small reproducer would be best.

atafra commented 3 weeks ago

Sorry, I was wrong. I could reproduce the issue. The delay is indeed much worse than it should be. I'm looking into it. You don't need to provide more details or a reproducer anymore.

atafra commented 2 weeks ago

The issue is now fixed in devel and will be released soon in v2.3.1. Thanks for reporting this issue! Please let me know whether you still encounter any issues.

fluidray commented 2 weeks ago

That's great! Thanks for the quick fix!

fluidray commented 1 week ago

Just tested, everything works fine. Thanks again!

atafra commented 1 week ago

I'm happy to hear, thanks for the feedback!