Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
5th September 2021, 22:40 | #1 | Link |
Registered User
Join Date: May 2018
Posts: 182
|
EZdenoise
Temporal denoiser. Requires MvTools2
I recommend you only tweak the following parameters:
Testings EZdenoise_v2 vs BM3D_CPU Settings used: Code:
LWLibavVideoSource("C:\Users\Admin\Documents\FFMPEG\01.mkv") Trim(0, 600) ConvertBits(16) EZdenoise() ConvertBits(10, dither=1) Prefetch(12, 48) Code:
AMD Ryzen 3900X encoded 600 frames in 15.412s (FFV1) Code:
LWLibavVideoSource("C:\Users\Admin\Documents\FFMPEG\01.mkv") Trim(0, 600) ConvertBits(32) BM3D_CPU(radius=2) BM3D_VAggregate(radius=2) ConvertBits(16) ConvertBits(10, dither=1) Prefetch(12, 48) Code:
AMD Ryzen 3900X encoded 600 frames in 29.895s (FFV1) Original (Blu-ray) https://i.ibb.co/VYpP0nB/RAW-01.png EZdenoise (Lossless FFV1) https://i.ibb.co/bPxY6Rw/EZdenoise.png BM3D (Lossless FFV1) https://i.ibb.co/n8hzbNC/BM3D.png Check the explosion, starting at the top right: You can see that EZdenoise retains more sharpness. And looking at the bottom part of the explosion, you can see EZdenoise also performs deblocking. In this example, EZdenoise is the clear winner. It is twice as fast and keeps more details. Changelog: Code:
EZdenoise v2 Changed chroma=true to chroma=false which is also what BM3D defaults to. This change increases speed by ~50%. Also added a variable for pel. Using anything but the default value of 1 is placebo, but hey, it is there if you want it. EZdenoise v3 Added "Falloff" parameter. Previously, thSAD2's would be (thSAD/2), which was probably too low. This version uses (thSAD*0.9). There should be no reason for you to change the new default. EZdenoise v4 Hardcoded "Falloff" parameter. Added "out16" parameter (which only supports 8bit sources). Using out16=true is 15% faster than using ConvertBits(16), because MAnalyse now respects the bit depth of the input. Previous versions had MAnalyse run at 16bit (if ConvertBits(16) was used) which didn't improve image quality and only wasted performance. Added ShowMe() Can be used to more easily find a good thSAD value. (Look at the top left corner during preview with AvsPmod) (And make sure to ignore any value that is shown on frames right after a scene change) Should be placed right after your Source filter. (Except for when your video has black bars, in which case you need to crop them first) Example: LWLibavVideoSource("C:\Users\Admin\Documents\INPUT.mkv") Crop(0, 140, -0, -140) ShowMe() I recommend you view 5 different scenes, write down the displayed value, calculate an average, and round it up. EZdenoise_v4 - Last edited by takla; 23rd March 2023 at 19:23. |
6th September 2021, 07:17 | #5 | Link |
Grumpy Old Man.
Join Date: Jul 2019
Location: Out There....
Posts: 692
|
OK, your suggestion worked, but I still don't know what this means:-
EZdenoise(). I guess that's where you add the parameters to how you want it to filter. So my next question is...how & what do I need to add to "denoise" a little stronger ??
__________________
Not poorly done, just doin' it my way !!! Live every day like it's your last, because one day, it will be !! (M$B) |
6th September 2021, 07:31 | #7 | Link | |
Grumpy Old Man.
Join Date: Jul 2019
Location: Out There....
Posts: 692
|
Quote:
But I added a few things between the (), and it definitely changes
__________________
Not poorly done, just doin' it my way !!! Live every day like it's your last, because one day, it will be !! (M$B) |
|
6th September 2021, 10:36 | #8 | Link | |
Banana User
Join Date: Sep 2008
Posts: 985
|
Quote:
Code:
function EZdenoise(clip Input, int "thSAD", int "thSADC", int "TR", int "BLKSize", int "Overlap") { thSAD = default(thSAD, 150) thSADC = default(thSADC, thSAD) TR = default(TR, 3) BLKSize = default(BLKSize, 16) Overlap = default(Overlap, BLKSize/2) Super = Input.MSuper(pel=1) Multi_Vector = Super.MAnalyse(Multi=True, Delta=TR, BLKSize=BLKSize, Overlap=Overlap) Input.MDegrainN(Super, Multi_Vector, TR, thSAD=thSAD, thSAD2=thSAD/2, thSADC=thSADC, thSADC2=thSADC/2) } |
|
6th September 2021, 23:01 | #12 | Link | |
Registered User
Join Date: Oct 2018
Location: Germany
Posts: 996
|
Quote:
Peace, a little fun must be.
__________________
Live and let live |
|
7th September 2021, 02:12 | #13 | Link | |
Registered User
Join Date: May 2018
Posts: 182
|
Quote:
But what SMDegrain does not achieve with ~640 lines, EZdenoise achieves with just 13 lines. I made this script because I got fed up with the garbage default settings SMDegrain comes with, because these settings cause artefacts on my testclips. And in the process I've learned which settings are the most important and which are basically just placebo (pel=2 for example). Such processing power is much better spend on blksize and tr. |
|
7th September 2021, 08:30 | #14 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,259
|
Has anyone tried to use svpflow1/svpflow2 as alternative to mvtools for gpu accelleration?
(https://www.svp-team.com/wiki/Manual:SVPflow) |
17th January 2022, 05:11 | #15 | Link |
Registered User
Join Date: May 2018
Posts: 182
|
Added EZdenoise v2
Last edited by takla; 17th January 2022 at 06:38. |
17th January 2022, 06:37 | #18 | Link |
Registered User
Join Date: May 2018
Posts: 182
|
|
22nd January 2022, 15:12 | #20 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,823
|
takla, here's a function I've been using. It's basically EZDenoise with more options. It might give you some ideas for v3.
MDegrainNL.zip Trumotion is disabled by default as it tends to cause blurring. YUV is expanded from limited range to full range for MAnalyse, but there's an argument to change that. There's also an argument for specifying a bitdepth for the MAnalyse clip. If you're working with a high bitdepth source and you're in a hurry you can reduce the bitdepth of the search clip. Multithreading with avstp.dll is disabled by default as it's not compatible with Avisynth+'s multithreading, but there's a line in the function for specifying the path to avstp.dll, so if it's set correctly, avstp.dll is automatically loaded when MT=true. I mainly use it for light denoising so the defaults aren't the same, but obviously you can change them. |
Thread Tools | Search this Thread |
Display Modes | |
|
|