Happy that you got the basic idea!
If you take lines 1,3,5 from each top field and create lines 2,4,6 as a combination from beighbouring bottom fields. (or vice versa), you get a frequency-halving deinterlace (e.g. 25p from 50i), just as is implemented now. Identical quality you would get when taking lines 2,4,6 from each bottm field and inserting lines 1,3,5 from neighbouring fields. There is no quality difference between both versions, and each produces 25 p. Only when performing both versions in alteration, using all top and bottom fields, you will do real deinterlacing job into real 50p, because all lines from all fields come into use, in their proper moment. Keep in mind that the temporal difference is 1/50 seconds (or 1/60) for all neighbouring fields, in any healthy interlaced footage.
Maybe you want to implement it for a try, to see the immense difference in quality. Use a challenging movie with much motion and edges. You will find that deinterlaced 50p is not only much smoother than 25p, but in addition, the quality loss of the substituted lines is reduced, because those lines are then alternating.
Where to implement? I believe I understand the problems you mentioned.
My first suggestion was to generally deinterlace all 50i clips at the beginning, and from then on internally then treat them just as 50p clips. (as it happens when ou do it with external softwae) Everything would work well, but it would have 3 disadvantages, that’s why my second suggestion was different. Here the disadvantages: 1) converting prior to the processes is basically out of the concept used now. 2) unnecessary spoiled resources in case not needed (if exported into 25p or 50i and no geometrical filters or speed changing effects used). 3) The feature “export interlaced” (if anybody uses it at all) would suffer quality, because top and bottm frames could be exchanged any moment in the 50 Hz timeline, then the re-interlacing catches the wrong lines, causing unnecessary motion blur. But there are no other problems. This shortcome exists only in this case of re-interlacing.
Here I repeat and explain my second suggestion:
Use the existing deinterlacer in double rate and use is the same way same as now. Shotcut already activates it in the necessary steps and places, as Brian has explained it.
– For conversion into 25p, deinterlace can be processed in 25 Hz or 50 Hz, and timeline can be 25 Hz or 50 Hz. (From a 50 Hz-deinterlaced stuff, It does not matter whether un-even or even frames are used in the 25 Hz-export or if the sequence becomes swapped)
–.For conversion into 30p or 50p or 60p, deinterlace with 50 Hz before converting into new framerate (important).
– For speed changing effects, deinterlace with 50 Hz (important).
– For geometrical filters, deinterlace before the filter.
- If converted into 50i and no geometrical filter and no speed change: no need to deinterlace (as now also done), but can not harm either, if the following point is kept in mind.
Timeline: Only to avoid the “problem 3” (export in interlaced format), it could be useful to keep 25 Hz steps in the timeline. How to keep 25 Hz steps in the timeline while transferring 50 Hz contents: In the present version, interlaced format inplements this automatically: The timeline increments in 25 Hz steps, but each frame carries 2 fields in a temporal distance of 1/50 s, therefore the process transfers (hidden) 50 Hz, as can be seen in the healthy 50i output. The same can be acheived using a 50 Hz timeline but marking each frame which was was a top field, These markings will come in 25 Hz steps. They could guide the points of cutting But this should be ignored during speed changing effects, because they require good temporal resolution. After speed effects or after inserted clips of any other frequency, the raster markings could be resumed s soon as de-interlaced stuff comes again. But all this is only for the option of interlaced export in identical interlaced format, I see no other constellation making this necessary.