Intel DVI File Format Summary

Also Known As: DVI, Digital Video Interface, Intel Real-Time Video


Type Multimedia
Colors 16 million
Compression JPEG, proprietary
Maximum Image Size 256x240
Multiple Images Per File Yes
Numerical Format NA
Originator Intel Corporation
Platform Intel-based PCs
Supporting Applications MS-DOS and Microsoft Windows Multimedia
See Also Microsoft RIFF, QuickTime

Usage
A format designed to support Intel's bid to establish a hardware standard in the Intel-based PC marketplace.

Comments
At the time of this writing, it's too early to decide whether this format will ever see the light of day in a commercial product. If it ever does, you'll find the specification on the CD-ROM useful.

Vendor specifications are available for this format.


Intel is the current owner of DVI, which was one of the first systems that provided practical full-motion video incorporating real-time decompression technology. DVI originated in 1984 at the David Sarnoff Research Center in Princeton, New Jersey, which was the central research facility for RCA Corporation. Ownership of DVI changed in 1986 when RCA was acquired by GE. The official unveiling of GE DVI occurred in March 1987 at the Second Microsoft CD-ROM Conference in Seattle, Washington. GE later sold DVI technology to Intel Corporation in October 1988.

Contents:
File Organization
File Details
For Further Information

DVI is actually both the name of the Digital Video Interactive hardware system sold by Intel and the file format associated with that system. DVI technology is essentially a PC-based interactive audio/video system used for multimedia applications. The DVI system consists of a board for use in an Intel-based PC, drivers, and associated software. The four components of DVI technology are:

  • DVI hardware chipset

  • Run-time software interface

  • Data compression and decompression schemes

  • Data file formats

The heart of the DVI system is the hardware architecture based on the video display processor (VDP) chipset. DVI technology was originally designed for implementation on the IBM PC AT platform. A collection of three 16-bit, ISA-bus DVI interface boards (audio, video, and CD-ROM) were plugged into the AT, and all of the hardware capabilities were accessed through the run-time software interface. The functions in the interface were called by writing a software program using a programming language such as assembly or C.

Today, Intel distributes licenses to third-party developers who want to incorporate DVI technology into their platforms and multimedia products. All of IBM's multimedia hardware platforms (such as the ActionMedia II boards) and software applications are based upon DVI technology.

DVI is a major competitor of QuickTime, AVI, and MPEG for market share in digital audio/video applications.

DVI allows the storage and playback of audio and video information. All DVI images have a 5:4 pixel aspect ratio and are 256x240 pixels in size. DVI is also capable of storing still images and supports both a lossy and a lossless native compression method for such images. DVI works across MS-DOS, Microsoft Windows, and OS/2 platforms and supports the capability of using its own proprietary compression scheme, or using user-definable algorithms, such as JPEG, as well. Audio compression is achieved using either the ADPCM or PCM8 algorithms.

File Organization

The DVI file format is extremely flexible in its design and is used to store a wide variety of data. This format is capable of storing both still-image and motion-video/audio data. The type of data a DVI file contains is described by its file extension. The common extensions for DVI files containing still-image data are the following:

Uncompressed, 8-bit data

.IMR Red channel
.IMG Green channel
.IMB Blue channel
.IMY Y luminance channel
.IMI I color channel
.IMQ Q color channel
.IMM Monochrome or gray scale
.IMA Alpha channel
.IMC Color map
.I8 Device-dependent data

Uncompressed, 16-bit data

.I16 Device-dependent data

Compressed, 8-bit data

.CMY Y luminance channel
.CMI I color channel
.CMQ Q color channel

Compressed, 16-bit data

.C16 Device-dependent data

As you can see, a common practice of DVI is to store each color plane of an image in a separate disk file. This allows the easy reading and writing of bitmap information, without the need to buffer data to read or write a single file.

A still image is saved using three color-channel files and possibly a colormap and alpha-channel file as well. Motion-video/audio data is stored using the Audio/Video Support System (AVSS) file format. AVSS (pronounced "avis") allows audio and video data to be stored in the same file and played back in a synchronized manner. All AVSS files have the extension .AVS or the file type AVSS.

