Commit Graph

6 Commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks fa8d66b951 code: Disable useless alignment styling and update standard 2023-05-14 03:25:07 +02:00
Michael Fabian 'Xaymar' Dirks 5a3954ae0e project: Fix License, License headers and Copyright information
Fixes several files incorrectly stated a different license from the actual project, as well as the copyright headers included in all files. This change has no effect on the licensing terms, it should clear up a bit of confusion by contributors. Plus the files get a bit smaller, and we have less duplicated information across the entire project.

Overall the project is GPLv2 if not built with Qt, and GPLv3 if it is built with Qt. There are no parts licensed under a different license, all have been adapted from other compatible licenses into GPLv2 or GPLv3.
2023-04-05 18:59:08 +02:00
Michael Fabian 'Xaymar' Dirks fddf21b8de util/threadpool: Optimize for dynamic thread pooling
While the previous approach of a static thread pool worked, it was sub-optimal in its resource usage. Many of the threads would never see a single task, and simply permanently sleep. This seems like a good idea, except that sleeping threads still end up in the scheduler, and thus waste a tiny amount of resources.

It is better to instead dynamically spawn threads when needed and only keeping the bare minimum around all the time. These dynamically spawned threads are also explicitly set to background priority which further reduces scheduling overhead. Finally optimizing the memory layout to prevent unwanted false sharing should also keep sporadic wake ups at a minimum.

This new model should be able to handle many more tasks than ever before, but is still not as optimal as it could be.
2023-04-05 18:58:49 +02:00
Michael Fabian 'Xaymar' Dirks 08544b4116 cmake, code: Abuse pre-processor to disable/enable warnings 2023-04-05 18:58:39 +02:00
Michael Fabian 'Xaymar' Dirks fc479bcdaf filter/denoising: Restore alpha after processing
As the Alpha channel is completely ignored and possibly destroyed by denoising algorithms, we should restore the Alpha channel manually. Linear interpolation was chosen here as it will behave like Point if the size matches, and properly interpolate if the size doesn't match.

Fixes: #646
2023-04-05 18:51:22 +02:00
Michael Fabian 'Xaymar' Dirks 247553fa74 filter/denoising: Add Denoising filter 2023-04-05 18:51:17 +02:00