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 26th December 2003, 23:20   #1  |  Link
mf
·
 
mf's Avatar
 
Join Date: Jan 2002
Posts: 1,729
New filter: HQDering

And here I'm at it again. High quality deringing.



Hope you like it. Greets from Bonta Claus - FUMO!!
mf is offline   Reply With Quote
Old 27th December 2003, 01:00   #2  |  Link
morsa
the dumbest
 
Join Date: Oct 2002
Location: Malvinas
Posts: 494
Great stuff.
At least this really must become a coded filter, or better an internal filter of Avisynth.
morsa is offline   Reply With Quote
Old 27th December 2003, 01:06   #3  |  Link
Soulhunter
Bored...
 
Soulhunter's Avatar
 
Join Date: Apr 2003
Location: Unknown
Posts: 2,812
The picture on the top is with your new script... Right?

Nice results, but does it drop the speed more to the regular mfps-factor?


Ok, enough joking...

The sample image looks really impressive!

As I said before, I'm not that advanced with complex script stuff...

Please, could you give me an example usage to change the smoother!?


Bye
__________________

Visit my IRC channel

Last edited by Soulhunter; 3rd March 2006 at 23:17.
Soulhunter is offline   Reply With Quote
Old 27th December 2003, 12:51   #4  |  Link
mf
·
 
mf's Avatar
 
Join Date: Jan 2002
Posts: 1,729
The usage is the same as with UnSmooth (if you remember ). If you want to use another smoother, you need to specify smoother= and params=.

HQDering(smoother="Convolution3D", params="preset="+Chr(34)+"animeLQ"+Chr(34))
for instance.

And it's 7fps, i find that not so bad, now is it?
mf is offline   Reply With Quote
Old 27th December 2003, 18:58   #5  |  Link
Soulhunter
Bored...
 
Soulhunter's Avatar
 
Join Date: Apr 2003
Location: Unknown
Posts: 2,812
Quote:
The usage is the same as with UnSmooth (if you remember ).
Ohw, yes... The UnSmooth script !!!

Quote:
And it's 7fps, i find that not so bad, now is it?
Wow... Then it should get implemented into mftoon !!!

THX n' Bye
__________________

Visit my IRC channel
Soulhunter is offline   Reply With Quote
Old 16th January 2004, 00:08   #6  |  Link
ZoNtO
Registered User
 
Join Date: Jun 2003
Location: Salt Lake City, UT
Posts: 7
Hey there, I need to use this dering filter on my TMNT anime DVD encode I'm working on because it's older and has a lot of "line noise". Would this script below be a valid one to use with the filter? If not, what would be a valid one? I've never modified, or even made an AviSynth script before so I have no idea really. Would mf toon be a good idea as well? Thanks guys!

script edited for length
__________________
AMD AthlonXP 1800+
Abit KX7-333R
512 MB Mushkin pc3000 DDR RAM
80 gb IBM 60gxp
Hercules 3D Prophet 8500 @ 300/300

http://www.battle.net/war3/ladder/w3xp-player-profile.aspx?Gateway=Sunken-Ruins&PlayerName=CacK
http://www.battle.net/war3/ladder/war3-player-profile.aspx?Gateway=Lordaeron&PlayerName=zonto
http://service.futuremark.com/compare?2k1=4303905

Last edited by ZoNtO; 16th January 2004 at 15:29.
ZoNtO is offline   Reply With Quote
Old 16th January 2004, 06:37   #7  |  Link
ZoNtO
Registered User
 
Join Date: Jun 2003
Location: Salt Lake City, UT
Posts: 7
anybody?
__________________
AMD AthlonXP 1800+
Abit KX7-333R
512 MB Mushkin pc3000 DDR RAM
80 gb IBM 60gxp
Hercules 3D Prophet 8500 @ 300/300

