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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th September 2017, 11:06   #201  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 699
Quote:
Originally Posted by burfadel View Post
I found knlmeamscl to cause detail or edge sharpness loss. Denoising is ineffective if it also limits visual fidelity.
Here's the general order of sophistication of algorithm we have for spatial denoiser in avisynth now:
knlmeanscl>dfttest>fft3dfilter>removegrain

There's really no debate on its effectiveness, it's better than removegrain because it just has a better algorithm, end of debate.

Quote:
As for chroma, it's just the sigma settings. There's a couple of things I haven't added for that yet also.
There's no point to tweak for chroma denoising because we cannot see them like 99% of the time. And I doubt that you tweak them by ExtractU/V+blown up brightness, so why even bother.

In addition to that, fft3dfilter's chroma denoise will desaturate color, people even use it as a derainbow alternative, so the best way to "fix" the problem is not use it.
Quote:
The texture like noise isn't removed so much in that anime image, also remember you can set renoise to 0. Noise removal doesn't have to be absolute, some noise can be visually pleasing watching at a normal distance, without those overly flat surfaces. This of course depends on the type and quality of noise. mClean is temporally stabilised which is why it is relatively bandwidth friendly with renoise.
It's more like the removegrain inside mclean reached its limit than it chooses not to remove the grain.

Last edited by lansing; 18th September 2017 at 20:10. Reason: typo
lansing is offline   Reply With Quote
Old 18th September 2017, 11:16   #202  |  Link
Groucho2004
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Posts: 3,407
I'm also quite puzzled by the "loss of details" comments regarding KNLMeansCL. My experience with it (or any NLMeans algorithm) is the exact opposite. Maybe increasing the search window ("a") will yield better results.
Groucho2004 is offline   Reply With Quote
Old 18th September 2017, 17:52   #203  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 1,968
Quote:
Originally Posted by Groucho2004 View Post
Maybe increasing the search window ("a") will yield better results.
I've always been using KNLMeans with D=2, A=2
MysteryX is offline   Reply With Quote
Old 20th September 2017, 19:10   #204  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 1,968
I did another test on a very grainy video take with my camera. In this case, KNLMeans wasn't doing a good job and I instead opted for SMDegrain.

Original / SMDegrain / mClean v1.3c / mClean v1.7c


I lowered enh from 27 to 22. v1.3c does lose considerable details with such grains, and v1.7c does a lot better here. Much better output than SMDegrain.

I don't mind tweaking enh to what suits me best, but what is more of a problem is having to calculate its dynamic value before altering its value. You divine height by 40 for its default value. Perhaps it could set the division factor or something like that.

It's not giving the plastic effect, but it's not falling far. Without renoise, it would look like a plastic doll.

I can definitely use this instead of SMDegrain. v1.7c isn't giving as consistent results with low-quality VCDs though.

Note: the clip above is rather static. Animated scenes may give different results.



Here, unfortunately, it's blurring out my shirt.

Last edited by MysteryX; 20th September 2017 at 19:26.
MysteryX is offline   Reply With Quote
Old 20th September 2017, 19:18   #205  |  Link
SaurusX
Registered User
 
Join Date: Feb 2017
Posts: 16
Quote:
Originally Posted by MysteryX View Post
I've always been using KNLMeans with D=2, A=2
I've found that changing the S value to S=1 also preserves more fine details. Star fields and the like. The higher the A value in combination with S=1, the better it seems to do.

That being said, I use D=1,A=3,S=1. Bumping up D to 2 can introduce encoding errors when you combine it with a lot of other temporal filters. The end effect seems to be minimal, especially for animated content.
SaurusX is online now   Reply With Quote
Old Yesterday, 00:03   #206  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,126
If you can think if a better way to scale enh, since the greater the resolution the higher it needs to be. I've made some performance improvements to the script, and it also uses less memory. I've still got some tweaking to do on it. I've discovered search 0, 1, and 2 don't seem to be optimised, which makes sense, default 4 is practically faster. I wonder if optimisations from x265 could be incorporated, I think it will help with speed. Ideally STAR search should be ported and made default, it's as fast as UMH search in x265, sometimes faster, and provided results like exhaustive. The default search range in MVTools is quite small, a ported optimised STAR search would not only likely be faster but produce more accurate and nicer results. Remember the search algorithms in MVTools2 have been there for 10+ years, are unlikely fully optimised, and are the principle thing that is required by most functions. Other functions like MDegrain rely on it indirectly, but would still benefit hugely.
burfadel is offline   Reply With Quote
Old Yesterday, 06:06   #207  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,126
Updated first post to v1.8. Speed improvements, memory use reduction, and better quality.
burfadel is offline   Reply With Quote
Old Yesterday, 16:40   #208  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 6,163
Quote:
I did another test on a very grainy video take with my camera. In this case, KNLMeans wasn't doing a good job and I instead opted for SMDegrain.

This does not look like very grainy video to me! This is example of very grainy video
Atak_Snajpera is offline   Reply With Quote
Old Yesterday, 22:21   #209  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,126
Is that grain changing every frame or is it consistent? If consistent the noise is basically a texture, so removal of that noise you are potentially removing detail. Spatial denoisers work on pixels or area of pixels as either a blank implementation, effectively acting as a blur, or difference between pixels to determine whether it should be removed. Temporal denoisers work by difference between frames, ideally in this case you track the movement over the temporal radius. Spatial denoisers were traditionally preferenced because they are generally fast and can be good at damping and softening static noise at the risk of losing detail. No denoiser can be perfect, because you are fundamentally changing the picture.

