Galileo Video Technical Report
- Galileo Video Technical Report
- Section 1 Product Overview
- 1.1 Product Features
- 1.2 Physical Characteristics
- Section 2 How to Use Galileo Video
- 2.1 Analog Video
- 2.1.1 Input
- 2.1.2 Output
- 2.2 Digital Video
- 2.3 Video Overlay, Underlay and Blending
- Section 3 Hardware Features
- 3.1 System Architecture
- 3.2 Analog Input
- 3.3 Analog Output
- 3.4 SGI Digital Video Expansion Port
- 3.5 Galileo 601 Video
- 3.6 Scan Conversion
- 3.6.1 Digitized Video to Graphics
- 3.6.2 Graphics to Digitized Video
- 3.7 Frame Synchronization
- 3.8 Access to the CPU
- 3.9 Color Space Conversion
- 3.10 Video Crosspoint
- 3.11 Keys
- 3.12 Alpha Blending
- 4.1 Video Library
- 4.2 Video Tools
- 4.3 Video Daemon
- 4.4 Kernel
- 4.5 X Window System Server
Section 1 Product Overview
Galileo Video is a video option for the Iris Indigo, XS, XS24, XS24Z, XZ, Elan and Indigo2 desktop workstations. It provides cost-effective, high-quality video input and output in NTSC and PAL timings.
1.1 Product Features
- Galileo Video has these features:
- Video stream in the Galileo Video system is 4:2:2 YUV (Y, B-Y, R-Y) in 24-bit resolution (8 bits per component)
- Full-size video windows in NTSC (640 x 486) and PAL (768 x 576) formats
- Alpha blending of video and graphics in real time at rates as high as 60 fields/second
- Video-to-graphics conversion with anti-aliasing:
- - - Thirteen zoomed and decimated sizes (1/7 to 1:1 to 7:1)
- - - Pan
- - - Selectable de-interlace filtering
- Computer-generated graphics filtered to NTSC and PAL video:
- - - Anti-aliasing
- - - Selectable flicker reduction
- - - Output may be NTSC- and PAL-sized or nearly full-screen
- Keys generated from chroma/luma of the video signal or from pixels in graphics window
- X-Y pixel-wipes and fades generated in real time
- Two 24-bit-resolution non-overlapping video windows, or one 24-bit-resolution and two 12-bit-resolution non-overlapping video windows on screen simultaneously
- Frame buffer for synchronizing video signals, storage of video frames, or transfer of still images to the workstation
- Crosspoint switch selects input for major board components
- Analog input in composite, S-VHS or 3-wire YUV (Y, B-Y, R-Y)
- Analog output in composite, S-VHS, RGB, or YUV plus sync
- Analog output genlocks to video input or to external black burst (house reference)
- Digital input and output is available at a digital expansion port; output can be looped and used as input
1.2 Physical Characteristics
Galileo Video is a video option card. It occupies the space allotted to one slot in the Indigo2 workstation chassis; in the Indigo chassis, both GIO slots remain available. The board uses Philips television components and two custom Silicon Graphics gate-arrays. Galileo Video also includes an analog breakout box which provides the input and output connectors for Galileo.
Section 2 How to Use Galileo Video
With the Galileo Video expansion board, Indigo family workstations can provide basic video input/output and special effects. A graphics application can input analog and digital video, convert any graphic image to video, create video keys and special effects within the application, and output the results as analog or digital video.
2.1 Analog Video
The Galileo Video board supports composite, Y/C and Y/R-Y/B-Y analog input. The video is converted to 24-bit RGB and displayed in graphics windows on workstation monitors. The video may be displayed in the windows in full NTSC or PAL sizes or scaled down; it may be zoomed and panned, as well. The input may also be used for video timing within the Galileo Video system. Video display does not affect workstation performance, since the Galileo Video board performs all input and scaling and the video is passed to the workstation's graphics subsystem over a dedicated video bus.
Galileo Video can output composite, Y/C (S-VHS), Y/R-Y/B-Y and RGB with sync in NTSC and PAL timings. With the 601 option you get simultaneous serial and parallel outputs in 525 or 625 timing. Almost all of the full graphics screen (1280x960) or an NTSC- or PAL-sized portion of it may be output in real time. The output is taken from the graphics subsystem frame buffer and scan converted with flicker reduction and filtering. The outputting and scan converting are performed by the video board, so they place no additional demands on the workstation CPU or graphics subsystem.
All output signals are low-pass-filtered and sin x/x-corrected. The board has a notch filter that an application may select as needed. It reduces the cross-chroma artifacts created when dithered graphics images are encoded to composite video. Applications may use the board as a frame buffer to record single frames to a frame-accurate VTR.
2.2 Digital Video
4:2:2 YUV digital video may be input and output at the digital expansion port (see Section 3.4). Applications should use the port for I/O to a compression/decompression board, for reading and writing to digital video devices (such as storage media), and for other workstation I/O. The port has two channels; one is used only for input and one may be configured for input or output. Silicon Graphics sells two devices which take advantage of this port: the 601 option which provides two channels of CCIR 601 digital video I/O (see Section 3.5) and the Cosmo Compress JPEG compression/decompression option (see the Cosmo Compress Technical Report).
2.3 Video Overlay, Underlay and Blending
Video and graphics may be combined in simple mixes, such as fades, wipes and louvers, or by keying. An application can generate a chroma and luma key from the live video input and underlay, overlay or blend the key with a live graphics image, or generate the key from the graphics image and underlay, overlay or blend it with the video input.
Section 3 Hardware Features
3.1 System Architecture
3.2 Analog Input
Galileo Video has one analog input which is decoded by a Philips decoder. The Philips 7151 decoder is used if CCIR 601 timing is selected and the Philips 7191 decoder is used if square pixel timing is selected. The video is decoded into YUV components at the sampling rates.
The component input is converted to digital by a Phillips analog-to-digital converter and then passed through a simple digital low pass filter.
3.3 Analog Output
Galileo video has one analog output channel:
The digital expansion port supports two channels of real time, digital video data. One 60-pin connector supports both channels. One channel is for input only; the other channel is programmable for input or output. Data in the port is sampled as CCIR 601 or square-pixel 4:2:2 YUV with 8-bit quantization:
Galileo Video with 601 adds 2 independent CCIR 601 digital video channels to the analog I/O available on Galileo. A separate break out box connects to Galileo's Digital expansion port to provide:
Galileo Video with 601 provides a total of four video I/O channels (2 digital and 2 analog), which can be manipulated simultaneously in two different configurations.
3.6 Scan Conversion
Galileo maintains all data as 4:2:2 YUV. The only time this YUV data is converted to RGB is for display on the graphics screen or for the analog RGB output. All graphics data brought from the screen into Galileo is directly converted from RGB to 4:2:2 YUV. See Section 3.9, Color Space Conversion for more information.
3.6.1 Digitized Video to Graphics
After the analog video input has been digitized and/or processed, it may be converted to a graphics image and displayed on a workstation monitor.
Digitized video is converted to graphics in a dedicated frame buffer. Note this frame buffer is not shown on the block diagram. It resides in the scan converter block and is not shown because it is not accessible by applications or end users. The buffer may be displayed at full 24-bit resolution (8 bits per component) or split into two half-resolution, 12-bit planes (4 bits per component). All three windows (one 24-bit and two 12-bit) may be displayed at the same time, or two 24-bit windows may be displayed.
Although the video may be displayed on the graphics screen at 12-bit resolution all 24 bits of data are available to Galileo and the system. Note the following restrictions apply to all video windows:
3.6.2 Graphics to Digitized Video
The graphics screen may be converted to video in 1x or full screen mode:
Flicker reduction, which is selectable, is performed during the vertical filtering.
3.7 Frame Synchronization
Galileo Video uses a dedicated buffer for frame synchronization; the buffer may also be used for storing still images. The buffers store video fields in the internal 4:2:2 YUV format, 8 bits per component. They can input and output synchronized video to and from the functional units listed in and to the workstation CPU.
3.8 Access to the CPU
4:2:2 YUV data must be used for reads and writes between the Galileo frame buffer and the CPU. The video from the Galileo frame buffer may be full resolution frames or decimated by factors of 2 and 4. Vertical blanking information may be obtained without disturbing the video stream. When writing data from the CPU to the Galileo frame buffer data must be full resolution frames.
3.9 Color Space Conversion
Data is color space-converted during graphics-to-video and video-to-graphics conversions, but not during video input and output or reads and writes to the field buffers. Because of the 4:2:2 format of the video, the U and V components are sub-sampled during interpolation and decimation (every other pixel is converted, instead of every pixel). The sub-sampling causes aliasing artifacts which Galileo Video removes with anti-aliasing filtering.
3.10 Video Crosspoint
The crosspoint/switch matrix allows the following sources to be connect to any of the following destinations:
Source Analog video in Digital Destination Analog Video out Digital video in 1 Digital video in 2 Host Video out Host memory (frame buffer memory (frame buffer output) Alpha input) Alpha blender foreground blender pixels Alpha blender alpha (pixels) Alpha blender background Graphics A (24-bit resolution) (pixels + alpha) Graphics 1 (24-bit Graphics B (24-bit resolution) resolution) Graphics 2 (12-bit or 24-bit resolution) Graphics 3 (12-bit resolution)
Keys are created on a pixel-by-pixel basis. Galileo Video applies mathematical formulas to the Y and U-V values of each pixel in a selected portion of an image, producing an alpha value for that portion. It blends this value with the corresponding alpha of the remainder of the image:
Pixels may be chosen in three ways:
3.12 Alpha Blending
In a mix, the foreground and background each have an alpha value. The most common sources of the values are the key generator and the graphics display bus. The alpha blender uses the two values to composite the mix; it can generate the composite in 16 ways. Dedicated registers containing the YUV values of a flat field background may be used for fades to and from any color.
Note: For more information please refer to the Video Library Programmer's Guide.
Section 4 Software Features
Libraries insure that upgrades are compatible with current releases, that applications developed for one product can be ported easily to other products, and that functions provided by one library interface reliably and consistently with the functions of other libraries.
The software consists of the following:
The library provides an API that is common to all Silicon Graphics video products. Through the API, video applications developed for one Silicon Graphics product can be designed to run on all other Silicon Graphics products. Applications designed for a simpler product can be made to run on more complex products with little or no modifications; applications designed for more complex products can return error codes when they run on simpler products and calls are made to an unavailable parameter.
The basic model for the library is the video stream. Library routines manage the video stream by defining a source device, a destination device and the path between the two. Parameters called controls modify the path; all devices should recognize a subset of common controls.
Applications written to the square-pixel Video Library API will be able to access the other Silicon Graphics libraries, such as Compression Library and Graphics Library.
4.2 Video Tools
The tools, built from calls to Video Library, provide a range of basic functionalities, such as displaying video in a window, capturing video frames and outputting video. GUI control panels and a command-line interface set the device parameters.
To illustrate how to use the library, the source code for each tool and control panel is also provided.
The basic tools are outlined as follows:
- Use the video info tool to display information about video devices available through the VL, such as the name of the server, number of devices on the server, and the types and ID numbers of nodes, sources, and drains on each device.
- Use the video output tool to output video from a video-sized window or a nearly full-screen area of the graphics screen.
- Use the video input window tool to view video-in-a-window.
- Use this tool to capture a single frame (the current video input) or a specified number of frames, depending on the hardware limits for burst capture, and write the data to disk on hardware that supports the video-to-memory path. Capture size can also be specified. The data can be color space converted or left as raw data, which can be used by the memtovid tool. memtovid Use this tool to output single frames (images) to video out on hardware that supports the memory-to-video path.
- videopanel (vcp)
- Use this graphical user interface to set controls, such as hue or contrast, on devices. The panel resizes itself dynamically to reflect available video devices.
- Use this tool to send video input to video output. There are four optional parameters:
- -n devicenum The number of the video device to use.
- -v inputmodenum The number of the video input mode to use.
- -o outputnodenum The number of the video output node to use.
- -I Print the node and path numbers for use with the command line interface.
4.3 Video Daemon
All data passes through the video daemon except the digitized video. The daemon handles both device-dependent and device-independent tasks, such as multiple device management, client access to other devices, event dispatch, and system configuration and device state information.
The daemon communicates with the Galileo Video board through a device driver located in the IRIX kernel. The device driver is responsible for translating requests from the daemon into requests that can be understood by the hardware.
4.5 X Window System Server
The window system server is responsible for window positioning, loading color map tables and clipping the graphics screen around the video.