Chapter 1. Features of Indigo2 IMPACT Video
Prev |  | Next

## Chapter 1. Features of Indigo2 IMPACT Video

The Indigo2 IMPACT Video option board and the Video Library (VL) provide video input and output for Indigo2 workstations equipped with IMPACT graphics.

This chapter introduces

- Indigo2 IMPACT Video board capabilities

- Video Library capabilities

- the VL system software architecture

- the VL architectural model of video devices

- Indigo2 IMPACT video formats

For an introduction to video, see Appendix A, “Video Basics.”

## Indigo2 IMPACT Video Board Capabilities

Building on its broadcast-quality, 10-bit digital video architecture, Indigo2 IMPACT Video provides a solid foundation for unlimited applications. You can use Indigo2 IMPACT graphics with real-time video and keyed or alpha output of the 32-bit, double-buffered graphics for broadcast applications. Post-production professionals can use Indigo2 IMPACT Video to capture and play back uncompressed 10-bit video to and from main system memory.

You can send and receive live component video from any serial CCIR-601/SMPTE-259M-compliant device. Compatible with 525-line (NTSC) and 625-line (PAL) standards, Indigo2 IMPACT Video accommodates all major formats of serial digital video I/O:

- two channels of YUV 4:2:2 (8- or 10-bit) (single-link)

- one channel of YUVA 4:2:2:4 (8- or 10-bit) (dual-link)

- one channel of YUVA 4:4:4:4 (8- or 10-bit) (dual-link)

- one channel RP175 (RGBA 8- or 10-bit) (dual-link)

- two channels of arbitrary 8-bit data (single-link)

Additional connections provide genlock input, genlock loopthrough, and GPI trigger signals. You can use the genlock to lock output to analog house sync or to either digital input. For conversion to or from component or composite analog video, use third-party digital-to-analog and analog-to-digital solutions.

The Indigo2 IMPACT Video serial digital I/O produces valid output only when it operates in CCIR non-square pixel mode. The I/O ports are not usable when the device operates in square pixel mode, although the remainder of the device is usable. The non-square pixel modes are used with the Indigo2 IMPACT Compression™ option card to capture digital video signals to disk in real time. Serial digital video I/O coupled with low compression ratios dramatically reduces storage and network bandwidth requirements, thus facilitating demanding applications such as spot playback and nonlinear video editing.

For input, you can use, in any combination

- graphics screen

- Indigo2 IMPACT Compression

- digital video

- main memory

The real-time 8-bit alpha blender and key generator enable live creation of many fundamental video effects, including overlays, dissolves, fades, wipes, chroma and luma keying, and shadow.

## Video Library Capabilities

The Video Library provides a software interface to the Indigo2 IMPACT Video board, enabling applications to

- display live video in a window

- capture live video to system memory

- encode graphics to video in real time

- produce high-quality full-rate video output

The Video Library (VL) is a collection of device-independent and device-dependent C language calls for Silicon Graphics workstations equipped with video options. The VL provides generic video tools, including simple tools for importing and exporting digital data to and from Silicon Graphics systems, as well as to and from third-party video devices that adhere to the Silicon Graphics architectural model for video devices. Video tools are described in the Media Control Panels User's Guide, which you can view using the IRIS InSight™ viewer; similar applications are supplied in source-code form as examples in the `4Dgifts` directory (/usr/people/4Dgifts/impact/examples/dmedia/video/`vl` and /usr/people/4Dgifts/`OpenGL`).

The VL works with other Silicon Graphics libraries, such as the OpenGL® and IRIS Graphics Library™ (GL™). The VL does not depend on the X Window System™, but you can use X Window System libraries or toolkits to create a windowing interface.

The VL allows programs to get events 60 times per second on a quiescent system; it also enables programs to share resources or to gain exclusive use of resources. It supports input and output of video data to or from locked-down memory at the nominal frame rate. The VL provides an API that enables applications to

- capture or play back video from system memory

- blend computer graphics with frames from videotape or any video source

- present video in a window on the workstation screen

The software for the Indigo2 IMPACT video board includes a graphical user interfac`e, /usr/sbin/vcp`, that makes it convenient to access VL capabilities.

## VL System Software Architecture

This section describes features of these VL system components and tools:

- video daemon

- generic video tools

- library and header files

Figure 1-1 diagrams the interaction between the VL, the video daemon, the kernel, the hardware, and the X Window System server.

Figure 1-1. VL System Components

The VL communicates with the IRIX kernel for device initialization, vertical retrace, setup, and maintenance of any device-supported direct memory access (DMA).

Besides these components, the VL includes a collection of applications that support device configuration and control setting and retrieval, generic tools that display video on a workstation, and video control panels.

### Video Daemon

