The OCTANE Digital Video option board and the Video Library (VL) provide video input and output for OCTANE workstations.
This chapter introduces
For an introduction to video, see the latest version of the Digital Media Programming Guide (007-1799-060 or later).
Building on its broadcast-quality, 10-bit digital video architecture, the OCTANE Digital Video option provides a solid foundation for unlimited applications. You can use O2 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 OCTANE Digital 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, OCTANE Digital 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.
|Note: The OCTANE Digital Video and OCTANE Compression Installation Guide (document number 007-3466-001) contains instructions on connecting D/A and A/D converters and other options to connectors on the OCTANE Digital Video board's I/O panel.|
The OCTANE Digital 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 OCTANE 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
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.
The Video Library provides a software interface to the OCTANE Digital 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 directories /usr/share/src/dmedia/video/vl and /usr/share/src/dmedia/video/vl/OpenGL).
The VL works with other Silicon Graphics libraries, such as OpenGL®. 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.
The software for the OCTANE Digital Video board includes a graphical user interface, /usr/sbin/vcp, that makes it convenient to access VL capabilities.
This section describes features of these VL system components and tools:
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.
The VL communicates with the IRIX kernel for device initialization, vertical retrace, setup, and maintenance of any device-supported direct memory access (DMA). See Chapter 1 of the Digital Media Programming Guide for more information on interfacing to other libraries.
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.
Management that the video daemon performs includes
multiple client access to multiple devices
As events are handled and noted by devices, the daemon notifies applications that have expressed interest in those 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 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.
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 the Video Library command-line interface to enter Video Library shell-level and other commands.
Use the video input window tool to view input video in a window.
Use the video output tool to output video from a rectangular area of the screen on hardware that supports the screen-to-video path.
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.
Use this tool to display video input on the device attached to video output.
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.
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. Similar applications are supplied in source-code form as examples in the directories /usr/share/src/dmedia/video/vl and /usr/share/src/dmedia/video/vl/OpenGL).
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 OCTANE Digital Video are /usr/include/dmedia/vl_mgv.h (linked to /usr/include/vl/dev_mgv.h) and /usr/include/dmedia/vl_impact.h (linked to /usr/include/vl/dev_impact.h).
The header file /usr/include/dmedia/vl_impact.h contains definitions common to the OCTANE Digital Video and OCTANE Compression devices.
The VL recognizes these classes of objects:
A video device can be internal, such as the OCTANE Digital Video board, or external, such as a videotape recorder connected to the OCTANE Digital Video board.
ports, the entities on nodes that produce or consume video data
events, for monitoring video I/O status
video device parameters, such as blanking width, gamma value, horizontal phase, sync source
video data capture parameters
Central concepts for VL are node, path, and port.
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 O2 screen), a device (video), or the blender in which video sources are combined for output to a drain.
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. 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-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.
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 OCTANE Digital 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 transmitted or received 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/vl_impact.h. Appendix B, “OCTANE Digital Video Nodes and Their Controls,” in this guide gives the ports associated with each node.
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. Chapter 5, “Managing Connections,” provides more information about specifying connections.
The OCTANE Digital Video board translates video signals into a form usable by the OCTANE workstation. It also does the reverse, translating graphics from the OCTANE display into video signals. Table 1-1 summarizes the formats that the OCTANE Digital Video board supports
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
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
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 the requirements for recording to and from video, see the Digital Media Programming Guide.