Log in

View Full Version : Error with Limited Sharpen


Mounir
22nd November 2010, 13:56
For the life of me, i can't figure out what's wrong with this filter, so help is welcome:

Import("C:\Program Files\AviSynth 2.5\plugins\LimitedSharpenFaster.avs")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\masktools-v2.0a36\mt_masktools-25.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MaskTools-v1.5.8\MaskTools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrain_v0.9\RemoveGrainSSE3.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\warpsharp_25\warpsharp.dll")
##############################################################################
Avisource("MyVideo.avi") # YUY2 video

ConverttoYV12(interlaced=true)

### LimitedSharpenFaster #####
LimitedSharpenFaster(ss_x=1.5,ss_y=1.0,Smode=4,strength=100,soft=-1,edgemode=1)

Error seems to be located in the LimitedSharpenFaster.avs script itself, line 102, sup with that ?

Other error: line 13 in my own script
"RemoveGrain: invalid mode"


I have a pentium 4, support SSE3, i tried all the removegrain dll's anyway, no luck

Didée
22nd November 2010, 14:49
Hurdy-Gurdy!


[hurdy-gurdy]

Dont use ancient versions. Use RemoveGrain v1.0 (http://home.arcor.de/kassandro/RemoveGrain/RemoveGrain.rar).

[/hurdy-gurdy] ;)



Also - http://forum.doom9.org/showthread.php?p=1337452#post1337452

And just yesterday - http://forum.doom9.org/showthread.php?p=1459233#post1459233

talen9
22nd November 2010, 14:49
My "RemoveGrainSSE3.dll", which correctly works with LSF, is dated "April 30th, 2005" ... RemoveGrain versioning is a mess, it very likely that you tried lots of versions but not the right one ...

EDIT: ok, here's Didée :p

Mounir
22nd November 2010, 15:04
Thanks, that's helping a lot, no errors now. Now i need to figure out how to get the best with this filter, harsh task it seems

Didée
22nd November 2010, 15:12
Looking at your initial script, there is a problem ...

ConvertToYV12(interlaced=true)

1) If the video is interlaced, you cannot (should not) use LSF directly. LSF works only correctly on progressive video.

2) If the video in fact is progressive, then your ConvertToYV12 is bad.

Mounir
22nd November 2010, 15:40
Alright, that's noted so i guess i should use SeparateFields + Weave.
One thing i don't understand is the video is resized to 976x480 (original=720x480)


Speaking of SeparateFields, i'm wondering one thing since i tend to play virtualdub's filters aswell. Should i use it before converting to RGB or not ?


My Script so far:

Import("C:\Program Files\AviSynth 2.5\LimitedSharpenFaster.avs")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\masktools-v2.0a36\mt_masktools-25.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MaskTools-v1.5.8\MaskTools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrain_v1.0\RemoveGrainSSE3.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\warpsharp_25\warpsharp.dll")
#
#
##############################################################################
#
#
function int2mode(int index) { return Select(index, "classic", "levels", "color") } # for histogram
Avisource("E:\MyVideo.avi")
#
####### Saturation, Constrast withTweak #######
"[<separator="Tweak Parameters">]"
Tweak([<"hue", -180, 180, 10.2>],[<"sat", 0.0, 10.0, 1.4>],[<"bright", -255, 255, 22>],[<"cont", 0.0, 10, 0.9>])
#
AssumeTFF.ConverttoYV12(interlaced=true) # for histogram
#
Histogram(int2mode([<"HistogramMode", 0, 2, 1>])) # for histogram

#### Crop , addborder #####
Crop(0,0,0,-8) # (RGB=mod2, YUY2=mod2, YV12=mod4) / Progressive: YV12=mod4, no restriction otherwise
#AddBorders: $000000 = (for CCIR-601) color (luma=16)
AddBorders(0, 4, 0, 4, $000000)
#
#
#### LIMITED SHARPEN ####
SeparateFields()
LimitedSharpenFaster(ss_x=1.5,ss_y=1.0,Smode=4,strength=100,soft=-1,edgemode=1,wide=true)
Weave()

Gavino
22nd November 2010, 16:57
One thing i don't understand is the video is resized to 976x480 (original=720x480)
That's because Histogram() adds 256 pixels to one side (for the histogram :)).
Speaking of SeparateFields, i'm wondering one thing since i tend to play virtualdub's filters aswell. Should i use it before converting to RGB or not ?
Depends on what filters you are using.
But you should certainly use ConvertToRGB(interlaced=true).

Mounir
22nd November 2010, 17:19
That's because Histogram() adds 256 pixels to one side (for the histogram :)).

Depends on what filters you are using.
But you should certainly use ConvertToRGB(interlaced=true).
Oh yeah you're right about the histogram, my mistake
I do use interlaced=true for rgb, thanks for the confirmation, i'm on the right path