File Details

The data in AVSS files is primarily stream-based, and there is at least one data stream per AVSS file. Each file contains a standard header, an AVL file header, one stream header per data stream, one substream header per substream, frame data, and a frame directory.

DVI File Header

The standard header of a DVI file is 12 bytes long and has the following structure:

typedef _DviStandardHeader
{
  DWORD FileId;           /* Magic number (56445649h) of DVI file */
  SHORT HeaderSize;       /* Size of this header structure */
  SHORT HeaderVersion;    /* Version of this header structure */
  DWORD AnnotationOffset; /* Location of annotation data */
} DVISTANDARDHEADER;

FileId contains the characters VDVI and identifies the file as containing DVI information. If the file contains still-image information, this field contains the characters VIM.

HeaderSize contains the number of bytes found in the header, which is currently 12. Older versions of the DVI format may contain a value of 1 in this field. In this case, this value should be ignored and treated as if it were 12.

HeaderVersion indicates the format of the header and is currently 1.

AnnotationOffset is used to point at additional, unstructured data, such as a title or copyright notice, which is normally placed at the end of the file. If no annotation exists, then this field is set to 0.

AVL File Header

The AVL file header immediately follows the standard header and is a directory of all the other data structures within the DVI file. This header is 120 bytes in length and has the following format:

typedef struct _AvlHeader
{
  DWORD HeaderId;              /* Header ID value (41565353h) */
  SHORT HeaderSize;            /* Size of this header structure */
  SHORT HeaderVersion;         /* Format of this header structure */
  SHORT StreamGroupCount;      /* Number of stream groups in the file */
  SHORT StreamGroupSize;       /* Size of each stream group */
  DWORD StreamGroupOffset;     /* Location of the first stream group */
  SHORT StreamGroupVersion;    /* Format of each stream group */
  SHORT StreamSize;            /* Size of the stream header */
  SHORT StreamVersion;         /* Format of the stream header */
  SHORT StreamCount;           /* Number of stream headers in the file */
  DWORD StreamOffset;          /* Location of stream structures array */
  DWORD HeaderPoolOffset;      /* Location of substream headers */
  LONG  LabelCount;            /* Number of labels in the file */
  DWORD LabelOffset;           /* Location of the first label */
  SHORT LabelSize;             /* Size of each label */
  SHORT LabelVersion;          /* Format of each label */
  DWORD VideoSeqHeaderOffset;  /* Location of video sequence header */
  WORD  VideoSeqHeaderSize;    /* Size of video sequence header */
  SHORT FrameVersion;          /* Version of frame headers in file */
  LONG  FrameCount;            /* Number of frame headers in file */
  LONG  FrameSize;             /* Size of frame header and data */
  DWORD FirstFrameOffset;      /* Location of the first frame */
  DWORD EndOfFrameOffset;      /* Location of last frame byte + 1 */
  SHORT FrameHeaderSize;       /* Size of frame header */
  SHORT FrameDirectorySize;    /* Size of the frame directory */
  DWORD FrameDirectoryOffset;  /* Location of the frame directory */
  SHORT FrameDirectoryVersion; /* Format of the frame directory */
  SHORT FramesPerSecond;       /* Frame rate of the data */
  DWORD UpdateFlag;            /* Data is updating or complete */
  DWORD FreeBlockOffset;       /* Not used */
  BYTE  Patch[32];             /* Not used */
} AVLHEADER;

HeaderId contains the characters AVSS and identifies the header as containing AVL file information.

HeaderSize contains the number of bytes found in the header. This value is currently 120.

HeaderVersion contains a value that specifies the format of the header based on a version control rating. Each modification to the header structure increments the header version. The current HeaderVersion value for the AVLHEADER structure is 3.

If the streams within a DVI file are organized as groups, then the StreamGroupCount value indicates the number of groups; the StreamGroupSize value specifies the size of each group; the StreamGroupOffset value points to the location of the first group; and the StreamGroupVersion specifies the format of the group. If no stream groups are present in the file, then the value of these fields will be 00h.

