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 5th January 2005, 20:40   #41  |  Link
Ark
Aikidoka
 
Ark's Avatar
 
Join Date: Nov 2003
Location: Italy
Posts: 216
Quote:
Originally posted by Didée
Hah, I found an even faster method than this aSharp().aWarpsharp() combo !!!

Try the following:

sharpen(0.2)

W00T!

***

But seriously. A method to *really* do a minimal version of LS was pointed out by kassandro, uses his RemoveGrain filter set, and was named ModerateSharpen():
Code:
#  a function by kassandro.
# (just made "repmode" a parameter / Didée)

function ModerateSharpen(clip input, float amount, int "repmode")
{
	repmode = default(repmode,1)
	sharpened = Sharpen(input, amount)
	return Repair(sharpened, input, mode=repmode)
}
This one should run above realtime without any problems. Practicable "repmode"s are 1 & 2. Maximal "amount" is 1.0, but one should use less, because of the aliasing problem.
I tried it some time ago and for me it's veeeery like an XSharpen without those "dancing" pixels seen in XSharpen used at high values, so it can be a nice candidate for "supersampled" use, from the simplest

Code:
Lanczosresize(x*2,y*2).Moderatesharpen(1.0).Lanczosresize(x,y)
to more the complicted ways *you* can think of .....
__________________
Xvid fan ;)

Last edited by Ark; 5th January 2005 at 22:19.
Ark is offline   Reply With Quote
Old 6th January 2005, 00:40   #42  |  Link
Socio
Registered User
 
Join Date: May 2004
Posts: 288
Quote:
Originally posted by Didée

But seriously. A method to *really* do a minimal version of LS was pointed out by kassandro, uses his RemoveGrain filter set, and was named ModerateSharpen():
Code:
#  a function by kassandro.
# (just made "repmode" a parameter / Didée)

function ModerateSharpen(clip input, float amount, int "repmode")
{
	repmode = default(repmode,1)
	sharpened = Sharpen(input, amount)
	return Repair(sharpened, input, mode=repmode)
}
This one should run above realtime without any problems. Practicable "repmode"s are 1 & 2. Maximal "amount" is 1.0, but one should use less, because of the aliasing problem.

I tried it out and it is no LS-LS2 but does do a nice job and very light on resources.

BTW: If I go past 0.2 I will get similar edge jaggies that I get with LS2-Thresh above 0.5, very strange.

Last edited by Socio; 6th January 2005 at 01:20.
Socio is offline   Reply With Quote
Old 19th January 2005, 02:19   #43  |  Link
dvwannab
Registered User
 
Join Date: Feb 2002
Posts: 76
need more help

some help please. I am getting a VDmod error : "there is no function asharp" line 63.

script:

LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\dgdecode.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\plugins\MaskTools.dll")
Import("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\plugins\limitedsharpen2.avs")
mpeg2source("D:\ReplayTV\Local_Guide\FraCro.d2v")
Limitedsharpen2(ss_x=1,ss_y=1,Smode=4,aSharpS=0.4,aWThresh=0.99)

__________________________________________
code:

# LimitedSharpen2()
#
# A multi-purpose sharpener by Didée, hacked by Akirasuto n' Soulhunter... ^^
#

