Previous chapter

Section 6 Indy Video


Section 6 Indy Video

Indy Video is a video option card for the Indy desktop workstations. It provides cost-effective, high-quality video input and output in both 525/60 and 625/50 video timings. Indy Video also provides onboard realtime keying and special effects mixing as well as realtime scan conversion of graphics output to video.

Note: Silicon Graphics also offers Cosmo Compress(tm), an option card providing compression and decompression of incoming and outgoing video to the CCITT/ISO JPEG standard. For information on Cosmo Compress, see the Silicon Studio Technical Report.

6.1 Product Features

Cosmo Compress has these features:

- Single-frame transfers to and from workstation host memory in 8-bit per component 4:2:2 YUV, 24-bit RGB
- Transfers of NTSC- or PAL-sized images, to and from video option card and peripherals via digital video port
- Incoming images from the SGI Digital Video port can be scaled by 2 or 4 before compressing (using decimation)
- Outgoing images sent to the SGI Digital Video port can be zoomed by 2 or 4 using pixel/line replication

6.2 Indy Video Features

Indy Video offers these features:

- Integer zoomed and decimated sizes (1/7 to 1:1 to 7:1)
- Pan (on pixel boundaries)
- Selectable de-interlace filtering
- Anti-aliasing
- Selectable flicker reduction
- Output may be video-sized (1:1) or nearly full-screen scan converted to video size

6.3 Physical Characteristics

Indy Video is a video expansion card. It occupies the space allotted to one GIO slot in the Indy chassis. The board uses Philips television components and two custom SGI gate-arrays.

6.4 How to Use Indy Video

With the video expansion card, the Indy workstation provides basic video input/output and graphics overlays at a low cost. An application can input analog video, convert any graphic image to video, create video keys and special effects within the application, and output the results as analog video.

6.4.1 Analog Video

Input
The Indy Video expansion card supports composite and Y/C analog input. The video is converted to 24-bit RGB for display on the workstation monitor. The video may be displayed in full size video windows or scaled down; it may be zoomed and panned, as well. The input may also be used for video timing within the Indy Video system. With both Indy Graphics and XZ Graphics, a video input can be used to frame lock the graphics subsystem.

Video display does not affect workstation performance, since the Indy Video card performs all input, scaling and switching between graphics pixels and video pixels in real time.

Output
Indy Video can output composite and Y/C (S-VHS) with sync in 525/60 and 625/50 timings.

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. This filtered scaling is set in the hardware to 2:1 for NTSC output and 5:3 for PAL output.

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.

6.4.2 Video Overlay and Blending

Video and graphics may be combined in simple mixes, such as fades, wipes and keys. An application can generate a chroma or luma key from either the video input or the input from the graphics subsystem and overlay the key over the other signal. Graphics and video can be set to any level of opacity and blended (or mixed) with the other signal.

The standard video inputs can be used as the source of the graphics subsystem input to the keyer/mixer circuitry on the Indy Video option card. Using the standard video input from the Indy Video option card allows keying and mixing of two composite or Y/C video channels.

6.5 Hardware Features

6.5.1 System Architecture

Figure 16 is a block diagram of Indy Video.

    FIGURE 16 Indy Video block diagram.

6.5.2 Analog Input

Indy Video has one analog input channel which is decoded by a Philips 7191 decoder. The video is decoded into YUV components at the sampling rates shown in Table 2 below.

---------------------------------------------------
YUV        525/60 Square Pixel  625/50 Square Pixel  
Component                                            
---------------------------------------------------
Y          12.2727 MHz          14.75 MHz            
U (B-Y)    6.13635 MHz          7.375 MHz            
V (R-Y)    6.13635 MHz          7.375 MHz            
                                                     
---------------------------------------------------
TABLE 2 Indy Video analog sampling rates.

6.5.3 Analog Output

Indy Video has one analog output channel in addition to the SGI digital output which supports the Cosmo Compress option.

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.

6.5.4 SGI Digital Video Expansion Port

The digital expansion port supports two channels of real time, SGI 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 square-pixel 4:2:2 YUV with 8-bits per channel:

6.5.5 Scan Conversion

Indy Video maintains all video 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 Indy is directly converted from RGB to 4:2:2 YUV. See Section 6.5.8 Color Space Conversion.

Digitized Video to Graphics
After the analog video input has been digitized and/or processed, it may be converted to RGB and displayed on a workstation monitor.

Digitized video is converted to RGB 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 workstation monitor at 12-bit resolution all 24 bits of data are available to Indy Video and the system. Note the following restrictions apply to all video windows:

Video in graphics windows may be reduced, zoomed and panned:

For de-interlacing, Indy Video uses a selectable de-interlacing filter that uses the average value of the two immediately-adjacent lines. Another option for custom applications is to use the filter to generate black lines for the missing field at every 60th (or 50th) of a second. Inserting black lines reduces the intensity of the image by one-half.

Graphics to Digitized Video
The graphics subsystem output may be converted to video in 1x or full screen modes:

An application may convert the graphics pixel-by-pixel or line-by-line:

