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 21st April 2020, 16:15   #461  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Let's move this to the Sysinfo thread.
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 21st April 2020 at 16:21. Reason: typo
Groucho2004 is offline   Reply With Quote
Old 22nd April 2020, 20:57   #462  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
added LUTDeRainbow and LUTDeCrawl

new LUTComb() (it use LUTDeRainbow and LUTDeCrawl with MC) in AdvancedDenoising.avsi
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 26th April 2020, 19:32   #463  |  Link
dREV
Registered User
 
dREV's Avatar
 
Join Date: Jan 2019
Location: Antarctica
Posts: 74
Time for noob questions again.

Should I be modifying the script or something? I got kinda confused as I see nnedi3 twice and so forth. I modified a bit and looks fine in avspmod, however, as I asked over at AviSynth thread https://forum.doom9.org/showthread.p...74#post1908974 I'm trying to do my script and encode it in HEVC 4:2:0 10 bit profile but it's not working out for my live footage.

Is it possible to do both chroma shift and chroma upscale using your script? I'm just wondering if it's possible with the script you shared since my favorite resize scripts isn't working out in that profile but only in 4:4:4 which I don't mind but I don't wanna do that to live footage.

Here's the script I modified. Let me know if I screwed up or something.
Code:
useDebilinearM=true #Depend on the source
nativeWidth=1920 #Depend on the source
nativeHeight=1080 #Depend on the source
outputWidth=1280 #Depend on what you need
outputHeight=720 #Depend on what you need
noDesample=nativeWidth > outputWidth || nativeHeight > outputHeight
luma=IsAvsPlus() ? ExtractY() : ConvertToY8()
chroma=Interleave(IsAvsPlus() ? ExtractU() : UToY8(), IsAvsPlus() ? ExtractV() : VToY8())
desampleluma=noDesample ? luma : useDebilinearM ? luma.DebilinearM(nativeWidth,nativeHeight) : luma.ResizeX(nativeWidth,nativeHeight) #you must set the correct kernel and the settings here (Depend on the source)
outputluma=!(noDesample || (nativeWidth != outputWidth || nativeHeight != outputHeight)) ? desampleluma : desampleluma.nnedi3_resize16(outputWidth, outputHeight) #you can add another settings depend on what you need
outputchroma=chroma.nnedi3_resize16(outputWidth, outputHeight,0.25,nsize=6,pscrn=4,qual=2,etype=0,mixed=true,thr=1.0,elast=1.5,kernel_d="Spline64",kernel_u="Spline64",nlsb=false) #you can add another settings depend on what you need
YtoUV(outputchroma.SelectEven(),outputchroma.SelectOdd(),outputluma)

I dunno if it's doing a chroma shift and chroma upscale but I modified to try to match the file size in avspmod as it wasn't the same as my usual script that I use but it's still less kilobyte size.

Also, am I suppose to be using the above script with the second link that you shared? https://forum.doom9.org/showthread.p...65#post1906465

Last edited by dREV; 26th April 2020 at 19:38. Reason: stuff
dREV is offline   Reply With Quote
Old 26th April 2020, 20:21   #464  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by dREV View Post
Time for noob questions again.

Should I be modifying the script or something? I got kinda confused as I see nnedi3 twice and so forth. I modified a bit and looks fine in avspmod, however, as I asked over at AviSynth thread https://forum.doom9.org/showthread.p...74#post1908974 I'm trying to do my script and encode it in HEVC 4:2:0 10 bit profile but it's not working out for my live footage.

Is it possible to do both chroma shift and chroma upscale using your script? I'm just wondering if it's possible with the script you shared since my favorite resize scripts isn't working out in that profile but only in 4:4:4 which I don't mind but I don't wanna do that to live footage.

