YUV file format [message #6674] |
Tue, 30 July 1996 00:00 |
e113
Messages: 1 Registered: July 1996
|
Junior Member |
|
|
Hi there,
does anybody know, if it is possible to read in Files that have the
format .YUV? It doesn't appear in the docs, but nonetheless it would be nice if it were possible. Maybe someone has already added something to idl in this
respect?
Thanks,
JP
|
|
|
Re: YUV file format [message #6680 is a reply to message #6674] |
Tue, 30 July 1996 00:00  |
hahn
Messages: 108 Registered: November 1993
|
Senior Member |
|
|
e113@ipp-garching.mpg.de (Janpeter Wolff ) wrote:
> Hi there,
> does anybody know, if it is possible to read in Files that have the
> format .YUV? It doesn't appear in the docs, but nonetheless it would be
> nice if it were possible. Maybe someone has already added something
> to idl in this
> respect?
> Thanks,
Unfortunately there are several standards to encode YUV (NTSC, PAL,
CCIR 601). The latter is for encoding digital TV signals:
Y = 0.299 * red + 0.587 * green + 0.114 * blue
(in accordance with NTSC analogue). The color encoding differs, for
digital you can have 8:4:4 and 8:8:8. While 8:8:8 says that you use
8 bits for luminance (Y) and 8 bits for u and 8 for v the more common
encoding averages two adjacents points and encode for odd numbered
pixels 8 bits Y and 8 bits U as an average of two adjacent dots while
the even numbered pixels contail 8 bits Y and 8 bits V.
Now, U and V are derived from U = 0.713 * (red-Y) and V = 0.564 * (blue-Y)
Unfortunately I don't have test data to verify these formulas....
Hope this helps
Norbert
|
|
|