Please consider a donation to the Higher Intellect project. See https://preterhuman.net/donate.php or the Donate to Higher Intellect page for more info.

Galileo Video Technical Report

From Higher Intellect Vintage Wiki
Jump to navigation Jump to search
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

2.1.1 Input
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.

2.1.2 Output
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:

  • Composite and S-VHS analog output is converted from 4:2:2 YUV by a Philips 7199 encoder and reconstructed with a 5-MHz low-pass filter and sin x/x correction.
  • 4:2:2 YUV is converted to analog by a Philips digital-to-analog converter and reconstructed with a 5-MHz low-pass filter and sin x/x correction.
  • RGB is converted from 4:2:2 YUV to digital RGB then converted to analog by a Philips digital-to-analog converter and reconstructed with a 5-MHz low-pass filter and sin x/x correction. 3.4 SGI Digital Video Expansion Port
    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:
  • CCIR 601 video is fully compliant with that standard.
  • Square-pixel video adheres to the CCIR 601 and CCIR 656 standards with two exceptions: the number of clocks during blanking is nonstandard, and the active pixel area is modified to accommodate the square-pixel sampling formats. For square-pixel sampling of the video, the clock is twice the pixel rate: 24.54545 MHz for NTSC and 29.5 MHz for PAL. For CCIR 601 sampling, there is a slight (~10 percent) scaling of the image in the horizontal dimension. The scaling is proportional to the ratio of the square-pixel clock rate and 13.5 MHz. Applications can use Graphics Library routines to correct for the scaling. 3.5 Galileo 601 Video
    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:
  • 8 bit per component CCIR 601 serial and parallel digital video I/O Note: Galileo 601 accepts 10 bit per component CCIR 601 video and then rounds the data to 8 bits. There is no signal degradation with repeated generations through the system.
  • One component digital video input channel
  • One component digital channel, configurable as input or output-the second digital channel feeds the analog component (RGB or Y/R-Y/B-Y) output There are two option from Silicon Graphics that utilize this port: the Galileo 601 option for serial and parallel CCIR 601 I/O, and the Cosmo Compress JPEG compression/decompression option.

    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:

  • Video windows cannot overlap and a 24-bit window cannot share the same horizontal scan line on the graphics screen as another 12-bit window or 24-bit window.
  • The graphics screen is 1280x1024 pixels, so only one full size PAL window can fit on the graphics screen at a time. Windows can be reduced in size to fit on the screen. Regardless of resolution, video in graphics windows may be reduced, zoomed and panned: <menu>
  • Each window may be reduced by six factors, from 1/2 to 1/7. To minimize aliasing, the data is filtered with a box filter before it is decimated. Note both 12-bit resolution windows must be decimated by the same factor.
  • Each window may be zoomed by any integer factor from 2 to 7. Galileo Video creates the zooms by building a square array of replica pixels around each pixel in the source video.
  • Each window may be panned to any location in the source image. For de-interlacing, Galileo Video uses a selectable de-interlacing filter that replaces the missing lines in each field with black lines, or it uses the average value of the two immediately-adjacent lines. Inserting black lines reduces the intensity of the image by one-half.

    3.6.2 Graphics to Digitized Video
    The graphics screen may be converted to video in 1x or full screen mode:

  • In 1x mode, a full NTSC- or PAL-sized image is converted.
  • In full screen mode, a 1280x960 portion of the 1280x1024 graphics screen is converted. 1280x960 is an image twice the size of an NTSC image, or 5/3 the size of a PAL image.
  • Everything that appears on the graphics screen is converted, including cursors, pop-up menus, dialog boxes, and so on, but a graphics application can turn off these events as needed. An application may convert the graphics pixel-by-pixel or line-by-line:
  • Pixel-by-pixel conversion, in which each graphics pixel is converted to a video pixel, should be used for images up to the size of the video format. The data passes through a flicker-reduction filter during the conversion. Galileo Video stores the filtered data in the scan converter's dedicated frame buffer, from which the data may be read at a rate determined by the video timing.
  • Line-by-line conversion is used for images that are larger than the video format. Galileo Video reduces aliasing by filtering each line of the graphics data horizontally, first, then vertically. The filtering also minimizes artifacts produced during decimation.

    Flicker reduction, which is selectable, is performed during the vertical filtering.

  • Two separate areas of the graphics screen may be converted to video simultaneously if they do not share horizontal lines. Galileo Video uses four field buffers for scan rate conversion of two channels of video. The phase relationship between graphics and video vertical intervals is monitored to determine when fields should be skipped or replaced. A digital phase detector determines when graphics frames must be dropped. Galileo Video passes status information about the dropped frames to the workstation CPU, allowing applications to render motion in the video image more smoothly. Genlocking the graphics frame rates to the video also smooths out the motion.

    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)                             
    

    3.11 Keys

    Galileo Video generates linear, 8-bit keys and passes the 8-bit values to the alpha blender for mixing (see Section 3.12). Changes and updates to the keys are double-buffered during vertical blanking.

    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:

  • Whole image
  • X-Y location in the image
  • Random (pixels chosen by a random numbers generator) Note: For more information please refer to the Video Library Programmer's Guide.

    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

    Software for Galileo Video follows Silicon Graphics successful strategy of providing common functionalities in a library of device-dependent and device-independent routines addressed through an API. This software is included in the Digital Media Development Kit.

    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:

  • Video Library (available through the Digital Media Development Option)
  • Video tools
  • Video daemon
  • Kernel (device driver)
  • X window system server 4.1 Video Library
    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:

    vlinfo
    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.
    videoout
    Use the video output tool to output video from a video-sized window or a nearly full-screen area of the graphics screen.
    videoin
    Use the video input window tool to view video-in-a-window.
    vidtomem
    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.
    vintovout
    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.
    The tools vlinfo, vidtomem, and memtovid are command line tools. In addition to their man pages, these tools are explained in the IRIS Utilities Guide.

    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.

    4.4 Kernel
    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.

    See Also