Here's the script I modified. Let me know if I screwed up or something.
Code:
useDebilinearM=true #Depend on the source
nativeWidth=1920 #Depend on the source
nativeHeight=1080 #Depend on the source
outputWidth=1280 #Depend on what you need
outputHeight=720 #Depend on what you need
noDesample=nativeWidth > outputWidth || nativeHeight > outputHeight
luma=IsAvsPlus() ? ExtractY() : ConvertToY8()
chroma=Interleave(IsAvsPlus() ? ExtractU() : UToY8(), IsAvsPlus() ? ExtractV() : VToY8())
desampleluma=noDesample ? luma : useDebilinearM ? luma.DebilinearM(nativeWidth,nativeHeight) : luma.ResizeX(nativeWidth,nativeHeight) #you must set the correct kernel and the settings here (Depend on the source)
outputluma=!(noDesample || (nativeWidth != outputWidth || nativeHeight != outputHeight)) ? desampleluma : desampleluma.nnedi3_resize16(outputWidth, outputHeight) #you can add another settings depend on what you need
outputchroma=chroma.nnedi3_resize16(outputWidth, outputHeight,0.25,nsize=6,pscrn=4,qual=2,etype=0,mixed=true,thr=1.0,elast=1.5,kernel_d="Spline64",kernel_u="Spline64",nlsb=false) #you can add another settings depend on what you need
YtoUV(outputchroma.SelectEven(),outputchroma.SelectOdd(),outputluma)

I dunno if it's doing a chroma shift and chroma upscale but I modified to try to match the file size in avspmod as it wasn't the same as my usual script that I use but it's still less kilobyte size.

Also, am I suppose to be using the above script with the second link that you shared? https://forum.doom9.org/showthread.p...65#post1906465
nativeWidth =/= inputWidth

native is https://web.archive.org/web/20200112...e/resolutions/

edit: I did some update for the method, so it not use descale if the native = input

chroma shift is needed since 4:2:0 mpeg2 (even avc and newer ones) is https://web.archive.org/web/20160611...e/YCBCR420.GIF

in your old method you use 2 resizers in full YUV which make it slower than my edit

the second one here https://forum.doom9.org/showthread.p...65#post1906465 just for make the output better
__________________
See My Avisynth Stuff

Last edited by real.finder; 26th April 2020 at 20:54.
real.finder is offline   Reply With Quote
Old 27th April 2020, 12:54   #465  |  Link
dREV
Registered User
 
dREV's Avatar
 
Join Date: Jan 2019
Location: Antarctica
Posts: 74
OK, so I can't use your script for 4:2:0. That's fine no big deal.

I have several issues with your script. I am interested in testing the speed but it's not working in either 16 bit or HBD. Maybe I am doing it wrong but it only works in the 8 bit field. Even if I don't edit anything besides native and output resolution sizes it's still the same result.

Quote:
dither_convert_8_to_16()
# filter(s)
s16 = last
DitherPost()
# filter(s)
dither_convert_8_to_16()
s16.Dither_limit_dif16 (last,)
# does not work here in lsb.
DitherPost()
# 8 bit field - where I put your script at to get it to work
ConvertBits(bits=16)
ConvertToStacked()
useDebilinearM=true #Depend on the source
nativeWidth=1920 #Depend on the source
nativeHeight=1080 #Depend on the source
outputWidth=1280 #Depend on what you need
outputHeight=720 #Depend on what you need
noDesample=(nativeWidth > outputWidth && nativeHeight > outputHeight) || (nativeHeight >= Height && nativeWidth >= Width)
luma=IsAvsPlus() ? ExtractY() : ConvertToY8()
chroma=Interleave(IsAvsPlus() ? ExtractU() : UToY8(), IsAvsPlus() ? ExtractV() : VToY8())
desampleluma=noDesample ? luma : useDebilinearM ? luma.DebilinearM(nativeWidth,nativeHeight, DeResizeMT=false,thr=01) : luma.ResizeX(nativeWidth,nativeHeight,desampling=false) #you must set the correct kernel and the settings here (Depend on the source)
outputluma=!(noDesample || (nativeWidth != outputWidth || nativeHeight != outputHeight)) ? desampleluma : desampleluma.nnedi3_resize16(outputWidth, outputHeight) #you can add another settings depend on what you need
outputchroma=chroma.nnedi3_resize16(outputWidth, outputHeight,nsize=6,pscrn=4,qual=2,etype=0,mixed=true,thr=1.0,elast=1.5,kernel_d="Spline64",kernel_u="Spline64",src_top=0.0,src_left=0.50,nlsb=false) #you can add another settings depend on what you need
YtoUV(outputchroma.SelectEven(),outputchroma.SelectOdd(),outputluma)
ConvertFromStacked().ConvertToDoubleWidth()
Another issue is I been trying to match the settings from my usual script but it's not doing anything. In the DebilinearM settings for the thr parameter won't change the sharpness even if I go higher it remains the same file size. I got 1 kilobyte more increased file size with the second nnedi3 script copying my script to yours but it's still isn't matching my usual script.

