FrameFormer Filter

The InSync FrameFormer iffc filter may be used for motion-compensated standards conversions. When using FrameFormer, the iffc filter must be used to specify the output properties for standard conversions. The output frame rate is represented by the TimeScale (numerator) and FrameDuration (denominator).

For example:

---
output:
  container:
  - video:
    - filter:
      - type: iffc
        properties:
          Width: 720
          Height: 480
          FieldOrder: 1
          TimeScale: 60
          FrameDuration: 1
{
  "output": {
    "container": [
      {
        "video": [
          {
            "filter": [
              {
                "type": "iffc",
                "properties": {
                  "Width": 720,
                  "Height": 480,
                  "FieldOrder": 1,
                  "TimeScale": 60,
                  "FrameDuration": 1
                }
              }
            ]
          }
        ]
      }
    ]
  }
}

Format

The following properties configure the output video.

PropertyType
WidthintegerFrame width in pixels.
HeightintegerFrame height in pixels.
FieldOrderintegerSee field_order.
TimeScaleintegerStream timescale in ticks per second (e.g. 30000).
FrameDurationintegerNominal frame duration in timescale ticks (e.g. 1001).
ColorPrimariesintegerSets the output transfer characteristics (the opto-electro transfer function (OETF) and electro-optical transfer function (EOTF)). Only BT.709, PQ, HLG, and SLog3 are supported. See color_primaries.
TransferCharacteristicsintegerSee transfer_characteristics.
InputCadenceModeenumSets the cadence modulation mode of the input. This parameter is optional. If it isn't specified, then cadence modulation is disabled entirely.
InputCadencePhaseenumSets the cadence modulation mode of the input. This parameter is optional. If it isn't specified, then cadence modulation is disabled entirely. To select a specific cadence mode, but enable auto-detection of phase, set to -1.
OutputCadenceModeenumSets the cadence modulation mode of the output. This parameter is optional. If it isn't specified, then cadence modulation is disabled entirely.
OutputCadencePhaseenumSets the cadence modulation mode of the input. This parameter is optional. If it isn't specified, then cadence modulation is disabled entirely.

Aspect Ratio

By default, FrameFormer maps the contents of input frames to exactly fill output frames. This means that distortion can occur if the output frames have a different display aspect ratio. This is not usually the desired result, and so the API provides an option for specifying the horizontal aspect ratio used for the conversion.

PropertyType
HorizontalScalefloatSets the horizontal aspect ratio adjustment. Modifies the aspect ratio of the output. This parameter acts as a horizontal scale (i.e. a value of 1 means the aspect ratio of the resultant video will exactly match the width of the specified output format).
VerticalScalefloatSets the vertical aspect ratio adjustment. Modifies the aspect ratio of the output. This parameter acts as a vertical scale (i.e. a value of 1 means the aspect ratio of the resultant video will exactly match the height of the specified output format).
HorizontalOffsetfloatSets the horizontal position of the output video as a ratio of the output format's width. An offset of 0 centers the video horizontally in the output. This parameter has a default value of 0.
VerticalOffsetfloatSets the vertical position of the output video as a ratio of the output format's height. An offset of 0 centers the video vertically in the output. This parameter has a default value of 0.
HorizontalPixelAspectRatiointegerBy default the horizontal pixel aspect ratio will be the same as the input. This property allows the client to specify a new horizontal pixel aspect ratio.
VerticalPixelAspectRatiointegerBy default the vertical pixel aspect ratio will be the same as the input. This property allows the client to specify a new vertical pixel aspect ratio.

Resolution

These controls permit adjustment of the amount of detail present in output frames. The controls are most relevant to conversions from progressive to interlaced or to a video standard with lower definition e.g. high definition to standard definition. The subjective appearance of output frames is always a trade-off between detail and alias. Detail makes frames appear sharper but too much alias causes unsatisfactory results such as flashing/flickering detail and the appearance of jagged edges.

According to the user preference and source video properties, the resolution overrides may be used to increase or decrease the apparent detail and optimize the degree of alias visibility. The independent horizontal and vertical overrides are specified as scaling factors with a nominal default value of 1. Decreasing the value reduces alias and softens output detail. Increasing the value sharpens output detail. Note a visible increase in sharpness will only been seen where more detail exists in the source, i.e. these controls do not add more detail than is present in the source.

PropertyType
HorizontalResolutionfloatOverride the horizontal resolution. Reducing the resolution can be used to soften an image while increasing the resolution can potentially be used to sharpen it (at the expense of increasing aliasing). Note the outputs may only appear sharper where the default aperture is performing some band- limiting, otherwise no effect will be observed (for example, when up-converting).
VerticalResolutionfloatOverride the vertical resolution. Reducing the resolution can be used to soften an image while increasing the resolution can potentially be used to sharpen it (at the expense of increasing aliasing). Note the outputs may only appear sharper where the default aperture is performing some band- limiting, otherwise no effect will be observed (for example, when up-converting).

Color

FrameFormer has support for a number of color spaces (BT.709, BT.2020, etc), color formats (RGB vs. YUV) and dynamic range encodings (SDR, HLG, PQ, etc). The color controls listed below focus on how a mapping should be performed rather than which mapping should be used.

