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 30th October 2007, 11:07   #41  |  Link
legionator2
Leecher
 
legionator2's Avatar
 
Join Date: Aug 2007
Location: Vietnam
Posts: 19
I have tested some anti-aliasing script. Here are some pics :

Source :
http://i23.servimg.com/u/f23/11/31/41/30/shot210.jpg

AAA(xres=1024, yres=576, xshrp=20, yshrp=20, us=1, ds=2, chroma=true) :
http://i23.servimg.com/u/f23/11/31/41/30/shot410.jpg

AntiAliasing(th_luma=20, th_croma=20) :
http://i23.servimg.com/u/f23/11/31/41/30/shot510.jpg

SAA():
http://i23.servimg.com/u/f23/11/31/41/30/shot310.jpg

SAA()
SAA()
http://i23.servimg.com/u/f23/11/31/41/30/shot111.jpg

It seems like the SAA() script of Soulhunter gave the best result here. It even got rid of the halos, though the video looks a bit more blurry. It's a very nice function, but all of the anti-aliasing scripts seems to be slow like hell. I wonder if there's an equivalent method, but faster than this.

Last edited by legionator2; 30th October 2007 at 11:14.
legionator2 is offline   Reply With Quote
Old 30th October 2007, 16:44   #42  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,174
You can get some low-budget anti-aliasing with TIsophote, or Lanczos4Resize(width*2,height*2).BilinearResize(width,height), but they don't look nearly as good as the slower methods.
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order. ~ Ed Howdershelt
foxyshadis is offline   Reply With Quote
Old 31st October 2007, 21:33   #43  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,350
frfun7(1.01, 256, 256) Will give some very powerful, relatively quick antialiasing, but it blurs alot.
*.mp4 guy is offline   Reply With Quote
Old 1st November 2007, 17:58   #44  |  Link
Soulhunter
Bored...
 
Soulhunter's Avatar
 
Join Date: Apr 2003
Location: Unknown
Posts: 2,812
Quote:
Originally Posted by *.mp4 guy View Post
frfun7(1.01, 256, 256) Will give some very powerful, relatively quick antialiasing, but it blurs alot.
A hint to write a "FRFun7@EdgesOnly" AA function? ;]


Thx n' Bye
__________________

Visit my IRC channel
Soulhunter is offline   Reply With Quote
Old 2nd November 2007, 00:35   #45  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,350
Nah, I actually already tried that, its not neccesarily any better or faster then other aproaches, once you take care of certain dificulties (mainly all the extra blur, which can cause problems with masking), which is why I never mentioned it before; Of coarse thats not to say someone else coudn't do a better job then me at it and make it competitive. It is, however, usefull without masking, on already "ruined" sources where you need extremely strong antialiasing.
*.mp4 guy is offline   Reply With Quote
Old 2nd November 2007, 23:37   #46  |  Link
jethro
Registered User
 
Join Date: Mar 2006
Posts: 97
Quote:
Originally Posted by Soulhunter View Post
A hint to write a "FRFun7@EdgesOnly" AA function? ;]


Thx n' Bye
Yes, edges like in msharpen mask with adjustable detection...
jethro is offline   Reply With Quote
Old 18th March 2008, 13:24   #47  |  Link
Socio
Registered User
 
Join Date: May 2004
Posts: 291
I tried SAA and antialiasing they are indeed hella slow and got me thinking;

If video games can use the antialiasing features on video cards, in some cases even be forced to, could there not be a way for Avisynth to do the same and deinterlacing as well for that matter.

The speed increases alone would be phenomenal I would think.
Socio is offline   Reply With Quote
Old 18th March 2008, 15:09   #48  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,690
Quote:
Originally Posted by Socio View Post
I tried SAA and antialiasing they are indeed hella slow and got me thinking;

If video games can use the antialiasing features on video cards, in some cases even be forced to, could there not be a way for Avisynth to do the same and deinterlacing as well for that matter.

The speed increases alone would be phenomenal I would think.
Antialiasing on video cards relies on being able to render many samples per pixel and average them. You can't do this when you aren't rendering 3D graphics; when you're just using an ordinary input image, there's no real way to render more samples.
Dark Shikari is offline   Reply With Quote
Old 20th March 2008, 00:45   #49  |  Link
Socio
Registered User
 
