soifunc 0.8.2__tar.gz → 0.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {soifunc-0.8.2 → soifunc-0.9.0}/PKG-INFO +3 -8
- {soifunc-0.8.2 → soifunc-0.9.0}/pyproject.toml +2 -7
- {soifunc-0.8.2 → soifunc-0.9.0}/soifunc/denoise.py +30 -15
- {soifunc-0.8.2 → soifunc-0.9.0}/LICENSE +0 -0
- {soifunc-0.8.2 → soifunc-0.9.0}/README.md +0 -0
- {soifunc-0.8.2 → soifunc-0.9.0}/soifunc/__init__.py +0 -0
- {soifunc-0.8.2 → soifunc-0.9.0}/soifunc/deband.py +0 -0
- {soifunc-0.8.2 → soifunc-0.9.0}/soifunc/py.typed +0 -0
- {soifunc-0.8.2 → soifunc-0.9.0}/soifunc/resize.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: soifunc
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Summary: Soichiro's VapourSynth Functions Collection
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Josh Holmer
|
|
@@ -11,12 +11,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.12
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.13
|
|
13
13
|
Requires-Dist: vapoursynth (>=68)
|
|
14
|
-
Requires-Dist:
|
|
15
|
-
Requires-Dist: vsdenoise (>=2.7.1,<3.0.0)
|
|
16
|
-
Requires-Dist: vskernels (>=3.3.1,<4.0.0)
|
|
17
|
-
Requires-Dist: vsmasktools (>=1.3.2,<2.0.0)
|
|
18
|
-
Requires-Dist: vsscale (>=2.2.1,<3.0.0)
|
|
19
|
-
Requires-Dist: vstools (>=3.3.4,<4.0.0)
|
|
14
|
+
Requires-Dist: vsjetpack (>=0.3.4,<0.4.0)
|
|
20
15
|
Description-Content-Type: text/markdown
|
|
21
16
|
|
|
22
17
|
## soifunc
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "soifunc"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.9.0"
|
|
4
4
|
description = "Soichiro's VapourSynth Functions Collection"
|
|
5
5
|
authors = ["Josh Holmer <jholmer.in@gmail.com>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -9,12 +9,7 @@ readme = "README.md"
|
|
|
9
9
|
[tool.poetry.dependencies]
|
|
10
10
|
python = ">=3.12,<4.0"
|
|
11
11
|
vapoursynth = ">=68"
|
|
12
|
-
|
|
13
|
-
vsscale = "^2.2.1"
|
|
14
|
-
vsdenoise = "^2.7.1"
|
|
15
|
-
vsmasktools = "^1.3.2"
|
|
16
|
-
vsdeband = "^1.2.2"
|
|
17
|
-
vskernels = "^3.3.1"
|
|
12
|
+
vsjetpack = "^0.3.4"
|
|
18
13
|
|
|
19
14
|
[tool.poetry.group.dev.dependencies]
|
|
20
15
|
black = "^24.4.2"
|
|
@@ -3,7 +3,7 @@ from __future__ import annotations
|
|
|
3
3
|
from typing import Callable, Optional
|
|
4
4
|
|
|
5
5
|
import vsdenoise
|
|
6
|
-
from vsdenoise import DFTTest, FilterType, Profile
|
|
6
|
+
from vsdenoise import DFTTest, FilterType, Profile, mc_degrain
|
|
7
7
|
from vstools import core, vs
|
|
8
8
|
|
|
9
9
|
__all__ = ["MCDenoise", "magic_denoise", "hqbm3d", "mc_dfttest"]
|
|
@@ -21,20 +21,18 @@ def hqbm3d(
|
|
|
21
21
|
|
|
22
22
|
Sane strength values will typically be below 1.0.
|
|
23
23
|
"""
|
|
24
|
-
mv =
|
|
24
|
+
mv = mc_degrain(
|
|
25
25
|
clip,
|
|
26
|
+
preset=vsdenoise.MVToolsPresets.HQ_SAD,
|
|
26
27
|
tr=2,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
range_conversion=3.5,
|
|
31
|
-
sad_mode=vsdenoise.SADMode.SPATIAL.same_recalc,
|
|
32
|
-
search=vsdenoise.SearchMode.DIAMOND,
|
|
33
|
-
motion=vsdenoise.MotionMode.HIGH_SAD,
|
|
28
|
+
thsad=100,
|
|
29
|
+
refine=3,
|
|
30
|
+
blksize=select_block_size(clip),
|
|
34
31
|
prefilter=vsdenoise.Prefilter.DFTTEST(
|
|
35
32
|
clip,
|
|
36
33
|
slocation=[(0.0, 1.0), (0.2, 4.0), (0.35, 12.0), (1.0, 48.0)],
|
|
37
34
|
ssystem=1,
|
|
35
|
+
full_range=3.5,
|
|
38
36
|
planes=0,
|
|
39
37
|
),
|
|
40
38
|
planes=None,
|
|
@@ -53,13 +51,30 @@ def mc_dfttest(
|
|
|
53
51
|
Even at the default `thSAD` of 75, it works well at eliminating noise.
|
|
54
52
|
Turn it up to 150 if you really need to nuke something.
|
|
55
53
|
It does an *okay* job at preserving details, but not nearly as good
|
|
56
|
-
as bm3d, so this is not recommended on high quality sources.
|
|
57
|
-
|
|
54
|
+
as bm3d, so this is not recommended on clean, high quality sources.
|
|
55
|
+
|
|
56
|
+
The `noisy` parameter helps preserve more detail on high-quality but grainy sources,
|
|
57
|
+
but is slower.
|
|
58
58
|
"""
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
# TODO: Do we need to tweak anything for the `noisy` param?
|
|
60
|
+
return mc_degrain(
|
|
61
|
+
clip,
|
|
62
|
+
prefilter=vsdenoise.Prefilter.DFTTEST,
|
|
63
|
+
preset=vsdenoise.MVToolsPresets.HQ_SAD,
|
|
64
|
+
thsad=thSAD,
|
|
65
|
+
tr=2,
|
|
66
|
+
refine=3,
|
|
67
|
+
blksize=select_block_size(clip),
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
def select_block_size(clip: vs.VideoNode):
|
|
71
|
+
if clip.width >= 1920 or clip.height >= 1080:
|
|
72
|
+
return 64
|
|
73
|
+
if clip.width >= 1600 or clip.height >= 900:
|
|
74
|
+
return 48
|
|
75
|
+
if clip.width >= 1280 or clip.height >= 720:
|
|
76
|
+
return 32
|
|
77
|
+
return 16
|
|
63
78
|
|
|
64
79
|
|
|
65
80
|
def MCDenoise(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|