Bink SDK 1.5v |
True-color video playback under Windows is tricky for several reasons. First off, true color codecs (including Bink) generally don't operate in RGB colorspace, but rather YUV. Secondly, Windows video drivers are generally slower and more bug prone in high-color than 256 colors. Other minor difficulties include a complicated blitting architecture and no asynchronous reads under Win95/98 (which Bink gets around by doing I/O on another thread). I suppose the good news, however, is that using true color means that you never have to wrestle with the palette manager again! On the Windows platform, Bink includes incredibly fast YUV to RGB software conversion routines. We include MMX and non-MMX, 1x and 2x width, height interlacing, height doubling, alpha plane merging, and color or grayscale routines that can copy into 16-bit, 24-bit and 32-bit RGB formats. The permutations total 120 different hand-optimized assembly conversion routines - whew! In fact, unsurprisingly, the majority of the BinkW32.DLL is the colorspace converters. We wrote all of these different YUV to RGB converters because we've found the YUV to RGB hardware on PC video cards to be fairly unreliable - especially when flipping video modes or using the video card's 3D features (which means, sigh, pretty much all PC video games). This means you have a choice between software and, if it is available, hardware blitting. Video cards currently can provide two types of YUV hardware converts - YUV overlays and YUV off-screen buffers. YUV overlays are really amazing when they work - they are basically windows on the desktop that live at a different color resolution than the desktop! You could have a YUV true color overlay being displayed while the rest of the Windows desktop is being displayed at even 256 colors, for example. Fewer cards support overlays than off-screen buffers. YUV off-screen buffers are simply DirectDraw secondary surfaces that convert from YUV to RGB when you blit them onto the primary surface. They are nice because you get things like clipping for free. The conversion technique (software, overlays, or off-screens) that you choose for your game depends on several factors. Let's look at the pros and cons of each technique...
Next Topic (Pros and Cons of Software Blitting under Win32)
Previous Topic (Distributing the Bink DLL under Win32)
Group:
The Win32 Platform
Related Sections:
Alpha Planes
For technical support, e-mail Bink1@radgametools.com
© Copyright 1994-2003 RAD Game Tools, Inc. All Rights Reserved.