1Ppmtoyuv User Manual(0) Ppmtoyuv User Manual(0)
2
3
4
6 ppmtoyuv - convert a PPM image to an Abekas YUV file
7
8
10 ppmtoyuv [ppmfile]
11
12
14 This program is part of Netpbm(1).
15
16 ppmtoyuv reads a PPM image as input and produces an Abekas YUV file as
17 output.
18
19 The output file contains a raster of four byte YUV codes, each uniquely
20 associated with two side-by-side pixels in the image. The raster con‐
21 tains rows in order from top to bottom, and within each row columns
22 from left to right. So the output file size in bytes is twice the num‐
23 ber of pixels in the image.
24
25 Each YUV code is associated with two pixels from the input image that
26 we will call the left pixel and the right pixel. The 2nd byte of the
27 code is the Y value of the left pixel. The 4th byte of the code is the
28 Y value of the right pixel. The 1st byte of the code is an average of
29 the U value of the pixel to the left of the left pixel, the left pixel,
30 and the right pixel. The 3rd byte of the code is analogous for V val‐
31 ues. These averages are weighted arithmetic means where the left pixel
32 is weighted double what the other two pixels are weighted.
33
34 This format is reminiscent of but rather different from the common YUV
35 4:2:0 format (aka YUV 420) and the similar YUV 4:4:4, YUV 4:2:2, YUV
36 4:1:1, YUV 4:1:1s, and YUV 4:1:0. In YUV 4:2:0, the raster is differ‐
37 ent for even numbered lines and odd numbered lines. On even numbered
38 lines, there are twice as many bits for Y of each pixel as for U or V.
39 On odd numbered lines, there are the same number of bits for Y as on
40 even numbered lines, but no bits at all for U and V.
41
42 Another YUV-based format is YUV4MPEG2, which is a movie format normally
43 used with MJPEGTools ⟨http://mjpeg.sourceforge.net⟩ . Netpbm does not
44 have converters for this format, but MJPEGTools does.
45
46
48 There are no command line options defined specifically for ppmtoyuv,
49 but it recognizes the options common to all programs based on libnetpbm
50 (See
51 Common Options ⟨index.html#commonoptions⟩ .)
52
53
55 yuvtoppm(1), ppmtoeyuv(1), ppmtoyuvsplit(1), ppm(1), pnmtoy4m
56 ⟨http://mjpeg.sourceforge.net⟩ , y4mtopnm
57 ⟨http://mjpeg.sourceforge.net⟩
58
59
60
62 Marc Boucher marc@PostImage.COM, based on Example Conversion Program,
63 A60/A64 Digital Video Interface Manual, page 69.
64
65 Copyright (C) 1991 by DHD PostImage Inc.
66
67 Copyright (C) 1987 by Abekas Video Systems Inc.
68
70 This manual page was generated by the Netpbm tool 'makeman' from HTML
71 source. The master documentation is at
72
73 http://netpbm.sourceforge.net/doc/ppmtoyuv.html
74
75netpbm documentation 06 June 2005 Ppmtoyuv User Manual(0)