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 6th August 2008, 17:14   #921  |  Link
mikeytown2
Resize Abuser
 
mikeytown2's Avatar
 
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
One of the examples listed has a function group called MVDegrain2i, where the delta's are 2 and 4 instead of 1 and 2

Code:
function MVDegrain2i(clip "source", int "overlap", int "dct", int "idx")
{
overlap=default(overlap,0) # overlap value (0 to 4 for blksize=8)
dct=default(dct,0) # use dct=1 for clip with light flicker
idx=default(idx,1) # use various idx for different sources in same script
fields=source.SeparateFields() # separate by fields
backward_vec2 = fields.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=overlap, idx = idx,dct=dct)
forward_vec2 = fields.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=overlap, idx = idx,dct=dct)
backward_vec4 = fields.MVAnalyse(isb = true, delta = 4, pel = 2, overlap=overlap, idx = idx,dct=dct)
forward_vec4 = fields.MVAnalyse(isb = false, delta = 4, pel = 2, overlap=overlap, idx = idx,dct=dct)
fields.MVDegrain2(backward_vec2,forward_vec2,backward_vec4,forward_vec4,thSAD=400,idx=idx)
Weave()
}

source=AVISource("video.avi")
mvdegrain2i(source,4,0,1)
mikeytown2 is offline   Reply With Quote
Old 6th August 2008, 17:15   #922  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
I believe the correct procedure before was to do the following, as MVtools does not handle interlaced material at all.

Separatefields()
MVProcessingHere()
Weave()

@Josey_wells, I like how you redesigned the function to only require one call for MVAnalyse, very handy! This is just my 2 cents, perhaps I like the old names too much, but I think keeping it without the multi suffix would be better.

Also, any chance you can upload the files to mediafire since we have to wait for moderators to approve attachments?

Last edited by Sagekilla; 6th August 2008 at 17:17.
Sagekilla is offline   Reply With Quote
Old 6th August 2008, 17:31   #923  |  Link
josey_wells
Registered User
 
Join Date: Dec 2007
Location: VA, USA
Posts: 116
Quote:
One of the examples listed has a function group called MVDegrain2i, where the delta's are 2 and 4 instead of 1 and 2
If this is really a desired feature then either a stepmultipler, or stepstart and stepsize would need be added to facilatate this.

Quote:
Also, any chance you can upload the files to mediafire since we have to wait for moderators to approve attachments?
I am cleaning up the code(one little mistake) and will post here and try mediafire when done.
josey_wells is offline   Reply With Quote
Old 6th August 2008, 17:35   #924  |  Link
mikeytown2
Resize Abuser
 
mikeytown2's Avatar
 
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
Quote:
Originally Posted by josey_wells View Post
If this is really a desired feature then either a stepmultipler, or stepstart and stepsize would need be added to facilatate this.
If this is a quick and easy thing to do, then go ahead and add in deltastep (my recommendation for a name). If it's a pain in the rear to add; doing 2 MVDegrainMulti, one for SelectEven() & SelectOdd() would work.
mikeytown2 is offline   Reply With Quote
Old 6th August 2008, 17:41   #925  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
Quote:
Originally Posted by josey_wells View Post
If this is really a desired feature then either a stepmultipler, or stepstart and stepsize would need be added to facilatate this.



I am cleaning up the code(one little mistake) and will post here and try mediafire when done.
Thank you! Look forward to using the new version, considering my Opteron 170 is just barely chugging along with MVTools running.
Sagekilla is offline   Reply With Quote
Old 6th August 2008, 17:43   #926  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,729
Quote:
Originally Posted by mikeytown2 View Post
One of the examples listed has a function group called MVDegrain2i, where the delta's are 2 and 4 instead of 1 and 2

Code:
function MVDegrain2i(clip "source", int "overlap", int "dct", int "idx")
{
overlap=default(overlap,0) # overlap value (0 to 4 for blksize=8)
dct=default(dct,0) # use dct=1 for clip with light flicker
idx=default(idx,1) # use various idx for different sources in same script
fields=source.SeparateFields() # separate by fields
backward_vec2 = fields.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=overlap, idx = idx,dct=dct)
forward_vec2 = fields.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=overlap, idx = idx,dct=dct)
backward_vec4 = fields.MVAnalyse(isb = true, delta = 4, pel = 2, overlap=overlap, idx = idx,dct=dct)
forward_vec4 = fields.MVAnalyse(isb = false, delta = 4, pel = 2, overlap=overlap, idx = idx,dct=dct)
fields.MVDegrain2(backward_vec2,forward_vec2,backward_vec4,forward_vec4,thSAD=400,idx=idx)
Weave()
}

