~ubuntu-branches/ubuntu/jaunty/netpbm-free/jaunty

« back to all changes in this revision

Viewing changes to pnm/fiasco/pnmtofiasco.1

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Barth
  • Date: 2004-07-29 20:25:46 UTC
  • Revision ID: james.westby@ubuntu.com-20040729202546-5x43bcfsdlt7dspl
Tags: upstream-10.0
ImportĀ upstreamĀ versionĀ 10.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH pnmmtofiasco 1 "July 12, 2000" 
 
2
 
 
3
.SH NAME
 
4
pnmtofiasco - Convert a portable anymap to FIASCO compressed file
 
5
 
 
6
.SH SYNOPSIS
 
7
.B pnmtofiasco
 
8
.RI [ option ]...
 
9
.RI [ filename ]...
 
10
 
 
11
.SH DESCRIPTION
 
12
.B pnmtofiasco 
 
13
compresses the named pbm, pgm, or ppm image files, or Standard Input
 
14
if no file is named, and produces a FIASCO file on Standard Output.
 
15
 
 
16
.SH OPTIONS
 
17
All option names may be abbreviated; for example, --optimize may be
 
18
written --optim or --opt. For most options a one letter short option
 
19
is provided.  Mandatory or optional arguments to long options are
 
20
mandatory or optional for short options, too.  Both short and long
 
21
options are case sensitive.
 
22
 
 
23
The basic options are:
 
24
 
 
25
.TP
 
26
\fB\-i\fP \fIname\fP, \fB\-\-input-name=\fIname\fP
 
27
Compress the named images, not Standard Input.
 
28
If 
 
29
.I name
 
30
is 
 
31
.BR - ,
 
32
read Standard Input.  
 
33
.I name
 
34
has to be either an image filename or a template of the form:
 
35
 
 
36
.ce
 
37
prefix[start-end{+,-}step]suffix
 
38
 
 
39
Templates are useful when compressing video streams: e.g., if you specify
 
40
the template 
 
41
.BR "img0[12-01-2].pgm" ,
 
42
then 
 
43
.B pnmtofiasco
 
44
compresses the images img012.pgm, img010.pgm, ..., img002.pgm.
 
45
 
 
46
If 
 
47
.I name
 
48
is a relative path,
 
49
.B pnmtofiasco 
 
50
searches for the image files in the current directory and in the
 
51
(colon-separated) list of directories given by the environment
 
52
variable 
 
53
.BR FIASCO_IMAGES .
 
54
 
 
55
.TP
 
56
\fB\-o\fP \fIoutput-file\fP, \fB\-\-output-name=\fIname\fP
 
57
Write FIASCO output to the named file, not to Standard Output.
 
58
 
 
59
If 
 
60
.I name
 
61
is a relative path and the environment variable
 
62
.B FIASCO_DATA
 
63
is a (colon-separated) list of directories, then 
 
64
.B pnmtofiasco
 
65
writes the output file to the first (writable) directory of this
 
66
list. Otherwise, 
 
67
.B pnmtofiasco
 
68
write it to the current directory.
 
69
 
 
70
.TP
 
71
\fB\-q\fP \fIN\fP, \fB\-\-quality=\fIN\fP
 
72
Set quality of compression to 
 
73
.IR N . 
 
74
Quality is 1 (worst) to 100 (best); default is 20.
 
75
 
 
76
.TP
 
77
\fB\-v\fP, \fB\-\-version
 
78
Print 
 
79
.B pnmtofiasco
 
80
version number, then exit.
 
81
 
 
82
.TP
 
83
\fB\-V\fP \fIN\fP, \fB\-\-verbose \fIN\fP
 
84
Set level of verbosity to 
 
85
.IR N .  
 
86
Level is 0 (no output at all), 1 (show progress meter), or 2 (show
 
87
detailed compression statistics); default is 1.
 
88
 
 
89
.TP
 
90
\fB\-B\fP \fIN\fP, \fB\-\-progress-meter \fIN\fP
 
91
Set type of progress-meter to 
 
92
.IR N .
 
93
The following types are available; default is 1:
 
94
 
 
95
.BR 0 : 
 
96
no progress meter
 
97
 
 
98
.BR 1 :
 
99
RPM style progress bar using 50 hash marks
 
100
 
 
101
.BR 2 : 
 
102
percentage meter
 
103
 
 
104
.TP
 
105
\fB\-f\fP \fIname\fP, \fB\-\-config=\fIname\fP
 
106
Load parameter file 
 
107
.I name 
 
108
to initialize the options of
 
109
.BR pnmtofiasco .
 
110
See file 
 
111
.B system.fiascorc
 
112
for an example of the syntax. Options of
 
113
.B pnmtofiasco
 
114
are set by any of the following methods (in the specified order):
 
115
 
 
116
1) Global ressource file 
 
117
.B /etc/system.fiascorc
 
118
 
 
119
2) $HOME/.fiascorc
 
120
 
 
121
3) command line
 
122
 
 
123
4) --config=\fIname\fP
 
124
 
 
125
.TP
 
