The FXScript Reference

For Final Cut Pro created by Joe Maller

topfield

topfield

Related Links:
Interpolate

Additional Notes

Use to find Field Order

First appeared in FCP 4.5's "Flop" perspective filter, and I'm fairly sure it was used unnecessarily. *

This predefined variable returns a 0 or 1 (true/false) if the current field is the topmost spatial field in the frame. This in incredibly useful when combined with fieldNumber. The following code will return the correct field order for an interlaced clip programatically.

FieldOrder = (fieldNumber - 1 == topfield)

That will return zero (0) for Upper Field First and one (1) for Lower Field First.

That ability has been sorely missing in FXScript, this is extremely helpful as it eliminates the need to ask users to know anything about field dominance.




* The following comment appears in the code for FCP 4.5's Flop filter (on two lines):

// If we are field processing & on the (spatially) top field, we need to shift down one line, to preserve line order.
// eg, "0 1 2 3 4 5" becomes spatially wrong if we turn it into "4 5 2 3 0 1." So, we ditch a line, to keep spatial ordering.


The whole problem has to do with the use of the scale function around the same centerpoint for both fields. A simpler fix would simply be to shift the centerpoint value down by half of fieldNumber. To me, a one line fix always beats an 18 line workaround.

Doesn't work with Generators

Topfield doesn't recognize the informationflag("hasfields") option for generators so the returned value is always, wrongly, zero.

Can the Flop filter be cut down for progressive source

I have true progressive footage in a sequence with field dominance set to none - I want to apply the 'Flop' filter set to 'Both'. This works fine, but it seems there is more math going on than needs be with this filter IF the footage its applied to is true progressive?

Any thoughts?
Thanks
Mark