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

Chapter 15: Deinterlacer MegaCore Function 15–3
Functional Description
January 2013 Altera Corporation Video and Image Processing Suite
User Guide
Output frames are produced by filling in the missing lines from the current field with
the linear interpolation of the lines above and below them. At the top of an F1 field or
the bottom of an F0 field there is only one line available so it is just duplicated. The
function only uses the current field, therefore if the output frame rate is the same as
the input frame rate, the function discards half of the input fields.
Weave
Weave deinterlacing creates an output frame by filling all of the missing lines in the
current field with lines from the previous field. This option gives good results for still
parts of an image but unpleasant artefacts in moving parts.
The weave algorithm requires external memory, so either double or triple-buffering
must be selected. This makes it significantly more expensive in logic elements and
external RAM bandwidth than either of the bob algorithms, if external buffering is not
otherwise required.
The results of the weave algorithm can sometimes be perfect, in the instance where
pairs of interlaced fields have been created from original progressive frames. Weave
simply stitches the frames back together and the results are the same as the original,
as long as output frame rate equal to input frame rate is selected and the correct pairs
of fields are put together. Usually progressive sources split each frame into a pair
consisting of an F0 field followed by an F1 field, so selecting F1 to be the current field
often yields the best results.
Motion-Adaptive
The Deinterlacer MegaCore function provides a simple motion-adaptive algorithm.
This is the most sophisticated of the algorithms provided but also the most expensive,
both in terms of logic area and external memory bandwidth requirement.
This algorithm avoids the weaknesses of bob and weave algorithms by using a form
of bob deinterlacing for moving areas of the image and weave style deinterlacing for
still areas.
1 If the input is 4:2:2 Y’CbCr subsampled data, the compatibility mode for 4:2:2 data
must be enabled to prevent the motion adaptive algorithm from introducing chroma
artefacts when using bob deinterlacing for moving regions.
Use the Motion bleed algorithm to prevent the motion value from falling too fast at a
specific pixel position. If the motion computed from the current and the previous
pixels is higher than the stored motion value, the stored motion value is irrelevant and
the function uses the computed motion in the blending algorithm, which becomes the
next stored motion value. However, if the computed motion value is lower than the
stored motion value, the following actions occur:
■ The blending algorithm uses the stored motion value
■ The next stored motion value is an average of the computed motion and of the
stored motion
This computed motion means that the motion that the blending algorithm uses climbs
up immediately, but takes about four or five frames to stabilize.