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 > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th June 2016, 08:30   #361  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
Quote:
Originally Posted by VS_Fan View Post
I hope you can, since these videos are originally YUV422P8 @30fps, I would like to encode them with x264 @ YUV422P10
You can encode them in 10-bit depth even though the source you feed to x264 is in 8 bits.
__________________
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 5th June 2016, 07:47   #362  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
Quote:
v2.5.11.21 (22.04.2016 by Fizick)
•MflowXXX: remove limit of motion vectors length (was 127/pel).
any plan to merge this?
feisty2 is offline   Reply With Quote
Old 5th June 2016, 10:07   #363  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
Quote:
Originally Posted by feisty2 View Post
any plan to merge this?
Yes, eventually.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 5th June 2016, 12:32   #364  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
Quote:
Originally Posted by jackoneill View Post
Yes, eventually.
Okay... And "eventually" sounds kinda low priority, and I think it should be sort of high priority cuz it's like a nasty bug
feisty2 is offline   Reply With Quote
Old 5th June 2016, 17:09   #365  |  Link
MonoS
Registered User
 
Join Date: Aug 2012
Posts: 203
Quote:
Originally Posted by feisty2 View Post
Okay... And "eventually" sounds kinda low priority, and I think it should be sort of high priority cuz it's like a nasty bug
can you post me the commit? i'll code this for both mine and dubhater repo
MonoS is offline   Reply With Quote
Old 5th June 2016, 23:57   #366  |  Link
amayra
Quality Checker
 
amayra's Avatar
 
Join Date: Aug 2013
Posts: 284
can you do something about SVPFlow ?
__________________
I love Doom9
amayra is offline   Reply With Quote
Old 6th June 2016, 00:39   #367  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
Quote:
Originally Posted by amayra View Post
can you do something about SVPFlow ?
I think the svp guys already did it
feisty2 is offline   Reply With Quote
Old 6th June 2016, 06:36   #368  |  Link
VS_Fan
Registered User
 
Join Date: Jan 2016
Posts: 98
The results of my tests: Encoding a "DepanEstabilized" 3600 frames (2 min) clip 640x480 @ 30fps, using x264 on my laptop (core i5 3rd gen, Win10)
Code:
DepanEstimate	fps
AVS	ST	27.77
AVS	MT	28.18
VPY	32b	27.63
VPY	64b	30.32
		
DepanAnalise	fps
AVS	ST	17.68
AVS	MT	21.55
VPY	32b	22.45
VPY	64b	25.02
DepanEstimate:
• It is faster than MDepan/ DepanAnalise in both avisynth and vapoursynth, but I don’t get rotation adjustments.
• In these tests, avisynth filters were faster than your VS port (32 bits).
MDepan (AVS) / DepanAnalize (VS):
• Your VS port is way faster, and the results are practically identical
• I prefer DepanAnalise results over the ones of DepanEstimate, I "feel" the motion adjustments smoother

My Scripts for reference:
AVS:
Code:
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\Probar\RgTools.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\Probar\DePan.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\Probar\DePanEstimate.dll")
#LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\Probar\mvtools-v2.5.11.22\mvtools2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\Probar\mvtools-2.5.11.9-svp\mvtools2.dll")
SetMTMode(3,4)
LWLibavVideoSource("F:\TEMPX\CANON\MVI_2038.AVI", format="YUV420P8", fpsnum=30, fpsden=1, seek_threshold=60)
#Preroll(60)
original = last
SetMTMode(2)
pf = original.RemoveGrain(mode=4)
div = 2
pf = pf.BilinearResize(Width(original)/div,Height(original)/div)
pf = pf.RemoveGrain(mode=4)
pf = pf.BilinearResize(Width(original)      ,Height(original))
super = MSuper(pf)
vectors = MAnalyse(super, isb = false)
#return mshow(super, vectors, showsad=true)
globalmotion = MDepan(pf, vectors, pixaspect=1.0, thSCD1=800, error=30.0, range=0) #, info=true) #, thSCD2=171
#globalmotion = DePanEstimate()
#return globalmotion
DepanStabilize(original, data=globalmotion, cutoff=0.33, pixaspect=1.0, method=1, zoommax=1.0, rotmax=10.0) #, mirror=15

return last
VPY:
Code:
import vapoursynth as vs
core = vs.get_core()

