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 8th May 2018, 20:46   #201  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
OK, something like this maybe (Just change config stuff to play with it).

Code:
LoadPlugin("<path>\PointSize_x64.dll") ## FIX THIS PATH

## ADD SOURCE HERE (RGB32, 256x224)
#AviSource("...")

###   CONFIG   ###
## (256x224 -> 2820x2160)
LQx_ARG  = 4     ## retains some jaggies (best for 'digital' look)
xBRZ_ARG = 4     ## softer gradients (best for 'smooth' look)
SPL_W    = 1024   ## Spline16
SPL_H    = 896
GAU_W    = 5760   # Gauss
GAU_H    = 4320
GAU_PX   = 37.5
GAU_PY   = 12.5
BIC_W    = 2820   # BiCubic (Output)
BIC_H    = 2160
### END CONFIG ###

LQx(LQx_ARG)      # Uncomment 1 or NONE [EDIT: Changed 'Both' to 'NONE']
#xBRZ(xBRZ_ARG)

ConvertToYV12(matrix="Rec709")

## (other filters here -- try QTGMC for example)

#########
Spline16Resize(SPL_W, SPL_H)
nnedi3_rpow2(rfactor=2, nsize=0, nns=2, qual=1, etype=0, pscrn=2, threads=0, opt=0, fapprox=0)
GaussResize2(GAU_W, GAU_H, px=GAU_PX, py=GAU_PY)
BiCubicResize(BIC_W,BIC_H)
return Last

##################################
function GaussResize2(clip C, int target_width, int target_height,
\   float "src_left", float "src_top", float "src_width", float "src_height",
\   float "px", float "py")
{
    px = Default(px, 30.0)
    py = Default(py, px)
    R = C.GaussResize(target_width, C.Height,
    \         src_left, 0, src_width, 0, px)
    \    .GaussResize(target_width, target_height,
    \         0, src_top, 0, src_height, py)
    return R
}
EDIT: changed RED stuff.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 8th May 2018 at 23:32.
StainlessS is offline   Reply With Quote
Old 8th May 2018, 22:12   #202  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
Thanks StainlessS !

I will try tomorrow at the afternoon, because I haven't enough time any more. I work tomorrow ! Ouch !

But I have just enough time, to show you my pictures and my new scripts

Original (8:7 AR)


https://media.joomeo.com/original/5aed00897c55c.png

Upscaled to 2160p (8:7 AR)


https://media.joomeo.com/original/5af20e33ccff4.png

Quote:
AviSource()
Spline16Resize(512, 448)
nnedi3_rpow2(rfactor=2, nsize=0, nns=2, qual=1, etype=0, pscrn=2, threads=0, opt=0, fapprox=0)

GaussResize2(2468, 2160, px=200/3, py=200/3)
return Last

##################################
function GaussResize2(clip C, int target_width, int target_height,
\ float "src_left", float "src_top", float "src_width", float "src_height",
\ float "px", float "py")
{
px = Default(px, 50.0)) # I used 50.0 instead of raffriff42 default of 30.0
py = Default(py, px)
R = C.GaussResize(target_width, C.Height,
\ src_left, 0, src_width, 0, px)
\ .GaussResize(target_width, target_height,
\ 0, src_top, 0, src_height, py)
return R
}

Original (8:7 AR)


https://media.joomeo.com/original/5aed019458739.png

Upscaled to 2160p (4:3 AR)


https://media.joomeo.com/original/5af20e689b51a.png

Quote:
AviSource()
Spline16Resize(512, 448)
nnedi3_rpow2(rfactor=2, nsize=0, nns=2, qual=1, etype=0, pscrn=2, threads=0, opt=0, fapprox=0)

GaussResize2(2820, 2160, px=200/3, py=200/3)
return Last

##################################
function GaussResize2(clip C, int target_width, int target_height,
\ float "src_left", float "src_top", float "src_width", float "src_height",
\ float "px", float "py")
{
px = Default(px, 50.0)) # I used 50.0 instead of raffriff42 default of 30.0
py = Default(py, px)
R = C.GaussResize(target_width, C.Height,
\ src_left, 0, src_width, 0, px)
\ .GaussResize(target_width, target_height,
\ 0, src_top, 0, src_height, py)
return R
}

Original (4:3 AR)


https://media.joomeo.com/original/5aed021e59505.png

