Skip to content

Commit

Permalink
correct usage of depth conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
emotion3459 committed Dec 5, 2024
1 parent 34dcf0c commit 1c701cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion vsmasktools/hardsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def _mask(self, clip: vs.VideoNode, ref: vs.VideoNode, **kwargs: Any) -> vs.Vide
mask = iterate(mask, core.std.Maximum, expand_n)
mask = mask.std.Inflate().std.Inflate().std.Convolution(mean_matrix)

return depth(mask, clip, range_in=1, range_out=1)
return depth(mask, clip, range_in=ColorRange.FULL, range_out=ColorRange.FULL)


class HardsubLineFade(HardsubLine):
Expand Down
4 changes: 2 additions & 2 deletions vsmasktools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from vskernels import Bilinear, Kernel, KernelT
from vsrgtools import box_blur, gauss_blur
from vstools import (
CustomValueError, FrameRangeN, FrameRangesN, FuncExceptT, P, check_ref_clip, check_variable,
CustomValueError, ColorRange, FrameRangeN, FrameRangesN, FuncExceptT, P, check_ref_clip, check_variable,
check_variable_format, core, depth, flatten, get_lowest_values, get_peak_values, insert_clip,
normalize_ranges, plane, replace_ranges, split, vs
)
Expand Down Expand Up @@ -252,7 +252,7 @@ def normalize_mask(

mask = mask(clip, ref)

return depth(mask, clip)
return depth(mask, clip, range_in=ColorRange.FULL, range_out=ColorRange.FULL)


def rekt_partial(
Expand Down

0 comments on commit 1c701cd

Please sign in to comment.