Dogway / Avisynth-Scripts

AviSynth+ 3.7.3+ Filters
GNU General Public License v3.0
92 stars 13 forks source link

SMDegrain: fix broken BFF interlace handling #89

Open JohnstonJ opened 3 months ago

JohnstonJ commented 3 months ago

The SMD_UnfoldFieldsVertical function takes a TFF parameter, but doesn't actually use it when assigning the parity of the input clip. This results in horribly destroyed results when using BFF interlaced clips.

Fix this by using TFF to determine whether to call AssumeTFF or AssumeBFF.

Here's an example that shows the problem. The input image originated from a DV camcorder that interlaced using BFF. I used the filter SMDegrain(interlaced=true) to generate the outputs.

I git bisected the repository and found this regression was first introduced in e3cea8f54132f19e6e3aeff6ad66e899cdb9ad1c

Original input image image

Broken interlace handling seen in master image

Results after applying this commit image