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