http://www.battle.net/war3/ladder/w3xp-player-profile.aspx?Gateway=Sunken-Ruins&PlayerName=CacK
http://www.battle.net/war3/ladder/war3-player-profile.aspx?Gateway=Lordaeron&PlayerName=zonto
http://service.futuremark.com/compare?2k1=4303905
ZoNtO is offline   Reply With Quote
Old 16th January 2004, 11:12   #8  |  Link
mf
·
 
mf's Avatar
 
Join Date: Jan 2002
Posts: 1,729
Well, HQDering is really only for slight ringing. It preserves so much detail that anything that's bad enough to be seen with the naked eye and without amplification won't be touched. The reason I made it was that I was annoyed at deringers in the fact that they harmed small details (well duh ). So I managed to make one that didn't do that. But it's really only for HQ (hence the name) sources. Also, if you had read closely enough (hint: at the top of the script is a section that says "Usage:"), the script is to be downloaded, saved into a directory, and then called with Import("HQDering-v0.1.avs"). You shouldn't just insert it at the end of your script (though that would have worked if you actually bothered to type HQDering() under it).

Note to other people reading this thread: I forgot to mention this here, but HQDering could be an excellent alternative to things like Dust or UnDot. It's a lot less destructive than said filters (possibly less effective as a result though), and should also create "invisible" extra compressibility, as some people like to call it.

Last edited by mf; 16th January 2004 at 11:15.
mf is offline   Reply With Quote
Old 16th January 2004, 12:18   #9  |  Link
Cyberman
Registered User
 
Cyberman's Avatar
 
Join Date: Aug 2003
Posts: 121
So itīs only for High Quality sources, allright. What would happen if I applied it to low quality? Would it harm it, or at worst merely do nothing?
Cyberman is offline   Reply With Quote
Old 16th January 2004, 12:29   #10  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,856
With deen("a2d") or deen("a3d"), you don't need to substract the thin mask from the thick mask. Deen won't take into account pixels whose value is over the threshold. So by doing as you do, you only risk not to filter close enough of the real edge.

