From: lweng@analogic.com Subject: HELP! YUV-RGB convertion Date: 12 Dec 1997 00:00:00 GMT Message-ID: <881940406.483262472@dejanews.com> To: ychen@analogic.com X-Http-User-Agent: Mozilla/4.04 [en] (WinNT; I) X-Originating-IP-Addr: 204.178.43.205 () Organization: Deja News Posting Service X-Authenticated-Sender: lweng@analogic.com X-Article-Creation-Date: Fri Dec 12 15:26:46 1997 GMT Reply-To: lweng@analogic.com Newsgroups: comp.os.ms-windows.programmer.graphics I want to display a YUV 422 image on the computer SVGA monitor, but there is only color information in one of the two pixels. I tried to interpolated using the neighbor pixel's color information, so I can get YUV 444 format data. Then I used the formula shown below to converter the YUV 444 data to RGB 888: Y = 0.257R' + 0.504G' + 0.098B' + 16 U = -.148R' -0.291G' + 0.439B' + 128 V = 0.439R' -0.368G' -0.071B' + 128 R' = 1.164(Y -16) + 1.596(V-128) G' = 1.164(Y-16) -0.392(U -128) -0.813(V-128) B' = 1.164(Y -16) + 2.017(U -128) The result is almost satisfied except that some extra color has been added in some region of the image. I just don't know how to handle those extra color right now. The formula is just fine, I test it by converter a RGB 888 image to YUV 444 and back to RGB 888. -------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to Usenet