Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers Request free information on products written about or advertised in BYTE Submit a press release, or scan recent announcements Talk with BYTE's staff and readers about products and technologies

ArticlesWindows 95 Graphics Architecture


June 1995 / Core Technologies / Windows 95 Graphics Architecture

New device-driver interfaces in Windows 95 help vendors of graphics boards showcase their hardware-acceleration features

Stanford Diehl

Armed with figures forecasting huge growth in the entertainment market and showing skyrocketing sales of multimedia-capable systems to the home, Microsoft is touting Windows 95 as a multimedia OS from the ground up. With multimedia in mind, Microsoft has revamped the graphics architecture of Windows.

Most of the improved graphics architecture of Windows 95 has already shipped incrementally as APIs for Windows 3.1. These components will be integrated under Windows 95 and will sit on top of a new set of DDIs (device-driver interfaces). They are the DCI (Display Control Inter face) DDI, 3-D DDI, and GDI (Graphical Device Interface) DDI (see the figure "Windows DDI Architecture" ).

They will make it easier for vendors to write drivers that take advantage of specific hardware-acceleration features. The DDIs will act somewhat like DLLs for driver writers. Developers can call specific components of the DDI that their hardware can take advantage of and throw out the parts they don't need. The grand vision is a universal driver architecture for Windows 95 and, eventually, for Windows NT as well.

The DDI Model

DCI, which was developed by Microsoft and Intel, grants video codecs direct access to hardware video accelerators. A video codec can determine if the graphics hardware supports special video functions (e.g., scaling and RGB-to-YUV conversion). If so, the codec can send unscaled YUV (the color format used by motion video) data directly to the video accelerator, freeing the CPU of scaling and conversion tasks. The device driv er exposes a surface of video memory. The application can then write directly into the video surface, either on-screen or off-screen. But DCI is currently only a specification; it's up to the graphics-card vendor to implement specific hardware features in a custom DCI driver. The DCI DDI will let vendors implement DCI functionality with little custom code.

DCI has been a boon for motion video on the Windows platform. It has driven Microsoft to follow the same model for enabling hardware acceleration of other graphics functions. Microsoft announced a set of four APIs that will encapsulate what is now the DCI DDI (see "DCI: The Next Generation"), extending the model beyond digital video and standardizing interfaces for sound, multiuser games, and digital joysticks.

3-D Windows

Windows 95 won't ship with an integrated 3-D engine. Microsoft says it doesn't want to impose an engine on developers who are already tied to existing 3-D APIs. Thus, 3-D engines from Render Morphics (since bought by Microsoft), Criterion, and other vendors will sit atop the 3-D DDI. As DCI does with video accelerators, the 3-D DDI will take advantage of 3-D hardware when it's available. It will allow the hardware to handle supported functions and "fill in" the gaps by emulating other 3-D functions in software. A game might display flat-shaded polygons if played on unaccelerated hardware, but on 3-D hardware, you would get smooth texture mapping while maintaining performance.

The onus is on device-driver developers to enable hardware 3-D acceleration. When 3-D DDI ships ("post-Windows 95 launch," according to Microsoft), a driver developer will enable the set of 3-D functions offered through the DDI that his or her card can handle. Developers won't have to worry about which 3-D engine is being used. The application sends the 3-D function to the DDI, and it handles the rest, sending supported functions to the hardware and passing unsupported functions back to the CPU. Therefore, 3-D applications wi ll no longer have to support different 3-D chips.

Games, Games, Games

For games development (a huge focus of Windows 95), WinG functionality will be integrated into the DIBEngine. Developers who create their own graphic worlds can bypass the GDI by blasting DIBs (device-independent bit maps) directly to the screen. This will allow games to run as fast (or faster) under Windows as under DOS. Games developed previously with the WinG API will run as is under Windows 95.

DOS sessions should be much more robust under Windows 95. Each session can carry its own configuration environment, featuring unloadable device drivers. Dynamic drivers that uninstall after use will also free up more conventional memory under DOS. And in the single-application mode, you can dedicate all resources to a single DOS session. You cannot multitask in the single-application mode, but you can ensure an optimal configuration for a resource-hungry game.

WinToon will also be integrated into the DIBEngine. Full-screen animations will be easier to deploy on the Windows platform, and features such as chroma-keying will let developers lay animations across various backgrounds, including video.

This is where an integrated engine improves performance. In Windows 3.1, DCI works through Video for Windows. Under Windows 95, however, developers can tap into DCI when it makes sense. Animators can use the best performance scheme available: GDI, DCI, WinG, or a 3-D engine. All these components are now interlinked and talk to each other ( see the figure ). For instance, the DIBEngine could call a DCI video-memory surface (if a motion-video accelerator chip is present) and render a 3-D object on the video surface using specialized 3-D hardware. All these separate pieces come together in Windows 95.

Better Video

A new Windows technology called Surround Video can create a full 360-degree graphics environment. You first create background images with existing p roduction techniques (e.g., 360-degree photography). Surround Video blends the image together to form an endless loop, correcting image distortion through remapping algorithms. Blue-screen keying superimposes overlay images or motion video on top of the background. The view from within the interface extends right or left in a full circle. Surround Video also incorporates authoring tools and scripts for designating a sequence of scenes, including other panoramas. Hot spots link to DIBs, AVI (Audio Video Interleave) movies, audio files, or other launchable components.

A new file type, called a striped DIB, stores scan lines as vertical strips (4 pixels wide). When you scroll to a new scene (a different view of the panorama), the engine loads enough vertical strips to fill the viewable area. In this way, the entire file is never read into memory (only the initial 640- by 480-pixel image is; a full 360-degree image is typically 4000 by 480 pixels). To improve display performance, two sets of stripes--those making up the view directly to the right and the left of the current view--are loaded into memory. When you pan left or right, the corresponding stripes are blasted to the screen. (For more information on Surround Video and Apple's QuickTime VR, see "See You Around," May BYTE.)

In addition to 32-bit versions of Cinepak and Indeo, Microsoft is banking on MPEG support to enhance video playback under Windows 95. Windows won't include an MPEG codec in the box, but the MCI (media control interface) command set will incorporate MPEG control. You can load installable MPEG codecs from other vendors (e.g., Mediamatics or Xing Technologies) through MCI and manipulate the video just as you would an AVI file. Of course, DCI will directly access hardware MPEG decoders, when available, or otherwise launch MPEG decompression in software.

MPEG lets developers "scale-up" video playback. Under Video for Windows, video frames are simply dropped to keep audio and video in sync. To avoid dropped frames, developers often choose a frame rate according to the "lowest common denominator" hardware of the targeted audience. The problem? A video title captured at, say, 12 frames per second plays the same on a 486/33 computer as it does on your high-performance PCI-based (Peripheral Component Interconnect) Pentium machine.

MPEG, on the other hand, can dynamically adjust playback to meet the performance capabilities of your hardware. MPEG inserts key frames at configurable intervals. Intermediate frames look ahead and back to these key frames (i.e., bidirectional interframe compression), pointing to blocks of similar data to reference during compression and decompression. MPEG can adjust the media stream dynamically, perhaps running only key frames on a slower machine or sampling audio at only 11 kHz. On a hardware-assisted system, the same MPEG stream could run at a full 30 fps with 44-kHz audio.

Multimedia 95

Clearly, Microsoft has done a lot of work to make Windows 95 a true multimedia OS. The success of this initiative will depend on the stability and robustness of the platform as well as on third-party vendors adhering to the Microsoft call to arms: quality 32-bit applications, ease-of-use features, and light footprints.

Consumers of multimedia may have a distorted view of what Windows 95 can deliver. It looks like a solid multimedia OS, but it is not designed to run optimally on low-end systems. For true multimedia applications, you'll need some fairly beefy hardware to take advantage of the architecture's scalable design. If you want to play, ante up a PCI Pentium.


WHERE TO FIND


Microsoft Corp.

Redmond, WA
(800) 426-9400
(206) 882-8080
fax: (206) 635-6100


DCI: THE NEXT GENERATION

In Windows 95, DCI (Display Control Interface) will be enriched with
four new APIs. They will provide direct interfaces for fast video,
sound, multiuser games, and di
gital joysticks.


DirectDraw

Essentially, the new version of DCI. DirectDraw will let applications access hardware video and display surfaces directly. DirectSound
The direct interface to sound cards. A consistent API for mixing and developing digital (WAV) sounds. Windows 95 will also support general MIDI. DirectConnect
A set of interfaces for developing multiuser games. Digital Joystick
Device-level interface for digital joysticks. Developers can write to one digital joystick standard to support multiple joystick vendors.

Windows DDI Architecture

illustration_link (15 Kbytes)

Windows 95 will provide a series of graphics APIs--for video, games, and 3-D rendering--using a new set of DDIs (device-driver interfaces) that enables vendors of graphics boards to show case their hardware-acceleration capabilities.


Stanford Diehl is director of BYTE reviews. You can reach him on the Internet or BIX at sdiehl@bix.com .

Up to the Core Technologies section contentsGo to previous article: Designing Alpha-Based SystemsGo to next article: Adding Apple Events to Your Mac Application: Part 2SearchSend a comment on this articleSubscribe to BYTE or BYTE on CD-ROM  
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network