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. |
|
|
Thread Tools | Search this Thread | Display Modes |
28th March 2012, 09:09 | #1 | Link | |||||||||||||||||
Registered User
Join Date: Mar 2012
Location: Saint-Petersburg
Posts: 239
|
SVPflow motion interpolation (Avisynth + Vapoursynth, Linux, Mac?)
Short version: SVPflow is a successor to MVTools2, providing more speed and more quality. Now available for Windows/Linux/Mac in both 32 and 64-bit versions.
Long story With all respect to Fizick MVTools is old and there’s almost no progress (except for bug fixes) for several years now. Obviously MVTools isn’t perfect so someone should do something with it And there comes another problem: MVTools is big and fat. There’re tons of dead, commented and copy-pasted code in it. For example all “client” functions (MFlow, MFlowFps, MBlockFps, …) are identical in at least 50% of code which is bad for further development. And there’s SVP project that started in 2008 on biggest Russian IT forum (iXBT.com). Main goal was to provide some user-friendly controls over all that MVTools-based scripts inside ffdshow for real-time smooth video playback. They’ve experimented with scripts, tuned GUI and so on. At some time I’ve noticed that MVTools performance is too low on AMD CPU’s, so I’ve made a patch that increased MFlow / MFlowFps speeds up to 50% on all Athlons/Phenoms. That was the beginning – SVP 2.0 The second step was creating MSmoothFps function that incorporates all “client” MVTools function in one with GPU accelerated rendering via OpenCL and some more stuff and it was SVP 3.0. The output of this function was per-pixel the same as output of original MFlowXXX. In latter versions we’ve made some speed optimizations (20-50%) in motion vectors search. But all of that was only a warming-up before the real job – to give MVTools a second life. So, SVPflow consists of two parts: GPLed motion vectors search and closed-source frame rendering. Downloads. The description and downloads are available there. Also many of you’re familiar with Interframe script Disclaimer. SVPflow isn’t a complete replacement for MVTools cause it’s missing most of additional functions. As of now the main goal of project is to provide fast and high quality real-time video conversion, so all functions unnecessary for this task was cut off and sources were cleared and refactored. Also there’re a lot of new features added and I could tell about them if someone is interested in ---------- Version 4.0.0.128 (02/22/16) Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Last edited by chainik_svp; 22nd February 2016 at 18:15. |
|||||||||||||||||
28th March 2012, 10:51 | #3 | Link | |
VR, 3D & HDR UHD fan
Join Date: Mar 2006
Location: Sofia, Bulgaria
Posts: 53
|
Quote:
And also, if I may ask you to consider implementing support for YV24 colorspace in a future version, that would be great. Thank you for your work! |
|
28th March 2012, 10:57 | #4 | Link |
Registered User
Join Date: Mar 2012
Location: Saint-Petersburg
Posts: 239
|
aegisofrime
No it couldn't. It uses MDegrain, MCompensate and MFlowBlur. All I could do is providing some kind of converter from SVAnalyse vectors to MAnalyse output format o_O Zerofool consider implementing support for YV24 colorspace in a future version There's no real visual difference in real-time between YV12 and YUY2, but YUY2 processing is 30% slower. That's the reason why SVPflow supports only YV12 now. YV24 will be 2 times slower. So why? Last edited by chainik_svp; 28th March 2012 at 11:07. |
28th March 2012, 19:14 | #8 | Link |
Registered User
Join Date: Jul 2010
Posts: 448
|
My edit to my last post crossed with your reply so you may have missed it, I had some questions about the new penalty settings:
What does pnbour do exactly? It seems related to field coherence, but I can't quite tell from the docs. How exactly does penalty.prev work - does it assume that forward vectors at frame 1 (from the frame 0 to frame 1) are expected to be the opposite of backward vectors at frame 1 (from frame 2 to frame 1)? Or does it have a temporal aspect, forward vectors at frame 1 are expected to be the reverse of backward vectors at frame 0 (I think you probably know what I mean), or is it something different again... Also are there downsides to penalty.prev? Objects appearing or disappearing would strongly affect it, but that's a problem case already. Thanks for you work BTW Last edited by -Vit-; 28th March 2012 at 19:20. |
29th March 2012, 00:46 | #9 | Link | |
Registered User
Join Date: Mar 2004
Posts: 889
|
Quote:
And from your experience how promising is GPU based rendering? I am replacing my display card (ATI 4850). Now choosing between 5850 (if i could find it), 6850 and GTX 560SE (336 CUDA core). |
|
29th March 2012, 09:19 | #10 | Link |
Registered User
Join Date: Mar 2012
Location: Saint-Petersburg
Posts: 239
|
-Vit-
In MVTools there're up to 5 predictors for each block: - zero vector (with pzero penalty) - global (with pglobal penalty) - interpolated from previous level (w/o any penalty) - left, top, right (interpolated) and their median (with lambda penalty) In SVPflow: - zero (pzero) - global (pglobal) (but global MV is average between forward global MV and backward global MV) - from previous level (w/o penalty) - from previous level in opposite direction (*) (if exists, with prev penalty) - vectors of up to 8 already processed neighbours (**) (with pnbour penalty) (*) Forward (from frame 0 to frame 1) and backward (from 1 to 0) vectors are finding at the same time, like this: "fwd on smallest level 5", "bwrd on smallest level 5", "fwd on level 4", "bwrd on level 4", ..., "fwd on finest level 0", "bwrd on finest level 0". So when processing some block in "bwrd level 5" we can take already founded MV from "fwd level 5" that points to this block (if such MV exists) as a predictor. And for block in "fwd level 4" we can take MV interpolated from "bwrd level 5" that points to this block. (**) In MVTools blocks are processed in strict order row by row. In SVPflow order of processing is defined by block's SAD values - blocks with less SAD are processing first. So for each block its already processed neighbours (if any) are always have better quality. BTW the next good idea is to sort blocks not by SAD but by its contrast value... Last edited by chainik_svp; 29th March 2012 at 09:22. |
29th March 2012, 11:01 | #11 | Link |
Registered User
Join Date: Mar 2012
Location: Saint-Petersburg
Posts: 239
|
henryho_hk
how promising is GPU based rendering? 1. It's fast 2. It provides much more precision cause all processing on GPU done in floats. What's the point of hpel and qpel? First: you can find vectors with non-integer coordinates up to 0.5 or 0.25 of pixel. Second: it makes additional interpolated planes in super clip that are used by CPU rendering to fetch sub-pixels. What if you need to render frame at the time moment = 0.2, for example? You'll need not the original MVs but forward MV/5 and backward MV*4/5. Obviously there're no exactly those sub-pixel with neither hpel nor qpel on CPU. But GPU can easily fetch the exact sample you need, it's like "infinite" pel level Also with high precision rendering there's less need for high precision in vectors search. 3. It can do bicubic interpolation instead of bilinear (even on low-end cards) which is definitely visible with naked eye. I dunno why but I can't upload any attachments images -------- Upd: some images. Last edited by chainik_svp; 29th March 2012 at 17:39. Reason: link to images added |
29th March 2012, 12:39 | #12 | Link | |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
Quote:
When you bring "block contrast" into the game, consider making various SAD thresholds RELATIVE to block contrast. The current system with absolute values surely was easy to implement, but really, it is quite dumb. (An object is sold for $50. Is this a good price, or is it expensive? Well, it depends on the kind of object ... obviously. Now, is SAD=50 a good threshold, or not? Well, it depends...)
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
29th March 2012, 12:56 | #13 | Link |
Registered User
Join Date: Mar 2012
Location: Saint-Petersburg
Posts: 239
|
Didée
Yeah, I know that it was your ideas about contrast Right now block contrast is used for "adaptive" search distance - large distance for more contrast blocks, zero distance for uniform ones. Which is good for eliminating "window blinds" artifacts BTW. And relative (or "adjusted") SAD is used in scene change detection, but it's adjusted not by contrast but by avg. luma. |
29th March 2012, 16:44 | #15 | Link |
The speed of stupid
Join Date: Sep 2011
Posts: 317
|
|
29th March 2012, 17:40 | #16 | Link |
Registered User
Join Date: Mar 2012
Location: Saint-Petersburg
Posts: 239
|
Bloax
That's not exactly what I've looked for... but thanks Some synthetic images with GPU rendering. Big blue thing with red edge moves on some background. All images with pel=1! |
30th March 2012, 03:16 | #19 | Link | |
Registered User
Join Date: Sep 2011
Posts: 86
|
Quote:
Zerofool, you could do something like this. I'm sure there are some gotchas, like chroma placement. Code:
w=width h=heigth resize (2 * w, 2 * h) converttoYV12 #motion stuff converttoYV24 resize(w, h) |
|
30th March 2012, 09:35 | #20 | Link | ||
Registered User
Join Date: Mar 2012
Location: Saint-Petersburg
Posts: 239
|
Quote:
Quote:
But on NV you can do real HW deinterlacing with LAV @CUDA before motion interpolation. |
||
Tags |
frame doubling, frame rate conversion, mvtools, opencl |
Thread Tools | Search this Thread |
Display Modes | |
|
|