Upscaled to 2160p (4:3 AR)


https://media.joomeo.com/original/5af20e92c6351.png

Quote:
AviSource()
Spline16Resize(1280, 960)
ConvertToRGB24
nnedi3_rpow2(rfactor=2, nsize=0, nns=2, qual=1, etype=0, pscrn=2, threads=0, opt=0, fapprox=0)

GaussResize2(2880, 2160, px=100/3, py=100/3)
return Last

##################################
function GaussResize2(clip C, int target_width, int target_height,
\ float "src_left", float "src_top", float "src_width", float "src_height",
\ float "px", float "py")
{
px = Default(px, 50.0)) # I used 50.0 instead of raffriff42 default of 30.0
py = Default(py, px)
R = C.GaussResize(target_width, C.Height,
\ src_left, 0, src_width, 0, px)
\ .GaussResize(target_width, target_height,
\ 0, src_top, 0, src_height, py)
return R
}

Original (4:3 AR)


https://media.joomeo.com/original/5aed02f0db60c.png

Note : Here, the aspect ratio is wrong if we compare with other videos from the Legacy of Kain saga (for the connoisseurs ) and the aspect ratio in-game. There shouldn't be black bars. So I just had to cut the black bars to have the correct AR.

Upscaled to 2160p (16:9 AR)


https://media.joomeo.com/original/5af20eea87ccd.png

Quote:
AviSource()
Crop(0, 80, 0, -80)
Spline16Resize(1280, 640)
ConvertToRGB24
nnedi3_rpow2(rfactor=2, nsize=0, nns=2, qual=1, etype=0, pscrn=2, threads=0, opt=0, fapprox=0)

GaussResize2(3840, 2160, px=100/3, py=100/3)
return Last

##################################
function GaussResize2(clip C, int target_width, int target_height,
\ float "src_left", float "src_top", float "src_width", float "src_height",
\ float "px", float "py")
{
px = Default(px, 50.0)) # I used 50.0 instead of raffriff42 default of 30.0
py = Default(py, px)
R = C.GaussResize(target_width, C.Height,
\ src_left, 0, src_width, 0, px)
\ .GaussResize(target_width, target_height,
\ 0, src_top, 0, src_height, py)
return R
}

I know, finally, I put the same value to the px and py for the GaussResize2 So I could use the simple GaussResize. But I noticed a little difference when I zoomed the picture, between :

Quote:
GaussResize2(3840, 2160, px=100/3, py=100/3)
and

Quote:
GaussResize(3840, 2160, p=100/3)
And finally, I prefer the GaussResize that raffriff42 did !

Ok. Have a nice night tonight !

And

Last edited by SuperLumberjack; 10th May 2018 at 12:35.
SuperLumberjack is offline   Reply With Quote
Old 8th May 2018, 23:35   #203  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Oops, sorry, changed stuff in red in my prev post (was untested, online scripting only).

Still untested, sitting in pub.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 9th May 2018, 02:32   #204  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Originally Posted by SuperLumberjack View Post
But I noticed a little difference when I zoomed the picture,
Imagination, not possible.

EDIT: By the way, 100/3 is 33 (integer divide) not 33.33333, use eg 1.0/3 or 1/3.0, or 1.0/3.0.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 9th May 2018 at 09:46.
StainlessS is offline   Reply With Quote
Old 9th May 2018, 15:45   #205  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
Quote:
Originally Posted by StainlessS View Post
Oops, sorry, changed stuff in red in my prev post (was untested, online scripting only).

Still untested, sitting in pub.
Sitting in a pub ? You are forgiven !

Quote:
Originally Posted by StainlessS View Post
Imagination, not possible.
But there are differences ! See by yourself


GaussResize(3840, 2160, p=100/3)


https://media.joomeo.com/original/5af305d36883e.png

GaussResize2(3840, 2160, px=100/3, py=100/3)


https://media.joomeo.com/original/5af3064138cf8.png


GaussResize(3840, 2160, p=100/3) (zoom 1600%)


https://media.joomeo.com/original/5af3067d7a24c.png

GaussResize2(3840, 2160, px=100/3, py=100/3) (zoom 1600%)


https://media.joomeo.com/original/5af306a96cff1.png


GaussResize(3840, 2160, p=100/3) (zoom 3200%)


