Deinterlacing: Difference between revisions

From Emulation General Wiki
Jump to navigation Jump to search
Ahayri (talk | contribs)
Ahayri (talk | contribs)
Line 46: Line 46:
* '''Pros:''' Achieves a completely authentic CRT "deinterlacing" look; bypasses the need for soft interpolation filters; eliminates sample-and-hold motion blur.
* '''Pros:''' Achieves a completely authentic CRT "deinterlacing" look; bypasses the need for soft interpolation filters; eliminates sample-and-hold motion blur.
* '''Cons:''' High computational and display requirements; causes a drop in screen brightness; any missed frames or micro-stutter causes severe, highly visible flickering.
* '''Cons:''' High computational and display requirements; causes a drop in screen brightness; any missed frames or micro-stutter causes severe, highly visible flickering.
* '''How it works:''' The emulator simulates each interlaced field independently with scanlines. By leveraging high-refresh-rate host displays (e.g., 120Hz, 240Hz, or 360Hz), the emulator queries display timings (`EXT_present_timing`) to insert a calculated number of "gentle falloff" or blank frames during a single guest field's duration (~60Hz NTSC / 50Hz PAL).
* '''How it works:''' The emulator simulates each interlaced field independently with scanlines ([[Shaders,_presets,_and_filters#Aspects_to_prioritize|interlacing flicker]]). By leveraging high-refresh-rate host displays (e.g., 120Hz, 240Hz, or 360Hz), the emulator queries display timings (`EXT_present_timing`) to insert a calculated number of "gentle falloff" or blank frames during a single guest field's duration (~60Hz NTSC / 50Hz PAL).
{| class="wikitable" style="margin-left: 20px;"
{| class="wikitable" style="margin-left: 20px;"
|+on a 240Hz monitor, a single 60Hz guest field spans across 4 host refresh cycles. The emulator uses these extra cycles to phase out the image smoothly, accurately mimicking the natural temporal decay of CRT phosphors
|+on a 240Hz monitor, a single 60Hz guest field spans across 4 host refresh cycles. The emulator uses these extra cycles to phase out the image smoothly, accurately mimicking the natural temporal decay of CRT phosphors

Revision as of 13:32, 13 June 2026

Deinterlacing methods are used to process interlaced video signals (480i/576i), common in high-resolution modes for Sega Saturn, PlayStation, and PlayStation 2. Without deinterlacing, movement causes "combing" or "judder" artifacts on progressive displays. PlayStation 2 Graphics Synthesizer, used unique internal video output modes to handle or disguise interlacing. Emulators must handle these behaviors natively before applying any external deinterlacing method. While there are some attempted shader-based solutions, emulator's built-in deinterlacing methods provide better results on image quality.

Before diving in

Main article: Displays#The Analog Output Bottleneck in Software Emulation

Algorithms

Bob Deinterlacing

The most common and fastest method. It separates the two fields of an interlaced frame and scales them to full height.

  • Pros: Zero lag; preserves the "flicker" look of original hardware used for transparency effects (e.g., shadows in Silent Hill 2).
  • Cons: The image "bobs" or shimmers vertically because lines are offset between fields.

Weave / Blend

Combines two consecutive fields into a single frame.

  • Pros: High detail on static images.
  • Cons: Severe "combing" artifacts during horizontal movement; generally not recommended for gaming.

Motion-Adaptive (MAD / YADIF / BWDIF)

This algorithm analyzes pixels across multiple fields to determine if they are static or in motion. These are more complex shaders that attempt to detect which parts of the image are moving. They use "weave" for static areas and "bob" or interpolation for moving areas. As of 2022, PCSX2 and high-end shader suites use Motion-Adaptive Deinterlacing. BWDIF (Bob Weaver Deinterlacing Filter) is a modern evolution of this, providing sharper edges than YADIF.

  • Pros: Uses "Weave" for static areas (preserving full vertical resolution) and "Bob" or interpolation for moving areas. Effectively eliminates shimmering on text and UI while removing combing on moving objects.
  • Cons: Can introduce a small amount of input lag and requires more GPU resources. Moving objects may appear slightly "softer" than static ones since they rely on interpolation.

Motion-Compensated (MC)

The most advanced deinterlacing approach at this moment. Unlike adaptive methods that just "switch" techniques, MC uses "Motion Estimation" to track objects moving across the screen and "reconstructs" the missing data by looking at where those pixels were in previous/future fields.

  • Status: Primarily found in video post-processing (e.g., QTGMC, FFmpeg). Not yet viable for real-time emulators due to extreme GPU demand and the necessity of "looking ahead" at future frames, which causes significant input lag.
  • Pros: Near-perfect reconstruction of moving images; provides full vertical resolution even during high-speed motion (the "holy grail" of image quality).
  • Cons: High computational cost; prone to "hallucinating" or warping artifacts if the motion estimation tracking fails.

Other approaches

Automatic

Modern emulators can now automatically toggle deinterlacing based on the game's internal state.

  • How it works: Instead of a "one-size-fits-all" shader, the emulator detects when a game switches from 480i (interlaced gameplay) to 240p (progressive menus) or 480p (progressive scan) and disables deinterlacing automatically to prevent unnecessary blurring.

Index/compatibility database

Modern emulators can now automatically toggle deinterlacing based on their index/compatibility database.

No-Interlace Patches

A popular alternative to shaders. These are community-made patches that modify the game's code to render in progressive mode internally.

  • Pros: The cleanest possible image; removes the need for deinterlacing shaders entirely.
  • Cons: May cause graphical glitches in specific titles or break FMV playback.

CRT Simulation

Main article: Shaders, presets, and filters#Full Signal & Cable Emulation

High Refresh-Rate Insertion

Modern low-latency renderers (such as paraLLEl-GS) experiment with bypassing traditional software deinterlacing shaders entirely. Instead, they simulate how a CRT monitor naturally displays interlaced fields by utilizing high-refresh-rate displays and Black Frame Insertion (BFI) techniques.

  • Pros: Achieves a completely authentic CRT "deinterlacing" look; bypasses the need for soft interpolation filters; eliminates sample-and-hold motion blur.
  • Cons: High computational and display requirements; causes a drop in screen brightness; any missed frames or micro-stutter causes severe, highly visible flickering.
  • How it works: The emulator simulates each interlaced field independently with scanlines (interlacing flicker). By leveraging high-refresh-rate host displays (e.g., 120Hz, 240Hz, or 360Hz), the emulator queries display timings (`EXT_present_timing`) to insert a calculated number of "gentle falloff" or blank frames during a single guest field's duration (~60Hz NTSC / 50Hz PAL).
on a 240Hz monitor, a single 60Hz guest field spans across 4 host refresh cycles. The emulator uses these extra cycles to phase out the image smoothly, accurately mimicking the natural temporal decay of CRT phosphors
Host Frame Display State Purpose
Frame 1 100% Brightness The initial electron gun strike (Odd or Even lines)
Frame 2 50% Luminance Simulating the natural decay of the CRT phosphor
Frame 3 15% Luminance Deepening the fade
Frame 4 0% (Black Frame) Total blanking before the next field arrives

FRAME Mode (The Flicker Filter)

To avoid the harsh flickering typical of interlaced video, many PS2 games rendered internally at a progressive resolution (e.g., 448p @ 30 FPS) but programmed the console's dual CRTCs (Cathode-Ray Tube Controllers) to blend two frames vertically with a 1-pixel offset. Shifting this offset every field scanned out a smoothed 60 FPS interlaced image.

  • Emulator Handling: Modern renderers can detect this pattern and scan out the full, unblurred 480p progressive frame directly. Emulators often include an "Anti-Blur" toggle to disable this original hardware blending filter for a sharper image.

FIELD Mode

Used by titles aiming for a true 60 FPS. These games sacrificed half of their vertical resolution and jittered the rendering pipeline to stay perfectly in sync with the interlaced output fields.

  • Emulator Handling: These titles absolutely require a deinterlacing solution to look acceptable on progressive screens.

Hardware Masking (SCANMSK)

Certain complex software setups natively break when forced into progressive scan. Games like King's Field IV utilize the hardware `SCANMSK` feature to intentionally discard pixels on every other line during rendering, relying on the console's `FRAME` scanout mode to accurately display only the unmasked lines. Forcing progressive scan on these titles results in severely broken or missing graphics.

References

Also see