utils ¶
Functions:
-
normalize_thscd
–Normalize and scale the thscd parameter.
-
planes_to_mvtools
–Convert a sequence of plane indices to MVTools' plane parameter value.
normalize_thscd ¶
normalize_thscd(
thscd: int | tuple[int | None, int | float | None] | None,
scale: bool = True,
) -> tuple[int | None, int | None]
Normalize and scale the thscd parameter.
Parameters:
-
thscd
¶int | tuple[int | None, int | float | None] | None
) –thscd value to scale and/or normalize.
-
scale
¶bool
, default:True
) –Whether to scale thscd2 from 0-100 percentage threshold to 0-255.
Returns:
Source code in vsdenoise/mvtools/utils.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
|
planes_to_mvtools ¶
planes_to_mvtools(input_planes: Sequence[int]) -> int
Convert a sequence of plane indices to MVTools' plane parameter value.
MVTools uses a single integer to represent which planes to process
- 0: Process Y plane only
- 1: Process U plane only
- 2: Process V plane only
- 3: Process UV planes only
- 4: Process all planes
Parameters:
Returns:
-
int
–Integer value used by MVTools to specify which planes to process.
Source code in vsdenoise/mvtools/utils.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|