https://media.joomeo.com/original/5af306dbd4be8.png

GaussResize2(3840, 2160, px=100/3, py=100/3) (zoom 3200%)


https://media.joomeo.com/original/5af30708778cf.png


GaussResize vs. GaussResize2 (zoom 3200%)


https://media.joomeo.com/original/5af3072e72a52.png


So, there are little differences between this :

Quote:
GaussResize(3840, 2160, p=100/3)
and this :

Quote:
GaussResize2(3840, 2160, px=100/3, py=100/3)
return Last

##################################
function GaussResize2(clip C, int target_width, int target_height,
\ float "src_left", float "src_top", float "src_width", float "src_height",
\ float "px", float "py")
{
px = Default(px, 50.0)) # I used 50.0 instead of raffriff42 default of 30.0
py = Default(py, px)
R = C.GaussResize(target_width, C.Height,
\ src_left, 0, src_width, 0, px)
\ .GaussResize(target_width, target_height,
\ 0, src_top, 0, src_height, py)
return R
}


Maybe it's because I changed this ?

Quote:
px = Default(px, 50.0)

Quote:
Originally Posted by StainlessS View Post
EDIT: By the way, 100/3 is 33 (integer divide) not 33.33333, use eg 1.0/3 or 1/3.0, or 1.0/3.0.
So it never uses decimals ?

Last edited by SuperLumberjack; 10th May 2018 at 12:35.
SuperLumberjack is offline   Reply With Quote
Old 9th May 2018, 17:57   #206  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Maybe it's because I changed this ?
Should not really do that, if comparing with eg a RaffRiff42 example then may cause confusion as your function will act differently to his,
if 30.0 is official default, then really should keep that and use your pref as calling arg.

Quote:
So it never uses decimals ?
100 is an integer and so is 3, so 100/3 is 33 not 33.33333, an integer multiplied by or divided by or added to, subtracted from another integer, has an integer result. [EDIT: any fractional part discarded/truncated, NOT rounded]

An integer + a float (and all other above operations too) has a Float result. (The integer is converted to a float prior to the operation).
Above is true for many programming languages.

The difference between RaffRiff GaussResize2 and GaussResize may be down to the order of resize, Width, Height, or Height, Width.
Raffs does resize width and then resize height, think builtin resize chooses the longest side (or shortest, not sure offhand which) side first, and then the other.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 10th May 2018 at 09:25.
StainlessS is offline   Reply With Quote
Old 9th May 2018, 18:29   #207  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
Oki. Thank you for your explanations ! It's always a pleasure to learn from you

Otherwise, I tried the "HQx" and the "LQx" resizers, and I feel that the perfect resizer would be something in between. Sad !
SuperLumberjack is offline   Reply With Quote
Old 10th May 2018, 01:22   #208  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
Hello !

I updated my scripts a little bit

It's almost identical, but it's better when I zoom !

I just changed these lines :

Quote:
nnedi3_rpow2(rfactor=2, nsize=0, nns=2, qual=1, etype=0, pscrn=4, threads=0, opt=0, fapprox=0)
I compared with screenshots, and I found it's more natural visually with "pscrn=4"

Quote:
GaussResize2(4936, 4320, px=50, py=50)
BicubicResize(2468, 2160)
I still upsize 2 times and then reduce with the final resolution.

Quote:
px = Default(px, 30.0)
I put the original value.

Voilà !


Original (8:7 AR)


https://media.joomeo.com/original/5aed00897c55c.png

Upscaled to 2160p (8:7 AR)


https://media.joomeo.com/original/5af38ab2ab3f0.png

Quote:
AviSource()
Spline16Resize(512, 448)
nnedi3_rpow2(rfactor=2, nsize=0, nns=2, qual=1, etype=0, pscrn=4, threads=0, opt=0, fapprox=0)

GaussResize2(4936, 4320, px=50, py=50)
BicubicResize(2468, 2160)
return Last

##################################
function GaussResize2(clip C, int target_width, int target_height,
\ float "src_left", float "src_top", float "src_width", float "src_height",
\ float "px", float "py")
{
px = Default(px, 30.0)
py = Default(py, px)
R = C.GaussResize(target_width, C.Height,
\ src_left, 0, src_width, 0, px)
\ .GaussResize(target_width, target_height,
\ 0, src_top, 0, src_height, py)
return R
}

Original (8:7 AR)


https://media.joomeo.com/original/5aed019458739.png

Upscaled to 2160p (4:3 AR)


https://media.joomeo.com/original/5af38afa516b3.png

Quote:
AviSource()
Spline16Resize(512, 448)
nnedi3_rpow2(rfactor=2, nsize=0, nns=2, qual=1, etype=0, pscrn=4, threads=0, opt=0, fapprox=0)

GaussResize2(5640, 4320, px=50, py=50)
BicubicResize(2820, 2160)
return Last

##################################
function GaussResize2(clip C, int target_width, int target_height,
\ float "src_left", float "src_top", float "src_width", float "src_height",
\ float "px", float "py")
{
px = Default(px, 30.0)
py = Default(py, px)
R = C.GaussResize(target_width, C.Height,
\ src_left, 0, src_width, 0, px)
\ .GaussResize(target_width, target_height,
\ 0, src_top, 0, src_height, py)
return R
}

Original (4:3 AR)


https://media.joomeo.com/original/5aed021e59505.png

Upscaled to 2160p (4:3 AR)


https://media.joomeo.com/original/5af38b407e38d.png

Quote:
AviSource()
Spline16Resize(1280, 960)
ConvertToRGB24
nnedi3_rpow2(rfactor=2, nsize=0, nns=2, qual=1, etype=0, pscrn=4, threads=0, opt=0, fapprox=0)

GaussResize2(5760, 4320, px=50, py=50)
BicubicResize(2880, 2160)
return Last

##################################
function GaussResize2(clip C, int target_width, int target_height,
\ float "src_left", float "src_top", float "src_width", float "src_height",
\ float "px", float "py")
{
px = Default(px, 30.0)
py = Default(py, px)
R = C.GaussResize(target_width, C.Height,
\ src_left, 0, src_width, 0, px)
\ .GaussResize(target_width, target_height,
\ 0, src_top, 0, src_height, py)
return R
}

Original (4:3 AR)


https://media.joomeo.com/original/5aed02f0db60c.png

Note : Here, the aspect ratio is wrong if we compare with other videos from the Legacy of Kain saga (for the connoisseurs ) and the aspect ratio in-game. There shouldn't be black bars. So I just had to cut the black bars to have the correct AR.

Upscaled to 2160p (16:9 AR)


https://media.joomeo.com/original/5af38b84c2020.png

Quote:
AviSource()
Crop(0, 80, 0, -80)
Spline16Resize(1280, 640)
ConvertToRGB24
nnedi3_rpow2(rfactor=2, nsize=0, nns=2, qual=1, etype=0, pscrn=4, threads=0, opt=0, fapprox=0)

GaussResize2(7680, 4320, px=50, py=50)
BicubicResize(3840, 2160)
return Last

##################################
function GaussResize2(clip C, int target_width, int target_height,
\ float "src_left", float "src_top", float "src_width", float "src_height",
\ float "px", float "py")
{
px = Default(px, 30.0)
py = Default(py, px)
R = C.GaussResize(target_width, C.Height,
\ src_left, 0, src_width, 0, px)
\ .GaussResize(target_width, target_height,
\ 0, src_top, 0, src_height, py)
return R
}
Bonne nuit now !
SuperLumberjack is offline   Reply With Quote
Old 10th May 2018, 12:21   #209  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Should not really do that, if comparing with eg a RaffRiff42 example then may cause confusion as your function will act differently to his,
if 30.0 is official default, then really should keep that and use your pref as calling arg.
Perhaps you might like to add this, ie as your own defaulting to 50.0
Code:
Function GaussResizeSL(clip C, int target_width, int target_height,
        \ float "src_left", float "src_top", float "src_width", float "src_height",
        \ float "px", float "py") {
    px = Default(px, 50.0)  # SLJ default instead of RR42 default of 30.0
    Return GaussResize2(C,target_width,target_height,src_left,src_top,src_width,src_height,px,py)
}
Call the new function, you still need to raff42 version.

If posting some example, either include your own stub (as well as original) or modify caller to use original func with your modified px arg (avoids confusion).
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 10th May 2018, 12:36   #210  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
Yes, you are right ! Thanks for the advice !

I edited my posts.
SuperLumberjack is offline   Reply With Quote
Old 10th May 2018, 21:19   #211  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
Is there a way to have the EPBX scaling algorithm in AviSynth ?

SuperLumberjack is offline   Reply With Quote
Old 10th May 2018, 21:58   #212  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
No, in fact I'm happy with my last script !

I don't think I could do better. It's pleasant to my eyes !
SuperLumberjack is offline   Reply With Quote
Old 12th May 2018, 12:53   #213  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
Hello buddies

I come back to you, because I thought about one thing... an important thing !

As some of you know, Higan is the perpect emulator, close to the original experience of the Super Nes, but on the modern display

But I asked myself, how they did to reproduce the original colors, which are darker. Is it simply a way to imitate the feeling of the old CRT display ? I think yes and no... maybe !

I thought one thing : my pictures are in RGB 24 bits, so the levels are 0-255.

But at the time of the CRT display, maybe it was meant to be display in a equivalent of RGB 16-235.

No ?

I tried this, and in fact, my image was close to the image of Higan, even if not exactly (maybe the gamma).

After some other researches, I read that the gamma of the CRT was close to 2.5 too if we compare to the gamma of 2,22 on a modern display.

So I convert the gamma of the image too


Actually :

1 / 0,45 = 2,2222222222222222222222222222222


So I calculated :

2,5 / (1 / 0,45) = 1,125


So, I used this function to transform my gamma and my levels :

Quote:
Levels(16, 1.125, 235, 0, 255)

And really, it's closer of what I remember of my experience on a CRT display !

Just for the example, the picture of Mr. Nutz with the spider, I remember how it was dark on my CRT screen when I was a child. It really was a dark atmosphere, the moon was very present, like almost the only comforting glow...

By the way, I was always surprised to see that it's so clear on my LCDs with an emulator

As you will see, it's not so bad... I hope !

I change this too :

nnedi3_rpow2(rfactor=2, nsize=0, nns=2, qual=1, etype=0, pscrn=3, threads=0, opt=0, fapprox=0)

With "pscrn=3" instead of 4, I noticed that it's closer that what I remember. And yes, I can see the difference !

I compare in zooming with the original picture of Killer Instinct and a the picture of the same game in a video of the Super NT (a real Super Nintendo HD, not an emulator), and it's closer now !

With "pscrn=2" and "pscrn=4", there was something weird. It didn't perfectly match !
SuperLumberjack is offline   Reply With Quote
Old 12th May 2018, 12:54   #214  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
Just to compare :

Higan


https://media.joomeo.com/original/5af6c5501a3d1.png

Super NT :


https://media.joomeo.com/original/5af6c5feba931.png

YouTube video : Episode 1 | First Time Beating Donkey Kong Country | Super NT

My script (with levels changed)


https://media.joomeo.com/original/5af6c70a49172.png

My script (without change of levels)


https://media.joomeo.com/original/5af6c79919a95.png


Higan


https://media.joomeo.com/original/5af6ca69e7656.png

Super NT :


https://media.joomeo.com/original/5af6caa61ff98.png

Analogue Super NT - Donkey Kong Country 2 (No Scanlines) 02-22-2018

My script (with levels changed)


https://media.joomeo.com/original/5af6cae2304f4.png

My script (without change of levels)


https://media.joomeo.com/original/5af6cb11444d0.png


Higan


https://media.joomeo.com/original/5af6cb6b68280.png

Super NT :


https://media.joomeo.com/original/5af6cb98de4b4.png

Analogue Super NT - Killer Instinct (Hybrid Scanlines) 02-23-2018

My script (with levels changed)


https://media.joomeo.com/original/5af6cbc1a8c0f.png

My script (without change of levels)


https://media.joomeo.com/original/5af6cc28a3095.png


What do you think ?


Here are some videos about the Super NT il you are interested :

DF Retro: Analogue Super Nt Review - a 21st Century SNES!

Super NT Console vs. SNES Classic & OG Super Nintendo - Graphics Comparison
SuperLumberjack is offline   Reply With Quote
Old 12th May 2018, 12:55   #215  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
And now, the picture of my last scripts :

Original (8:7 AR)


https://media.joomeo.com/original/5aed00897c55c.png

Upscaled to 2160p (8:7 AR)


https://media.joomeo.com/original/5af6d35020a92.png

