summaryrefslogtreecommitdiffstats
path: root/upstream/debian-unstable/man1/pnmtofiasco.1
blob: 614b24f92e73ccc8c2a9ba45f0be4a63a03732b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
\
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
.\" Do not hand-hack it!  If you have bug fixes or improvements, please find
.\" the corresponding HTML page on the Netpbm website, generate a patch
.\" against that, and send it to the Netpbm maintainer.
.TH "Pnmtofiasco User Manual" 1 "12 July 2000" "netpbm documentation"

.SH NAME

pnmtofiasco - Convert PNM file to FIASCO compressed file

.UN synopsis
.SH SYNOPSIS

\fBpnmtofiasco\fP
[\fIoption\fP]...
[\fIfilename\fP]...

.UN description
.SH DESCRIPTION
.PP
This program is part of
.BR "Netpbm" (1)\c
\&.

\fBpnmtofiasco\fP 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.

.UN options
.SH OPTIONS
.PP
In addition to the options common to all programs based on libnetpbm
(most notably \fB-quiet\fP, see 
.UR index.html#commonoptions
 Common Options
.UE
\&), \fBpnmtofiasco\fP recognizes the following
command line options:
.PP
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.

.UN basicopts
.SS Basic Options


.TP
\fB-i\fP \fIname\fP, \fB--image-name=\fP\fIname\fP
Compress the named images, not Standard Input.  If \fIname\fP is
\fB-\fP, read Standard Input.  \fIname\fP has to be either an image
filename or a template of the form:

.nf
prefix[start-end{+,-}step]suffix

.fi
.sp
Templates are useful when compressing video streams: e.g., if you
specify the template \fBimg0[12-01-2].pgm\fP, then \fBpnmtofiasco\fP
compresses the images img012.pgm, img010.pgm, ..., img002.pgm.
.sp
If \fIname\fP is a relative path, \fBpnmtofiasco \fP searches for
the image files in the current directory and in the (colon-separated)
list of directories given by the environment variable
\fBFIASCO_IMAGES\fP.

.TP
\fB-o\fP \fIoutput-file\fP, \fB--output-name=\fP\fIname\fP
Write FIASCO output to the named file, not to Standard Output.
.sp
If \fIname\fP is a relative path and the environment variable
\fBFIASCO_DATA\fP is a (colon-separated) list of directories, then
\fBpnmtofiasco\fP writes the output file to the first (writable)
directory of this list. Otherwise, \fBpnmtofiasco\fP write it to the
current directory.

.TP
\fB-q\fP \fIN\fP, \fB--quality=\fP\fIN\fP
Set quality of compression to \fIN\fP.  Quality is 1 (worst) to
100 (best); default is 20.

.TP
\fB-v\fP, \fB--version\fP
Print \fBpnmtofiasco\fP version number, then exit.

.TP
\fB-V\fP \fIN\fP, \fB--verbose \fP\fIN\fP
Set level of verbosity to \fIN\fP.  Level is 0 (no output at
all), 1 (show progress meter), or 2 (show detailed compression
statistics); default is 1.

.TP
\fB-B\fP \fIN\fP, \fB--progress-meter \fP\fIN\fP
Set type of progress-meter to \fIN\fP.  The following types are
available; default is 1:


.TP
\fB0\fP
no progress meter

.TP
\fB1\fP
RPM style progress bar using 50 hash marks

.TP
\fB2\fP
percentage meter



.TP
\fB-f\fP \fIname\fP, \fB--config=\fP\fIname\fP
Load parameter file \fIname \fP to initialize the options of
\fBpnmtofiasco\fP.  See file \fBsystem.fiascorc\fP for an example of
the syntax. Options of \fBpnmtofiasco\fP are set by any of the
following methods (in the specified order):


