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. |
27th October 2013, 13:59 | #1001 | Link |
Beyond Kawaii
Join Date: Feb 2008
Location: Russia
Posts: 724
|
Thank you. Installed R21 RC, and it has become fast.
This plugin interpolates between frames within (radius) using linear approximation/regression. update: Compared unfiltered and filtered single planes. Filtered look like they have something like valid output, but much brighter (twice as bright?). That shouldn't be happening though, since all I'm doing is finding the linear approximation between the same pixels of several frames. Then, of course, I'm doing the bit depth conversion. But it shouldn't be different between planes, right? update2: Checked the Y plane, and it is actually getting brighter too. So, there's a general mistake somewhere in my calculations. update3: Silly silly me. I forgot to calculate xsum. Fixed. Now need to test with different bit depths and maybe optimize a little.
__________________
...desu! Last edited by Mystery Keeper; 27th October 2013 at 15:12. |
27th October 2013, 15:25 | #1002 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Here's R21 RC2.
It will probably be released with no further changes. This final RC is just to see so I didn't break anything when moving some code around. It also has a fix for an issue no one ever noticed.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
27th October 2013, 15:26 | #1003 | Link |
Beyond Kawaii
Join Date: Feb 2008
Location: Russia
Posts: 724
|
Ok. Now something unrelated seems to have popped up.
Code:
ret = core.fmtc.bitdepth(ret, bits=16) ret = core.tla.TempLinearApproximate(ret, radius=10, outBits=8) Both RC1 and RC2.
__________________
...desu! Last edited by Mystery Keeper; 27th October 2013 at 15:28. |
27th October 2013, 15:49 | #1004 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
1. VS doesn't allow less than 8 bits per sample to keep things simple so Code:
if((outBitsPerSample < 1) || (outBitsPerSample > 16)) ; 2. You are NEVER supposed to created your own VSFormat struct copies. WRONG! Code:
internalData.format = *internalData.videoInfo.format; internalData.videoInfo.format = &internalData.format; Your format error is because the output is 16 bit and you have nothing that can play it. Convert it to 8 bit to preview.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
27th October 2013, 15:54 | #1005 | Link |
Beyond Kawaii
Join Date: Feb 2008
Location: Russia
Posts: 724
|
ret = core.tla.TempLinearApproximate(ret, radius=10, outBits=8)
It does convert to 8bit. Well, I'll try to register format properly. Haven't found an example of how to do that properly so far.
__________________
...desu! |
27th October 2013, 15:56 | #1006 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
I found the typo. Will put up RC3 soon.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
27th October 2013, 15:59 | #1007 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
27th October 2013, 16:56 | #1008 | Link |
Beyond Kawaii
Join Date: Feb 2008
Location: Russia
Posts: 724
|
Fixed the format. Works well so far. Still there are things to do, but hopefully shall release soon.
http://paste.org.ru/?vaevta
__________________
...desu! |
27th October 2013, 17:23 | #1009 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
It's not stuck. AssVapour uses fontconfig which needs to create a font index the first run. It's very slow. Give it up to 5 minutes. (or possibly more)
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
27th October 2013, 17:42 | #1010 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Here's R21 RC3. Fixes the prop_src crash and checks so a proper VSFormat is passed to setVideoInfo().
Quote:
2. I also specify the planes to process as an int array in all internal filters. See Lut which is called like this: Lut(clip, planes=[1,2], long_lut_array). 3. You probably don't want to have this condition Code:
uint32_t outValue; if(inBytesPS == 2) outValue = ((uint16_t *)srcp)[w]; else outValue = srcp[w]; There's also the obivious question of why this filter is doing bitdepth conversion at all. Especially downconversion by truncation probably isn't what most people really want. Maybe you should leave that to fmtconv? Upconversion from 8 to 16 bit is also extremely cheap to do in a separate filter placed in front of TLA so maybe drop that complexity?
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
27th October 2013, 19:06 | #1011 | Link |
Beyond Kawaii
Join Date: Feb 2008
Location: Russia
Posts: 724
|
Yup, you're right. I did normalization of the source values, and I shouldn't. Double precision should be enough for 16-bit calculations on any reasonable radius. If it isn't - normalization wouldn't help anyway. So I'll drop normalization, bit depth conversion and format change altogether.
__________________
...desu! |
27th October 2013, 20:33 | #1012 | Link |
Beyond Kawaii
Join Date: Feb 2008
Location: Russia
Posts: 724
|
Here you go. As fast as it gets. Still a draft, but usable.
http://paste.org.ru/?h6sf34
__________________
...desu! |
27th October 2013, 21:12 | #1013 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
2. You're calling vsapi->getReadPtr() in the inner loop, you probably want to store the pointers in a local array before the loop 3. You can automatically copy planes using newVideoFrame2() (which is free since it uses some reference counting behind the scenes). See ShufflePlanes as an example of how it's used. Basically you pass an array of 3 frame and another of the planes that should be copied from them. If you pass 0 as the frame pointer you get a normal blank plane.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
28th October 2013, 22:00 | #1017 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
Clips that actually have 0 frames aren't allowed and can't be created for obvious reasons. As for clips either both or no dimensions are known. You will trigger a fatal error if you try to set only one of width and height to zero. I have plenty of extra argument checks going on to stop some common mistakes from happening. If VapourSynth ever "just quits" run it from the commandline to see the stderr output. It usually prints the reason and offending filter (if any).
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
29th October 2013, 22:15 | #1018 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
I finally released R21. Changelog in the first post. Download link on the website.
Blog post here. Same procedure as every time... Now for some plugin writing. Download link now fixed.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet Last edited by Myrsloik; 30th October 2013 at 00:12. |
30th October 2013, 09:35 | #1020 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
I don't know if there is any other really popular plugin left to port. I think I got all the extremely useful ones but correct me if I'm wrong.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
Tags |
speed, vaporware, vapoursynth |
|
|