So I took samples from my test in avspmod and took it into photoshop to see why.

My usual script png image was 476 kb
your script is 434 kb

Here's a zoomed in of that image I took and the results show the sharpness on DebilinearM script compared to the cleaner and less grain but less sharpness of your script which explains why the file size is smaller.

First image is using your modified script of DebilinearM together with NNEDI3_resize16 in YUV and
second image is your newer resize script with my editing (the same exact script above but in the 8 bit field).



Any clue why is there a difference? It should be the same but it isn't. And why the DebilinearM desampleluma line does nothing with thr? I'm not a fan of the cleaner look but I do like the faster speed compared to my usual script. The sharpness could be an issue for me on detail compared to my usual script but haven't gone that far with my testing so far cuz maybe the file size is different since it's in the 8 bit field and not in 16 bit.

Last edited by dREV; 27th April 2020 at 21:16. Reason: stuff
dREV is offline   Reply With Quote
Old 27th April 2020, 14:17   #466  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
make these

nativeWidth=1280 #Depend on the source
nativeHeight=720 #Depend on the source

and they should be the same

but seems you don't know what are you doing, since you use descale things without know what is the native resolutions
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 27th April 2020, 19:50   #467  |  Link
dREV
Registered User
 
dREV's Avatar
 
Join Date: Jan 2019
Location: Antarctica
Posts: 74
Could you stick to answering my questions? I know what I am doing but it seems you like to ignore my questions when I post as I specifically stated that I am trying to match my usual script with yours. That's my main priority right now before moving on not looking for no damn native resolution.

Plus you didn't even bother to answer my first question (and several others) on why I cannot use your script in either 16 bit or HBD but only in 8 bit field or why the parameter thr is not working in DebilinearM as I need that for sources that are blurry.

I did a test encode and the speed is slower than my usual script.
I am getting 0.26 fps for 5518 frames using your script
compared to 0.46 fps with same amount of frames using Gradfun3mod + NNEDI_resize16 YUV script in 16 bit.

So I'd appreciate it if you would answer my questions regarding your script instead of just insinuating what you're imagining. And about Scaled444tonative that script is pointless for me unless it is required to use your script more effectively.
dREV is offline   Reply With Quote
Old 27th April 2020, 20:10   #468  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by dREV View Post
Could you stick to answering my questions? I know what I am doing but it seems you like to ignore my questions when I post as I specifically stated that I am trying to match my usual script with yours. That's my main priority right now before moving on not looking for no damn native resolution.
why do you use Debilinear then? it's not a normal resizer if you don't know!

Quote:
Originally Posted by dREV View Post
Plus you didn't even bother to answer my first question (and several others) on why I cannot use your script in either 16 bit or HBD but only in 8 bit field or why the parameter thr is not working in DebilinearM as I need that for sources that are blurry.
it should work with even lsb (which seems you use, not normal 8bit) if you know what you are doing but anyway if you read the code you will know that it will not use DebilinearM if the input = native


Quote:
Originally Posted by dREV View Post
I did a test encode and the speed is slower than my usual script.
I am getting 0.26 fps for 5518 frames using your script
compared to 0.46 fps with same amount of frames using Gradfun3mod + NNEDI_resize16 YUV script in 16 bit.
ok then stay with your old method since you get that

Quote:
Originally Posted by dREV View Post
So I'd appreciate it if you would answer my questions regarding your script instead of just insinuating what you're imagining. And about Scaled444tonative that script is pointless for me unless it is required to use your script more effectively.
tell this to feisty2 Scaled444tonative =~= ChromaReconstructor
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 27th April 2020, 21:17   #469  |  Link
dREV
Registered User
 
dREV's Avatar
 
Join Date: Jan 2019
Location: Antarctica
Posts: 74
No thanks to you I figured it out.

I had to change 2 codes:
from useDebilinearM=false and ResizeX(nativeWidth,nativeHeight,kernel="bicubic",a1=0,a2=1,desampling=true)
to useDebilinearM=true and ResizeX(nativeWidth,nativeHeight,kernel="bicubic",a1=0,a2=1,desampling=false)
gets it to almost match my usual script which is what I been asking for.