In fact, I think a script like that one would give better results :
Code:
thinmask = msmooth(treshold = 10, highq = true, debug = true)
enlargedmask = thinmask.blur().blur().blur().blur().binarize(upper = false, threshold = 1,y=3,u=1,v=1).blur().blur().blur()
filteredclip = clip.deen("a2d")
result = clip.maskedmerge(filteredclip,enlargedmask,y=3,u=2,v=2)
Msmooth is better (imho) at detecting properly edges. It should be faster. The blur().blur().blur().blur().binarize() could be trasnformed in inflate().inflate().inflate().inflate(), but I would bet it would be slower ( can't make tests right now, though )

Edit : @cyberman : it will still improve slightly the quality ( visually speaking ). When the quality is bad, applying a smoothing filter helps a lot, and the script will apply it on some part of the picture. But you won't see much difference.

Last edited by Manao; 16th January 2004 at 12:34.
Manao is offline   Reply With Quote
Old 16th January 2004, 12:40   #11  |  Link
mf
·
 
mf's Avatar
 
Join Date: Jan 2002
Posts: 1,729
Quote:
Originally posted by Manao
With deen("a2d") or deen("a3d"), you don't need to substract the thin mask from the thick mask. Deen won't take into account pixels whose value is over the threshold. So by doing as you do, you only risk not to filter close enough of the real edge.
Theoretically, yes. But it's just safer. And on HQ sources, the ringing never occurs ON the edge (only around it), so why risk artifacts? Note that I don't care about speed . Also, Binarize will cause hard edges, and the advantage of my filters (something I would never trade away for speed), is that they use soft masks, so that you never get threshold artifacts.
mf is offline   Reply With Quote
Old 16th January 2004, 13:04   #12  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,856
Yes, but your way, you're not sure to discard totally the edge, if he is really thick, and if on the contrary it is thin, you won't filter the pixels close to it.

And I don't do a binary mask, the last three blurs are not binarized.

Finally, for having tested my script on a disney's movie, it doesn't create artifacts, and it is effective.
Manao is offline   Reply With Quote
Old 16th January 2004, 15:30   #13  |  Link
ZoNtO
Registered User
 
Join Date: Jun 2003
Location: Salt Lake City, UT
Posts: 7
What about this script then? And thanks for the help too guys!

#
# Created with Gordian Knot
#
# http://gknot.doom9.org
#
# PLUGINS
LoadPlugin("C:\PROGRA~1\GordianKnot\mpeg2dec3.dll")
LoadPlugin("C:\PROGRA~1\GordianKnot\undot.dll")
#LoadPlugin("C:\PROGRA~1\GordianKnot\decomb.dll")
#LoadPlugin("C:\PROGRA~1\GordianKnot\KernelDeInt.dll")
#LoadPlugin("C:\PROGRA~1\GordianKnot\dgbob.dll")
#LoadPlugin("C:\PROGRA~1\GordianKnot\Convolution3d.dll")
LoadPlugin("C:\PROGRA~1\GordianKnot\FluxSmooth.dll")
#LoadPlugin("C:\PROGRA~1\GordianKnot\TomsMoComp.dll")
#LoadPlugin("C:\PROGRA~1\GordianKnot\VSFilter.dll")
#LoadPlugin("C:\PROGRA~1\GordianKnot\SimpleResize.dll")
#
# SOURCE
mpeg2source("C:\TURTLES_SCN\VIDEO_TS\tmnt ff.d2v")
#
#Import("C:\Documents and Settings\ZoNtO_the_KING\Desktop\mfToon-v0.52.avs")
#
#Import("C:\Documents and Settings\ZoNtO_the_KING\Desktop\HQDering-v0.1.avs")
#
# TRIM
#trim(startframe,endframe)
#
# IVTC
#Telecide(order=1,guide=1).Decimate()
# or use
#IVTC(44,11,95)
#GreedyHMA(1,0,4,0,0,0,0,0)
#
# CROPPING
crop(8,4,704,466)
#
# DEINTERLACING (1)
#FieldDeinterlace()
#FieldDeinterlace(blend=false)
#TomsMoComp(1,5,1)
#
# DEINTERLACING (2)
#KernelDeInt(order=1,sharp=true)
# or maybe
#DGBob(order=1,mode=0)
# DEINTERLACING (3) - special requests
#GreedyHMA(1,0,0,0,0,0,0,0)
#Telecide()
#SeparateFields()
#
#
# SUBTITLES
#VobSub("FileName")
#
# RESIZING
LanczosResize(640,464)
#
Undot()
#
# DENOISING: choose one combination (or none)
# 1) little noise
#Temporalsoften(2,3,3,mode=2,scenechange=6)
#mergechroma(blur(1.3))
#FluxSmooth(5,7)
#
# 2) medium noise
#Temporalsoften(3,5,5,mode=2,scenechange=10)
#Convolution3d("moviehq")
FluxSmooth(7,7)
#
# 3) heavy noise
#Temporalsoften(4,8,8,mode=2,scenechange=10)
#Convolution3d("movielq")
#FluxSmooth(10,15)
#
# BORDERS
#AddBorders(left,top,right,bottom)
#
# COMPRESSIBILITY CHECK
# !!!!Snip Size now has to be 14 for use in GKnot!
#SelectRangeEvery(280,14)
#
# FOOL CCEnc
#empty = BlankClip()
#AudioDub(last,empty)
#
#mfToon()
#
#HqDering()
__________________
AMD AthlonXP 1800+
Abit KX7-333R
512 MB Mushkin pc3000 DDR RAM
80 gb IBM 60gxp
Hercules 3D Prophet 8500 @ 300/300

http://www.battle.net/war3/ladder/w3xp-player-profile.aspx?Gateway=Sunken-Ruins&PlayerName=CacK
http://www.battle.net/war3/ladder/war3-player-profile.aspx?Gateway=Lordaeron&PlayerName=zonto
http://service.futuremark.com/compare?2k1=4303905
ZoNtO is offline   Reply With Quote
Old 16th January 2004, 16:15   #14  |  Link
mf
·
 
mf's Avatar
 
Join Date: Jan 2002
Posts: 1,729
That would probably work.
mf is offline   Reply With Quote
Old 16th January 2004, 16:24   #15  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364


Lines with # are comments. If you want to use mf's scripts, you have to remove the "#":

# PLUGINS
LoadPlugin("C:\PROGRA~1\GordianKnot\mpeg2dec3.dll")
LoadPlugin("C:\PROGRA~1\GordianKnot\undot.dll")

# Importing scripts
Import("C:\Documents and Settings\ZoNtO_the_KING\Desktop\mfToon-v0.52.avs")

Import("C:\Documents and Settings\ZoNtO_the_KING\Desktop\HQDering-v0.1.avs")

# SOURCE
mpeg2source("C:\TURTLES_SCN\VIDEO_TS\tmnt ff.d2v")

# CROPPING
crop(8,4,704,466)

# RESIZING
LanczosResize(640,464)

# Usage Undot
Undot()

# Usage scripts
mfToon()

HqDering()
Wilbert is offline   Reply With Quote
Old 16th January 2004, 16:41   #16  |  Link
mf
·
 
mf's Avatar
 
Join Date: Jan 2002
Posts: 1,729
Quote:
Originally posted by Wilbert

Lines with # are comments. If you want to use mf's scripts, you have to remove the "#":
Oh, I actually didn't even notice that.
mf is offline   Reply With Quote
Old 16th January 2004, 16:43   #17  |  Link
ZoNtO
Registered User
 
Join Date: Jun 2003
Location: Salt Lake City, UT
Posts: 7
Tried that, got this:

Avisynth open failure:
Script error: there is no function named "Unsharpmask"
(C:\Documents and Settings\ZoNtO_the_KING\Desktop\mfToon...line 79
(C:\Turtles_SCN\Video_ts\tmnt anime.avs, line 90)

Oh, and I did get those 3 dlls for mftoon as well, and put them in the load plugin part of the script.
__________________
AMD AthlonXP 1800+
Abit KX7-333R
512 MB Mushkin pc3000 DDR RAM
80 gb IBM 60gxp
Hercules 3D Prophet 8500 @ 300/300

http://www.battle.net/war3/ladder/w3xp-player-profile.aspx?Gateway=Sunken-Ruins&PlayerName=CacK
http://www.battle.net/war3/ladder/war3-player-profile.aspx?Gateway=Lordaeron&PlayerName=zonto
http://service.futuremark.com/compare?2k1=4303905

Last edited by ZoNtO; 16th January 2004 at 16:46.
ZoNtO is offline   Reply With Quote
Old 16th January 2004, 18:43   #18  |  Link
Bogalvator
Registered User
 
Join Date: Jun 2003
Location: Northampton, England
Posts: 187
You probably need the updated version of MaskTools:

http://forum.doom9.org/showthread.php?s=&threadid=67232
Bogalvator is offline   Reply With Quote
Old 16th January 2004, 19:02   #19  |  Link
ZoNtO
Registered User
 
Join Date: Jun 2003
Location: Salt Lake City, UT
Posts: 7
nope, tried that DL and it still gave me that error
__________________
AMD AthlonXP 1800+
Abit KX7-333R
512 MB Mushkin pc3000 DDR RAM
80 gb IBM 60gxp
Hercules 3D Prophet 8500 @ 300/300

http://www.battle.net/war3/ladder/w3xp-player-profile.aspx?Gateway=Sunken-Ruins&PlayerName=CacK
http://www.battle.net/war3/ladder/war3-player-profile.aspx?Gateway=Lordaeron&PlayerName=zonto
http://service.futuremark.com/compare?2k1=4303905
ZoNtO is offline   Reply With Quote
Old 16th January 2004, 19:12   #20  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,856
You need either WarpSharp or aWarpSharp : look on the avisynth's filter page to download them.
Manao 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 11:54.


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