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 9th April 2022, 12:26   #161  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
BTW, you don't need CTools and QTGMC to run CQTGMC
Ceppo is offline   Reply With Quote
Old 12th April 2022, 18:21   #162  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
there are many hybrid DVDs that got film (24 fps) and video (30 fps) content by different proportions

tivtc got d2v parameter for this case, but we are in avs+ age that got frame properties, more info https://github.com/pinterf/TIVTC/issues/18

so maybe CTools should use frame properties for these cases to not do an unnecessary matches or other unnecessary process if the frame is in film (24 fps) section or even video (30 fps) progressive

and in the future even VFR can be done with frame properties and that mean one pass and no log file at all! https://forum.doom9.org/showthread.p...fr#post1960041 and https://forum.doom9.org/showthread.p...fr#post1960175
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 13th April 2022, 11:34   #163  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
Thanks for your support.

Quote:
so maybe CTools should use frame properties for these cases to not do an unnecessary matches or other unnecessary process if the frame is in film (24 fps) section or even video (30 fps) progressive
Is the d2v file that tells you if the cycle is 24fps or 30fps? I use DGDECNV, since is the only "safe" way for h264 interlaced in my experience, does it supports that too?

In any case, frame proprieties have many disadvantages compared to a txt file. Once you did the analysis pass CTelecine and CDecimate become free, since they only call the frame and nothing more. By doing this you can decimate a CQTGMC/QTGMC output using CTelecine metrics with CDecimate, if I use frame properties I can't do that.

I don't know how frame properties work but if you need to call the frame to get them, you will need to call 5 frames every 4 frames, while CDecimate is currently free since it does everything at the startup. Also, with frame properties, I can't do the default startup error, which is the whole point of the filter.

However, I could use frame properties to skip calculation in the field matching, and get more correct results, if mpeg2source automatically adds them to the source when it loads the d2v file. And I also need sample plugin to see how this stuff is done
Ceppo is offline   Reply With Quote
Old 13th April 2022, 13:37   #164  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Is the d2v file that tells you if the cycle is 24fps or 30fps?
I think so, if it soft telecine indeed, I don't know if DGDECNV file is the same but I think soft telecine can be found only in mpeg2 dvd

Quote:
frame proprieties have many disadvantages compared to a txt file. Once you did the analysis pass CTelecine and CDecimate become free, since they only call the frame and nothing more. By doing this you can decimate a CQTGMC/QTGMC output using CTelecine metrics with CDecimate, if I use frame properties I can't do that.
yes, but in case someone hate doing analysis pass so it won't hurt if we got both

about others, I think you can PM/email pinterf for help
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 13th April 2022, 13:43   #165  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,788
Quote:
Originally Posted by Ceppo View Post
However, I could use frame properties to skip calculation in the field matching, and get more correct results, if mpeg2source automatically adds them to the source when it loads the d2v file. And I also need sample plugin to see how this stuff is done
I would look at some repos by Asd-g.

https://github.com/Asd-g/MPEG2DecPlu...faa6d36911b0e5
https://github.com/Asd-g/AviSynthPlu...PropToClip.cpp
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 13th April 2022, 14:09   #166  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
Ok, I will do it. It's in my TODO list. But now I have to study that DSP book, so I know better what I'm doing
Ceppo is offline   Reply With Quote
Old 18th April 2022, 12:11   #167  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
I update CQTGMC and I left also the prev version. It should be faster and more accurate. If someone can test them is appreciated.
Ceppo is offline   Reply With Quote
Old 26th April 2022, 13:55   #168  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
Nobody was around at work and I did this, no field matching mouth problem:

Code:
D2VSource("VTS_01_1.d2v")
src = last
nnedi3(-2)
src_nnd = last
DoubleWeave(src).SelectOdd()
nxt = last
nnedi3(-2)
nxt_nnd = last
prv = nxt.DuplicateFrame(0)

src_nnd
src_A = mt_average(last,Trim(1,0),u=3,v=3)
src_B = mt_average(last,DuplicateFrame(0),u=3,v=3)
ScriptClip("""
src_P = YDifferenceFromPrevious()
src_N = Trim(1,0).YDifferenceFromPrevious()
src_N < src_P ?  src_A : src_B
""")
src_C = mt_average(SelectEven(),SelectOdd(),u=3,v=3)
src_match = mt_lutxy(src_C,SelectEven(),"x y - abs",u=3,v=3)

nxt_nnd
nxt_A = mt_average(last,Trim(1,0),u=3,v=3)
nxt_B = mt_average(last,DuplicateFrame(0),u=3,v=3)
ScriptClip("""
nxt_P = YDifferenceFromPrevious()
nxt_N = Trim(1,0).YDifferenceFromPrevious()
nxt_N < nxt_P ?  nxt_A : nxt_B
""")
nxt_C = mt_average(SelectEven(),SelectOdd(),u=3,v=3)
nxt_match = mt_lutxy(nxt_C,SelectEven(),"x y - abs",u=3,v=3)
prv_match = mt_lutxy(nxt_C.DuplicateFrame(0),SelectEven().DuplicateFrame(0),"x y - abs",u=3,v=3)

src
ScriptClip("""
CLuma = AverageLuma(src_match)
NLuma = AverageLuma(nxt_match)
PLuma = AverageLuma(prv_match)
NLuma < CLuma ? nxt.subtitle("nxt") : PLuma < CLuma ? prv.subtitle("prv") : src.subtitle("src")
""")
Ceppo is offline   Reply With Quote
Old 26th April 2022, 18:12   #169  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Nobody was around at work and I did this, no field matching mouth problem:
even if it not a big problem with dClip, but will test and see, thanks
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 19th May 2022, 14:22   #170  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Ceppo View Post
Nobody was around at work and I did this, no field matching mouth problem:

Code:
D2VSource("VTS_01_1.d2v")
src = last
nnedi3(-2)
src_nnd = last
DoubleWeave(src).SelectOdd()
nxt = last
nnedi3(-2)
nxt_nnd = last
prv = nxt.DuplicateFrame(0)

src_nnd
src_A = mt_average(last,Trim(1,0),u=3,v=3)
src_B = mt_average(last,DuplicateFrame(0),u=3,v=3)
ScriptClip("""
src_P = YDifferenceFromPrevious()
src_N = Trim(1,0).YDifferenceFromPrevious()
src_N < src_P ?  src_A : src_B
""")
src_C = mt_average(SelectEven(),SelectOdd(),u=3,v=3)
src_match = mt_lutxy(src_C,SelectEven(),"x y - abs",u=3,v=3)

nxt_nnd
nxt_A = mt_average(last,Trim(1,0),u=3,v=3)
nxt_B = mt_average(last,DuplicateFrame(0),u=3,v=3)
ScriptClip("""
nxt_P = YDifferenceFromPrevious()
nxt_N = Trim(1,0).YDifferenceFromPrevious()
nxt_N < nxt_P ?  nxt_A : nxt_B
""")
nxt_C = mt_average(SelectEven(),SelectOdd(),u=3,v=3)
nxt_match = mt_lutxy(nxt_C,SelectEven(),"x y - abs",u=3,v=3)
prv_match = mt_lutxy(nxt_C.DuplicateFrame(0),SelectEven().DuplicateFrame(0),"x y - abs",u=3,v=3)

src
ScriptClip("""
CLuma = AverageLuma(src_match)
NLuma = AverageLuma(nxt_match)
PLuma = AverageLuma(prv_match)
NLuma < CLuma ? nxt.subtitle("nxt") : PLuma < CLuma ? prv.subtitle("prv") : src.subtitle("src")
""")
I did test with your sample https://www.mediafire.com/file/at0mu...mooon.m2v/file
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 20th May 2022, 07:09   #171  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,719
Hey Ash ... why so serious?!
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 4th January 2023, 00:34   #172  |  Link
Orikson
Registered User
 
Join Date: Feb 2022
Posts: 7
Just wanted to tell you that I just found your CQTGMC-Plugin and was surprised that is should be even better that QTGMC I will test it with some old familiy videos (MiniDV for now, Video8 later) and am looking for the absolute best quality, no matter how slow it will be
Orikson is offline   Reply With Quote
Old 12th January 2023, 19:59   #173  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 702
CDegrain

Quote:
This filter is a degrain that blends stationary parts of the picture.
It takes the chroma difference into account to reduce blending by using a block based approch.
So the non stationary(static?) parts will be motion/moving parts and left untouched by cdegrain?
Then I have a request, to have an option to spatial smooth the untouched parts, or better yet if possible option to use an external clip to feed to filter the untouched parts. Example: CDegrain(3,5,32,4,dClip=src.fft3dfilter(),sClip=src.blur(0.7))

Where the 'sClip' is for filtering the untouched parts.
Great stuff, really hope to see your plugin for HBD soon!

Last edited by anton_foy; 12th January 2023 at 20:06.
anton_foy is offline   Reply With Quote
Old 14th January 2023, 08:34   #174  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,238
Quote:
Originally Posted by Ceppo View Post
I don't use VapourSynth, BUT when I'm done with HBD and optimizations I might do it, but not sure.
Is there still hope for a Vapoursynth port?

Cu
Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 14th January 2023, 09:11   #175  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,131
Quote:
Originally Posted by Selur View Post
Is there still hope for a Vapoursynth port?

