
Philips Semiconductors
Image Co-Processor
File: icp.fm5, modified 7/26/99
PRELIMINARY INFORMATION
13-25
The input and output addresses are the byte addresses
of their respective tables. The output address needs to
be 64-byte aligned.
The input and output line offsets define the difference in
bytes from the address of the first pixel in the first line to
the address of the first pixel in the second line for their re-
spective blocks. The line offset must be constant for all
lines in each table. The line offset allows some space be-
tween the end of one line and the start of the next line. It
also allows the ICP to scale and filter a subset of an ex-
isting image, such as magnifying a portion of an image.
Offset values are 16-bit, two’s complement integer val-
ues.
Vertical filtering has a restriction on input and output line
offset values: they must be positive, and they must be
multiples of 64. Note that this only applies to the line-to-
line spacing. Even with this restriction, input images may
be any height and any width and may start at any byte
address. Also, image subsets of arbitrary height and
width can be used. As long as the original image has a
line offset which is a multiple of 64, all subsets of that im-
age will also automatically have a line offset, which is a
multiple of 64 - the same as the original image. All imag-
es should have line offsets which are multiples of 64 as
good programming practice, even though this restriction
only applies to vertical filtering. If an image does not have
a multiple of 64 line offset, it can be converted to that by
using horizontal filtering in the image block move mode
with the output offset value being a multiple of 64.
The input and output image height and width values are
the height in lines and width in pixels per line for their re-
spective images. The height and width are 16-bit positive
binary numbers between 0 and 64K-1.
The Integer increment and Fraction increment values are
the scaling parameters. The Integer value is a 16-bit in-
teger, and the Fraction value is a positive binary fraction
between 0 and 0.99999+. For up scaling (output image
bigger), the increment value is the inverse of the scaling
value. If you are upscaling by a factor of 2.5, the incre-
ment value will be the inverse of 2.50 = 0.40. The Integer
increment value will be 0 and the Fraction increment val-
ue will be 0.40. For down scaling, the increment value is
equal to the scaling value. If you are down scaling by 2.5
(output image smaller), the Integer increment value will
be 2, and the Fraction increment value will be 0.500.
To perform scaling, the Integer and Fractional increment
values must be generated and placed in the parameter
table. The simplest way to generate these values in com-
mon computer languages such as C is as follows:
1. Generate the Increment Value as a oating point
number = Input Height / Output Height
2. Multiply the Increment Value by 65536
3. Convert the result to a Long Integer (32 bits). The up-
per 16 bits of the Long integer will be the Integer in-
crement value, and the lower 16 bits will be the Frac-
tional value.
4. Store the 32-bit Long integer in the parameter table as
the combined Integer and Fractional increment val-
ues.
The Start Fraction defines the starting value in the scal-
ing counter for each line. It is a 16-bit, two’s complement
fractional value between -0.500 and 0.49999+. This val-
ue is placed in the The Start Fraction allows the input
data to be offset by up to half a line, referred to the input
pixel grid. It is set to zero for all conventional YUV input
data.
13.6.9.3
Control Word Format
The Control word provides bit fields which affect the ver-
tical filtering operation. The format of the Control word is
as follows.
Bit
Name
Function
15
Bypass
Bypass lter. Picks nearest input line
and passes it to output unltered.
When Bypass is set & scale factor is
1.0, this results in an image block
move
The Bypass bit causes the data to bypass the 5-tap filter.
The scaling operation selects the center line, and this
line is passed to the filter output. No filtering or interpola-
tion is provided. If the scaling factor is 1.0, the result is an
image block move where the image is moved from one
part of SDRAM to another without modification. If the
scaling factor is other than 1.0, the effective algorithm is
line picking, where the input line nearest the output line
location is used as the output line.
13.6.10 Horizontal Filter with RGB/YUV
Conversion to PCI or SDRAM
This routine moves an N x M image in YUV 4:2:2, YUV
4:2:0 or YUV 4:1:1 format from SDRAM to the PCI bus or
to SDRAM. The image is scaled and filtered in the hori-
Fraction increment
Integer increment
Increment value for U = 1/scale factor
Input Image Height
Input Image Width
Height and width in input lines and pixels
Output Image Start Address
Start address of X0Y0 (byte address)
Control
Output Image
Line Offset
Control Word; Line offset from X0Y0 to X0Y1
Output Image Height
Output Image Width
Height and width in output lines and pixels
Figure 13-19. Vertical Filter Parameter Table
Parameter Word
Description
Upper 2 bytes
Lower 2 bytes