The next four fields contain information on the array of STREAMHEADER structures stored in the DVI file. StreamSize indicates the size of each structure, which is currently 44. StreamVersion specifies the format of each structure, which is currently a value of 3. StreamCount is the number of streams in the file and structures in the array. StreamOffset contains the offset value to the beginning of the array.

HeaderPoolOffset points to the first substream header. This value is 00h if there are no substreams present in the file.

If the DVI file contains labels, then LabelCount indicates the number of labels; LabelOffset points to the location of the first label; LabelSize specifies the size of each label; and LabelVersion specifies the format of the label. If no labels are present in the file, then the values of these fields are all 00h.

VideoSeqHeaderOffset and VideoSeqHeaderSize describe the location and size of the video sequence header, if one is present in the file.

FrameVersion indicates the format of the data frames and is currently 3. FrameCount is the number of frames in the file, and FrameSize is the size of a frame, including its header. FirstFrameOffset is the location of the first frame header.

EndOfFrameOffset points to the location of the first byte after the frame data.

FrameHeaderSize value is the size of the frame header.

The FrameDirectorySize specifies the size of the frame directory and is currently 4.

FrameDirectoryOffset points to the location of the frame directory.

FrameDirectoryVersion specifies the format of the frame directory.

FramesPerSecond contains the frame rate of the data for playback, rounded to the nearest integer.

UpdateFlag is a non-zero value if the file is in the process of being updated. A value of 00h indicates that the file is not currently being modified.

FreeBlockOffset and Patch[32] are set to 00h.

Stream Header

Each DVI file contains one or more data streams. Each stream is identified by an associated STREAMHEADER structure, which contains detailed information about the stream data. This header is four bytes in length and has the following format:

typedef struct _StreamHeader
{
DWORD HeaderId;           /* Header ID value (5354524Dh) */
SHORT HeaderSize;         /* Size of this header structure */
WORD  Type;               /* The type of data stream */
WORD  SubType;            /* The subtype of data stream  */
SHORT HeaderCount;        /* Number of substream headers */
SHORT NextStreamNumber;   /* ID of the next stream */
SHORT StreamGroupNumber;  /* The group ID for this stream */
SHORT Pad;                /* Pad value */
DWORD Flag;               /* Variable frame size flag */
LONG  FrameSize;          /* Maximum amount of data per frame */
DWORD FirstHeaderOffset;  /* Location of first substream header */
BYTE  StreamName[16];     /* Name of the stream */
} STREAMHEADER;

HeaderId contains the characters STRM and identifies the header as containing AVL file information.

HeaderSize contains the number of bytes found in the header. This value is currently 120.

Type and SubType indicate the type of data that is stored in this stream. Valid Type values are:

02h Compressed audio stream
03h Compressed image stream
05h Associated per-frame data
06h Uncompressed image stream
07h Pad stream

SubType indicates a variation of each of these stream types and is described for different types of streams (e.g., video) in the following sections.

HeaderCount indicates the number of substreams associated with this stream.

NextStreamNumber is not used and is set to -1.

StreamGroupNumber indicates the ID of the group this stream is associated with.

Pad is not used and is set to 00h.

Flag is 04h if the stream contains frames that vary in size; otherwise, the value will be 00h.

FrameSize field specifies the maximum number of bytes per frame in the stream.

FirstHeaderOffset points to the location of the first substream header.

StreamName is the name of the stream in the form of a NULL-terminated ASCII string.

Audio substream header

Each type of data stream has a substream header. The audio substream header describes the attributes of an audio stream. The type of audio stream is indicated by the SubType field in the STREAMHEADER structure. For audio streams, this value is always 0. The AUDIOSUBSTREAMHEADER header is 168 bytes in length and is formatted as follows:

