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 Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd March 2022, 11:02   #121  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
Thanks real.finder, I'm eager to hear your opinion.

Also, I couldn't make a release cuz I didn't put a tag, and I didn't get it cuz my brain capacity was at 1% yesterday.
Ceppo is offline   Reply With Quote
Old 22nd March 2022, 14:23   #122  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,788
Glad it's back at 2% again
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 22nd March 2022, 18:24   #123  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
Truth hurts lol
Ceppo is offline   Reply With Quote
Old 22nd March 2022, 22:09   #124  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
did some tests but I think I find a bug

CTelecine(bob=true,write=true,thr60i=0.2,nt=5,ntn=4,mode=4, sse=false, dclip=SeparateFields().Removegrain(4).Weave())

it crash avspmod with WindowsError: exception: access violation reading 0x0000000000000000 in "Run analysis pass"
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 23rd March 2022, 14:43   #125  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
Thanks,
seems to happen with bob=true, I will look into it.
Ceppo is offline   Reply With Quote
Old 23rd March 2022, 15:37   #126  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
Fix'd.

v1.2.1 is out.

I hope everything is alright, I still need to figure out this GitHub stuff
Ceppo is offline   Reply With Quote
Old 27th March 2022, 12:19   #127  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
@real.finder
Any new test you did with my filter? Also, if you have some filter of yours that needs to be tested today I have not much to do.
Ceppo is offline   Reply With Quote
Old 27th March 2022, 14:57   #128  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Ceppo View Post
@real.finder
Any new test you did with my filter? Also, if you have some filter of yours that needs to be tested today I have not much to do.
Not yet, I am kinda busy these days but I will do soon (maybe today)

btw, you still didn't give your Feedback about https://forum.doom9.org/showpost.php...&postcount=843 output
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 27th March 2022, 16:58   #129  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
QTGMC()
https://i.ibb.co/09bx3Wt/qtgmc.png
sanimebob2()
https://i.ibb.co/8cg5zpZ/sanimebob2.png
Code:
bob = QTGMC()
CTelecine(bob=true,sse=false,dClip=CFieldSofter(4))
CPostProcessing(isBob=true,edeint2=bob)
https://i.ibb.co/2t68N0N/script.png

Your script has a problem on the mouth that qtgmc doesn't have (it still gets it wrong tho), also yours seems to retain a bit more details than my script however, my script is 250fps+ while sanimebob is about 4-5fps. For the rest didn't find much difference, could you try mod it, I'm interested in the details it retains

Last edited by Ceppo; 27th March 2022 at 17:01.
Ceppo is offline   Reply With Quote
Old 27th March 2022, 22:19   #130  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Ceppo View Post
QTGMC()
https://i.ibb.co/09bx3Wt/qtgmc.png
sanimebob2()
https://i.ibb.co/8cg5zpZ/sanimebob2.png
Code:
bob = QTGMC()
CTelecine(bob=true,sse=false,dClip=CFieldSofter(4))
CPostProcessing(isBob=true,edeint2=bob)
https://i.ibb.co/2t68N0N/script.png

Your script has a problem on the mouth that qtgmc doesn't have (it still gets it wrong tho), also yours seems to retain a bit more details than my script however, my script is 250fps+ while sanimebob is about 4-5fps. For the rest didn't find much difference, could you try mod it, I'm interested in the details it retains
can I got a short sample that have this frame?
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 28th March 2022, 10:28   #131  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
https://www.mediafire.com/file/at0mu...mooon.m2v/file
I gave you bit larger sample, since there is a lot of stuff going on. This DVD has a lot of strange things, if you need other samples I will upload them.

That frame is probably a B/U match, it has the fields switched in chronological order.

