⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qccchannel.3

📁 spiht for linux this is used to decod and encode vedio i wich all enjoy
💻 3
字号:
.TH QCCCHANNEL 3 "QCCPACK" "".SH NAMEQccChannel \- generic data structure for channel of indices.SH SYNOPSIS.B #include "libQccPack.h".sp.BI "int QccChannelInitialize(QccChannel *" channel );.br.BI "int QccChannelAlloc(QccChannel *" channel );.br.BI "void QccChannelFree(QccChannel *" channel );.br.BI "int QccChannelGetBlockSize(const QccChannel *" channel );.br.BI "int QccChannelPrint(const QccChannel *" channel );.SH DESCRIPTIONQccPack provides data structure.B QccChannelfor representing a generic channel of channel symbols.These channel symbols,which are inherently nonnegative integers, are typicallythe output of a quantizer (see .BR QccPackSQ (3),.BR QccPackVQ (3)).The .B QccChannelchannel structure can be read from and written to .BR CHN -formatfiles, or a.B QccChannelstructure can be used without file input or output..LPThe main component of a.B QccChannelstructure is a list of channel symbols.For file input and output,this symbol list is the current block of symbolsbeing written to or read fromthe file.That is,access to.BR CHN -formatfiles is block-based, with a block of symbols being written or readat once.Optionally, the block size can be set to be the same as the file size,so that all symbols in the channelare accessed simultaneously..B QccChannelchannels that do not involve file access typically hold all symbols ofthe channel in the symbol list..LPChannel symbols are nonnegative integers drawn from achannel-symbol alphabet.The.B QccChannelstructurepossesses a field (see below) that gives the size of thisalphabet; the channel-symbol alphabet is then the integers 0 through.I alphabet_size- 1, although not all of these symbols necessary appear in any given channel.Additionally to this alphabet of symbols, there exists a special null symbol,.BR QCCCHANNEL_NULLSYMBOL ,defined as -1,that indicates the absence of a symbol in the channel..SH "DATA STRUCTURE"The.B QccChanneldata structure is defined as:.RS.nftypedef struct{  QccString    filename;  FILE         *fileptr;  QccString    magic_num;  int          major_version;  int          minor_version;  int          channel_length;  int          access_block_size;  int          num_blocks_accessed;  int          alphabet_size;  int          *channel_symbols;} QccChannel;.fi.RE.LPThe fields of.B QccChannelare as follows:.TP.I filenameFor channels associated with a file, this is the name of the file..TP.I fileptrFor channels associated with an open file, this is the.B FILEpointer..TP.IR magic_num ", " major_version ", " minor_versionFor channels associated with a file, these arethe magic number and version of the file..TP.IR channel_lengthThe total number of symbols contained in the channel..TP.I access_block_sizeFor channels associated with a file, this is the number of symbols thatwill be read or written at a time; i.e., the block size forblock-based reading and writing..TP.I num_blocks_accessedFor channels associated with a file, this is the number of blocks of symbolsthat have already been read or written..TP.I alphabet_sizethe number of possible channel symbols(not including the special null symbol).  It is assumed that the alphabetof possible channel symbols is the integers 0 through.I alphabet_size- 1..TP.I channel_symbolsThe current block of symbols from the channel; this array contains.I access_block_size symbols..SH "FILE FORMAT"For reading and writing structuresof type.BR QccChannel ,QccPack provides the.B CHNfile format.This file format starts with an ASCII header followed byASCII data.The ASCII header consists of magic-number/revisioninformationfollowed by any amount of white space(space, `\\t' (tab), `\\n' (newline), `\\r' (return)) and/orcomments lines (lines starting with `#').  Following this white space,additional ASCIIheader information is given, separated by blanks and newlines.ASCII data follows the header information..LPThe.B CHNfile format consists of the following information:.RS.sp.BI CHN X.X.br.I "<white space>".br.I "N".br.I "A".br.I C1.br.I C2.br\|..br\|..br\|..br.sp.REwhere.B CHNis the magic number,.I X.Xis the version number,.I "<white space>"is white space and/or comment lines, .I N is the length of the channel,.I A is size of the channel alphabet,and .I Ciis the ith channel symbol. .IR N ", " A ", " and.I Ciare integers and are stored as ASCII..SH "ROUTINES".B QccChannelInitialize()should be called before any use of a.B QccChannelstructure..B QccChannelInitialize()initializes the fields of.I channelto the following values:.RS.IR filename :.B NULLstring.br.IR magic_num :.B QCCCHANNEL_MAGICNUM.br.IR major_version ", " minor_version :initialized to output of .BR QccGetQccPackVersion (3).br.IR channel_length :0.br.IR access_block_size :.B QCCCHANNEL_ACCESSWHOLEFILE.br.IR num_blocks_accessed :0.br.IR alphabet_size :0.br.IR channel_symbols :.B NULL.RE.LP.B QccChannelAlloc()allocates storage space for the.I channel_symbols array of.IR channel .If .I channel_symbolsis not.BR NULL ,.B QccChannelAlloc()returns immediately without changing the state of any memory allocation.Otherwise,the .I channel_symbolsarray is allocated.The fields.I access_block_sizeand.I channel_lengthmust be defined prior to calling.BR QccChannelAlloc() .If.I access_block_sizeequals.BR QCCCHANNEL_ACCESSWHOLEFILE ,then space for.I channel_lengthsymbols is allocated;otherwise, space for.I access_block_sizesymbols is allocated..LP.B QccChannelFree()frees the.I channel_symbolsarray previously allocated by.B QccChannelAlloc() ..LP.B QccChannelGetBlockSize()returns the block size of the.I channel_symbolsarray of.IR channel .If.I access_block_sizeis.BR QCCCHANNEL_ACCESSWHOLEFILE ,.I channel_lengthis returned; otherwise,.I access_block_sizeis returned..LP.B QccChannelPrint()prints the contents of.I channelto stdout..SH "RETURN VALUE"Except for.BR QccChannelGetBlockSize() ,each of these routines return 0 upon successful completion, 1 on error..SH "SEE ALSO".BR QccGetQccPackVersion (3),.BR QccChannelRead (3),.BR QccChannelWrite (3),.BR QccPack (3).SH AUTHORCopyright (C) 1997-2009  James E. Fowler.\"  The programs herein are free software; you can redistribute them an.or.\"  modify them under the terms of the GNU General Public License.\"  as published by the Free Software Foundation; either version 2.\"  of the License, or (at your option) any later version..\"  .\"  These programs are distributed in the hope that they will be useful,.\"  but WITHOUT ANY WARRANTY; without even the implied warranty of.\"  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the.\"  GNU General Public License for more details..\"  .\"  You should have received a copy of the GNU General Public License.\"  along with these programs; if not, write to the Free Software.\"  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -