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. |
20th November 2013, 19:53 | #1 | Link |
Beyond Kawaii
Join Date: Feb 2008
Location: Russia
Posts: 724
|
TempLinearApproximate plugin
Here's what seems to be stable release of TempLinearApproximate plugin rewrite for VapourSynth.
This plugin is meant for motion-compensated temporal denoising. TempLinearApproximate r3 - Windows binaries. Sources. Usage: Code:
tla.TempLinearApproximate( clip:clip radius:int:opt planes:int[]:opt:empty gamma:int:opt ) planes: The array of planes you want to process. If not specified - all planes are processed. Empty array is allowed for testing purposes. gamma: Boolean. True by default. Indicates if luma values are converted from gamma corrected to linear light before processing and back after. Never applied to chroma planes. Setting this argument to False gives a speed up. Motion compensated denoising script. Usage example: Code:
import sys sys.path.append('E:\\vapoursynth-plugins\\py\\') import MCDenoise as mcd tlamcArguments = { 'radius': 5, 'search': 5, 'pelsearch': 2, 'subpelinterp': 2, 'searchparam': 5, 'truemotion': True, 'chromamotion': True, 'thsad': 600, 'thscd1': 200, 'thscd2': 150, 'refine': True, '_lambda': 2000, } denoised = mcd.TempLinearApproximateMC(input=source, **tlamcArguments) CHANGELOG: r3: Support for single precision float input. Processing in linear light. On by default. Motion compensated script modified into standalone function. "gamma" argument added. r2: Fallback to averaging when current frame is the middle in the range (it is not the middle only when close to the beginning or the end). Speedup. License change to MIT. Fallback to C90. Compilable with MSVC.
__________________
...desu! Last edited by Mystery Keeper; 7th November 2016 at 21:15. |
20th November 2013, 20:10 | #2 | Link |
Guest
Posts: n/a
|
You are just using MAnalyse, MSuper and MCompensate right now, correct? I noticed that making an MVTools replacement was on the list of Vapoursynth issues. If no one else has started I can try to whip up a quick port of those functions. Now, I haven't yet looked at the code so it could be far less "quick", though, as it's likely my eyes will begin bleeding reading the source...
Last edited by handaimaoh; 20th November 2013 at 20:19. |
20th November 2013, 20:14 | #3 | Link | |
Beyond Kawaii
Join Date: Feb 2008
Location: Russia
Posts: 724
|
Quote:
__________________
...desu! Last edited by Mystery Keeper; 20th November 2013 at 20:18. |
|
20th November 2013, 20:19 | #4 | Link | |
Guest
Posts: n/a
|
Quote:
|
|
20th November 2013, 20:45 | #5 | Link |
Guest
Posts: n/a
|
Also looking at the code, what "Avisynth specifics" are you referring to? I'm not seeing what you are talking about. It's mostly using a bunch of its own internal functions. The most I'm seeing it use of the Avisynth API is the getReadPtr/getWritePtr, getPitch, etc. functions.
|
20th November 2013, 20:55 | #6 | Link | |
Beyond Kawaii
Join Date: Feb 2008
Location: Russia
Posts: 724
|
Quote:
__________________
...desu! |
|
20th November 2013, 21:03 | #7 | Link |
Guest
Posts: n/a
|
Ok, I see that in the documentation. It uses the "num_audio_samples" as a field to push data through. Just requires using the propSet* functions to do the same thing. So we would just need to decide on what to call the frame properties that are needed to be pushed out. It's quite simple.
Last edited by handaimaoh; 20th November 2013 at 21:05. |
20th November 2013, 21:08 | #8 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,579
|
Quote:
I won't. When I get to it (sometime early next year I guess), I will start writing something new. It will be inspired by mvtools and the goal is to have equivalent useful functions. The only vapoursynth features mvtools would benefit from is the possibility to attach data to frames, that would remove the insanity of passing a data pointer in an int for the audio properties. That and the general parallelism. Don't expect wonders from running it in parallel though, it already breaks things down into many small and fairly balanced steps as separate functions so even the avisynth version scales in an acceptable way. Feel free to shitport the existing lump of mvtools code but I won't waste my time doing that. Now I let you go on with the thread's actual topic....
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
20th November 2013, 21:10 | #9 | Link | |
Guest
Posts: n/a
|
Quote:
I'll bow out for now too. |
|
20th November 2013, 21:52 | #11 | Link | |
Registered User
Join Date: Sep 2008
Posts: 365
|
Quote:
I've yet to find a better temporal denoiser/degrainer which can produce the exact result I'm looking for combined with masktools2 for any source yet. (Of course not at default settings...)
__________________
(i have a tendency to drunk post) |
|
21st November 2013, 00:34 | #12 | Link | |
Guest
Posts: n/a
|
Quote:
|
|
21st November 2013, 15:50 | #13 | Link | |
Beyond Kawaii
Join Date: Feb 2008
Location: Russia
Posts: 724
|
Quote:
Also, motion compensated denoising is great, but no way universal. When two moving scenes get blended (and that happens a lot in movies and even more in music video) - you can expect motion compensation to create all kinds of distortion.
__________________
...desu! |
|
21st November 2013, 15:53 | #14 | Link |
Guest
Posts: n/a
|
Compiler intrinsics for MSVC have been around since at least Visual Studio 2003. Now there have been numerous code generation bugs over the years, but Avisynth's lack of their usage is not because they are something recent. Lack of their usage is likely because the core devs never moved passed Visual Studio 6 and what you said about both the core devs and plugin writers sacrificing any maintainability for writing the most "optimized" code. Even x264's ASM is far easier to follow than the inline asm macro mess that makes up the vast majority of asm in Avisynth plugins.
Last edited by handaimaoh; 21st November 2013 at 15:59. |
26th November 2013, 18:53 | #15 | Link |
Beyond Kawaii
Join Date: Feb 2008
Location: Russia
Posts: 724
|
Question!
Since my filter calculates linear approximation, should I use gamma correction? Should I make it default? Should I only apply it to Y-plane? Or make an option to specify the planes?
__________________
...desu! |
6th November 2014, 14:38 | #20 | Link |
Registered User
Join Date: Jan 2010
Posts: 270
|
http://pastebin.com/1KqGiCQR
I didn't actually run this but it should probably work. Just made your python less bad. |
Thread Tools | Search this Thread |
Display Modes | |
|
|