This patch extends the denoiser to support using multiple input frames in order to denoise one frame. This can significantly reduce noise and flickering in animations.
Since future frames are required before a frame can be denoised, animation denoising can not be performed during rendering.
Instead, the sequence is rendered to Multilayer EXR files and then denoised using a function of the Cycles Python API.
In order to generate the neccessary information, the option to output denoising passes is now indepent from whether the frame will be denoised at render time.
When the output passes are enabled, Cycles will perform prefiltering of the feature passes during rendering (since that step is performed individually on each frame).
In the future, an integration into the user interface or, even better, the animation rendering workflow is planned.
This feature was originally developed for Tangent Animation, thanks for the support!