Cu
Selur
When PyTorch's Vapoursynth filters can port to avisynth. Maybe in "one dream"
kedautinh12 is offline   Reply With Quote
Old 14th January 2023, 13:53   #176  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,238
btw. I get a small speedup to cqtgmc when adding an 'opencl' option, which when enabled would use nnedi3cl instead of nneedi3.
Code:
# Added opencl parameter which, when enabled, will use NNEDI3CL instead of NNEDI3
function CQTGMC(clip input, float "Sharpness", int "thSAD1", int "thSAD2", int "thSAD3", int "thSAD4", bool "opencl")
{
    thSAD1 = default(thSAD1, 192)
    thSAD2 = default(thSAD2, 320)
    thSAD3 = default(thSAD3, 128)   
    thSAD4 = default(thSAD4, 320)
    Sharpness = default(Sharpness, 0.25)
    opencl = default(opencl, false)

    padded = StackHorizontal(input,input.FlipHorizontal()).Crop(0,0,input.width()+input.width()%64,0)
    padded = StackVertical(padded,padded.FlipVertical()).Crop(0,0,0,input.height()+input.height()%64)
    bobbed = opencl ? padded.NNEDI3CL(field=-2) : padded.nnedi3(field=-2)
    padded
    TDeint(mode=1,sharp=false,tryWeave=true,edeint=bobbed)
    RemoveGrain(12).GaussResize(width(),height(),0,0,width()+0.0001,height()+0.0001,p=2).Merge(last,0.25)
    srchClip = last
    super = MSuper()
    bvec = MAnalyse(super,isb=true,blksize=64,overlap=32)
    fvec = MAnalyse(super,isb=false,blksize=64,overlap=32)
    Comp1 = MCompensate(super,bvec,thSAD=thSAD2)
    Comp2 = MCompensate(super,fvec,thSAD=thSAD2)
    Interleave(Comp1,last,Comp2)
    super = MSuper()
    bvec = MAnalyse(super,isb=true,blksize=64,overlap=32)
    fvec = MAnalyse(super,isb=false,blksize=64,overlap=32)
    Inter = MFlowInter(super,bvec,fvec,blend=false)
    global CQTGMC_A = Inter.SelectEvery(3,0)
    global CQTGMC_B = Inter.SelectEvery(3,1)
    srchClip
    ScriptClip("""
    P = YDifferenceFromPrevious()
    N = Trim(1,0).YDifferenceFromPrevious()
    N < P ? CQTGMC_A : CQTGMC_B 
    """)
    super = MSuper()
    bVec1 = MAnalyse(super,isb=true,overlap=4,delta=1)
    fVec1 = MAnalyse(super,isb=false,overlap=4,delta=1)
    bobbed 
    super = MSuper(levels=1)
    bComp1 = MCompensate(super,bVec1,thSAD=thSAD3)
    fComp1 = MCompensate(super,fVec1,thSAD=thSAD3)
    Interleave(\
    SeparateFields(bobbed).SelectEvery(4,0),\
    SeparateFields(fComp1).SelectEvery(4,1),\
    SeparateFields(bComp1).SelectEvery(4,2),\
    SeparateFields(bobbed).SelectEvery(4,3))
    Weave()
    super = MSuper(levels=1)
    bComp1 = MCompensate(super, bVec1,thSAD=thSAD4)
    fComp1 = MCompensate(super, fVec1,thSAD=thSAD4)
    tMax = mt_logic(fComp1,"max",U=3,V=3).mt_logic(bComp1,"max",U=3,V=3)
    tMin = mt_logic(fComp1,"min",U=3,V=3).mt_logic(bComp1,"min",U=3,V=3)
    MDegrain1(super,bVec1,fVec1,thSAD=thSAD1)
    sharpen = mt_adddiff(mt_makediff(Removegrain(20),u=3,v=3),u=3,v=3)
    mt_clamp(sharpen,tMax,tMin,Sharpness,Sharpness,3,3,3)
    super = MSuper(levels=1)
    MDegrain1(super,bVec1,fVec1,thSAD=thSAD1)
    Crop(0,0,-(input.width()%64),-(input.height()%64))
    return last
}
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 14th January 2023, 18:16   #177  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by Selur View Post
Is there still hope for a Vapoursynth port?
Sadly I don't think Ceppo is coming back; I believe he was discouraged after an argument on GitHub.
Reel.Deel is offline   Reply With Quote
Old 14th January 2023, 18:50   #178  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 702
Quote:
Originally Posted by Reel.Deel View Post
Sadly I don't think Ceppo is coming back; I believe he was discouraged after an argument on GitHub.
Very sad. I made a request to Asd-g today:

https://github.com/Asd-g/AviSynthPlus-Scripts/issues/15
anton_foy is offline   Reply With Quote
Old 14th January 2023, 20:09   #179  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,238
Always sad to see when a developer leaves, but thanks for the info.

Cu
Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 15th January 2023, 01:31   #180  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,131
Quote:
Originally Posted by Reel.Deel View Post
Sadly I don't think Ceppo is coming back; I believe he was discouraged after an argument on GitHub.
Can you share me link about it??

Last edited by kedautinh12; 15th January 2023 at 01:35.
kedautinh12 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:23.


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