typedef struct _AudioSubStreamHeader
{
  DWORD HeaderId;          /* Header ID value (41554449h) */
  SHORT HeaderSize;        /* Size of this header structure */
  SHORT HeaderVersion;     /* Format of this header structure */
  BYTE  OriginalFile[80];  /* Name of file stream is derived from */
  LONG  OriginalFrame;     /* Original frame ID */
  SHORT OriginalStream;    /* Original stream ID */
  SHORT Pad;               /* Pad value */
  LONG  FrameCount;        /* The number of frames */
  DWORD NextHeaderOffset;  /* Location of next substream header */
  BYTE  LibraryName[16];   /* Name of library stream if from */
  BYTE  AlgorithmName[16]; /* Audio compression algorithm used */
  LONG  DataRate;          /* Audio data rate in bits/sec */
  SHORT CutoffFrequency;   /* Filter cutoff frequency */
  SHORT Parameter3;        /* Not used */
  SHORT LeftVolum rate;    /* Loudness of left audio channel */
  SHORT RightVolume;       /* Loudness of right audio channel */
  LONG  LoopOffset;        /* Not used */
  LONG  StartingFrame;     /* ID of the first frame in the stream */
  DWORD Flag;              /* Mono/Stereo flag */
  SHORT FrameRate;         /* The playback rate for this stream */
  SHORT Pad2               /* Pad value */
  LONG  DCFId;             /* Digital Compression Facility ID */
} AUDIOSUBSTREAMHEADER;

HeaderId contains the characters AUDI and identifies the header as containing audio stream information.

HeaderSize contains the number of bytes found in this header. This value is currently 168.

HeaderVersion indicates the version number of the header. The current HeaderVersion field value is 5.

OriginalFile contains a NULL-terminated ASCII string identifying the name and path of the file, from which the audio information is derived.

OriginalFrame, OriginalStream, and Pad are not used and are set to 0.

FrameCount indicates the number of frames in the audio stream.

NextHeaderOffset specifies the location of the next audio substream header. This value is always 00h.

LibraryName is not used and should be set to all NULL values.

AlgorithmName contains a NULL-terminated ASCII string that identifies the name of the compression method used on the audio data stream. This string is apdcm4e or pcm8 for the ADPCM and PCM8 algorithms, respectively.

DataRate is the data rate of the audio stream in bits per second.

CutoffFrequency indicates the maximum filter cutoff frequency for the sample.

Parameter3 is not used and is set to 0.

LeftVolume and RightVolume specify the volume level of the left and right audio channels, respectively. These numbers are a percentage of the total volume; the default value is 100.

LoopOffset has a default value of -1.

StartingFrame normally has a value of 0.

Flag has a value of 4000h, indicating that the audio stream is stereophonic, or 8000h, indicating that it is monophonic.

FrameRate is the data rate of the audio stream.

Pad2 is not used and is set to 0.

DCFId contains a value indicating the software service that compressed the data. The value of this field is -1 if the ID of the service is not known or is unimportant.

Video substream header

The video substream header describes the attributes of a video or compressed image stream. The type of video stream is indicated by the SubType field in the STREAMHEADER structure, which may have the following values for a video stream:

1 Y-channel data only
11 U-channel data only
12 V-channel data only
13 YVU data
14 YUV data

All images are stored in YVU format, except for JPEG-compressed images, which are stored using YUV.

The VIDEOSUBSTREAMHEADER header is 136 bytes in length and is formatted as follows:

typedef struct _VideoSubStreamHeader
{
  DWORD HeaderId;         /* Header ID value (h) */
  SHORT HeaderSize;       /* Size of this header structure */
  SHORT HeaderVersion;    /* Format of this header structure */
  BYTE  OriginalFile[80]; /* Name of file stream is derived from */
  LONG  OriginalFrame;    /* Original frame ID */
  SHORT OriginalStream;   /* Original stream ID */
  SHORT Pad;              /* Pad value */
  LONG  FrameCount;       /* Number of frames until next header */
  DWORD NextHeaderOffset; /* Location of next substream header */
  SHORT XPosition;        /* X coordinate top-left corner of image */
  SHORT YPosition;        /* Y coordinate top-left corner of image */
  SHORT XLength;          /* Width of image */
  SHORT YLength;          /* Height of image */
  SHORT XCrop;            /* X cropping coordinate */
  SHORT YCrop;            /* Y cropping coordinate */
  SHORT DropFrame;        /* Not used */
  SHORT DropPhrase;       /* Not used */
  LONG  StillPeriod;      /* Frequency of intraframe images */
  SHORT BufferMinimum;    /* Minimum buffer size required */
  SHORT BufferMaximum;    /* Maximum buffer size required */
  SHORT DecodeAlgorithm;  /* ID of the decompression algorithm */
  SHORT Pad2;             /* Pad value */
  LONG  DCFId;            /* Digital Compression Facility ID */
} VIDEOSTREAMHEADER;

