Skip to content

Commit

Permalink
remove esl
Browse files Browse the repository at this point in the history
  • Loading branch information
emotion3459 committed Dec 15, 2024
1 parent 11459b4 commit d458295
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions vsdenoise/mvtools/motion.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ def _init_vects(self) -> None:
self.temporal_vectors = {w: {} for w in MVDirection}

@property
def got_vectors(self) -> bool:
def has_vectors(self) -> bool:
"""Whether the instance uses bidirectional motion vectors."""

return bool(
(self.temporal_vectors[MVDirection.BACK] and self.temporal_vectors[MVDirection.FWRD]) or self.vmulti
)

def got_mv(self, direction: MVDirection, delta: int) -> bool:
def has_mv(self, direction: MVDirection, delta: int) -> bool:
"""
Returns whether the motion vector exists.
Expand Down
6 changes: 3 additions & 3 deletions vsdenoise/mvtools/mvtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def recalculate(
elif vectors is None:
vectors = self.vectors

if not vectors.got_vectors:
if not vectors.has_vectors:
raise CustomRuntimeError('You need to first run analyze before recalculating!', self.recalculate)

tr = fallback(tr, self.tr)
Expand Down Expand Up @@ -514,7 +514,7 @@ def recalculate(
)
else:
for i in range(1, t2 + 1):
if not vectors.got_mv(MVDirection.BACK, i) or not vectors.got_mv(MVDirection.FWRD, i):
if not vectors.has_mv(MVDirection.BACK, i) or not vectors.has_mv(MVDirection.FWRD, i):
continue

for j in range(0, refine):
Expand Down Expand Up @@ -951,7 +951,7 @@ def get_vectors_bf(
:return: Two lists, respectively for backward and forwards, containing motion vectors.
"""

if not vectors.got_vectors:
if not vectors.has_vectors:
vectors = self.analyze(supers=supers, ref=ref, inplace=inplace)

t2 = (self.tr * 2 if self.tr > 1 else self.tr) if self.source_type.is_inter else self.tr
Expand Down

0 comments on commit d458295

Please sign in to comment.