PropertyType
InputMaxLuminancefloatSets the maximum luminance (white level) for the input display, specified in candelas per square metre (nits). Note not all conversion types actually use the input luminance parameter. It is currently only used by the following conversions:
- PQ to SDR
- PQ to HLG
OutputMaxLuminancefloatSets the maximum luminance (white level) for the output display, specified in candelas per square metre (nits). Note not all conversion types actually use the output luminance parameter. It is currently only used by the following conversions:
- PQ to PQ
- SLog3 to PQ
EnableSceneReferencedConversionbooleanWhen true, conversions are scene-referred rather than display-referred. A scene referred conversion applies the inverse OETF of the source display and then the OETF of the target display. Transformations such as color space changes are done in scene-light. By contrast, a display-referred conversion applies the EOTF of the source display followed by the inverse EOTF of the target display, with transformations being done in display-light. This setting is disabled by default.
DisplayMappingenumSets the display mapping options used by the conversion. Note not all conversion types can use all display mapping techniques.
DisplayMappingMethodenumSets the display mapping method used by the conversion. Note this only affects conversions involving PQ or highlight expansion.
ExpandHighlightsThresholdfloatSets the threshold above which highlight expansion is applied. This setting is only used when the display mapping is set to DISPLAY_MAPPING_EXPAND_HIGHLIGHTS. The valid range is [0.2, 0.8]. Default value is 0.7. See Expand Highlights for recommended values.
ExpandHighlightsGainfloatSets the gain used for highlight expansion (units are arbitrary). This setting is only used when the display mapping is set to DISPLAY_MAPPING_EXPAND_HIGHLIGHTS. The valid range is [1.0, 4.0]. Default value is 1.5. See Expand Highlights for recommended values.
GammaAdjustmentfloatApplies a small gamma adjustment to the RGB channels. The valid range for this control is [-0.2. +0.2]. It is recommended to leave it at the default value of 0.
GammaAdjustmentMethodenumSets the gamma adjustment method used by the conversion.
ScaleAdjustmentfloatApplies a small scale adjustment to the RGB channels. The valid range for this control is [0.7. 1.3].
SdrTransferFunctionenumSelects the opto-electric transfer function used for scene-referred conversions involving SDR.

Timing

The properties listed below apply to the conversion process.

PropertyValue
TemporalScaleFactorfloatSets the factor by which output time is scaled relative to input time as a rational number.
FirstOutputFrameintegerSets the frame number of the first output frame to generate. This parameter allows segmenting a conversion into multiple partial conversions, which can then be combined later. This parameter has a default value of 0.

Temporal

Temporal controls affect the conversion process when the output sample rate is different from the input sample rate. Temporal rate differences can be very small (e.g. 59.94Hz to 60Hz) or much larger (e.g. 24Hz to 60Hz). They correspond to either an increase or a decrease in sample rate.

PropertyValue
TemporalConversionModeenumSelects the method used to generate output frames which are not aligned with a temporal sample in the input.
EnableSoftSyncbooleanThis function ensures the best possible conversion result when the difference in source and output temporal rates is very small: e.g. 59.94 to 60.00 FPS. Under these circumstances the period of sustained temporal interpolation may by limited to a fixed value with no compromise to the output quality.
SoftSyncDurationintegerWhen EnableSoftSync is true, this value defines the maximum (sustained) interpolated duration as a value of absolute time in units of milliseconds.
EnableSoftFrameSyncbooleanWhen set to true, this control enables a soft interlaced-frame-aware synchronization, when applicable (i.e. it will only affect conversions between interlaced sources to interlaced outputs which maintain identical frame dimensions). This mechanism allows original interlaced frames to be passed transparently from source to output when using the soft synchronize feature to prevent unnecessary temporal conversion.
EnableIntraFrameCutsbooleanPermits native interlaced frames to contain fields from two different shots. Such intra-frame cuts are not enabled by default. Note such intra-frame cuts are automatically enabled when generating output cadence.

Cadence

Property values for InputCadenceMode, InputCadencePhase, OutputCadenceMode and OutputCadencePhase are:

Enumerator
CADENCE_NONENo cadence.
CADENCE_AUTOAutodetect cadence.
CADENCE_22Fixed 2:2 cadence. This pattern has a phase count of two.
CADENCE_23Fixed 2:3 cadence. This pattern has a phase count of five, typically termed AA, BB, BC, CD and DD.
CADENCE_2332Fixed 2:3:3:2 cadence. This pattern has a phase count of five, typically termed AA, BB, BC, CC and DD.

Display Mapping

Property values for DisplayMapping are:

Enumerator
DISPLAY_MAPPING_HARD_CLIPDisplay mapping hard clip.
DISPLAY_MAPPING_SOFT_CLIPDisplay mapping soft clip.
DISPLAY_MAPPING_EXPAND_HIGHLIGHTSDisplay mapping expand highlights.

Color Method

Property values for DisplayMappingMethod and GammaAdjustmentMethod are:

Enumerator
COLOR_METHOD_YRGBMethod (3) from BT.2390-8.
COLOR_METHOD_RGBMethod (4) from BT.2390-8.

SDR OETF

Property values for SdrTransferFunction are:

Enumerator
SDR_OETF_BT_709_EXACTAs described in BT.709.
SDR_OETF_POWER_LAWGamma of 0.5.

Conversion Mode

Property values for TemporalConversionMode are:

Enumerator
CONVERSION_MODE_SYNCSynchronize to newest sample (a.k.a. drop/duplicate).
CONVERSION_MODE_LINEARLinear interpolation (a.k.a. blend).
CONVERSION_MODE_MOTION_COMPMotion compensated interpolation.

Expand Highlights

Recommended values for varying amounts of highlight expansion are:

AmountExpandHighlightsThresholdExpandHighlightsGain
Low0.71.3
Medium0.61.8
High0.52.5