| 1 |
\ |
| 2 |
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source. |
| 3 |
.\" Do not hand-hack it! If you have bug fixes or improvements, please find |
| 4 |
.\" the corresponding HTML page on the Netpbm website, generate a patch |
| 5 |
.\" against that, and send it to the Netpbm maintainer. |
| 6 |
.TH "Ppmtoyuv User Manual" 1 "06 June 2005" "netpbm documentation" |
| 7 |
|
| 8 |
.SH NAME |
| 9 |
ppmtoyuv - convert a PPM image to an Abekas YUV file |
| 10 |
|
| 11 |
.UN synopsis |
| 12 |
.SH SYNOPSIS |
| 13 |
|
| 14 |
\fBppmtoyuv\fP |
| 15 |
[\fIppmfile\fP] |
| 16 |
|
| 17 |
.UN description |
| 18 |
.SH DESCRIPTION |
| 19 |
.PP |
| 20 |
This program is part of |
| 21 |
.BR "Netpbm" (1)\c |
| 22 |
\&. |
| 23 |
.PP |
| 24 |
\fBppmtoyuv\fP reads a PPM image as input and produces an Abekas |
| 25 |
YUV file as output. |
| 26 |
.PP |
| 27 |
The output file contains a raster of four byte YUV codes, each |
| 28 |
uniquely associated with two side-by-side pixels in the image. The raster |
| 29 |
contains rows in order from top to bottom, and within each row columns |
| 30 |
from left to right. So the output file size in bytes is twice the number of |
| 31 |
pixels in the image. |
| 32 |
.PP |
| 33 |
Each YUV code is associated with two pixels from the input image that we |
| 34 |
will call the left pixel and the right pixel. The 2nd byte of the code is |
| 35 |
the Y value of the left pixel. The 4th byte of the code is the Y value of |
| 36 |
the right pixel. The 1st byte of the code is an average of the U value of |
| 37 |
the pixel \fIto the left of the left pixel\fP, the left pixel, and the |
| 38 |
right pixel. The 3rd byte of the code is analogous for V values. These |
| 39 |
averages are weighted arithmetic means where the left pixel is weighted |
| 40 |
double what the other two pixels are weighted. |
| 41 |
.PP |
| 42 |
This format is reminiscent of but rather different from the common |
| 43 |
YUV 4:2:0 format (aka YUV 420) and the similar YUV 4:4:4, YUV 4:2:2, |
| 44 |
YUV 4:1:1, YUV 4:1:1s, and YUV 4:1:0. In YUV 4:2:0, the raster is |
| 45 |
different for even numbered lines and odd numbered lines. On even |
| 46 |
numbered lines, there are twice as many bits for Y of each pixel as |
| 47 |
for U or V. On odd numbered lines, there are the same number of bits |
| 48 |
for Y as on even numbered lines, but no bits at all for U and V. |
| 49 |
.PP |
| 50 |
Another YUV-based format is YUV4MPEG2, which is a movie format |
| 51 |
normally used with |
| 52 |
.UR http://mjpeg.sourceforge.net |
| 53 |
\fBMJPEGTools\fP |
| 54 |
.UE |
| 55 |
\&. Netpbm |
| 56 |
does not have converters for this format, but \fBMJPEGTools\fP does. |
| 57 |
|
| 58 |
.UN options |
| 59 |
.SH OPTIONS |
| 60 |
.PP |
| 61 |
There are no command line options defined specifically |
| 62 |
for \fBppmtoyuv\fP, but it recognizes the options common to all |
| 63 |
programs based on libnetpbm (See |
| 64 |
.UR index.html#commonoptions |
| 65 |
Common Options |
| 66 |
.UE |
| 67 |
\&.) |
| 68 |
|
| 69 |
.UN seealso |
| 70 |
.SH SEE ALSO |
| 71 |
.BR "yuvtoppm" (1)\c |
| 72 |
\&, |
| 73 |
.BR "ppmtoeyuv" (1)\c |
| 74 |
\&, |
| 75 |
.BR "ppmtoyuvsplit" (1)\c |
| 76 |
\&, |
| 77 |
.BR "ppm" (1)\c |
| 78 |
\&, |
| 79 |
.UR http://mjpeg.sourceforge.net |
| 80 |
pnmtoy4m |
| 81 |
.UE |
| 82 |
\&, |
| 83 |
.UR http://mjpeg.sourceforge.net |
| 84 |
y4mtopnm |
| 85 |
.UE |
| 86 |
\& |
| 87 |
|
| 88 |
|
| 89 |
.UN author |
| 90 |
.SH AUTHOR |
| 91 |
.PP |
| 92 |
Marc Boucher \[email protected]\fP, based on |
| 93 |
Example Conversion Program, A60/A64 Digital Video Interface Manual, |
| 94 |
page 69. |
| 95 |
.PP |
| 96 |
Copyright (C) 1991 by DHD PostImage Inc. |
| 97 |
.PP |
| 98 |
Copyright (C) 1987 by Abekas Video Systems Inc. |
| 99 |
.SH DOCUMENT SOURCE |
| 100 |
This manual page was generated by the Netpbm tool 'makeman' from HTML |
| 101 |
source. The master documentation is at |
| 102 |
.IP |
| 103 |
.B http://netpbm.sourceforge.net/doc/ppmtoyuv.html |
| 104 |
.PP |