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 19th May 2009, 00:24   #1  |  Link
Ma-Xell
Somewhere Back in Time
 
Ma-Xell's Avatar
 
Join Date: Jul 2008
Location: Hungary
Posts: 61
swscaler

In ffdshow there is a sharpening filter called swscaler, which produces nice results.
Is this filter available for avisynth or vdub?
What sharpening filter do you people recommend?
Ma-Xell is offline   Reply With Quote
Old 19th May 2009, 01:22   #2  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
After looking at the source code for it, all it appears to be capable of doing is to apply a typical gaussian blur or the normal [-1 2 -1] sharpening kernel blended with the original image. Try sharpen(), I think it works about the same really. I am now officially disappointed after looking at the code.

I was going to add it to my FFMS2 package but now it seems completely redundant...
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet

Last edited by Myrsloik; 19th May 2009 at 01:28.
Myrsloik is offline   Reply With Quote
Old 19th May 2009, 11:50   #3  |  Link
martino
masktools2 (ab)user
 
martino's Avatar
 
Join Date: Oct 2006
Location: PAL-I :(
Posts: 235
Code:
# SWScalerSharpen() v1.00 (28/08/08)
# - a function that provides easy access to ffdshow's swscaler sharpener
#
# Requierments:
# ffavisynth and YV12/YUY2/RGB colorspace
#
# Parameters:
# lsharp (integer)  - swscaler luma sharpnening strength (32)
# csharp (integer)  - swscaler chroma sharpnening strength (32)
# ssw (integer)     - supersample factor horizontally (1)
# ssh (integer)     - supersample factor vertically (1)

function SWScalerSharpen(clip c, int "lsharp", int "csharp", int "ssw", int "ssh") {
    
    lsharp  = Default(lsharp,32)
    csharp  = Default(csharp,32)
    ssw     = Default(ssw,1)
    ssh     = Default(ssh,1)
    
    Assert(ssh>=1 && ssw>=1, "SWScalerSharpen(): ssw and ssh cannot be less than one")
    
    main    = (ssw==1 && ssh==1) ? c.ffdshow(options="xsharpen=1,sharpenMethod=5,mplayerSharpLuma="+String(lsharp)+",mplayerSharpChroma="+String(csharp)) : \
            c.LanczosResize(c.width*ssw,c.height*ssh). \
            ffdshow(options="xsharpen=1,sharpenMethod=5,mplayerSharpLuma="+String(lsharp)+",mplayerSharpChroma="+String(csharp)). \
            LanczosResize(c.width,c.height)
    
    return main
    
}

# Changelog:
#   28/08/2008  v1.00
#       - initial version
Make sure to load ffdshow's AviSynth plugin in your script, also I can't guarantee for the correctness of the above code. I haven't looked at it, or used it, ever since I decided to waste my time to play with it. Also, the sharpening isn't that great; read Myrsloik's post.
__________________
My x264 builds (win32 only up to rev965) and useless AviSynth functions -- use at your own risk

Last edited by martino; 19th May 2009 at 11:56.
martino is offline   Reply With Quote
Old 19th May 2009, 14:59   #4  |  Link
rfmmars
Registered User
 
Join Date: Feb 2004
Posts: 743
Quote:
Originally Posted by Ma-Xell View Post
In ffdshow there is a sharpening filter called swscaler, which produces nice results.
Is this filter available for avisynth or vdub?
What sharpening filter do you people recommend?
Yes there's a Vdub plugin, when you install ffdshow, a plugin call "ffvdub.vdf" is unpacked in the ffdshow folder. Copy it to the Vdub plugin folder.

Richard
photorecall.net
rfmmars is offline   Reply With Quote
Old 19th May 2009, 17:31   #5  |  Link
Ma-Xell
Somewhere Back in Time
 
Ma-Xell's Avatar
 
Join Date: Jul 2008
Location: Hungary
Posts: 61
thanks
Ma-Xell is offline   Reply With Quote
Reply

Tags
ffdshow, sharpening, swscaler

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 00:12.


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