The issue is that clipping the interpolated temporal sample against
the spatially predicted sample causes artifacts to appear.
Discovered while writing the Vulkan version (where I omitted the
same check).
The clipping in the code is carried over from yadif. Removing the
same code in yadif does not make any difference to the output.
I think that the check was simply ill-adapted to the new prediction
code and does more harm.
I tested replacing the range clip with only an FFMAX, and only an
FFMIN, but in both cases, artifacts still appeared.
Test sample 1: https://files.lynne.ee/testsamples/mbaff_1080i60_idx.mkvTest sample 2: https://files.lynne.ee/testsamples/mbaff_bdmv_1080i60_8slice.mkv
Command line:
./ffmpeg_g -cpuflags 0 -i -vf bwdif=mode=send_field -c:v rawvideo -y