so I just wrote my very first plugin, like, a simple one that can do a simple 3x3 blurring (linear or non-linear) or sharpening, designed for easy use
https://github.com/IFeelBloated/minsrp
binary:
https://github.com/IFeelBloated/minsrp/releases/tag/r4
supported formats:
colorspace: YUV 4:4:4, Gray or RGB, subsampled stuff are not supported
bitdepth: 8-16bits fixed point, 32bits floating point, half precision is not supported
interlaced vids are not supported
parameters:
str, array that takes up to 3 elements, filtering strength of each plane, positive value = sharpening, negative value = blurring, default = 1.0
mode, filtering mode for each plane,
0 = no filtering
1 = gaussian filter (linear)
2 = median filter (non-linear)
3 = hybrid, picking the result of either gaussian or median, whichever has the smaller difference compared to the input clip
default = 3
sigh, python scripting is 100000000 times easier than c++ filter writing..
LOG:
r4:
speed boost yet again, did some insane and incomprehensible opts, the expensive cost of frequent memory allocation is now gone.
r3:
code opt, speed boost
r2:
new parameter linear, linearity of sharpening amplification for each plane
default = False
r1 amplifies the sharpening/blurring difference linearly, and just looks dumb to me, the cheesy algorithm tends to over sharpen/blur stuff like.. whatever
with linear = False, sharpening/blurring gets much smarter, it only filters where actually needs filtering with variable strength.
set linear=True if you wanna linear amplification.
non-linear amplification algorithm (shamelessly) copied from
http://forum.doom9.org/showthread.ph...17#post1547017