Posted: Fri Mar 06, 2009 6:33 am
GARTHWILSON wrote:
What goes on in PCs' video cards, sound cards, and graphics engines to take a big burden off the main processor?
Quote:
Samuel has occasionally touched on how GEOS (software) on the Commodore 64 computed the video for various fonts and sizes,
Quote:
I sometimes wonder how much of that work of figuring out what value to give each dot is done by the main processor and how much by the video chipset.
When scrolling a window, for example, the software will call a graphics procedure to "blit" (BLock Image Transfer) a submatrix of pixels from one location to another. This task is performed by the GPU or some comparable coprocessor.
If you have transparency effects, then this won't work -- in this case, you need to compose the image from primitive images, just as a graphics artist would create a composite image. You start by blitting the background image, then you blit all foreground images, one on top of the other, until every layer is displayed. 3D hardware acceleration takes most of this logic off of the CPU's hands -- the CPU still has to tell the GPU which images to render and where, however.
Quote:
I don't even know if there's still a separate floating-point co-processor in the same package with the main processor (not that the video calculations use FP very often)
As far as floating point calculations for video, in fact, yes, it's used all the time. All OpenGL procedures accept floating point coordinates and transformation matrices. Many procedures dealing with outline fonts also use floating point coordinate systems because of the possibility for anti-aliasing and subpixel rendering.
Quote:
For the streaming audio and video, I have no doubt that the audio and video chipsets do a lot of buffering, maybe even several seconds' worth
Quote:
and I suspect these may even access the sets of samples by DMA; but the control of the timing is atrocious, as witnessed by the fact that the audio may lead or lag the video by a tenth of a second or even more, which is totally unacceptable for my kind of work, to put it mildly.
Unsynchronized audio and video during playback can come from one of two sources only -- either the video and audio fail to synchronize in the video file itself (meaning the problem lies with encoder), or the problem lies with the player itself.
The hardware very clearly cannot be problem, for nobody has ever complained of synchronization issues when playing video games. And, believe me, since all the GPU and DSP functionality in video cards are market driven by the requirements in video games these days, clearly video games place a much larger stress on the video and audio interfaces than simply isochronously blasting a bitmap and simple PCM stream to the audio card is.
Quote:
This is obviously a common problem as we frequently see it even on TV, from major stations that can afford all the processing power they could want.
ANY AND ALL synchronization issues is always a software problem.
Quote:
So what can the home computer builder apply from all this in order to improve performance without losing control of timing?