It would seem your ego is getting in the way but it does not work in lsb. Just how many times do I gotta write this before you get it? Even when I post how I got it to work with my actual script here https://forum.doom9.org/showthread.p...58#post1909358 highlighted in red your inflated ego gets in the way of being able to properly convey an explanation.

Heck, you still haven't answered why thr parameter for DebilinearM will not work despite your own words stating this in your script: #you must set the correct kernel and the settings here (Depend on the source). Only ResizeX and NNEDI3_resize16 settings work. And once again your script does not work in lsb. It only works in 8 bit again https://forum.doom9.org/showthread.p...58#post1909358 highlighted in red.

Why would I need to ask feisty2 when you gave me the link with no proper explanation if it goes together with your script or not. This is absurd.

Tone down your arrogance dude or maybe you enjoy stroking your ego and wasting people's damn time. Especially when you took the time to reply to me in an attempt to answer my question which I may add you didn't bother to read what my question was in the first place as I was looking for a chroma shift and chroma upscale script and for it to work in a 4:2:0 color depth profile only for you to tell me to just use a resizer... While also providing your new 4:4:4 script. What else was there but your ego being involved?

Has anybody told you you are a terrible teacher?

Instead of correcting what I may be doing wrong your busy stroking your vain ego. I can't stand people with pride.
Last time, your script does not work in lsb even when I add the lsb code to the script. https://forum.doom9.org/showthread.p...58#post1909358 highlighted in red. Now I know why I haven't kept up with your thread.

Last edited by dREV; 27th April 2020 at 21:23. Reason: stuff
dREV is offline   Reply With Quote
Old 27th April 2020, 21:46   #470  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by dREV View Post
No thanks to you I figured it out.

I had to change 2 codes:
from useDebilinearM=false and ResizeX(nativeWidth,nativeHeight,kernel="bicubic",a1=0,a2=1,desampling=true)
to useDebilinearM=true and ResizeX(nativeWidth,nativeHeight,kernel="bicubic",a1=0,a2=1,desampling=false)
gets it to almost match my usual script which is what I been asking for.

It would seem your ego is getting in the way but it does not work in lsb. Just how many times do I gotta write this before you get it? Even when I post how I got it to work with my actual script here https://forum.doom9.org/showthread.p...58#post1909358 highlighted in red your inflated ego gets in the way of being able to properly convey an explanation.

Heck, you still haven't answered why thr parameter for DebilinearM will not work despite your own words stating this in your script: #you must set the correct kernel and the settings here (Depend on the source). Only ResizeX and NNEDI3_resize16 settings work. And once again your script does not work in lsb. It only works in 8 bit again https://forum.doom9.org/showthread.p...58#post1909358 highlighted in red.

Why would I need to ask feisty2 when you gave me the link with no proper explanation if it goes together with your script or not. This is absurd.

Tone down your arrogance dude or maybe you enjoy stroking your ego and wasting people's damn time. Especially when you took the time to reply to me in an attempt to answer my question which I may add you didn't bother to read what my question was in the first place as I was looking for a chroma shift and chroma upscale script and for it to work in a 4:2:0 color depth profile only for you to tell me to just use a resizer... While also providing your new 4:4:4 script. What else was there but your ego being involved?

Has anybody told you you are a terrible teacher?

Instead of correcting what I may be doing wrong your busy stroking your vain ego. I can't stand people with pride.
Last time, your script does not work in lsb even when I add the lsb code to the script. https://forum.doom9.org/showthread.p...58#post1909358 highlighted in red
the problem is you don't know what are you doing as I said (and still same with your new edit)

also I am not a teacher

