Upscale

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
Locked
User avatar
Tsiahiv
Joined: Sun May 24, 2015 1:33 pm
Org Profile

Upscale

Post by Tsiahiv » Fri Jan 29, 2016 2:32 am

Wanted to upscale some footage from 480 to 720. Is it worth it? I tried to use l33tmeatwad's upscale script, but I can't really tell the difference or If I put it on correctly to begin with.

User avatar
jt_x
Joined: Wed Oct 17, 2007 10:13 am
Org Profile

Re: Upscale

Post by jt_x » Fri Jan 29, 2016 11:40 am

Tsiahiv wrote:[...] but I can't really tell the difference [...]
that's good. If you can't tell the difference then it looks good either way right ? :ying:
Tsiahiv wrote:[...] Is it worth it? [...]
I don't know. What looks better ?

here is an example of what I work on currently:
Spoiler :
Image
it highly depends on what your intentions are, like what do you want to accomplish with the video ?
Does it look good in most scenes upscaled ? some scenes might look worse than others, some details are not meant to be upscaled and can look worse ...

code for right part:

Code: Select all

MPEG2Source("I:\Movies_2\extracted 1\Hentai\Soredemo DVDs\Vol1\dgindex.d2v")#.info
#Deinterlacing:
QTGMC() # very slow
SelectEven() # Add this line to keep original frame rate, leave it out for smoother doubled frame rate

# Your favourite 8-bit denoiser here, doing the main job
denoised = dfttest (sigma=16)

# Restores a bit of noise
mt_lutxy (last, denoised, expr="x y < y 1 - x y > y 1 + y ? ?", y=3, u=3, v=3)

super   = last.MSuper ()
super_a = denoised.MSuper ()

# You could also reuse the vectors found in a previous processing stage
vf1 = super_a.MAnalyse (isb=false, delta=1, overlap=4, blksize=16)
vb1 = super_a.MAnalyse (isb=true,  delta=1, overlap=4, blksize=16)

# Turns remaining noise into 16-bit gradients
cf1 = MCompensate (super, vf1, thSAD=200)
cb1 = MCompensate (super, vb1, thSAD=200)
Interleave (cf1, last, cb1)
dfttest (sigma=1.0, tbsize=3, lsb=true)
SelectEvery (3, 1)

# Additional smoothing pass and back to 8 bits
GradFun3 (thr=0.25, lsb_in=true)

Spline36Resize(848,480)
code for left part:

Code: Select all

MPEG2Source("I:\Movies_2\extracted 1\Hentai\Soredemo DVDs\Vol1\dgindex.d2v")#.info
#Deinterlacing:
QTGMC() # very slow
SelectEven() # Add this line to keep original frame rate, leave it out for smoother doubled frame rate

# Your favourite 8-bit denoiser here, doing the main job
denoised = dfttest (sigma=16)

# Restores a bit of noise
mt_lutxy (last, denoised, expr="x y < y 1 - x y > y 1 + y ? ?", y=3, u=3, v=3)

super   = last.MSuper ()
super_a = denoised.MSuper ()

# You could also reuse the vectors found in a previous processing stage
vf1 = super_a.MAnalyse (isb=false, delta=1, overlap=4, blksize=16)
vb1 = super_a.MAnalyse (isb=true,  delta=1, overlap=4, blksize=16)

# Turns remaining noise into 16-bit gradients
cf1 = MCompensate (super, vf1, thSAD=200)
cb1 = MCompensate (super, vb1, thSAD=200)
Interleave (cf1, last, cb1)
dfttest (sigma=1.0, tbsize=3, lsb=true)
SelectEvery (3, 1)

# Additional smoothing pass and back to 8 bits
GradFun3 (thr=0.25, lsb_in=true)

AnimeUpscale(FullHD=false, ConvertMatrix=true, doSharpening=false)
KNLMeansCL(D=0, A=2, h=1.2, device_type="GPU") # light preset
lsfmodlight(strength=100).fastlinedarkenmod(strength=80,thinning=15)
that part in the middle is just some debanding taken from here: http://avisynth.nl/index.php/Dither_tools

User avatar
Tsiahiv
Joined: Sun May 24, 2015 1:33 pm
Org Profile

Re: Upscale

Post by Tsiahiv » Sat Jan 30, 2016 6:00 pm

Thanks. Yeah I was trying to upscale some Bleach and Naruto for some projects later on this year. Half the shows are in 480 and the other half is in 720p so it makes it a bit strange in terms of coherence. You're editing hentai? Lmaooo. I don't think it's possible to avoid the artifacts at this point.
jt_x wrote:
Tsiahiv wrote:[...] but I can't really tell the difference [...]
that's good. If you can't tell the difference then it looks good either way right ? :ying:
Tsiahiv wrote:[...] Is it worth it? [...]
I don't know. What looks better ?

