f_auto_filters: rework --deinterlace=auto option
Before this commit, deinterlace=auto and deinterlace=yes were the exact same option for d3d11 and vaapi, the only difference being that with auto we would create/destroy the deinterlacing filter on every frame that changed the deinterlace flag and with yes, we left that the responsibility to determine whether to deinterlace or not to d3d11vpp and vavpp and the filters were always inserted.
Inserting and removing filters on every frame the interlaced flag changes is expensive and it will be more efficient to let the deinterlacing filters handle this distinction instead.
With this change, yes works as it should: deinterlacing is forced enable regardless of the frame flag. auto will always insert the deinterlacing filter, however the filters will only deinterlace the frames marked as interlaced.
One downside of this change is that we don't know if the filter is actually deinterlacing or not, we can only guess that if the filter is inserted and the frame is interlaced then it should be deinterlacing. It's possible for it to fail for whatever reason, and it's also possible future changes to ffmpeg (since bwdif lives in ffmpeg), might make the logic more complicated than this check. However, for now this is good enough.
Download the artifacts for this pull request:
Should we use the deinterlace in libplacebo which is implemented by shader instead?