ret = core.lsmas.LWLibavSource(source=r"F:\TEMPX\CANON\MVI_2038.AVI", format="YUV420P8", fpsnum=30, fpsden=1)
pf = core.rgvs.RemoveGrain(clip=ret, mode=4)
div = 2
pf = core.resize.Bilinear(clip=pf, width=int(pf.width/div), height=int(pf.height/div))
pf = core.rgvs.RemoveGrain(clip=pf, mode=4)
pf = core.resize.Bilinear(clip=pf, width=pf.width*div, height=pf.height*div) 
#globalmotion = core.mv.DepanEstimate(clip=pf, pixaspect=1.0) 
super = core.mv.Super(clip=pf) 
vectors = core.mv.Analyse(super=super, isb=False)
globalmotion = core.mv.DepanAnalyse(clip=pf, vectors=vectors, pixaspect=1.0, error=30.0, thscd1=800)
ret = core.mv.DepanStabilise(clip=ret, data=globalmotion, cutoff=0.33, zoommax=1.0, rotmax=10.0, pixaspect=1.0, method=1)
ret.set_output()

Last edited by VS_Fan; 6th June 2016 at 06:41.
VS_Fan is offline   Reply With Quote
Old 6th June 2016, 10:01   #369  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
Quote:
Originally Posted by amayra View Post
can you do something about SVPFlow ?
What would you have me do?

VS_Fan: Thanks for testing.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 22nd June 2016, 11:50   #370  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
https://github.com/dubhater/vapoursy...leases/tag/v14

Code:
   * BlockFPS, FlowFPS: Fix repeated frames in the last 33% of the clip when
     reducing the frame rate (bug introduced at the beginning of this fork, probably).
   * All filters that have a "fields" parameter: Fix handling of field-based clips
     (was broken since the beginning of this fork).
   * Add ports of MDepan, DepanEstimate, and Depan.

Changes from upstream, versions 2.5.11.20 and 2.5.11.21:

   * BlockFPS: Remove parameter "thres", add parameter "ml".
   * Compensate, Mask: Add parameter "time".
   * Reject vector clips with negative delta where necessary.
   * FlowXYZ: No longer limit motion vector length to -127..127.
The Depan filters now handle Gray, 4:2:0, 4:2:2, 4:4:4, and up to 16 bits.
__________________
Buy me a "coffee" and/or hire me to write code!

Last edited by jackoneill; 1st July 2016 at 19:09.
jackoneill is offline   Reply With Quote
Old 24th June 2016, 04:47   #371  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
blockfps mode 6-8 are corrupted at bitdepth>8
Code:
import vapoursynth as vs
core = vs.get_core()

clp = rule6
clp = core.fmtc.bitdepth(clp,bits=8,fulls=False,fulld=True)
clp = core.std.ShufflePlanes(clp,0,vs.GRAY)

sup = core.mv.Super(clp)
bv = core.mv.Analyse(sup,8,overlap=4,delta=1,isb=True)
fv = core.mv.Analyse(sup,8,overlap=4,delta=1,isb=False)
clp = core.mv.BlockFPS(clp, sup, bv, fv, 50, 1, 8)

clp.set_output()


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

clp = rule6
clp = core.fmtc.bitdepth(clp,bits=16,fulls=False,fulld=True)
clp = core.std.ShufflePlanes(clp,0,vs.GRAY)

sup = core.mv.Super(clp)
bv = core.mv.Analyse(sup,8,overlap=4,delta=1,isb=True)
fv = core.mv.Analyse(sup,8,overlap=4,delta=1,isb=False)
clp = core.mv.BlockFPS(clp, sup, bv, fv, 50, 1, 8)

clp.set_output()

looks like a blank black frame, cuz
Code:
 pDst_[w] = pOcc[w]; 
 should be
 pDst_[w] = static_cast<PixelType>(pOcc[w]) << (bitspersample - 8); //mask stuff are always 8bits, compensating scaling required at higher bitdepth
or do it manually
Code:
import vapoursynth as vs
core = vs.get_core()

clp = rule6
clp = core.fmtc.bitdepth(clp,bits=16,fulls=False,fulld=True)
clp = core.std.ShufflePlanes(clp,0,vs.GRAY)

sup = core.mv.Super(clp)
bv = core.mv.Analyse(sup,8,overlap=4,delta=1,isb=True)
fv = core.mv.Analyse(sup,8,overlap=4,delta=1,isb=False)
clp = core.mv.BlockFPS(clp, sup, bv, fv, 50, 1, 8)
clp = core.std.Expr(clp,"x 256 *")

clp.set_output()

