Jump to content
  • Advertisement
Sign in to follow this  
youaresomean

OpenGL High texture transfer rates in DX9

This topic is 3563 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 am playing around with dx9 based video renderer supporting many video streams (25x4CIF or 4x1080p). The bottleneck in this kind of application is (apart from decoding) the texture transfer to the gpu. The input data is in YUY2 format. In the current setup i have an offscreen surface in YUY2 format and a X8R8G8B8 texture. When a new frame arrives for any of the streams the offscreen surface is locked, the data copied and after unlocking stretchrect'd to the texture. Are there more effective ways to get the YUY2 data to the GPU? In OpenGL we used PBOs to get good transfer rates (as adviced by the Nvidia texture transfer whitepaper) is there anything similar in DX? Thank you very much. all the best.

Share this post


Link to post
Share on other sites
Advertisement
You could use a pixelshader to decode YUV on the fly, no stretchrect and no X8R8G8B8 texture needed.

[Edited by - Rattenhirn on January 12, 2009 3:25:07 AM]

Share this post


Link to post
Share on other sites
That's an option to reduce the GPU memory requirements. But it won't change the transfer behaviour, will it?

The aim is to utilize the available transfer bandwidth as far as possible without (possibly) stalling the gpu during uploads (that's what PBOs are good for in GL, async up/downloads).

Share this post


Link to post
Share on other sites
Quote:
Original post by youaresomean
That's an option to reduce the GPU memory requirements. But it won't change the transfer behaviour, will it?


Depending on how stretchrect is implemented by the given driver, it may or may not require less bandwidth, but certainly not more. You should give it a try.

Quote:
Original post by youaresomeanThe aim is to utilize the available transfer bandwidth as far as possible without (possibly) stalling the gpu during uploads (that's what PBOs are good for in GL, async up/downloads).


The best way not to stall the GPU is not to lock the surfaces. You can't really do that in your case, so you have to make sure, that the time between the Unlock (which will trigger the upload) and using the given resource is as big as possible. This is easiest achieved by double buffering.

Since you've just saved to much texture ram by getting rid of the X8R8G8B8 texture, you can easily afford double buffering. ;)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!