Skip to content

Commit

Permalink
Update some docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
Ichunjo committed Jun 26, 2021
1 parent 5f936d9 commit 609ed03
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions debandshit/f3kdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,15 @@ def __init__(self,
Reference pixels are in the square around current pixel
* SampleMode.ROW: Take 2 pixels as reference pixel
Reference pixels are in the same row of current pixel
Only `neo_f3kdb.Deband` supports it
* SampleMode.COL_ROW_MEAN: Arithmetic mean of 1 and 3
Reference points are randomly picked within the range
:param use_neo: Use neo_f3kdb.Deband
Reference points are randomly picked within the range
Only `neo_f3kdb.Deband` supports it
:param use_neo: Use `neo_f3kdb.Deband`
:param kwargs: Arguments passed to f3kdb.Deband
Default are `keep_tv_range=True, output_depth=16`
Read the f3kdb's documentation for more information about them:
https://f3kdb.readthedocs.io/en/latest/usage.html#parameters
"""
self.radius = radius

Expand All @@ -60,7 +65,7 @@ def __init__(self,
self.gry, self.grc = [grain] * 2 if isinstance(grain, int) else grain + [grain[-1]] * (2 - len(grain))

if sample_mode > 2 and not use_neo:
raise ValueError('deband: "sample_mode" argument should be less or equal to 2 when "use_neo" is false.')
raise ValueError('F3kdb: f3kdb.Deband doesn\'t support SampleMode.ROW or SampleMode.COL_ROW_MEAN')

if sample_mode <= 2 or not use_neo:
self.sample_mode = sample_mode
Expand Down Expand Up @@ -133,7 +138,7 @@ def grain(self, clip: vs.VideoNode) -> vs.VideoNode:
return self.deband(clip)

@staticmethod
def _trf(n: int, f: List[vs.VideoFrame]) -> vs.VideoFrame: # noqa: PLW0613
def _trf(n: int, f: List[vs.VideoFrame]) -> vs.VideoFrame:
# neo_f3kdb nukes frame props
(fout := f[0].copy()).props.update(f[1].props)
return fout
Expand Down
2 changes: 1 addition & 1 deletion debandshit/placebo.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(self,
in a very big change to the brightness level.
It's recommended to either scale this value down or disable it entirely for HDR.
:param kwargs: Arguments passed to f3kdb.Deband
:param kwargs: Arguments passed to `placebo.Deband`.
"""

self.radius = radius
Expand Down

0 comments on commit 609ed03

Please sign in to comment.