Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > How to display YUV frame data ?

How to display YUV frame data ?
Thread Tools
yesea
Fresh-Faced Recruit
Join Date: Oct 2004
Status: Offline
Reply With Quote
May 24, 2005, 03:42 AM
 
dear all ,
I wish i post my question on right positon .
I ues one mpeg decoder (maybe ffmpeg) to decoder mpeg video stream file. The decoder's output is yuv buffer frame data ..Now i want to display this frame .
First i create one yuv pixmap use API ::QTNewGWorld(&gw , kYUVSPixelFormat , &r ,nil,nil ,0 ) ; And dump the buffer data to this pixmap .then use API ::CopyBits() to show
it in one port . But it's not ok .nothing will be display in the port ..While . maybe i can convert the yuv data to rgb data .then use pixmap the pixel format is kRGB.... it will be ok .
But . it is so slow ..
And , i consider that i 'll take some idea in QT component . Any suggest will be thanks!!!
--Ann
     
Samad
Fresh-Faced Recruit
Join Date: Nov 2001
Location: home
Status: Offline
Reply With Quote
May 28, 2005, 02:06 AM
 
Dumping a YUV buffer into the frame buffer will give you a jumbled buffer, because it expects an RGBA buffer. I'm pretty sure QuickTime does not support YUV channels, although I'm not certain. YUV is specfically for television, not computer media. Computer video software seldom support YUV channels unless it is designed for output video to be displayed on a television screen. In order to use this buffer, you'll first have to convert each YUV pixel into an RGB pixel, then pad the RGB pixel with 4 bytes for the alpha channel.
     
yesea  (op)
Fresh-Faced Recruit
Join Date: Oct 2004
Status: Offline
Reply With Quote
May 30, 2005, 04:49 AM
 
First thanks for you reply .
I convert YUV frame data to ARGB it's ok .But the performance is less .
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 04:34 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,