Hardware description
Parameters:
XPtr
: Pointer to an
lvalue
of type
unsigned 9
.
YPtr
: Pointer to an
lvalue
of type
unsigned 9
.
LeftRGBPtr
:
Pointer to an
lvalue
of type
unsigned 24
.
RightRGBPtr
: Pointer to an
lvalue
of type
unsigned 24
.
Timing:
1 or more clock cycles (read blocks until data is ready)
Description:
Reads a pair of RGB encoded pixels from the video input selected by
RC200VideoInSetInput()
. This form of input requires a colour space converter
which is built automatically. After the macro returns, (
*
XPtr
,
*
YPtr
) are the
coordinates of the most recently sampled pixel pair. The pair has the colour value
(
*
LeftRGBPtr
,
*
RightRGBPtr
). Each pixel pair is presented at most once,
(pixels can be missed if they are not read quickly enough), at a rate of 6.75 MHz
during the v
i
sible portion of the input video. The RGB data is formatted as follows:
(*LeftPtr or *RightPtr)[23:16] - Red value
(*LeftPtr or *RightPtr)[15: 8] - Green value
(*LeftPtr or *RightPtr)[ 7: 0] - Blue value
The chrominance and luminance values range from 0 to 255. The value in
XPtr
ranges from 0 to 718 (in 2-pixel increments) for an entire video line of 720 pixels.
The value returned in
YPtr
varies from 0 to the number of visible lines - 1: 0-575 for
PAL and 0-479 for NTSC.
5.12.6 Reading a single RGB pixel
extern macro proc RC200VideoInReadPixelRGB (
XPtr
,
YPtr
,
RGBPtr
);
Parameters:
XPtr
: Pointer to an
lvalue
of type
unsigned 9
.
YPtr
: Pointer to an
lvalue
of type
unsigned 9
.
RGBPtr
: Pointer to an
lvalue
of type
unsigned 24
.
Timing:
1 or more clock cycles (read blocks until data is ready).
Description:
Reads a single RGB encoded pixel from the video input selected by
RC200VideoInSetInput()
. This form of input requires a colour space converter
which is built automatically. After the macro returns,
(*
XPtr
,
*
YPtr
) are the
coordinates of the most recently sampled pixel, which has the colour value
(
*
RGBPtr
). Each pixel is presented at most once (pixels can be missed if they are
not read quickly enough), at a rate of 13.5 MHz
during the visible portion of the
input video. The RGB data is formatted as follows:
(*RGBPtr)[23:16] - Red value
(*RGBPtr)[15: 8] - Green value
(*RGBPtr)[ 7: 0] - Blue value
The chrominance and luminance values range from 0 to 255. The value in
XPtr
ranges from 0 to 719 for an entire video line of 720 pixels. The value returned in
YPtr
varies from 0 to the number of visible lines - 1: 0-575 for PAL and 0-479 for
NTSC.
www.celoxica.com
Page 53