Join Date: May 2004
Posts: 291
Quote:
Originally Posted by Dark Shikari View Post
Antialiasing on video cards relies on being able to render many samples per pixel and average them. You can't do this when you aren't rendering 3D graphics; when you're just using an ordinary input image, there's no real way to render more samples.
Maybe one could have it take samples from 30 frames ahead and 30 frames back to get enough samples but that would probably require a lot more ram for that data and make it slower than the AA scripts we have now.
Socio is offline   Reply With Quote
Old 20th March 2008, 01:26   #50  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,605
that's what is called temporal super resolution (TSR).
This also had been discussed here several years ago

http://forum.doom9.org/showpost.php?...3&postcount=19

http://forum.doom9.org/showthread.ph...&highlight=tsr
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 21st August 2009, 02:22   #51  |  Link
Chengbin
Registered User
 
Join Date: Oct 2007
Posts: 1,059
Where do I get the function "edgemask"?

EDIT: Nevermind, I needed masktool.dll, apparently it didn't work with masktool 26.

Wait, how do I use this? I wrote antialiasing(), and it had no effect.

Last edited by Chengbin; 21st August 2009 at 03:44.
Chengbin is offline   Reply With Quote
Old 20th November 2009, 02:55   #52  |  Link
maki
Registered User
 
Join Date: Nov 2009
Posts: 12
Hi can someone help with this:

This is without SAA

Quote:
import("C:\Program Files\AviSynth 2.5\plugins\AAA.avs")
import("C:\Program Files\AviSynth 2.5\plugins\SAA.avs")
import("C:\Program Files\AviSynth 2.5\plugins\Antialiasing.avs")
loadplugin("C:\Program Files\AviSynth 2.5\plugins\SangNom.dll")
loadplugin("C:\Program Files\AviSynth 2.5\plugins\UnFilter.dll")
loadplugin("C:\Program Files\AviSynth 2.5\plugins\MaskTools.dll")

MPEG2Source("C:\Documents and Settings\HP_Administrator\My Documents\Vocabulary\air sample.index\air sample.d2v",cpu=0,info=3)
AAA(xres=1024, yres=576, xshrp=20, yshrp=20, us=1, ds=2, chroma=true)
AntiAliasing(th_luma=20, th_croma=20)
http://i49.tinypic.com/2zoho55.jpg

http://i48.tinypic.com/2yl8gog.jpg

This is with SAA:

Quote:
import("C:\Program Files\AviSynth 2.5\plugins\AAA.avs")
import("C:\Program Files\AviSynth 2.5\plugins\SAA.avs")
import("C:\Program Files\AviSynth 2.5\plugins\Antialiasing.avs")
loadplugin("C:\Program Files\AviSynth 2.5\plugins\SangNom.dll")
loadplugin("C:\Program Files\AviSynth 2.5\plugins\UnFilter.dll")
loadplugin("C:\Program Files\AviSynth 2.5\plugins\MaskTools.dll")

MPEG2Source("C:\Documents and Settings\HP_Administrator\My Documents\Vocabulary\air sample.index\air sample.d2v",cpu=0,info=3)
AAA(xres=1024, yres=576, xshrp=20, yshrp=20, us=1, ds=2, chroma=true)
AntiAliasing(th_luma=20, th_croma=20)
SAA()
http://i48.tinypic.com/mvn6v7.jpg

http://i49.tinypic.com/v5ctwh.jpg

So here's my question I believe the one without SAA to be better, which should I chose and also, I want to keep the resolution at 1920x1080, if isn't possible at least 1280x720. I know I need to change something so when I keep the resolution at 1920x1080 or 1280x720 it would be of the same quality as the one above.

What do I need to change here:

Quote:
AAA(xres=1024, yres=576, xshrp=20, yshrp=20, us=1, ds=2, chroma=true)
AntiAliasing(th_luma=20, th_croma=20)
maki is offline   Reply With Quote
Old 20th November 2009, 04:36   #53  |  Link
canuckerfan
Registered User
 
Join Date: Jul 2005
Posts: 318
^you're calling an anti-aliasing filter multiple times in both attempts. unless you've got some serious aliasing you won't need so many calls. post a sample of what you're encoding and we can have a better look at how to tackle this.

but for what it's worth I think the one without SAA looks betters.

as for your resolution is your source 1024 by 576? in that case I'd do something like this:

AAA(xshrp=20, yshrp=20, us=1, ds=2, chroma=true)
Spline36Resize(1920,1080)
AntiAliasing(th_luma=20, th_croma=20)

