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 4: 2D FIR Filter MegaCore Function 4–5
Signals
January 2013 Altera Corporation Video and Image Processing Suite
User Guide
Signals
Table 4–5 lists the input and output signals for the 2D FIR Filter MegaCore function.
Table 4–4. 2D FIR Filter Parameter Settings Tab, Coefficients Page
Parameter Value Description
Filter size
(1)
3x3, 5x5, 7x7 Choose the size in pixels of the convolution kernel used in the filtering.
Run-time controlled On or Off Turn on to enable run-time control of the coefficient values.
Coefficient set
(2)
Simple Smoothing,
Simple Sharpening,
Custom
You can choose a predefined set of simple smoothing or simple sharpening
coefficients which are used for color model convolution at compile time.
Alternatively, you can create your own custom set of coefficients by modifying
the coefficients in the matrix.
Enable symmetric
mode
On or Off
When on, the 3×3 coefficient matrix must be symmetrical, which enables
optimization in the hardware reducing the number of multiplications required.
In this mode a limited number of matrix cells are editable and the remaining
values are automatically inferred. Symmetric mode is enabled for the
predefined coefficient sets but can be disabled when setting custom
coefficients. If you turn off this option while one of the predefined coefficient
sets is selected, its values are used as the defaults for a new custom set.
Coefficients
(2)
9, 25, or 49 fixed-
point values
Each coefficient is represented by a white box with a purple box underneath.
The value in the white box is the desired coefficient value, and is editable. The
value in the purple box is the actual coefficient value as determined by the
coefficient fixed point type specified. The purple boxes are not editable. You
can create a custom set of coefficients by specifying one fixed-point value for
each entry in the convolution kernel. The matrix size depends on the selected
filter size.
Coefficient Precision:
Signed
(3)
On or Off
Turn on if you want the fixed-point type that stores the coefficients to have a
sign bit.
Coefficient Precision:
Integer bits
(3)
0–35, Default = 0
Specifies the number of integer bits for the fixed-point type used to store the
coefficients.
Coefficient Precision:
Fraction bits
(3)
0–35, Default = 6
Specifies the number of fractional bits for the fixed point type used to store
the coefficients.
Notes to Table 4–4:
(1) The size of the coefficient grid changes to match the filter size when this option is changed.
(2) The values in the coefficient grid change when you select a different coefficient set.
(3) Editing these values change the actual coefficients and summands and the results values on the General page. Signed coefficients allow
negative values; increasing the integer bits increases the magnitude range; and increasing the fraction bits increases the precision.
Table 4–5. 2D FIR Filter Signals (Part 1 of 2)
Signal Direction Description
clock
In
The main system clock. The MegaCore function operates on the rising edge of the
clock
signal.
reset
In
The MegaCore function asynchronously resets when you assert
reset
. You must
deassert
reset
synchronously to the rising edge of the
clock
signal.
din_data
In
din
port Avalon-ST
data
bus. This bus enables the transfer of pixel data into the
MegaCore function.
din_endofpacket
In
din
port Avalon-ST
endofpacket
signal. This signal marks the end of an Avalon-
ST packet.