User guide

Table Of Contents
Chapter 21: Scaler MegaCore Function 21–9
Functional Description
January 2013 Altera Corporation Video and Image Processing Suite
User Guide
Table 211 summarizes some recommended values for parameters when using the
Scaler in polyphase mode.
Avalon-ST Video Protocol Parameters
The Scaler MegaCore function can process streams of pixel data of the types listed in
Table 212.
Stall Behavior and Error Recovery
In the Scaler MegaCore function, the ratio of reads to writes is proportional to the
scaling ratio and occurs on both a per-pixel and a per-line basis. The frequency of lines
where reads and writes occur is proportional to the vertical scaling ratio. For example,
scaling up vertically by a factor of 2 results in the input being stalled every other line
for the length of time it takes to write one line of output; scaling down vertically by a
factor of 2 results in the output being stalled every other line for the length of time it
takes to read one line of input.
In a line that has both input and output active, the ratio of reads and writes is
proportional to the horizontal scaling ratio. For example, scaling from 64×64 to
128×128 causes 128 lines of output, where only 64 of these lines have any reads in
them. For each of these 64 lines, there are two writes to every read.
The internal latency of the Scaler depends on the scaling algorithm and whether any
run time control is enabled. The scaling algorithm impacts stalling as follows:
In nearest-neighbor mode, the delay from input to output is just a few clock cycles.
Table 21–1. Recommended Parameters for the Scaler MegaCore Function
Scaling Problem Taps Phases Precision Coefficients
Scaling up with any input/output resolution 4 16 Signed, 1 integer bit, 7 fraction bits
Lanczos-2, or
Bicubic
Scaling down from M pixels to N pixels 16 Signed, 1 integer bit, 7 fraction bits Lanczos-2
Scaling down from M pixels to N pixels
(lower quality)
16 Signed, 1 integer bit, 7 fraction bits Lanczos-1
M 4
N
--------------
M 2
N
--------------
Table 21–2. Scaler Avalon-ST Video Protocol Parameters
Parameter Value
Frame Width
Maximum frame width is specified in the parameter editor, the actual value is read from control
packets.
Frame Height
Maximum frame height is specified in the parameter editor, the actual value is read from control
packets.
Interlaced /
Progressive
Progressive.
Bits per Color Sample Number of bits per color sample selected in the parameter editor.
Color Pattern
One, two or three channels in sequence or in parallel as selected in the parameter
editor. For example, if three channels in sequence is selected where , and,
can be any color plane:
γβα