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

📄 qccentarithmeticgetcontext.3

📁 spiht for linux this is used to decod and encode vedio i wich all enjoy
💻 3
字号:
.TH QCCENTARITHMETICGETCONTEXT 3 "QCCPACK" "".SH NAMEQccENTArithmeticGetContext \- data type .B QccENTArithmeticGetContextfor functions for retrieving the current contextfor symbols during arithmetic encoding and decoding.SH SYNOPSIS.B #include "libQccPack.h".sp.BI "typedef int (*QccENTArithmeticGetContext)(const int *" symbol_stream ", int " current_symbol_index );.SH DESCRIPTIONFor multiple-context arithmetic, the QccPack arithmetic encodingand decoding routines need the context of the current symbol in orderto encode the symbol and update the relevant probability models.When an arithmetic-coder model(type.BR QccENTArithmeticModel (3))is created via routines.BR QccENTArithmeticEncodeStart (3)or.BR QccENTArithmeticDecodeStart (3),one specifies a function of type.B QccENTArithmeticGetContextthat serves as a callback function.Within routines.BR QccENTArithmeticEncode (3)or.BR QccENTArithmeticDecode (3),this callback function is called for the coding/decoding ofeach symbol in order to provide the context for the symbol..LPIn order to be a valid callback routine, functions to be used as suchmust have a prototype as shown in the "SYNOPSIS" section above.The callback routine must accept a pointer.IR symbol_stream .This pointer is the same pointer passed as the symbol stream to.BR QccENTArithmeticEncode (3)or.BR QccENTArithmeticDecode (3).Additionally, the callback function must acceptan integer,.IR current_symbol_index ,which gives the index into.I symbol_streamof the current symbol.The callback routine can thus use.I symbol_streamand.I current_symbol_indexto obtain a past history of the symbol stream relative to the currentsymbol, and use this information in determining the current context.For example, the previous symbol,.IR symbol_stream [ current_symbol_index " - 1]"could be used for an arithmetic coder that attempts tocode at the first-order entropy,.IR "H(X[n] | X[n-1])" ,of the source.Of course, thecallback routine could ignore this information, and useother means to determine the current context..SH "RETURN VALUE"The callback routine must return an integer which indicates thecontext of the current symbol. This context must be greater than orequal to 0, and less than .IR num_contexts ,the total number of contexts as setup initially when the arithmeticmodel was created via the call to .BR QccENTArithmeticEncodeStart (3)or.BR QccENTArithmeticDecodeStart (3)..SH "SEE ALSO".BR QccENTArithmeticModel (3),.BR QccENTArithmeticEncode (3),.BR QccENTArithmeticEncodeStart (3),.BR QccENTArithmeticEncodeEnd (3),.BR QccENTArithmeticDecode (3),.BR QccENTArithmeticDecodeStart (3),.BR QccENTArithmeticDecodeRestart (3),.BR QccPackENT (3),.BR QccPack (3).LPI. H. Witten, R. M. Neal, and J. G. Cleary,"Arithmetic Coding for Data Compression,".IR "Communications of the ACM" ,vol. 30, no. 6, pp. 520-540, June 1987..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 + -