The video daemon `/usr/etc/videod`, which has device-dependent and device-independent portions, handles video device management and status information.

#### Device Management

Management that the video daemon performs includes

- multiple client access to multiple devices

  The library supports connections from multiple client applications and manages their access to a limited number of video devices.

- dispatching events

  As events are handled and noted by devices, the daemon notifies applications that have expressed interest in those events.

- handling events

  As events are generated by the various devices, the daemon initiates any action required by an event before it hands the event off to interested applications.

- maintaining exclusive use

  Types of data or control usage for video clients in a Video Library application are Done Using, Read-only, Lock, and Shared. These usage levels apply only to write access on controls, not read access. Any application can open and read the control's values at any time.

- client cleanup on exit

  When a client exits or is terminated abnormally, its connection to the daemon is broken; the daemon performs any cleanup required of the system. Any exclusive-use modes that have been set are cleared; interested clients are notified that the device is no longer in exclusive use. Controls set by the client might persist, but are not guaranteed to remain after the client closes the connection.

#### Status Information

Status information for which the video daemon is responsible includes

- system status of video devices

  The video devices installed in a system can be queried as to availability and control status.

- video positioning (offset) information

- control setting and retrieval

  Device-independent and device-dependent controls are set and retrieved through the video daemon.

### Generic Video Tools