126
\fB\-h\fP, \fB\-\-info
 
127
Print brief help, then exit.
 
128
 
 
129
.TP
 
130
\fB\-H\fP, \fB\-\-help
 
131
Print detailed help, then exit.
 
132
 
 
133
.TP
 
134
The options for advanced users are:
 
135
 
 
136
.TP
 
137
\fB\-b\fP \fIname\fP, \fB\-\-basis-name=\fIname\fP
 
138
Preload compression basis \fIname\fP into FIASCO. The basis \fIname\fP
 
139
provides the initial compression dictionary.  Either use one of the
 
140
files "small.fco", "medium.fco", or "large.fco" that come with
 
141
.B pnmtofiasco 
 
142
or create a new ASCII basis file.
 
143
   
 
144
.TP
 
145
\fB\-z\fP \fIN\fP, \fB\-\-optimize=\fIN\fP Set optimization level to
 
146
\fIN\fP. Level is 0 (fastes) to 3 (slowest); default is 1. Be warned,
 
147
the encoding time dramatically increased when \fIN\fP=\fB2\fP or
 
148
\fIN\fP=\fB3\fP while the compression performance only slightly
 
149
improves.
 
150
 
 
151
.TP
 
152
\fB\-P\fP, \fB\-\-prediction
 
153
Use additional predictive coding. If this optimization is enabled then
 
154
the image is compressed in two steps. In the first step, a coarse
 
155
approximation of the image is computed using large unichrome
 
156
blocks. Finally, the delta image is computed and the prediction error
 
157
is approximated using the standard FIASCO algorithm.
 
158
 
 
159
.TP
 
160
\fB\-D\fP \fIN\fP, \fB\-\-dictionary-size=\fIN\fP
 
161
Set size of dictionary that is used when coding the luminance
 
162
band to \fIN\fP; default is 10000, i.e., the dictionary is not
 
163
restricted.
 
164
 
 
165
.TP
 
166
\fB\-C\fP \fIN\fP, \fB\-\-chroma-dictionary=\fIN\fP
 
167
Set size of dictionary that is used when coding chroma bands to
 
168
\fIN\fP; default is 40. 
 
169
 
 
170
.TP
 
171
\fB\-Q\fP \fIN\fP, \fB\-\-chroma-qfactor=\fIN\fP
 
172
Reduce the quality of chroma band compression \fIN\fP-times with
 
173
respect to the user defined quality \fIq\fP of the luminance
 
174
band compression (\fB\-\-quality\fP=\fIq\fP); default is 2.
 
175
 
 
176
.TP
 
177
\fB\-t\fP \fIN\fP, \fB\-\-tiling-exponent=\fIN\fP
 
178
Subdivide the image into 2^\fIN\fP tiles prior coding; default is 4,
 
179
i.e. the image is subdivided into 16 tiles. The processing order of
 
180
the individual tiles is defined by the option
 
181
\fB\-\-tiling-method=\fIname\fP. 
 
182
 
 
183
.TP
 
184
\fB\-T\fP \fIname\fP, \fB\-\-tiling-method=\fIname\fP
 
185
Order the individual image tiles (the image is subdivided into; see
 
186
option \fB\-\-tiling-exponent=\fP\fIN\fP) by method \fIname\fP; default
 
187
is "desc-variance".
 
188
 
 
189
\fBdesc-variance\fP: Tiles with small variances are processed first.
 
190
 
 
191
\fBasc-variance\fP: Tiles with large variances are processed first.
 
192
 
 
193
\fBdesc-spiral\fP: Tiles are process in spiral order starting in the
 
194
middle. 
 
195
 
 
196
\fBasc-spiral\fP: Tiles are process in spiral order starting at the
 
197
border.
 
198
 
 
199
.TP
 
200
\fB\-\-rpf-mantissa=\fIN\fP
 
201
Use \fIN\fP mantissa bits for quantized coefficients.
 
202
 
 
203
.TP
 
204
\fB\-\-dc-rpf-mantissa=\fIN\fP
 
205
Use \fIN\fP mantissa bits for quantized DC coefficients.
 
206
 
 
207
.TP
 
208
\fB\-\-rpf-range=\fIN\fP
 
209
Coefficients outside the quantization interval [-\fIN\fP,+\fIN\fP] are
 
210
set to zero.
 
211
 
 
212
.TP
 
213
\fB\-\-dc-rpf-range=\fIN\fP
 
214
DC coefficients outside the quantization interval [-\fIN\fP,+\fIN\fP] are
 
215
set to zero.
 
216
 
 
217
.TP
 
218
Additional options for video compression are:
 
219
 
 
220
.TP
 
221
\fB\-s\fP \fIN\fP, \fB\-\-smooth=\fIN\fP
 
222
Smooth decompressed reference frames along the partitioning borders by
 
223
the given amount \fIN\fP. \fIN\fP is 0 (no smoothing) to 100; default
 
224
is 70. This factor is stored in the FIASCO file. 
 
225
 
 
226
.TP
 
227
\fB\-m\fP \fIN\fP, \fB\-\-min-level=\fIN\fP
 