Code:
dither_convert_8_to_16()
# filter(s)
s16 = last
DitherPost()
# filter(s)
dither_convert_8_to_16()
s16.Dither_limit_dif16 (last,)
# does work here in lsb.
useDebilinearM=true #Depend on the source
nativeWidth=1280 #Depend on the source
nativeHeight=720 #Depend on the source
outputWidth=1280 #Depend on what you need
outputHeight=720 #Depend on what you need
noDesample=(nativeWidth > outputWidth && nativeHeight > outputHeight) || (nativeHeight >= Height/2 && nativeWidth >= Width)
luma=IsAvsPlus() ? ExtractY() : ConvertToY8()
chroma=Interleave(IsAvsPlus() ? ExtractU() : UToY8(), IsAvsPlus() ? ExtractV() : VToY8())
desampleluma=noDesample ? luma : useDebilinearM ? luma.DebilinearM(nativeWidth,nativeHeight, DeResizeMT=true,thr=01, lsb_inout=true) : luma.ResizeX(nativeWidth,nativeHeight, desampling=true,lsb_in=true,lsb_out=true) #you must set the correct kernel and the settings here (Depend on the source)
outputluma=!(noDesample || (nativeWidth != outputWidth || nativeHeight != outputHeight)) ? desampleluma : desampleluma.nnedi3_resize16(outputWidth, outputHeight, lsb_in=true,lsb=true) #you can add another settings depend on what you need
outputchroma=chroma.nnedi3_resize16(outputWidth, outputHeight,nsize=6,pscrn=4,qual=2,etype=0,mixed=true,thr=1.0,elast=1.5,kernel_d="Spline64",kernel_u="Spline64",src_top=0.0,src_left=0.50,nlsb=false, lsb_in=true,lsb=true) #you can add another settings depend on what you need
YtoUV(outputchroma.SelectEven(),outputchroma.SelectOdd(),outputluma)
ConvertFromStacked().ConvertToDoubleWidth()
or in HBD

Code:
dither_convert_8_to_16()
# filter(s)
s16 = last
DitherPost()
# filter(s)
dither_convert_8_to_16()
s16.Dither_limit_dif16 (last,)
ConvertFromStacked()
useDebilinearM=true #Depend on the source
nativeWidth=1280 #Depend on the source
nativeHeight=720 #Depend on the source
outputWidth=1280 #Depend on what you need
outputHeight=720 #Depend on what you need
noDesample=(nativeWidth > outputWidth && nativeHeight > outputHeight) || (nativeHeight >= Height && nativeWidth >= Width)
luma=IsAvsPlus() ? ExtractY() : ConvertToY8()
chroma=Interleave(IsAvsPlus() ? ExtractU() : UToY8(), IsAvsPlus() ? ExtractV() : VToY8())
desampleluma=noDesample ? luma : useDebilinearM ? luma.DebilinearM(nativeWidth,nativeHeight, DeResizeMT=true,thr=01) : luma.ResizeX(nativeWidth,nativeHeight,desampling=true) #you must set the correct kernel and the settings here (Depend on the source)
outputluma=!(noDesample || (nativeWidth != outputWidth || nativeHeight != outputHeight)) ? desampleluma : desampleluma.nnedi3_resize16(outputWidth, outputHeight) #you can add another settings depend on what you need
outputchroma=chroma.nnedi3_resize16(outputWidth, outputHeight,nsize=6,pscrn=4,qual=2,etype=0,mixed=true,thr=1.0,elast=1.5,kernel_d="Spline64",kernel_u="Spline64",src_top=0.0,src_left=0.50,nlsb=false) #you can add another settings depend on what you need
YtoUV(outputchroma.SelectEven(),outputchroma.SelectOdd(),outputluma)
ConvertToDoubleWidth() #if you still insistent to use old hacks
__________________
See My Avisynth Stuff

Last edited by real.finder; 27th April 2020 at 22:18. Reason: code typo
real.finder is offline   Reply With Quote
Old 28th April 2020, 20:41   #471  |  Link
dREV
Registered User
 
dREV's Avatar
 
Join Date: Jan 2019
Location: Antarctica
Posts: 74
I'm not surprised you have no idea what I even meant by teacher since English may not be your first language.

Anyways, maybe you should read the documentation in which you helped edit and see that the one for HBD you did in combination with dither_convert_8_to_16() is no where in sight as an example.
http://avisynth.nl/index.php/ConvertStacked which isn't your first time neglecting to document that when I tried to get NNEDI3_resize16 to work only to be told to input nlsb=false which did not exist in previous versions.

And by the way, the HBD does not work. I get this message:
lsb hack is not Compatible with native high bit depth
(path:\ResizeX_plus v1.0.1_mod 9.37.avsi, line 80)
new file (3), line 201

And since I rarely use ResizeX script as a function I had no idea it needed lsb, so that's my fault there.

Now for something odd. Using the same sample images for my testing for whatever reason putting your script in the 8 bit field works out way better when using native resolution on the source.
However, when it's done in lsb (non-HBD) field it creates halo's. I don't even understand why it does that. Nothing has been changed besides adding lsb to the code as seen below.
I used the default script to illustrate this followed by the exact script.



