Jump to content
  • Advertisement
Sign in to follow this  
mightypanda

Video decoding to YUY2 texture id Direct3D11

This topic is 1410 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

In D3D9 we used succesfully  D3DFMT_YUY2 textures to display YUY2 buffers coming from decoded movies, much faster than asking the decoder to do the RGB conversion.

 

However it seems in D3D11 there is some confusion about how to create a YUY2 texture.

Any advice?
(we actually use SharpDX)

 

All the best

Stefano

Share this post


Link to post
Share on other sites
Advertisement

Bit offtopic. If you're not restricted to yuy2, i.e. if you can ask decoder to produce planar images in YV12/I420 instead of packed YUY2, you can make it in more generic way - use three separate grayscale textures for Y/U/V planes, and perform yuv->rgb conversion with shader, it's just a matter of 3 dotproducts.

Share this post


Link to post
Share on other sites

Hi there, thanks for the reply.

Yes i can decode both YV12 and NV12.

What i would like to avoid is having different textures, but putting the encoded data in the texture as received and perform the RGB conversion in a shader (which i believe is what dx9 D3DFMT_YV12 texture format and others did implicitly).

Do you have any example?

 

All the best

Stefano

 

Bit offtopic. If you're not restricted to yuy2, i.e. if you can ask decoder to produce planar images in YV12/I420 instead of packed YUY2, you can make it in more generic way - use three separate grayscale textures for Y/U/V planes, and perform yuv->rgb conversion with shader, it's just a matter of 3 dotproducts.

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!