Upscaling Xvid using Avisynth

Posted by admin on Mar 16, 2012 in HTPC, MediaPortal |

I knew that ffdshow could use avisynth for complex scaling and sharpening but only recently had the time to play around with it. I’m pretty happy with the results.

This tutorial was the basis of my experimentation –

There are a number of software versions of all the associated plugins so these are the ones I used.

Downloaded the standard avisynth 2.6 from SF
googled “avisynth 2.6 MT download” for the Multithreaded version of avisynth – and overwrite the avisynth DLL in the windows system directory
googled “LimitedSharpenFaster” for home page –
and downloaded prerequisites, RemoveGrain.rar and LimitedSharpenFaster.avsi which is in masktools.

Then installed the following script in ffdshow.

dispWidth = 1920
dispHeight = 1080
mWidth = float(last.width)
mHeight = float(last.height)
ratio = (mWidth/mHeight)
newHeight= round((dispWidth/ratio)/2)*2
newHeight > dispHeight ? Eval("""
""") : Eval("""
GetMTMode(false) > 0 ? distributor() : last

Note that LimitedSharpenFaster is placed before the resize because this did not work when placed after it during testing.

The following screen shot shows a comparison with a Kung Fu Panda trailer although its a bit hard to see the difference, the detail is discernable. Kung Fu Panda

A similar improvement can be gained using ffdshow alone by using the built-in resize & aspect filter and resizing to 1920 x 1080. On the settings tab, set the Luma method to spline and the Chroma method to bicubic. Then adjust the Luma and Chroma sharpen settings to around 0.75.

In my opinion, the avisynth sharpening seems slightly warmer and brighter but that’s a subjective personal preference.

This soon to be moot because most dowloaded movies and TV will be in H.264 codec anyway.

I added an additional filter that provides temporal filtering so the filters in the script now look like this.


Leave a Reply

XHTML: You can use these tags:' <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Copyright © 2008-2018 Brinsmead Data Services All rights reserved.