Last edited by Ceppo; 28th March 2022 at 10:36.
Ceppo is offline   Reply With Quote
Old 28th March 2022, 15:37   #132  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
yes that kind of source is bad! it also got chroma blend, maybe we need dClip for CPostProcessing too in this case
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 28th March 2022, 18:00   #133  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
how about this?
Code:
# canimebob v1.0
function canimebob(clip i, int "stgmc_type", val "bobpresmooth", float "Str", float "Amp", bool "TV_range", int "tr2", bool "repblend", int "nnrep", string "tfm_params", int "NNSize", int "NNeurons", int "EdiQual", int "EdiMaxD", bool "FastNnediHBD") {
sisphbd = AvsPlusVersionNumber > 2294
SBitsn  = sisphbd ? i.BitsPerComponent() : 8
FastNned = Default(FastNnediHBD, SBitsn > 8)
nnrep               = default (nnrep, 2)
stgmc_type = default (stgmc_type, 0)
tfm_params = default(tfm_params, "")
Str = default (Str, 1.5)
tr2 = default (tr2, stgmc_type==0 ? 2 : 5)
STGMC_lsb = sisphbd ? SBitsn > 8 ? false : true : true
STGMC_n16 = STGMC_lsb && AvsPlusVersionNumber < 3382
STGMC_lsb = STGMC_n16 ? false : STGMC_lsb
istff=GetParity(i)
ii        = FastNned ? i.convertbits(8, dither=1) : i
prefiltered_i   = defined(bobpresmooth) ? isclip(bobpresmooth) ? bobpresmooth : IsString(bobpresmooth) ? Eval("i." + bobpresmooth) : undefined() : undefined()
iforbob   = defined(prefiltered_i) ? prefiltered_i : ii.sh_bob(0,0.5).reduceflicker(strength=2).interlaced60or50(BFF=!istff)
iforbob   = !defined(prefiltered_i) ? iforbob.SeparateFields().Repair(ii.SeparateFields()).weave() : iforbob
threads = sh_GetUserGlobalIMTint()
ib        = FastNned ? i.sh_bob(0,0.5) : i
pni       = iforbob.sh_Padding(2,4,2,4,threads=threads).nnedi3(-2, nsize=NNSize, nns=NNeurons, qual=EdiQual,threads=threads).crop(2,4,-2,-4,true)
ei       = ii.eedi3(-2, mdis=EdiMaxD,sclip=pni,threads=threads)
pni       = FastNned ? ib.slimit_dif(pni.convertbits(SBitsn), thr=1, elast=1.5) : pni
ei       = FastNned ? ib.slimit_dif(ei.convertbits(SBitsn), thr=1, elast=1.5) : ei
ei       = nnrep > 0 ? nnrep > 1 ? ei.slimit_dif2(pni,thr=4) : ei.Repair(pni,9) : ei

cbob = i.CTelecine(bob=true,nt=5,ntn=4,mode=4, sse=false,dclip=i.CFieldSofter(4))
cbob = cbob.CPostProcessing(isBob=true,edeint2=ei,mode=3)
bobclip = stgmc_type == 0 ? i.stgmc(tr0=-2,useEdiExt=1,EdiExt=cbob,Sharpness=0, Refinemotion=true, fastma=true, lsb=STGMC_lsb, n16=STGMC_n16, TV_range=TV_range, Str=Str, Amp=Amp, tr2=tr2, EdiThreads=threads) : i.stgmc(useEdiExt=2,EdiExt=cbob,Sharpness=0,ESearchP=true, Refinemotion=true, fastma=true, lsb=STGMC_lsb, n16=STGMC_n16, TV_range=TV_range, Str=Str, Amp=Amp, tr2=tr2, EdiThreads=threads)
i.sh_Padding(0,4,0,4,threads=threads).yadifmod2(mode=3, edeint=cbob.sh_Padding(0,4,0,4,threads=threads)).crop(0,4,-0,-4,true).Vinverse(clip2=pni).slimit_dif2(bobclip,thr=4)
}
Code:
originali = last
ffapp = originali.sh_bob(0,0.5).chroma_rep #or chroma_rep2
getparity(originali) ? ffapp.interlaced60or50 : ffapp.interlaced60or50(bff=true) #reinterlaced
MergeLuma(originali)
canimebob
when CPostProcessing got dClip it can be improved

edit: btw, I did update sanimebob2 too https://forum.doom9.org/showpost.php...&postcount=843
__________________
See My Avisynth Stuff

Last edited by real.finder; 28th March 2022 at 18:20.
real.finder is offline   Reply With Quote
Old 28th March 2022, 20:16   #134  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by real.finder View Post
edit: and what about adding optional clip parameter in CTelecineNew to make it do only match math from (and output from original of course), so we can use prefilterd clip with some denoise that fits the source we work on? also with it the nt will be 0 by default
Quote:
Originally Posted by Ceppo View Post
Yes, I can add a dClip for that. Now I'm working on reworking the old functions and adding colorspaces. So I will need some days before releasing. About the nt default it must first tested, since noise is not the only source of error. The denoise might miss things like compression artefacts or whatever. Also the denoise should* be field based so it would not be very accurate.
Quote:
Originally Posted by real.finder View Post
did some tests but I think I find a bug

CTelecine(bob=true,write=true,thr60i=0.2,nt=5,ntn=4,mode=4, sse=false, dclip=SeparateFields().Removegrain(4).Weave())

it crash avspmod with WindowsError: exception: access violation reading 0x0000000000000000 in "Run analysis pass"
Quote:
Originally Posted by Ceppo View Post
Thanks,
seems to happen with bob=true, I will look into it.
Quote:
Originally Posted by Ceppo View Post
Fix'd.

v1.2.1 is out.

I hope everything is alright, I still need to figure out this GitHub stuff
ok, I did test with

