User guide

Table Of Contents
15–4 Chapter 15: Deinterlacer MegaCore Function
Functional Description
Video and Image Processing Suite January 2013 Altera Corporation
User Guide
The motion-adaptive algorithm fills in the rows that are missing in the current field by
calculating a function of other pixels in the current field and the three preceding fields
as shown in the following sequence:
1. Pixels are collected from the current field and the three preceding it (the X denotes
the location of the desired output pixel) (Figure 15–2).
2. These pixels are assembled into two 3×3 groups of pixels. Figure 15–3shows the
minimum absolute difference of the two groups.
3. The minimum absolute difference value is normalized into the same range as the
input pixel data. If you select the Motion bleed algorithm, the function compares
the motion value with a recorded motion value for the same location in the
previous frame. If it is greater, the function keeps the new value; if the new value is
less than the stored value, the function uses the motion value that is the mean of
the two values. This action reduces unpleasant flickering artefacts but increases
the memory usage and memory bandwidth requirements.
4. Two pixels are selected for interpolation by examining the 3×3 group of pixels
from the more recent two fields for edges. If the function detects a diagonal edge,
the function selects two pixels from the current field that lie on the diagonal,
otherwise the function chooses the pixels directly above and below the output
pixel.
1 The 4:2:2 compatibility mode prevents incorrect interpolation of the chroma
samples along the diagonal edges.
5. The function uses a weighted mean of the interpolation pixels to calculate the
output pixel and the equivalent to the output pixel in the previous field with the
following equation:
Figure 15–2. Pixel Collection for the Motion-Adaptive Algorithm
Figure 15–3. Pixel Assembly for the Motion-Adaptive Algorithm
Current Field (C)
C - 1
C - 2
C - 3
X
Previous Frame
Current Frame
Motion = MAD
,