228
Start prediction (motion compensated prediction or additional prediction) on
 
229
block level \fIN\fP; default is level 6. I.e., motion compensation is
 
230
applied to all image blocks of at least 8x8 pixels (binary tree level
 
231
\fIN\fP=6), 16x8 (\fIN\fP=7), 16x16 (\fIN\fP=8), etc.
 
232
 
 
233
.TP
 
234
\fB\-M\fP \fIN\fP, \fB\-\-max-level=\fIN\fP
 
235
Stop prediction (motion compensated prediction or additional prediction) on
 
236
block level \fIN\fP; default is level 10. I.e., motion compensation is
 
237
applied to all image blocks of at most 16x16 pixels (\fIN\fP=8),
 
238
32x16 (\fIN\fP=9), 32x32 (\fIN\fP=10), etc.
 
239
 
 
240
.TP
 
241
\fB\-2\fP, \fB\-\-half-pixel
 
242
Use half pixel precise motion compensation.
 
243
 
 
244
.TP
 
245
\fB\-F\fP \fIN\fP, \fB\-\-fps=\fIN\fP
 
246
Set number of frames per second to \fIN\fP. This value is stored in
 
247
the FIASCO output file and is used in the decoder dfiasco(1) to control the
 
248
framerate.
 
249
 
 
250
.TP
 
251
\fB\-p\fP \fItype\fP, \fB\-\-pattern=\fItype\fP
 
252
Defines the type of inter frame compression which should be applied to
 
253
individual frames of a video stream. \fItype\fP is a sequence of
 
254
characters; default is "IPPPPPPPPP". Element \fBN\fP defines the type
 
255
of predicting which should be used for frame \fBN\fP; the frame type
 
256
pattern is periodically extended. Valid characters are:
 
257
 
 
258
\fBI\fP: intra frame, i.e., no motion compensated prediction is used at
 
259
all.
 
260
 
 
261
\fBP\fP: predicted frame, i.e., a previously encoded frame is used for
 
262
prediction (forward prediction).
 
263
 
 
264
\fBB\fP: bidirectional predicted frame, i.e., not only a previously
 
265
shown frame but also a frame of the future is used for prediction
 
266
(forward, backward or interpolated prediction). 
 
267
 
 
268
.TP
 
269
\fB\-\-cross-B-search
 
270
Instead of using exhaustive search the "Cross-B-Search" algorithm
 
271
is used to find the best interpolated prediction of B-frames.
 
272
 
 
273
.TP
 
274
\fB\-\-B-as-past-ref
 
275
Also use previously encoded B-frames when prediction the current
 
276
frame. If this option is not set, only I- and P-frames are used to
 
277
predict the current frame.
 
278
 
 
279
.SH EXAMPLES
 
280
.TP
 
281
pnmtofiasco < foo.ppm >foo.wfa
 
282
Compress the still image "foo.ppm" to the FIASCO file "foo.wfa" using
 
283
the default options.
 
284
 
 
285
.TP
 
286
pnmtofiasco -2 -p "IBBPBBPBB" -fps 15 -o video.wfa foo0*.ppm 
 
287
Compress the video frames "foo0*.ppm" to the FIASCO file "video.wfa" using
 
288
half pixel precise motion compensation at a frame rate of 15 frames
 
289
per second. Intra frame 1 is used to predict P-frame 4, frames 1 and 4
 
290
are used to predict B-frames 2 and 3, and so on. Frame 10 is again an
 
291
intra-frame.
 
292
.RE
 
293
 
 
294
.SH FILES
 
295
.PD 0
 
296
.TP
 
297
.B /etc/system.fiascorc
 
298
The systemwide initialization file.
 
299
.TP
 
300
.RB $HOME /.fiascorc
 
301
The personal initialization file.
 
302
.PD
 
303
 
 
304
.SH ENVIRONMENT
 
305
.PD 0
 
306
.TP
 
307
.B FIASCO_IMAGES
 
308
Search path for image files. Default is "./".
 
309
.TP
 
310
.B FIASCO_DATA
 
311
Search and save path for FIASCO files. Default is "./".
 
312
.PD 
 
313
 
 
314
.SH "SEE ALSO"
 
315
.br
 
316
.BR fiascotopnm (1),
 
317
.BR ppmtojpeg (1),
 
318
.BR pnmtojbig (1),
 
319
.BR ppmtogif (1),
 
320
.BR pnm (5)
 
321
.br
 
322
 
 
323
Ullrich Hafner, Juergen Albert, Stefan Frank, and Michael Unger.
 
324
\fBWeighted Finite Automata for Video Compression\fP, IEEE Journal on
 
325
Selected Areas In Communications, January 1998
 
326
.br
 
327
Ullrich Hafner. \fBLow Bit-Rate Image and Video Coding with Weighted
 
328
Finite Automata\fP, Ph.D. thesis, Mensch & Buch Verlag, ISBN
 
329
3-89820-002-7, October 1999.
 
330
 
 
331
.SH AUTHOR
 
332
Ullrich Hafner <hafner@bigfoot.de>