Plan 9 from Bell Labs’s /usr/web/sources/contrib/pac/sys/doc/netpbm/ms/pnmtofiasco.ms

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


.TL
Pnmtofiasco User Manual
.SH 1
pnmtofiasco
.LP
Updated: July 12, 2000
.br
Table Of Contents
.SH 2
NAME
.LP
pnmtofiasco - Convert PNM file to FIASCO compressed file
.SH 2
SYNOPSIS
.LP
\fBpnmtofiasco\fR
[\fIoption\fR]...
[\fIfilename\fR]...
.SH 2
DESCRIPTION
.LP
.LP
This program is part of Netpbm.
\fBpnmtofiasco\fR compresses the named pbm, pgm, or ppm image files,
or Standard Input if no file is named, and produces a FIASCO file on
Standard Output.
.SH 2
OPTIONS
.LP
.LP
All option names may be abbreviated; for example, --optimize may be
written --optim or --opt. For most options a one letter short option
is provided.  Mandatory or optional arguments to long options are
mandatory or optional for short options, too.  Both short and long
options are case sensitive.
.LP
The basic options are:
.RS
.IP "\fB-i\fR \fIname\fR, \fB--input-name=\fR\fIname\fR"
Compress the named images, not Standard Input.  If \fIname\fR is
\fB-\fR, read Standard Input.  \fIname\fR has to be either an image
filename or a template of the form:
.DS L
prefix[start-end{+,-}step]suffix
.br
.DE
.LP
Templates are useful when compressing video streams: e.g., if you
specify the template \fBimg0[12-01-2].pgm\fR, then \fBpnmtofiasco\fR
compresses the images img012.pgm, img010.pgm, ..., img002.pgm.
.LP
If \fIname\fR is a relative path, \fBpnmtofiasco \fR searches for
the image files in the current directory and in the (colon-separated)
list of directories given by the environment variable
\fBFIASCO_IMAGES\fR.
.IP "\fB-o\fR \fIoutput-file\fR, \fB--output-name=\fR\fIname\fR"
Write FIASCO output to the named file, not to Standard Output.
.LP
If \fIname\fR is a relative path and the environment variable
\fBFIASCO_DATA\fR is a (colon-separated) list of directories, then
\fBpnmtofiasco\fR writes the output file to the first (writable)
directory of this list. Otherwise, \fBpnmtofiasco\fR write it to the
current directory.
.IP "\fB-q\fR \fIN\fR, \fB--quality=\fR\fIN\fR"
Set quality of compression to \fIN\fR.  Quality is 1 (worst) to
100 (best); default is 20.
.IP "\fB-v\fR, \fB--version\fR"
Print \fBpnmtofiasco\fR version number, then exit.
.IP "\fB-V\fR \fIN\fR, \fB--verbose \fR\fIN\fR"
Set level of verbosity to \fIN\fR.  Level is 0 (no output at
all), 1 (show progress meter), or 2 (show detailed compression
statistics); default is 1.
.IP "\fB-B\fR \fIN\fR, \fB--progress-meter \fR\fIN\fR"
Set type of progress-meter to \fIN\fR.  The following types are
available; default is 1:
.RS
.IP "\fB0\fR"
no progress meter
.IP "\fB1\fR"
RPM style progress bar using 50 hash marks
.IP "\fB2\fR"
percentage meter
.RE
.IP "\fB-f\fR \fIname\fR, \fB--config=\fR\fIname\fR"
Load parameter file \fIname \fR to initialize the options of
\fBpnmtofiasco\fR.  See file \fBsystem.fiascorc\fR for an example of
the syntax. Options of \fBpnmtofiasco\fR are set by any of the
following methods (in the specified order):
.IP 1
Global resource file \fB/etc/system.fiascorc\fR
.IP 2
$HOME/.fiascorc
.IP 3
command line
.IP 4
--config=\fIname\fR
.LP
.IP "\fB-h\fR, \fB--info\fR"
Print brief help, then exit.
.IP "\fB-H\fR, \fB--help\fR"
Print detailed help, then exit.
.RE
.LP
The options for advanced users are:
.RS
.IP "\fB-b\fR \fIname\fR, \fB--basis-name=\fR\fIname\fR"
Preload compression basis \fIname\fR into FIASCO.  The basis
\fIname\fR provides the initial compression dictionary.  Either use
one of the files "small.fco", "medium.fco", or
"large.fco" that come with \fBpnmtofiasco \fR or create a
new ASCII basis file.
.IP "\fB-z\fR \fIN\fR, \fB--optimize=\fR\fIN\fR "
Set optimization level to \fIN\fR.  Level is 0 (fastest) to 3
(slowest); default is 1.  Be warned, the encoding time dramatically
increased when \fIN\fR=\fB2\fR or \fIN\fR=\fB3\fR while the
compression performance only slightly improves.
.IP "\fB-P\fR, \fB--prediction\fR"
Use additional predictive coding.  If this optimization is enabled
then the image is compressed in two steps.  In the first step, a coarse
approximation of the image is computed using large unichrome
blocks.  Finally, the delta image is computed and the prediction error
is approximated using the standard FIASCO algorithm.
.IP "\fB-D\fR \fIN\fR, \fB--dictionary-size=\fR\fIN\fR"
Set size of dictionary that is used when coding the luminance band
to \fIN\fR; default is 10000, i.e., the dictionary is not restricted.
.IP "\fB-C\fR \fIN\fR, \fB--chroma-dictionary=\fR\fIN\fR"
Set size of dictionary that is used when coding chroma bands to
\fIN\fR; default is 40.
.IP "\fB-Q\fR \fIN\fR, \fB--chroma-qfactor=\fR\fIN\fR"
Reduce the quality of chroma band compression \fIN\fR-times with
respect to the user defined quality \fIq\fR of the luminance band
compression (\fB--quality\fR=\fIq\fR); default is 2.
.IP "\fB-t\fR \fIN\fR, \fB--tiling-exponent=\fR\fIN\fR"
Subdivide the image into 2^\fIN\fR tiles prior coding; default is
4, i.e. the image is subdivided into 16 tiles. The processing order of
the individual tiles is defined by the option
\fB--tiling-method=\fR\fIname\fR.
.IP "\fB-T\fR \fIname\fR, \fB--tiling-method=\fR\fIname\fR"
Order the individual image tiles (the image is subdivided into;
see option \fB--tiling-exponent=\fR\fIN\fR) by method \fIname\fR;
default is \fBdesc-variance\fR.
.RS
.IP "\fBdesc-variance\fR"
Tiles with small variances are processed first.
.IP "\fBasc-variance\fR"
Tiles with large variances are processed first.
.IP "\fBdesc-spiral\fR"
Tiles are process in spiral order starting in the middle. 
.IP "\fBasc-spiral\fR"
Tiles are process in spiral order starting at the border.
.RE
.IP "\fB--rpf-mantissa=\fR\fIN\fR"
Use \fIN\fR mantissa bits for quantized coefficients.
.IP "\fB--dc-rpf-mantissa=\fR\fIN\fR"
Use \fIN\fR mantissa bits for quantized DC coefficients.
.IP "\fB--rpf-range=\fR\fIN\fR"
Coefficients outside the quantization interval
[-\fIN\fR,+\fIN\fR] are set to zero.
.IP "\fB--dc-rpf-range=\fR\fIN\fR"
DC coefficients outside the quantization interval
[-\fIN\fR,+\fIN\fR] are set to zero.
.RE
.LP
Additional options for video compression are
.RS
.IP "\fB-s\fR \fIN\fR, \fB--smooth=\fR\fIN\fR"
Smooth decompressed reference frames along the partitioning
borders by the given amount \fIN\fR.  \fIN\fR is 0 (no smoothing) to
100; default is 70.  This factor is stored in the FIASCO file.
.IP "\fB-m\fR \fIN\fR, \fB--min-level=\fR\fIN\fR"
Start prediction (motion compensated prediction or additional
prediction) on block level \fIN\fR; default is level 6.  I.e., motion
compensation is applied to all image blocks of at least 8x8 pixels
(binary tree level \fIN\fR=6), 16x8 (\fIN\fR=7), 16x16 (\fIN\fR=8),
etc.
.IP "\fB-M\fR \fIN\fR, \fB--max-level=\fR\fIN\fR"
Stop prediction (motion compensated prediction or additional
prediction) on block level \fIN\fR; default is level 10.  I.e.,
motion compensation is applied to all image blocks of at most 16x16
pixels (\fIN\fR=8), 32x16 (\fIN\fR=9), 32x32 (\fIN\fR=10), etc.
.IP "\fB-2\fR, \fB--half-pixel\fR"
Use half pixel precise motion compensation.
.IP "\fB-F\fR \fIN\fR, \fB--fps=\fR\fIN\fR"
Set number of frames per second to \fIN\fR.  This value is stored
in the FIASCO output file and is used in the decoder fiascotopnm to control the framerate.
.IP "\fB-p\fR \fItype\fR, \fB--pattern=\fR\fItype\fR"
Defines the type of inter frame compression which should be
applied to individual frames of a video stream.  \fItype\fR is a
sequence of characters; default is "IPPPPPPPPP".  Element
\fBN\fR defines the type of predicting which should be used for frame
\fBN\fR; the frame type pattern is periodically extended.  Valid
characters are:
.RS
.IP "\fBI\fR"
intra frame, i.e., no motion compensated prediction is used at
all.
.IP "\fBP\fR"
predicted frame, i.e., a previously encoded frame is used for
prediction (forward prediction).
.IP "\fBB\fR"
bidirectional predicted frame, i.e., not only a previously shown
frame but also a frame of the future is used for prediction (forward,
backward or interpolated prediction).
.RE
.IP "\fB--cross-B-search\fR"
Instead of using exhaustive search the "Cross-B-Search"
algorithm is used to find the best interpolated prediction of
B-frames.
.IP "--B-as-past-ref"
Also use previously encoded B-frames when prediction the current
frame. If this option is not set, only I- and P-frames are used to
predict the current frame.
.RE
.SH 2
EXAMPLES
.LP
.LP
Compress the still image "foo.ppm" to the FIASCO file
"foo.wfa" using the default options:
.DS L
        pnmtofiasco < foo.ppm >foo.wfa
