Bink SDK 1.5v

Scaling

Discussion

Scaling is the act of shrinking or stretching the pixels during a blitting operation to a different output rectangle size. Scaling is usually much slower than a normal one-to-one blit which can be incredibly optimized (like the Bink software 1x blitters). It is possible to write optimized blitters for other scaling styles, but this is usually impractical and seldom necessary. Bink includes optimized blitters for 1x blitting, 2x width blitting, 2x height blitting, and 2x width and height blitting. Any other scaling type will be handled by performing a 1x copy into an off-screen buffer, and then stretching the 1x off-screen buffer onto the screen. Hardware usually optimizes integral scaling (2x width, or half-size width, or 4x width, etc), so you should try to only scale integrally when possible. If you must stretch non-integrally, the YUV hardware may or may not support it, so you may fall back to software. And even if you are lucky enough to have a video card that accelerates non-integral scaling, this is usually really slow - usually too slow, in fact, for video playback. So, your best option is generally to switch the video mode into a mode where you can use integral scaling and still fill most of the screen. Then you get a nice full or almost-full screen display, and you'll still keep the frame rate nice and brisk.


Group: Background Concepts
Related Sections: Colorspace - RGB vs. YUV
Related Functions: BinkBufferOpen, BinkBufferSetScale, BinkCopyToBuffer, BinkCopyToBufferRect
Related Basic Types: BINKBUFFER_OPEN_FLAGS, BINK_COPY_FLAGS, BINK_OPEN_FLAGS

For technical support, e-mail Bink1@radgametools.com
© Copyright 1994-2003 RAD Game Tools, Inc. All Rights Reserved.