John McGowan's AVI Overview: Programming and Other Technical Topics

    技术2022-05-11  112

    John McGowan's AVI Overview: Programming and Other Technical Topics


    Windows Multimedia System

    In Win16 and Win32, Microsoft created a partially unified systemfor handling multimedia. This system consists of the high levelMedia Control Interface or MCI Application Programming Interface (API)and associated MCI drivers. Playback of AVI files can be controlledthrough the high level MCI API and the MCIAVI.DRV MCI driver.The Windows Multimedia System also provides a number of low levelAPI's such as the WAVE API for waveform audio and associateddevice drivers such as the WAVE device drivers for sound cards.Under Windows NT 4.0, the MCI and low level API's are stored in the file WINMM.DLLThe API's are:MCI (high level API - useful for AVI playback)joy (joystick devices)midi (MIDI devices)mixer (MIXER devices)wave (waveform audio input and output devices)mmio (low level functions to parse RIFF files)time (timers etc.)aux (auxiliary sound device)When a program loads the MCIAVI driver, the MultimediaSystem has the intelligence to locate and invoke theappropriate MCI driver (MCIAVI.DRV in 16-bitWindows or MCIAVI32.DLL in 32 bit windows) and pass the MCIcommands such as MCI_PLAY to the MCI driver.The MCIAVI driver then calls Video for Windows to decompressthe video, GDI (or another graphics API) to display thedecoded frames, and WAVE to output the decoded audio samples.A dump of the functions exported by winmm.dll under NT 4.0generated with the Microsoft DUMPBIN.EXE utility follows:Microsoft (R) COFF Binary File Dumper Version 5.00.7022Copyright (C) Microsoft Corp 1992-1997. All rights reserved.Dump of file winmm.dllFile Type: DLL Section contains the following Exports for WINMM.dll 0 characteristics 31EC70B4 time date stamp Tue Jul 16 21:48:52 1996 0.00 version 2 ordinal base 197 number of functions 197 number of names ordinal hint name 3 0 CloseDriver (000026CE) 4 1 DefDriverProc (00005AF4) 5 2 DriverCallback (0000254E) 6 3 DrvGetModuleHandle (00001D37) 7 4 GetDriverModuleHandle (00001D37) 8 5 MigrateAllDrivers (00013E79) 9 6 MigrateMidiUser (00013E60) 10 7 MigrateSoundEvents (00011A3C) 11 8 NotifyCallbackData (0000B2C2) 12 9 OpenDriver (00002036) 13 A PlaySound (00008ACB) 2 B PlaySoundA (00008ACB) 14 C PlaySoundW (00009AE1) 15 D SendDriverMessage (00001000) 16 E WOW32DriverCallback (0000C448) 17 F WOW32ResolveMultiMediaHandle (0000CC3C) 18 10 WOWAppExit (00009D3F) 19 11 aux32Message (0000C507) 20 12 auxGetDevCapsA (0000A3FD) 21 13 auxGetDevCapsW (00008C77) 22 14 auxGetNumDevs (00006AE4) 23 15 auxGetVolume (0000A4A1) 24 16 auxOutMessage (00008BFF) 25 17 auxSetVolume (0000A4C9) 26 18 joy32Message (0000C768) 27 19 joyConfigChanged (0000AE40) 28 1A joyGetDevCapsA (0000A99A) 29 1B joyGetDevCapsW (0000AB40) 30 1C joyGetNumDevs (0000AB96) 31 1D joyGetPos (0000ABAA) 32 1E joyGetPosEx (0000ABFD) 33 1F joyGetThreshold (0000AC5C) 34 20 joyReleaseCapture (0000ACA8) 35 21 joySetCapture (0000ACFC) 36 22 joySetThreshold (0000AE06) 37 23 mci32Message (00007566) 38 24 mciDriverNotify (00007006) 39 25 mciDriverYield (00008727) 40 26 mciExecute (0000D92C) 41 27 mciFreeCommandResource (000035CE) 42 28 mciGetCreatorTask (0000DCD5) 43 29 mciGetDeviceIDA (0000DCA3) 44 2A mciGetDeviceIDFromElementIDA (0000DBC6) 45 2B mciGetDeviceIDFromElementIDW (0000DBF5) 46 2C mciGetDeviceIDW (00005372) 47 2D mciGetDriverData (0000158B) 48 2E mciGetErrorStringA (0000DA46) 49 2F mciGetErrorStringW (0000352F) 50 30 mciGetYieldProc (0000E1F3) 51 31 mciLoadCommandResource (00002A75) 52 32 mciSendCommandA (000015D4) 53 33 mciSendCommandW (000014A1) 54 34 mciSendStringA (00004927) 55 35 mciSendStringW (00004A24) 56 36 mciSetDriverData (000058BD) 57 37 mciSetYieldProc (000034C9) 58 38 mid32Message (0000BDFD) 59 39 midiConnect (0001019E) 60 3A midiDisconnect (0001018C) 61 3B midiInAddBuffer (0001004A) 62 3C midiInClose (0000FF42) 63 3D midiInGetDevCapsA (0000FCCC) 64 3E midiInGetDevCapsW (0000FC71) 65 3F midiInGetErrorTextA (0000FDEB) 66 40 midiInGetErrorTextW (0000FDB2) SetInfo (0000EBF4) 140 8A mmioStringToFOURCCA (0000ED9A) (00008BC5)Under Windows 3.x and Windows 95, the DLL MMSYSTEM.DLL (short forMultiMedia System) contains the multimedia API's. Return to Top

    Video for Windows

    Video for Windows is an entire system for handling video in Microsoft Windows. It was part of MS Windows 3.1 Theoriginal Video for Windows is a collection of 16 bitwindows utilities, dynamic link libraries, and othercomponents. The AVI file and file format is a central part of Video for Windows.Microsoft Visual C++ 5.0 has a Video for Windowsinclude file Vfw.h which contains the various API's thatmake up Video for Windows: * COMPMAN - Installable Compression Manager. * DRAWDIB - Routines for drawing to the display. * VIDEO - Video Capture Driver Interface * * AVIFMT - AVI File Format structure definitions. * MMREG - FOURCC and other things * * AVIFile - Interface for reading AVI Files and AVI Streams * MCIWND - MCI/AVI window class * AVICAP - AVI Capture Window class * * MSACM - Audio compression manager.Microsoft released a Video for Windows 1.0 forWindows 3.1 in November 1992, followed by Video for Windows 1.1. Therehave been several versions of Video for Windows 1.1identified by a trailing alphabetical character such as1.1e The last and most recent version of Video forWindows 1.1 for Windows 3.x is Video for Windows 1.1eThis is available by ftp from Microsoft. Microsoft has provided a 32-bit version of Video for Windowsfor Windows 95, while threatening to replace Video for Windows withActiveMovie. This version has 32 bit versions of the Videofor Windows codecs such as Cinepak. Other DLL's in theVideo for Windows 95 are also 32-bit How much of the Video forWindows in Windows 95 is 32 bit code is not clear; many of thecodecs are clearly 32 bit codecs. Nor is it clear how much has beenchanged or modified besides the convesion to 32-bit code.Windows NT 3.5, 3.51 and Windows NT 4.0 include a Video for Windows forNT. Presumably this is strictly 32-bit. It is not clear howmuch code is shared between the NT Video for Windows and theWindows 95 Video for Windows. Note that hardware devicedrivers are different between Windows 95 and NT 3.5/3.51/4.0.ActiveMovie 1.0 and DirectShow (formerly ActiveMovie 2.0) are32-bit successors to Video for Windows for both Windows 95and Windows NT. These support AVI files. ActiveMovie started out life under the code name Quartz; early Beta releases ofActiveMovie were known as Quartz.ActiveMovie 1.0 is bundled with Windows 95b (OEM Service Release 2.x)and Internet Explorer 3.x/4.x for Windows 95. It can also be downloadedand installed in Windows 95 separately. Note that ActiveMovie 1.0does NOT completely replace Video for Windows. For example, ActiveMovie1.0 does not provide a video capture mechanism. Video capture stilluses Video for Windows capture drivers. ActiveMovie 1.0 is a 32 bit software component that can run in NT'suser mode. It runs under Windows NT 4.0 as well as Windows 95. DirectShow (ActiveMovie 2.0) will supposedly add a number of newfeatures including video capture support, kernel mode streaming, andmiscellaneous other features.VIDEO FOR WINDOWS under WINDOWS NT 4.0Under NT 4.0, Video for Windows is implemented as a collection of32-bit DLL's in the Microsoft 32-bit Common Object File Format or COFFformat. These are usually located in the /WINNT/SYSTEM32 directorywhere Windows NT stores most of the system DLL's, drivers, and soforth.MSVFW32.DLL ( Microsoft Video for Windows DLL - NT 4.0 )AVIFIL32.DLL ( AVIFILE API for Reading and Writing AVI Files and Streams )AVICAP32.DLL ( AVI Capture Window Class )MCIAVI32.DLL ( Video for Windows MCI Driver )MSACM32.DRV ( Microsoft Audio Compression Manager )MSACM32.DLL ( more Microsoft Audio Compression Manager )MSRLE32.DLL ( Microsoft RLE Video Codec )IR32_32.DLL ( Intel Indeo 3.2 Video Codec )MSVIDC32.DLL ( Microsoft Video 1 Codec )ICCVID.DLL ( Cinepak for Windows 32 - Radius )What is in MSVFW32.DLL?MSVFW32.DLL includes the DRAWDIB, Installable CompressionManager or ICM, and MCI Windows components of Video forWindows. Other components are stored in other DLL's.This is a dump of the functions exported by MSVFW32.DLLVersion 4.00Microsoft (R) COFF Binary File Dumper Version 5.00.7022Copyright (C) Microsoft Corp 1992-1997. All rights reserved.Dump of file msvfw32.dllFile Type: DLL Section contains the following Exports for MSVFW32.dll 0 characteristics 31EC70E9 time date stamp Tue Jul 16 21:49:45 1996 0.00 version 2 ordinal base 47 number of functions 47 number of names ordinal hint name 3 0 DrawDibBegin (00001E14) 4 1 DrawDibChangePalette (00008C30) 5 2 DrawDibClose (0000888A) 6 3 DrawDibDraw (000010A6) 7 4 DrawDibEnd (00008BEC) 8 5 DrawDibGetBuffer (00008EFC) 9 6 DrawDibGetPalette (00002F97) 10 7 DrawDibOpen (00003E0A) 11 8 DrawDibProfileDisplay (00003EBA) 12 9 DrawDibRealize (00001D49) 13 A DrawDibSetPalette (00001C0D) 14 B DrawDibStart (00002EEB) 15 C DrawDibStop (00002F42) 16 D DrawDibTime (00008C2B) 17 E GetOpenFileNamePreview (0000C7DC) 18 F GetOpenFileNamePreviewA (0000C7DC) 19 10 GetOpenFileNamePreviewW (0000C6A5) 20 11 GetSaveFileNamePreviewA (0000C7EC) 21 12 GetSaveFileNamePreviewW (0000C7CC) 22 13 ICClose (000035E0) 23 14 ICCompress (00004CE5) 24 15 ICCompressorChoose (00005F61) 25 16 ICCompressorFree (00005615) 26 17 ICDecompress (00004D4B) 27 18 ICDraw (0000106A) 28 19 ICDrawBegin (00001B95) 29 1A ICGetDisplayFormat (00004D8E) 30 1B ICGetInfo (00004C60) 31 1C ICImageCompress (00005A96) 32 1D ICImageDecompress (00005D2A) 33 1E ICInfo (00002FEB) 34 1F ICInstall (00004574) 35 20 ICLocate (0000372E) 36 21 ICMThunk32 (0000841C) 37 22 ICOpen (0000337C) 38 23 ICOpenFunction (00003B53) 39 24 ICRemove (0000488B) 40 25 ICSendMessage (00001000) 41 26 ICSeqCompressFrame (000059A7) 42 27 ICSeqCompressFrameEnd (00005907) 43 28 ICSeqCompressFrameStart (000056E4) 44 29 MCIWndCreate (0000C988) 45 2A MCIWndCreateA (0000C988) 46 2B MCIWndCreateW (0000C8CC) 47 2C MCIWndRegisterClass (0000C83F) 48 2D StretchDIB (00009D13) 2 2E VideoForWindowsVersion (000041D1) Summary 8000 .data 3000 .rdata 2000 .reloc 3000 .rsrc 11000 .textVIDEO FOR WINDOWS FOR WINDOWS 95Microsoft distributed a new Video for Windows for Windows 95while emphasizing Quartz/ActiveMovie/DirectShow in itsmarketing.Video for Windows 95 FilesMSRLE32.DLL (32-bit Microsoft RLE Video Codec)IR32_32.DLL (32-bit Indeo 3.2 Video Codec)ICCVID.DLL (32-bit Radius Cinepak Video Codec)MSVIDC32.DLL (32-bit Microsoft Video 1 Video Codec )MSVIDEO.DLL (16-bit Video for Windows DLL) MCIAVI.DRV (16-bit AVI Video MCI Driver)AVIFILE.DLL (16-bit AVIFILE)AVICAP.DLL (16-bit AVICAP)AVICAP32.DLL (32-bit AVICAP)MSVFW32.DLL (32-bit Video for Windows DLL - with VfW API)AVIFIL32.DLL (32-bit AVIFILE)SUMMARYVideo for Windows 1.0 (Windows 3.x)Video for Windows 1.1 (a-e) (Windows 3.x)Video for Windows (Windows 95 - has 32-bit codecs and other 32-bit DLL's)Video for Windows (Windows NT 3.5, 3.51, and 4.0)Quartz (Betas of ActiveMovie) (Windows 95)ActiveMovie 1.0 (Windows 95 and NT 4.0)ActiveMovie 2.0 (DirectShow) (probably Windows 97/98/Memphis and NT 5.0)Return to Top

    WAVE

    The Microsoft Windows audio (sound) input/output system, commonlyreferred to as Wave or WAVE, predates Video for Windows, which iswrapped around WAVE in various ways. The audio tracks in AVI filesare simply waveform audio (or WAV) data used by the wave system.Video for Windows parses the AVI files, extracts the WAV data, andpipes the WAV data to the WAVE system. Video for Windows handles thevideo track if present.Traditionally, audio input and output devices such as Sound BlasterCards have a WAVE audio input/output driver to play WAV (waveformaudio) files.The simplest waveform audio files consists of a header followed byPulse Coded Modulation (PCM) sound data, usually uncompressed 8 or 16bit sound samples. WAVE also provides a mechanism for audio codecs.See elsewhere in the AVI Overview for further information on audiocodecs and audio compression.WAVE is present in Windows 3.1 and Windows 95. A different WAVEsystem is present in Windows NT 3.5, 3.51, and 4.0 At least thehardware device drivers for sound cards must be different in NT.ActiveMovie appears to be replacing WAVE.Return to Top

    What is the AVI File Format?

    AVI Files are a special case of RIFF files. RIFF isthe Resource Interchange File Format. This is a generalpurpose format for exchanging multimedia data typesthat was defined by Microsoft and IBM during theirlong forgotten alliance.Kevin McKinnon writes:In fact, RIFF is a clone of the IFF format invented by Electronic Arts in 1984. They invented the format for Deluxe Paint on the Amiga, and IFF quickly became the standard for interchange on that platform, maintained eventually by Commodore right up 'til it's demise. EA also ported Deluxe Paint to the PC platform and brought IFF with it.IFF even used the 4-character headers (FourCC), though at the time it was simply called a LONGWORD that some clever people decided to pair into four charcter because they looked good in #define's. ;)RIFF is so close to IFF that the good IFF parser routines will (mostly) correctly parse RIFF files.----End of Kevin----Further information on the IFF format is available at:http://www.ipahome.com/gff/textonly/summary/iff.htm

    RIFF Files

    RIFF files are built from (1) RIFF Form Header 'RIFF' (4 byte file size) 'xxxx' (data) where 'xxxx' identifies the specialization (or form) of RIFF. 'AVI ' for AVI files. where the data is the rest of the file. The data is comprised of chunks and lists. Chunks and lists are defined immediately below. (2) A Chunk (4 byte identifier) (4 byte chunk size) (data) The 4 byte identifier is a human readable sequence of four characters such as 'JUNK' or 'idx1' (3) A List 'LIST' (4 byte list size) (4 byte list identifier) (data) where the 4 byte identifier is a human readable sequence of four characters such as 'rec ' or 'movi' where the data is comprised of LISTS or CHUNKS.

    AVI File Format

    AVI is a specialization or "form" of RIFF, described below:'RIFF' (4 byte file length) 'AVI ' // file header (a RIFF form)'LIST' (4 byte list length) 'hdrl' // list of headers for AVI fileThe 'hdrl' list contains:'avih' (4 byte chunk size) (data) // the AVI header (a chunk)'strl' lists of stream headers for each stream (audio, video, etc.) inthe AVI file. An AVI file can contain zero or one video stream andzero, one, or many audio streams. For an AVI file with one video andone audio stream:'LIST' (4 byte list length) 'strl' // video stream list (a list)The video 'strl' list contains:'strh' (4 byte chunk size) (data) // video stream header (a chunk)'strf' (4 byte chunk size) (data) // video stream format (a chunk)'LIST' (4 byte list length) 'strl' // audio stream list (a list)The audio 'strl' list contains:'strh' (4 byte chunk size) (data) // audio stream header (a chunk)'strf' (4 byte chunk size) (data) // audio stream format (a chunk)'JUNK' (4 byte chunk size) (data - usually all zeros) // an OPTIONAL junk chunk to align on 2K byte boundary'LIST' (4 byte list length) 'movi' // list of movie data (a list)The 'movi' list contains the actual audio and video data. This 'movi' list contains one or more ... 'LIST' (4 byte list length) 'rec ' // list of movie records (a list) '##wb' (4 byte chunk size) (data) // sound data (a chunk) '##dc' (4 byte chunk size) (data) // video data (a chunk) '##db' (4 byte chunk size) (data) // video data (a chunk)A 'rec ' list (a record) contains the audio and video data for a single frame. '##wb' (4 byte chunk size) (data) // sound data (a chunk) '##dc' (4 byte chunk size) (data) // video data (a chunk) '##db' (4 byte chunk size) (data) // video data (a chunk)The 'rec ' list may not be used for AVI files with only audio or onlyvideo data. I have seen video only uncompressed AVI files that didnot use the 'rec ' list, only '00db' chunks. The 'rec ' list is usedfor AVI files with interleaved audio and video streams. The 'rec 'list may be used for AVI file with only video. ## in '##dc' refers to the stream number. For example, video data chunksbelonging to stream 0 would use the identifier '00dc'. A chunk ofvideo data contains a single video frame.Alexander Grigoriev writes ...John,##dc chunk was intended to keep compressed data, whereas ##db chunknad(sic) to be used for uncompressed DIBs (device independent bitmap),but actually they both can contain compressed data. For example,Microsoft VidCap (more precisely, video capture window class) writesMJPEG compressed data in ##db chunks, whereas Adobe Premiere writesframes compressed with the same MJPEG codec as ##dc chunks.----End of AlexanderThe ##wb chunks contain the audio data.The audio and video chunks in an AVI file do not contain time stamps or frame counts. The data is ordered in time sequentially asit appears in the AVI file. A player application should display thevideo frames at the frame rate indicated in the headers. Theapplication should play the audio at the audio sample rate indicatedin the headers. Usually, the streams are all assumed to start attime zero since there are no explicit time stamps in the AVI file.The lack of time stamps is a weakness of the original AVI fileformat. The OpenDML AVI Extensions add new chunks with timestamps. Microsoft's ASF (Advanced or Active Streaming Format), whichMicrosoft claims will replace AVI, has time stamp "objects".In principle, a video chunk contains a single frame of video. Bydesign, the video chunk should be interleaved with an audio chunkcontaining the audio associated with that video frame. The dataconsists of pairs of video and audio chunks. These pairs may beencapsulated in a 'REC ' list. Not all AVI files obey this simplescheme. There are even AVI files with all the video followed by allof the audio; this is not the way an AVI file should be made. The 'movi' list may be followed by: 'idx1' (4 byte chunk size) (index data) // an optional index into movie (a chunk) The optional index contains a table of memory offsets to eachchunk within the 'movi' list. The 'idx1' index supports rapidseeking to frames within the video file. The 'avih' (AVI Header) chunk contains the following information: Total Frames (for example, 1500 frames in an AVI) Streams (for example, 2 for audio and video together) InitialFrames MaxBytes BufferSize Microseconds Per Frame Frames Per Second (for example, 15 fps) Size (for example 320x240 pixels) Flags The 'strh' (Stream Header) chunk contains the following information: Stream Type (for example, 'vids' for video 'auds' for audio) Stream Handler (for example, 'cvid' for Cinepak) Samples Per Second (for example 15 frames per second for video) Priority InitialFrames Start Length (for example, 1500 frames for video) Length (sec) (for example 100 seconds for video) Flags BufferSize Quality SampleSize For video, the 'strf' (Stream Format) chunk contains the following information: Size (for example 320x240 pixels) Bit Depth (for example 24 bit color) Colors Used (for example 236 for palettized color) Compression (for example 'cvid' for Cinepak) For audio, the 'strf' (Stream Format) chunk contains the followinginformation: wFormatTag (for example, WAVE_FORMAT_PCM) Number of Channels (for example 2 for stereo sound) Samples Per Second (for example 11025) Average Bytes Per Second (for example 11025 for 8 bit sound) nBlockAlign Bits Per Sample (for example 8 or 16 bits) Each 'rec ' list contains the sound data and video data for a singleframe in the sound data chunk and the video data chunk. Other chunks are allowed within the AVI file. For example, I haveseen info lists such as 'LIST' (4 byte list size) 'INFO' (chunks with information on video) These chunks that are not part of the AVI standard are simplyignored by the AVI parser. AVI can be and has been extended by addinglists and chunks not in the standard. The 'INFO' list is a registeredglobal form type (across all RIFF files) to store information thathelps identify the contents of a chunk. The sound data is typically 8 or 16 bit PCM, stereo or mono,sampled at 11, 22, or 44.1 KHz. Traditionally, the sound hastypically been uncompressed Windows PCM. With the advent ofthe WorldWide Web and the severe bandwidth limitations of theInternet, there has been increasing use of audio codecs. ThewFormatTag field in the audio 'strf' (Stream Format) chunkidentifies the audio format and codec.

    OpenDML AVI File Format Extensions

    The Open Digital Media (OpenDML) Consortium has defined an OpenDMLAVI File Format Extensions which extend AVI to support a variety offeatures required for professional video production. These includesupport for fields (not just frames), file sizes larger than 1 GB,timecodes, and many other features. Microsoft has reportedlyincorporated OpenDML AVI support in DirectShow 5.1 (ActiveMovie 5.1).It is also used by various professional video applications for the PC,in particular Matrox's DigiSuite software. The Open Digital Media Consortium AVI File Format Extensions add new lists and chunks to the AVI file which contain extradata such as timecodes not incorporated in the original AVIstandard. OpenDML appears to have been spearheaded by Matrox to improve AVIfor professional video authoring and editing. Matrox makes a varietyof PC video products such as DigiSuite for professional and broadcastvideo authoring and editing. The OpenDML AVI File Format Extensionsare primarily for the Motion JPEG AVI files used for professionalvideo authoring and editing. The OpenDML effort seems to have beenpushed to one side with the advent of ActiveMovie, NetShow, Advanced(formerly Active) Streaming Format (ASF) Files, and other Microsoftinitiatives. On Oct. 2, 1997, the OpenDML AVI File Format Extensions Version 1.02specification document (dated February 28, 1996) was available atthe Matrox Electronic Systems, Ltd. Web site at:http://www.matrox.com/videoweb/odmlff2.htmThe specification is in Adobe Portable Document Format (PDF). SinceMatrox seems to rearrange their site from time to time and one can'talways find the specification, I've included a link to a copy of the PDFversion of the specification on my Web site.PDF OpenDML AVI File Format Extensions Specification DocumentGet Adobe Acrobat Reader (PDF Viewer)

    Where to get the exact AVI specification?

    Microsoft Visual C++ 5.0 has a Video for Windows includefile Vfw.h which gives the exact AVI data structures such asthe various headers used in AVI files. The file also hascomments explaining the structure of the AVI file.Video for Windows refers to the AVI Format by the mnemonicAVIFMT. At one time, the format information was apparentlystored in an AVIFMT.H header file. The format information now appears consolidated in Vfw.hIn addition to the Video for Windows header files, Chapter Four of theVideo for Windows Programmer's Guide, "AVI Files", gives a detailedspecification of the AVI file format.Return to Top

    AVI and Windows Bitmaps (DDB, DIB, ...)

    Microsoft Windows represents bitmapped images internally and in filesas Device Dependent Bitmaps (DDB), Device Independent Bitmaps (DIB), andDIB Sections. Uncompressed 'DIB ' AVI files represent video frames asDIB's. Various multimedia API's that work with AVI use Windowsbitmapped images.Prior to Windows 3.0, Windows relied on Device Dependent Bitmaps forbitmapped images. A DDB is stored in a format understood by thedevice driver for a particular video card. As the name suggests, DDB'sare not generally portable.The structure of a DDB is:typedef struct tagBITMAP { // bm LONG bmType; /* always zero */ LONG bmWidth; /* width in pixels */ LONG bmHeight; /* height in pixels */ LONG bmWidthBytes; /* bytes per line of data */ WORD bmPlanes; /* number of color planes */ WORD bmBitsPixel; /* bits per pixel */ LPVOID bmBits; /* pointer to the bitmap pixel data */} BITMAP; Usually the pixel data immediately follows the BITMAP header.(BITMAP header)(Pixel Data)The HBITMAP handles used by GDI are handles to Device Dependent Bitmaps.The GDI function BitBlt and StretchBlt are actually using DeviceDependent Bitmaps.With Windows 3.0, Microsoft introduced the Device Independent Bitmap orDIB, the reigning workhorse of bitmapped images under Windows. The DIBprovided a device independent way to represent bitmapped images, bothmonochrome and color.Windows retains DDB's despite the introduction of the DIB. Forexample, to use a DIB, you might call:hBitmap = CreateDIBitmap(...)CreateDIBitmap creats a DDB from a DIB, returning the GDI HBITMAPhandle of the DDB for further GDI calls. At a low level, Windowsand GDI are still using DDB's.The DIB files have a standard header that identifies the format, size,color palette (if applicable) of the bitmapped image. The headeris a BITMAPINFO structure.typedef struct tagBITMAPINFO { BITMAPINFOHEADER bmiHeader; RGBQUAD bmiColors[1];} BITMAPINFO;The BITMAPINFOHEADER is a structure of the form:typedef struct tagBITMAPINFOHEADER{ // bmih DWORD biSize; LONG biWidth; LONG biHeight; WORD biPlanes; WORD biBitCount DWORD biCompression; /* a DIB can be compressed using run length encoding */ DWORD biSizeImage; LONG biXPelsPerMeter; LONG biYPelsPerMeter; DWORD biClrUsed; DWORD biClrImportant; } BITMAPINFOHEADER; bmiColors[1] is the first entry in an optional color palette or colortable of RGBQUAD data structures. True color (24 bit RGB) imagesdo not need a color table. 4 and 8 bit color images use a color table.typedef struct tagRGBQUAD { // rgbq BYTE rgbBlue; BYTE rgbGreen; BYTE rgbRed; BYTE rgbReserved; /* always zero */} RGBQUAD; A DIB consists of (BITMAPINFOHEADER)(optional color table of RGBQUAD's)(data for thebitmapped image)A Windows .BMP file is a DIB stored in a disk file. .BMP files prependa BITMAPFILEHEADER to the DIB data structure.typedef struct tagBITMAPFILEHEADER { // bmfh WORD bfType; /* always 'BM' */ DWORD bfSize; /* size of bitmap file in bytes */ WORD bfReserved1; /* always 0 */ WORD bfReserved2; /* always 0 */ DWORD bfOffBits; /* offset to data for bitmap */} BITMAPFILEHEADER; Structure of Data in a .BMP File(BITMAPFILEHEADER)(BITMAPINFOHEADER)(RGBQUAD color table)(Pixel Data)The Win32 API documentation from Microsoft provides extensive information on the data structures in a DIB.In Windows 95 and Windows NT, Microsoft added the DIBSection to provide a more efficient way to use DIB's in programs. The DIBSectionwas originally introduced in Windows NT to reduce the number ofmemory copies during blitting (display) of a DIB. Return to Top

    ActiveMovie

    Active Movie is a new multimedia architecture for Windows 95 andWindows NT (4.0 and after). ActiveMovie includes support forplaying AVI, QuickTime (.MOV), and MPEG files. ActiveMovie isapparently intended to supersede Video for Windows.ActiveMovie 1.0 ships with the OEM Service Release 2 (OSR2) of Windows 95.It did not ship with prior releases of Windows 95 but was availableseparately through the ActiveMovie SDK. ActiveMovie 1.0 is also bundled with Microsoft's Internet Explorer forWindows 95 and NT 4.0 Internet Explorer can be downloaded from theMicrosoft Web site at:http://www.microsoft.com/ie/Active Movie 1.0 can be downloaded by itself from the Microsoft InternetExplorer site. (6/6/97)ActiveMovie 1.0 appears to be a 32 bit software component that runsunder both Windows 95 and Windows NT 4.0 user mode. ActiveMovie provides at least three different programminginterfaces: - The ActiveMovie ActiveX Control - ActiveMovie Component Object Model (COM) interfaces - The OM-1 MPEG MCI (Media Control Interface) command setAmongst other things, the ActiveMovie ActiveX Control can be embeddedin HTML Web pages and programmed via VBScript or JavaScript. It can alsobe programmed using Visual C++ or Visual Basic as part of applications.The ActiveMovie COM interaces can be accessed through Visual C++ orVisual Basic.ActiveMovie supports a subset of the Media Control Interface (MCI)commands familiar to Video for Windows programmers. These commands canbe accessed through the mciSendCommand(...) and mciSendString(...)functions in C/C++.ActiveMovie 1.0 does NOT provide video capture. Windows 95 withActiveMovie 1.0 continues to use the Video for Windows video capture systemand drivers.ActiveMovie 2.0 (renamed DirectShow in 1997) will provide a new,alternative mechanism for video capture. According to informationdistributed by Microsoft at the WDM Device Driver Conference in April,1997, ActiveMovie 2.0 will use the WDM Stream Class under Memphis(formerly Windows 97) and Windows NT 5.0 to implement video capture.This is subject to possible change since neither Memphis nor NT 5.0has been released (7/27/97).Extensive information on ActiveX and ActiveMovie is available at theMicrosoft Web site.ActiveMovie 1.0 SDK Documentation at (6/28/97):http://www.microsoft.com/devonly/tech/amov1doc/Return to Top

    GUID's and AVI

    GUID stands for Global Unique IDentifier.In Microsoft's Component Object Model (COM) morass, an object orientedprogramming model that incorporates MFC (Microsoft FoundationClasses), OLE (Object Linking Embedding), ActiveX, ActiveMovie andeverything else Microsoft is hawking lately, a GUID is a 16 byte or128 bit number used to uniquely identify objects, data formats,everything.Within ActiveMovie, there are GUID's for video formats, correspondingto the FOURCC's or Four Character Codes used in Video for Windows.These are specified in the file uuids.h in the Active Movie SoftwareDeveloper Kit (SDK). ActiveMovie needs to pass around GUID's thatcorrespond to the FOURCC for the video in an AVI file.With proper programming, this should be hidden from end users butActiveMovie programmers need to know about GUID's.Return to Top

    What are the GUIDs for the Video for Windows Codecs?

    Video for Windows codecs are identified by a thirty-two bit FourCharacter Code (FOURCC). A Four Character Code is a thirty-two bitvalue formed from the ASCII codes for four characters. Typically, thefour characters are a memnonic for the item identified. For example,the popular Cinepak video codec is 'CVID'.Microsoft has introduced 128-bit (16 byte) Globally UniqueIdentifiers (GUIDs) for identifying everything in theMicrosoft Universe. Microsoft has established a mappingprocedure from the human readable Four Character Codes toGUIDs for video codecs. Replace the "x"'s in the GUIDbelow with the 32-bit value built from the Four CharacterCode. The Four Character Code is in 7-bit ASCII.xxxxxxxx-0000-0010-8000-00AA00389B71For example, the GUID for Radius Cinepak is:44495643-0000-0010-8000-00AA00389B7144 is the hexadecimal (base 16) ASCII code for 'D'49 is the hexadecimal (base 16) ASCII code for 'I'56 is the hexadecimal (base 16) ASCII code for 'V'43 is the hexadecimal (base 16) ASCII code for 'C'Note that the order of the characters is reversed from naive expectation.Return to Top

    DirectShow

    DirectShow is Microsoft's new name for ActiveMovie 2.0 Microsofthas shifted to marketing ActiveMovie as an integral part ofDirectX. Apparently DirectShow (ActiveMovie 2.0) will be released to the generalpublic as part of Direct X 5.0.Return to Top

    DirectDraw

    DirectDraw, one of the components of DirectX, is a new ApplicationsProgramming Interface (API) that is part of Windows 95 and Windows NT4.0. DirectDraw allows programs to directly access video memory andother hardware features in video display cards. Direct Draw alsodefines new device drivers for graphic/video display adapters tosupersede the GDI display drivers. DirectDraw needs the newdevice drivers.DirectDraw consists of a new API and new hardware drivers known asthe Direct Draw Hardware Abstraction Layer (HAL). In the Windows 3.1 Graphic Device Interface (GDI), an applicationprogram never writes directly to the memory in a display card. Itwrites to a buffer in main memory within Windows. GDI invokes a GDIvideo device driver and copies the image from main memory to the videomemory of the video card. This multiple copying of the imageinevitably slows down the display.The DirectDraw API provides a mechanism allowing appliation programsto write directly into the video card's memory. It also provides amechanism to access various special features in video cards such ascolor space conversion, hardware scaling, z-buffering, alpha blending,and so forth.Video card manufacturers must provide a DirectDraw driver for DirectDrawto work with their card. Microsoft's ActiveMovie uses DirectDraw to achieve faster playback ofAVI, QuickTime, and MPEG files.There is extensive information on the DirectDraw and DirectX API's at theMicrosoft Web site.The DirectX 3 SDK can be downloaded from the Microsoft DeveloperOnline Web site (6/28/97):http://www.microsoft.com/msdn/Select Microsoft SDKs from the Technical Information section, or pointyour browser at:http://www.microsoft.com/msdn/sdk/Versions of DirectX - DirectX 1 - DirectX 2 - DirectX 3 - DirectX 3A (latest as of 2/18/97) - DirectX 5.0 (in development?) - DirectX 6.0 (mentioned occasionally by Microsoft) Return to Top

    What is a driver?

    Most often, driver refers to a software component that handles control and communication with hardware in a computer. Mostbut not all hardware device drivers run in a privileged modesuch as the Ring Zero mode of the Intel 80x86 processors.Microsoft Windows uses the term driver to refer to several differentsoftware components. - Hardware Device Drivers - Windows 3.x or 95 Virtual Device Drivers (VxD's) - not all VxD's access hardware - Microsoft Windows Installable Drivers such as - Media Control Interface or MCI Drivers - Video for Windows Codecs (Compressor/Decompressors) - Audio Codecs (Compressor/Decompressors)Hardware Device Drivers include MS-DOS device drivers, DOS Terminateand Stay Resident Programs that access hardware, Windows 3.x and 95VxD's (Virtual Device Drivers) that access hardware, Windows DLL'sthat access hardware but do not run in Ring Zero, Windows NTkernel-mode device drivers, and the new Win32 Driver Model (WDM) driversfor Memphis/Windows 98 and NT 5.0Microsoft Windows Installable Drivers are Ring Three (Windows 95) oruser-mode (Windows NT) Dynamic Link Libraries (DLL's) with a singleentry point DriverProc(). MCI drivers, Video for Windows Codecs,Microsoft Audio Compression Manager Codecs, and a variety of othersoftware components are Installable Drivers. Some installabledrivers are hardware drivers.Return to Top

    GDI Device Drivers

    In Windows 3.1, and to a lesser extent Windows 95, the Graphic DeviceInterface or GDI is the system that handles graphic display, includingputting bitmaps on the display monitor. Amongst other things, GDIdefines a set of GDI functions that application programs call such asBitBlt(...) to display graphics on the screen. GDI also controlsprinters and other graphic output devices.Windows NT also provides a GDI system, but the underlying hardwaredevice drivers are different. Windows 3.1 GDI drivers won't workunder NT. Application programs written using the GDI API will usuallywork under NT.GDI is device independent. To achieve this, GDI uses GDI devicedrivers loaded dynamically as needed.The most commonly used GDI device driver is the DISPLAY device (fordisplay monitors). In Windows 3.1, this is specified by lines suchas:display.drv=SUPERVGA.DRVin the SYSTEM.INI file. SUPERVGA.DRV is a generic super vga graphicdisplay adapter driver shipped with Windows 3.1 SUPERVGA.DRV is a GDIDevice DriverThe printer driver is another common GDI device driver.In Windows 3.1 or Windows 95 without DirectDraw, GDI handles displayof video frames on the display monitor.GDI defines a set of standard functions exported by GDI DeviceDrivers. A GDI Device Driver can also report that it does not supporta particular function.Standard Functions for GDI Device DriverEntry Name Description01 BitBlt Transfer bits from src (source) to dest (destination) rect (rectangle)02 ColorInfo Converts between logical and physical colors....30 BitmapBits Sets, retrieves, copies bitmap data.Video card manufacturers write and provide GDI Device Drivers for video cards.When Video for Windows plays an AVI file, Video for Windows usuallyuses the Media Control Interface (MCI) driver for AVI files(MCIAVI.DRV). The MCI driver will call GDI to display each decodedframe of video and WAVE to output the decoded audio to the sound card.In Windows 95 or NT 4.0, ActiveMovie 1.0 has "renderers" which caninvoke GDI or DirectDraw depending on the situation to display thedecoded video frames. There are also audio renderers to output thedecoded audio from an AVI, QuickTime, or MPEG file.Return to Top

    Direct Draw Hardware Abstraction Layer

    DirectDraw is a replacement for GDI for Windows 95 andWindows NT 4.0. See elsewhere in this overview for sections onGDI and DirectDraw.The Direct Draw Hardware Abstraction Layer (HAL) definesDirect Draw device drivers for graphics/video displayadapters. Graphics and video card manufacturers provide DirectDraw device drivers. For Direct Drawto work it must have these device drivers.DirectDraw also defines a DirectDraw Applications ProgrammingInterface (API), a standard set of function calls invoked byapplications. The DirectDraw API in turn calls the DirectDraw HAL to access the graphics/video display adapter.ActiveMovie can invoke DirectDraw for video output underWindows 95 and Windows NT 4.0.Return to Top

    Virtual Device Drivers

    In Windows 3.x and Windows 95, Virtual Device Drivers or VXD's areusually the hardware device drivers. They run in a privileged mode ofthe Intel 80x86 processor known as Ring Zero. Video display adaptersand video capture cards usually have an associated VXD written by thecard or chip manufacturer.Note that some Windows device drivers are implemented as Dynamic LinkLibraries (DLL's) that do not run in the privileged, Ring Zero, modeof the 80x86 processor or as MS-DOS programs that access hardware.These device drivers are not VXD's. There are some things that onlyVXD's can do. Most PC hardware, especially with high bandwidthrequirements, use VXD's.Device drivers for video display adapters are rarely a single VXD.Often the Device Driver Interface (DDI) is implemented as a DynamicLink Library which does not run at Ring Zero. Only parts of thedevice driver that need to run at Ring Zero are in the VXD. A full video display device driver is often built of severalfiles, frequently including one or more VXDs.VXD's are usually found in the /WINDOWS/SYSTEM directory.VXD's will not work for hardware under Windows NT 3.51 or NT 4.0Windows NT has its own Windows NT Driver Model for device drivers.In "Memphis", formerly Windows 97, and NT 5.0, Microsoft is attemptingto provide a common driver model known as WDM or Win32 Driver Model sothat the same drivers can be used in both Memphis and NT.Return to Top

    Windows NT Driver Model

    Windows NT (3.51, 4.0) has its own system of hardware devicedrivers. While NT can often run Windows 3.x and Windows 95applications, NT cannot use Windows 3.x or Windows 95device drivers (the Virtual Device Drivers or VxD's).For most people working with AVI, or video in general, the mainpoint to remember is that different drivers are needed forNT than Windows 95 (or Windows 3.x). Most hardware manufacturersprovide both Windows 3.x, 95, and NT drivers.TOOLSProgrammers will need the Windows NT DDK (Device Driver Kit)to develop Windows NT drivers. This is available in asubscription to Microsoft Developer Network (Professional).http://www.microsoft.com/msdn/Return to Top

    Win32 Driver Model (WDM)

    The Win32 Driver Model (WDM) is a new device driver system forMemphis (formerly Windows 97) and Windows NT 5.0 The notion is thatthe same device drivers will work under both Memphis and NT 5.0WDM is largely the Windows NT Driver Model used in NT 3.51 and 4.0It is still under development. Video display card and video capturecard companies will presumably be providing WDM drivers forMemphis and NT 5.0 in the future.Memphis is supposed to be backward compatible so that Windows 95 Device Drivers will still work under Memphis.Similarly, NT 4.0 Device Drivers will still work underNT 5.0 A WDM Device Driver will work under both Memphis andNT 5.0.Return to Top

    MMX

    MMX or Multimedia Extensions to the Pentium instruction set are57 new instructions that accelerate some graphics, imaging, andmultimedia operations. Multimedia often involves small data typessuch as 8 bit or 16 bit pixels that can be processed in parallel.For example, in principle, a 32 bit instruction could operate offour 8 bit pixels in parallel. A simple example would be adding four 8 bit pixels in parallel.The MMX instructions add clipping for underflow and overflow situations. 255 0 0 255 Normal addition of four 8 bit pixels backed in 32 bits+ 0 0 0 255------------- 255 0 1 0 255 0 0 255 MMX style clipping of overflow+ 0 0 0 255-------------- 255 0 0 255Intel developed the MMX instructions and added them to recentversions of the Pentium chip known as the P55C or Pentium with MMX.The MMX instructions were also added to the Pentium Pro. The PentiumPro with MMX was code named Klamath, but called the Pentium II whenactually shipped in 1997.MMX can accelerate various graphics and multimedia operations. It canaccelerate video codecs. In particular, the block Discrete CosineTransform used in JPEG, Motion JPEG, H.261, H.263, H.263+, MPEG-4,MPEG-1, and MPEG-2 can be accelerated using MMX instructions.Initially compilers have not supported generation of MMX instructions, socritical portions of the multimedia algorithms must be hand-coded in Pentium assembler using the MMX instructions.An MMX version of a codec may be able to encode and decode an AVIfile (for example) faster on a PC with MMX.DOCUMENTATION ON MMXFurther information on MMX is available at the Intel Web site fordevelopers:http://developer.intel.com/sites/developerClick on the Literature Center link, then select "Pentium Processorwith MMX" from the pull down list of products.This information is dated August 1, 1997. The Intel Web site changesfrom time to time.In addition to various on-line documentation at the Web site, Intelhas some manuals on MMX:Intel Architecture MMX Technology Developers Manual (Order No. 243013)Intel Architecture MMX Technology Programmer's Reference Manual(Order No. 243007)TOOLS FOR WORKING WITH MMXIntel provides an MMX Technology Macro Package for use withthe Microsoft Macro Assembler (MASM). This can be downloaded from:http://developer.intel.com/design/perftool/mmx1mac/Intel markets an Intel C/C++ compiler plug-in for MicrosoftVisual C/C++ 4.x/5.0. This plug-in includes "specialcompiler intrinsics" to support MMX. These allow a programmerto use the call syntax of C functions instead of manuallycoding in assembly language. Example of an "intrinsic"__m64 _m_pmaddwd(__m64 m1, __m64 m2)http://developer.intel.com/design/perftool/icl24/The Intel C/C++ compiler plug-in is available on the VTuneCD-ROM. VTune is discussed below.Intel markets a product called the VTune (TM) Performance Analyzer forprofiling programs on the Intel architecture at the machineinstruction level. VTune includes support for the MMX instructionsand has been used to profile and optimize MMX code. The VTune CD-ROMincludes a number of other Intel freebies and products such as theIntel C/C++ compiler plug-in that may be useful developing MMXsoftware.http://developer.intel.com/design/perftool/vtune/Return to Top

    ActiveX

    NOTE: ActiveX is NOT ActiveMovie. There is an ActiveMovie ActiveXcontrol, but ActiveX is far more than this.ActiveX is a stripped down version of OLE (Object Linking andEmbedding) targetted for the World Wide Web. An ActiveX component orcontrol is a software component written in Visual Basic, Visual C++, orJava that conforms to the ActiveX API. This API is a variant ofOLE, designed to create small objects that can be dowloaded over theInternet.An ActiveX object or control may reside on a Web page to be downloadedand run when Microsoft's Internet Explorer views the page. An ActiveXcontrol can be the ActiveMovie ActiveX control which plays AVI and othervideo formats supported by ActiveMovie. An ActiveX control can be anentertaining animation, a game like tic tac toe, anything. In thissense, ActiveX objects are similar to Java applets.Unlike Java applets, once an ActiveX control has been downloaded onceit remains on the downloading machine and can be used again withoutbeing dowloaded again.Also unlike Java, ActiveX controls are tied to a particulararchitecture, Windows 95 or Windows NT. It is not clear how muchsupport Microsoft will give for ActiveX on non-Windows platforms.Java applets are compiled to a Java bytecode that will run on anyplatform with a Java virtual machine implemented. Java applets willrun on Windows 3.1, Windows 95, Windows NT, PowerMacintosh, Linux,Sun, and various other Unix platforms.There is extensive information on ActiveX at the Microsoft Web site.The ActiveX SDKs can be downloaded from the Microsoft Developer OnlineWeb Site (6/28/97):http://www.microsoft.com/msdn/Select Microsoft SDKs from the Technical Information section or point yourbrowser at:http://www.microsoft.com/msdn/sdk/Netscape Fans:ScriptActive is a Netscape Plug-In that adds support for ActiveX toNetscape.ScriptActive Web SiteReturn to Top

    Playing an AVI File within a Windows Application

    Programmers can play an AVI File within a Windows application byseveral means. The simplest traditional way is to use theMedia Control Interface (MCI). Video for Windows includes anMCI driver mciavi.drv for AVI files. Within the Windows API, programmers can use two C language APIfunctions, mciSendString(...) and mciSendCommand(...), to communicate withthe MCI driver. mciSendString(...) sends MCI command strings such as"play from 0 to 100" to the MCI driver. mciSendCommand(...) sends MCIcommand messages, a straight C type interface, to the MCI driver.The syntax for mciSendString is:MCIERROR mciSendString(LPCTSTR lpszCommand, LPTSTR lpszReturnString, UINT cchReturn, HANDLE hwndCallback); The pointer lpszCommand points to the MCI command string such as"play from 0 to 100". Consult the Microsoft SDK documentation formore details.The syntax for mciSendCommand is:MCIERROR mciSendCommand(MCIDEVICEID IDDevice, UINT uMsg, DWORD fdwCommand, DWORD dwParam); where uMsg is an MCI command message such as MCI_PLAY defined in aninclude file. Consult the Microsoft SDK documentation for moredetails on MCI command messages.mciSendString(...) and mciSendCommand(...) are essentially equivalent.The MCI driver should convert the MCI command string to an MCI commandmessage internally. The MCI command strings provide a more English likeinterface to MCI.For C++ programmers, Microsoft provides a window class MCIWnd to wrapthe MCI operations. Quoting the Microsoft SDK documentation:Microsoft sayeth....MCIWnd is a window class for controlling multimedia devices. A libraryof functions, messages, and macros associated with MCIWnd provides asimple method to add multimedia playback or recording capabilities toyour applications.Using a single function, your application can create a control thatplays devices such as video, CD audio, waveform audio, MIDI (MusicalInstrument Digital Interface), or any device that uses the MediaControl Interface (MCI). Automating playback is also quick andeasy. Using a function and two macros, an application can create anMCIWnd window with the appropriate media device, play the device, andclose both the device and the window when the content has finishedplaying.... end Microsoft sayeth.Consult the Microsoft documentation for more details on MCIWnd.ActiveMovie appears intended to supersede MCI. ActiveMovie includesa restricted subset of MCI for (partial) backward compatibility.However, Microsoft appears to want developers to switch over tonew API's such as ActiveX and ActiveMovie, built on top of Microsoft'sComponent Object Model (COM) object oriented framework.Return to Top

    Reading and Writing an AVI file within a Windows Application

    The Microsoft Windows Win32 SDK (Windows NT and Windows 95) includes aset of functions and macros known as AVIFile for reading, writing, andmanipulating RIFF files including AVI files within a Windows program.These functions are contained within a Dynamic Link Libraryavifile.dll.The AVIFile functions include:AVIFileInit(...)AVIFileOpen(...)AVIFileReadData(...)AVIFileWriteData(...)AVIFileExit(...)and many many others. Consult Microsoft documentation for details.Return to Top

    Where to get C Source Code for AVI Player Including Many Codecs

    Marc Podlipec's Xanim is a free AVI Player for X Windows and Unix.Most of Xanim is available in source code format. The Xanim homepage is:http://xanim.va.pubnix.com/Unfortunately, Xanim's Cinepak and Indeo support is only available inobject module (binary format). Return to Top

    Where to get Detailed Information on Graphics File Formats

    Programmers often need to know the details of the manygraphics file formats, both still image and moving. There are a number of Web sites, books, and other resourcesthat provide detailed information on the many still image and video/animation graphics file formats.Wotsit's File Format Collectionhttp://wotsit.simsware.com/andhttp://www.ipahome.com/gff/textonly/summary/Return to Top

    Where to get Detailed Information on Audio File Formats

    On the Internet, Guido Van Rossum distributes an Audio Formats FAQ (intwo parts) to the alt.binaries.sounds.misc, alt.binaries.sounds.d, and comp.dsp USENET newsgroups.On the Web:http://www.cs.ruu.nl/wais/html/na-dir/audio-fmts/.htmlReturn to Top

    Where to get C Source Code for a JPEG Encoder or Decoder?

    Maybe you want to write your own Motion JPEG codec for AVI. Ithappens.The Independent JPEG Group, also known as IJG, distributes the sourcecode for a JPEG encoder and decoder. The IJG code is incorporated inmany JPEG viewers, is optimized, is free. This is available byanonymous ftp from the UUNET FTP archive.ftp://ftp.uu.net/graphics/jpeg/Return to Top

    Where to get C Source Code for an H.263 Video Encoder or Decoder?

    Telenor Research distributed a free H.263 video encoder and decoder.The code is not optimized. Note that H.263 is subject to a varietyof patents and Telenor includes a disclaimer with the code. Telenorappears to have ceased distributing the code, although it is stillundoubtedly available somewhere on the Web.http://www.fou.telenor.no/brukere/DVC/h263_software/For a time, the Signal Processing and Multimedia Group at theUniversity of British Columbia distributed a free H.263+ video encoderand decoder. They also appear to have ceased distribution. Theircode appears to be available for a licensing fee.http://spmg.ece.ubc.caSee also, their article (available in Adobe PDF format at their web site):"H.263+: Video Coding at Low Bit Rates", Guy Cote, Berna Erol, Michael Gallant, and Faouzi Kossentini, IEEE Transactions onCircuits and Systems for Video Technology, Vol. 8, No. 7, November1998, p. 849-866Return to Top

    Where to get C Source Code for an MPEG Video Encoder or Decoder?

    The MPEG Software Simulation Group or MSSG distributes the C source codefor MPEG-1 and MPEG-2 video encoders and decoders. This code is notoptimized. Go to the MPEG site below and look for MSSG.http://www.mpeg.org/Return to Top

    Where to get C/C++ Source Code for Wavelet Image Compression?

    Geoff Davis distributes a C/C++ source code for wavelet still imagecompression of grayscale images, the Wavelet Image Construction Kit.This code is made available for research purposes.http://www.cs.dartmouth.edu/~gdavis/Also see the SPIHT demonstration programs, http://ipl.rpi.edu/SPIHT/Return to Top

    Where to get an Explanation of Color, Color Spaces, Gamma, and All That

    Charles Poynton maintains an FAQ on Color and an FAQ on Gamma. This isposted in USENET newsgroups regularly and is available on the Web.http://www.inforamp.net/~poynton/notes/colour_and_gamma/ColorFAQ.htmlReturn to Top

    Setup Information or INF Files

    When a video codec or hardware device driver is installed underWindows 3.x, Windows 95, or Windows NT, Windows uses a specialfile known as a Setup Information file. This is also known asa Device Information file in the case of device drivers. Thesefiles have the extension .INF and are also known as INF files.When a user installs a codec or device driver through the ControlPanel, the user points the Windows system to a directory containingan INF file and the various files, such as VxD's or DLLs, to beinstalled.A Setup Information, Device Information, or INF file containsdirectives that tell Windows how to install the new software orhardware. These include changes to the Windows Registry, names andlocations of files to install, and other things.If you are providing a hardware or software product, you may need tocreate an INF file to install your product, driver, etc.End users are often unaware of the INF file. Indeed, its purpose is tohide the complexity of installing hardware or software. But it isgood to be aware that these files exist and Windows needs them toproperly install many drivers, codecs, and so forth.Where AVI is concerned, there are frequently INF files for videocodecs, video display adapters, and video capture cards.

    最新回复(0)