Code:
Left Image in 8 bit field script
dither_convert_8_to_16()
s16 = last
DitherPost()
dither_convert_8_to_16()
s16.Dither_limit_dif16 (last,)
DitherPost(mode=-1)
useDebilinearM=false #Depend on the source
nativeWidth=1280 #Depend on the source
nativeHeight=720 #Depend on the source
outputWidth=1280 #Depend on what you need
outputHeight=720 #Depend on what you need
noDesample=(nativeWidth > outputWidth && nativeHeight > outputHeight) || (nativeHeight >= Height && nativeWidth >= Width)
luma=IsAvsPlus() ? ExtractY() : ConvertToY8()
chroma=Interleave(IsAvsPlus() ? ExtractU() : UToY8(), IsAvsPlus() ? ExtractV() : VToY8())
desampleluma=noDesample ? luma : useDebilinearM ? luma.DebilinearM(nativeWidth,nativeHeight, DeResizeMT=true) : luma.ResizeX(nativeWidth,nativeHeight,kernel="bicubic",a1=0,a2=1,desampling=true) #you must set the correct kernel and the settings here (Depend on the source)
outputluma=!(noDesample || (nativeWidth != outputWidth || nativeHeight != outputHeight)) ? desampleluma : desampleluma.nnedi3_resize16(outputWidth, outputHeight) #you can add another settings depend on what you need
outputchroma=chroma.nnedi3_resize16(outputWidth, outputHeight,0.25,kernel_u="blackman") #you can add another settings depend on what you needYtoUV(outputchroma.SelectEven(),outputchroma.SelectOdd(),outputluma)
ConvertBits(bits=16)
ConvertToStacked()
ConvertFromStacked().ConvertToDoubleWidth()
and

Code:
Right Image using LSB script
dither_convert_8_to_16()
s16 = last
DitherPost()
dither_convert_8_to_16()
s16.Dither_limit_dif16 (last,)
useDebilinearM=false #Depend on the source
nativeWidth=1280 #Depend on the source
nativeHeight=720 #Depend on the source
outputWidth=1280 #Depend on what you need
outputHeight=720 #Depend on what you need
noDesample=(nativeWidth > outputWidth && nativeHeight > outputHeight) || (nativeHeight >= Height && nativeWidth >= Width)
luma=IsAvsPlus() ? ExtractY() : ConvertToY8()
chroma=Interleave(IsAvsPlus() ? ExtractU() : UToY8(), IsAvsPlus() ? ExtractV() : VToY8())
desampleluma=noDesample ? luma : useDebilinearM ? luma.DebilinearM(nativeWidth,nativeHeight, DeResizeMT=true, lsb_inout=true) : luma.ResizeX(nativeWidth,nativeHeight,kernel="bicubic",a1=0,a2=1,desampling=true, lsb_in=true,lsb_out=true) #you must set the correct kernel and the settings here (Depend on the source)
outputluma=!(noDesample || (nativeWidth != outputWidth || nativeHeight != outputHeight)) ? desampleluma : desampleluma.nnedi3_resize16(outputWidth, outputHeight, lsb_in=true,lsb=true) #you can add another settings depend on what you need
outputchroma=chroma.nnedi3_resize16(outputWidth, outputHeight,0.25,kernel_u="blackman", lsb_in=true,lsb=true) #you can add another settings depend on what you need
YtoUV(outputchroma.SelectEven(),outputchroma.SelectOdd(),outputluma)
DitherPost(mode=-1)
ConvertBits(bits=16)
ConvertToStacked()
ConvertFromStacked().ConvertToDoubleWidth()
dREV is offline   Reply With Quote
Old 28th April 2020, 21:11   #472  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
English may not be your first language
indeed, it's not as I said many many times

and nnedi3_resize16 work with HBD since months, you are not up do date go back to older post here, and using HBD is like using 8bit no need to use lsb=true or you will get error or even worst the output will be wrong

anyway, it work for me (with the 2 codes I post or with pure HBD), you are free to use it or not, I didn't do it for you in first place as I said, it was for friend who encode anime in 720 444 from 1080 420 and he is happy with my code

and of course the results of 8bit not 100% same as lsb and both not 100% same as HBD, but with nlsb=true (now I make it false by Default as I said before) then HBD almost if not 100% same as lsb (with lsb_in=true, lsb=true, nlsb=true)
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 29th April 2020, 02:05   #473  |  Link
dREV
Registered User
 