.IP \(bu
Global resource file \fB/etc/system.fiascorc\fP
.IP \(bu
$HOME/.fiascorc
.IP \(bu
command line
.IP \(bu
--config=\fIname\fP


.TP
\fB-h\fP, \fB--info\fP
Print brief help, then exit.

.TP
\fB-H\fP, \fB--help\fP
Print detailed help, then exit.



.UN advancedopts
.SS Options for Advanced Users


.TP
\fB-b\fP \fIname\fP, \fB--basis-name=\fP\fIname\fP
Preload compression basis \fIname\fP into FIASCO.  The basis
\fIname\fP provides the initial compression dictionary.  Either use
one of the files "small.fco", "medium.fco", or
"large.fco" that come with \fBpnmtofiasco \fP or create a
new ASCII basis file.

.TP
\fB-z\fP \fIN\fP, \fB--optimize=\fP\fIN\fP 
Set optimization level to \fIN\fP.  Level is 0 (fastest) to 3
(slowest); default is 1.  Be warned, the encoding time dramatically
increased when \fIN\fP=\fB2\fP or \fIN\fP=\fB3\fP while the
compression performance only slightly improves.

.TP
\fB-P\fP, \fB--prediction\fP
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.

.TP
\fB-D\fP \fIN\fP, \fB--dictionary-size=\fP\fIN\fP
Set size of dictionary that is used when coding the luminance band
to \fIN\fP; default is 10000, i.e., the dictionary is not restricted.

.TP
\fB-C\fP \fIN\fP, \fB--chroma-dictionary=\fP\fIN\fP
Set size of dictionary that is used when coding chroma bands to
\fIN\fP; default is 40.

.TP
\fB-Q\fP \fIN\fP, \fB--chroma-qfactor=\fP\fIN\fP
Reduce the quality of chroma band compression \fIN\fP-times with
respect to the user defined quality \fIq\fP of the luminance band
compression (\fB--quality\fP=\fIq\fP); default is 2.

.TP
\fB-t\fP \fIN\fP, \fB--tiling-exponent=\fP\fIN\fP
Subdivide the image into 2^\fIN\fP 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=\fP\fIname\fP.

.TP
\fB-T\fP \fIname\fP, \fB--tiling-method=\fP\fIname\fP
Order the individual image tiles (the image is subdivided into;
see option \fB--tiling-exponent=\fP\fIN\fP) by method \fIname\fP;
default is \fBdesc-variance\fP.


.TP
\fBdesc-variance\fP
Tiles with small variances are processed first.

.TP
\fBasc-variance\fP
Tiles with large variances are processed first.

.TP
\fBdesc-spiral\fP
Tiles are process in spiral order starting in the middle. 

.TP
\fBasc-spiral\fP
Tiles are process in spiral order starting at the border.



.TP
\fB--rpf-mantissa=\fP\fIN\fP
Use \fIN\fP mantissa bits for quantized coefficients.

.TP
\fB--dc-rpf-mantissa=\fP\fIN\fP
Use \fIN\fP mantissa bits for quantized DC coefficients.

.TP
\fB--rpf-range=\fP\fIN\fP
Coefficients outside the quantization interval
[-\fIN\fP,+\fIN\fP] are set to zero.

.TP
\fB--dc-rpf-range=\fP\fIN\fP
DC coefficients outside the quantization interval
[-\fIN\fP,+\fIN\fP] are set to zero.



.UN videoopts
.SS Additional Options for Video Compression


.TP
\fB-s\fP \fIN\fP, \fB--smooth=\fP\fIN\fP
Smooth decompressed reference frames along the partitioning
borders by the given amount \fIN\fP.  \fIN\fP is 0 (no smoothing) to
100; default is 70.  This factor is stored in the FIASCO file.

.TP
\fB-m\fP \fIN\fP, \fB--min-level=\fP\fIN\fP
Start prediction (motion compensated prediction or additional
prediction) on block level \fIN\fP; default is level 6.  I.e., motion
compensation is applied to all image blocks of at least 8x8 pixels
(binary tree level \fIN\fP=6), 16x8 (\fIN\fP=7), 16x16 (\fIN\fP=8),
etc.

.TP
\fB-M\fP \fIN\fP, \fB--max-level=\fP\fIN\fP
Stop prediction (motion compensated prediction or additional
prediction) on block level \fIN\fP; default is level 10.  I.e.,
motion compensation is applied to all image blocks of at most 16x16
pixels (\fIN\fP=8), 32x16 (\fIN\fP=9), 32x32 (\fIN\fP=10), etc.

.TP
\fB-2\fP, \fB--half-pixel\fP
Use half pixel precise motion compensation.

.TP
\fB-F\fP \fIN\fP, \fB--fps=\fP\fIN\fP
Set number of frames per second to \fIN\fP.  This value is stored
in the FIASCO output file and is used in the decoder
.BR "fiascotopnm" (1)\c
\& to control the framerate.

.TP
\fB-p\fP \fItype\fP, \fB--pattern=\fP\fItype\fP
Defines the type of inter frame compression which should be
applied to individual frames of a video stream.  \fItype\fP is a
sequence of characters; default is "IPPPPPPPPP".  Element
\fBN\fP defines the type of predicting which should be used for frame
\fBN\fP; the frame type pattern is periodically extended.  Valid
characters are:


.TP
\fBI\fP
intra frame, i.e., no motion compensated prediction is used at
all.

.TP
\fBP\fP
predicted frame, i.e., a previously encoded frame is used for
prediction (forward prediction).

.TP
\fBB\fP
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).



.TP
\fB--cross-B-search\fP
Instead of using exhaustive search the "Cross-B-Search"
algorithm is used to find the best interpolated prediction of
B-frames.

.TP
\fB--B-as-past-ref\fP
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.




.UN examples
.SH EXAMPLES
.PP
Compress the still image "foo.ppm" to the FIASCO file
"foo.wfa" using the default options:

.nf
        pnmtofiasco < foo.ppm >foo.wfa

.fi
.PP
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.

.nf
        pnmtofiasco -2 -p "IBBPBBPBB" -fps 15 -o video.wfa foo0*.ppm

.fi

.UN files
.SH FILES


.TP
\fB/etc/system.fiascorc\fP
The systemwide initialization file.

.TP
$HOME\fB/.fiascorc\fP
The personal initialization file.



.UN environment
.SH ENVIRONMENT




.TP
\fBFIASCO_IMAGES\fP
Search path for image files.  Default is "./".

.TP
\fBFIASCO_DATA\fP
Search and save path for FIASCO files.  Default is "./".



.UN seealso
.SH SEE ALSO
.BR "fiascotopnm" (1)\c
\&,
.BR "pnmtojpeg" (1)\c
\&,
.BR "pnmtojbig" (1)\c
\&,
.BR "pamtogif" (1)\c
\&,
.BR "pnm" (1)\c
\&
.PP
Ullrich Hafner, Juergen Albert, Stefan Frank, and Michael Unger.
\fBWeighted Finite Automata for Video Compression\fP, IEEE Journal on
Selected Areas In Communications, January 1998
.PP
Ullrich Hafner. \fBLow Bit-Rate Image and Video Coding with
Weighted Finite Automata\fP, Ph.D. thesis, Mensch & Buch Verlag,
ISBN 3-89820-002-7, October 1999.
.PP
FIASCO: An Open-Source Fractal Image and Sequence Codec, Linux Journal,
January 2001.

.UN author
.SH AUTHOR

Ullrich Hafner <\fIhafner@bigfoot.de\fP>
.SH DOCUMENT SOURCE
This manual page was generated by the Netpbm tool 'makeman' from HTML
source.  The master documentation is at
.IP
.B http://netpbm.sourceforge.net/doc/pnmtofiasco.html
.PP