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 22nd July 2019, 04:13   #261  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Natty View Post
thanks. will this speed up native HBD (16) too?
I did added more updates today, many scripts now should be faster in HBD (10-32) thanks to avs+ expr()

Quote:
Originally Posted by StainlessS View Post
I had a good look for the banding generator, but could not find.

What is the cause of "Moving Banding", just moving images ?

EDIT: This works but need low OUTLEVELS for real obvious banding
Code:
Function BandingGenny(clip c,int "nLevels",Bool "PcLevels") { # https://forum.doom9.org/showthread.php?p=1879799#post1879799
    c
    nLevels  = Default(NLevels,36)
    PcLevels = Default(PcLevels,False)
    Foot = (PcLevels) ?   0 : 16
    Head = (PcLevels) ? 255 : 235
    Levels(Foot          , 1.0, Head, Head-nLevels+1, Head,coring=false)    # Squish   range to nLevels number of levels
    Levels(Head-nLevels+1, 1.0, Head, Foot          , Head,coring=false)    # UnSquish range, still nLevels number of levels
    return Last
}


AviSource("D:\AutoLevels\OZ.avi")
ConvertToYV12
ORG=Last
### CONFIG ###
PCLEVELS  = False
OUTLEVELS = 36
SHOW      = false
##########
BandingGenny(OutLevels,PcLevels)
(Show) ? Subtract(ORG) : Last
return last
EDIT: Above banding definitely moves plenty good.
thanks StainlessS, will try it, "Moving Banding" was this http://i.imgur.com/uonzj6V.png but moving from left to right and vice versa kinda thing

edit:
Code:
ImageSource("uonzj6V.png")
ConvertToYV24(matrix="Rec709", interlaced=false)
mt_merge(last,FlipHorizontal(),BlankClip(last,color = $FFFFFF).FadeIO(500))
this kinda do it

edit: find it here https://forum.doom9.org/showthread.p...70#post1668270

-------

if anyone has dark Anime Scenes that has banding, and will be better if the dark part that has banding has some details
__________________
See My Avisynth Stuff

Last edited by real.finder; 23rd July 2019 at 07:09.
real.finder is offline   Reply With Quote
Old 23rd July 2019, 09:55   #262  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by dREV View Post


The script is called Gradfun3mod. https://pastebin.com/0mkhsimh
https://pastebin.com/BY6CfBMv

Code:
dither_convert_8_to_16()
ly = GradFun3mod(thr=0.35, smode=2,thr_det=2,elast=4,mode=6, yuv444=true, resizer="DebilinearMTM", lsb_in=true, lsb=true)
lc = nnedi3_resize16(1280*2, 720*2,lsb_in=true,lsb=true,kernel_d="Spline64",kernel_u="Spline64",src_top=0.0,src_left=0.50) #
lu = lc.UtoY()
lv = lc.VtoY()
YtoUV(lu,lv,ly)
Dither_out()
edit: there are new update

but anyway I don't encourage get 720 yuv444 from 1080 yuv420

Gradfun3mod maybe can get more updates but not likely for me, so anyone else can feel free to do it
__________________
See My Avisynth Stuff

Last edited by real.finder; 23rd July 2019 at 10:59.
real.finder is offline   Reply With Quote
Old 23rd July 2019, 10:30   #263  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
EDIT: OK, I get what you mean by moving banding now.

You can make '[EDIT: physically] moving' color gradient banding (if required) by saving AVI from VDub2/Menu/Tools/"Create Test Video"/Gradients,
and run through the BandingGenny() thing. [for testing purposes, eg banding removal testing]
__________________
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; 23rd July 2019 at 11:54.
StainlessS is offline   Reply With Quote
Old 23rd July 2019, 12:00   #264  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by dREV View Post
ResizeX_v1.0.1 mod 9
there was a big problem in ResizeX, it was not ready for lsb with desampling

I did post mod 9.1 to fix that
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 27th July 2019, 15:11   #265  |  Link
dREV
Registered User
 
dREV's Avatar
 
Join Date: Jan 2019
Location: Antarctica
Posts: 74
Quote:
Originally Posted by real.finder View Post
it's already has the pastebin https://pastebin.com/LP7kDbe6 but seems you didn't note it


about n16 yes it's like lsb but true 16bit, we did talk about that here in the past (and even in other Threads like https://forum.doom9.org/showthread.p...47#post1875147)

will see the other things you asked for later (maybe in few Hours or some days)

and since you bring deband filter, can you or other members provides some video samples (I remember there also some code in avs to generate moving banding in some post here in doom9 few years ago)
Thanks. I had no idea it was there. Looks like I wasn't the only one that didn't spot it. I been busy was going to reply several days ago but been too busy and with the heat wave too.

