Skip to content

Commit

Permalink
Update funcs.py
Browse files Browse the repository at this point in the history
  • Loading branch information
emotion3459 committed Oct 13, 2024
1 parent 915284e commit ccab3d5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions vstools/functions/funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ def norm_clip(self) -> ConstantFormatVideoNode:
if not self.allowed_cfamilies or cfamily in self.allowed_cfamilies:
return clip

if cfamily is vs.YUV and vs.GRAY in self.allowed_cfamilies:
return plane(clip, 0)

self.cfamily_converted = True

if cfamily is vs.YUV:
Expand All @@ -165,7 +162,7 @@ def work_clip(self) -> ConstantFormatVideoNode:
def chroma_planes(self) -> list[vs.VideoNode]:
"""Get a list of all chroma planes in the normalised clip."""

if self == [0] or self.norm_clip.format.num_planes == 1:
if self != [0] or self.norm_clip.format.num_planes == 1:
return []

return [plane(self.norm_clip, i) for i in (1, 2)]
Expand Down Expand Up @@ -308,4 +305,4 @@ def norm_seq(self, seq: T | Sequence[T], null: T = 0) -> list[T]: # type: ignor
return [
x if i in self else null
for i, x in enumerate(normalize_seq(seq, self.num_planes))
]
]

0 comments on commit ccab3d5

Please sign in to comment.