GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

YUV to BMP conversion

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
invent_senthil



Joined: 15 Mar 2007
Posts: 3
Location: chennai

PostPosted: Thu Apr 05, 2007 5:10 am    Post subject: YUV to BMP conversion Reply with quote

Hi friends,

I'm trying to convert a YUV frames into each BMP images, Presently i acheived to read a Y,U and V data from YUV frames,Actaully our image ie., YUV frame is 352x288.

So we do some interpolation for converting our Y,U,V data into 352x288 size. Then i coverted to RGB using the following formulas
*red++ = 1.164*((*yimage++)-16) +( 1.596*((*voutimage++)-128));
*green++ =1.164*((*yimage++)-16) - (0.391*((*uoutimage++)-128)) - 0.813*((*voutimage++)-128));
*blue++ = 1.164*((*yimage++)-16) + (2.018*((*uoutimage++)-128));
I have RGB values,this values directly store in a array because image data generally write reverse in BMP files.

Newly opened BMP file,i wrote a imagebuffer array write into that file,But I can,t get
full size image ie.,352x288.Also I want to get perfect coversion.

Pls help me.Share your views and ideas.

Thanks
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP