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 21: Scaler MegaCore Function 21–7
Functional Description
January 2013 Altera Corporation Video and Image Processing Suite
User Guide
1 The two lobes refer to the number of times the function changes direction on each side
of the central maxima, including the maxima itself.
The class of Lanczos N functions is defined as:
As can be seen in the figure, phase 0 centers the function over tap 1 on the x-axis. By
the equation above, this is the central tap of the filter. Further phases move the mid-
point of the function in 1/P
v
increments towards tap 2. The filtering coefficients
applied in a 4-tap scaler for a particular phase are samples of where the function with
that phase crosses 0, 1, 2, 3 on the x-axis. The preset filtering functions are always
spread over the number of taps given. For example, Lanczos 2 is defined over the
range –2 to +2, but with 8 taps the coefficients are shifted and spread to cover 0 to 7.
Compile-time custom coefficients are loaded from a CSV file. One CSV file is specified
for vertical coefficients and one for horizontal coefficients. For N taps and P phases,
the file must contain N × P values. The values must be listed as N taps in order for
phase 0, N taps for phase 1, up to the Nth tap of the Pth phase. You are not required to
present these values with each phase on a separate line.
The values must be pre-quantized in the range implied by the number of integer,
fraction and sign bits specified in the parameter editor, and have their fraction part
multiplied out. The sum of any two coefficients in the same phase must also be in the
declared range. For example, if there is 1 integer bit, 7 fraction bits, and a sign bit, each
value and the sum of any two values must be in the range [–256, 255] representing the
range [-2, 1.9921875].
Figure 21–2. Lanczos 2 Function at Various Phases
LanczosN x
1
0
xsin
x
--------------------
xNsin
xN
----------------------------
=
x 0=
x 0 xN
xN
0123
−0.2
0
0.2
0.4
0.6
0.8
1
1.2
phase(0)
phase(P
v
/2)
phase(P
v
−1)