I was going to reply about an issue with the sharpness not looking the same as the original, the thr code was backwards but now see there's been an update to ResizeX_v1.0.1 mod 9 to ResizeX_v1.0.1 mod 9.35 and seeing the results looks like the original DebilinearM for AviSynth x86. Thanks alot! Looking forward to doing some encodes with this before fully switchin.


Quote:
Originally Posted by real.finder View Post
edit: there are new update

but anyway I don't encourage get 720 yuv444 from 1080 yuv420

Gradfun3mod maybe can get more updates but not likely for me, so anyone else can feel free to do it
If you encode it in 4:2:0 the colors diminish which bothers me as it don't match the Bluray (downscaled comparisons obviously) but with 444 it does, so that's my preference. In H264 with 8 bit or 10 bit from several test encodes seem to make it better going by those codes I've posted. HEVC with 10 bit and 12 bit even moreso. Dunno about 8 bit stuff with it I think I was having trouble getting it to work with that. I'm aware Doom9 prefers what they like, so I can understand why you write that having read a lot (and a lot) of threads on this site and elsewhere like VideoHelp.

Thanks for updating Gradfun3mod to be used on 64 bit Avisynth+ and the example script it helps me alot and I'm sure for newbies as well. Will you put this script on your list of updates on the first page? Since you may decide not update it anymore you could indicate this as well.

Also, could I be educated on what native HBD (16) means? Wondering if I should understand this term to be used in AviSynth+ 64 bit.

Also, I read that FTurn http://avisynth.nl/index.php/FTurn was implemented but the code doesn't work so had to write TurnRight and TurnLeft, my question is is it really using this?

Quote:
Originally Posted by StvG View Post
Did you try different radius values? radius 2-5 should be ok.
I did at first to see what it does didn't see anything and after I spotted those artifacts. With that in mind I tried to check it out and seems to work but not certain on the extend without doing some small encodes. Thanks for your help.


I want to advertise this script for no other reason then to let it be known and be used by others as I don't see it available on the original creators webpage any longer and maybe somebody will include these scripts into the AviSynth filter for people to find easier and the Wiki entries for it. I believe they have moved on to VaporSynth.

It is called f3kdbmod16 / flash3kyuuMOD16
Code:
# Author: Petoyusa, eXmendiC, Frechdachs, kageru
# f3kdbmod16 / flash3kyuuMOD16 Version: 1.3
#
# Radiusy = Radius of the Debian in the Luma area (Y) 
# Radiusc = radius of the Debander in the Chroma range (UV) 
# Thry = strength of the gander in the luma area (Y) 
# Thrc = Strength of the Debander in the Chroma-Area (UV) 
# Mask_thr = thickness of the mask to recognize contours / details of banding   # this is thr=0.88 on Gradfun3()
# Mask_radius = Radius of the mask                                              # This is probably mask on Gradfun3() 2 is the default on Gradfun3 and 0 is to use the mask when banding
# Grainy = grain which is added after the deprocessing process in the luma area (Y) 
# Grainc = Grain which is added after the decanting process in the chroma region (UV) 
# Dynamic_grainy = Use dynamic grains instead of static grains in the luma area (Y) 
# Dynamic_grainy = Use dynamic grains instead of static grains in the chroma range (UV)
# 

function f3kdbmod16(clip clp, int "thry", int "thrc", int "radiusy", int "radiusc", int "grainy", int "grainc", bool "dynamic_grainy", bool "dynamic_grainc", float "mask_thr", int "mask_radius")
{
radiusy = default( radiusy, 12 )
radiusc = default( radiusc, 8 )
thry = default( thry, 40 )
thrc = default( thrc, thry/2 )
mask_thr = default( mask_thr, 2 )
mask_radius = default( mask_radius, 2 )
grainy = default( grainy, 15 )
grainc = default( grainc, 0 )
dynamic_grainy = default( dynamic_grainy, false )
dynamic_grainc = default( dynamic_grainc, false )

mask = clp.GradFun3(thr_det=mask_thr,mask=mask_radius,debug=1,lsb_in=true,lsb=true)
U = clp.UToY().f3kdb(range=radiusc, Y=thrc, Cb=0, Cr=0, grainY=grainc, grainC=0, dynamic_grain=dynamic_grainc, keep_tv_range=true, input_depth=16, output_depth=16)
V = clp.VToY().f3kdb(range=radiusc, Y=thrc, Cb=0, Cr=0, grainY=grainc, grainC=0, dynamic_grain=dynamic_grainc, keep_tv_range=true, input_depth=16, output_depth=16)
Y = clp.f3kdb(range=radiusy, Y=thry, Cb=0, Cr=0, grainY=grainy, grainC=0, dynamic_grain=dynamic_grainy, keep_tv_range=true, input_depth=16, output_depth=16)
filtered = YToUV(U, V, Y)
return Dither_merge16(filtered, clp, mask, y=3, u=3, v=3, luma=true)
}