dREV's Avatar
 
Join Date: Jan 2019
Location: Antarctica
Posts: 74
Quote:
Originally Posted by real.finder View Post
and nnedi3_resize16 work with HBD since months, you are not up do date go back to older post here, and using HBD is like using 8bit no need to use lsb=true or you will get error or even worst the output will be wrong
I am up to date on nnedi3_resize16.

Quote:
Originally Posted by real.finder View Post
anyway, it work for me (with the 2 codes I post or with pure HBD), you are free to use it or not, I didn't do it for you in first place as I said, it was for friend who encode anime in 720 444 from 1080 420 and he is happy with my code
I am not sure why you even wrote that or had to let me know about it in the first place. You told me about the script and I'm asking questions about it that's it and I can do without your ego in the way. Your script is useful for me to use which is why my main priority was to get it to match my usual script before I move on so I can prepare it with my other resize scripts for source scenarios that I've come across.

Quote:
Originally Posted by real.finder View Post
and of course the results of 8bit not 100% same as lsb and both not 100% same as HBD, but with nlsb=true (now I make it false by Default as I said before) then HBD almost if not 100% same as lsb (with lsb_in=true, lsb=true, nlsb=true)
I tried using it with nlsb=true with your default script and it now says this message:
nnedi3_resize16: you can't use lsb hacks with HBD input or RGB
(path:\nnedi3_resize_v3.3.plus 2020.avsi, line 137
(New File (3), line 177)

Here's the exact HBD script, as you wrote it here https://forum.doom9.org/showthread.p...24#post1909424
Code:
dither_convert_8_to_16()
s16 = last
DitherPost()
dither_convert_8_to_16()
s16.Dither_limit_dif16 (last,)
ConvertFromStacked()
useDebilinearM=false #Depend on the source
nativeWidth=1280 #Depend on the source
nativeHeight=720 #Depend on the source
outputWidth=1280 #Depend on what you need
outputHeight=720 #Depend on what you need
noDesample=(nativeWidth > outputWidth && nativeHeight > outputHeight) || (nativeHeight >= Height && nativeWidth >= Width)
luma=IsAvsPlus() ? ExtractY() : ConvertToY8()
chroma=Interleave(IsAvsPlus() ? ExtractU() : UToY8(), IsAvsPlus() ? ExtractV() : VToY8())
desampleluma=noDesample ? luma : useDebilinearM ? luma.DebilinearM(nativeWidth,nativeHeight, DeResizeMT=true) : luma.ResizeX(nativeWidth,nativeHeight,kernel="bicubic",a1=0,a2=1,desampling=true) #you must set the correct kernel and the settings here (Depend on the source)
outputluma=!(noDesample || (nativeWidth != outputWidth || nativeHeight != outputHeight)) ? desampleluma : desampleluma.nnedi3_resize16(outputWidth, outputHeight,nlsb=true) #you can add another settings depend on what you need
outputchroma=chroma.nnedi3_resize16(outputWidth, outputHeight,0.25,kernel_u="blackman",nlsb=true) #you can add another settings depend on what you need
YtoUV(outputchroma.SelectEven(),outputchroma.SelectOdd(),outputluma)
ConvertToDoubleWidth() #if you still insistent to use old hacks

And before it is asked yet again nnedi3_resize16 is updated from your main page. The version is dated 2020.04.07 as well as updated ResizeX v1.0.1 mod 9.37 and DebilinearM v1.3.1 mod 1.29. I'm about at my limit with getting this HBD shit to get it to work - always one problem after another, so I don't care if you answer this one or not.

What's more important to me now is how come your chroma shift on the second nnedi3 was at 0.25? I thought it's suppose to be 0.50. Which one is it? Is it src_left=0.25 for 4:4:4 while src_left=0.50 only for 4:2:0? When I tried to match with my sources it seems 0.25 is the one at least for 2 sources I used so far.

Also, does your script do chroma upscaling? As I said before I don't understand the language of what it's doing so I'd like to know. And is there a way for me to see if it upscaled it or not?
dREV is offline   Reply With Quote
Old 29th April 2020, 04:01   #474  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
I was mean nlsb=true with lsb as I put it in () ofc nlsb is still lsb hack, you should not add it when you use HBD as input clip

HBD should has no problem if you don't have to use it with lsb (or another hack), mean if you use it as pure HBD

like:-

ffms2("some8bitvideo")
convertbits(16)
some filter that work with HBD
another filter with HBD

or if your source is already HBD

ffms2("someHBDvideo")
some filter that work with HBD
another filter with HBD

and so on, and in the end use the script with up to date encoder without any additions
well, you may need to convert 10bit (or 12bit or 14bit) to 16bit but that can be done in avs+ like this:-

ffms2("someHBDvideo") #not 16bit, like 10bit or 12bit
some filter that work with HBD
another filter with HBD
convertbits(16)

is this that hard? I don't think so, but you may not like my words but "you don't know what are you doing" and then you start false accusations against me, like say I am waste your time but in fact YOU DID WASTE MY TIME and also another people time like https://forum.doom9.org/showthread.p...24#post1884824 since you still don't get the relationship between lsb and another hacks with native HBD in avs+

then the native resolutions, and now I am afraid about next war with chroma shift!

anyway, I will not get involved with you again But I will answer for the last time since you don't read wikis and Guides and I am writing this post, I use 0.25 since I deal with half resolutions chroma (4:2:0), in the old code they use 0.5 cuz it done for both chroma and luma (Full YUV) and inside it will be 0.25 for chroma if it 420. edit: for more info https://forum.doom9.org/showthread.p...04#post1663804 and https://forum.doom9.org/showthread.php?t=170832

so, my code only if you did 1080 420 to 720 444, anything else you have to did some edits, ofc if you encode from 444 to 444 you only need a resizer, and if from 420 to 420 or 422 to 422 you also don't need any code except a good resizer (one that work with MPEG2 chroma centre)

Quote:
Also, does your script do chroma upscaling? As I said before I don't understand the language of what it's doing so I'd like to know. And is there a way for me to see if it upscaled it or not?
it does ofc, from 540 to 720 using nnedi3_resize16
__________________
See My Avisynth Stuff

Last edited by real.finder; 29th April 2020 at 06:23.
real.finder is offline   Reply With Quote
Old 20th May 2020, 05:35   #475  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
added unb_s.avsi *.mp4 guy unbt and unbs and new unbtmc

test code to make sure LUTComb don't make any termporal artifacts (use it after ivtc/deint):- LUTComb.Repair(unbs.Rainbow_Smooth)

added GrainStabilizeMC

and some updates and fixes for others
__________________
See My Avisynth Stuff

Last edited by real.finder; 20th May 2020 at 05:58.
real.finder is offline   Reply With Quote
Old 20th May 2020, 08:12   #476  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
Would you mind creating a small utility function to limit the amount of change with hdb clips properly? 8-bit clips are restricted to 0-255 but anything beyond 8 bits allows for more values so it could be used to tune the filtering strength much better. I see the functionality is included as a part of some other functions but I think a generic function would be very useful in many user's toolbox. Thanks for the other ports anyway
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 20th May 2020, 08:44   #477  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Boulder View Post
Would you mind creating a small utility function to limit the amount of change with hdb clips properly? 8-bit clips are restricted to 0-255 but anything beyond 8 bits allows for more values so it could be used to tune the filtering strength much better. I see the functionality is included as a part of some other functions but I think a generic function would be very useful in many user's toolbox. Thanks for the other ports anyway
I already make these parameters float if they int so user can use something like this 231.77
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 20th May 2020, 08:49   #478  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
Quote:
Originally Posted by real.finder View Post
I already make these parameters float if they int so user can use something like this 231.77
But is that functionality available as a separate utility function so you could use it with any filter against the original clip?
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 20th May 2020, 09:24   #479  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Boulder View Post
But is that functionality available as a separate utility function so you could use it with any filter against the original clip?
don't know if I get what you need correctly, but slimit_dif() in Zs_RF_Shared.avsi base on Dither_limit_dif16 idea (not 100% same output)
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 20th May 2020, 09:54   #480  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
Quote:
Originally Posted by real.finder View Post
don't know if I get what you need correctly, but slimit_dif() in Zs_RF_Shared.avsi base on Dither_limit_dif16 idea (not 100% same output)
Thanks, I'll check that one out. It looks like it would suit the purpose fine.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Reply

Tags
avisynth, avs script, avs+, banding, generator, hbd, mod

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 14:31.


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