garbage, still, cuz
Code:
double l = 255 * pow(sad * dSADNormFactor, fGamma);
the expression is NOT linear, the result will be corrupted if the SAD remains unscaled, as ∂l/∂sad is not constant
feisty2 is offline   Reply With Quote
Old 24th June 2016, 12:53   #372  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
Quote:
Originally Posted by feisty2 View Post
blockfps mode 6-8 are corrupted at bitdepth>8
Maybe fixed. Thanks for testing.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 1st July 2016, 19:31   #373  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
https://github.com/dubhater/vapoursy...leases/tag/v15

After years of waiting, one more MVTools filter is ported. From the original MVTools only MShow is left now.

Code:
   * BlockFPS: Fix bug that prevented the use of the "ml" parameter (bug introduced in v14).
   * BlockFPS: Maybe fix bad output with 16 bit input (bugs introduced in v6 and v14).
   * DepanCompensate, DepanStabilise: Fix integer overflows with 16 bit input and subpixel=2 (bug introduced in v14).
   * Rename all "isse" parameters to "opt". They work the same.
   * Add filter Flow.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 9th July 2016, 18:19   #374  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
If QTGMC crashes, try https://github.com/dubhater/vapoursy...leases/tag/v16.

Code:
   * Compensate: Fix crash when overlap is used (bug introduced in v15).
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 27th July 2016, 12:38   #375  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
Which parameters are mostly responsible for the speed when using FlowFPS?
I'm mainly interested in: search, searchparam, overlap, dct, trymany, mask and opt.
kolak is offline   Reply With Quote
Old 27th July 2016, 12:47   #376  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
I'd say dct is one that will surely affect speed.
__________________
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 27th July 2016, 13:21   #377  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
Quote:
Originally Posted by kolak View Post
Which parameters are mostly responsible for the speed when using FlowFPS?
I'm mainly interested in: search, searchparam, overlap, dct, trymany, mask and opt.
opt exists only for debugging purposes. As far as I know, it doesn't change the results.

dct > 0 definitely makes it much slower.
overlap > 0 makes it slower.
The search method matters too. Exhaustive will be slower than all the others, I guess.

If you want numbers, run some tests.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 27th July 2016, 14:55   #378  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
Wel, I'm not after some numbers, just idea about which parameters affect speed the most.

I have also different question.

I've noticed that search=6 does help a lot with artefacts when doing fps conversion on all up-down movements (sounds strange). In the same way opposite also works, so search=7 works for left-right movements.
Is there a way of switching search method based on dominant movement type? Sorry if this is silly question Problem is that this would have to work on "future" frames.
kolak is offline   Reply With Quote
Old 27th July 2016, 17:09   #379  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
Quote:
Originally Posted by kolak View Post
Wel, I'm not after some numbers, just idea about which parameters affect speed the most.

I have also different question.

I've noticed that search=6 does help a lot with artefacts when doing fps conversion on all up-down movements (sounds strange). In the same way opposite also works, so search=7 works for left-right movements.
Is there a way of switching search method based on dominant movement type? Sorry if this is silly question Problem is that this would have to work on "future" frames.
That's a question best directed at the original developers. I don't have the math skills to answer.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 27th July 2016, 18:35   #380  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
Quote:
Originally Posted by kolak View Post
Wel, I'm not after some numbers, just idea about which parameters affect speed the most.

I have also different question.

I've noticed that search=6 does help a lot with artefacts when doing fps conversion on all up-down movements (sounds strange). In the same way opposite also works, so search=7 works for left-right movements.
Is there a way of switching search method based on dominant movement type? Sorry if this is silly question Problem is that this would have to work on "future" frames.
read the doc

Quote:
search, searchparam, pelsearch

search decides the type of search at every level, searchparam is an additional parameter (step, radius) for this search, and pelsearch is the radius parameter at finest (pel) level. Below are the possible values for the search type:

0 'OneTimeSearch'. searchparam is the step between each vectors tried (if searchparam is superior to 1, step will be progressively refined).
1 'NStepSearch'. N is set by searchparam. It's the most well known of the MV search algorithm.
2 Logarithmic search, also named Diamond Search. searchparam is the initial step search, there again, it is refined progressively.
3 Exhaustive search, searchparam is the radius (square side is 2*radius+1). It is slow, but it gives the best results, SAD-wise.
4 Hexagon search, searchparam is the range. (similar to x264).
5 Uneven Multi Hexagon (UMH) search, searchparam is the range. (similar to x264).
6 pure Horizontal exhaustive search, searchparam is the radius (width is 2*radius+1).
7 pure Vertical exhaustive search, searchparam is the radius (height is 2*radius+1).
feisty2 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 11:58.


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