Quote:
AviSource()
Spline16Resize(512, 448)
nnedi3_rpow2(rfactor=2, nsize=0, nns=2, qual=1, etype=0, pscrn=3, threads=0, opt=0, fapprox=0)

GaussResize2(4936, 4320, px=50, py=50)
BicubicResize(2468, 2160)
Levels(16, 1.125, 235, 0, 255)
return Last

##################################
function GaussResize2(clip C, int target_width, int target_height,
\ float "src_left", float "src_top", float "src_width", float "src_height",
\ float "px", float "py")
{
px = Default(px, 30.0)
py = Default(py, px)
R = C.GaussResize(target_width, C.Height,
\ src_left, 0, src_width, 0, px)
\ .GaussResize(target_width, target_height,
\ 0, src_top, 0, src_height, py)
return R
}

Original (8:7 AR)


https://media.joomeo.com/original/5aed019458739.png

Upscaled to 2160p (4:3 AR)


https://media.joomeo.com/original/5af6d37e35ba5.png

Quote:
AviSource()
Spline16Resize(512, 448)
nnedi3_rpow2(rfactor=2, nsize=0, nns=2, qual=1, etype=0, pscrn=3, threads=0, opt=0, fapprox=0)

GaussResize2(5640, 4320, px=50, py=50)
BicubicResize(2820, 2160)
Levels(16, 1.125, 235, 0, 255)
return Last

##################################
function GaussResize2(clip C, int target_width, int target_height,
\ float "src_left", float "src_top", float "src_width", float "src_height",
\ float "px", float "py")
{
px = Default(px, 30.0)
py = Default(py, px)
R = C.GaussResize(target_width, C.Height,
\ src_left, 0, src_width, 0, px)
\ .GaussResize(target_width, target_height,
\ 0, src_top, 0, src_height, py)
return R
}

Original (4:3 AR)


https://media.joomeo.com/original/5aed021e59505.png

Upscaled to 2160p (4:3 AR)


https://media.joomeo.com/original/5af6d3a82231a.png

Quote:
AviSource()
Spline16Resize(1280, 960)
ConvertToRGB24
nnedi3_rpow2(rfactor=2, nsize=0, nns=2, qual=1, etype=0, pscrn=3, threads=0, opt=0, fapprox=0)

GaussResize2(5760, 4320, px=50, py=50)
BicubicResize(2880, 2160)
return Last

##################################
function GaussResize2(clip C, int target_width, int target_height,
\ float "src_left", float "src_top", float "src_width", float "src_height",
\ float "px", float "py")
{
px = Default(px, 30.0)
py = Default(py, px)
R = C.GaussResize(target_width, C.Height,
\ src_left, 0, src_width, 0, px)
\ .GaussResize(target_width, target_height,
\ 0, src_top, 0, src_height, py)
return R
}

Original (4:3 AR)


https://media.joomeo.com/original/5aed02f0db60c.png

Note : Here, the aspect ratio is wrong if we compare with other videos from the Legacy of Kain saga (for the connoisseurs ) and the aspect ratio in-game. There shouldn't be black bars. So I just had to cut the black bars to have the correct AR.

Upscaled to 2160p (16:9 AR)


https://media.joomeo.com/original/5af6d3dbd5f1f.png

Quote:
AviSource()
Crop(0, 80, 0, -80)
Spline16Resize(1280, 640)
ConvertToRGB24
nnedi3_rpow2(rfactor=2, nsize=0, nns=2, qual=1, etype=0, pscrn=3, threads=0, opt=0, fapprox=0)

GaussResize2(7680, 4320, px=50, py=50)
BicubicResize(3840, 2160)
return Last

##################################
function GaussResize2(clip C, int target_width, int target_height,
\ float "src_left", float "src_top", float "src_width", float "src_height",
\ float "px", float "py")
{
px = Default(px, 30.0)
py = Default(py, px)
R = C.GaussResize(target_width, C.Height,
\ src_left, 0, src_width, 0, px)
\ .GaussResize(target_width, target_height,
\ 0, src_top, 0, src_height, py)
return R
}

So ? What is your opinion about all of that please ?
SuperLumberjack is offline   Reply With Quote
Old 12th May 2018, 13:56   #216  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
I just checked one more time if there is a logic with the levels and the gamma, and without a doubt, whatever you think, in all modesty, I think I'm right

There is a balance ! I checked with the levels filter of VirtualDub.