Code:
#~ CTelecine(bob=true,write=true,thr60i=0.2,nt=5,ntn=4,mode=4, sse=false,dclip=Blur(1.58,0))
CTelecine(bob=true,thr60i=0.2,inputTxt=true,nt=5,ntn=4,mode=4, sse=false)
CPostProcessing(3,6,isbob=true,edeint2=qtgmc(EdiMode="BWDIF+EEDI3",Sharpness=0, Refinemotion=true, n16=true, TV_range=true, tr2=2))
CDecimate(isBob=true,error=false)
with this https://forum.doom9.org/showthread.p...44#post1964544 (it was from Jigoku Shōjo 1st ep) and it fine in both "60i" and "false n matches" cases, dclip was very useful thanks for the fix btw
__________________
See My Avisynth Stuff

Last edited by real.finder; 28th March 2022 at 20:20.
real.finder is offline   Reply With Quote
Old 29th March 2022, 19:13   #135  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
There are 2 problems with SAnimeBob2, 1. It has an interlaced leftover (look at the fade at the beginning of the clip I provided), 2. There is still that problem with the mouth.

About CAnimeBob, if you don't feed a QTGMC like clip to CPostProcessing it won't work well. With the default, I got 10fps and a much worst output than the script I made above. Also, it has an interlaced leftover problem as SAnimeBob2.

For the chroma blending, CFieldDeBlend should be able to fix most cases as long there is a duplicate field in the prev or next frame.

Can you elaborate on the use of dClip for CPostProcessing?

Code:
originali = last
ffapp = originali.sh_bob(0,0.5).chroma_rep #or chroma_rep2
getparity(originali) ? ffapp.interlaced60or50 : ffapp.interlaced60or50(bff=true) #reinterlaced
MergeLuma(originali)
canimebob
What does this code do?

Finally, aside bob, all the parameters of CTelecine are ignored when inputTxt=true, so if you are lazy you don't need to write down . Also I advice CTelecine default or CTelecine(sse=false,dClip=CFIeldSofter(4)), you might want to test them.

Thanks for your support!
Ceppo is offline   Reply With Quote
Old 29th March 2022, 19:23   #136  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
this

Code:
originali = last
ffapp = originali.sh_bob(0,0.5).chroma_rep #or chroma_rep2
getparity(originali) ? ffapp.interlaced60or50 : ffapp.interlaced60or50(bff=true) #reinterlaced
MergeLuma(originali)
to fix chroma blending, see here https://forum.doom9.org/showthread.php?t=170364

Quote:
Can you elaborate on the use of dClip for CPostProcessing?
CPostProcessing seems to have many false positive cases, that can be improved with filtered clip same as dClip in CTelecine

also, we need you here https://forum.doom9.org/showthread.p...02#post1966602
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 29th March 2022, 20:09   #137  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
Quote:
CPostProcessing seems to have many false positive cases, that can be improved with filtered clip same as dClip in CTelecine
What kind of prefiltering would improve comb detection in your opinion?

Code:
originali = last
ffapp = originali.sh_bob(0,0.5).chroma_rep #or chroma_rep2
getparity(originali) ? ffapp.interlaced60or50 : ffapp.interlaced60or50(bff=true) #reinterlaced
MergeLuma(originali)
Tomorrow I will try, I my dog is cousing trouble Is all in AnimeIVTC.avsi?
Ceppo is offline   Reply With Quote
Old 29th March 2022, 22:48   #138  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Ceppo View Post
What kind of prefiltering would improve comb detection in your opinion?
something like this maybe
Sharpen(0,0.5).blur(1.58,0).Sharpen(0,0.2).blur(1.58,0).Sharpen(0,0.1).blur(1.58,0)

Quote:
Originally Posted by Ceppo View Post
Code:
originali = last
ffapp = originali.sh_bob(0,0.5).chroma_rep #or chroma_rep2
getparity(originali) ? ffapp.interlaced60or50 : ffapp.interlaced60or50(bff=true) #reinterlaced
MergeLuma(originali)
Tomorrow I will try, I my dog is cousing trouble Is all in AnimeIVTC.avsi?
and https://github.com/realfinder/AVS-St...RF_Shared.avsi
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 30th March 2022, 13:17   #139  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
Ok, I will add a dClip to CPostProcessing.

Also, I tried the chroma repair script, and it didn't work. Maybe I'm doing it wrong...

Script (nothing changes)
CFieldDeBlend()
Ceppo is offline   Reply With Quote
Old 30th March 2022, 14:13   #140  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Ceppo View Post
Ok, I will add a dClip to CPostProcessing.

Also, I tried the chroma repair script, and it didn't work. Maybe I'm doing it wrong...

Script (nothing changes)
CFieldDeBlend()
nope, you not doing it wrong, the method is not perfect in first place https://forum.doom9.org/showthread.p...33#post1778933 (until post #10) it kinda work in fast motion only and without 60i
__________________
See My Avisynth Stuff
real.finder 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 12:16.


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