If these two frame are purely blended ( Average(1a, 2b) and Average(2a, 3b) ):
blended_frame_1 = orig_frame_1
blended_frame_2 = (orig_frame_1 + orig_frame_2) / 2
Thus,
orig_frame_2 = blended_frame_2 * 2 - orig_frame_1 = blended_frame_2 * 2 - blended_frame_1
If you know masktools it is simply like this:
last = mt_average(a, b, U=3, V=3)
then:
a = mt_lutxy(last, b, "x 2 * y -", U=3, V=3)
b = mt_lutxy(last, a, "x 2 * y -", U=3, V=3)
So fix such blended IVTC using (assuming 3:2 pulldown from exact 1st frame in the section, or shift the frame number manually):
f_1 = SelectEvery(0, 5) # 1a and 1b
f_2 = SelectEvery(1, 5) # blended of 1a and 2b
f_3 = SelectEvery(2, 5) # blended of 2a and 3b
f_4 = SelectEvery(3, 5) # 3a and 3b
f_5 = SelectEvery(4, 5) # 4a and 4b
f_2 = mt_lutxy(f_2, f_1, "x 2 * y -", U=3, V=3) # Restore to 2b
f_3 = mt_lutxy(f_3, f_4, "x 2 * y -", U=3, V=3) # Restore to 2a
Now f_2 and f_3 should be same ( or similar but with field shift ). Decimate one of them like:
Interleave(f_1, f_2, f_4, f_5)
or if you would like to do manually ovr:
Interleave(f_1, f_2, f_3, f_4, f_5).TDecimate(ovr="deci-ovr.txt")
Limitations:
1. Blended IVTC must be accurately average(a, b), otherwise you need to analyse the weight by BlendWeight or similar tools. Blame the blenders.
2. We assume that 1a and 1b are same, but it may actually contain field shift. Fixes on that might be needed.
3. There might be rounded error, in both average and restore. Normally it might shift YUV value by no more than 1. If you're lucky enough it may also be 0 for all pixels. There's nothing we can do other than post-MC-temporal-smooth, but it is not a big problem for your eyes compared to blending.
4. I don't know if it still works after resizing = =
P.S.
1. There're some filters named Restore/Mrestore/Srestore/Exblend/... to do something similar, and with some PP, but may not be that accurate for purely half-half blended source like this one, and have many other limitations. Furthermore, I'd like to take control of the process of every single field and the process of decimation.
2. With some dirty blends, shifting and softening might be problems that you can never get rid of. Personally for some dirty sources I would like to use the above method to construct a reference frame, and use MVTools to construct final frame using the reference frame to get accurate timing in interpolation.