The Lurker's Guide to Video
Welcome to the Lurker's Guide, a repository for the little-known, undocumented knowledge that you need in order to write any sort of video app on SGI machines. This Guide is not for the squeamish. Some of the material contained in here may be too graphic, or possibly even too useful, for the average educated computer science professional. We hear that some of this information might even survive the PSFP (Positive Spin Filtration Process) and make it
into official documentation.
This collection of documents does not represent SGI, and is not an official SGI publication. The entire contents of this document are the personal observations, and/or opinions, of the lurkers. All errors and opinions in it are ours alone. SGI makes no guarantees about anything in this document. Neither do the lurkers. You use it at your own risk.
Places to read the Lurker's Guide:
The very latest, complete material:
- Please make all links to this site.
Developer Toolbox CD and Web Pages:
- Developer Toolbox: https://web.archive.org/web/19970616101401/http://www.sgi.com/Technology/toolbox.html
- Taste of the Toolbox: https://web.archive.org/web/19970616101401/https://www.sgi.com/TasteOfDT/
- Includes convenient "bulk download" feature so you can read the Guide offline.
- Part of the SGI Developer Program, the Toolbox mirrors this and many other unofficial sites containing SGI developer information. Toolbox janitors snap the state of the reality.sgi.com site every 3 months or so.
Video on SGI: Concepts, Definitions and Parameters
Fields: Why Video is Crucially Different from Graphics
- Explains crucial video concepts and conventions
Definitions: F1/F2, Interleave, Field Dominance, and More
- Defines F1, F2 for 525- and 625-line video standards
- Explains how F1/F2 fields should be interleaved
- Defines field dominance, explains why it matters
- The terrible terms: "even" and "odd"
- Defines related SGI Movie Library concepts
How Big is Video?
- How Many Bytes Per Pixel?
- How Many Pixels In a Field/Frame?
- How Many Bytes In a Field/Frame?
- How Many Fields/Frames per Second?
- How Many Bytes Per Second in Full-Rate Video?
What Are the SGI Video Devices?
- Product and codenames you'll see in the Lurker's Guide
What Are the SGI Video-Related Libraries?
- Abbreviations you'll see in the Lurker's Guide
- What's this I hear about the "O2 VL"? Is it a different library?
Square and Non-Square Pixels
- What are non-square pixels? Why do I care?
- What is the pixel aspect ratio of non-square pixels?
The Pixel Rosetta Stone: Packings and Colorspaces
- How video and graphics pixels are laid out in memory
- Tokens you'll see in VL, OpenGL, IRIS GL, DM (dmParams, dmIC, dmColor, libmoviefile, libmovieplay, ...), and CL
- Timecode as a Numbering Scheme
- Timecode as a Data Stamp in a Computer
- Timecode as a Signal over a Wire
- Timecode as a Signal on a Tape
Tips for Writing SGI Video Applications
Displaying In-Memory Video Using OpenGL
- How to make OpenGL glDrawPixels() go as fast as possible
- Useful for vino, ev3, cosmo2, Sirius, and many future boards
- Displaying Video on O2 using the OpenGL interlace and YCrCb extensions
Displaying Video Using Galileo (ev1)
- Setting up and maintaining an ev1 display
Tips for Writing Your Main (select, event) Loop
- Explains what the VL file descriptors do
- Avoiding common pitfalls when writing a VL select() loop
- How to make it work if you're stuck with XtMainLoop()
- Some caveats about spinloops
- How to detect dropped or duplicated data correctly
Choosing an Input Jack
- Ready-to-steal sample code for making this task as simple as it should be
Hints for Vid-to-Mem Applications
- Video source node controls
- Memory drain node controls
- Handling preemption
Multi-Threaded Apps and the VL
- The multithreaded process coordination rules.
Seizing Higher Scheduling Priority
- How to use schedctl(2) to get better average response
Motion JPEG on SGI Systems
- An epic tale of bravery and conquest
SGI Video Devices
Taxonomy of the ev1 and cosmo1 Boards
- What are all those boards like Galileo Video, Indy Video, and Indigo2 Video, and how are they different?
- What jacks do they have?
- How does Cosmo Compress fit in?
Taxonomy of the ev3 and cosmo2 Boards
- What is Impact Video?
- What is Impact Compression?
- What happened to ev2?
Notes on Video Input for O2 Systems (mvp)
- MVP input jacks
- Programming video to memory transfer
- Dealing with the O2 Camera
Video and OpenGL on O2
DMbuffers for Video and OpenGL
- What is a dmbuffer?
- What are the relevant image formats?
- How do you set up a pool of buffers?
- How to you use them with video?
- How do you use them with graphics?
Rendering graphics onto video
- How the video path is set up.
- How graphics is set up.
- How to handle fields with stencils.
- How to handle fields with glPixelZoom and glCopyPixels
- Rendering in the YCrCb color space
- Rendering directly onto video
- Blending onto a video frame
Using Live Video as Texture
- Setting up the video path
- Creating the digital media pbuffer
- Creating the buffer pool
- Getting the video frame
- Loading the video frame as texture
Time and Synchronization on SGI Machines
Introduction to UST and UST/MSC
- How to synchronize audio, video, graphics, MIDI, serial and other signals.
Why Use UST?
- Why a simple best-effort synchronization approach doesn't work so well.
UST/MSC: Using the Frontier MSC to Detect Errors
- Details on how to detect dropped input data and output glitches.
Synchronization Across Machines
- Tricks to relate the UST clock of two different machines.