How does one create Direct3D textures using FourCC formats other than ones listed in the DirectX SDK? For example, if I want to use IV31 (Indeo 3.1) or CYUV (Creative Labs YUV)? Do I need particular SDKs from these companies, or is there some documentation I''m not aware of?
Any help is appreciated!
MatrixCubed
http://MatrixCubed.cjb.net
D3DTextures - FourCC texture formats
To get you started here is the basic formula for YUV
Y = 0.299f*R + 0.587f*G + 0.114f*B;
U = -0.146f*R - 0.288f*G + 0.434f*B;
V = 0.617f*R - 0.517f*G - 0.100f*B;
Then check out this link, its has everything you need
http://www.efg2.com/Lab/Library/Color/index.html
Almost there...
Say I''ve got a buffer of 115,200 bytes, which is an image at resolution 320x240. The math works out to 1.5 bytes per pixel, which does not make a whole lot of sense to me, since I cannot find any resources to figure out how to convert YUV -> RGB. I understand that YUV (I420) is 12-bit color, but not sure how the bits are packed. (I *have* found some resources, but they I am afraid are insufficiently explained.)
Anyone with insight is more than welcome to post.
A most baffled...
MatrixCubed
http://MatrixCubed.cjb.net
Say I''ve got a buffer of 115,200 bytes, which is an image at resolution 320x240. The math works out to 1.5 bytes per pixel, which does not make a whole lot of sense to me, since I cannot find any resources to figure out how to convert YUV -> RGB. I understand that YUV (I420) is 12-bit color, but not sure how the bits are packed. (I *have* found some resources, but they I am afraid are insufficiently explained.)
Anyone with insight is more than welcome to post.
A most baffled...
MatrixCubed
http://MatrixCubed.cjb.net
YUV isn''t easy, It took me awhile to learn too. However you couldn''t have searched that link I gave you very well. It really does have everything you need.
I gave the same information to another poster, and he was able to find the information he needed.http://www.gamedev.net/community/forums/topic.asp?topic_id=68541
You said in your first post that your computer supports CYUV, is that correct.
You also said that you want to load a RGB or 24bit image into a FOURCC CYUV texture, is that correct?
I can help you with this, but first have another look at that link, and see if you can do it yourself. If you really get stuck I''ll help you out.
I gave the same information to another poster, and he was able to find the information he needed.http://www.gamedev.net/community/forums/topic.asp?topic_id=68541
You said in your first post that your computer supports CYUV, is that correct.
You also said that you want to load a RGB or 24bit image into a FOURCC CYUV texture, is that correct?
I can help you with this, but first have another look at that link, and see if you can do it yourself. If you really get stuck I''ll help you out.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement