Log in

View Full Version : Help with Babylon 5 scaling


Pages : 1 [2]

flossy_cake
4th March 2023, 17:35
I was actually able to get the best results with that using conventional AVISynth means. This has all been tried before, though.

lwlibavvideosource("E:\Media\Video Editing Tools\MeGUI-2913-64\scripts\clip 2 - misaligned fields 720x480i29 BFF.mkv")
tfm()
tdecimate()

separatefields()
bicubicresize(720,236,b=-0.5,c=0.25)
lanczos4resize(720,472)
assumefieldbased()
weave()
lanczos4resize(720,540)
sharpen(.2)



Above solution vs nnedi3 blend solution
https://imgsli.com/MTU5NzQ4


The best results are still from 1xSwatKatsLite, which is surprising given that the model was trained for animation.

https://mega.nz/file/mGZTATZY#2BOdRzxnNN2pig5tl5rzbZxeKEvbn8fUZM8cSnDLnYo
https://mega.nz/file/3a4yUJpB#6vDDDVZE1sEr2dq9b7l8p7Ww-1cFA-sAwHIBbqrH7cQ

That looks amazing, hopefully someone can figure out how to optimise it to around 30fps for 480p video.

flossy_cake
10th March 2023, 04:37
QTGMC is also reasonably good at filtering out the artefacts, and it's fast enough for real time use:


cores = 4
preset = "Slow" # very slow, slower, slow, medium, fast, faster, very fast, super fast, ultra fast, draft

QTGMC(last, preset=preset, FPSDivisor=1, EdiThreads=cores/2)
Prefetch(cores)


Resolution check: original vs nnedi3 (https://imgsli.com/MTYxMDYx), original vs qtgmc (https://imgsli.com/MTYxMDYy), nnedi3 vs qtgmc (https://imgsli.com/MTYxMDYz)

Scene comparisons: Scene 1 (https://imgsli.com/MTYxMDY2), Scene 2 (https://imgsli.com/MTYxMDY4), Scene 3 (https://imgsli.com/MTYxMDcw), Scene 4 (https://imgsli.com/MTYxMDcx), Scene 5 (https://imgsli.com/MTYxMDcy), Scene 6 (https://imgsli.com/MTYxMDc0), Scene 7 (https://imgsli.com/MTYxMDc1)

Another benefit with QTGMC is that there is no apparent benefit of IVTC'ing beforehand, so you can output 60p (FPSDivisor=1) and avoid all the issues associated with IVTC.

On the downside QTGMC appears to create some moire patterns, eg. scene 5 her left sleeve.

edit: after looking at more clips, the moire issue seems to be a dealbreaker for me. Even bwdif(thr=0) doesn't create such extreme moire artefacts.

coolgit
10th March 2023, 15:30
Image looks way oversharpened and none of the artefacts are removed.

https://i1.lensdump.com/i/TVsPNT.png

That is the only frame I can visually see before it grinds my system to a halt at 100% GPU and my PC becomes unstable.

I did upscale to 540p first as the author demands. Anyway it's a moot point as it's probably too slow for real time use unlike nnedi3 which is blazingly fast.


Would it be quicker to create a new one using Vdub2 DrawText filter?

flossy_cake
11th March 2023, 01:24
Would it be quicker to create a new one using Vdub2 DrawText filter?

Do you mean reproducing the field alignment issue synthetically with a DrawText (or in Avisynth something like... SubTitle-SeparateFields-BilinearResize-Weave) and then apply the Swatcats filter to that? I don't think it will be any faster cause Swatcats would still have to analyse every pixel in the raster.

The image you quoted was from my R9 380 GPU which I couldn't get working with Swatcats, but it does work properly on my GTX 1070, albeit at very slow speeds (~0.3fps)

flossy_cake
11th March 2023, 01:47
I saw this filter vinverse (http://avisynth.nl/index.php/Vinverse) which is intended for removing residual combing artefacts after detelecining.

The result is very similar to the nnedi3 solution though: https://imgsli.com/MTU4MzIx


Just revisiting this solution and it looks like vinverse may be slightly better - look at the "E" in that logo at bottom left, and the top of the R symbol is showing more of that line.

So to summarise here are my favourite solutions so far:

1.
TFM().TDecimate()
nnedi3(field=-2)
Merge(SelectEven(), SelectOdd())

2.
TFM().TDecimate()
vinverse(sstr=0.25, amnt=255, scl=1.00)

3.
cores = 4
preset = "Slow" # very slow, slower, slow, medium, fast, faster, very fast, super fast, ultra fast, draft

QTGMC(last, preset=preset, FPSDivisor=1, EdiThreads=cores/2)
Prefetch(cores)

1 and 2 are cheap and fast, but look soft. 2 seems to resolve slightly more resolution on high frequency patterns - https://imgsli.com/MTYxMzMw

3 has much better sharpness but uses more CPU and has moire artefacts on high frequency patterns - https://imgsli.com/MTYxMDcy

anton_foy
11th March 2023, 17:08
Just revisiting this solution and it looks like vinverse may be slightly better - look at the "E" in that logo at bottom left, and the top of the R symbol is showing more of that line.

So to summarise here are my favourite solutions so far:

1.
TFM().TDecimate()
nnedi3(field=-2)
Merge(SelectEven(), SelectOdd())

2.
TFM().TDecimate()
vinverse(sstr=0.25, amnt=255, scl=1.00)

3.
cores = 4
preset = "Slow" # very slow, slower, slow, medium, fast, faster, very fast, super fast, ultra fast, draft

QTGMC(last, preset=preset, FPSDivisor=1, EdiThreads=cores/2)
Prefetch(cores)

1 and 2 are cheap and fast, but look soft. 2 seems to resolve slightly more resolution on high frequency patterns - https://imgsli.com/MTYxMzMw

3 has much better sharpness but uses more CPU and has moire artefacts on high frequency pattersn - https://imgsli.com/MTYxMDcy

Is it possible to use contrasharp to regain the areas of sharpness?

flossy_cake
12th March 2023, 01:12
Is it possible to use contrasharp to regain the areas of sharpness?

Depends what you mean by "regain". If you mean "resolve more resolution" then I'd say no, because every pixel has already been blurred/blended with pixel above/below.

But if you mean "make image look subjectively sharper" like edge enhancement then yes of course that is possible as a post processing effect. I'm not very familiar with Avisynth sharpening options - I've only played with the Sharpen() function and I don't really like the look of it. I normally add sharpening through MadVR video renderer when I'm playing these avisynth scripts in real time.

I'd like to learn more about Avisynth sharpening options though, like the Contrasharp you mentioned - could you give a code example of how to use it (it seems to be part of the SMDegrain package only?).