fg_lut_in(3) CLIX fg_lut_in(3)
NAME
fg_lut_in, fg_lut_out - Loads the lookup tables of a frame grabber
LIBRARY
Intergraph Device Library (libix.a)
SYNOPSIS
#include <sys/xio/xerr.h>
#include <sys/xio/xfg.h>
int fg_lut_in(
int fgno ,
char table[] ,
int color );
int fg_lut_out(
int fgno ,
char table[] ,
int color ,
int mode );
PARAMETERS
fgno The frame grabber location on the Shared Resource (SR) Bus.
table A pointer to 256 bytes of data
color An integer representing a color
mode A pointer to an integer representing the size of the table
DESCRIPTION
The fg_lut_in() function loads one or all of the three input lookup tables
that translate 8-bit data between the analog-to-digital converters and the
frame buffers. The table parameter is a pointer to 256 bytes of data to
be loaded into the input lookup tables. The data is loaded into the red,
green, or blue lookup table by assigning color to FG_RED, FG_GREEN, or
FG_BLUE. If color is assigned FG_ALL, the same data is loaded into all
three lookup tables.
The fg_lut_out() function works similarly to fg_lut_in(), controlling the
output lookup tables that translate the data between the frame buffers and
the digital-to-analog converters. The output lookup tables differ from
the input lookup tables in that four extra bits of information go into
each output lookup table. The following figure shows the generated
address for the output lookup tables:
2/94 - Intergraph Corporation 1
fg_lut_in(3) CLIX fg_lut_in(3)
________________________________________________________
| 11 | 10 | 9 | 8 | 7 | . . . | 0 |
|________________|_________________|____________________|
| Y ADDRESS | X ADDRESS | |
| (LSB 2 BITS) | (LSB 2 BITS) | RASTER DATA |
|________________|_________________|____________________|
The extra bits represent the least significant two bits of the X and Y
positions for the pixel location being sent through the lookup tables.
These extra four address lines are useful when the lookup tables loaded
with a dither mapping are accessed. The total usable entries in the
lookup table in this mode are 4K. The mode indicates if table contains 4K
or 256 bytes. If mode is nonzero, the full 4K is written to the output
lookup tables. If mode is zero, table is assumed to be 256 bytes and is
replicated in the output lookup table so that the four position bits are
treated as ``don't cares.''
The fgno parameter specifies the frame grabber location on the Shared
Resource (SR) Bus. The frame grabber in the lowest SR Bus slot will be
addressed by 0.
CAUTIONS
The output lookup table may be partially loaded if an error occurs when
the user's table is read.
RETURN VALUES
Upon successful completion, a value of 0 is returned. Otherwise, one of
the following failure codes is returned.
ERRORS
The fg_lut_in() and fg_lut_out() functions will fail if one of the
following is true:
[XIO_FAILURE]
The system does not contain the driver needed to support this
request.
[FG_NOT_OWNER]
The specified frame grabber was not allocated by the calling
process.
[FG_INVALID_LUT]
The color given is not a valid lookup table specifier.
[BAD_DATA_BUFFER_ADDRESS]
The table parameter points to an invalid memory address.
2 Intergraph Corporation - 2/94