View Full Version : good way to upscale (4:3 to 16:9)
byme
1st December 2012, 05:36
I read that the best is nnedi3
is true?
http://jeanbruenn.info/2011/10/30/upscaling-in-avisynth-comparison-of-resizers/
I do not know how it works
you tell me?
I tried so:
nnedi3(1024, 576)
but does not work
What should I write?
alternatively what method do you recommend?
thanks
Revgen
1st December 2012, 06:04
nnedi3 does a very good job of keeping upsized images from aliasing too much. If you don't like aliasing, nnedi3 may be "best" for you.
You need to load the nnedi3 plugin. And you need to use the nnedi3_rpow2 parameter that comes with the plugin. Download the plugin at http://web.missouri.edu/~kes25c/. Put the nnedi3.dll into your avisynth plugins folder. Read the readme txt that comes with the plugin. It will tell you how to use nnedi3_rpow2.
TheSkiller
1st December 2012, 12:04
You're not clear on what you're actually up to. "Upscaling 4:3 to 16:9" doesn't help much.
It depends on the source, what you're trying to archive and what's your destination media (you know, DVD, BluRay, Internet, PC).
NNEDI3_rpow2() will multiply the width and height by powers of 2 (i.e. 2, 4, 8...), it needs to be followed by an ordinary resizer if you're after a different size.
Gavino
1st December 2012, 13:04
NNEDI3_rpow2() will multiply the width and height by powers of 2 (i.e. 2, 4, 8...), it needs to be followed by an ordinary resizer if you're after a different size.
Not necessarily followed by an ordinary resizer - the other resizer can be invoked inside nnedi3_rpow2() by using the cshift/fwidth/fheight parameters.
However if, as I suspect, all byme wants to do is resize a 16:9 anamorphic SD clip to 'square pixels', he might as well just use a standard resizer (eg Spline36Resize (http://avisynth.org/mediawiki/Spline36Resize)()) directly, as nnedi3 provides no advantages.
Overdrive80
1st December 2012, 19:13
You could try it nnedi3_rpow2(rfactor=4,cshift="spline36resize",fwidth=1024,fheight=576,nsize=3,nns=4,pscrn=4)
Gavino
1st December 2012, 19:20
nnedi3_rpow2(rfactor=4,cshift="spline36resize",fwidth=1024,fheight=576,nsize=3,nns=4,pscrn=4)
Why rfactor=4?
Assuming an SD source of 720x576, that will expand the width to 2880 with nnedi3, then downscale to 1024 with spline36resize. I would have thought rfactor=2 would be more appropriate (or, as I suggested earlier, perhaps just use spline36 on its own without nnedi3).
byme
1st December 2012, 19:37
I do a resize from 720x576 to 1024x576
What should write exactly?
with: NNEDI3_rpow2(cshift=Spline36(1024, 576)) or NNEDI3_rpow2(cshift=Spline36Resize(1024, 576)) does not work
but using the Spline36Resize inside NNEDI3, is not the same thing that directly use the Spline36Resize (says Gavino)?
I tried this plugin for virtualdub
http://www.infognition.com/super_resolution_vdf/
or
http://www.infognition.com/VideoEnhancer/
seems to do slightly better of Spline36, but little
byme
1st December 2012, 19:42
ok, you have anticipated while I writing
then it is correct?:
nnedi3_rpow2(rfactor=2,cshift="spline36resize",fwidth=1024,fheight=576,nsize=3,nns=4,pscrn=4)
in fact I see no difference directly using spline36resize
Gavino
1st December 2012, 20:31
Yes, that's correct.
I'm not surprised there is no visible difference just using spline36 directly.
nnedi3 is more useful for larger upsizing ratios (close to x2 and larger).
Overdrive80
1st December 2012, 21:18
Why rfactor=4?
Assuming an SD source of 720x576, that will expand the width to 2880 with nnedi3, then downscale to 1024 with spline36resize. I would have thought rfactor=2 would be more appropriate (or, as I suggested earlier, perhaps just use spline36 on its own without nnedi3).
Oh, its true. I copied my script of upscaled and forgot to change this parameter.
byme
7th December 2012, 19:20
I did some tests
the nnedi3 is much better of Spline36 and Lanczos (also from 720 to 1024), because not create jagged edges.... but it is extremely slow
there is no way to speed it up? :scared:
only with nnedi3: http://t.imgbox.com/abgVjSZO.jpg (http://imgbox.com/abgVjSZO)
and it is only the beginning of the process... going forward becomes longer time
it is impossible to use
Didée
7th December 2012, 20:21
What's that -- 0.32 fps? Either you have a very old CPU, or something else is completely wrong along the way.
Before your edited the post, I was just going to post this:
--------------------------------------------------------------
If you're resizing only horizontally, don't use nnedi3_rpow2. Instead, use plain nnedi3.
yourvideo
turnleft()
nnedi3(dh=true)
turnright()
spline36resize(1024,576)
That should be roughly 250% speed, compared to _rpow2.
--------------------------------------------------------------
But this will be of little help when you start out with 0.3 fps.
On my i7-860, nnedi3_rpow2 on some 720x576 input gives roughly 20~21 fps, or so.
byme
7th December 2012, 22:10
thank you very much Didée, is much faster!
I do not know what it is 0.32 fps
the script was simply:
--------
LoadPlugin("C:\Users\Proprietario\Documents\Edit Video\Filtri\nnedi3\nnedi3.dll")
####
AviSource("D:\BlindDeHalo3 - Gregoraci 001.avi")
nnedi3_rpow2(rfactor=2,cshift="spline36resize",fwidth=1024,fheight=576,nsize=3,nns=4,pscrn=4)
--------
with your new script is so: http://t.imgbox.com/acbBP0PW.jpg (http://imgbox.com/acbBP0PW)
generally, with the script more complex, that I use usually, the "Video rendering date" goes about to 1.30 fps (using the script together to NetVideo)
this is
LoadPlugin("C:\Users\Proprietario\Documents\Edit Video\Filtri\BorderControl\BorderControl.dll")
##
LoadPlugin("C:\Users\Proprietario\Documents\Edit Video\Filtri\vinverse\Release\vinverse.dll")
LoadPlugin("C:\Users\Proprietario\Documents\Edit Video\Filtri\Undot\UnDot.dll")
##
LoadPlugin("C:\Users\Proprietario\Documents\Edit Video\Filtri\DB_LSF\MaskTools.dll")
LoadPlugin("C:\Users\Proprietario\Documents\Edit Video\Filtri\Deen\Deen.dll")
import("C:\Users\Proprietario\Documents\Edit Video\Filtri\HQDering\HQDering.avsi")
##
import("C:\Users\Proprietario\Documents\Edit Video\Filtri\DeRainbow\DeRainbow.avsi")
##
LoadPlugin("C:\Users\Proprietario\Documents\Edit Video\Filtri\DeGrainMedian\degrainmedian.dll")
#LoadPlugin("C:\Users\Proprietario\Documents\Edit Video\Filtri\MVTools2\mvtools2.dll")
LoadPlugin("C:\Users\Proprietario\Documents\Edit Video\Filtri\MVTools\mvtools.dll")
import("C:\Users\Proprietario\Documents\Edit Video\Filtri\dfttest\dfttestMC.avsi")
##
LoadPlugin("C:\Users\Proprietario\Documents\Edit Video\Filtri\RemoveGrain\Repair.dll")
LoadPlugin("C:\Users\Proprietario\Documents\Edit Video\Filtri\Dither 1.21.0\dither.dll")
LoadPlugin("C:\Users\Proprietario\Documents\Edit Video\Filtri\Dither 1.21.0\mvtools-2.6.0.5\mvtools2.dll")
import("C:\Users\Proprietario\Documents\Edit Video\Filtri\Dither 1.21.0\dither.avsi")
import("C:\Users\Proprietario\Documents\Edit Video\Filtri\Dither 1.21.0\mt_xxpand_multi.avsi")
import("C:\Users\Proprietario\Documents\Edit Video\Filtri\SMDgrain\MinBlur\MinBlur.avsi")
import("C:\Users\Proprietario\Documents\Edit Video\Filtri\SMDgrain\SMDgrain.avsi")
##
LoadPlugin("C:\Users\Proprietario\Documents\Edit Video\Filtri\Dither\masktools-v2.0a48\mt_masktools-26.dll")
LoadPlugin("C:\Users\Proprietario\Documents\Edit Video\Filtri\Dither\dfttest\dfttest.dll")
##
import("C:\Users\Proprietario\Documents\Edit Video\Filtri\SharpenComplex2\SharpenComplex2.avsi")
##
LoadPlugin("C:\Users\Proprietario\Documents\Edit Video\Filtri\MedianBlur\medianblur.dll")
LoadPlugin("C:\Users\Proprietario\Documents\Edit Video\Filtri\masktools-v2.0a36\mt_masktools-26.dll")
LoadPlugin("C:\Users\Proprietario\Documents\Edit Video\Filtri\RemoveGrain\RemoveGrain.dll")
import("C:\Users\Proprietario\Documents\Edit Video\Filtri\BlindDehalo3_MT2\BlindDeHalo3_mt2.avs")
##
import("C:\Users\Proprietario\Documents\Edit Video\Filtri\FastLineDarkenMOD2\FastLineDarkenMOD2.avsi")
##
LoadPlugin("C:\Users\Proprietario\Documents\Edit Video\Filtri\nnedi3\nnedi3.dll")
####
AviSource("D:\greg1.avi").ConvertToYV12(Interlaced=False)
BorderControl(YTS=2, YBS=2, XLS=1, XRS=1)
smdegrain(tr=3,thSAD=400,pel=4,blksize=16,RefineMotion=false,sharp=6,lsb=true,overlap=8)###Contrasharp=true
#dfttest(tbsize=1,sigma=10,lsb=true)
#ditherpost(mode=6)
#undot()
x = Crop(582, 20, 58, 42)
BlindDeHalo3(rx=3.0, ry=3.0, strength=150, interlaced=false)###lodamp=25.0, hidamp=25.0, sharpness=100
FastLineDarkenMOD2(strength=0, luma_cap=255, threshold=0, thinning=32)
FastLineDarkenMOD2(strength=32, luma_cap=255, threshold=0, thinning=0)
SharpenComplex2(str0=2.0, str1=2.0).MergeChroma(last)
Overlay(x, x=582, y=20)
turnleft()
nnedi3(dh=true)
turnright()
spline36resize(1024,576)
ConvertToRGB(Interlaced=False)
Something wrong in my script?
Didée
7th December 2012, 22:26
Technically, everything seems to be okay with that script. It's just quite a lot of filtering going on. The speed impact of nedi3 should be rather small in that context. The most CPU time is spend in SMDegrain, hence the script will be pretty slow anyway.
BTW, pel=4 in SMDegrain is very slow, to almost no avail. pel=2 surely is enough, and a good bit faster.
Overdrive80
8th December 2012, 01:03
In my opinion, resize must be after of crop, not to end. Althought processing time must up.
byme
8th December 2012, 13:55
the resize from 4:3 to 16:9 before applying the filters I find it wrong, the result is worse
thanks Didée, 'll set the pel to 2
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.