.DE
.LP
Compress the video frames "foo0*.ppm" to the FIASCO file
"video.wfa" using half pixel precise motion compensation at
a frame rate of 15 frames per second.  Intra frame 1 is used to
predict P-frame 4, frames 1 and 4 are used to predict B-frames 2 and
3, and so on.  Frame 10 is again an intra-frame.
.DS L
        pnmtofiasco -2 -p "IBBPBBPBB" -fps 15 -o video.wfa foo0*.ppm
.DE
.SH 2
FILES
.LP
.RS
.IP "\fB/etc/system.fiascorc\fR"
The systemwide initialization file.
.IP "$HOME\fB/.fiascorc\fR"
The personal initialization file.
.RE
.SH 2
ENVIRONMENT
.LP
.RS
.IP "\fBFIASCO_IMAGES\fR"
Search path for image files.  Default is "./".
.IP "\fBFIASCO_DATA\fR"
Search and save path for FIASCO files.  Default is "./".
.RE
.SH 2
SEE ALSO
.LP
\fBfiascotopnm\fR,
\fBppmtojpeg\fR,
\fBpnmtojbig\fR,
\fBppmtogif\fR,
\fBpnm\fR
.LP
Ullrich Hafner, Juergen Albert, Stefan Frank, and Michael Unger.
\fBWeighted Finite Automata for Video Compression\fR, IEEE Journal on
Selected Areas In Communications, January 1998
.LP
Ullrich Hafner. \fBLow Bit-Rate Image and Video Coding with
Weighted Finite Automata\fR, Ph.D. thesis, Mensch & Buch Verlag,
ISBN 3-89820-002-7, October 1999.
.LP
FIASCO: An
Open-Source Fractal Image and Sequence Codec, Linux Journal,
January 2001.
.SH 2
AUTHOR
.LP
Ullrich Hafner <hafner@bigfoot.de>
.br
\l'5i'
.SH 2
Table Of Contents
.LP
.IP \(bu
NAME
.IP \(bu
SYNOPSIS
.IP \(bu
DESCRIPTION
.IP \(bu
OPTIONS
.IP \(bu
EXAMPLES
.IP \(bu
FILES
.IP \(bu
ENVIRONMENT
.IP \(bu
SEE ALSO
.IP \(bu
AUTHOR
.LP

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.