Blender Git Commit Log
Git Commits -> Revision 73c48d7
January 12, 2017, 03:56 (GMT) |
Cycles Denoising: Use better and faster NLM implementation for feature pass prefiltering Previously, the prefiltering NLM kernel was implemented just as it's described in the paper: For every pixel P, loop over every pixel Q in the search window. Then, loop over the small patches around them, calculate the average difference, and use that to compute the weight of Q for the denoised result at P. However, that gives you a time complexity of O(N^2 * R^2 * F^2), where N is the image size, R the search window and F the patch size... So, this patch implements the clever idea from "A Simple Trick to Speed Up and Improve the Non-Local Means" - by reformulating the loop, it's actually possible to skip a lot of computation and replace it with a separable box filter convolution. This reduces complexity to O(N^2 * R^2 * F), and the amount of pixel differences calculated even to O(N^2 * R^2)! Furthermore, by applying a second box-filter pass after calculating the weights, we get the "patchwise NLM" improvement basically for free! This is CPU-only so far, but that will change soon. |
Commit Details:
Full Hash: 73c48d7347ee9ca77aff7e558d97130c8eb43f87
Parent Commit: 11f8238
Lines Changed: +283, -93