I just changed a bit to see "14-237" in input, "15-236", "17-234"... and with the gradations, it perfectly match with "16-236".

I adjusted the gamma without watching the value. I reduced the gamma , I increased the gamma, I saw the dark tones becoming brighter, the light tones becoming darker... and I felt a balance ! Believe me or not, but I was on "1.123" for the gamma !

So "1.125", perfect ! I admit that I'm surprised, because the gamma of the CRT screens wasn't perfectly linear if I'm not wrong ! But it works !

I think it's even better than Higan or the Super NT, not like the old experience maybe on CRT, but more precise digitally (but maybe I'm wrong and it's only my own interpretation, I don't know) ! Always in all modesty...

But for the picture itself, you are the judges !

Last edited by SuperLumberjack; 12th May 2018 at 14:08.
SuperLumberjack is offline   Reply With Quote
Old 12th May 2018, 20:22   #217  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
Finally, even if it works, I'm not sure of what I did...

I need some explanations !

I read that the RGB 16-235 was created to prevent clipping which could cause some artefacts and other defaults.

So, what is the signal that transit in a RGB scart ?

YCbCr signal ? Full RGB ? Limited RGB ?


This picture seams to show that it can be Full RGB :




Because if we compare with all the other pictures...

Higan


https://media.joomeo.com/original/5af6cb6b68280.png

Super NT :


https://media.joomeo.com/original/5af6cb98de4b4.png

Analogue Super NT - Killer Instinct (Hybrid Scanlines) 02-23-2018

My script (with levels changed)


https://media.joomeo.com/original/5af6cbc1a8c0f.png

My script (without change of levels)


https://media.joomeo.com/original/5af6cc28a3095.png


... there are all the informations of the pictures !

So why the 16-235 levels exist to prevent defaults of the image, if here, it seams that we have Full RGB ?

I don't understand !

Or maybe, the Raw image in RGB from the Super Nes is converted in a Limited RGB or YUV signal ?

So, there is no clipping in the extreme blacks and whites, but mapping of the "RGB 0-255" to "RGB 16-235" or "YUV 4:2:0" (with Rec.601 color matrix I think) !

Can you explain to me please ?

And for the gamma, if I understand, I didn't need to convert it ?

And so, what is the good way to display the image like it was on a CRT TV ?


Thanks for your help ! I'm so confused now !

Last edited by SuperLumberjack; 12th May 2018 at 20:30.
SuperLumberjack is offline   Reply With Quote
Old 12th May 2018, 20:50   #218  |  Link
creaothceann
Registered User
 
Join Date: Jul 2010
Location: Germany
Posts: 357
Quote:
Originally Posted by StainlessS View Post
(why do people record a video game, indeed why do people play games is a mystery to me )
https://www.youtube.com/watch?v=KS7hkwbKmBM
creaothceann is offline   Reply With Quote
Old 12th May 2018, 21:30   #219  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Totally unbelievable.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 13th May 2018, 02:18   #220  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
It's weird !

This is "Mr. Nutz" with the Higan emulator, without the "Colors" filter (so, the default colors of the game with the raw picture) :


https://media.joomeo.com/original/5af78c0030bd9.png

And here is the game with the "Colors" filter activated (in the "Settings" and "Video emulation" sections) :


https://media.joomeo.com/original/5af78e096ba09.png

I understand now that it's more that only a levels adjustement or brightness/contrast adjustement.

But nothing is logical !


First, with this picture of "Donkey Kong Country", it's darker with the Higan and the Super NT picture :

Higan


https://media.joomeo.com/original/5af6c5501a3d1.png

Super NT :


https://media.joomeo.com/original/5af6c5feba931.png

My script (with levels changed)


https://media.joomeo.com/original/5af6c70a49172.png


But with this picture of "Donkey Kong Country 2", we notice, that some parts of the picture are lighter, with more details (see in the left-bottom corner) with the Super NT compared to Higan or my script :

Higan


https://media.joomeo.com/original/5af6ca69e7656.png

Super NT :


https://media.joomeo.com/original/5af6caa61ff98.png

My script (with levels changed)


https://media.joomeo.com/original/5af6cae2304f4.png


There is no logic ! Can you explain to me please ?

Last edited by SuperLumberjack; 13th May 2018 at 02:24.
SuperLumberjack 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 13:33.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.