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–6 Chapter 15: Deinterlacer MegaCore Function
Functional Description
Video and Image Processing Suite January 2013 Altera Corporation
User Guide
When triple-buffering is in use, external RAM usually uses three frame buffers. The
function uses four frame buffers when you select the motion-adaptive algorithm. At
any time, one buffer is in use by the input and one (two for the motion adaptive case)
is (are) in use by the output in the same way as the double-buffering case. The last
frame buffer is spare.
This configuration allows the input and output sides to swap asynchronously. When
the input finishes, it swaps with the spare frame if the spare frame contains data that
the output frame uses. Otherwise the function drops the frame which you have just
wrote and the function writes a fresh frame over the dropped frame.
When the output finishes, it also swaps with the spare frame and continues if the
spare frame contains fresh data from the input side. Otherwise it does not swap and
just repeats the last frame.
Triple-buffering allows simple frame rate conversion. For example, suppose you
connect the Deinterlacer’s input to a HDTV video stream in 1080i60 format and
connect its output i to a 1080p50 monitor. The input has 60 interlaced fields per
second, but the output tries to pull 50 progressive frames per second.
If you configure the Deinterlacer to output one frame for each input field, it produces
60 frames of output per second. If you enable triple-buffering, on average the function
drops one frame in six so that it produces 50 frames per second. If you chose one
frame output for every pair of fields input, the Deinterlacer produces 30 frames per
second output and triple-buffering leads to the function repeating two out of every
three frames on average.
When you select double or triple-buffering the Deinterlacer has two or more Avalon-
MM master ports. These must be connected to an external memory with enough space
for all of the frame buffers required. The amount of space varies depending on the
type of buffering and algorithm selected. An estimate of the required memory is
shown in the Deinterlacer parameter editor.
If the external memory in your system runs at a different clock rate to the Deinterlacer
MegaCore function, you can turn on an option to use a separate clock for the Avalon-
MM master interfaces and use the memory clock to drive these interfaces.
To prevent memory read and write bursts from being spread across two adjacent
memory rows, you can turn on an option to align the initial address of each read and
write burst to a multiple of the burst target used for the read and write masters (or the
maximum of the read and write burst targets if using different values). Turning on
this option may have a negative impact on memory usage but increases memory
efficiency.
Frame Rate Conversion
When you select triple-buffering, the decision to drop and repeat frames is based on
the status of the spare buffer. Because the input and output sides are not tightly
synchronized, the behavior of the Deinterlacer is not completely deterministic and can
be affected by the burstiness of the data in the video system. This may cause
undesirable glitches or jerky motion in the video output.