User guide

Table Of Contents
Chapter 4: 2D FIR Filter MegaCore Function 4–5
Signals
January 2013 Altera Corporation Video and Image Processing Suite
User Guide
Signals
Table 45 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.