📄 fiasco_options_new.3
字号:
.\" $Id: fiasco_options_new.3,v 1.2 2000/06/25 16:38:06 hafner Exp $.TH fiasco 3 "April, 2000" "FIASCO" "Fractal Image And Sequence COdec".SH NAME.B fiasco_options_new, fiasco_options_set_magnification,.B fiasco_options_delete, fiasco_options_set_progress_meter,.B fiasco_options_set_smoothing, fiasco_options_set_tiling, .B fiasco_options_set_4_2_0_format, fiasco_options_set_basisfile,.B fiasco_options_set_chroma_quality, fiasco_options_set_optimizations,.B fiasco_options_set_prediction, fiasco_options_set_video_param,.B fiasco_options_set_quantization, fiasco_options_set_frame_pattern\- define additional options of FIASCO coder and decoder .SH SYNOPSIS.B #include <fiasco.h>.sp.BI "fiasco_options_t *".fi.BI "fiasco_options_new".fi.BI " (void);".sp.BI "void".fi.BI "fiasco_options_delete".fi.BI " (fiasco_options_t * "options );.sp.BI "int".fi.BI "fiasco_options_set_4_2_0_format".fi.BI " (fiasco_options_t * "options ,.fi.BI " int "format );.sp.BI "int".fi.BI "fiasco_options_set_basisfile".fi.BI " (fiasco_options_t * "options ,.fi.BI " const char * "filename );.sp.BI "int".fi.BI "fiasco_options_set_chroma_quality".fi.BI " (fiasco_options_t * "options ,.fi.BI " float "quality_factor ,.fi.BI " unsigned "dictionary_size );.sp.BI "int".fi.BI "fiasco_options_set_frame_pattern".fi.BI " (fiasco_options_t * "options ,.fi.BI " const char * "pattern );.sp.BI "int".fi.BI "fiasco_options_set_magnification".fi.BI " (fiasco_options_t * "options ,.fi.BI " int "level );.sp.BI "int".fi.BI "fiasco_options_set_optimizations".fi.BI " (fiasco_options_t * "options ,.fi.BI " unsigned "min_block_level ,.fi.BI " unsigned "max_block_level ,.fi.BI " unsigned "max_elements ,.fi.BI " unsigned "dictionary_size ,.fi.BI " unsigned "optimization_level );.sp.BI "int".fi.BI "fiasco_options_set_quantization".fi.BI " (fiasco_options_t * "options ,.fi.BI " unsigned "mantissa ,.fi.BI " fiasco_rpf_range_e "range ,.fi.BI " unsigned "dc_mantissa ,.fi.BI " fiasco_rpf_range_e "dc_range );.sp.BI "int".fi.BI "fiasco_options_set_prediction".fi.BI " (fiasco_options_t * "options ,.fi.BI " int "intra_prediction ,.fi.BI " unsigned "min_block_level ,.fi.BI " unsigned "max_block_level );.sp.BI "int".fi.BI "fiasco_options_set_progress_meter".fi.BI " (fiasco_options_t * "options ,.fi.BI " fiasco_progress_e "type );.sp.BI "int".fi.BI "fiasco_options_set_smoothing".fi.BI " (fiasco_options_t * "options ,.fi.BI " unsigned "smoothing );.sp.BI "int".fi.BI "fiasco_options_set_tiling".fi.BI " (fiasco_options_t * "options ,.fi.BI " fiasco_tiling_e "method ,.fi.BI " unsigned "exponent );.sp.BI "int".fi.BI "fiasco_options_set_video_param".fi.BI " (fiasco_options_t * "options ,.fi.BI " unsigned "frames_per_second ,.fi.BI " int "half_pixel_prediction ,.fi.BI " int "cross_B_search ,.fi.BI " int "B_as_past_ref );.fi.SH DESCRIPTIONThe \fBfiasco_options_new()\fP function allocates and initializes aFIASCO options object which is used to control additional compression anddecompression parameters.Conversely, the function \fBfiasco_options_delete()\fP discards thegiven FIASCO options object.Several member functions are available to modify the default behaviorof the FIASCO coder and decoder. \fBfiasco_options_set_smoothing()\fP sets the\fIsmoothing\fP-percentage along partitioning borders when the imageis regenerated; default is 70. This option is used both by the decoderand encoder. You should use the \fIsmoothing\fP value specified in theFIASCO file when you are decoding video frames.\fBfiasco_options_set_magnification()\fP sets the \fImagnification\fPof the regenerated image; default is 0, i.e., the image geometry isnot changed. This option is used by the decoder only.\fBfiasco_options_set_4_2_0_format()\fP defines whether the decodershould use the default 4:4:4 format or the 4:2:0 format. The latterone significantly reduces the decoding time at the cost of someadditional blocking artefacts. This option is used by the decoder only.\fBfiasco_options_set_frame_pattern()\fP sets the type of inter framecompression which should be applied to individual frames of a videostream; default is "IPPPPPPPPP". \fBfiasco_options_set_tiling()\fP sets \fImethod\fP and \fIexponent\fPof the image tiling algorithm which runs as initial step of theencoder; by default the image is subdivided into 16 tiles whichare sorted by decreasing variance. \fBfiasco_options_set_basisfile()\fP sets the \fIfilename\fP ofthe FIASCO initial basis (codebook of dictionary vectors); default is"small.fco". \fBfiasco_options_set_chroma_quality()\fP sets the quality used whencoding the chroma channels of a color image to the term "\fIquality\fPof luminance / \fIquality_factor\fP"; default is 2. Moreover, the sizeof the codebook is limited by \fIdictionary_size\fP; default is 40elements. \fBfiasco_options_set_optimizations()\fP toggles various codingoptimizations. E.g., the size of the dictionary (default is 10000),the subset of dictionary elements to use for an individualapproximation (default is 5), the size of the image blocks to consider(4x4, ..., 64x64), and some additional low leveloptimizations (default level is 1). \fBfiasco_options_set_prediction()\fP enables an additional intrablock prediction by using a DC component approximation. By givinglevels \fImin_block_level\fP and \fImax_block_level\fP the predictioncan be limited to a small range of blocks only. By default, thismethod is disabled. \fBfiasco_options_set_video_param()\fP defines the framerate (defaultis 25) and toggles whether to use half pixel precise motioncompensated prediction (disabled by default), whether to determinemotion vectors of interpolated prediction with the Cross-B-Searchalgorithm (disabled by default), and whether to allow B frames to beused for B frame predicion (disabled by default).\fBfiasco_options_set_quantization()\fP defines the quantizationparameters of the approximation coefficients. By default the range ofDC coefficients is [-1,+1] using a mantissa of 5 bits (and one signbit). By default, all other coefficients are quantized with 3 mantissabits in the interval [-1.5,+1.5].\fBfiasco_options_set_progress_meter()\fP sets the type of progressmeter to be used during coding. By default, an RPM style progress barusing 50 hash marks (####) is used..SH ARGUMENTS.TPoptionsThis object encapsulates the various coding and decoding parameters. .TPsmoothingThis percentage (range is 0 - i.e., no smoothing - to 100) defines howmuch the regenerated image is smoothed along the partitioning borders..TPlevelThis value gives the magnification of the decoded image with respectto the original size. Positive values increase and negative valuesdecrease the width and height of the image by a factor of2^abs(\fIlevel\fP)..TPformatIf \fIformat\fP is 0 then the 4:4:4 color image format is used, i.e.,the chroma channel are of the same size as the luminance. Otherwise,the 4:2:0 format is used. Then, width and height of each chromachannel is only one half of the width and height of the luminance..TPmethodDefines the algorithm which should be used to sort the image tileswhich are generated in the initial coding step. If \fImethod\fP is\fBFIASCO_VARIANCE_ASC\fP then the tiles are sorted by variance - thefirst tile has the lowest variance. Conversely, when using\fBFIASCO_VARIANCE_DSC\fP the first tile has the largest variance. If\fImethod\fP is \fBFIASCO_SPIRAL_ASC\fP then the tiles are sorted likea spiral starting in the middle of the image. Conversely, when using\fBFIASCO_SPIRAL_DSC\fP the tiles are sorted like a spiral starting inthe upper left corner..TPexponentThis value sets the number of image tiles - which are generated in theinitial step of the encoder - to 2^\fIexponent\fP..TPpatternThis string defines the sequence of frame types. Character \fIn\fP ofthe string defines the type of frame \fIn\fP (\fIpattern\fP isperiodically extended). Three different frame types are available(case insensitive): choose 'i' for intra-frames (no inter frameprediction is used), 'p' for predicted frames (a frame of thepast is used for prediction), or 'b' for bi-directional predictedframes (both a frame of the past and the future is used forprediction)..TPfilenameThe initial basis (codebook) of the coder is loaded from this(ASCII) file. Files that already come with FIASCO are "small.fco" (3 elements),"medium.fco" (132 elements), and "large.fco" (219 elements). .TPquality_factorWhen coding chroma channels (Cb and Cr band) the approximation qualityis determined by the term `quality of Y component' / \fIquality_factor\fP..TPdictionary_sizeFIASCO uses a dictionary (codebook) of variable size to approximateindividual image blocks. The size of the codebook can be limited by\fIdictionary_size\fP to reduce the coding time, however, at the costof decreasing quality. .TPmin_block_levelDuring coding only those image blocks are considered for approximation(or prediction) which binary tree level is larger than\fImin_block_level\fP (minimum value is 3). (Since FIASCO internallyworks with binary trees, the size of an image block is determined bythe \fIlevel\fP of the corresponding binary tree). Refer to followingtable to convert these values:.celevel | width | height.fi------+-------+--------.fi 0 | 1 | 1 .fi 1 | 1 | 2 .fi 2 | 2 | 2 .fi 3 | 2 | 4 .fi 4 | 4 | 4 .fi 5 | 4 | 8 .fi 6 | 8 | 8 .fi 7 | 8 | 16.fi------+-------+--------.fiThe larger this value is the faster the coder runs but the worse theimage quality will be..TPmax_block_levelDuring coding only those image blocks are considered for approximation(or prediction) which binary tree level is smaller than\fImax_block_level\fP. The smaller this value is the faster the coderruns but the worse the image quality will be..TPmax_elementsThis value defines how many dictionary elements can beused to approximate an individual image block. The smaller this positivevalue (range is 1 to 5) is the faster the coder runs but the worse theimage quality will be. .TPoptimization_levelAdditional low level optimizations are available by setting\fIoptimization_level\fP to one of the following values:.fi0 standard approximation method.fi1 slightly increases the approximation quality, running time istwice as high as with the standard method .fi2 hardly increases the approximation quality of method 1, running timeis twice as high as with method 1 (this method just remains forcompleteness) .fi.TPintra_predictionIf \fIintra_prediction\fP is set to a non-zero value then anadditional block prediction of intra-frames is enabled. For someimages, the image quality is slightly improved, however, at the cost ofa significantly increased running time of the coder. .TPframes_per_secondThis value defines the frame rate, i.e., how many frames per secondshould be displayed. This value has no effect during coding, it is justpassed to the FIASCO output file where it is read and used by thedecoder..TPhalf_pixel_predictionA non-zero value enables half pixel precise motion compensatedprediction. .TPcross_B_searchA non-zero value enables the fast Cross-B-Search algorithm to determinethe motion vectors of an interpolated prediction. Otherwise,exhaustive search (in the given search range) is used. .TPB_as_past_refA non-zero value allows not only I- and P-frames but also B-frames to beused for a forward or bi-directional predicion..TPmantissa, rangeApproximation coefficients are quantized to a small number ofvalues (in fixed point format) in the interval [-\fIrange\fP,+\fIrange\fP]. The number of \fImantissa\fP bits defines the accuracy ofquantization..TPdc_mantissa, dc_rangeApproximation coefficients of the DC component are quantized in adifferent way: the number of mantissa bits is given by\fIdc_mantissa\fP whereas the quantization interval is given by[-\fIdc_range\fP, +\fBdc_range\fP]..TPtypeThis value sets the \fItype\fP of progress meter which should be usedduring coding. The following types are available:.fi\fBFIASCO_PROGRESS_NONE\fP: no output at all.fi\fBFIASCO_PROGRESS_BAR\fP: print hash marks (###)\fBFIASCO_PROGRESS_PERCENT\fP: percentage meter (50%).SH RETURN VALUESThe function \fBfiasco_decoder_new()\fP returns a pointer to the newlyallocated option object. If an error has been catched, a NULL pointeris returned.All set functions return 1 on success and 0 if an error has beencatched. In case of an error, use the function fiasco_get_error_message(3) toget a string with the last error message of FIASCO..SH "SEE ALSO".br.BR fiasco_decoder "(3), " fiasco_coder (3)Ullrich Hafner, Juergen Albert, Stefan Frank, and Michael Unger.\fBWeighted Finite Automata for Video Compression\fP, IEEE Journal onSelected Areas In Communications, January 1998.brUllrich Hafner. \fBLow Bit-Rate Image and Video Coding with WeightedFinite Automata\fP, Ph.D. thesis, Mensch & Buch Verlag, ISBN3-89820-002-7, October 1999..SH AUTHORUllrich Hafner <hafner@bigfoot.de>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -