Log in

View Full Version : TemporalDenoise2 - Refresh of Vapoursynth version


Adub
25th December 2022, 02:10
Just wanted to spread the knowledge to the community - I had a few hours over these past few months to take a stab at updating TemporalDenoise2 (currently hosted/maintained in Selur's scripts for Hybrid) based on the latest AVS version, 2.6.3.

This should provide a nice boost in visual quality, less bugs (hopefully none?) and some minor performance improvements.

This version can be found in my pull request on Github here: https://github.com/Selur/VapoursynthScriptsInHybrid/pull/2

There's still a few TODO items, like adding BM3D support, and maybe dfttest2, etc.

But a number of bugs have been fixed (it was basically straight up broken with high bit depth content due to a weird scaling multiplier in the original version).

Here's the main changelog:


Feature:
* Add support for grainLevel and grainLevelSetup, with associated autotunning, in alignment with AVS version.
* Add postMix support, for mixing in grain again, in alignment with AVS version.
* Add outputStage support, which enables outputting a clip at different stages of the denoising process, in alignment with AVS version.
* Update documentation based on AVS version.
* Add support for postBlkSize, in alignment with AVS version.
* all ppSAD* and ppSCD* variables are autotuned based on grain level.

Changes:
* Set meAlg default to 4 to match the AVS version, should be a nice speed improvement for a small drop in quality.
* Set degrainTR default to 1 to match the AVS version. Better aligns with use of new grainLevel arg as well.
* Tune meAlgPar to match Dogway's latest AVS SMDegrain settings.
* Adjust MSuper settings to better align with AVS version. More work required.
* Minor code cleanup.
* Renamed internal 'i' variable to bitDepthMultiplier
* Removed internal LSAD and PLevel params, as they simply restated the existing MVtools defaults.


Bug Fixes:
* Fix hpad/vpad bug, which wasn't taking blocksize into effect before.
* Fix bug with postFFT 4, KNLMeansCL args.
* Removed weird bitdepth scaling of sigma values using internal i variable, which caused crazy sigma values to be used. Sigma is bitdepth indepenent, so don't know why it was ever used.
* Fixed `rec` (Refine/Recalculate) behavior with properly tuned recalculate args and a dedicated super clip with levels=1.


Ideally I'd like to modernize MCTemporalDenoise and SMDegrain to, as there's been some nice development/tuning to those since their original implementation. But that will all depend on the time and energy I have.

I just found TemporalDenoise2 to be very useful for some footage I was working on and the codebase was small enough that it was easy to compare/contrast between the VS and AVS versions to see what changes needed to be made.

kedautinh12
25th December 2022, 02:46
I added Bm3d support in TemporalDegrain2 avs ver. You can base it and port vs ver :D

Adub
27th December 2022, 20:13
Yup, that was exactly my intention, thank you. :)


My changes were officially merged, thanks to Selur.

I’ll work on adding BM3D support soon.