function LimitedSharpen2( clip clp,
\ float "ss_x", float "ss_y",
\ int "dest_x", int "dest_y",
\ int "Smode" , int "strength", int "radius",
\ int "Lmode", bool "wide", int "overshoot",
\ bool "soft", int "edgemode", bool "special",
\ float "aSharpS", float "aWThresh", int "exborder" )
{
ox = clp.width
oy = clp.height
ss_x = default( ss_x, 1 )
ss_y = default( ss_y, 1 )
dest_x = default( dest_x, ox )
dest_y = default( dest_y, oy )
Smode = default( Smode, 4 )
strength = Smode==1
\ ? default( strength, 160 )
\ : default( strength, 100 )
strength = Smode==2&&strength>100 ? 100 : strength
radius = default( radius, 2 )
Lmode = default( Lmode, 1 )
aSharpS = default(aSharpS, 0.5)
aWThresh = default(aWThresh,0.75)
wide = default( wide, false )
overshoot= default( overshoot, 1)
overshoot= overshoot<0 ? 0 : overshoot
soft = default( soft, false )
edgemode = default( edgemode, 0 )
special = default( special, false )
exborder = default( exborder, 0)
xxs=round(ox*ss_x/8)*8
yys=round(oy*ss_y/8)*8
smx=exborder==0?dest_x:round(dest_x/Exborder/4)*4
smy=exborder==0?dest_y:round(dest_y/Exborder/4)*4

clp.isYV12() ? clp : clp.converttoyv12()

ss_x != 1.0 || ss_y != 1.0 ? last.lanczosresize(xxs,yys) : last
tmp = last

edge = logic( tmp.DEdgeMask(0,255,0,255,"5 10 5 0 0 0 -5 -10 -5", divisor=2)
\ ,tmp.DEdgeMask(0,255,0,255,"5 0 -5 10 0 -10 5 0 -5", divisor=2)
\ ,"max").levels(0,0.86,128,0,255,false)

bright_limit = (soft == true) ? tmp.blur(1.0) : tmp
dark_limit = bright_limit.inpand()
bright_limit = bright_limit.expand()
dark_limit = (wide==false) ? dark_limit : dark_limit .inflate.deflate.inpand()
bright_limit = (wide==false) ? bright_limit : bright_limit.deflate.inflate.expand()
minmaxavg = special==false
\ ? yv12lutxy(bright_limit,dark_limit,yexpr="x y + 2 /")
\ : maskedmerge(dark_limit,bright_limit,tmp,Y=3,U=-128,V=-128)

Str=string(float(strength)/100.0)
normsharp = Smode==1 ? unsharpmask(strength,radius,0)
\ : Smode==2 ? sharpen(float(strength)/100.0)
\ : Smode==3 ? yv12lutxy(tmp,minmaxavg,yexpr="x x y - "+Str+" * +")
\ : asharp(aSharpS,0,0).awarpsharp(3,1,bm=3,cm=0,aWThresh)

OS = string(overshoot)
Lmode == 1 ? yv12lutxy( bright_limit, normsharp, yexpr="y x "+OS+" + < y x "+OS+" + ?")
\ : yv12lutxy( bright_limit, normsharp, yexpr="y x "+OS+" + < y x y x - "+OS+" - 1 2 / ^ + "+OS+" + ?")
Lmode == 1 ? yv12lutxy( dark_limit, last, yexpr="y x "+OS+" - > y x "+OS+" - ?")
\ : yv12lutxy( dark_limit, last, yexpr="y x "+OS+" - > y x x y - "+OS+" - 1 2 / ^ - "+OS+" - ?")

edgemode==0 ? NOP
\ : edgemode==1
\ ? MaskedMerge(tmp,last,edge.inflate.inflate.blur(1.0),Y=3,U=1,V=1)
\ : MaskedMerge(last,tmp,edge.inflate.inflate.blur(1.0),Y=3,U=1,V=1)

(ss_x != 1.0 || ss_y != 1.0)
\ || (dest_x != ox || dest_y != oy) ? lanczosresize(dest_x,dest_y) : last

ex=blankclip(last,width=smx,height=smy,color=$FFFFFF).addborders(2,2,2,2).coloryuv(levels="TV->PC")
\.blur(1.3).inpand().blur(1.3).bicubicresize(dest_x,dest_y,1.0,.0)
tmp=clp.lanczosresize(dest_x,dest_y)

clp.isYV12() ? ( exborder==0 ? tmp.mergeluma(last)
\ : maskedmerge(tmp,last,ex,Y=3,U=1,V=1) )
\ : ( exborder==0 ? tmp.mergeluma(last.converttoyuy2())
\ : tmp.mergeluma( maskedmerge(tmp.converttoyv12(),last,ex,Y=3,U=1,V=1)
\ .converttoyuy2()) )

return last
}
#
dvwannab is offline   Reply With Quote
Old 19th January 2005, 02:33   #44  |  Link
Socio
Registered User
 
Join Date: May 2004
Posts: 288
You need to download aWarpsharp and aSharp plugins and load them as well.


Should look like this:

SetMemoryMax(96)

Import("C:\Program Files\AviSynth 2.5\plugins\LimitedSharpen2.avs")



LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MaskTools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\WarpSharp.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\asharp.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\aWarpSharp.dll")



LimitedSharpen2( ss_x=1.0, ss_y=1.0,
\ Smode=4, strength=40, radius=2,aSharpS=1,
\ Lmode=1, wide=false, overshoot=1,
\ soft=false, edgemode=0, special=false,
\ exborder=0 )
Socio is offline   Reply With Quote
Old 19th January 2005, 08:00   #45  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,799
Trust me, you don't want to put any warpsharp.dll in the autoloading plugins folder. Just to be safe you know
__________________
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 20th January 2005, 18:19   #46  |  Link
dvwannab
Registered User
 
Join Date: Feb 2002
Posts: 76
thanks

thanks guys, it worked. Looks good
dvwannab is offline   Reply With Quote
Old 20th January 2005, 20:52   #47  |  Link
dvwannab
Registered User
 
Join Date: Feb 2002
Posts: 76
one question

what does SetMemoryMax() do and what is the purpose?
dvwannab is offline   Reply With Quote
Old 20th January 2005, 22:38   #48  |  Link
DeepDVD
DVD Destroyer
 
