Fixing jagged edges with TDeint involves configuring its adaptive interpolation settings to blend and smooth interlaced artifact lines during video processing.
TDeint is a popular motion-adaptive deinterlacing plugin primarily used in AviSynth and GUI wrappers like Avidemux. When a video is interlaced, fast-moving objects create prominent comb-like “jagged edges” or “zipper” artifacts. TDeint eliminates these by keeping one field intact and adaptively interpolating the missing lines of the other field.
To eliminate jagged edges and optimize your output, focus on the following key parameters: 1. Choose the Right Interpolation Type (type)
The type parameter controls the math used to fill in missing pixels. Choosing the right one directly impacts how smooth or jagged your edges look:
Modified ELA / ELA2 (Value 1 or 2): Best for eliminating jagged edges in animation. Edge-Based Line Average (ELA) evaluates diagonal lines to blend pixels smoothly. Use type=2 (ELA2) as it is faster and prevents blocky artifacts. Avoid using this on live-action footage, as it causes massive flickering.
Kernel Interpolation (Value 3 or 4): Best for live-action or real-life footage. It produces a sharp image and keeps static areas from flickering, though it may leave slightly sharper diagonal lines than ELA.
Cubic (Value 0): The fastest mode, but it does a poor job of smoothing out jagged diagonal edges. 2. Maximize Motion Checking (MntMode)
Jagged lines often leak into a video when the filter incorrectly guesses whether an area is moving or static. Set MntMode=1 to enable a 5-field motion check.
This checks a wider buffer of frames to accurately separate true motion from static elements.
It drastically reduces interlacing artifacts and edge bleeding, though it slows down rendering. 3. Strict Spatial Thresholds (cthresh)
The cthresh parameter sets the threshold for comb artifact detection.
Lowering this value makes the filter more sensitive to jagged lines.
If your video still has faint horizontal lines along moving borders, drop this value slightly.
Be careful: setting it too low can mistake fine background textures for interlacing, causing unwanted blurring. 4. Enable Artifact Protection (AP)
If TDeint aggressively smooths an edge, it can accidentally create minor artifact “ghosts.”
Set AP (Artifact Protection) to check for interpolation errors.
If it detects an unnatural pixel blend, it reverts that specific zone to a safe blend mode, keeping your smooth edges clean. Quick Optimization Formula
For the cleanest results based on your source file, try these basic scripts:
For Anime/Cartoons: TDeint(type=2, MntMode=1) (Prioritizes smooth vector lines)
For Live-Action/Sports: TDeint(type=3, MntMode=1) (Prioritizes sharpness and reduces flicker)
Are you currently writing an AviSynth script, or using a graphical tool like Avidemux? If you let me know your video source type (e.g., old VHS rips, DVD footage, or gameplay capture), I can give you the exact code to copy and paste. Video filter TDeint – Avidemux.org
Leave a Reply