source=AVISource("video.avi")
mvdegrain2i(source,4,0,1)
I don't see the reason why there are deltas 2 and 4?? In interlaced material, every field is different (so you should be able to use deltas 1, 2...) and MVAnalyse should simply compensate for the small vertical shift between the two fields. Or is it that vectors are better found with a larger delta?
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 6th August 2008, 18:29   #927  |  Link
josey_wells
Registered User
 
Join Date: Dec 2007
Location: VA, USA
Posts: 116
I will add a deltamult option to MVAnalyseMulti where for refframes=3 for examlpe the following will occur:

deltamult=1

B delta=3, B delta=2, B delta=1, F delta=1, F delta=2, F delta=3

deltamult=2

B delta=6, B delta=4, B delta=2, F delta=2, F delta=4, F delta=6

etc.
josey_wells is offline   Reply With Quote
Old 6th August 2008, 19:38   #928  |  Link
talen9
Registered User
 
Join Date: Aug 2007
Location: Italy
Posts: 286
Quote:
Originally Posted by Sagekilla View Post
This is just my 2 cents, perhaps I like the old names too much, but I think keeping it without the multi suffix would be better.
I don't think this is a good idea, it would break compatibility with pre-existing scripts ... OTOH, old scripts would have to be adapted in either case, if you want them to be "thread-safe", right?
talen9 is offline   Reply With Quote
Old 6th August 2008, 19:53   #929  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
Indeed. It's a very simple matter of updating the scripts so they're properly coded that way. But then again, what I'm suggesting is you rename it to MVDegrain and MVAnalyse. Analyse in the old scripts would have to be updated, but the MVDegrain would just be a matter of dropping the number and updating the params. Either way, that's just my preference I'm in love with the fact that I don't have to use those extra lines to get the same functionality now, that it's just a minor annoyance.


To answer your question though, yes you would have to update all old scripts regardless with this new patch, since the syntax has completely changed, as well as the function names.
Sagekilla is offline   Reply With Quote
Old 6th August 2008, 23:26   #930  |  Link
josey_wells
Registered User
 
Join Date: Dec 2007
Location: VA, USA
Posts: 116
OK, here is the fixed version with deltamult option, default = 1, added to MVAnalyseMulti. For now I will keep the multinames for backward compatibility.

Obviously mediafire didn't work to well so here is rapidshare
The outside link is http://rapidshare.com/files/13541734...6.0_9.rar.html

This should be good to go for testing.

Have fun!
Attached Files
File Type: rar MVTools V1.9.6.0_8_MultiPart.part01.rar (195.3 KB, 43 views)
File Type: rar MVTools V1.9.6.0_8_MultiPart.part02.rar (195.3 KB, 34 views)
File Type: rar MVTools V1.9.6.0_8_MultiPart.part03.rar (195.3 KB, 30 views)
File Type: rar MVTools V1.9.6.0_8_MultiPart.part04.rar (152.4 KB, 35 views)

Last edited by josey_wells; 7th August 2008 at 01:39. Reason: updated link
josey_wells is offline   Reply With Quote
Old 7th August 2008, 04:23   #931  |  Link
mikeytown2
Resize Abuser
 
mikeytown2's Avatar
 
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
@josey_wells Giving your latest dll a spin and it appears to work fairly well, no crashes so far! Using MCbob and MVDegrainMulti deltamult=2 in the same script. MVDegrainMulti by it's self uses a fair amount of my cpu (80%), haven't done a timed test yet.
mikeytown2 is offline   Reply With Quote
Old 7th August 2008, 05:39   #932  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
I've gotten close to 100% speedup with your new filter. Filtering a blu-ray movie @ 720p with blksize=8, overlap=4, pel=4 I got 0.24 fps with 1.9.5.7 and 0.44 fps with 1.9.6.8 (You should really use that fourth number to enumerate your mini builds you've been making )

Very nice, I never got anywhere near 100% speedup using MT() or SetMTMode(). SetMTMode() was a horror for using on blu-ray movies for that matter, since I had two instances of DirectShowSource decoding the 1080p video, which resulted in almost no speedup.

Edit: By the way, which version will be faster, the IC10 or MSVC?
Sagekilla is offline   Reply With Quote
Old 7th August 2008, 11:11   #933  |  Link
josey_wells
Registered User
 
Join Date: Dec 2007
Location: VA, USA
Posts: 116
Quote:
By the way, which version will be faster, the IC10 or MSVC?
The IC10 version should be slighter faster since the Intel Compiler peforms some parallel optimization and loop unrolling. However, I did set it up to require SSE2 so if your CPU supports that it should work fine.