Join Date: Dec 2003
Location: Land of the burning embacies
Posts: 68
Re: one question

Quote:
Originally posted by dvwannab
what does SetMemoryMax() do and what is the purpose?
It's a limitation of memory usage. Some buggy filters don't work without a limitation as i read in some threads before. Also you can handle the usage by yourself for whatever reason
DeepDVD is offline   Reply With Quote
Old 21st January 2005, 08:09   #49  |  Link
Leak
ffdshow/AviSynth wrangler
 
Leak's Avatar
 
Join Date: Feb 2003
Location: Austria
Posts: 2,441
Quote:
Originally posted by Boulder
Trust me, you don't want to put any warpsharp.dll in the autoloading plugins folder. Just to be safe you know
I agree - but we're talking about aWarpSharp here, which I never had a problem with when it's autoloaded; it's the non-"a" warpsharp DLLs that cause trouble.

Last edited by Leak; 21st January 2005 at 08:56.
Leak is offline   Reply With Quote
Old 21st January 2005, 08:16   #50  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,799
Yep, I should have been a bit more clear..I meant any of the warpsharp.dlls that are out there. I think there are several of which some seem to work and some don't
__________________
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 5th February 2005, 03:08   #51  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
Soulhunter,
how i can download files (plugins) noted in first post of the thread?
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 5th February 2005, 10:06   #52  |  Link
Soulhunter
Bored...
 
Soulhunter's Avatar
 
Join Date: Apr 2003
Location: Unknown
Posts: 2,812
Ok, I have updated the link in my first post...


Bye
__________________

Visit my IRC channel
Soulhunter is offline   Reply With Quote
Old 5th February 2005, 10:51   #53  |  Link
Leak
ffdshow/AviSynth wrangler
 
Leak's Avatar
 
Join Date: Feb 2003
Location: Austria
Posts: 2,441
Quote:
Originally posted by Soulhunter
Ok, I have updated the link in my first post...
How about sharing it using http://www.rapidshare.de/en/main.html?

That'd be less awkward than using GMX for this...

np: Radiohead - I Might Be Wrong (Amnesiac)
Leak is offline   Reply With Quote
Old 5th February 2005, 11:39   #54  |  Link
Soulhunter
Bored...
 
Soulhunter's Avatar
 
Join Date: Apr 2003
Location: Unknown
Posts: 2,812
Thanks for the hint, here is the link... ^^

There should be a sticky with a list of free hosting like ImageShack or RapidShare!


Bye
__________________

Visit my IRC channel

Last edited by Soulhunter; 4th May 2006 at 03:10.
Soulhunter is offline   Reply With Quote
Old 14th February 2005, 03:41   #55  |  Link
unimatrixzer0
Registered User
 
Join Date: Jan 2003
Posts: 61
I coped the code from the first page and downloaded the 2 dll's but I'm getting this error everytime I load my avs into vdubmod,

Quote:
Script error: there is no fuction named "yv12lutxy"
unimatrixzer0 is offline   Reply With Quote
Old 14th February 2005, 06:18   #56  |  Link
Soulhunter
Bored...
 
Soulhunter's Avatar
 
Join Date: Apr 2003
Location: Unknown
Posts: 2,812
@ unimatrixzer0

Hrm, maybe you need the latest version of MaskTools!?


Bye
__________________

Visit my IRC channel

Last edited by Soulhunter; 4th May 2006 at 03:10.
Soulhunter is offline   Reply With Quote
Old 14th February 2005, 09:01   #57  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
Outdated link, Soulhunter

http://manao4.free.fr
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 14th February 2005, 09:19   #58  |  Link
Soulhunter
Bored...
 
Soulhunter's Avatar
 
Join Date: Apr 2003
Location: Unknown
Posts: 2,812
Quote:
Originally posted by Didée

Outdated link, Soulhunter

http://manao4.free.fr
Doh! ^^;


Bye
__________________

Visit my IRC channel

Last edited by Soulhunter; 4th May 2006 at 03:10.
Soulhunter is offline   Reply With Quote
Old 8th May 2005, 14:37   #59  |  Link
ADLANCAS
Registered User
 
ADLANCAS's Avatar
 
Join Date: Apr 2003
Location: Brazil
Posts: 247
How could I download files from the first post (including dlls) ?

Thanks,

Alexandre
ADLANCAS is offline   Reply With Quote
Old 8th May 2005, 15:13   #60  |  Link
Soulhunter
Bored...
 
Soulhunter's Avatar
 
Join Date: Apr 2003
Location: Unknown
Posts: 2,812
Quote:
Originally posted by ADLANCAS

How could I download files from the first post (including dlls) ?
Fresh link... ^^


Bye
__________________

Visit my IRC channel

Last edited by Soulhunter; 4th May 2006 at 03:11.
Soulhunter 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 10:05.


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