here is an example of what I work on currently:
Spoiler :
Quoted Image converted to link:
https://i.sli.mg/HZpLWE.png
it highly depends on what your intentions are, like what do you want to accomplish with the video ?
Does it look good in most scenes upscaled ? some scenes might look worse than others, some details are not meant to be upscaled and can look worse ...

code for right part:

Code: Select all

MPEG2Source("I:\Movies_2\extracted 1\Hentai\Soredemo DVDs\Vol1\dgindex.d2v")#.info
#Deinterlacing:
QTGMC() # very slow
SelectEven() # Add this line to keep original frame rate, leave it out for smoother doubled frame rate

# Your favourite 8-bit denoiser here, doing the main job
denoised = dfttest (sigma=16)

# Restores a bit of noise
mt_lutxy (last, denoised, expr="x y < y 1 - x y > y 1 + y ? ?", y=3, u=3, v=3)

super   = last.MSuper ()
super_a = denoised.MSuper ()

# You could also reuse the vectors found in a previous processing stage
vf1 = super_a.MAnalyse (isb=false, delta=1, overlap=4, blksize=16)
vb1 = super_a.MAnalyse (isb=true,  delta=1, overlap=4, blksize=16)

# Turns remaining noise into 16-bit gradients
cf1 = MCompensate (super, vf1, thSAD=200)
cb1 = MCompensate (super, vb1, thSAD=200)
Interleave (cf1, last, cb1)
dfttest (sigma=1.0, tbsize=3, lsb=true)
SelectEvery (3, 1)

# Additional smoothing pass and back to 8 bits
GradFun3 (thr=0.25, lsb_in=true)

Spline36Resize(848,480)
code for left part:

Code: Select all

MPEG2Source("I:\Movies_2\extracted 1\Hentai\Soredemo DVDs\Vol1\dgindex.d2v")#.info
#Deinterlacing:
QTGMC() # very slow
SelectEven() # Add this line to keep original frame rate, leave it out for smoother doubled frame rate

# Your favourite 8-bit denoiser here, doing the main job
denoised = dfttest (sigma=16)

# Restores a bit of noise
mt_lutxy (last, denoised, expr="x y < y 1 - x y > y 1 + y ? ?", y=3, u=3, v=3)

super   = last.MSuper ()
super_a = denoised.MSuper ()

# You could also reuse the vectors found in a previous processing stage
vf1 = super_a.MAnalyse (isb=false, delta=1, overlap=4, blksize=16)
vb1 = super_a.MAnalyse (isb=true,  delta=1, overlap=4, blksize=16)

# Turns remaining noise into 16-bit gradients
cf1 = MCompensate (super, vf1, thSAD=200)
cb1 = MCompensate (super, vb1, thSAD=200)
Interleave (cf1, last, cb1)
dfttest (sigma=1.0, tbsize=3, lsb=true)
SelectEvery (3, 1)

# Additional smoothing pass and back to 8 bits
GradFun3 (thr=0.25, lsb_in=true)

AnimeUpscale(FullHD=false, ConvertMatrix=true, doSharpening=false)
KNLMeansCL(D=0, A=2, h=1.2, device_type="GPU") # light preset
lsfmodlight(strength=100).fastlinedarkenmod(strength=80,thinning=15)
that part in the middle is just some debanding taken from here: http://avisynth.nl/index.php/Dither_tools

User avatar
jt_x
Joined: Wed Oct 17, 2007 10:13 am
Org Profile

Re: Upscale

Post by jt_x » Sat Jan 30, 2016 6:46 pm

Tsiahiv wrote:Thanks. Yeah I was trying to upscale some Bleach and Naruto for some projects later on this year. Half the shows are in 480 and the other half is in 720p so it makes it a bit strange in terms of coherence.
yeah in this case it might be hard to avoid upscaling ...
Tsiahiv wrote: You're editing hentai? Lmaooo.
Yes I do :awesome: In fact I just recently announced like 3 together (NSFW)
Tsiahiv wrote: I don't think it's possible to avoid the artifacts at this point.
yeah some artifacts might remain. Be sure to try out some spatial denoiser. I'd suggest using KNLMeansCL it worked well for me so far.

User avatar
l33tmeatwad
Joined: Wed Feb 16, 2005 3:22 pm
Location: Christiansburg, VA
Contact:
Org Profile

Re: Upscale

Post by l33tmeatwad » Mon Feb 01, 2016 10:09 am

Just a comment on the sources specifically, Naruto and Bleach in the early seasons when it was animated in SD tended to have a lot of light colored/blurry lines and neither source really upscales that great. My script works better with digitally animated shows that tend to have more defined lines and with older cel animated sources that don't have much grain/noise.
Software & Guides: AMVpack | AMV 101 | AviSynth 101 | VapourSynth 101
PixelBlended Studios: Website | Twitter | YouTube

Locked

Return to “AviSynth Help”