Flicker reduction, which is selectable, is performed during the vertical filtering.
Indy 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. Indy Video passes status information about the dropped frames to the workstation CPU, allowing applications to render motion in the video image more smoothly.

Framelocking the graphics frame rates to input can be performed which allows for smooth graphics output to video without repeat or skip frames.

6.5.6 Frame Synchronization

Indy 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 and to the workstation CPU.

6.5.7 Access to the CPU

4:2:2 YUV data must be used for reads and writes between the Indy Video frame buffer and the CPU. The video from the frame buffer may be full resolution frames or decimated by factors of 2 and 4. Vertical blanking information may be obtained without disturbing the active video. When writing data from the CPU to the Indy Video frame buffer, data may be full resolution frames or 1/2 or 1/4 size (previously decimated) frames which can be zoomed to full resolution on Indy.

6.5.8 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 Indy Video removes with anti-aliasing filtering.

6.5.9 Video Crosspoint

The crosspoint/switch matrix allows the following sources to connect to any of the following destinations:

Source Destination

Analog video in Analog Video out

Digital video in 1 Digital Video out

Digital video in 2 Host memory (frame buffer input)

Host memory (frame buffer output) Alpha blender foreground

Alpha blender pixels Alpha blender background

Alpha blender alpha Graphics 1 (24-bit resolution)

Graphics A (24-bit resolution) Graphics 2 (12-bit or 24-bit resolution)

Graphics B (24-bit resolution) Graphics 3 (12-bit resolution)

6.6 Keys

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

Keys are created on a pixel-by-pixel basis. Indy 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:

Note: For more information please refer to the Video Library Programmer's Guide.

6.7 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.

6.8 Software Features

Software for Indy 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:

6.8.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(tm) and Graphics Library(tm).

6.8.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.

6.8.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.

6.8.4 Kernel

The daemon communicates with the Indy 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.

6.8.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.

6.9 Specifications

Table 3 lists Indy Video specifications.

---------------------------------------------------------------------------------------------------------------
Board Function      Specification                                Value                                           
Compatibility       Television standard                          NTSC                                            
                                                                 PAL                                             
Sampling            Square-pixel NTSC                            12.27 MHz, 640 pixels/line                      
                    Square-pixel PAL                             14.75 MHz, 768 pixels/line                      
                    4:2:2 YUV                                    8-bits/component, U and V sub-sampled by 2      
Input connectors    Composite                                    2 RCA                                           
                    Y/C (S-VHS)                                  1 S-VHS (4-pin DIN)                             
Output connectors   Composite                                    1 RCA                                           
                    Y/C (S-VHS)                                  1 S-VHS                                         
Composite Input     Color separation                             Chrominance trap only                           
                    Aperture filters                             Selectable                                      
                    Coring                                       Selectable up to ▒3 LSB                         
                    Hue control                                  ▒180                                            
                    Chroma gain                                  Automatic                                       
                    Luminance gain                               Automatic                                       
                    Differential phase                           4                                               
                    Chrominance-luminance gain                   ▒ 4%                                            
Composite output    Operating modes                              Genlocked or stand-alone                        
                    Horizontal phase                             3 Ásec advance to 1 Ásec delay                  
                    Horizontal blanking                          Fixed at the following rates:                   
                                                                  11.4 Ásec NTSC square pixel                    
                                                                  11.9 Ásec PAL square pixel                     
                    Vertical blanking                            Adjustable through all vertical interval lines  
                    SC-H phase                                   ▒180                                            
                    Differential phase                           1                                               
                    Differential gain                            1%                                              
                    Chrominance-luminance gain                   ▒ 2%                                            
                    Chrominance-luminance delay                  ▒ 20 nsec                                       
                    Frequency response                           4.2 MHz - 2 dB                                  
                    Blanking level output voltage                ▒0.25 V                                         
                    S/N ratio                                    48 dB                                           
Board Function      Specification                                Value                                           
Y/C (S-VHS) input   Aperture filters                             Selectable                                      
                    Coring                                       Selectable up to ▒3 LSB                         
                    Hue control                                  ▒180                                            
                    Chroma gain                                  Automatic                                       
                    Luminance gain                               Automatic                                       
                    Differential phase                           4                                               
                    Differential gain                            4%                                              
                    Chrominance-luminance gain                   ▒ 4%                                            
                    Chrominance-luminance delay                  ▒ 40 nsec                                       
                    Frequency response                           4.2 MHz -3 dB (Y only)                          
Frame buffers       Number                                       4                                               
                    Bandwidth to CPU                             1.5 Mpixels/sec maximum                         
                    Readback to CPU decimation                   2x or 4x, with or without anti-alias filtering  
                    Data format                                  4:2:2 YUV, 8 bits/component                     
Graphics-to-video   Reduction ratios, with anti-alias filtering  2:1 NTSC square-pixel; 5:3 PAL square-pixel     
conversion          Flicker reduction                            Selectable                                      
                    Color space conversion accuracy              ▒1 LSB                                          
---------------------------------------------------------------------------------------------------------------
TABLE 3 Indy Video specifications.

                         Next chapter