Archived

This topic is now archived and is closed to further replies.

Problem with sync in AVI

This topic is 5586 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I''m looking at the texture3D example that is in the SDK and also the directshow example from the book "real-time rendering tricks and techniques" The problem I have is that the movie is running very slow and the sound gets out of sync. They booth use the DoRenderSample function to render each picture like this //Walk through row by row for(long y = 0; y < m_VideoHeight; y++) { BYTE *pVideoRowStart = pVideoBuffer; BYTE *pTextureRowStart = pTextureBuffer; //walk through each pixel of the row for (int x = 0; x < m_VideoWidth; x++) { pTextureBuffer[0] = pVideoBuffer[0]; pTextureBuffer[1] = pVideoBuffer[1]; pTextureBuffer[2] = pVideoBuffer[2]; pTextureBuffer[4] = 0xff; pTextureBuffer += 4; pVideoBuffer += 3; } //Increment to the next row pVideoBuffer = pVideoRowStart + m_VideoPitch; pTextureBuffer = pTextureRowStart + TexturePitch; } and I guess this is what makes it so damn slow, so my sound gets out of sync and the movie doesn''t run very smooth. Is there a better way to draw the picture every frame (asm?) Or is it just that if I want to show AVI movies I need to show them without any texture just as it is done for example in the SDK example PlayWnd. It would be nice to be able to render text and objects infront of a avi. The file I have isn''t thay big (~3mb divx) any advice? thanks!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Isn''t Divx a highly compressed format? It might just be taking it a long time to decompress each frame. Just a guess...

Share this post


Link to post
Share on other sites