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–3
Functional Description
January 2013 Altera Corporation Video and Image Processing Suite
User Guide
The sum is then weighted proportionally to these errors. Note that because the values
are measured from the top-left pixel, the weights for this pixel are one minus the error.
That is, in fixed-point precision: and
The sum is then:
Polyphase and Bicubic Algorithms
The polyphase and bicubic algorithms offer the best image quality, but use more
resources than the other modes of the scaler. They allow up scaling to be performed in
such a way as to preserve sharp edges, but without losing the smooth interpolation
effect on graduated areas.
For down scaling, a long polyphase filter can reduce aliasing effects.
The bicubic and polyphase algorithms use different mathematics to derive their filter
coefficients, but the implementation of the bicubic algorithm is just the polyphase
algorithm with four vertical and four horizontal taps. In the following discussion, all
comments relating to the polyphase algorithm are applicable to the bicubic algorithm
assuming 4×4 taps.
2
B
fh
err
i
–
2
B
fv
err
j
–
Oij
2
B
fv
B
fh
+
Fin
i
in
j
2
B
fh
err
i
–2
B
fv
err
j
–=
+ Fin
i
1 in
j
+err
i
2
B
fv
err
j
–
+ Fin
i
in
j
1+2
B
fh
err
i
–err
j
+ Fin
i
1 in
j
1++err
i
err
j