Jaded-Encoding-Thaumaturgy / vs-denoise

VapourSynth denoising, regression, and motion compensation functions
MIT License
18 stars 6 forks source link

mlm_degrain: free variable 'last_idx' referenced before assignment in enclosing scope #76

Closed NSQY closed 1 year ago

NSQY commented 1 year ago
mv = mlm_degrain(
    clip, downscaler=DPID(sigma=0.6), factors=range(3),
    mv_kwargs=dict(sharp=2, rfilter=4),
    analyze_kwargs=dict(sad_mode=SADMode.ADAPTIVE_SATD_MIXED, search=SearchMode.DIAMOND),
    soften=Prefilter.MINBLURFLUX
    )
  File "/home/morgan/Documents/python/Vapoursynth/fun/z.vpy", line 89, in <module>
    mv = mlm_degrain(
  File "/home/morgan/.local/lib/python3.10/site-packages/vsdenoise/funcs.py", line 146, in mlm_degrain
    base_denoise = _degrain(scaled_clips[0], None, 0)
  File "/home/morgan/.local/lib/python3.10/site-packages/vsdenoise/funcs.py", line 108, in _degrain
    if do_soft and idx in {0, last_idx}:
NameError: free variable 'last_idx' referenced before assignment in enclosing scope
Setsugennoao commented 1 year ago

Fixed https://github.com/Irrational-Encoding-Wizardry/vs-denoise/commit/bdeb92aff4904ccfbbe2efa5e2418eb6c6e27c31