Intra field interlace to sequential converter.

    This uses a vertical filter with an aperture of 8 lines, generated
    by
    :py:class:`~pyctools.components.interp.filtergenerator.FilterGenerator`.
    The aperture (and other parameters) can be adjusted after the
    :py:class:`IntraField` component is created.

def IntraField(config={}):
    """Intra field interlace to sequential converter.

    This uses a vertical filter with an aperture of 8 lines, generated
    by
    :py:class:`~pyctools.components.interp.filtergenerator.FilterGenerator`.
    The aperture (and other parameters) can be adjusted after the
    :py:class:`IntraField` component is created.

    """

    return Compound(
        config = config,
        deint = SimpleDeinterlace(),
        interp = Resize(),
        filgen = FilterGenerator(yaperture=8, ycut=50),
        gain = Arithmetic(func='data * pt_float(2)'),
        linkages = {
            ('self',   'input')  : [('deint',  'input')],
            ('deint',  'output') : [('interp', 'input')],
            ('interp', 'output') : [('self',   'output')],
            ('filgen', 'output') : [('gain',   'input')],
            ('gain',   'output') : [('interp', 'filter')],
            }
        )