Table of Contents

Class VideoEffectDeinterlaceCAVT

Namespace
VisioForge.Core.Types.VideoEffects
Assembly
VisioForge.Core.dll

Represents a CAVT (Content Adaptive Vertical Temporal) deinterlacing effect that converts interlaced video to progressive format using vertical-temporal filtering with adaptive threshold control.

public class VideoEffectDeinterlaceCAVT : VideoEffect, IVideoEffectDeinterlaceCAVT, IVideoEffect

Inheritance

Implements

Inherited Members

Remarks

CAVT (Content Adaptive Vertical Temporal) deinterlacing employs a sophisticated filtering approach that combines vertical interpolation (using spatial information from adjacent lines) and temporal filtering (using information from previous and subsequent frames) to convert interlaced video to progressive format. The algorithm adapts its filtering strategy based on local content characteristics, using a single threshold parameter to control the balance between preserving motion detail and maximizing vertical resolution.

SDK Availability: This effect is available in VideoCaptureCore, MediaPlayerCore, and VideoEditCore SDKs. Windows platform only.

Platform Support: Windows only (requires Windows-specific video processing filters).

The CAVT algorithm analyzes both vertical and temporal differences in the video to determine the optimal reconstruction method for each pixel. In areas where temporal differences (indicating motion) are below the threshold, the algorithm can safely use temporal information to reconstruct missing scan lines with high quality. In areas with high temporal differences (fast motion or scene changes), the algorithm relies more heavily on vertical spatial interpolation to avoid ghosting and motion artifacts. This adaptive approach provides excellent quality for both static and moving content within a single, easy-to-configure effect.

Key Features:

  • Combined vertical and temporal filtering for high-quality deinterlacing
  • Content-adaptive processing that automatically adjusts to motion and scene changes
  • Single threshold parameter for straightforward configuration
  • Excellent vertical resolution preservation in static areas
  • Robust motion handling without combing or ghosting artifacts
  • Suitable for a wide range of interlaced content types
  • Good balance between quality and computational efficiency

Common Use Cases:

  • Converting broadcast interlaced video (1080i, 576i, 480i) to progressive format
  • Processing video from DV/HDV camcorders with native interlaced output
  • Deinterlacing content for modern progressive displays (LCD, OLED, plasma)
  • Preparing interlaced footage for video editing workflows that require progressive material
  • Converting legacy television archives to progressive format for preservation
  • Real-time deinterlacing of live video capture with good quality-performance balance
  • General-purpose deinterlacing when simpler configuration is preferred over multi-parameter methods

Technical Details: The algorithm operates by first computing vertical gradients and temporal differences for each pixel location. The VisioForge.Core.Types.VideoEffects.VideoEffectDeinterlaceCAVT.Threshold parameter defines the sensitivity of motion detection: temporal differences below this threshold indicate static or slowly-moving content where temporal averaging can safely be applied, while differences above the threshold indicate motion requiring spatial-only reconstruction. The vertical component uses edge-aware interpolation to reconstruct missing lines with minimal blurring of important details. By combining these approaches adaptively, CAVT achieves better quality than simple bob, weave, or line-doubling methods while remaining computationally efficient.

Parameter Tuning Guidelines: The default threshold of 20 works well for most content. Lower threshold values (5-15) make the algorithm more conservative, treating more areas as motion and relying more on vertical interpolation. This preserves motion better but may sacrifice some vertical resolution in static areas. Higher threshold values (25-40) allow more aggressive use of temporal filtering, maximizing vertical resolution but potentially causing ghosting or combing if motion is misclassified as static. Adjust the threshold based on the motion characteristics of your content: fast-action content benefits from lower thresholds, while mostly static content can use higher thresholds.

Performance Characteristics: CAVT deinterlacing requires buffering multiple frames for temporal analysis, which introduces a small latency (typically 2-3 frame times). Computational requirements are moderate, higher than simple bob/weave methods but lower than motion-compensated deinterlacing. The algorithm is well-suited for real-time processing of SD and HD content on modern hardware. Processing time scales with resolution and the amount of motion in the content.

Comparison with Other Deinterlacing Methods: CAVT provides simpler configuration than blend deinterlacing (VisioForge.Core.Types.VideoEffects.VideoEffectDeinterlaceBlend) which requires tuning four parameters. It typically produces better quality than triangle deinterlacing (VisioForge.Core.Types.VideoEffects.VideoEffectDeinterlaceTriangle) for motion preservation. CAVT offers an excellent balance of quality, ease of use, and performance, making it a good default choice for general-purpose deinterlacing.

For other deinterlacing approaches, see VisioForge.Core.Types.VideoEffects.VideoEffectDeinterlaceBlend for adaptive blending with more granular control via multiple thresholds and constants, or VisioForge.Core.Types.VideoEffects.VideoEffectDeinterlaceTriangle for triangle-kernel-based filtering. Consider VisioForge.Core.Types.VideoEffects.GPUVideoEffectDeinterlaceBlend for GPU-accelerated deinterlacing if processing high-resolution content in real-time.

