News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Graphics a la FPU

Started by donkey, January 09, 2005, 04:02:45 AM

Previous topic - Next topic

daydreamer

could appreciate help of how I should get right values in SHUFPS, otherwise I have to solve it with a crappy intermediate on memory using MOVUPS

oex

What am I not understanding? I can find a ton of RGB->YUV converters but when it comes to converting YUV to RGB there are no sample versions on google :P I'm starting to understand what various YUV formats mean, my video camera records in I420/IYUV formats so I want to convert that back to RGB/A values I'm more familiar with for editing.... (Yes I have gathered that to convert back again RGB->IYUV I will loose quality)

PS sorry if is silly question, I am still trying to construct a picture of this after a long day/night coding :lol

EDIT: I guess it is a silly question.... just read first post and it has conversion both ways ty Edgar :bg.... but heh I've bumped a topic that may have some life still in it :)

* Further Edit: I'm rather confused over the many YUV formats my video camera software gives I420/IYUV formats and lists I420 (default) as 12 bit which M$ doesnt list so I'm assuming the above procs dont help.... Any thoughts appreciated

320                 40 01 00 00        @☺      biWidth
240                 F0 00 00 00        ≡      biHeight
12                  0C 00 00 00        ♀      biBits
808596553           49 34 32 30        I420      biCompression

115200              00 C2 01 00         biSize
0                   00 00 00 00         biXPelsPerMeter
0                   00 00 00 00         biYPelsPerMeter
808583169           01 00 32 30        ☺      biPlanes
We are all of us insane, just to varying degrees and intelligently balanced through networking

http://www.hereford.tv

oex

So.... If I understand correctly :/? Your methods were working on 4:4:4 YUV data....

YUV STRUCT
   Y   DD   ?
   U   DD   ?
   V   DD   ?
ENDS

Whilst I am working on 'downsampled' 4:2:2 data? Further I am working on 12 bit data rather than 96 bit data? So for me Y=8bit and U and V are 2 bits each?
We are all of us insane, just to varying degrees and intelligently balanced through networking

http://www.hereford.tv

FORTRANS

Quote from: oex on April 05, 2010, 07:01:47 PM
So for me Y=8bit and U and V are 2 bits each?

   Very unlikely.  It probably means a block of four Y samples,
two U samples, and two V samples.  Usually they are 8 bits
per sample.  But 12 is not out of the question.  Some of this
is mentioned in the JPEG specification for their usage.

Regards,

Steve

oex

I'm working off this: http://en.wikipedia.org/wiki/YUV/RGB_conversion_formulas#Y.27UV420p_.28and_Y.27V12.29

So far R value seems about right (10 off or so and I have the bits muddled) will soon know I think :lol....

115200              00 C2 01 00         biSize

on a 320x240 image so 115200/12 bits = 320x240 = 76800 so at least that seems to add up
We are all of us insane, just to varying degrees and intelligently balanced through networking

http://www.hereford.tv