| 1 |
.\" $Id: fiasco_decoder_new.3,v 1.5 2000/10/28 17:39:32 hafner Exp $ |
| 2 |
.TH fiasco 3 "April, 2000" "FIASCO" "Fractal Image And Sequence COdec" |
| 3 |
|
| 4 |
.SH NAME |
| 5 |
.B fiasco_decoder_new, fiasco_decoder_delete, |
| 6 |
.B fiasco_decoder_write_frame, fiasco_decoder_get_frame, |
| 7 |
.B fiasco_decoder_get_length, fiasco_decoder_get_rate, |
| 8 |
.B fiasco_decoder_get_width, fiasco_decoder_get_height |
| 9 |
.B fiasco_decoder_get_title, fiasco_decoder_get_comment |
| 10 |
.B fiasco_decoder_is_color |
| 11 |
\- decompress a FIASCO file |
| 12 |
|
| 13 |
.SH SYNOPSIS |
| 14 |
.B #include <fiasco.h> |
| 15 |
.sp |
| 16 |
.BI "fiasco_decoder_t *" |
| 17 |
.fi |
| 18 |
.BI "fiasco_decoder_new (const char * "fiasco_name , |
| 19 |
.fi |
| 20 |
.BI " const fiasco_d_options_t * "options ); |
| 21 |
.sp |
| 22 |
.BI "void" |
| 23 |
.fi |
| 24 |
.BI "fiasco_decoder_delete (fiasco_decoder_t * "decoder ); |
| 25 |
.sp |
| 26 |
.BI "int" |
| 27 |
.fi |
| 28 |
.BI "fiasco_decoder_write_frame (fiasco_decoder_t * "decoder , |
| 29 |
.fi |
| 30 |
.BI " const char * "image_name ); |
| 31 |
.sp |
| 32 |
.BI "fiasco_image_t *" |
| 33 |
.fi |
| 34 |
.BI "fiasco_decoder_get_frame (fiasco_decoder_t * "decoder ); |
| 35 |
.sp |
| 36 |
.BI "unsigned" |
| 37 |
.fi |
| 38 |
.BI "fiasco_decoder_get_length (fiasco_decoder_t * "decoder ); |
| 39 |
.sp |
| 40 |
.BI "unsigned" |
| 41 |
.fi |
| 42 |
.BI "fiasco_decoder_get_rate (fiasco_decoder_t * "decoder ); |
| 43 |
.sp |
| 44 |
.BI "unsigned" |
| 45 |
.fi |
| 46 |
.BI "fiasco_decoder_get_width (fiasco_decoder_t * "decoder ); |
| 47 |
.sp |
| 48 |
.BI "unsigned" |
| 49 |
.fi |
| 50 |
.BI "fiasco_decoder_get_height (fiasco_decoder_t * "decoder ); |
| 51 |
.sp |
| 52 |
.BI "const char *" |
| 53 |
.fi |
| 54 |
.BI "fiasco_decoder_get_title (fiasco_decoder_t * "decoder ); |
| 55 |
.sp |
| 56 |
.BI "const char *" |
| 57 |
.fi |
| 58 |
.BI "fiasco_decoder_get_comment (fiasco_decoder_t * "decoder ); |
| 59 |
.sp |
| 60 |
.BI "int" |
| 61 |
.fi |
| 62 |
.BI "fiasco_decoder_is_color (fiasco_decoder_t * "decoder ); |
| 63 |
.fi |
| 64 |
|
| 65 |
.SH DESCRIPTION |
| 66 |
The \fBfiasco_decoder_new()\fP function initializes the decompression |
| 67 |
of FIASCO file \fIfiasco_name\fP. Several decompression parameters |
| 68 |
can be adjusted by the class \fIoptions\fP (see |
| 69 |
fiasco_d_options_new(3)). |
| 70 |
|
| 71 |
The individual frames of a FIASCO video can be decompressed by calling |
| 72 |
successively either function \fBfiasco_decoder_write_frame()\fP or |
| 73 |
\fBfiasco_decoder_get_frame()\fP. |
| 74 |
|
| 75 |
The function \fBfiasco_decoder_write_frame()\fP decompresses the |
| 76 |
current frame and writes it in raw pgm(5) or ppm(5) format to the file |
| 77 |
\fIimage_name\fP. If \fIimage_name\fP=- or a NULL pointer then the |
| 78 |
image file is produced on the standard output. If \fIimage_name\fP is a |
| 79 |
relative path and the environment variable \fBFIASCO_IMAGES\fP is a |
| 80 |
(colon-separated) list of directories, then the output file is |
| 81 |
written to the first (writable) directory of this list. Otherwise, the |
| 82 |
current directory is used to store the file. |
| 83 |
|
| 84 |
The function \fBfiasco_decoder_get_frame()\fP decompresses the |
| 85 |
current frame and returns the computed image object. Use the function |
| 86 |
fiasco_renderer_new(3) to create a renderer object that converts the |
| 87 |
FIASCO image to the desired format. |
| 88 |
|
| 89 |
After all frames have been decompressed, the function |
| 90 |
\fBfiasco_decoder_delete()\fP should be called to close the input file |
| 91 |
and to free temporarily allocated memory. |
| 92 |
|
| 93 |
Number of available frames, frame rate and frames geometry, type of the |
| 94 |
FIASCO file are accessible through member functions |
| 95 |
\fBfiasco_decoder_get_length()\fP, |
| 96 |
\fBfiasco_decoder_get_rate()\fP, |
| 97 |
\fBfiasco_decoder_get_width()\fP, |
| 98 |
\fBfiasco_decoder_get_height()\fP, |
| 99 |
and \fBfiasco_decoder_is_color()\fP. Use \fBfiasco_decoder_get_title()\fP, |
| 100 |
\fBfiasco_decoder_get_comment()\fP to read title and comment strings of the |
| 101 |
FIASCO file. |
| 102 |
|
| 103 |
.SH ARGUMENTS |
| 104 |
|
| 105 |
.TP |
| 106 |
fiasco_name |
| 107 |
Filename of the FIASCO input file. If \fIfiasco_name\fP is a NULL pointer |
| 108 |
or "-" then the decoder reads from standard input. If the file is not |
| 109 |
found in the current directory and the environment variable |
| 110 |
\fBFIASCO_DATA\fP is a (colon-separated) list of directories, then the |
| 111 |
input file is searched for in these directories, too. |
| 112 |
|
| 113 |
.TP |
| 114 |
options |
| 115 |
This "class" encapsulates the various coding and decoding |
| 116 |
parameters. Use the functions fiasco_d_options_new(3) and |
| 117 |
fiasco_d_options_delete(3) to create and delete an object of this |
| 118 |
class. Several member functions (see fiasco_d_options(3)) are |
| 119 |
available to change the default values. |
| 120 |
|
| 121 |
.TP |
| 122 |
decoder |
| 123 |
The decoder "class" encapsulates the FIASCO decoder. It is used to |
| 124 |
store the internal state of the decoder. |
| 125 |
|
| 126 |
.SH RETURN VALUES |
| 127 |
The function \fBfiasco_decoder_new()\fP returns a pointer to the newly |
| 128 |
allocated decoder object. If an error has been caught, a NULL pointer |
| 129 |
is returned. |
| 130 |
|
| 131 |
The function \fBfiasco_decoder_write_frame()\fP returns 1 if the file |
| 132 |
has been successfully written. Otherwise, the function returns 0. |
| 133 |
|
| 134 |
The function \fBfiasco_decoder_get_frame()\fP returns a pointer to the |
| 135 |
newly allocated FIASCO image object. If an error has been caught, a NULL |
| 136 |
pointer is returned. |
| 137 |
|
| 138 |
The function \fBfiasco_decoder_get_length()\fP returns the number of |
| 139 |
frames of the FIASCO file. If an error has been caught, 0 is |
| 140 |
returned. |
| 141 |
|
| 142 |
The function \fBfiasco_decoder_get_rate()\fP returns the |
| 143 |
framerate (number of frames per second) of the FIASCO file. If an |
| 144 |
error has been caught, 0 is returned. |
| 145 |
|
| 146 |
The function \fBfiasco_decoder_get_width()\fP returns the width of the |
| 147 |
decoded frames of the FIASCO file. If an error has been caught, 0 is |
| 148 |
returned. |
| 149 |
|
| 150 |
The function \fBfiasco_decoder_get_height()\fP returns the height of the |
| 151 |
decoded frames of the FIASCO file. If an error has been caught, 0 is |
| 152 |
returned. |
| 153 |
|
| 154 |
The function \fBfiasco_decoder_get_title()\fP returns an optional |
| 155 |
title of the FIASCO file. If an error has been caught, 0 is returned. |
| 156 |
|
| 157 |
The function \fBfiasco_decoder_get_comment()\fP returns an optional |
| 158 |
comment of the FIASCO file. If an error has been caught, 0 is returned. |
| 159 |
|
| 160 |
The function \fBfiasco_decoder_is_color()\fP returns 0 if the decoded |
| 161 |
frames are grayscale images, otherwise a non-zero value is |
| 162 |
returned. |
| 163 |
|
| 164 |
In case of an error in one of the above functions, use the function |
| 165 |
fiasco_get_error_message(3) to get a string describing the last error |
| 166 |
message of FIASCO. |
| 167 |
|
| 168 |
.SH ENVIRONMENT |
| 169 |
.PD 0 |
| 170 |
.TP |
| 171 |
.B FIASCO_IMAGES |
| 172 |
Search path for image files. Default is "./". |
| 173 |
.TP |
| 174 |
.B FIASCO_DATA |
| 175 |
Search and save path for FIASCO files. Default is "./". |
| 176 |
.PD |
| 177 |
|
| 178 |
.SH "SEE ALSO" |
| 179 |
.br |
| 180 |
.BR fiasco_d_options_new "(3), " fiasco_d_options_delete (3), |
| 181 |
.br |
| 182 |
.BR fiasco_d_options "(3), " fiasco_get_error_message (3) |
| 183 |
.br |
| 184 |
|
| 185 |
Ullrich Hafner, Juergen Albert, Stefan Frank, and Michael Unger. |
| 186 |
\fBWeighted Finite Automata for Video Compression\fP, IEEE Journal on |
| 187 |
Selected Areas In Communications, January 1998 |
| 188 |
.br |
| 189 |
Ullrich Hafner. \fBLow Bit-Rate Image and Video Coding with Weighted |
| 190 |
Finite Automata\fP, Ph.D. thesis, Mensch & Buch Verlag, ISBN |
| 191 |
3-89820-002-7, October 1999. |
| 192 |
|
| 193 |
.SH AUTHOR |
| 194 |
Ullrich Hafner |