Skip to content

Commit

Permalink
vfm: move kwargs merge down
Browse files Browse the repository at this point in the history
  • Loading branch information
LightArrowsEXE committed Sep 10, 2024
1 parent 66a307e commit bb6ed41
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions vsdeinterlace/ivtc.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,26 +161,26 @@ def vfm(
vfm_kwargs = dict[str, Any](
tff=tff, order=tff.is_tff, field=tff.is_tff, mode=mode,
mchroma=func.num_planes > 1, chroma=func.num_planes > 1
) | kwargs
)

if block := kwargs.pop('block', False):
if isinstance(block, int):
vfm_kwargs | dict(block=(block, block))
vfm_kwargs |= dict(block=(block, block))
else:
vfm_kwargs | dict(block=block)
vfm_kwargs |= dict(block=block)

if y := kwargs.pop('y', False):
if isinstance(y, int):
vfm_kwargs | dict(y=(y, y))
vfm_kwargs |= dict(y=(y, y))
else:
vfm_kwargs | dict(y=y)
vfm_kwargs |= dict(y=y)

if clip2 := kwargs.pop('clip2', False):
vfm_kwargs | dict(clip2=clip2)
vfm_kwargs |= dict(clip2=clip2)
elif func.work_clip.format is not clip.format:
vfm_kwargs = dict(clip2=clip)
vfm_kwargs |= dict(clip2=clip)

fieldmatch = func.work_clip.vivtc.VFM(**vfm_kwargs)
fieldmatch = func.work_clip.vivtc.VFM(**(vfm_kwargs | kwargs))

if postprocess:
if callable(postprocess):
Expand Down

0 comments on commit bb6ed41

Please sign in to comment.