The generic video tools include:

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.
`vlcmd` |  | Use the Video Library command-line interface to enter Video Library shell-level and other commands.
`videoin` |  | Use the video input window tool to view input video in a window.
`videoout` |  | Use the video output tool to output video from a rectangular area of the screen on hardware that supports the screen-to-video path.
`vlinfo` |  | Use the video info tool to display information about video devices available through the VL, such as the name of the X server, number of devices on the server, and the types and ID numbers of nodes, sources, and drains on each device.
`vintovout` |  | Use this tool to display video input on the device attached to video output.
`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. Capture size can also be specified. The data, which can be translated or left as raw data, can be used by the `memtovid` tool.
`memtovid` |  | Use this tool to output frames (images) to video out on hardware that supports the memory-to-video path.

The `vlinfo`, `vidtomem`, and `memtovid` tools are command-line tools. In addition to their reference pages, these tools have explanations in the Media Control Panels User's Guide, which you can view using the IRIS InSight viewer. Similar applications are supplied in source-code form as examples in the `4Dgifts` directory (/usr/people/4Dgifts/impact/examples/dmedia/video/vl and /usr/people/4Dgifts/examples/OpenGL).

### Library and Header Files

The client library is `/usr/lib/libvl.so`. The header files for the VL are in `/usr/include/dmedia`. The header file for the VL, `vl.h`, contains the main definition of the VL API and controls. The header files for Indigo2 IMPACT Video are `/usr/include/dmedia/dev_mgv.h` (linked to `/usr/include/vl/vl_mgv.h`) and `/usr/include/dmedia/dev_impact.h` (linked to `/usr/include/vl/vl_impact.h`).

The header file `/usr/include/dmedia/vl_impact.h` (linked to `/usr/include/vl/dev_impact.h`) contains definitions common to the Indigo2 IMPACT Video and Indigo2 IMPACT Compression devices.

## VL Architectural Model of Video Devices

The VL recognizes these classes of objects:

- devices, each including sets of nodes

- nodes: sources, drains, and internal nodes

- paths, connecting sources and drains

- ports, the entities on nodes that produce or consume video data

- controls, or parameters, that modify how data flows through nodes; for example:

  - video device parameters, such as blanking width, gamma value, horizontal phase, sync source

  - video data capture parameters

  - blending parameters

- buffers, for sending frame data to and receiving frame data from host memory; the VL buffers contain a number of blocks; each with a pointer, a size, and pointers to the head (oldest) and tail (newest) valid data

Central concepts for VL are path, node, and port.

### Path

The path is an abstraction for a way of moving data around. A path is a set of nodes with video routes (connections) between the ports on the nodes.

### Node

The node is an endpoint or internal processing element of the path, such as a video source like a VTR, video drain (such as to the Indigo2 IMPACT screen), a device (video), or the blender in which video sources are combined for output to a drain.

A path defines the useful connections between video sources and video drains. Figure 1-2 shows a simple path in which a frame from a videotape is displayed in a workstation window.

Figure 1-2. Simple VL Path

Figure 1-3 shows a more complex path with two video sources: a frame from a videotape and a computer-generated image are blended and output to a workstation window. This path is set up in stages.

Figure 1-3. Simple VL Blending

### Port

The port is an entity on a node that produces or consumes video data.

Most nodes have only one port, such as the video in or video out nodes. Each internal node has at least two ports, input (drain) and output (source). The blend node has several ports (A alpha in, A pixel in, B alpha in, B pixel in, pixel out, alpha out).

Ports have several attributes:

- link type: single-link or dual-link

- data type: alpha, pixel, or pixel-alpha (dual-link)

  A device can use this attribute internally to handle data conversions or routing. For example, the Indigo2 IMPACT Video board includes an alpha LUT to convert CCIR-range pixel data to full-range alpha values.

- direction: source or drain

- enumerator: A, B, C, and so on, used if a path has several ports with the same link type, data type, and direction

Ports produce or consume various types of data: pixel, alpha, or dual-link data. The identification of the port as pixel or alpha may cause the video stream to be treated differently. For example, alpha data, which can be supplied to Indigo2 IMPACT video in the CCIR range only, is internally expanded to full range before it is used. No range expansion is performed for pixel data. Dual-link channels carry both alpha and pixel data, although one data type may be ignored depending on the format.

Ports have generic names; for example:

- VL_IMPACT_PORT_PIXEL_SRC_A: source of a pixel stream (first, or only, port instance)

- VL_IMPACT_PORT_ALPHA_DRN_B: drain of an alpha stream (second port instance)

For the symbolic names for ports, see `/usr/include/dmedia/dev_impact.h`. Appendix C, “Indigo2 IMPACT Video Nodes and Their Controls,” in this guide gives the ports associated with each node.

### Connections

The connections between ports on nodes determine the topology of a path.

Single-link ports can be connected to single-link ports only; dual-link ports can be connected to double-link ports only.

Data flows from a source port to a drain port. It is not permissible to connect a source port to another source port, or a drain port to another drain port.

Connections obey stream-usage levels set with `vlSetupPaths()`. Usage is drain-centric: the usage levels of the path(s) using the drain node serve as the usage level of the connection.

The functions `vlSetConnection()` and `vlGetConnection()` manipulate connections:

- `vlSetConnection()` sets a connection between a source pair (node, port) pair and a drain pair (node, port).

- `vlGetConnection()` returns the set of connections entering or leaving a node or port.

Chapter 5, “Managing Connections,” provides more information about specifying connections.

## Indigo2 IMPACT Video Formats

The Indigo2 IMPACT Video board translates video signals into a form usable by the Indigo2 workstation. It also does the reverse, translating graphics from the Indigo or Indigo2 display into video signals. This section describes the Indigo2 IMPACT video board's I/O interface.

Table 1-1 summarizes the formats that the Indigo2 IMPACT Video board supports

Table 1-1. Video Formats for Indigo2 IMPACT Video

Format | Signal | Nodes
--- | --- | ---
Digital component YCrCbA serial (VL_FORMAT_DIGITAL_COMPONENT_SERIAL) | YCrCb 4:2:2 serial digital signal with 8- or 10-bit words. Component ranges are 16 to 235 (8-bit) or 64 to 940 (10-bit). This format is also used to specify YCrCbA 4:4:4:4. Two streams are required to carry this format. The first is 4:2:2 YCrCb (u0, y0, v0, y1, u2, y2...). The second is 4:2:2 ACrCb (u1, a0, v1, a1, u3, a2...). Conforms to the CCIR-601/656 specification. | All memory nodes
SMPTE YUV (VL_FORMAT_SMPTE_YUV) | Contains YUV components in the range 1-254; superblack and superwhite values can be present. | All memory nodes
Digital component RGB serial (VL_FORMAT_DIGITAL_COMPONENT_RGB_SERIAL) | Dual-link RGBA signal with GBR 4:2:2 (b0, g0, r0, g1, b2, g2, r2...) on the first link and ABR 4:2:2 (b1, a0, r1, a1, b3, a2, r3...) on the second link. Component ranges are 16 to 235 (8-bit) or 64-940 (10-bit). Conforms to the RP175 specification. | All VGI1 memory nodes
RGB (VL_FORMAT_RGB) | Full-range 8-bit or 10-bit per component RGBA. Component range is 0 to 255 (8-bit) and 0-1023 (10-bit). | All VGI1 memory nodes
Raw data (VL_FORMAT_RAW_DATA) | Used for encoding arbitrary 8-bit data values (0 to 255 range) in a 10-bit video signal. Within the coded 10-bit word, bit 9 is 0, bit 8 is 1, and bits 7 through 0 carry the 8-bit data value. When this format is used, the packing is irrelevant. | All VGI1 single-link nodes

For information on videotape formats, see “Videotape Formats” in Appendix A in this guide. For information on the requirements for recording to and from video, see the Indigo2 IMPACT Video Owner's Guide (007-3184-001).

Prev | Table of Contents | Next
About This Guide |  | Chapter 2. Creating Video Programs With the Video Library