Last edited by dREV; 27th July 2019 at 16:39. Reason: forgot to add script
dREV is offline   Reply With Quote
Old 27th July 2019, 15:23   #266  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by dREV View Post
Also, I read that FTurn http://avisynth.nl/index.php/FTurn was implemented but the code doesn't work so had to write TurnRight and TurnLeft, my question is is it really using this?
What do you mean by "the code doesn't work"?

Anyway, tp7's fast code for TurnLeft()/TurnRight() was integrated into AVS+ a long time ago.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 27th July 2019, 15:30   #267  |  Link
dREV
Registered User
 
dREV's Avatar
 
Join Date: Jan 2019
Location: Antarctica
Posts: 74
Quote:
Originally Posted by Groucho2004 View Post
What do you mean by "the code doesn't work"?

Anyway, tp7's fast code for TurnLeft()/TurnRight() was integrated into AVS+ a long time ago.
The code as in writing it as FTurnRight and FTurnLeft. So writing it as TurnRight and TurnLeft wasn't sure if I was using the old version or the FTurn version as the documentation doesn't indicate that its been renamed to TurnRight and TurnLeft in Avisynth+ 64 bit because in Avisynth+ x86 the code FTurn Left and Right works but not so in 64 bit.

Last edited by dREV; 27th July 2019 at 15:44. Reason: typos
dREV is offline   Reply With Quote
Old 27th July 2019, 15:33   #268  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by dREV View Post
The code as in writing it as FTurnRight and FTurnLeft. So writing it as TurnRight and TurnLeft wasn't sure if I was using the old version or the FTurn version as the documentation doesn't indicate that it's been renamed in Avisynth+ 64 bit because in Avisynth+ x86 the code FTurn works but not so in 64 bit.
Nothing was renamed. FTurnLeft/FTurnRight are external functions and you need the fturn plugin to use them.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 27th July 2019, 15:54   #269  |  Link
dREV
Registered User
 
dREV's Avatar
 
Join Date: Jan 2019
Location: Antarctica
Posts: 74
Quote:
Originally Posted by Groucho2004 View Post
Nothing was renamed. FTurnLeft/FTurnRight are external functions and you need the fturn plugin to use them.
For real? If I am understanding correctly there's a 64 bit version? If so, I've looked at:
https://github.com/tp7/fturn/releases
https://forum.doom9.org/showthread.php?t=168315

and nothing. If you are using it could you point me to where it is?
dREV is offline   Reply With Quote
Old 27th July 2019, 16:00   #270  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by dREV View Post
For real? If I am understanding correctly there's a 64 bit version? If so, I've looked at:
https://github.com/tp7/fturn/releases
https://forum.doom9.org/showthread.php?t=168315

and nothing. If you are using it could you point me to where it is?
There is no 64 bit fturn plugin as far as I'm aware and if you're using AVS+ there is no reason to use it anyway.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 27th July 2019, 16:05   #271  |  Link
dREV
Registered User
 
dREV's Avatar
 
Join Date: Jan 2019
Location: Antarctica
Posts: 74
Quote:
Originally Posted by Groucho2004 View Post
There is no 64 bit fturn plugin as far as I'm aware and if you're using AVS+ there is no reason to use it anyway.
Oh, I see. If you had read the posts thus far it's been about transitioning from AviSynth+ x86 to 64 bit. I hope I've clarified your question.

Last edited by dREV; 27th July 2019 at 16:22.
dREV is offline   Reply With Quote
Old 27th July 2019, 16:19   #272  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by dREV View Post
Oh, I see. If you had read the posts thus far it's been about transitioning from AviSynth+ x86 to 64 bit. I hope I've clarified your question.
I did read the posts. Also, what question of mine needed clarification?
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 27th July 2019, 16:22   #273  |  Link
dREV
Registered User
 
dREV's Avatar
 
Join Date: Jan 2019
Location: Antarctica
Posts: 74
Quote:
Originally Posted by Groucho2004 View Post
I did read the posts. Also, what question of mine needed clarification?
Um. You asked what the code I was referring to was. I clarified it.

I have a question. I don't want the thread to be long detracting my reply to real.finder, so I'll ask this question.