HeaderId contains the characters CMIG and identifies the header as containing audio stream information.

HeaderSize contains the number of bytes found in this header. This value is currently 136.

HeaderVersion currently has a value of 4.

OriginalFile contains a NULL-terminated ASCII string identifying the name and path of the file from which the video or image information is derived.

OriginalFrame, OriginalStream, and Pad are not used and are set to 0.

FrameCount indicates the number of frames in the current substream.

NextHeaderOffset specifies the location of the next video substream header. This field value is always 00h.

XPosition and YPosition indicate the position of the top-left corner of the image. These fields are normally 0.

XLength and YLength specify the maximum width and height of the images stored in this stream.

XCrop and YCrop specify alternate length values used to crop the image. These values are 0 by default.

DropFrame and DropPhrase are not used and are set to 0.

StillPeriod indicates the interval at which intraframe encoding occurs. For example, a value of 12 in this field indicates that every 12th frame in this video stream is intraframe encoded. A value of 1 indicates that every frame is intraframe encoded. The default value of -1 indicates that the intraframe interval is unknown.

BufferMinimum and BufferMaximum indicate the extremes of the buffer sizes required for decompressing the image. These fields are normally set to 00h.

DecodeAlgorithm contains a value identifying the algorithm, needed to decompress the stream. Pad2 is not used and is set to 0.

DCFId contains a value indicating the software service that compressed the data. The value of this field is -1 if the ID of the service is unknown or not important.

For information on other substream header formats, refer to the DVI specifications on the CD-ROM.

Frames

Each section of frame data in a DVI file is preceded by a header describing the data in the frame. The structure of this header is shown below.

typedef struct _FrameHeader
{
  LONG FrameNumber;       /* Sequence number of this frame */
  LONG PreviousOffset;    /* Location of previous frame */
  LONG Checksum;          /* Checksum value for this frame */
  LONG StreamFrameSize[]; /* Array of all frame sizes */
} FRAMEHEADER;

FrameNumber stores the sequence number of the frame. PreviousOffset points to the location of the previous frame. This value is 00h if it is the first frame.

Checksum contains a checksum value of the frame header.

StreamFrameSize is an array of byte count values, one for each frame stored in the stream.

The location of each frame is stored in a directory of offset values. There will be one FRAMEDIRECTORY structure per frame stored in the stream. The format of this structure is shown below.

typedef struct _FrameDirectory
{
DWORD FrameOffset;      /* Location of the frame for this directory */
} FRAMEDIRECTORY;

FrameOffset points to the location of its associated frame. If the most significant bit of this value is set to 1, this offset may be used for access to the frame data of every stream in the file. Typically, only audio streams are suitable for random access.

For Further Information

For further information about the Intel DVI format, see the specification included on the CD-ROM. The specifications for DVI and the AVSS file format may also be found in the reference material from the DVI Developer's Kit available from Intel:

Intel Corporation
Attn: Intel Action Media Support
6505 West Chandler Blvd
Chandler, AZ 85226
Voice: 602-554-4231
WWW: http://www.intel.com/contents.html

See the following books and articles for additional information about Intel DVI:

Dixon, D.F., S.J. Golkin, and I.H. Hashfield, "DVI Video Graphics," Computer Graphics World, July 1987.

Hurst, R.N., and A.C. Luther, "DVI: Digital Video from a CD-ROM," Information Display, April 1988.

Luther, Arch C. Digital Video in the PC Environment: Featuring DVI Technology, McGraw-Hill, New York, NY, 1989


This page is taken from the Encyclopedia of Graphics File Formats and is licensed by O'Reilly under the Creative Common/Attribution license.

More Resources