Discussion:
How to copy YUV planar formats data(YV12,I420,YVU9 ) to DirectDraw
(too old to reply)
Anoop Mishra
2004-08-20 12:43:03 UTC
Permalink
I have created a YUV offscreen surface to render a YUV format data buffer.
when the YUV format is packed format such as UYVY ,I succeed to render the
data using DirectDraw.

but when deal with the planar YUV formats such as YV12, I420 etc,I do not
know how to copy the data to a DirectDraw YUV format surface.
The March Hare (MVP)
2004-08-20 15:25:22 UTC
Permalink
Post by Anoop Mishra
I have created a YUV offscreen surface to render a YUV format data buffer.
when the YUV format is packed format such as UYVY ,I succeed to render the
data using DirectDraw.
but when deal with the planar YUV formats such as YV12, I420 etc,I do not
know how to copy the data to a DirectDraw YUV format surface.
Multi-posted to ../graphics (where it probably belongs).

Please do not multi-post.
--
1. If there are questions above, please answer them in-line. In any case,
don't top post. (Otherwise, don't expect a followup) See
http://tinyurl.com/22ubu
2. Remove this signature from your response if your newsreader isn't
intelligent enough to do it.
3. Common courtesy is to followup if someone helped you or if you found a
solution on your own.
Anoop Mishra
2004-08-21 05:27:02 UTC
Permalink
I am sorry for same and remember it always. Thanks to update me. :-)
Post by The March Hare (MVP)
Post by Anoop Mishra
I have created a YUV offscreen surface to render a YUV format data buffer.
when the YUV format is packed format such as UYVY ,I succeed to render the
data using DirectDraw.
but when deal with the planar YUV formats such as YV12, I420 etc,I do not
know how to copy the data to a DirectDraw YUV format surface.
Multi-posted to ../graphics (where it probably belongs).
Please do not multi-post.
Anoop Mishra
2004-08-21 05:29:02 UTC
Permalink
I am sorry for same and remember it always. Thanks for updating me. :-)
Post by The March Hare (MVP)
Post by Anoop Mishra
I have created a YUV offscreen surface to render a YUV format data buffer.
when the YUV format is packed format such as UYVY ,I succeed to render the
data using DirectDraw.
but when deal with the planar YUV formats such as YV12, I420 etc,I do not
know how to copy the data to a DirectDraw YUV format surface.
Multi-posted to ../graphics (where it probably belongs).
Please do not multi-post.
Don Jordan
2004-08-21 16:03:02 UTC
Permalink
Post by The March Hare (MVP)
Multi-posted to ../graphics (where it probably belongs).
Please do not multi-post.
I agree with you about the multi-posting. His question, however, belongs
here since these are common video bitmap formats that are rarely used over in
DirectX graphics.
Don Jordan
2004-08-21 16:43:02 UTC
Permalink
Post by Anoop Mishra
I have created a YUV offscreen surface to render a YUV format data buffer.
when the YUV format is packed format such as UYVY ,I succeed to render the
data using DirectDraw.
but when deal with the planar YUV formats such as YV12, I420 etc,I do not
know how to copy the data to a DirectDraw YUV format surface.
You would have to write your own transform function to convert these planar
Y420 formats into a packed Y422. The best source of information on all video
bitmap formats is at www.fourcc.org. You will find what you need to know
there.
Anoop Mishra
2004-08-23 04:37:01 UTC
Permalink
Sir, When DirectDraw Surface is created in Planer YUV format, then we should
use the capability of the Planer YUV surface.
I have Planer YUV format raw video data to display, then it would be good,
if i display the planer YUV video data on the Planer YUV offscreen surface,
rather than Planer YUV raw video data on the Packed YUV pixel format
Offscreen Surface.

Thanks for the prompt interest shown by the Discussion Group.
Post by Don Jordan
You would have to write your own transform function to convert these planar
Y420 formats into a packed Y422. The best source of information on all video
bitmap formats is at www.fourcc.org. You will find what you need to know
there.
Don Jordan
2004-08-23 06:01:01 UTC
Permalink
If the DirectDraw surface does not support those planar YUV video formats,
then you will have to convert it to a format that can be used. You said
youself in your first post that the DirectDraw surface worked for the UYVY
format. If all you need to do is a memory move, then the web site url I
posted earlier will give you the necessary information on the planar YUV
formats to calculate the size of the buffer.
Post by Anoop Mishra
Sir, When DirectDraw Surface is created in Planer YUV format, then we should
use the capability of the Planer YUV surface.
I have Planer YUV format raw video data to display, then it would be good,
if i display the planer YUV video data on the Planer YUV offscreen surface,
rather than Planer YUV raw video data on the Packed YUV pixel format
Offscreen Surface.
Thanks for the prompt interest shown by the Discussion Group.
Anoop Mishra
2004-08-23 09:09:04 UTC
Permalink
Sir, It's true, to transform Planer into Packed format when DirectDraw
surface supports only Packed YUV pixel format.

Here i want to copy the Planer YUV raw video data (YVU9/YV12) onto the
Planer YUV (YVU9/YV12) pixel format DirectDraw surface. DirectDraw Surface
supports Planer YUV pixel format also.

So ideally i do not require transformation of Planer YUV format into packed
YUV format.

Thanks in advance to the Discussion Group...
Post by Don Jordan
If the DirectDraw surface does not support those planar YUV video formats,
then you will have to convert it to a format that can be used. You said
youself in your first post that the DirectDraw surface worked for the UYVY
format. If all you need to do is a memory move, then the web site url I
posted earlier will give you the necessary information on the planar YUV
formats to calculate the size of the buffer.
Loading...