b37900
diff -urNp old/userguide/libnetpbm_ug.html new/userguide/libnetpbm_ug.html
b37900
--- old/userguide/libnetpbm_ug.html	2017-09-05 14:20:09.734743404 +0200
b37900
+++ new/userguide/libnetpbm_ug.html	2017-09-05 14:47:30.496705483 +0200
b37900
@@ -374,7 +374,7 @@ plain format.
b37900
 

Reference

b37900
 
b37900
 

The Libnetpbm Netpbm Image

b37900
-Processing Manual describes the the libnetpbm functions for
b37900
+Processing Manual describes the libnetpbm functions for
b37900
 processing image data.
b37900
 
b37900
 

The Libnetpbm Utility Manual

b37900
diff -urNp old/userguide/pamfunc.html new/userguide/pamfunc.html
b37900
--- old/userguide/pamfunc.html	2017-09-05 14:20:09.738743398 +0200
b37900
+++ new/userguide/pamfunc.html	2017-09-05 14:47:41.760644848 +0200
b37900
@@ -57,7 +57,7 @@ output image.
b37900
 and bit string (such as and with 01001000).  For the arithmetic functions, the
b37900
 function arguments and results are the fraction that a sample is of the
b37900
 maxval, i.e. normal interpretation of PAM tuples.  But for the bit string
b37900
-functions, the value is the the bit string whose value as a binary cipher is
b37900
+functions, the value is the bit string whose value as a binary cipher is
b37900
 the sample value, and the maxval indicates the width of the bit string.
b37900
 
b37900
 

Arithmetic functions

b37900
diff -urNp old/userguide/pbmtextps.html new/userguide/pbmtextps.html
b37900
--- old/userguide/pbmtextps.html	2017-09-05 14:20:09.736743401 +0200
b37900
+++ new/userguide/pbmtextps.html	2017-09-05 14:47:58.840553598 +0200
b37900
@@ -185,7 +185,7 @@ edge of the type.  See 
b37900
 
-ascent=n
b37900
 
-descent=n
b37900
 
b37900
-These options control the the margins added to the image, measured from
b37900
+These options control the margins added to the image, measured from
b37900
 the text baseline.  See Margins for details.
b37900
 
b37900
 

Sizes are in points, as a floating point number.

b37900
diff -urNp old/userguide/pbmtog3.html new/userguide/pbmtog3.html
b37900
--- old/userguide/pbmtog3.html	2017-09-05 14:20:09.735743403 +0200
b37900
+++ new/userguide/pbmtog3.html	2017-09-05 14:48:55.648255793 +0200
b37900
@@ -77,7 +77,7 @@ You cannot specify both.
b37900
 

HISTORY

b37900
 
b37900
 

Before Netpbm 10.79 (June 2017), there was a different program by the same

b37900
-name in Netpbm, which was written by by Paul Haeberli
b37900
+name in Netpbm, which was written by Paul Haeberli
b37900
 <paul@manray.sgi.com> in 1989
b37900
 and then modified extensively by others.
b37900
 
b37900
diff -urNp old/userguide/ppmtompeg.html new/userguide/ppmtompeg.html
b37900
--- old/userguide/ppmtompeg.html	2017-09-05 14:20:09.739743396 +0200
b37900
+++ new/userguide/ppmtompeg.html	1970-01-01 01:00:00.000000000 +0100
b37900
@@ -1,1291 +0,0 @@
b37900
-
b37900
-<HTML>
b37900
-<HEAD>
b37900
-<TITLE>Ppmtompeg User Manual</TITLE>
b37900
-</HEAD>
b37900
-<BODY>
b37900
-

Ppmtompeg

b37900
-Updated: 23 July 2006
b37900
-
b37900
-Table Of Contents
b37900
-
b37900
-

NAME

b37900
-ppmtompeg - encode an MPEG-1 bitstream
b37900
-
b37900
-

SYNOPSIS

b37900
-
b37900
-ppmtompeg
b37900
-[options]
b37900
-parameter-file
b37900
-
b37900
-

DESCRIPTION

b37900
-
b37900
-

This program is part of Netpbm.

b37900
-
b37900
-

ppmtompeg produces an MPEG-1 video stream. MPEG-1 is the

b37900
-first great video compression method, and is what is used in Video CDs
b37900
-(VCD).  ppmtompeg originated in the year 1995.  DVD uses a more
b37900
-advanced method, MPEG-2.  There is an even newer method called MPEG-4
b37900
-which is also called Divx.  I don't know where one finds that used.
b37900
-
b37900
-

There's technically a difference between a compression method for

b37900
-video and an actual file (stream) format for a movie, and I don't know
b37900
-if it can be validly said that the format of the stream
b37900
-ppmtompeg produces is MPEG-1.
b37900
-
b37900
-

Mencoder from the Mplayer

b37900
-package is probably superior for most video format generation
b37900
-needs, if for no other reason than that it is more popular.
b37900
-
b37900
-

The programming library PM2V

b37900
-generates MPEG-2 streams.
b37900
-
b37900
-

Use Mplayer (not part of Netpbm)

b37900
-to do the reverse conversion: to create a series of PNM files from an MPEG
b37900
-stream.
b37900
-
b37900
-

param_file is a parameter file which includes a list of

b37900
-input files and other parameters.  The file is described in detail
b37900
-below.
b37900
-
b37900
-

To understand this program, you need to understand something about

b37900
-the complex MPEG-1 format.  One source of information about this
b37900
-standard format is the section Introduction to MPEG in the 
b37900
-href="http://www.faqs.org/faqs/compression-faq">Compression FAQ.
b37900
-
b37900
-

OPTIONS

b37900
-
b37900
-

The -gop, -combine_gops, -frames, and

b37900
--combine_frames options are all mutually exclusive.
b37900
-
b37900
-
b37900
-
-stat stat_file
b37900
-
b37900
-
This option causes ppmtompeg to append the statistics that
b37900
-it write to Standard Output to the file stat_file as well.  The
b37900
-statistics use the following abbreviations: bits per block (bpb), bits
b37900
-per frame (bpf), seconds per frame (spf), and bits per second (bps).
b37900
-
b37900
-

These statistics include how many I, P, and B frames there were,

b37900
-and information about compression and quality.
b37900
-
b37900
-
b37900
-
-quiet num_seconds
b37900
-
b37900
-
causes ppmtompeg not to report remaining time more often
b37900
-than every num_seconds seconds (unless the time estimate rises,
b37900
-which will happen near the beginning of the run).  A negative value
b37900
-tells ppmtompeg not to report at all.  0 is the default
b37900
-(reports once after each frame).  Note that the time remaining is an
b37900
-estimate and does not take into account time to read in frames.
b37900
-
b37900
-
-realquiet
causes ppmtompeg to run silently,
b37900
-with the only screen output being errors.  Particularly useful when
b37900
-reading input from stdin.
b37900
-
b37900
-
b37900
--no_frame_summary
b37900
-
b37900
-
This option prevents ppmtompeg from printing a summary
b37900
-line for each frame
b37900
-
b37900
-
-float_dct
b37900
-
b37900
-
forces ppmtompeg to use a more accurate, yet more
b37900
-computationally expensive version of the DCT.
b37900
-
b37900
-
-gop gop_num
b37900
-
b37900
-causes ppmtompeg to encode only the numbered GOP (first GOP is 0).  The
b37900
-parameter file is the same as for normal usage.  The output file will be
b37900
-the normal output file with the suffix .gop.gop_num.
b37900
-ppmtompeg does not output any sequence information.
b37900
-
b37900
-
-combine_gops
b37900
-
b37900
-
causes ppmtompeg simply to combine some GOP files into a
b37900
-single MPEG output stream.  ppmtompeg inserts a sequence header
b37900
-and trailer.  In this case, the parameter file needs only to contain 
b37900
-the SIZE value, an output file, and perhaps a list of input GOP
b37900
-files (see below).
b37900
-
b37900
-If you don't supply a list of input GOP files is used, then
b37900
-ppmtompeg assumes you're using the same parameter file you used
b37900
-when you created the input (with the -gop option) and
b37900
-calculates the corresponding gop filenames itself.  If this is not the
b37900
-case, you can specify input GOP files in the same manner as normal
b37900
-input files -- except instead of using INPUT_DIR, INPUT, and
b37900
-END_INPUT, use GOP_INPUT_DIR, GOP_INPUT, and GOP_END_INPUT.  If no
b37900
-input GOP files are specified, then the default is to use the output
b37900
-file name with suffix .gop.gop_num, with gop_num
b37900
-starting from 0, as the input files.
b37900
-     
b37900
-

Thus, unless you're mixing and matching GOP files from different

b37900
-sources, you can simply use the same parameter file for creating the
b37900
-GOP files (-gop) and for later turning them into an MPEG stream
b37900
-(-combine_gops).
b37900
-     
b37900
-
b37900
-
-frames first_frame last_frame
b37900
-
b37900
-
This option causes ppmtompeg to encode only the frames numbered
b37900
-first_frame to last_frame, inclusive.  The parameter
b37900
-file is the same as for normal usage.  The output will be placed in
b37900
-separate files, one per frame, with the file names being the normal
b37900
-output file name with the suffix .frame.frame_num.  No
b37900
-GOP header information is output.  (Thus, the parameter file need not
b37900
-include the GOP_SIZE value)
b37900
-
b37900
-

Use ppmtompeg -combine_frames to combine these frames later into

b37900
-an MPEG stream.
b37900
-
b37900
-
b37900
-
-combine_frames
b37900
-
b37900
-
This option causes ppmtompeg simply to combine some
b37900
-individual MPEG frames (such as you might have created with an earlier
b37900
-run of ppmtompeg -frames) into a single MPEG stream.  Sequence
b37900
-and GOP headers are inserted appropriately.  In this case, the
b37900
-parameter file needs to contain only the SIZE value, the GOP_SIZE
b37900
-value, an output file, and perhaps a list of frame files (see below).
b37900
-
b37900
-

The parameter file may specify input frame files in the same manner

b37900
-as normal input files -- except instead of using INPUT_DIR, INPUT, and
b37900
-END_INPUT, use FRAME_INPUT_DIR, FRAME_INPUT, and FRAME_END_INPUT. If
b37900
-no input frame files are specified, then the default is to use the
b37900
-output file name with suffix .frame.frame_num, with
b37900
-frame_num starting from 0, as the input files.
b37900
-     
b37900
-
b37900
-
b37900
-
-nice
b37900
-
b37900
-
This option causes ppmtompeg to run any remote processes
b37900
-"nicely," i.e.  at low priority.  (This is relevant only if you are
b37900
-running ppmtompeg in parallel mode.  Otherwise, there are no
b37900
-remote processes).  See 'man nice.'
b37900
-
b37900
-
-max_machines num_machines
b37900
-
b37900
-
This option causes ppmtompeg to use no more than
b37900
-num_machines machines as slaves for use in parallel encoding.
b37900
-
b37900
-
-snr
b37900
-
b37900
-
This option causes ppmtompeg to include the signal-to-noise
b37900
-ratio in the reported statistics.  Prints SNR (Y U V) and peak SNR (Y
b37900
-U V) for each frame.  In summary, prints averages of luminance only
b37900
-(Y).  SNR is defined as 10*log(variance of original/variance of
b37900
-error).  Peak SNR is defined as 20*log(255/RMSE).  Note that
b37900
-ppmtompeg runs a little slower when you use this option.
b37900
-
b37900
-
-mse
b37900
-
b37900
-
This option causes ppmtompeg to report the mean squared
b37900
-error per block.  It also automatically reports the quality of the
b37900
-images, so there is no need to specify -snr then.
b37900
-
b37900
-
-bit_rate_info rate_file
b37900
-
b37900
-
This option makes ppmtompeg write bit rate information
b37900
-into the file rate_file.  Bit rate information is bits per frame, and
b37900
-also bits per I-frame-to-I-frame.
b37900
-
b37900
-
-mv_histogram
b37900
-
b37900
-
This option causes ppmtompeg to print a histogram of the
b37900
-motion vectors as part of statistics.  There are three histograms --
b37900
-one for P frame, one for forward B frame, and one for backward B frame
b37900
-motion vectors.
b37900
-
b37900
-

The output is in the form of a matrix, each entry corresponding to one

b37900
-motion vector in the search window. The center of the matrix
b37900
-represents (0,0) motion vectors.
b37900
-
b37900
-
-debug_sockets
b37900
-
b37900
-
This option causes ppmtompeg to print to Standard Output
b37900
-messages that narrate the communication between the machines when you run
b37900
-ppmtompeg in parallel mode.
b37900
-
b37900
-
-debug_machines
b37900
-
b37900
-
This option causes ppmtompeg to print to Standard Output
b37900
-messages that narrate the progress of the conversion on the various
b37900
-machines when you run ppmtompeg in parallel
b37900
-mode.
b37900
-     
b37900
-
b37900
-
b37900
-

PARAMETER FILE

b37900
-
b37900
-

The parameter file must contain the following

b37900
-lines (except when using the -combine_gops or -combine_frames
b37900
-options):
b37900
-
b37900
-
b37900
-
b37900
-
PATTERN pattern
b37900
-
b37900
-
This statement specifies the pattern (sequence) of I frames, P frames,
b37900
-and B frames.  pattern is just a sequence of the letters I, P, and
b37900
-B with nothing between.  Example:
b37900
-
b37900
-
b37900
-    PATTERN IBBPBBPBBPBBPBB
b37900
-     
b37900
-
b37900
-

See I Frames, P Frames, B Frames.

b37900
-
b37900
-
OUTPUT output file
b37900
-
This names the file where the output MPEG stream goes.
b37900
-     
b37900
-
INPUT_DIR directory
b37900
-
b37900
-
This statement tells where the input images (frames) come from.
b37900
-If each frame is in a separate file, directory is the directory
b37900
-where they all are.  You may use . to refer to the current 
b37900
-directory.  A null directory refers to the root directory of the
b37900
-system file tree.
b37900
-
b37900
-

To have ppmtompeg read all the frames serially from Standard

b37900
-Input, specify
b37900
-
b37900
-    INPUT_DIR stdin
b37900
-
b37900
-
b37900
-
INPUT
b37900
-
b37900
-This line must be followed by a list of the input files (in display order)
b37900
-and then the line END_INPUT.
b37900
-
b37900
-

There are three types of lines between INPUT and END_INPUT. First,

b37900
-a line may simply be the name of an input file.  Second, the line
b37900
-may be of the form single_star_expr
b37900
-[x-y].
b37900
-single_star_expr can have a single * in it.  It is
b37900
-replaced by all the numbers between x and y inclusive.  So, for
b37900
-example, the line tennis*.ppm [12-15] refers to the files
b37900
-tennis12.ppm, tennis13.ppm, tennis14.ppm, tennis15.ppm.
b37900
-
b37900
-

Uniform zero-padding occurs, as well. For example, the line

b37900
-football.*.ppm [001-130] refers to the files football.001.ppm,
b37900
-football.002.ppm, ..., football.009.ppm, football.010.ppm, ...,
b37900
-football.130.ppm.
b37900
-
b37900
-

The third type of line is: single_star_expr

b37900
-[x-y+s], where the
b37900
-line is treated exactly as above, except that we skip by s.  Thus, the
b37900
-line football.*.ppm [001-130+4] refers to the files
b37900
-football.001.ppm, football.005.ppm, football.009.ppm,
b37900
-football.013.ppm, etc.
b37900
-
b37900
-

Furthermore, a line may specify a shell command to execute to

b37900
-generate lines to be interpreted as described above, as if those lines
b37900
-were in the parameter file instead.  Use back ticks, like in the
b37900
-Bourne Shell, like this:
b37900
-
b37900
-
b37900
-    `cat myfilelist`
b37900
-
b37900
-
b37900
-

b37900
-If input is from Standard Input (per the INPUT_DIR statement), 
b37900
-ppmtompeg ignores the INPUT/END_INPUT block, but
b37900
-it still must be present.
b37900
-     
b37900
-
BASE_FILE_FORMAT {PPM | PNM | YUV |
b37900
-     JPEG | JMOVIE}
b37900
-
b37900
-
ppmtompeg must convert all input files to one of the
b37900
-following formats as a first step of processing: PNM, YUV, JPEG(v4),
b37900
-or JMOVIE.  (The conversion may be trivial if your input files are
b37900
-already in one of these formats).  This line specifies which of the
b37900
-four formats.  PPM is actually a subset of PNM.  The separate
b37900
-specification is allowed for backward compatibility.  Use PNM instead
b37900
-of PPM in new applications.
b37900
-
b37900
-
INPUT_CONVERT conversion_command
b37900
-
b37900
-
You must specify how to convert a file to the base file format.
b37900
-If no conversion is necessary, then you would just say:
b37900
-
b37900
-     
b37900
-     INPUT_CONVERT *
b37900
-     
b37900
-     
b37900
-

Otherwise, conversion_command is a shell command that causes

b37900
-an image in the format your specified with BASE_FILE_FORMAT to
b37900
-be written to Standard Output.  ppmtompeg executes the command
b37900
-once for each line between INPUT and END_INPUT (which is
b37900
-normally, but not necessarily, a file name).  In the conversion
b37900
-command, ppmtompeg replaces each '*' with the contents of that
b37900
-line.
b37900
-     
b37900
-     If you had a bunch of gif files, you might say:
b37900
-     
b37900
-     INPUT_CONVERT giftopnm *
b37900
-     
b37900
-
b37900
-     If you have a bunch of separate a.Y, a.U, and a.V files (where
b37900
-     the U and V have already been subsampled), then you might say:
b37900
-
b37900
-     
b37900
-     INPUT_CONVERT cat *.Y *.U *.V
b37900
-     
b37900
-
b37900
-

Input conversion is not allowed with input from stdin, so use

b37900
-
b37900
-     
b37900
-     INPUT_CONVERT *
b37900
-     
b37900
-
b37900
-as described above.
b37900
-     
b37900
-
SIZE widthxheight
b37900
-
b37900
-
b37900
-
b37900
-

width and height are the width and height of each

b37900
-frame in pixels.
b37900
-
b37900
-

When ppmtompeg can get this information from the input image

b37900
-files, it ignores the SIZE parameter and you may omit it.
b37900
-
b37900
-

When the image files are in YUV format, the files don't contain

b37900
-dimension information, so SIZE is required.
b37900
-
b37900
-

When ppmtompeg is running in parallel mode, not all of the

b37900
-processes in the network have access to the image files, so
b37900
-SIZE is required and must give the same dimensions as the
b37900
-input image files.
b37900
-
b37900
-
YUV_SIZE widthxheight
b37900
-
b37900
-
This is an obsolete synonym of SIZE.
b37900
-
b37900
-
YUV_FORMAT {ABEKAS | PHILLIPS | UCB |
b37900
-                      EYUV | pattern}
b37900
-
b37900
-
This is meaningful only when BASE_FILE_FORMAT specifies
b37900
-YUV format, and then it is required.  It specifies the sub-format of
b37900
-the YUV class.
b37900
-
b37900
-
b37900
-
GOP_SIZE n
b37900
-
b37900
-
n is the number of frames in a Group of Pictures. Except that
b37900
-because a GOP must start with an I frame, ppmtompeg makes a GOP as
b37900
-much longer than n as it has to to make the next GOP start with an
b37900
-I frame. 
b37900
-
b37900
-

Normally, it makes sense to make your GOP size a multiple of your

b37900
-pattern length (the latter is determined by the PATTERN parameter file
b37900
-statement).
b37900
-
b37900
-

See Group Of Pictures.

b37900
-
b37900
-
SLICES_PER_FRAME n
b37900
-
n is roughly the number of slices per frame. Note, at
b37900
-least one MPEG player may complain if slices do not start at the left
b37900
-side of an image.  To ensure this does not happen, make sure the
b37900
-number of rows is divisible by SLICES_PER_FRAME.
b37900
-
b37900
-
PIXEL {FULL | HALF}
b37900
-
b37900
-
use half-pixel motion vectors, or just full-pixel ones It is
b37900
-usually important that you use half-pixel motion vectors, because it
b37900
-results in both better quality and better compression.
b37900
-     
b37900
-
b37900
-
RANGE n
b37900
-
Use a search range of n pixels in each of the four directions
b37900
-from a subject pixel.  (So the search window is a square n*2 pixels
b37900
-on a side).
b37900
-
b37900
-
PSEARCH_ALG {EXHAUSTIVE | TWOLEVEL |
b37900
-     SUBSAMPLE | LOGARITHMIC}
b37900
-
b37900
-
This statement tells ppmtompeg what kind of search
b37900
-    technique (algorithm) to use for P frames.  You select the desired
b37900
-    combination of speed and compression.  EXHAUSTIVE gives the
b37900
-    best compression, but LOGARITHMIC is the fastest.
b37900
-    TWOLEVEL is an exhaustive full-pixel search, followed by a
b37900
-    local half- pixel search around the best full-pixel vector (the
b37900
-    PIXEL option is ignored for this search technique).
b37900
-
b37900
-
BSEARCH_ALG {SIMPLE | CROSS2 | EXHAUSTIVE}
b37900
-
b37900
-
This statement tells ppmtompeg what kind of search
b37900
-    technique (algorithm) to use for B frames.  SIMPLE means
b37900
-    find best forward and backward vectors, then interpolate.
b37900
-    CROSS2 means find those two vectors, then see what backward
b37900
-    vector best matches the best forward vector, and vice versa.
b37900
-    EXHAUSTIVE does an n-squared search and is
b37900
-    extremely slow in relation to the others (CROSS2
b37900
-    is about half as fast as SIMPLE).
b37900
-
b37900
-
IQSCALE n
b37900
-
Use n as the qscale for I frames.
b37900
-     See Qscale.
b37900
-
b37900
-
PQSCALE n
b37900
-
Use n as the qscale for P frames.
b37900
-     See Qscale.
b37900
-
b37900
-
BQSCALE n
b37900
-
Use n as the qscale for B frames.
b37900
-     See Qscale.
b37900
-
b37900
-
REFERENCE_FRAME {ORIGINAL | DECODED}
This
b37900
-statement determines whether ppmtompeg uses the original images
b37900
-or the decoded images when computing motion vectors.  Using decoded
b37900
-images is more accurate and should increase the playback quality of
b37900
-the output, but it makes the encoding take longer and seems to give
b37900
-worse compression.  It also causes some complications with parallel
b37900
-encoding. (see the section on parallel encoding).  One thing you can
b37900
-do as a trade-off is select ORIGINAL here, and lower the
b37900
-qscale (see QSCALE if the quality is not good enough.
b37900
-
b37900
-
b37900
-summary="comparison of original to decoded">
b37900
-  <caption>Original or Decoded? (Normalized)</caption>
b37900
-
b37900
-
b37900
-  
b37900
-    Reference
b37900
-    Compression
b37900
-    Speed
b37900
-    Quality I
b37900
-    Quality P
b37900
-    Quality B
b37900
-    
b37900
-  
b37900
-    Decoded
b37900
-    1000
b37900
-    1000
b37900
-    1000
b37900
-    969
b37900
-    919
b37900
-    
b37900
-  
b37900
-    Original
b37900
-    885
b37900
-    1373
b37900
-    1000
b37900
-    912
b37900
-    884
b37900
-    
b37900
-  
b37900
-
b37900
-
b37900
-
b37900
-
b37900
-     
b37900
-

The following lines are optional:

b37900
-
b37900
-
b37900
-
b37900
-
FORCE_ENCODE_LAST_FRAME
b37900
-
b37900
-
This statement is obsolete. It does nothing.
b37900
-
b37900
-

Before Netpbm 10.26 (January 2005), ppmtompeg would drop

b37900
-trailing B frames from your movie, since a movie can't end with a B
b37900
-frame.  (See I Frames, P Frames, B Frames.
b37900
-You would have to specify FORCE_ENCODE_LAST_FRAME to stop
b37900
-that from happening and get the same function that ppmtompeg
b37900
-has today.
b37900
-
b37900
-
b37900
-
NIQTABLE
b37900
-
b37900
-
This statement specifies a custom non-intra quantization table.
b37900
-If you don't specify this statement, ppmtompeg uses a default
b37900
-non-intra quantization table.
b37900
-
b37900
-

b37900
-The 8 lines immediately following NIQTABLE specify the quantization
b37900
-table.  Each line defines a table row and consists of 8 integers,
b37900
-whitespace-delimited, which define the table columns.
b37900
-
b37900
-
IQTABLE
b37900
-
b37900
-
This is analogous to NIQTABLE, but for the intra quantization table.
b37900
-
b37900
-
ASPECT_RATIO ratio
b37900
-
b37900
-
This statement specifies the aspect ratio for ppmtompeg to
b37900
-specify in the MPEG output.  I'm not sure what this is used for.
b37900
-
b37900
-

ratio must be 1.0, 0.6735, 0.7031, 0.7615, 0.8055, 0.8437,

b37900
-0.8935, 0.9157, 0.9815, 1.0255, 1.0695, 1.0950, 1.1575, or 1.2015.
b37900
-
b37900
-
FRAME_RATE rate
b37900
-
This specifies the frame rate for ppmtompeg to specify in the
b37900
-MPEG output.  Some players use this value to determine the playback rate.
b37900
-
b37900
-

rate must be 23.976, 24, 25, 29.97, 30, 50, 59.94, or 60.

b37900
-
b37900
-
BIT_RATE rate
b37900
-
This specifies the bit rate for Constant Bit Rate (CBR) encoding.
b37900
-
b37900
-

rate must be an integer.

b37900
-
b37900
-
BUFFER_SIZE size
b37900
-
b37900
-
This specifies the value
b37900
-ppmtompeg is to specify in the MPEG output for the Video
b37900
-Buffering Verifier (VBV) buffer size needed to decode the sequence.
b37900
-
b37900
-

A Video Verifying Buffer is a buffer in which a decoder keeps the

b37900
-decoded bits in order to match the uneven speed of the decoding with
b37900
-the required constant playback speed.
b37900
-
b37900
-

As ppmtompeg encodes the image, it simulates the decoding

b37900
-process in terms of how many bits would be in the VBV as each frame gets
b37900
-decoded, assuming a VBV of the size you indicate.  
b37900
-
b37900
-

If you specify the WARN_VBV_UNDERFLOW statement,

b37900
-ppmtompeg issues a warning each time the simulation underflows
b37900
-the buffer, which suggests that an underflow would occur on playback,
b37900
-which suggests the buffer is too small.
b37900
-
b37900
-

If you specify the WARN_VBV_OVERFLOW statement,

b37900
-ppmtompeg issues a warning each time the simulation overflows
b37900
-the buffer, which suggests that an overflow would occur on playback,
b37900
-which suggests the buffer is too small.
b37900
-
b37900
-
WARN_VBV_UNDERFLOW
b37900
-
WARN_VBV_OVERFLOW
b37900
-
b37900
-
See BUFFER_SIZE.
b37900
-
b37900
-

These options were new in Netpbm 10.26 (January 2005). Before that,

b37900
-ppmtompeg issued the warnings always.
b37900
-
b37900
-
b37900
-
b37900
-
b37900
-The following statements apply only to parallel operation:
b37900
-
b37900
-
b37900
-
b37900
-
PARALLEL
b37900
-
b37900
-
This statement, paired with END PARALLEL, is what causes
b37900
-ppmtompeg to operate in parallel mode.  See 
b37900
-href="#parallel">Parallel Operation.
b37900
-
b37900
-
END PARALLEL
b37900
-
b37900
-
This goes with PARALLEL.
b37900
-
b37900
-
PARALLEL_TEST_FRAMES n
b37900
-
b37900
-
The master starts off by measuring each slave's speed. It does
b37900
-this by giving each slave n frames to encode and noting how
b37900
-long the slave takes to finish.  These are not just test frames,
b37900
-though -- they're real frames and the results become part of the
b37900
-output.
b37900
-ppmtompeg is old and measures time in undivided seconds, so
b37900
-to get useful timings, specify enough frames that it will take at
b37900
-least 5 seconds to process them.  The default is 10.
b37900
-
b37900
-

If you specify FORCE_I_ALIGN, ppmtompeg will increase

b37900
-the test frames value enough to maintain the alignment.
b37900
-
b37900
-

If there aren't enough frames for every slave to have the indicated

b37900
-number of test frames, ppmtompeg will give some slaves fewer.
b37900
-
b37900
-
b37900
-
PARALLEL_TIME_CHUNKS t
b37900
-
b37900
-
When you specify this statement, the master attempts to feed work
b37900
-to the slaves in chunks that take t seconds to process.  It uses
b37900
-the speed measurement it made when it started up (see PARALLEL_TEST_FRAMES)
b37900
-to decide how many frames to put in the chunk.  This statement obviously
b37900
-doesn't affect the first batch of work sent to each slave, which is the
b37900
-one used to measure the slave's speed.
b37900
-
b37900
-

Smaller values of t increase communication, but improve load

b37900
-balancing.  The default is 30 seconds.
b37900
-
b37900
-

You may specify only one of PARALLEL_TIME_CHUNKS, PARALLEL_CHUNK_TAPER,

b37900
-and PARALLEL_PERFECT.  PARALLEL_CHUNK_TAPER is usually best.
b37900
-
b37900
-
PARALLEL_CHUNK_TAPER
b37900
-
b37900
-
When you specify this statement, the master distributes work like
b37900
-with PARALLEL_TIME_CHUNKS, except that the master chooses the number
b37900
-of seconds for the chunks.  It starts with a large number and, as it
b37900
-gets closer to finishing the job, reduces it.  That way, it reduces
b37900
-scheduling overhead when precise scheduling isn't helpful, but still
b37900
-prevents a slave from finishing early after all the work has already
b37900
-been handed out to the other slaves, and then sitting idle while
b37900
-there's still work to do.
b37900
-
b37900
-

You may specify only one of PARALLEL_TIME_CHUNKS, PARALLEL_CHUNK_TAPER,

b37900
-and PARALLEL_PERFECT.  PARALLEL_CHUNK_TAPER is usually best.
b37900
-
b37900
-
b37900
-
PARALLEL_PERFECT
b37900
-
b37900
-
If this statement is present, ppmtompeg schedules on the
b37900
-assumption that each machine is about the same speed.  The master will
b37900
-simply divide up the frames evenly between the slaves -- each
b37900
-slave gets the same number of frames.  If some slaves are faster than
b37900
-others, they will finish first and remain idle while the slower slaves
b37900
-continue.  
b37900
-
b37900
-

This has the advantage of minimal scheduling overhead. Where slaves

b37900
-have different speeds, though, it makes inefficient use of the fast
b37900
-ones.  Where slaves are the same speed, it also has the disadvantage
b37900
-that they all finish at the same time and feed their output to the
b37900
-single Combine Server in a burst, which makes less efficient use of
b37900
-the Combine Server and thus can increase the total elapsed time.
b37900
-
b37900
-

You may specify only one of PARALLEL_TIME_CHUNKS, PARALLEL_CHUNK_TAPER,

b37900
-and PARALLEL_PERFECT.  PARALLEL_CHUNK_TAPER is usually best.
b37900
-
b37900
-
RSH remote_shell_command
b37900
-
b37900
-
ppmtompeg executes the shell command
b37900
-remote_shell_command to start a process on another machine.
b37900
-The default command is rsh, and whatever command you specify
b37900
-must have compatible semantics.  ssh is usually compatible.
b37900
-The command ppmtompeg uses is one like this:
b37900
-ssh remote.host.com -l username shellcommand.
b37900
-
b37900
-

Be sure to set up .rhosts files or SSH key authorizations

b37900
-where needed.  Otherwise, you'll have to type in passwords.
b37900
-
b37900
-

On some HP machines, rsh is the restricted shell, and you want

b37900
-to specify remsh.
b37900
-
b37900
-
FORCE_I_ALIGN
b37900
-
b37900
-
This statement forces each slave to encode a chunk of frames which
b37900
-is a multiple of the pattern length (see PATTERN).  Since the
b37900
-first frame in any pattern is an I frame, this forces each chunk
b37900
-encoded by a slave to begin with an I frame.
b37900
-
b37900
-

This document used to say there was an argument to

b37900
-FORCE_I_ALIGN which was the number of frames ppmtompeg
b37900
-would use (and was required to be a multiple of the pattern length).
b37900
-But ppmtompeg has apparently always ignored that argument, and
b37900
-it does now.
b37900
-
b37900
-
KEEP_TEMP_FILES
b37900
-
b37900
-
This statement causes ppmtompeg not to delete the temporary
b37900
-files it uses to transmit encoded frames to the combine server.  This
b37900
-means you will be left with a file for each frame, the same as you
b37900
-would get with the -frames option.  
b37900
-
b37900
-

This is mostly useful for debugging.

b37900
-
b37900
-

This works only if you're using a shared filesystem to communicate

b37900
-between the servers.
b37900
-
b37900
-

This option was new in Netpbm 10.26 (January 2005).

b37900
-
b37900
-
b37900
-
b37900
-
b37900
-

Parameter File Notes

b37900
-
b37900
-

If you use the -combine_gops option, then you need to specify

b37900
-only the SIZE and OUTPUT values in the parameter file.  In
b37900
-addition, the parameter file may specify input GOP files in the same
b37900
-manner as normal input files -- except instead of using INPUT_DIR,
b37900
-INPUT, and END_INPUT, use GOP_INPUT_DIR, GOP_INPUT, and GOP_END_INPUT.
b37900
-If you specify no input GOP files, then ppmtompeg uses by default the
b37900
-output file name with suffix .gop.gop_num, with gop_num
b37900
-starting from 0, as the input files. 
b37900
-
b37900
-

If you use the -combine_frames option, then you need to

b37900
-specify only the SIZE, GOP_SIZE, and OUTPUT values in the
b37900
-parameter file.  In addition, the parameter file may specify input
b37900
-frame files in the same manner as normal input files -- except instead
b37900
-of using INPUT_DIR, INPUT, and END_INPUT, use FRAME_INPUT_DIR,
b37900
-FRAME_INPUT, and FRAME_END_INPUT.  If no input frame files are
b37900
-specified, then the default is to use the output file name with suffix
b37900
-.frame.frame_num, with frame_num starting from 0,
b37900
-as the input files.
b37900
-
b37900
-

Any number of spaces and tabs may come between each option and value. Lines

b37900
-beginning with # are ignored.  Any other lines are ignored except for
b37900
-those between INPUT and END_INPUT.  This allows you to use the same
b37900
-parameter file for normal usage and for -combine_gops and
b37900
--combine_frames.
b37900
-
b37900
-

The file format is case-sensitive so all keywords should be in

b37900
-upper case.
b37900
-
b37900
-

The statements may appear in any order, except that the order within

b37900
-a block statement (such as INPUT ... END INPUT) is significant.
b37900
-
b37900
-

ppmtompeg is prepared to handle up to 16 B frames between

b37900
-reference frames when encoding with input from stdin.  (To build a
b37900
-modified ppmtompeg with a higher limit, change the constant
b37900
-B_FRAME_RUN in frame.c and recompile).
b37900
-
b37900
-

GENERAL USAGE INFORMATION

b37900
-
b37900
-

Qscale

b37900
-
b37900
-

The quantization scale values (qscale) give a trade-off between

b37900
-quality and compression.  Using different Qscale values has very little
b37900
-effect on speed.  The qscale values can be set separately for I, P, and
b37900
-B frames.
b37900
-
b37900
-

You select the qscale values with the IQSCALE,

b37900
-PQSCALE, and BSCALE parameter file statements.
b37900
-
b37900
-

A qscale value is an integer from 1 to 31. Larger numbers give

b37900
-better compression, but worse quality.  In the following, the quality
b37900
-numbers are peak signal-to-noise ratio, defined as:
b37900
-signal-to-noise formula
b37900
-where MSE is the mean squared error.
b37900
-     
b37900
-
b37900
-

Flower garden tests:

b37900
-
b37900
-
b37900
-  <caption>Qscale vs Quality</caption>
b37900
-
b37900
-
b37900
-  
b37900
-    Qscale
b37900
-    I Frames
b37900
-    P Frames
b37900
-    B Frames
b37900
-    
b37900
-  
b37900
-    1
b37900
-    43.2
b37900
-    46.3
b37900
-    46.5
b37900
-    
b37900
-  
b37900
-    6
b37900
-    32.6
b37900
-    34.6
b37900
-    34.3
b37900
-    
b37900
-  
b37900
-    11
b37900
-    28.6
b37900
-    29.5
b37900
-    30.0
b37900
-    
b37900
-  
b37900
-    16
b37900
-    26.3
b37900
-    26.8
b37900
-    28.6
b37900
-    
b37900
-  
b37900
-    21
b37900
-    24.7
b37900
-    25.0
b37900
-    27.9
b37900
-    
b37900
-  
b37900
-    26
b37900
-    23.5
b37900
-    23.9
b37900
-    27.5
b37900
-    
b37900
-  
b37900
-    31
b37900
-    22.6
b37900
-    23.0
b37900
-    27.3
b37900
-    
b37900
-
b37900
-
b37900
-
b37900
-summary="Qscale vs Compression">
b37900
-  <caption>Qscale vs Compression</caption>
b37900
-
b37900
-
b37900
-  
b37900
-    Qscale
b37900
-    I Frames
b37900
-    P Frames
b37900
-    B Frames
b37900
-    
b37900
-  
b37900
-    1
b37900
-    2
b37900
-    2
b37900
-    2
b37900
-    
b37900
-  
b37900
-    6
b37900
-    7
b37900
-    10
b37900
-    15
b37900
-    
b37900
-  
b37900
-    11
b37900
-    11
b37900
-    18
b37900
-    43
b37900
-    
b37900
-  
b37900
-    16
b37900
-    15
b37900
-    29
b37900
-    97
b37900
-    
b37900
-  
b37900
-    21
b37900
-    19
b37900
-    41
b37900
-    173
b37900
-    
b37900
-  
b37900
-    26
b37900
-    24
b37900
-    56
b37900
-    256
b37900
-    
b37900
-  
b37900
-    31
b37900
-    28
b37900
-    73
b37900
-    330
b37900
-    
b37900
-
b37900
-
b37900
-
b37900
-

Search Techniques

b37900
-     
b37900
-

There are several different motion vector search techniques

b37900
-available.  There are different techniques available for P frame
b37900
-search and B frame search. Using different search techniques present
b37900
-little difference in quality, but a large difference in compression
b37900
-and speed.
b37900
-     
b37900
-

There are 4 types of P frame search: Exhaustive, TwoLevel,

b37900
-SubSample, and Logarithmic.
b37900
-     
b37900
-

There are 3 types of B frame search: Exhaustive, Cross2, and

b37900
-Simple.
b37900
-     
b37900
-The recommended search techniques are TwoLevel and Logarithmic for
b37900
-P frame search, and Cross2 and Simple for B frame search. Here are
b37900
-some numbers comparing the different search methods:
b37900
-     
b37900
-
b37900
-summary="P frame motion vector search">
b37900
-  <caption>P frame Motion Vector Search (Normalized)</caption>
b37900
-
b37900
-
b37900
-  
b37900
-    Technique
b37900
-    Compression<sup>1</sup>
b37900
-    Speed      <sup>2</sup>
b37900
-    Quality    <sup>3</sup>
b37900
-    
b37900
-  
b37900
-    Exhaustive
b37900
-    1000
b37900
-    1000
b37900
-    1000
b37900
-    
b37900
-  
b37900
-    SubSample
b37900
-    1008
b37900
-    2456
b37900
-    1000
b37900
-    
b37900
-  
b37900
-    TwoLevel
b37900
-    1009
b37900
-    3237
b37900
-    1000
b37900
-    
b37900
-  
b37900
-    Logarithmic
b37900
-    1085
b37900
-    8229
b37900
-    998
b37900
-    
b37900
-
b37900
-
b37900
-
b37900
-summary="B frame motion vector search">
b37900
-  <caption>B frame Motion Vector Search (Normalized)</caption>
b37900
-
b37900
-
b37900
-  
b37900
-    Technique
b37900
-    Compression<sup>1</sup>
b37900
-    Speed<sup>2</sup>
b37900
-    Quality<sup>3</sup>
b37900
-    
b37900
-  
b37900
-    Exhaustive
b37900
-    1000
b37900
-    1000
b37900
-    1000
b37900
-    
b37900
-  
b37900
-    Cross2
b37900
-    975
b37900
-    1000
b37900
-    996
b37900
-    
b37900
-  
b37900
-    Simple
b37900
-    938
b37900
-    1765
b37900
-    991
b37900
-    
b37900
-
b37900
-
b37900
- <sup>1</sup>Smaller numbers are better
b37900
-compression.
b37900
-
b37900
- <sup>2</sup>Larger numbers mean faster
b37900
-execution.
b37900
-
b37900
- <sup>3</sup>Larger numbers mean better quality.
b37900
-
b37900
-

For some reason, Simple seems to give better compression, but it

b37900
-depends on the image sequence.
b37900
-
b37900
-

Select the search techniques with the PSEARCH_ALG and

b37900
-BSEARCH_ALG parameter file statements.
b37900
-
b37900
-
b37900
-
b37900
-

Group Of Pictures (GOP)

b37900
-
b37900
-

A Group of Pictures (GOP) is a roughly independently decodable

b37900
-sequence of frames.  An MPEG video stream is made of one or more
b37900
-GOP's.  You may specify how many frames should be in each GOP with the
b37900
-GOP_SIZE parameter file statement.  A GOP always starts with an
b37900
-I frame.
b37900
-
b37900
-

Instead of encoding an entire sequence, you can encode a single

b37900
-GOP.  To do this, use the -gop command option.  You can later
b37900
-join the resulting GOP files at any time by running ppmtompeg
b37900
-with the -combine_gops command option.
b37900
-     
b37900
-     
b37900
-

Slices

b37900
-
b37900
-

A slice is an independently decodable unit in a frame. It can be

b37900
-as small as one macroblock, or it can be as big as the entire frame.
b37900
-Barring transmission error, adding slices does not change quality or
b37900
-speed; the only effect is slightly worse compression.  More slices are
b37900
-used for noisy transmission so that errors are more recoverable. Since
b37900
-usually errors are not such a problem, we usually just use one slice
b37900
-per frame.
b37900
-     
b37900
-

Control the slice size with the SLICES_PER_FRAME parameter

b37900
-file statement.
b37900
-
b37900
-

Some MPEG playback systems require that each slice consist of whole

b37900
-rows of macroblocks.  If you are encoding for this kind of player, if
b37900
-the height of the image is H pixels, then you should set the
b37900
-SLICES_PER_FRAME to some number which divides H/16.  For example, if
b37900
-the image is 240 pixels (15 macroblocks) high, then you should use
b37900
-only 15, 5, 3, or 1 slices per frame.
b37900
-     
b37900
-

Note: these MPEG playback systems are really wrong, since the MPEG

b37900
-standard says this doesn't have to be so.
b37900
-
b37900
-
b37900
-
b37900
-

Search Window

b37900
-     
b37900
-

The search window is the window in which ppmtompeg searches

b37900
-for motion vectors.  The window is a square.  You can specify the size
b37900
-of the square, and whether to allow half-pixel motion vectors or not,
b37900
-with the RANGE and PIXEL parameter file statements.
b37900
-
b37900
-

I Frames, P Frames, B Frames

b37900
-
b37900
-

In MPEG-1, a movie is represented as a sequence of MPEG frames,

b37900
-each of which is an I Frame, a P Frame, or a B Frame.  Each represents
b37900
-an actual frame of the movie (don't get confused by the dual use of
b37900
-the word "frame."  A movie frame is a graphical image.  An MPEG frame
b37900
-is a set of data that describes a movie frame).
b37900
-
b37900
-

An I frame ("intra" frame) describes a movie frame in isolation --

b37900
-without respect to any other frame in the movie.  A P frame
b37900
-("predictive" frame) describes a movie frame by describing how it
b37900
-differs from the movie frame described by the latest preceding I  or
b37900
-P frame.  A B frame ("bidirectional" frame) describes a movie frame by
b37900
-describing how it differs from the movie frames described by the
b37900
-nearest I or P frame before and after it.
b37900
-
b37900
-

Note that the first frame of a movie must be described by an I

b37900
-frame (because there is no previous movie frame) and the last movie
b37900
-frame must be described by an I or P frame (because there is no
b37900
-subsequent movie frame).
b37900
-
b37900
-

Beyond that, you can choose which frames are represented by which

b37900
-types.  You specify a pattern, such as IBPBP and ppmtompeg
b37900
-simply repeats it over and over throughout the movie.  The pattern
b37900
-affects speed, quality, and stream size.  Here is a chart which shows
b37900
-some of the trade-offs:
b37900
-
b37900
-
b37900
-summary="Comparison of I/P/B Frames">
b37900
-  <caption>Comparison of I/P/B Frames (Normalized)</caption>
b37900
-
b37900
-
b37900
-  
b37900
-    Frame Type
b37900
-    Size
b37900
-    Speed
b37900
-    Quality
b37900
-    
b37900
-  
b37900
-    I frames
b37900
-    1000
b37900
-    1000
b37900
-    1000
b37900
-    
b37900
-  
b37900
-    P frames
b37900
-    409
b37900
-    609
b37900
-    969
b37900
-    
b37900
-  
b37900
-    B frames
b37900
-    72
b37900
-    260
b37900
-    919
b37900
-    
b37900
-  
b37900
-
b37900
-(this is with constant qscale)
b37900
-     
b37900
-

A standard sequence is IBBPBBPBBPBBPBB.

b37900
-     
b37900
-

Select the sequence with the PATTERN parameter file statement.

b37900
-
b37900
-

Since the last MPEG frame cannot be a B frame (see above), if the

b37900
-pattern you specify indicates a B frame for the last movie frame of
b37900
-the movie, ppmtompeg makes it an I frame instead.
b37900
-
b37900
-

Before Netpbm 10.26 (January 2005), ppmtompeg instead drops

b37900
-the trailing B frames by default, and you need the
b37900
-FORCE_ENCODE_LAST_FRAME parameter file statement to make it do
b37900
-this.
b37900
-
b37900
-

The MPEG frames don't appear in the MPEG-1 stream in the same order that

b37900
-the corresponding movie frames appear in the movie -- the B frames come after
b37900
-the I and P frames on which they are based.  For example, if the movie is
b37900
-4 frames that you will represent with the pattern IBBP, the MPEG-1 stream
b37900
-will start with an I frame describing movie frame 0.  The next frame in
b37900
-the MPEG-1 stream is a P frame describing movie frame 3.  The last two
b37900
-frames in the MPEG-1 stream are B frames describing movie frames 1 and 2,
b37900
-respectively.
b37900
-
b37900
-
b37900
-

Specifying Input and Output Files

b37900
-
b37900
-

Specify the input frame images with the INPUT_DIR,

b37900
-INPUT, END_INPUT, BASE_FILE_FORMAT,
b37900
-SIZE, YUV_FORMAT and INPUT_CONVERT parameter
b37900
-file statements.
b37900
-
b37900
-

Specify the output file with the OUTPUT parameter file statement.

b37900
-
b37900
-
b37900
-

Statistics

b37900
-
b37900
-

ppmtompeg can generate a variety of statistics about the

b37900
-encoding.  See the -stat, -snr, -mv_histogram,
b37900
--quiet, -no_frame_summary, and -bit_rate_info
b37900
-options.
b37900
-     
b37900
-
b37900
-

PARALLEL OPERATION

b37900
-
b37900
-

You can run ppmtompeg on multiple machines at once, encoding

b37900
-the same MPEG stream.  When you do, the machines are used as shown in
b37900
-the following diagram.  We call this "parallel mode."
b37900
-
b37900
-

ppmtompeg-par.gif

b37900
-
b37900
-

To do parallel processing, put the statement

b37900
-
b37900
-
b37900
-    PARALLEL
b37900
-
b37900
-
b37900
-in the parameter file, followed by a listing of the machines, one
b37900
-machine per line, then
b37900
-
b37900
-
b37900
-    END_PARALLEL
b37900
-
b37900
-
b37900
-Each of the machine lines must be in one of two forms.  If the machine
b37900
-has filesystem access to the input files, then the line is:
b37900
-
b37900
-

b37900
-machine user executable
b37900
-
b37900
-

The executable is normally ppmtompeg (you may need to give

b37900
-the complete path if you've built for different architectures).  If
b37900
-the machine does not have filesystem access to the input files, the line
b37900
-is:
b37900
-
b37900
-

REMOTE machine user executable

b37900
-parameter file
b37900
-
b37900
-

The -max_machines command option limits the number of

b37900
-machines ppmtompeg will use.  If you specify more machines in
b37900
-the parameter file than -max_machines allows, ppmtompeg
b37900
-uses only the machines listed first.  This is handy if you want to
b37900
-experiment with different amounts of parallelism.
b37900
-
b37900
-

In general, you should use full path file names when describing

b37900
-executables and parameter files.  This includes the parameter
b37900
-file argument on the original invocation of ppmtompeg.
b37900
-
b37900
-

All file names must be the same on all systems (so if e.g. you're

b37900
-using an NFS filesystem, you must make sure it is mounted at the same
b37900
-mountpoint on all systems).
b37900
-
b37900
-

Because not all of the processes involved in parallel operation

b37900
-have easy access to the input files, you must specify the SIZE
b37900
-parameter file statement when you do parallel operation.
b37900
-
b37900
-

The machine on which you originally invoke ppmtompeg is the

b37900
-master machine.  It hosts a "combine server,", a
b37900
-"decode server," and a number of "i/o servers,"
b37900
-all as separate processes.  The other machines in the network (listed
b37900
-in the parameter file) are slave machines.  Each hosts a single
b37900
-process that continuously requests work from the master and does it.
b37900
-The slave process does the computation to encode MPEG frames.  It
b37900
-processes frames in batches identified by the master.
b37900
-
b37900
-

The master uses a remote shell command to start a process on a

b37900
-slave machine.  By default, it uses an rsh shell command to do
b37900
-this.  But use the RSH parameter file statement to control
b37900
-this.  The shell command the master executes remotely is
b37900
-ppmtompeg, but with options to indicate that it is to perform
b37900
-slave functions.
b37900
-
b37900
-

The various machines talk to each other over TCP connections. Each

b37900
-machine finds and binds to a free TCP port number and tells its
b37900
-partners the port number.  These port numbers are at least 2048.
b37900
-
b37900
-

Use the PARALLEL_TEST_FRAMES, PARALLEL_TIME_CHUNKS, and

b37900
-PARALLEL_PERFECT parameter file statements to control the way the
b37900
-master divides up work among the slaves.
b37900
-
b37900
-

Use the -nice command option to cause all slave processes to run

b37900
-"nicely," i.e. as low priority processes.  That way, this substantial and
b37900
-long-running CPU load will have minimal impact on other, possibly
b37900
-interactive, users of the systems.
b37900
-
b37900
- 
b37900
-

SPEED

b37900
-
b37900
-

Here is a look at ppmtompeg speed, in single-node (not parallel)

b37900
-operation:
b37900
-
b37900
-
b37900
-  <caption>Compression Speed</caption>
b37900
-
b37900
-
b37900
-  
b37900
-    Machine Type
b37900
-    Macroblocks per second<sup>1</sup>
b37900
-    
b37900
-  
b37900
-    HP 9000/755
b37900
-    280
b37900
-    
b37900
-  
b37900
-    DEC 3000/400
b37900
-    247
b37900
-    
b37900
-  
b37900
-    HP 9000/750
b37900
-    191
b37900
-    
b37900
-  
b37900
-    Sparc 10
b37900
-    104
b37900
-    
b37900
-  
b37900
-    DEC 5000
b37900
-    68
b37900
-    
b37900
-
b37900
-<sup>1</sup>A macroblock is a 16x16 pixel square
b37900
-
b37900
-

The measurements in the table are with inputs and outputs via a

b37900
-conventional locally attached filesystem.  If you are using a network
b37900
-filesystem over a single 10 MB/s Ethernet, that constrains your speed more
b37900
-than your CPU speed.  In that case, don't expect to get better than 4
b37900
-or 5 frames per second no matter how fast your CPUs are.
b37900
-
b37900
-

Network speed is even more of a bottleneck when the slaves do not

b37900
-have filesystem access to the input files -- i.e. you declare them
b37900
-REMOTE.
b37900
-
b37900
-

Where I/O is the bottleneck, size of the input frames can make a big

b37900
-difference.  So YUV input is better than PPM, and JPEG is better than
b37900
-both.
b37900
-
b37900
-

When you're first trying to get parallel mode working, be sure to

b37900
-use the -debug_machines option so you can see what's going on.
b37900
-Also, -debug_sockets can help you diagnose communication
b37900
-problems.
b37900
-
b37900
-
b37900
-

AUTHORS

b37900
-
b37900
-
    b37900
    -
    b37900
    -
  • Kevin Gong - University of California, Berkeley,
  • b37900
    -HREF="mailto:keving@cs.berkeley.edu">keving@cs.berkeley.edu
    b37900
    -
    b37900
    -
  • Ketan Patel - University of California, Berkeley,
  • b37900
    -HREF="mailto:kpatel@cs.berkeley.edu">kpatel@cs.berkeley.edu
    b37900
    -
    b37900
    -
  • Dan Wallach - University of California, Berkeley,
  • b37900
    -HREF="mailto:dwallach@cs.berkeley.edu">dwallach@cs.berkeley.edu
    b37900
    -
    b37900
    -
  • Darryl Brown - University of California, Berkeley,
  • b37900
    -HREF="mailto:darryl@cs.berkeley.edu">darryl@cs.berkeley.edu
    b37900
    -
    b37900
    -
  • Eugene Hung - University of California, Berkeley,
  • b37900
    -HREF="mailto:eyhung@cs.berkeley.edu">eyhung@cs.berkeley.edu
    b37900
    -
    b37900
    -
  • Steve Smoot - University of California, Berkeley,
  • b37900
    -HREF="mailto:smoot@cs.berkeley.edu">smoot@cs.berkeley.edu
    b37900
    -
    b37900
    -
    b37900
    -
    b37900
    -
    b37900
    - 
    b37900
    -

    Table Of Contents

    b37900
    -
      b37900
      -
    • SYNOPSIS
    • b37900
      -
    • DESCRIPTION
    • b37900
      -
    • OPTIONS
    • b37900
      -
    • PARAMETER FILE
    • b37900
      -
    • GENERAL USAGE INFORMATION
    • b37900
      -
    • PARALLEL OPERATION
    • b37900
      -
    • SPEED
    • b37900
      -
    • AUTHORS
    • b37900
      -
      b37900
      -</BODY>
      b37900
      -</HTML>