What did you think of v1.8? The results are 'quite different'. I might have to chase up a couple of things in MVTools2 with PinterF, the issues don't effect the output of v1.8, they're just bugs I found along the way that should be simple fixes.
burfadel is offline   Reply With Quote
Old Today, 00:10   #210  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,126
Quote:
Originally Posted by ChaosKing View Post
@burfadel will you port this script to vapoursynth too? I find it quite effective against heavy noise, with better "color stabilising" than smdegrain. (at least for my anime source)
Sorry I didn't answer this question earlier, I forgot about it . I have no idea about Vapoursynth, the syntax is different and the workings of some of the commands is also different. mClean is still in development, it would be time consuming to maintain the changes between the two.
burfadel is offline   Reply With Quote
Old Today, 09:28   #211  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 699
Quote:
Originally Posted by burfadel View Post
What did you think of v1.8? The results are 'quite different'. I might have to chase up a couple of things in MVTools2 with PinterF, the issues don't effect the output of v1.8, they're just bugs I found along the way that should be simple fixes.
Like I said before, you should have test it yourself before posting, or you would have known that the black dot artifacts was brought back again a couple of version ago.

And I don't really notice any speed improvement, same old 14fps on my 4770k with a 1080 blankclip script
Code:
BlankClip(length=10000, width=1920, height=1080, pixel_type="yv12")
killaudio()
mclean()
prefetch(8)
Code:
AVSMeter 2.6.2 (x64) - Copyright (c) 2012-2017, Groucho2004
AviSynth+ 0.1 (r2508, MT, x86_64) (0.1.0.0)

Number of frames:                10000
Length (hh:mm:ss.ms):     00:06:56.667
Frame width:                      1920
Frame height:                     1080
Framerate:                      24.000 (24/1)
Colorspace:                       YV12

Frames processed:               656 (0 - 655)
FPS (min | max | average):      1.115 | 85451 | 14.22
Memory usage (phys | virt):     1935 | 2145 MiB
Thread count:                   33
CPU usage (average):            72%

Time (elapsed):                 00:00:46.121

Press any key to exit...
lansing is offline   Reply With Quote
Old Today, 09:47   #212  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,126
I did do testing before posting, doesn't meant I can come across all issues. The speed thing you noticed is peculiar, in all testing that I did it was noticeably faster for me consistently, as well as using less memory.

Same test as you, except length is 1000. CPU usage is lower becuase I set prefetch(8) on a 16 thread machine.

mClean 1.7c:
Code:
AVSMeter 2.6.5 (x64) - Copyright (c) 2012-2017, Groucho2004
AviSynth+ 0.1 (r2508, MT, x86_64) (0.1.0.0)

Number of frames:                 1000
Length (hh:mm:ss.ms):     00:00:41.667
Frame width:                      1920
Frame height:                     1080
Framerate:                      24.000 (24/1)
Colorspace:                       YV12

Frames processed:               1000 (0 - 999)
FPS (min | max | average):      1.885 | 21560 | 21.32
Memory usage (phys | virt):     1792 | 2136 MiB
Thread count:                   53
CPU usage (average):            41%

Time (elapsed):                 00:00:46.9
mClean 1.8:
Code:
AVSMeter 2.6.5 (x64) - Copyright (c) 2012-2017, Groucho2004
AviSynth+ 0.1 (r2508, MT, x86_64) (0.1.0.0)

Number of frames:                 1000
Length (hh:mm:ss.ms):     00:00:41.667
Frame width:                      1920
Frame height:                     1080
Framerate:                      24.000 (24/1)
Colorspace:                       YV12

Frames processed:               1000 (0 - 999)
FPS (min | max | average):      1.783 | 26352 | 25.53
Memory usage (phys | virt):     1515 | 1536 MiB
Thread count:                   37
CPU usage (average):            36%

Time (elapsed):                 00:00:39.170
It's faster for me and uses less memory than mClean 1.7c. Also the CPU usage is less.

Of course it's a bit counter-intuitive to test a temporal filter, particularly one that uses MVTools2, on a blank clip .

Last edited by burfadel; Today at 10:30.
burfadel is offline   Reply With Quote
Old Today, 12:04   #213  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,192
In previous versions (at least until 1.4) there are the line:

Quote:
blkSize = Default (blkSize, DefH<360 ? 8 : DefH<750 ? 12 : DefH<1200 ? 16 : DefH<1600 ? 24 : 32) # Horizontal block size for MDegrain4
In mClean 1.8 the line is:

Quote:
blkSize = Default (blkSize, defH>480 ? 12 : defH>1200 ? 16 : defH >=2600 ? 32 : 8) # Horizontal block size for MDegrain4
Are you sure about that sintax?

I think than defH>1200 ? 16 : defH >=2600 ? 32 never work, is always 12 for defH>480.
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.
tebasuna51 is offline   Reply With Quote
Old Today, 12:14   #214  |  Link
Groucho2004
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Posts: 3,407
Quote:
Originally Posted by burfadel View Post
Of course it's a bit counter-intuitive to test a temporal filter, particularly one that uses MVTools2, on a blank clip .
You can always use synthetic, random grain like this:
Code:
colorbars(width = 1920, height = 1080, pixel_type = "yv12").killaudio().assumefps(24000, 1001).trim(0, 999)
addgrain(var = 100.0)
Groucho2004 is offline   Reply With Quote
Old Today, 14:10   #215  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,242
mClean Version 1.8, AVS+ 32 bit:
I'm getting from avisynth a "System exception - Illegal Instruction .... line 117" which is
clean = clean.dctfilter (1,1,1,1,1,1,0.50,0)
My dctfilter version is 0.5.0.0.

Any suggestion what could be wrong?
Sharc is offline   Reply With Quote
Reply

Tags
denoise, denoiser, mclean

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 17:16.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.