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 Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th December 2016, 01:05   #121  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 709
depanestimate (or depan) parameters have been changed? coz scene change detection looks broken to me
__________________
powered by Google Translator
Motenai Yoda is offline   Reply With Quote
Old 6th December 2016, 05:36   #122  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Strange enough, now MDegrain5 is more effective than MDegrain6 in SMDegrain and almost comparable with MDegrain4.

Perhaps MDegrain6 (and MDegrainN) is needed or simply wrong script implementation?
__________________
@turment on Telegram

Last edited by tormento; 6th December 2016 at 05:39.
tormento is offline   Reply With Quote
Old 6th December 2016, 10:33   #123  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by tormento View Post
Strange enough, now MDegrain5 is more effective than MDegrain6 in SMDegrain and almost comparable with MDegrain4.

Perhaps MDegrain6 (and MDegrainN) is needed or simply wrong script implementation?
I don't understand exactly but when MDegrainN is called, if thSAD2 = thSAD and thSADC = thSADC2 then MDegrainN will call the original MDegrain1..5 because it is said to be faster.
MDegrain6 does not exist, it always uses MDegrainN.
pinterf is offline   Reply With Quote
Old 6th December 2016, 10:34   #124  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by Motenai Yoda View Post
depanestimate (or depan) parameters have been changed? coz scene change detection looks broken to me
Dunno, this one needs investigating.
pinterf is offline   Reply With Quote
Old 6th December 2016, 11:44   #125  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by pinterf View Post
I don't understand exactly but when MDegrainN is called, if thSAD2 = thSAD and thSADC = thSADC2 then MDegrainN will call the original MDegrain1..5 because it is said to be faster.
MDegrain6 does not exist, it always uses MDegrainN.
I meant SMDegrain with tr=5 or tr=6. According to my experience, 6 was more effective in noise reduction than 5.

Can't trace back when things went wrong, as I always used 4 or 6.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 6th December 2016, 20:35   #126  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
ok, I did another change, http://forum.videohelp.com/threads/3...=1#post2413356

try with always_mdegrainn=true
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 7th December 2016, 14:49   #127  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by real.finder View Post
try with always_mdegrainn=true
Files:

pee.264
pee.dgi

SMDegrain.avsi + this variation to use KNLMeansCL 1.0

Basic script and variations:

PHP Code:
SetMemoryMax(8000)
SetFilterMTMode("DEFAULT_MT_MODE"2)
SetFilterMTMode("ChangeFPS"3)

SetFilterMTMode("DGSource"3)
LoadPlugin("D:\eseguibili\media\DGDecNV\x64\DGDecodeNV.dll")
DGSource("E:\in\Pee Wee's big adventure\pee.dgi")

ChangeFPS(last,last,true)

SMDegrain (tr=4,PreFilter=4,thSAD=400,contrasharp=false,refinemotion=false,truemotion=true,plane=4,chroma=true,lsb=true,mode=6,TV_range=false)

