Debian Codegraph @

upstream/debian-unstable/man1/pnmtofiasco.1

raw
1 \
2 .\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
3 .\" Do not hand-hack it! If you have bug fixes or improvements, please find
4 .\" the corresponding HTML page on the Netpbm website, generate a patch
5 .\" against that, and send it to the Netpbm maintainer.
6 .TH "Pnmtofiasco User Manual" 1 "09 April 2025" "netpbm documentation"
7
8 .SH NAME
9
10 pnmtofiasco - Convert PNM file to FIASCO compressed file
11
12 .UN synopsis
13 .SH SYNOPSIS
14
15 \fBpnmtofiasco\fP
16 [\fIoption\fP]...
17 [\fIfilename\fP]...
18
19 .UN description
20 .SH DESCRIPTION
21 .PP
22 This program is part of
23 .BR "Netpbm" (1)\c
24 \&.
25
26 \fBpnmtofiasco\fP compresses the named pbm, pgm, or ppm image files,
27 or Standard Input if no file is named, and produces a FIASCO file on
28 Standard Output.
29
30 .UN options
31 .SH OPTIONS
32 .PP
33 In addition to the options common to all programs based on libnetpbm
34 (most notably \fB-quiet\fP, see
35 .UR index.html#commonoptions
36 Common Options
37 .UE
38 \&), \fBpnmtofiasco\fP recognizes the following
39 command line options:
40 .PP
41 All option names may be abbreviated; for example, --optimize may be
42 written --optim or --opt. For most options a one letter short option
43 is provided. Mandatory or optional arguments to long options are
44 mandatory or optional for short options, too. Both short and long
45 options are case sensitive.
46
47 .UN basicopts
48 .SS Basic Options
49
50
51 .TP
52 \fB--image-name=\fP\fIname\fP, \fB-i\fP \fIname\fP
53 Compress the named images, not Standard Input. If \fIname\fP is
54 \fB-\fP, read Standard Input. \fIname\fP has to be either an image
55 filename or a template of the form:
56
57 .nf
58 prefix[start-end{+,-}step]suffix
59
60 .fi
61 .sp
62 Templates are useful when compressing video streams: e.g., if you
63 specify the template \fBimg0[12-01-2].pgm\fP, then \fBpnmtofiasco\fP
64 compresses the images img012.pgm, img010.pgm, ..., img002.pgm.
65 .sp
66 If \fIname\fP is a relative path, \fBpnmtofiasco \fP searches for
67 the image files in the current directory and in the (colon-separated)
68 list of directories given by the environment variable
69 \fBFIASCO_IMAGES\fP.
70
71 .TP
72 \fB--output-name=\fP\fIname\fP, \fB-o\fP \fIoutput-file\fP
73 Write FIASCO output to the named file, not to Standard Output.
74 .sp
75 If \fIname\fP is a relative path and the environment variable
76 \fBFIASCO_DATA\fP is a (colon-separated) list of directories, then
77 \fBpnmtofiasco\fP writes the output file to the first (writable)
78 directory of this list. Otherwise, \fBpnmtofiasco\fP write it to the
79 current directory.
80
81 .TP
82 \fB--quality=\fP\fIN\fP, \fB-q\fP \fIN\fP
83 Set quality of compression to \fIN\fP. Quality is 1 (worst) to
84 100 (best); default is 20.
85
86 .TP
87 \fB--version\fP, \fB-v\fP
88 Print \fBpnmtofiasco\fP version number, then exit.
89
90 .TP
91 \fB--verbose \fP\fIN\fP, \fB-V\fP \fIN\fP
92 Set level of verbosity to \fIN\fP. Level is 0 (no output at
93 all), 1 (show progress meter), or 2 (show detailed compression
94 statistics); default is 1.
95
96 .TP
97 \fB--progress-meter \fP\fIN\fP, \fB-B\fP \fIN\fP
98 Set type of progress-meter to \fIN\fP. The following types are
99 available; default is 1:
100
101
102 .TP
103 \fB0\fP
104 no progress meter
105
106 .TP
107 \fB1\fP
108 RPM style progress bar using 50 hash marks
109
110 .TP
111 \fB2\fP
112 percentage meter
113
114
115
116 .TP
117 \fB--config=\fP\fIname\fP, \fB-f\fP \fIname\fP
118 Load parameter file \fIname \fP to initialize the options of
119 \fBpnmtofiasco\fP. See file \fBsystem.fiascorc\fP for an example of
120 the syntax. Options of \fBpnmtofiasco\fP are set by any of the
121 following methods (in the specified order):
122
123
124 .IP \(bu
125 Global resource file \fB/etc/system.fiascorc\fP
126 .IP \(bu
127 $HOME/.fiascorc
128 .IP \(bu
129 command line
130 .IP \(bu
131 --config=\fIname\fP
132
133
134 .TP
135 \fB--info\fP, \fB-h\fP
136 Print brief help, then exit.
137
138 .TP
139 \fB--help\fP, \fB-H\fP
140 Print detailed help, then exit.
141
142
143
144 .UN advancedopts
145 .SS Options for Advanced Users
146
147
148 .TP
149 \fB--basis-name=\fP\fIname\fP, \fB-b\fP \fIname\fP
150 Preload compression basis \fIname\fP into FIASCO. The basis
151 \fIname\fP provides the initial compression dictionary. Either use
152 one of the files "small.fco", "medium.fco", or
153 "large.fco" that come with \fBpnmtofiasco \fP or create a
154 new ASCII basis file.
155
156 .TP
157 \fB--optimize=\fP\fIN\fP, \fB-z\fP \fIN\fP
158 Set optimization level to \fIN\fP. Level is 0 (fastest) to 3
159 (slowest).
160
161 Be warned: The encoding time dramatically increases when \fIN\fP=\fB2\fP
162 or \fIN\fP=\fB3\fP while the compression performance improves only slightly.
163 .sp
164 The default is 0.
165
166 .TP
167 \fB--prediction\fP, \fB-P\fP
168 Use additional predictive coding. If this optimization is enabled
169 then the image is compressed in two steps. In the first step, a coarse
170 approximation of the image is computed using large unichrome
171 blocks. Finally, the delta image is computed and the prediction error
172 is approximated using the standard FIASCO algorithm.
173
174 .TP
175 \fB--dictionary-size=\fP\fIN\fP, \fB-D\fP \fIN\fP
176 Set size of dictionary that is used when coding the luminance band
177 to \fIN\fP; default is 10000, i.e., the dictionary is not restricted.
178
179 .TP
180 \fB--chroma-dictionary=\fP\fIN\fP, \fB-C\fP \fIN\fP
181 Set size of dictionary that is used when coding chroma bands to
182 \fIN\fP; default is 40.
183
184 .TP
185 \fB--chroma-qfactor=\fP\fIN\fP, \fB-Q\fP \fIN\fP
186 Reduce the quality of chroma band compression \fIN\fP-times with
187 respect to the user defined quality \fIq\fP of the luminance band
188 compression (\fB--quality\fP=\fIq\fP); default is 2.
189
190 .TP
191 \fB--tiling-exponent=\fP\fIN\fP, \fB-t\fP \fIN\fP
192 Subdivide the image into 2^\fIN\fP tiles prior coding; default is
193 4, i.e. the image is subdivided into 16 tiles. The processing order of
194 the individual tiles is defined by the option
195
196 .TP
197 \fB--tiling-method=\fP\fIname\fP, \fB-T\fP \fIname\fP
198 Order the individual image tiles (the image is subdivided into;
199 see option \fB--tiling-exponent=\fP\fIN\fP) by method \fIname\fP;
200 default is \fBdesc-variance\fP.
201
202
203 .TP
204 \fBdesc-variance\fP
205 Tiles with small variances are processed first.
206
207 .TP
208 \fBasc-variance\fP
209 Tiles with large variances are processed first.
210
211 .TP
212 \fBdesc-spiral\fP
213 Tiles are process in spiral order starting in the middle.
214
215 .TP
216 \fBasc-spiral\fP
217 Tiles are process in spiral order starting at the border.
218
219
220
221 .TP
222 \fB--rpf-mantissa=\fP\fIN\fP
223 Use \fIN\fP mantissa bits for quantized coefficients.
224
225 .TP
226 \fB--dc-rpf-mantissa=\fP\fIN\fP
227 Use \fIN\fP mantissa bits for quantized DC coefficients.
228
229 .TP
230 \fB--rpf-range=\fP\fIN\fP
231 Coefficients outside the quantization interval
232 [-\fIN\fP,+\fIN\fP] are set to zero.
233
234 .TP
235 \fB--dc-rpf-range=\fP\fIN\fP
236 DC coefficients outside the quantization interval
237 [-\fIN\fP,+\fIN\fP] are set to zero.
238
239
240
241
242 .UN videoopts
243 .SS Additional Options for Video Compression
244
245
246 .TP
247 \fB--smooth=\fP\fIN\fP, \fB-s\fP \fIN\fP
248 Smooth decompressed reference frames along the partitioning
249 borders by the given amount \fIN\fP. \fIN\fP is 0 (no smoothing) to
250 100; default is 70. This factor is stored in the FIASCO file.
251
252 .TP
253 \fB--min-level=\fP\fIN\fP, \fB-m\fP \fIN\fP
254 Start prediction (motion compensated prediction or additional
255 prediction) on block level \fIN\fP; default is level 6. I.e., motion
256 compensation is applied to all image blocks of at least 8x8 pixels
257 (binary tree level \fIN\fP=6), 16x8 (\fIN\fP=7), 16x16 (\fIN\fP=8),
258 etc.
259
260 .TP
261 \fB--max-level=\fP\fIN\fP, \fB-M\fP \fIN\fP
262 Stop prediction (motion compensated prediction or additional
263 prediction) on block level \fIN\fP; default is level 10. I.e.,
264 motion compensation is applied to all image blocks of at most 16x16
265 pixels (\fIN\fP=8), 32x16 (\fIN\fP=9), 32x32 (\fIN\fP=10), etc.
266
267 .TP
268 \fB--half-pixel\fP, \fB-2\fP
269 Use half pixel precise motion compensation.
270
271 .TP
272 \fB--fps=\fP\fIN\fP, \fB-F\fP \fIN\fP
273 Set number of frames per second to \fIN\fP. This value is stored
274 in the FIASCO output file and is used in the decoder
275 .BR "fiascotopnm" (1)\c
276 \& to control the framerate.
277
278 .TP
279 \fB--pattern=\fP\fItype\fP, \fB-p\fP \fItype\fP
280 Defines the type of inter frame compression which should be
281 applied to individual frames of a video stream. \fItype\fP is a
282 sequence of characters; default is "IPPPPPPPPP". Element
283 \fBN\fP defines the type of predicting which should be used for frame
284 \fBN\fP; the frame type pattern is periodically extended. Valid
285 characters are:
286
287
288 .TP
289 \fBI\fP
290 intra frame, i.e., no motion compensated prediction is used at
291 all.
292
293 .TP
294 \fBP\fP
295 predicted frame, i.e., a previously encoded frame is used for
296 prediction (forward prediction).
297
298 .TP
299 \fBB\fP
300 bidirectional predicted frame, i.e., not only a previously shown
301 frame but also a frame of the future is used for prediction (forward,
302 backward or interpolated prediction).
303
304
305
306 .TP
307 \fB--cross-B-search\fP
308 Instead of using exhaustive search the "Cross-B-Search"
309 algorithm is used to find the best interpolated prediction of
310 B-frames.
311
312 .TP
313 \fB--B-as-past-ref\fP
314 Also use previously encoded B-frames when prediction the current
315 frame. If this option is not set, only I- and P-frames are used to
316 predict the current frame.
317
318
319
320
321 .UN examples
322 .SH EXAMPLES
323 .PP
324 Compress the still image "foo.ppm" to the FIASCO file
325 "foo.wfa" using the default options:
326
327 .nf
328 pnmtofiasco < foo.ppm >foo.wfa
329
330 .fi
331 .PP
332 Compress the video frames "foo0*.ppm" to the FIASCO file
333 "video.wfa" using half pixel precise motion compensation at
334 a frame rate of 15 frames per second. Intra frame 1 is used to
335 predict P-frame 4, frames 1 and 4 are used to predict B-frames 2 and
336 3, and so on. Frame 10 is again an intra-frame.
337
338 .nf
339 pnmtofiasco -2 -p "IBBPBBPBB" -fps 15 -o video.wfa foo0*.ppm
340
341 .fi
342
343 .UN files
344 .SH FILES
345
346
347 .TP
348 \fB/etc/system.fiascorc\fP
349 The systemwide initialization file.
350
351 .TP
352 $HOME\fB/.fiascorc\fP
353 The personal initialization file.
354
355
356
357 .UN environment
358 .SH ENVIRONMENT
359
360
361
362
363 .TP
364 \fBFIASCO_IMAGES\fP
365 Search path for image files. Default is "./".
366
367 .TP
368 \fBFIASCO_DATA\fP
369 Search and save path for FIASCO files. Default is "./".
370
371
372
373 .UN seealso
374 .SH SEE ALSO
375 .BR "fiascotopnm" (1)\c
376 \&,
377 .BR "pnmtojpeg" (1)\c
378 \&,
379 .BR "pnmtojbig" (1)\c
380 \&,
381 .BR "pamtogif" (1)\c
382 \&,
383 .BR "pnm" (1)\c
384 \&
385 .PP
386 Ullrich Hafner, Juergen Albert, Stefan Frank, and Michael Unger.
387 \fBWeighted Finite Automata for Video Compression\fP, IEEE Journal on
388 Selected Areas In Communications, January 1998
389 .PP
390 Ullrich Hafner. \fBLow Bit-Rate Image and Video Coding with
391 Weighted Finite Automata\fP, Ph.D. thesis, Mensch & Buch Verlag,
392 ISBN 3-89820-002-7, October 1999.
393 .PP
394 FIASCO: An Open-Source Fractal Image and Sequence Codec, Linux Journal,
395 January 2001.
396
397 .UN author
398 .SH AUTHOR
399
400 Ullrich Hafner <\[email protected]\fP>
401 .SH DOCUMENT SOURCE
402 This manual page was generated by the Netpbm tool 'makeman' from HTML
403 source. The master documentation is at
404 .IP
405 .B http://netpbm.sourceforge.net/doc/pnmtofiasco.html
406 .PP