The Lurker's Guide to
Video
Note: I'm no longer at SGI, but the Lurker's Guide lives on at
this site!
Also check out my consulting site at http://lurkertech.com.
Chris Pirazzi
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:
Video on SGI and in General: Concepts, Definitions and Parameters
-
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
-
Classic, O2, and cross-platform buffering APIs
-
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
-
Where Does Field Dominance Originate?
-
What has field dominance? A tape? A signal? When is field dominance
determined?
-
Who has to worry about field dominance?
-
What idiot came up with this field dominance thing anyway?
-
Field dominance and 3:2 pulldown
-
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?
-
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
-
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
SGI Video Devices
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 a
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
Case Study: Uncompressed Video Disk I/O
-
Uncompressed Video Disk I/O: Introduction and Scope
- full-rate, full-size uncompressed video disk i/o defined
- which SGI platforms and video devices we cover
-
Concepts and Terminology for Disks and Filesystems
- disk, disk array, disk enclosure, disk vault
- partition
- XLV
- volume element, multipartition volume element, striped volume element
- stripe unit
- plex, concatenated plex
- logical subvolumes: log, data, and real-time
- logical volume
- filesystem
- device file, raw device file
- XFS
- internal vs. external log
- filesystem sections: log, data, and real-time
-
Hardware/System Setup for Uncompressed Video I/O
- your options for disks and disk arrays on each platform
- tips for configuring your filesystem and kernel for best performance
-
Basic Uncompressed Video I/O Code
- simple videoport API on top of VL
- how much memory buffering do you need?
-
Software Methods for Disk I/O
- buffered I/O
- direct I/O: satisfying its constraints, portability concerns
- data cache concerns
- residency concerns
- disk seek, disk retry, disk recal concerns
- disk command concerns
- optimizing command size and spacing: readv/writev
- how I/Os map to commands: XFS, XLV, dksc, host adapter
- exploiting parallellism: asynchronous I/O
- disk readahead
- disk write buffering
- disk command tag queueing
- missed revolutions
-
Getting Raw Data in and out of the Movie Library
- how to read and write video efficiently using the QuickTime file format
- organization of a QuickTime file
- basic information on SGI Movie Library calls to do this
Hints for Direct Sony-Style RS-422 Deck Control
Related Non-video Topics