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.
Property | Type | |
---|---|---|
Width | integer | Frame width in pixels. |
Height | integer | Frame height in pixels. |
FieldOrder | integer | See field_order. |
TimeScale | integer | Stream timescale in ticks per second (e.g. 30000). |
FrameDuration | integer | Nominal frame duration in timescale ticks (e.g. 1001). |
ColorPrimaries | integer | Sets 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. |
TransferCharacteristics | integer | See transfer_characteristics. |
InputCadenceMode | enum | Sets the cadence modulation mode of the input. This parameter is optional. If it isn't specified, then cadence modulation is disabled entirely. |
InputCadencePhase | enum | Sets 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. |
OutputCadenceMode | enum | Sets the cadence modulation mode of the output. This parameter is optional. If it isn't specified, then cadence modulation is disabled entirely. |
OutputCadencePhase | enum | Sets 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.
Property | Type | |
---|---|---|
HorizontalScale | float | Sets 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). |
VerticalScale | float | Sets 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). |
HorizontalOffset | float | Sets 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. |
VerticalOffset | float | Sets 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. |
HorizontalPixelAspectRatio | integer | By 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. |
VerticalPixelAspectRatio | integer | By 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.
Property | Type | |
---|---|---|
HorizontalResolution | float | Override 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). |
VerticalResolution | float | Override 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.
Property | Type | |
---|---|---|
InputMaxLuminance | float | Sets 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 |
OutputMaxLuminance | float | Sets 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 |
EnableSceneReferencedConversion | boolean | When 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. |
DisplayMapping | enum | Sets the display mapping options used by the conversion. Note not all conversion types can use all display mapping techniques. |
DisplayMappingMethod | enum | Sets the display mapping method used by the conversion. Note this only affects conversions involving PQ or highlight expansion. |
ExpandHighlightsThreshold | float | Sets 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. |
ExpandHighlightsGain | float | Sets 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. |
GammaAdjustment | float | Applies 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. |
GammaAdjustmentMethod | enum | Sets the gamma adjustment method used by the conversion. |
ScaleAdjustment | float | Applies a small scale adjustment to the RGB channels. The valid range for this control is [0.7. 1.3]. |
SdrTransferFunction | enum | Selects the opto-electric transfer function used for scene-referred conversions involving SDR. |
Timing
The properties listed below apply to the conversion process.
Property | Value | |
---|---|---|
TemporalScaleFactor | float | Sets the factor by which output time is scaled relative to input time as a rational number. |
FirstOutputFrame | integer | Sets 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.
Property | Value | |
---|---|---|
TemporalConversionMode | enum | Selects the method used to generate output frames which are not aligned with a temporal sample in the input. |
EnableSoftSync | boolean | This 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. |
SoftSyncDuration | integer | When EnableSoftSync is true, this value defines the maximum (sustained) interpolated duration as a value of absolute time in units of milliseconds. |
EnableSoftFrameSync | boolean | When 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. |
EnableIntraFrameCuts | boolean | Permits 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_NONE | No cadence. |
CADENCE_AUTO | Autodetect cadence. |
CADENCE_22 | Fixed 2:2 cadence. This pattern has a phase count of two. |
CADENCE_23 | Fixed 2:3 cadence. This pattern has a phase count of five, typically termed AA, BB, BC, CD and DD. |
CADENCE_2332 | Fixed 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_CLIP | Display mapping hard clip. |
DISPLAY_MAPPING_SOFT_CLIP | Display mapping soft clip. |
DISPLAY_MAPPING_EXPAND_HIGHLIGHTS | Display mapping expand highlights. |
Color Method
Property values for DisplayMappingMethod
and GammaAdjustmentMethod
are:
Enumerator | |
---|---|
COLOR_METHOD_YRGB | Method (3) from BT.2390-8. |
COLOR_METHOD_RGB | Method (4) from BT.2390-8. |
SDR OETF
Property values for SdrTransferFunction
are:
Enumerator | |
---|---|
SDR_OETF_BT_709_EXACT | As described in BT.709. |
SDR_OETF_POWER_LAW | Gamma of 0.5. |
Conversion Mode
Property values for TemporalConversionMode
are:
Enumerator | |
---|---|
CONVERSION_MODE_SYNC | Synchronize to newest sample (a.k.a. drop/duplicate). |
CONVERSION_MODE_LINEAR | Linear interpolation (a.k.a. blend). |
CONVERSION_MODE_MOTION_COMP | Motion compensated interpolation. |
Expand Highlights
Recommended values for varying amounts of highlight expansion are:
Amount | ExpandHighlightsThreshold | ExpandHighlightsGain |
---|---|---|
Low | 0.7 | 1.3 |
Medium | 0.6 | 1.8 |
High | 0.5 | 2.5 |
Updated about 1 year ago