So without the FTurn it's not implemented within AviSynth+ to replace the original Turn in AviSynth? Or did I misunderstand and that it means that it can be used on AviSynth+?
Quote:
Originally Posted by http://avisynth.nl/index.php/FTurn
Note: FTurn is only recommended for AviSynth. The optimized code is integrated into the AviSynth+ core, thus making FTurn obsolete.
So it's using Turn but using the code of FTurn? Guess I'm a little slow in understanding this.

Last edited by dREV; 27th July 2019 at 16:31. Reason: typos
dREV is offline   Reply With Quote
Old 27th July 2019, 16:36   #274  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by dREV View Post
So it's using Turn but using the code of FTurn?
Exactly.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 27th July 2019, 16:41   #275  |  Link
dREV
Registered User
 
dREV's Avatar
 
Join Date: Jan 2019
Location: Antarctica
Posts: 74
Quote:
Originally Posted by Groucho2004 View Post
Exactly.
OK cool. That's what I wanted to know. Thanks for your help.

[Edit] Question. I see you have an update for DeScratch. Is there one for DeSpot?
I tried using a old version of DeScratch (using defaults) and DeSpot (defaults) and they didn't like each other. Both avspmod and encode ended up having issues. Not so when used separately. Maybe I did something wrong.

Last edited by dREV; 27th July 2019 at 16:52. Reason: forgot question
dREV is offline   Reply With Quote
Old 27th July 2019, 16:57   #276  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by dREV View Post
I see you have an update for DeScratch. Is there one for DeSpot?
No, but I'll look into updating the headers and making a 64 bit version.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 27th July 2019, 16:58   #277  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
As far as DeSpot is concerned (I cant remember about DeScratch),
there is some Despot option which uses some temporal blurring (between frames, for detected spots), if you have any other temporal filters following DeSpot, do not use its
blur option (cant remember what its called), otherwise the temporal blur will stop other temporal filters from working as well as they could.
[I think that the default for the blurring thing was probably ON, so find it and switch it off).
__________________
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 27th July 2019, 17:13   #278  |  Link
dREV
Registered User
 
dREV's Avatar
 
Join Date: Jan 2019
Location: Antarctica
Posts: 74
Quote:
Originally Posted by Groucho2004 View Post
No, but I'll look into updating the headers and making a 64 bit version.
Thanks for the reply and consideration for a 64 bit version of DeSpot.

Quote:
Originally Posted by StainlessS View Post
As far as DeSpot is concerned (I cant remember about DeScratch),
there is some Despot option which uses some temporal blurring (between frames, for detected spots), if you have any other temporal filters following DeSpot, do not use its
blur option (cant remember what its called), otherwise the temporal blur will stop other temporal filters from working as well as they could.
[I think that the default for the blurring thing was probably ON, so find it and switch it off).
Maybe that's what happened. The default says it is 1.
Quote:
Originally Posted by https://www.avisynth.org.ru/docs/english/externalfilters/despot.htm
blur (from 0 to 4, default 1)
Value (length) of local spatial blur near borders of deleted spots
I'll check this out later to test. Was disappointed that I couldn't use them both together and couldn't figure out why those artifacts was happening.

Thanks for your help. I'm still trying to understand these Spatial stuff.
dREV is offline   Reply With Quote
Old 27th July 2019, 17:27   #279  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Actually, me thinks this is it. [looks like default of 0, off [temporal smoothing, rather than blurring], maybe some of the examples use tsmooth, so dont just blindly copy them)

Quote:
tsmooth (from 0 to 127, default 0)
Control temporal smoothing in static areas (except spots and motion).
Set approximate threshold of pixel luma variance in 3 frames,
The more variance exceed this threshold, the less temporal smoothing.
0 - no temporal smoothing.
Blur, is spatial only arg.

EDIT: You would also want to turn it off, if using several instances of DeSpot (eg different size/color spots) otherwise earlier instances would inhibit
detection by later instances of Despot.
__________________
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; 27th July 2019 at 17:31.
StainlessS is offline   Reply With Quote
Old 27th July 2019, 17:54   #280  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by dREV View Post
Also, could I be educated on what native HBD (16) means? Wondering if I should understand this term to be used in AviSynth+ 64 bit.
it mean the real 16bit that don't use any hack like lsb or DoubleWidth like how LSMASHSource used to be, see here aside from that many lsb scripts around has at least not real lsb_in 16bit like SMDegrain or even all lsb in it not real 16bit at all like Nnedi3_resize16

I don't think there are anything can done for it since GradFun3 not work with HBD yet, but is it good function? what its main benefit
__________________
See My Avisynth Stuff

Last edited by real.finder; 27th July 2019 at 19:50.
real.finder 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 13:57.


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