soifunc 0.9.0__tar.gz → 0.9.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: soifunc
3
- Version: 0.9.0
3
+ Version: 0.9.2
4
4
  Summary: Soichiro's VapourSynth Functions Collection
5
5
  License: MIT
6
6
  Author: Josh Holmer
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "soifunc"
3
- version = "0.9.0"
3
+ version = "0.9.2"
4
4
  description = "Soichiro's VapourSynth Functions Collection"
5
5
  authors = ["Josh Holmer <jholmer.in@gmail.com>"]
6
6
  license = "MIT"
@@ -21,13 +21,14 @@ def hqbm3d(
21
21
 
22
22
  Sane strength values will typically be below 1.0.
23
23
  """
24
+ blksize = select_block_size(clip)
24
25
  mv = mc_degrain(
25
26
  clip,
26
27
  preset=vsdenoise.MVToolsPresets.HQ_SAD,
27
28
  tr=2,
28
29
  thsad=100,
29
- refine=3,
30
- blksize=select_block_size(clip),
30
+ refine=3 if blksize > 16 else 2,
31
+ blksize=blksize,
31
32
  prefilter=vsdenoise.Prefilter.DFTTEST(
32
33
  clip,
33
34
  slocation=[(0.0, 1.0), (0.2, 4.0), (0.35, 12.0), (1.0, 48.0)],
@@ -57,22 +58,22 @@ def mc_dfttest(
57
58
  but is slower.
58
59
  """
59
60
  # TODO: Do we need to tweak anything for the `noisy` param?
61
+ blksize = select_block_size(clip)
60
62
  return mc_degrain(
61
63
  clip,
62
64
  prefilter=vsdenoise.Prefilter.DFTTEST,
63
65
  preset=vsdenoise.MVToolsPresets.HQ_SAD,
64
66
  thsad=thSAD,
65
67
  tr=2,
66
- refine=3,
67
- blksize=select_block_size(clip),
68
+ refine=3 if blksize > 16 else 2,
69
+ blksize=blksize,
68
70
  )
69
71
 
72
+
70
73
  def select_block_size(clip: vs.VideoNode):
71
- if clip.width >= 1920 or clip.height >= 1080:
74
+ if clip.width * clip.height >= 1920 * 800:
72
75
  return 64
73
- if clip.width >= 1600 or clip.height >= 900:
74
- return 48
75
- if clip.width >= 1280 or clip.height >= 720:
76
+ if clip.width * clip.height >= 1280 * 720:
76
77
  return 32
77
78
  return 16
78
79
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes