View Full Version : mvsfunc-r8
mawen1250
5th September 2015, 13:30
Github (https://github.com/HomeOfVapourSynthEvolution/mvsfunc) | NMM (https://www.nmm-hd.org/upload/get~dgM8HITE3rY/mvsfunc-r8.zip)
Examples:
import mvsfunc as mvf
# Any input depth
clip = mvf.Depth(clip, depth=16)
# 16-bit integer output
# Any input depth
clip = mvf.Depth(clip, depth=32)
# 32-bit float output
# Any input format
clip = mvf.ToYUV(clip, css="420")
# YUV420P output
# Any input format
clip = mvf.ToRGB(clip, depth=8)
# RGB24 output (e.g. for previewing using vsedit)
# Faster way to preview with RGB24 output, for vsedit
clip = mvf.Preview(clip)
# Preview with CompatBGR32 output, for VirtualDub, AvsPmod, etc.
clip = mvf.Preview(clip, compat=True)
# Compare multiple clips, they will be interleaved into one clip
clip = mvf.Preview([clip1, clip2, clip3])
# Any input format
clip = mvf.BM3D(clip, sigma=[3,3,3], radius1=0) # radius1=0 for BM3D, radius1>0 for V-BM3D
# Same as input format
Mainly some wrap functions, with which it's much simpler to use some functions, especially the BM3D denoising filter (http://forum.doom9.org/showthread.php?t=172172), with high internal precision and high quality format conversions.
It's written a few months ago, now finally publish it here. (I thought I should merge nnedi3_resample (https://github.com/mawen1250/VapourSynth-script) into it but I'm just too lazy to touch that monster...)
feve
5th September 2015, 21:58
Thanks for your efforts.
mawen1250
26th September 2015, 17:21
Update r2
Added utility functions:
Min
Max
Avg
MinFilter
MaxFilter
LimitFilter
ShowAverage
Added frame property functions:
SetColorSpace
AssumeFrame
AssumeTFF
AssumeBFF
AssumeField
AssumeCombed
mawen1250
7th October 2015, 14:34
Update r3
ToRGB and ToYUV fix: wrong color space frame property is set
Added Utility function FilterCombed()
Added support for vszimg 2.0 API (still support 1.0 API as well)
mastrboy
9th October 2015, 17:42
Thank you for making vapoursynth more user friendly to get into :P
mawen1250
11th October 2015, 16:37
Update r4
Added utility functions:
PlaneStatistics
PlaneCompare
PointPower
Added helper function:
GetPlane
mawen1250
21st November 2015, 05:34
Update r5
BM3D: fixed the mistake that bm3d.Basic/bm3d.VBasic is used for final estimate
BM3D: now psample always defaults to 1
ToYUV: fixed error with GRAY input
New category "Runtime functions"
Added runtime function FilterIf()
Added helper function CheckVersion()
mawen1250
26th January 2016, 12:40
Update r6
BM3D: fixed format checking for "pre" and "flt"
Support zimg included in VS r29 (core.resize)
Depth, ToRGB, ToYUV, BM3D: Added support for 1-7 bit integer output
Added Helper function PlaneAverage()
lansing
13th February 2016, 00:20
my vapoursynth editor crashes when I do this. The error message said "instruction at 0xe744677c referenced memory at 0x00000020. The memory could not be read".
clip = mvf.BM3D(clip, sigma=[0,0,0], radius1=1)
mawen1250
14th February 2016, 06:08
Thanks for your reporting.
Practically, it doesn't make sense when sigma is 0 for all planes (theoretically no processing).
Moreover, for V-BM3D, it probably doesn't have an elegant and efficient way to pass through unprocessed planes.
So for BM3D plugin, I won't do anything to deal with sigma=0.
But for mvf.BM3D, it is easy to skip calling BM3D internally, and here's the fix (https://github.com/HomeOfVapourSynthEvolution/mvsfunc/commit/8975e7afbcf71672e9b02c26230d4f4e9648065a).
mawen1250
9th April 2016, 11:02
Update r7
Depth: now prefer fmtc.bitdepth for full range content
Depth, ToRGB, ToYUV, BM3D, zDepth: new argument "prefer_props"
ToRGB: new argument "compat" to support CompatBGR32 output
***EXPERIMENTAL*** Added Utility function CheckMatrix()
Added Utility function postfix2infix()
Added Helper function GrayScale()
Added Helper function Preview()
mawen1250
31st July 2016, 14:39
Update r8
New Main function VFRSplice()
Preview: Set default dither to "random" to avoid banding
Depth, ToRGB, ToYUV, BM3D: When sample conversion is required but 'depth' is not set, use 16-bit for integer and 32-bit for float
LimitFilter: fixed error when thr>0&brighten_thr<=0 or thr<=0&brighten_thr>0
LimitFilter: fixed brighten_thr is not used when elast<=1
Frame properties related fixes
lansing
15th August 2016, 22:15
Can you add a "show noise" option for BM3D for each plane? I wanted to know how much noise did I remove
mawen1250
16th August 2016, 06:36
Can you add a "show noise" option for BM3D for each plane? I wanted to know how much noise did I remove
That should be easy to do with std.MakeDiff and hist.Luma (or write an Expr directly).
However this is not a part of the BM3D procedure itself, so I won't add it to the function.
It's a better choice to have a separate function to do the job.
Since the procedure is quite simple, and there're many ways to adjust the difference clip, I couldn't see the convenience to write a function for it...
lansing
16th August 2016, 15:11
That should be easy to do with std.MakeDiff and hist.Luma (or write an Expr directly).
However this is not a part of the BM3D procedure itself, so I won't add it to the function.
It's a better choice to have a single function to do the job.
Since the procedure is quite simple, and there're many ways to adjust the difference clip, I couldn't see the convenience to write a function for it...
I wanted something that's a simple on/off switch to show the noise. I'm going to use it repeatedly so I don't want to go through the hassle of commenting/uncommenting lines of codes every time to do this.
And it's not uncommon for denoise filter to have a show noise option, most of the denoise filters in virtualdub have had a show noise option built in on the same UI. It's just more convenience.
jackoneill
16th August 2016, 17:03
I wanted something that's a simple on/off switch to show the noise. I'm going to use it repeatedly so I don't want to go through the hassle of commenting/uncommenting lines of codes every time to do this.
You could always wrap it into a function with a "show_noise" parameter.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.