Constructors

VideoEffectDeinterlaceCAVT(bool, int, string, TimeSpan, TimeSpan)

Initializes a new instance of the VisioForge.Core.Types.VideoEffects.VideoEffectDeinterlaceCAVT class with specified or default parameters.

public VideoEffectDeinterlaceCAVT(bool enabled, int threshold = 20, string name = "DeinterlaceCAVT", TimeSpan startTime = default, TimeSpan stopTime = default)

Parameters

enabled bool

true to enable the effect immediately; false to create the effect in a disabled state. The effect can be enabled or disabled later using the VisioForge.Core.Types.VideoEffects.VideoEffect.Enabled property.

threshold int

The threshold value controlling motion detection sensitivity and temporal-spatial filtering balance. Valid range is 0-255. Default is 20, which provides balanced performance for most interlaced content. Lower values preserve motion better; higher values preserve vertical resolution in static areas.

name string

An optional name identifier for this effect instance. Default is "DeinterlaceCAVT". Used to retrieve specific effect instances from a collection via the VisioForge.Core.Types.VideoEffects.VideoEffect.Name property. Multiple effects of the same type can coexist with different names.

startTime TimeSpan

The time at which the effect should start being applied. Default is Zero, which applies the effect from the beginning of the video. Use a specific time value to delay the effect start (useful for videos containing both progressive and interlaced sections, or for selectively deinterlacing specific scenes).

stopTime TimeSpan

The time at which the effect should stop being applied. Default is Zero, which applies the effect until the end of the video. Set to a specific time to limit the effect duration (useful for processing only interlaced portions of a video that contains mixed format content).

Remarks

If both startTime and stopTime are zero (default), the effect will be applied for the entire video duration.

The CAVT algorithm requires buffering multiple frames (typically 2-3) for temporal analysis, which introduces a small processing latency. This is generally not noticeable in non-live playback scenarios but should be considered for live/real-time applications. Memory usage increases proportionally with video resolution due to frame buffering requirements.

CAVT deinterlacing has moderate computational requirements, making it suitable for real-time processing of SD and HD content on modern hardware. For 4K content or when performance is critical, consider GPU-accelerated deinterlacing alternatives or simpler deinterlacing methods. Processing time is content-dependent: videos with more motion require more spatial filtering and may process slightly slower than static content.

The default threshold of 20 is a good starting point for most content. Fine-tune this parameter after creation by adjusting the VisioForge.Core.Types.VideoEffects.VideoEffectDeinterlaceCAVT.Threshold property based on visual inspection of the deinterlaced results, particularly examining moving edges and static detail areas.

Properties

Threshold

Gets or sets the threshold value that controls the sensitivity of motion detection and the balance between temporal and spatial filtering.

public int Threshold { get; set; }

Property Value

int

Remarks

The threshold determines how much temporal difference between fields is considered motion versus noise or static content. When temporal differences are below this threshold, the algorithm applies temporal filtering (averaging across fields/frames) to achieve maximum vertical resolution. When differences exceed the threshold, spatial-only filtering is used to prevent ghosting and motion artifacts.

Threshold value guidelines:

  • 5-12: Very conservative, treats most areas as motion. Use for fast-action content, sports, or scenes with rapid movement. May sacrifice vertical resolution unnecessarily in some static areas.
  • 13-25: Balanced threshold range suitable for most content (default is 20). Provides good motion handling while preserving vertical resolution in static areas. Works well for typical television programming, movies, and general video content.
  • 26-40: Aggressive temporal filtering, maximizes vertical resolution. Use for content with minimal motion or slow camera movements. Risk of ghosting or combing on fast motion if threshold is too high.
  • 40+: Very aggressive, suitable only for almost entirely static content like slideshows or talking-head videos with no camera movement. High risk of motion artifacts.

The optimal threshold depends on your source material and quality requirements. Start with the default value of 20 and adjust based on visual results. If you see combing artifacts on moving objects, decrease the threshold. If static areas appear softer than desired (lacking vertical resolution), increase the threshold. Most users will find values between 15 and 25 produce the best results for typical content.

Note that the threshold interacts with the noise characteristics of your source material. Noisy sources may require higher thresholds to avoid misinterpreting noise as motion, while clean sources can use lower thresholds for more accurate motion detection.

Methods

GetEffectType()

Gets the specific type of this video effect.

public VideoEffectType GetEffectType()

Returns

VideoEffectType

Returns VisioForge.Core.Types.VideoEffects.VideoEffectType.DeinterlaceCAVT to identify this as a CAVT deinterlacing effect.

Remarks

This method overrides the base class implementation to provide the concrete effect type. The effect type is used by the video processing pipeline to route the effect to the appropriate CAVT deinterlacing filter processor.