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 6th November 2016, 01:16   #941  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,137
MAnalyse(blksize=16, overlap=8, ...)
And no extra pointless MRecalculate
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated
feisty2 is offline   Reply With Quote
Old 6th November 2016, 01:27   #942  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,268
These two are garbage, I must have screwed up somewhere (weird flashing, EDIT: Green and Pink frames).

Code:
Function DoubleRate3(clip c) {
    c
    prefilt   = DeGrainMedian() # some smoothing
    superfilt = MSuper(prefilt, hpad=16, vpad=16, rfilter = 4)             # all levels for MAnalyse
    super     = MSuper(pel=2, hpad=16, vpad=16,rfilter=4)
    bw_1      = MAnalyse(superfilt, chroma = false, isb = true,  blksize = 16, OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
    fw_1      = MAnalyse(superfilt, chroma = false, isb = false, blksize = 16, OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
    MBlockFps(super, bw_1, fw_1, num=0, den=0, mode=0, Blend=false)
    Return Last
}

Function DoubleRate4(clip c) {
    c
    super     = MSuper(pel=2, hpad=16, vpad=16,rfilter=4)
    bw_1      = MAnalyse(super, chroma = false, isb = true,  blksize = 16, OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
    fw_1      = MAnalyse(super, chroma = false, isb = false, blksize = 16, OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
    MBlockFps(super, bw_1, fw_1, num=0, den=0, mode=0, Blend=false)
    Return Last
}
But this works ok
Code:
Function DoubleRate2(clip c) {
    c
    prefilt   = DeGrainMedian() # some smoothing
    superfilt = MSuper(prefilt, hpad=16, vpad=16, rfilter = 4)             # all levels for MAnalyse
    super     = MSuper(pel=2, hpad=16, vpad=16,rfilter=4,levels=1) # one level is enough for MRecalculate
    bw_1      = MAnalyse(superfilt, chroma = false, isb = true,  blksize = 16, OverLap=2, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
    fw_1      = MAnalyse(superfilt, chroma = false, isb = false, blksize = 16, OverLap=2, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
    bw_2      = MRecalculate(super, chroma = false, bw_1, blksize = 8, searchparam = 1, search = 3)
    fw_2      = MRecalculate(super, chroma = false, fw_1, blksize = 8, searchparam = 1, search = 3)
    MBlockFps(super, bw_2, fw_2, num=FramerateNumerator(c) * 2, den=FramerateDenominator(c), mode=0, Blend=false)
    Return Last
}
__________________
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; 6th November 2016 at 03:56.
StainlessS is offline   Reply With Quote
Old 6th November 2016, 01:31   #943  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,137
Overlap=8
Plus whirling and blockiness, you can only avoid one
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated
feisty2 is offline   Reply With Quote
Old 6th November 2016, 01:45   #944  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,268
The two above Garbage functions still fail with Overlap=8, Green, Pink and Gray frames (sometimes), and jumping backwards and forwards in time.

EDIT: The two Garbage functions above, both work ok if changed to MFlowFps() and removing mode=0 (not an arg to MFlowFps).

Looks like something may be broken in latest (I think) mvtools MBlockFps.
__________________
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; 6th November 2016 at 02:05.
StainlessS is offline   Reply With Quote
Old 6th November 2016, 02:00   #945  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,137
Quote:
Originally Posted by StainlessS View Post
The two above Garbage functions still fail with Overlap=8, Green, Pink and Gray frames (sometimes), and jumping backwards and forwards in time.
So chroma was screwed, gotcha
Append "convettoy8()" at the end of the script and check if luma is okay
If it is, then that's probably an mvtools bug
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated
feisty2 is offline   Reply With Quote
Old 6th November 2016, 02:04   #946  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,268
See previous edit feisty.

EDIT: I'de say definite bug, not just the chroma that is screwed up, and temporal chaos.
__________________
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; 6th November 2016 at 02:08.
StainlessS is offline   Reply With Quote
Old 6th November 2016, 02:30   #947  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,137
Quote:
Originally Posted by StainlessS View Post
See previous edit feisty.

EDIT: I'de say definite bug, not just the chroma that is screwed up, and temporal chaos.
well, I ain't used avisynth for a while but blockfps in vaporsynth mvtools works
give it a go
Code:
import vapoursynth as vs
core = vs.get_core()

clp = blah blah blah
super = core.mv.Super(clp,pel=4,hpad=16,vpad=16,rfilter=4)
bw_1  = core.mv.Analyse(super,isb=True,blksize = 16,overlap=8,search=3,badrange =-24)
fw_1  = core.mv.Analyse(super,isb=False,blksize = 16,overlap=8,search=3,badrange =-24)
clp = core.mv.BlockFPS(clp, super, bw_1, fw_1, num=0, den=0, mode=0, blend=False)

clp.set_output()
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated
feisty2 is offline   Reply With Quote
Old 6th November 2016, 02:47   #948  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,268
I'de love to 'give it a go', unfortunately I is on XP32, and nobody cares bout us lil ol' XP users

With 4 window stack display, Garbage function, Good function, Subract(Garbage,Good), Subract(Garbage,Good),
If I play (in VDUB) say some part of early clip, and then jump to near the end of clip,
and play, then will sporadically show frames from the early part of clip that was recently played. Sometimes it shows
what looks to be frames from a diagnostic Subtract that is showing in one of the windows.
Looks like its totally Mucked up (substitute an alternate first letter of your choice).

EDIT MvTools2 that I'm using is v2.5.11.20.

EDIT: The problem seems to occur if OverLap used in creating final BackWards and Forwards vectors supplied to MBlockFps,
ie MAnalyse(Overlap=whatever) if MRecalculate not used, and in final MRecalculate(Overlap=whatever) if used.

This works ok without Overlap in final vectors
Code:
Function foo2(clip source, int "multi") {
    last       = source
    multi      = default(multi, 2)
    prefilt    = DeGrainMedian()                                        # some smoothing
    superfilt  = MSuper(prefilt, hpad=16, vpad=16)                         # all levels for MAnalyse
    super      = MSuper(source, pel = 2, hpad = 16, vpad = 16, rfilter = 4) # one level is enough for MRecalculate
    bw_1       = MAnalyse(superfilt, chroma = false, isb = true, blksize = 16,  OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
    fw_1       = MAnalyse(superfilt, chroma = false, isb = false, blksize = 16, OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
    bw_2       = MRecalculate(super, chroma = false, bw_1, blksize = 8, OverLap=4, searchparam = 1, search = 3)
    fw_2       = MRecalculate(super, chroma = false, fw_1, blksize = 8, OverLap=4,searchparam = 1, search = 3)
    bw_3       = MRecalculate(super, chroma = false, bw_2, blksize = 4, searchparam = 0, search = 3)    # No Overlap
    fw_3       = MRecalculate(super, chroma = false, fw_2, blksize = 4, searchparam = 0, search = 3)    # No Overlap
    MBlockFps(source, super, bw_3, fw_3, FramerateNumerator(Source) * multi, FramerateDenominator(Source), mode = 0, Blend=False)
    return last
}
But think I'll be using this until fixed at least.
Code:
Function DoubleRate(clip c,Bool "Blend") {
    c
    Blend=Default(Blend,False)                                      # Avoid blends at scene change (copy previous frame)
    prefilt   = DeGrainMedian()                                     # some smoothing
    superfilt = MSuper(prefilt, hpad=16, vpad=16, rfilter = 4)      # all levels for MAnalyse
    super     = MSuper(pel=2, hpad=16, vpad=16,rfilter=4,levels=1)  # one level is enough for MRecalculate
    bw_1      = MAnalyse(superfilt, chroma = false, isb = true,  blksize = 16, OverLap=2, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
    fw_1      = MAnalyse(superfilt, chroma = false, isb = false, blksize = 16, OverLap=2, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
    bw_2      = MRecalculate(super, chroma = false, bw_1, blksize = 8, searchparam = 1, search = 3)    # No Overlap (currently broken for final vectors)
    fw_2      = MRecalculate(super, chroma = false, fw_1, blksize = 8, searchparam = 1, search = 3)    # No Overlap
    MBlockFps(super, bw_2, fw_2, num=FramerateNumerator(c) * 2, den=FramerateDenominator(c), mode=0, Blend=Blend)
    Return Last
}
__________________
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; 6th November 2016 at 16:56.
StainlessS is offline   Reply With Quote
Old 6th November 2016, 02:50   #949  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,137
and BlockFPS is definitely more or less better than FlowFPS in general
FlowFPS
Code:
import vapoursynth as vs
core = vs.get_core()

clp = xxx
clp = core.fmtc.bitdepth(clp,bits=32,fulls=False,fulld=True)
super = core.mvsf.Super(clp,pel=4,hpad=16,vpad=16,rfilter=4)
bw_1  = core.mvsf.Analyze(super,isb=True,blksize = 16,overlap=8,search=3,badrange =-24)
fw_1  = core.mvsf.Analyze(super,isb=False,blksize = 16,overlap=8,search=3,badrange =-24)
clp = core.mvsf.FlowFPS(clp, super, bw_1, fw_1, num=0, den=0, blend=False)

clp.set_output()


BlockFPS
Code:
import vapoursynth as vs
core = vs.get_core()

clp = xxx
clp = core.fmtc.bitdepth(clp,bits=32,fulls=False,fulld=True)
super = core.mvsf.Super(clp,pel=4,hpad=16,vpad=16,rfilter=4)
bw_1  = core.mvsf.Analyze(super,isb=True,blksize = 16,overlap=8,search=3,badrange =-24)
fw_1  = core.mvsf.Analyze(super,isb=False,blksize = 16,overlap=8,search=3,badrange =-24)
clp = core.mvsf.BlockFPS(clp, super, bw_1, fw_1, num=0, den=0, blend=False)

clp.set_output()

__________________
If I got new ideas, will post here: https://github.com/IFeelBloated
feisty2 is offline   Reply With Quote
Old 6th November 2016, 03:07   #950  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,268
Perhaps all posts relating to MvTools2 should be separated into a new thread, Its really about time MvTools2 had a thread in the Avisynth Usage forum,
and Interframe dont need lots of posts about it's competitor.
I suggest from post #915 (to put Groucho2004 in command) and maybe insert the two posts 913 and 914 after the first post, if possible.

All those in favour, say "Aye!".
__________________
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 6th November 2016, 15:10   #951  |  Link
Groucho2004
Fossil
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: A wretched hive of scum and villainy
Posts: 4,474
Quote:
Originally Posted by StainlessS View Post
The two above Garbage functions still fail with Overlap=8, Green, Pink and Gray frames (sometimes), and jumping backwards and forwards in time.

EDIT: The two Garbage functions above, both work ok if changed to MFlowFps() and removing mode=0 (not an arg to MFlowFps).

Looks like something may be broken in latest (I think) mvtools MBlockFps.
I'm still using mvtools2 v2.5.11.3 since the newer versions crash/throw exceptions when multi-threaded. In this older version, MBlockFps actually throws an error when using "overlap" > 0 in MAnalyse(). So, MFlowFps may be a better choice in this case.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 6th November 2016, 19:05   #952  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: UK
Posts: 2,412
Quote:
Originally Posted by feisty2 View Post
and BlockFPS is definitely more or less better than FlowFPS in general
Is -24 for badrange is "better". Default is 24.
kolak is offline   Reply With Quote
Old 6th November 2016, 19:11   #953  |  Link
Groucho2004
Fossil
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: A wretched hive of scum and villainy
Posts: 4,474
Quote:
Originally Posted by kolak View Post
Is -24 for badrange is "better". Default is 24.
From MVTools2 doc:
Quote:
badrange: the range (radius) of wide search for bad blocks. Default is 24 (image pixel units). Use positive value for UMH search and negative for Exhaustive search.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 6th November 2016, 19:49   #954  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: UK
Posts: 2,412
Yes, rtfm (properly)
kolak is offline   Reply With Quote
Old 8th November 2016, 09:55   #955  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,256
Quote:
Originally Posted by StainlessS View Post
These two are garbage, I must have screwed up somewhere (weird flashing, EDIT: Green and Pink frames).

Code:
Function DoubleRate3(clip c) {
    c
    prefilt   = DeGrainMedian() # some smoothing
    superfilt = MSuper(prefilt, hpad=16, vpad=16, rfilter = 4)             # all levels for MAnalyse
    super     = MSuper(pel=2, hpad=16, vpad=16,rfilter=4)
    bw_1      = MAnalyse(superfilt, chroma = false, isb = true,  blksize = 16, OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
    fw_1      = MAnalyse(superfilt, chroma = false, isb = false, blksize = 16, OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
    MBlockFps(super, bw_1, fw_1, num=0, den=0, mode=0, Blend=false)
    Return Last
}

Function DoubleRate4(clip c) {
    c
    super     = MSuper(pel=2, hpad=16, vpad=16,rfilter=4)
    bw_1      = MAnalyse(super, chroma = false, isb = true,  blksize = 16, OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
    fw_1      = MAnalyse(super, chroma = false, isb = false, blksize = 16, OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
    MBlockFps(super, bw_1, fw_1, num=0, den=0, mode=0, Blend=false)
    Return Last
}
Indeed. There is a missing copy of the 16 bit internal buffers back to 8 bit result when overlap is used. I will fix it in my pfmod branch in the next release.
pinterf is offline   Reply With Quote
Old 8th November 2016, 16:17   #956  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,268
Quote:
I will fix it in my pfmod branch in the next release.
Oooh, lovely

I'm doing a little bit of work on DoubleRate deinterlace/Interpolation and need the overlap thing. It caught me a bit by surprise that when dealing with
hybrid source (with possibility of single interlaced frame in progressive sequence), that single non-combed status of progressive frame is not enough
to deal with it properly, a third combed status is required. 0)=Interlaced, 1)=Progressive current+progressive next, 2)=Progressive current & Interlaced Next.
If not taken into account, then Interpolated frames will use Progressive current + Interlaced next as sources. Perhaps this was obvious to you lot, but
was not to me. To fix it, I'm using Progressive current + deinterlaced first field of next for interpolation. I guess that QTGMC already copes with this.
__________________
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
Reply

Tags
48fps, 60fps, framedoubling, interframe, smooth motion

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 00:51.


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