User manual

RC200/203 Manual
www.celoxica.com Page 60
5.12.5 Reading a pair of RGB pixels
extern macro proc RC200VideoInReadPixelPairRGB (XPtr, YPtr, LeftRGBPtr,
RightRGBPtr);
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
isible
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);