but as always it really is up to how you wanna do this. btw you might wanna check out MCTemporalDenoisePP(). it's AA feature is also quite good.
canuckerfan is offline   Reply With Quote
Old 20th November 2009, 05:06   #54  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,567
maki
Looks like this is Air BD. To be honest I don't see a single reason why you want keep it 1080p. There is no details for that. This is actually upscale from SD... so you should be fine with 720p. Especially with this horrible source since it needs heavy filtering. Unprocessed sample would be fine, maybe there is some tricks and someone will be able to suggest you a better script.

Anyway you probably need to change this:
AAA(xres=1280, yres=720, xshrp=20, yshrp=20, us=1, ds=2, chroma=true)

Last edited by Keiyakusha; 20th November 2009 at 05:46.
Keiyakusha is offline   Reply With Quote
Old 21st November 2009, 00:32   #55  |  Link
maki
Registered User
 
Join Date: Nov 2009
Posts: 12
Okay so here's the original mpv file this file is cut, so it's around 2 minutes long, I know that the size is big for a 2 minute video, but I believe that starting with the source is the way to go. Here you go:

http://www.megaupload.com/?d=7HGV2SL0

Here's a m2st file. It's around 86 mb. If this work as well than here:

http://www.megaupload.com/?d=BQ0LSSG1

Can someone help me here.

Last edited by maki; 22nd November 2009 at 08:35.
maki is offline   Reply With Quote
Old 23rd November 2009, 08:11   #56  |  Link
maki
Registered User
 
Join Date: Nov 2009
Posts: 12
Ok so I changed the resolution and this how it looks:

http://i49.tinypic.com/5o5k4g.jpg



Do I need to change anything---xshrp=20, yshrp=20, us=1, ds=2, chroma=true----- and ----AntiAliasing(th_luma=20, th_croma=20)----- so that it might look a little bit better, or does anyone know which filter can improve the video to a much better quality?

Can someone please help me here.

Last edited by maki; 23rd November 2009 at 20:25.
maki is offline   Reply With Quote
Old 24th November 2009, 04:57   #57  |  Link
martre
Registered User
 
Join Date: Oct 2007
Posts: 12
Hello, your samples weight to much, almost 500mb. For what i see on your last picture your dvd is grainy and need chroma cleaning. For the colours you may use something like:

Code:
coloryuv(levels="tv->pc",gain_u=25).tweak(hue=10,sat=1.2,cont=.9)
You can keep on playin with the numbers yourself.
saluts
martre is offline   Reply With Quote
Old 24th November 2009, 19:50   #58  |  Link
maki
Registered User
 
Join Date: Nov 2009
Posts: 12
Right now I just want to change the AntiAliasing. I want to get rid of the jitteriness outlining the characters. I want smooth black lines.

Like here:

http://i48.tinypic.com/2yl8gog.jpg

Except I want the resolution to be at 1280x720.

I used your filter, and this is what I got:

http://i46.tinypic.com/2nklv60.jpg

Quote:
import("C:\Program Files\AviSynth 2.5\plugins\AAA.avs")
import("C:\Program Files\AviSynth 2.5\plugins\SAA.avs")
import("C:\Program Files\AviSynth 2.5\plugins\Antialiasing.avs")
loadplugin("C:\Program Files\AviSynth 2.5\plugins\SangNom.dll")
loadplugin("C:\Program Files\AviSynth 2.5\plugins\UnFilter.dll")
loadplugin("C:\Program Files\AviSynth 2.5\plugins\MaskTools.dll")

MPEG2Source("C:\Documents and Settings\HP_Administrator\My Documents\Vocabulary\air sample.index\air sample.d2v",cpu=0,info=3)
AAA(xres=1280, yres=720, xshrp=20, yshrp=20, us=1, ds=2, chroma=true)
AntiAliasing(th_luma=20, th_croma=20)
coloryuv(levels="tv->pc",gain_u=25)
I took out----.tweak(hue=10,sat=1.2,cont=.9)----. the color was too dark.

It's an improvement from this:

http://i49.tinypic.com/5o5k4g.jpg

A filter that might improve AntiAliasing would be nice. Any ideas?
maki is offline   Reply With Quote
Old 22nd December 2009, 00:28   #59  |  Link
Lyris
Registered User
 
Join Date: Sep 2007
Location: Europe
Posts: 587
Thanks to the script writers - I used this on a source which had bad aliasing and DV compression artefacts which is going through CCE SP2 for DVD.

Before (200% pixel resize):



After:



