[vlc-devel] This week in deinterlacing: Phosphor/future

Juha Jeronen juha.jeronen at jyu.fi
Thu Mar 17 00:14:27 CET 2011


Hi all,

Here's my usual dev update. This time I'll keep it short.

The current version of Phosphor is functionally finished, but I'm
thinking of possibly returning to the topic after IVTC and the refactor
are done.


Original Phosphor ("reworked += 4") works like this:

When rendering top field:
  T <- N
  B <- darken(C)
When rendering bottom field:
  T <- darken(C)
  B <- N

where

T = top field in output frame,
B = bottom field in output frame,
N = new input field,
C = previous input field.

Input is considered as a stream of fields, with no (meaningful) temporal
frame boundaries. I think that this way of viewing the input is
conceptually cleaner for both true interlaced and telecined sources
(regardless of how the actual implementation of input handling is done).

Because the lines in a CRT TV overlap*, and considering how certain
classical antialiasing techniques work (think 2D graphics, e.g. AGG:
http://www.antigrain.com/ ), it follows that it may be possible to make
the Phosphor simulation visually even more accurate. It should be
possible to use blending to simulate the CRT line overlap to some extent.

(* see e.g. http://en.wikipedia.org/wiki/File:Pixel_geometry_01_Pengo.jpg )

Let's call this version "Future Phosphor":

When rendering top field:
  T <- N
  B <- darken( blend(C, N) )
When rendering bottom field:
  T <- darken( blend(C, N) )
  B <- N

Comparing this to the original, and thinking about the issue a bit,
suggests a general pattern for framerate doublers:

When rendering top field:
  T <- N
  B <- f( g(C, N) )
When rendering bottom field:
  T <- f( g(C, N) )
  B <- N

where we can identify the following:

Bob: f(A) = A, g(A, B) = B
Linear: f(A) = interpolate_vertical(A), g(A, B) = B
Original Phosphor: f(A) = darken(A), g(A, B) = A
Future Phosphor: f(A) = darken(A), g(A, B) = blend(A, B).

This in turn suggests that maybe, in the future, all four should be
combined under the same engine.

That's it for this week :)

 -J




More information about the vlc-devel mailing list