Quote:
Very nice, I never got anywhere near 100% speedup using MT() or SetMTMode(). SetMTMode() was a horror for using on blu-ray movies for that matter, since I had two instances of DirectShowSource decoding the 1080p video, which resulted in almost no speedup.
Blu-ray was the main reason I enchanced MVTools since I would get random crashes with all the options mentioned above. I have converted a blu-ray movie with this version at about 0.7 fps with my script

Quote:
MVDegrainMulti by it's self uses a fair amount of my cpu (80%), haven't done a timed test yet.
My Q6600 averages between 85-95% CPU usage across all 4 cores.

Quote:
1.9.6.8 (You should really use that fourth number to enumerate your mini builds you've been making
I was trying to use the _X as a build number with V1.9.6.0 being the completed baselined version. Maybe its time to go to 2.0.0.0 if some other users chime in with tying MVAnalyseMulti to some other MVTools filters.
josey_wells is offline   Reply With Quote
Old 7th August 2008, 12:30   #934  |  Link
krieger2005
Registered User
 
krieger2005's Avatar
 
Join Date: Oct 2003
Location: Germany
Posts: 377
I don't see a reason why you removed the isb and delta-parameter. There are several situations where one want only analyze the forward-movement or only the backward-movement or only the 5th Frame backward to the actual and so on.
krieger2005 is offline   Reply With Quote
Old 7th August 2008, 13:59   #935  |  Link
josey_wells
Registered User
 
Join Date: Dec 2007
Location: VA, USA
Posts: 116
Quote:
I don't see a reason why you removed the isb and delta-parameter. There are several situations where one want only analyze the forward-movement or only the backward-movement or only the 5th Frame backward to the actual and so on.
One is free to use the old MVAnalyse as it still exists. However, Multithreading can only be leveraged when performing analysis over many frames. If it was really desired to do just a group of forward or a group of backward frames multithreaded then this could be done with flags such as forwardonly & backwardonly. Another option would be a direction flag(1=forward & backward, 2=Forward only, 3=backward only).

Last edited by josey_wells; 7th August 2008 at 18:40.
josey_wells is offline   Reply With Quote
Old 7th August 2008, 18:11   #936  |  Link
josey_wells
Registered User
 
Join Date: Dec 2007
Location: VA, USA
Posts: 116
OK, here is the final post for MVTools V1.9.6.0.

I have finished cleaning up the code and fixed a memory leak in the destructor of MVMask and MVShow.

Take it or leave it.

MVTools V1.9.6.0_Final link http://rapidshare.com/files/13559228...Final.rar.html
josey_wells is offline   Reply With Quote
Old 7th August 2008, 18:14   #937  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
Here goes the stress test then Do filtering on my Desktop, and send the frames over the network to my laptop for encoding. I'll try encoding the "Jungles" episode of Planet Earth, and see how well it performs and if there's any crashes or issues. There shouldn't be though, since I've been using the latest version you've released every day for encoding my Firefly episodes.
Sagekilla is offline   Reply With Quote
Old 7th August 2008, 18:27   #938  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,729
Quote:
Originally Posted by josey_wells View Post
OK, here is the final post for MVTools V1.9.6.0.

I have finished cleaning up the code and fixed a memory leak in the destructor of MVMask and MVShow.

Take it or leave it.

MVTools V1.9.6.0_Final link http://rapidshare.com/files/13559228...Final.rar.html
Thanks for your hard work A very quick test showed a very nice boost, going from 1.9 fps to 2.5 fps, and no crashes so far.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 8th August 2008, 01:49   #939  |  Link
Andrey /MAG/
SVP developer
 
Join Date: Jul 2008
Location: Russia
Posts: 23
Quote:
Originally Posted by josey_wells View Post
OK, here is the final post for MVTools V1.9.6.0.
Thanx. But I have some questions.

When we can see changed documentation?
Can You give short description what difference from 1.9.5.7?
Andrey /MAG/ is offline   Reply With Quote
Old 8th August 2008, 04:20   #940  |  Link
TSchniede
Registered User
 
Join Date: Aug 2006
Posts: 77
I think it is basically his version 1.9.5.8. But MVDegrain works similar to the previous threaded version (only the threads are only created and destroyed once) and MVDegrainMulti and MVAnalyseMulti were added, that's the obvious changes there are a lot of minor changes in most files though.
__________________
GA-P35-DS3R, Core2Quad Q9300@3GHz, 4.0GB/800 MHz DDR2, 2x250GB SATA HD, Geforce 6800
TSchniede 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 21:36.


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