Loss of detail is minimal, pleased with the results. Shame the guys who shot it couldn't supply a lossless version when asked.

Last edited by Lyris; 22nd December 2009 at 00:31.
Lyris is offline   Reply With Quote
Old 21st December 2010, 22:12   #60  |  Link
Porsche_fan
Registered User
 
Join Date: May 2007
Posts: 19
Go easy on me this is my first attempt to share something. All the credit goes to SpikeSpiegel & Didée among others. I am just sharing some modifications I made to the original script which I have found helpful…especially for HD content.

The main difference is the ability to fine tune the supersampling factor to include factional numbers instead of being locked into whole numbers. Fractional numbers help mitigate the trade off in supersampling. The larger the supersampling the less negative effects such as blurring but also the less aliasing is correctable…it is a balancing act.

I also prefer unsharpmask as a sharpener and positioned it in the script so sharpening is supersampled to reduce unwanted side effects. LimitedSharpenFaster is commented out for those who prefer it.

Lastly, I have found the original version of SangNom is about 4x faster on my quadcore than the more current versions. Unfortunately it does have a very slightly lower quality but it is hardly perceivable. http://mf.creations.nl/avs/filters/SangNom_old2.dll



Code:
# AAAmod
#
# Thanks @ SpikeSpiegel, Didée, mf, Akirasuto & ScharfisBrain...
#________________________________________________________________________________________
#
# Usage: AAAmod(Xres, Yres, Shrp, Us, Ds, chroma, Order, AAstr, ss_x, ss_y)
#________________________________________________________________________________________
#
# Xres/Yres = The final resolution... InputSize = OutputSize is the default
#
# Shrp = Unsharpmask strength... 30 is the default
#
# Us = Resizer for upsampling... 0 = PointResize (default) / 1 = Lanczos
#
# Ds = Resizer for downsampling... 0 = Bilinear (default) / 1 = Bicubic Catmull-Rom / 2 = Lanczos
#
# Chroma = Enable/disable chroma antialiasing... Disable = false (default) / enable = true
#
# Order = 0=Top Field, 1= Bottom Field, 2= Bob... default is 1
#
# AAstr = Anti-Aliasing strength in Sangnom... default is 48
#
# ss_x = Supersampling coefficient for x effective range 2.0-3.0... if using Pointresize then set to 2.0
#
# ss_y = Supersampling coefficient for y effective range 2.0-3.0... if using Pointresize then set to 2.0
#
#________________________________________________________________________________________
#
# Example...
#
#Import("C:\Programme\AviSynth 2.5\plugins\AAAmod.avs")
# 
# AAAmod(656,480,40,1,2,chroma=false,order=1,AAstr=48,ss_x=2.15,ss_y=2.25)
#________________________________________________________________________________________

function AAAmod(clip clp, int "Xres", int "Yres", int "Shrp",  
\ int "US", int "DS", bool "chroma", int "order", int "AAstr", float "ss_x", float "ss_y")
      {
        clp = clp.isYV12() ? clp : clp.ConvertToYV12()
        ox = clp.width
        oy = clp.height
        Xres  = default(Xres,  ox)
        Yres  = default(Yres,  oy)
        Shrp = default(Shrp, 30)
        us  = default(us, 1)
        ds = default(ds, 2)
        chroma = default(chroma, false)
        order = Default(order, 1) # 0=Top Field, 1= Bottom Field, 2= Bob
        AAstr = Default(AAstr, 48)
        ss_x = default(ss_x, 2) #For pointresize use 2.0
        ss_y = default(ss_y, 2) #For pointresize use 2.0

        xxs=round(ox*ss_x/8)*8
        yys=round(oy*ss_y/8)*8




        
        us==0 ? clp.PointResize(xxs,yys) : clp.Lanczos4Resize(xxs,yys)

        TurnLeft()
        SangNom(order,AAstr)


        TurnRight()
        SangNom(order,AAstr)



UnsharpMask(Shrp)
#LimitedSharpenFaster(ss_x=1.0,ss_y=1.0, Smode=4, strength=200)

        ds==0 ? BilinearResize(Xres,Yres) : 
\ ds==1 ? BicubicResize(Xres,Yres,0,.5) : 
\ LanczosResize(Xres,Yres)

        

        chroma ? MergeChroma(clp.Lanczosresize(Xres,Yres)) : last

        }

Last edited by Porsche_fan; 22nd December 2010 at 09:43.
Porsche_fan 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:09.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.