[Mp4-tech] Question regarding yuv file
Steve
S.T.C.Beesley lboro.ac.uk
Thu Aug 10 02:38:15 EDT 2006
Sagar,
YUV/YCrCb files are raw data and as such do not necessarily adhere to any
standard format (and they have no header data to tell us what format
they're in), that being said all of the test sequences I've ever used have
all been the same planar format. For CIF this is:
101376 bytes of Y data (left to right, top to bottom, 352x288px 0-255)
25344 bytes of U data (left to right, top to bottom, 176x144px 0-255)
25344 bytes of V data (left to right, top to bottom, 176x144px 0-255)
repeated for each frame.
If all you want is the luminance (Y) data and all you have is one frame then
it should be a very simple case of reading in the first 101376 bytes. If
using a non monochrome colour space then you will also need to greyscale
the values (e.g. set R=G=B=data value) but that's down to you.
There are many other possible ways that the data in your sequence could be
stored, if it's not the above then I'm afraid you'll have to do a bit of
logical guessing to try and track the solution down.
Hope this helps and good luck!
Steve
---------------------------------------------------------
Steve Beesley MEng (Hons) DIS
PhD Research Student,
Applied Signals Processing Group,
Electronic and Electrical Engineering,
Loughborough University,
Loughborough,
LE11 3TU,
England
---------------------------------------------------------
>
>Hi all,
>
>I have a single yuv frame of CIF ( 4:2:0).
>Not i wanted to know how the compnents Y, Cb, & Cr are arranged?
>And if i needed only grey or Y component how do i do that?
>I tried Y = Height * Width .
>But surprisingly i still get colour. I want to elimanate Cb and Cr
component
>and
>obtain a grey frame only.
>
>Can somebody help me with this?
>
>Thank you in adavance.
>
>Warm Regards,
>Sagar
>
More information about the Mp4-tech
mailing list