Prefetch(7
Code:
encoded 2162 frames, 7.81 fps, 4015.53 kb/s, duration 0:04:36.77
av2y [info]: E:\in\Pee Wee's big adventure\pee_44.avs: 1920x1080, 2997/125 fps, 2162 frames
Final file size is 43.2 MB bytes.
PHP Code:
SMDegrain (tr=4,PreFilter=4,thSAD=400,contrasharp=false,refinemotion=false,truemotion=true,plane=4,chroma=true,lsb=true,mode=6,TV_range=false,always_MDegrainN=true
Code:
encoded 2162 frames, 7.72 fps, 4245.76 kb/s, duration 0:04:40.05
av2y [info]: E:\in\Pee Wee's big adventure\pee_44a.avs: 1920x1080, 2997/125 fps, 2162 frames
Final file size is 45.7 MB bytes.
PHP Code:
SMDegrain (tr=5,PreFilter=4,thSAD=400,contrasharp=false,refinemotion=false,truemotion=true,plane=4,chroma=true,lsb=true,mode=6,TV_range=false
Code:
encoded 2162 frames, 7.00 fps, 3771.63 kb/s, duration 0:05:08.76
av2y [info]: E:\in\Pee Wee's big adventure\pee_54.avs: 1920x1080, 2997/125 fps, 2162 frames
Final file size is 40.6 MB bytes.
PHP Code:
SMDegrain (tr=5,PreFilter=4,thSAD=400,contrasharp=false,refinemotion=false,truemotion=true,plane=4,chroma=true,lsb=true,mode=6,TV_range=false,always_MDegrainN=true
Code:
encoded 2162 frames, 6.81 fps, 3991.23 kb/s, duration 0:05:17.41
av2y [info]: E:\in\Pee Wee's big adventure\pee_54a.avs: 1920x1080, 2997/125 fps, 2162 frames
Final file size is 42.9 MB bytes.
PHP Code:
SMDegrain (tr=6,PreFilter=4,thSAD=400,contrasharp=false,refinemotion=false,truemotion=true,plane=4,chroma=true,lsb=true,mode=6,TV_range=false
Code:
encoded 2162 frames, 6.16 fps, 3806.16 kb/s, duration 0:05:51.22
av2y [info]: E:\in\Pee Wee's big adventure\pee_64.avs: 1920x1080, 2997/125 fps, 2162 frames
Final file size is 40.9 MB bytes.
PHP Code:
SMDegrain (tr=6,PreFilter=4,thSAD=400,contrasharp=false,refinemotion=false,truemotion=true,plane=4,chroma=true,lsb=true,mode=6,TV_range=false,always_MDegrainN=true
Code:
encoded 2162 frames, 6.12 fps, 3806.16 kb/s, duration 0:05:53.37
av2y [info]: E:\in\Pee Wee's big adventure\pee_64a.avs: 1920x1080, 2997/125 fps, 2162 frames
Final file size is 40.9 MB bytes.
Something is going wrong, I think, in script or in latest MVTools iteration. How is possible that a 6 frame noise reduction is less effective than a 5 frame and almost equivalent to a 4?
__________________
@turment on Telegram

Last edited by tormento; 7th December 2016 at 15:00.
tormento is offline   Reply With Quote
Old 7th December 2016, 18:19   #128  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by tormento View Post
Files:

pee.264
pee.dgi

SMDegrain.avsi + this variation to use KNLMeansCL 1.0

Basic script and variations:

PHP Code:
SetMemoryMax(8000)
SetFilterMTMode("DEFAULT_MT_MODE"2)
SetFilterMTMode("ChangeFPS"3)

SetFilterMTMode("DGSource"3)
LoadPlugin("D:\eseguibili\media\DGDecNV\x64\DGDecodeNV.dll")
DGSource("E:\in\Pee Wee's big adventure\pee.dgi")

ChangeFPS(last,last,true)

SMDegrain (tr=4,PreFilter=4,thSAD=400,contrasharp=false,refinemotion=false,truemotion=true,plane=4,chroma=true,lsb=true,mode=6,TV_range=false)

Prefetch(7
Code:
encoded 2162 frames, 7.81 fps, 4015.53 kb/s, duration 0:04:36.77
av2y [info]: E:\in\Pee Wee's big adventure\pee_44.avs: 1920x1080, 2997/125 fps, 2162 frames
Final file size is 43.2 MB bytes.
PHP Code:
SMDegrain (tr=4,PreFilter=4,thSAD=400,contrasharp=false,refinemotion=false,truemotion=true,plane=4,chroma=true,lsb=true,mode=6,TV_range=false,always_MDegrainN=true
Code:
encoded 2162 frames, 7.72 fps, 4245.76 kb/s, duration 0:04:40.05
av2y [info]: E:\in\Pee Wee's big adventure\pee_44a.avs: 1920x1080, 2997/125 fps, 2162 frames
Final file size is 45.7 MB bytes.
PHP Code:
SMDegrain (tr=5,PreFilter=4,thSAD=400,contrasharp=false,refinemotion=false,truemotion=true,plane=4,chroma=true,lsb=true,mode=6,TV_range=false
Code:
encoded 2162 frames, 7.00 fps, 3771.63 kb/s, duration 0:05:08.76
av2y [info]: E:\in\Pee Wee's big adventure\pee_54.avs: 1920x1080, 2997/125 fps, 2162 frames
Final file size is 40.6 MB bytes.
PHP Code:
SMDegrain (tr=5,PreFilter=4,thSAD=400,contrasharp=false,refinemotion=false,truemotion=true,plane=4,chroma=true,lsb=true,mode=6,TV_range=false,always_MDegrainN=true
Code:
encoded 2162 frames, 6.81 fps, 3991.23 kb/s, duration 0:05:17.41
av2y [info]: E:\in\Pee Wee's big adventure\pee_54a.avs: 1920x1080, 2997/125 fps, 2162 frames
Final file size is 42.9 MB bytes.
PHP Code:
SMDegrain (tr=6,PreFilter=4,thSAD=400,contrasharp=false,refinemotion=false,truemotion=true,plane=4,chroma=true,lsb=true,mode=6,TV_range=false
Code:
encoded 2162 frames, 6.16 fps, 3806.16 kb/s, duration 0:05:51.22
av2y [info]: E:\in\Pee Wee's big adventure\pee_64.avs: 1920x1080, 2997/125 fps, 2162 frames
Final file size is 40.9 MB bytes.
PHP Code:
SMDegrain (tr=6,PreFilter=4,thSAD=400,contrasharp=false,refinemotion=false,truemotion=true,plane=4,chroma=true,lsb=true,mode=6,TV_range=false,always_MDegrainN=true
Code:
encoded 2162 frames, 6.12 fps, 3806.16 kb/s, duration 0:05:53.37
av2y [info]: E:\in\Pee Wee's big adventure\pee_64a.avs: 1920x1080, 2997/125 fps, 2162 frames
Final file size is 40.9 MB bytes.
Something is going wrong, I think, in script or in latest MVTools iteration. How is possible that a 6 frame noise reduction is less effective than a 5 frame and almost equivalent to a 4?
I think that MDegrainN with thSAD2 (it's thSAD/2 in SMDegrain) will did it in another way, like what MRecalculate do, so now you have new option to do your denoise
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 7th December 2016, 18:45   #129  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by real.finder View Post
I think that MDegrainN with thSAD2 (it's thSAD/2 in SMDegrain) will did it in another way, like what MRecalculate do, so now you have new option to do your denoise
I really can't understand you...
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 7th December 2016, 18:52   #130  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by tormento View Post
I really can't understand you...
I mean always_mdegrainn=true, you can use it even with tr=1

it will make the denoise more friendly with the details (it will look like refinemotion=true)
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 7th December 2016, 20:55   #131  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by real.finder View Post
I mean always_mdegrainn=true, you can use it even with tr=1

it will make the denoise more friendly with the details (it will look like refinemotion=true)
Ok but I can't really understand why now tr=6 gives so bad results...
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 9th December 2016, 00:08   #132  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 709
@real.finder IIRC there was a bug in smdegrain when chroma = something and plane = something (maybe about prefilter???) I sent an mp about the fix to dogway some time ago but IIRC he didn't applied it
__________________
powered by Google Translator
Motenai Yoda is offline   Reply With Quote
Old 9th December 2016, 00:18   #133  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Motenai Yoda View Post
@real.finder IIRC there was a bug in smdegrain when chroma = something and plane = something (maybe about prefilter???) I sent an mp about the fix to dogway some time ago but IIRC he didn't applied it
I think you mean this http://forum.doom9.org/showthread.ph...00#post1779900
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 9th December 2016, 16:35   #134  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 709
IIRC was something of smdegrain itself,

Quote:
what about using a prefilter clip and chroma=false?
087
Code:
Chr2         = chroma ? 3 : IsClip(prefilter) ? 1 : (prefilter == 3 ? 2 : 1)
... looks like was fixed in the end.
__________________
powered by Google Translator

Last edited by Motenai Yoda; 9th December 2016 at 16:38.
Motenai Yoda is offline   Reply With Quote
Old 13th December 2016, 12:22   #135  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
pinterf, you mentioned that your version was forked from 2.6.0.5 and that you did not touch the code that interfaced with avstp.dll. I ran a test to see how it affects the speed.

The simple script:
Code:
colorbars(width = 1024, height = 512, pixel_type = "yv12").killaudio().assumefps(25, 1).trim(0, 199)
addgrain(var = 100)
super = MSuper(pel = 2, sharp = 1)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap = 4)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, overlap = 4)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, overlap = 4)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap = 4)
MDegrain2(super, backward_vec1, forward_vec1, backward_vec2, forward_vec2, thSAD = 400)
The first run is with a slightly older version of Fizick's mvtools2.dll (2.5.11.3), built by me with VC10:
Code:
Frames processed:               200 (0 - 199)
FPS (min | max | average):      7.003 | 13.65 | 7.148
Memory usage (phys | virt):     150 | 149 MiB
Thread count:                   1
CPU usage (average):            25%
Efficiency index:               0.2859
Next is with your latest (2.7.6.22):
Code:
Frames processed:               200 (0 - 199)
FPS (min | max | average):      5.805 | 11.34 | 5.878
Memory usage (phys | virt):     149 | 148 MiB
Thread count:                   1
CPU usage (average):            25%
Efficiency index:               0.2351
And here is yours with avstp.dll present in the auto-load directory:
Code:
Frames processed:               200 (0 - 199)
FPS (min | max | average):      8.886 | 28.06 | 14.87
Memory usage (phys | virt):     151 | 149 MiB
Thread count:                   4
CPU usage (average):            71%
Efficiency index:               0.2095
I enabled the efficiency index feature in AVSMeter to see how well the plugins use CPU cycles. Your version clearly makes use of avstp but it is rather inefficient. Removing avstp will run the code single-threaded but it's quite a bit slower and less efficient than Fizick's DLL. So, my point is - Perhaps the code that interfaces with avstp causes an overhead and explains the slower operation, even when avstp is not present. Just some food for thought.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 13th December 2016, 13:32   #136  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by Groucho2004 View Post
Perhaps the code that interfaces with avstp causes an overhead and explains the slower operation, even when avstp is not present. Just some food for thought.
I completely removed avstp and use AviSynth+ MT with way better results. IMHO avstp is almost useless.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 13th December 2016, 17:12   #137  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
When I will have time, I should check the SAD function selection.
avstp surely has no that much overhead.
pinterf is offline   Reply With Quote
Old 14th December 2016, 19:49   #138  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
New release. I was trying to give a speed boost for my mod.
MvTools2 2.7.7.22 and Depans
  • change some 8 bit SAD functions for the better
  • separating bottleneck 8 bit/16 bit code paths in order not to use slower int64 calculations for 8 bit, where there are no integer overflow problems
  • more __forceinlines for helping the compiler
  • general speed gain of 5-15% compared to 2.7.6.22, much reduced speed gap compared to the "classic" YV12 8 bit mvtools2 versions

Groucho2004, thank you for the inspiring speed test, I was using that test script with 8 and 16 block sizes, avsmeters were burning hard
pinterf is offline   Reply With Quote
Old 14th December 2016, 20:36   #139  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
You be a star Pinterf, Thanx
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 14th December 2016, 21:55   #140  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by pinterf View Post
New release. I was trying to give a speed boost for my mod.
MvTools2 2.7.7.22 and Depans
It's a bit faster, ~6.5 fps with the same test as above.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Reply

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 18:41.


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