User guide
Table Of Contents
- Contents
- 1. About This MegaCore Function Suite
- Release Information
- Device Family Support
- Features
- Design Example
- Performance and Resource Utilization
- 2D FIR Filter
- 2D Median Filter
- Alpha Blending Mixer
- Avalon-ST Video Monitor
- Chroma Resampler
- Clipper
- Clocked Video Input
- Clocked Video Output
- Color Plane Sequencer
- Color Space Converter
- Control Synchronizer
- Deinterlacer
- Deinterlacer II
- Frame Buffer
- Gamma Corrector
- Interlacer
- Scaler
- Scaler II
- Switch
- Test Pattern Generator
- Trace System
- 2. Getting Started with Altera IP Cores
- 3. Interfaces
- Interface Types
- Avalon-ST Video Protocol
- Avalon-MM Slave Interfaces
- Avalon-MM Master Interfaces
- Buffering of Non-Image Data Packets in Memory
- 4. 2D FIR Filter MegaCore Function
- 5. 2D Median Filter MegaCore Function
- 6. Alpha Blending MegaCore Function
- 7. Avalon-ST Video Monitor MegaCore Function
- 8. Chroma Resampler MegaCore Function
- 9. Clipper MegaCore Function
- 10. Clocked Video Input MegaCore Function
- 11. Clocked Video Output MegaCore Function
- 12. Color Plane Sequencer MegaCore Function
- 13. Color Space Converter MegaCore Function
- 14. Control Synchronizer MegaCore Function
- 15. Deinterlacer MegaCore Function
- Core Overview
- Functional Description
- Parameter Settings
- Signals
- Control Register Maps
- 16. Deinterlacer II MegaCore Function
- 17. Frame Reader MegaCore Function
- 18. Frame Buffer MegaCore Function
- 19. Gamma Corrector MegaCore Function
- 20. Interlacer MegaCore Function
- 21. Scaler MegaCore Function
- 22. Scaler II MegaCore Function
- 23. Switch MegaCore Function
- 24. Test Pattern Generator MegaCore Function
- 25. Trace System MegaCore Function
- A. Avalon-ST Video Verification IP Suite
- B. Choosing the Correct Deinterlacer
- Additional Information

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
,