亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? aricacm.h

?? VC小波應用 視頻編碼播放 EZW2 WAVLETS TRANSFORMER
?? H
字號:
#ifndef __ARICACM_H_
#define __ARICACM_H_

/*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/	
/* $Copyright Issue
 * ----------------
 * Most of the code on arithemtic coding are modified from 
 * I.H. Witten, R.M. Neal, and J.G. Cleary, "Arithmetic coding for data
 * compression," Communnication ACM, vol 30, pp. 520-540, June 1987.
 *
 * The statistical table is implemented using Binary Index Tree as described in
 * P. M. Fenwick, "A new data structure for cumulative frequency tables,"
 * Softw. Pract. Exper. 24, 3 (Mar. 1994), 327-336.
 *
 * The idea of having the arithemetic coder to read/write bits directly was
 * from G. Davis code in "Wavelet Compression Construction Kit". His code
 * can only do write but has problem with synchronisation when doing read.
 * I fixed that with a virtual table approach.
 *
 * Mow-Song, Ng 2/9/2002
 * msng@mmu.edu.my
 * http://www.pesona.mmu.edu.my/~msng
 * 
 * I do not claim copyright to the code, but if you use them or modify them,
 * please drop me a mail.
 *
 */
/*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/

/*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/	
/* 
 * $LOG
 * ----
 * Data: 07-06-2002
 * - First version
 *
 * Date: 07-07-2002
 * - Added BasicCoder
 * - Some code shifting to arrange things better
 *
 * Date: 11-07-2002
 * - Added functions for writing arbitrary size code (up to 32 bits for 
 *	  one read/write)
 *
 * Date: 21-07-2002
 * - Modify the Context module. Now the maximum count is explicitly specified 
 *   by user.
 *
 * Date: 23-07-2002
 * - Fixed a bug in the count of number of bits outputed in the encoder
 *
 * Date: 24-07-2002
 * - Added nBitsInput to the arithmetic decoder
 *
 * Date: 15-08-2002
 * - Added BasicEscapeCoder
 * - Fixed some memory leak (pointers)
 *
 * Date: 16-08-2002
 * - Remove EntropyEncoderAdaptive & EntropyEncoderEscape
 * - Modified excape context behavior. Now we have an increasing decreament 
 *   size.
 *
 * $TODO
 * -----
 * - Check the escape coder, some how the performance is not as good as expected.
 *  + Checked! It seems that we have to tune the increment rate for a symbol and 
 *    the decrement rate of the escape symbol to obtain good results.
 *
 * - To extend BasicCoder to BasicEscapeCoder, which has an escape cotext in it
 *  + Done!
 * 
 * - Handle the EOF flag in the decoder.
 *
 * - Provide a threshold for the escape context. If the novel symbols count drop
 *   below a certain value, we do not use escape context at all.
 *   
 * - Order-1 coder (most likely not, the memory requirement is too high!)
 * 
 * - Upgrade to 27 bits!
 *
 */
/*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/

/*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/	
#include <stdlib.h>
#include <stdio.h>
#include "bitio.h"
#include "global.h"
#include "memchk.h"

/*----------------------------------------------------------------------------*/	
/*----------------------------------------------------------------------------*/	
#define CodeValueBits 16            
#define TopValue (((int)1<<CodeValueBits)-1)      
#define FirstQtr (TopValue/4+1)   
#define Half	  (2*FirstQtr)     
#define ThirdQtr (3*FirstQtr)     

/*----------------------------------------------------------------------------*/	
#define DefaultMaxFrequency 16383			

/*----------------------------------------------------------------------------*/	
typedef struct ContextStruct{
	int nSymbols;	
	int *Tree;	
	int p2half;
   int TotalFreq;
	int MaxCount;
} Context;

Context *ContextAlloc(void);
void ContextDealloc(Context *context);
int ContextInitialize(Context *context, int nSymbols, int MaxCount, int set);
int ContextGetCumul(Context *context, int Ix);
void ContextPutValue(Context *context, int val, int ix);
int ContextGetProb(Context *context, int ix);
void ContextScaleDown(Context *context);
int ContextGetSymbol(Context *context, int cumFreq);
void ContextUpdate(Context *context, int val, int ix);
double ContextGetCost(Context *context, int symbol);
void ContextPrintTable(Context *context, FILE *fp);

/*----------------------------------------------------------------------------*/	
/*----------------------------------------------------------------------------*/	
typedef struct ArithEncoderStruct{
	int low;
	int high;
	int range;
	int BitsToFollow;
	BIT_FILE *bs;
	int nBitsOutput;
} ArithEncoder;

ArithEncoder *ArithEncoderAlloc(BIT_FILE *bs);
void ArithEncoderDealloc(ArithEncoder *encoder);
void ArithEncoderStart(ArithEncoder *encoder);
void ArithEncoderEncode(ArithEncoder *encoder, int countLeft, int count, 
								int countTotal);
void ArithEncoderBitPlusFollow(ArithEncoder *encoder, int bit);
void ArithEncoderDone(ArithEncoder *encoder);
int  ArithEncoderNBitsOutput(ArithEncoder *encoder);

/*----------------------------------------------------------------------------*/	
/*----------------------------------------------------------------------------*/	
typedef struct ArithDecoderStruct {
	int low;
	int high;
	int range;
	int value;
	BIT_FILE *bs;
	int nBitsInput;
	int eof;
} ArithDecoder;

ArithDecoder *ArithDecoderAlloc(BIT_FILE *bs);
void ArithDecoderDealloc(ArithDecoder *decoder);
void ArithDecoderStart(ArithDecoder *decoder);
void ArithDecoderDecode(ArithDecoder *decoder, int countLeft, int count, 
								int countTotal );
int  ArithDecoderNBitsInput(ArithDecoder *decoder);


/*----------------------------------------------------------------------------*/	
/*----------------------------------------------------------------------------*/	
/* Note that the in the previous version, we have EntropyEncoderAdaptive and
 * EntropyEncoderEscape. They are tied to a fixed arithmetic coder. This 
 * prevents us from having just a single bit stream. The only way then is to 
 * arithmetic coded each data sets and then combine them into a single stream. 
 * The BasicCoder and BasicEscapeCoder requires a pointer to the arithemtic 
 * coder. Several coder can use the samearithmetic coder and produce a single 
 * bit streams. Conceptually, I see that the arithmetic coder does not perform 
 * compression/decompression, but just keeping track of the large floating 
 * number (which is about the same as the product of entropy from every 
 * symbols in the data set.
 *
 */

/*----------------------------------------------------------------------------*/	
/*----------------------------------------------------------------------------*/	
/* Refer to Davis 
 * The BasicCoder has a pointer to the context. The write operation requires 
 * a pointer to arithemetic coder. By freeing the coder from the arithmetic 
 * coder, we can use an arithmetic coder for several BasicCoder.
 */
typedef struct BasicCoderStruct{
	int nSymbols;
	int EndOfStreamSymbol;
	Context *context;
} BasicCoder;

BasicCoder *BasicCoderAlloc(int nSymbols, int MaxCount);

void BasicCoderDealloc(BasicCoder *coder);

double BasicCoderEncode(BasicCoder *coder, ArithEncoder *encoder, int symbol, 
								Boolean update);

int BasicCoderDecode(BasicCoder *coder, ArithDecoder *decoder, Boolean update);

void BasicCoderReset(BasicCoder *coder);

double BasicCoderGetCost(BasicCoder *coder, int symbol, Boolean update);

void BasicCoderSetNSymbols(BasicCoder *coder, int nSymbols, int MaxCount);

/*----------------------------------------------------------------------------*/	
/* 
 * The WriteNBits and ReadNBits functions are part of BasicCoder, but do not use
 * the data member of the module. This implementation allows read/write of symbols
 * and arbitrary bits value at any time without synchronisation problem.
 *
 */
void BasicCoderWriteNBits(ArithEncoder *encoder, int val, int nbits);
int BasicCoderReadNBits(ArithDecoder *decoder, int nbits);

/*----------------------------------------------------------------------------*/	
/*----------------------------------------------------------------------------*/	
/* BasicCoder with an escape context.
 */
typedef struct BasicEscapeCoderStruct{
	int nSymbols;
	int EndOfStreamSymbol, EscapeSymbol;
	char *NovelSymbol;
	Context *context;
	Context *escape;
	int EscapeDecreament;
	int EscapeDecreamentStart;
	int Thres;
	int nNovelSymbols;
} BasicEscapeCoder;

BasicEscapeCoder *BasicEscapeCoderAlloc(int nSymbols, int MaxCount, 
													 int EscapeDecreamentStart, int Thres);

void BasicEscapeCoderDealloc(BasicEscapeCoder *coder);

double BasicEscapeCoderEncode(BasicEscapeCoder *coder, ArithEncoder *encoder, 
										int symbol, Boolean update);

int BasicEscapeCoderDecode(BasicEscapeCoder *coder, ArithDecoder *decoder, 
									Boolean update);

void BasicEscapeCoderReset(BasicEscapeCoder *coder);

double BasicEscapeCoderGetCost(BasicEscapeCoder *coder, int symbol, 
										 Boolean update);

void BasicEscapeCoderSetNSymbols(BasicEscapeCoder *coder, int nSymbols, 
											int MaxCount, int EscapeDecreamentStart, 
											int Thres);

/*----------------------------------------------------------------------------*/	
/*----------------------------------------------------------------------------*/	
/* same as BasicCoderWriteNBits and BasicCoderReadNBits - should be used
 * from now on to streamlined the name.
 */
void CoderWriteNBits(ArithEncoder *encoder, int val, int nbits);
int CoderReadNBits(ArithDecoder *decoder, int nbits);

/*----------------------------------------------------------------------------*/	
/*----------------------------------------------------------------------------*/	
void CoderWarning(char *fmt, ...);
void CoderError(char *fmt, ...);

/*----------------------------------------------------------------------------*/	
/*----------------------------------------------------------------------------*/	

#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人午夜碰碰视频| 国产精品三级在线观看| 91在线视频18| 成人一二三区视频| 精品一区二区三区在线播放视频| 亚洲va欧美va天堂v国产综合| 亚洲综合久久久| 午夜精品国产更新| 蜜臀av性久久久久蜜臀av麻豆| 免费看精品久久片| 久久99精品国产.久久久久久 | 成人免费视频免费观看| 国产一区二区三区不卡在线观看 | 日韩欧美黄色影院| 日韩区在线观看| 欧美va天堂va视频va在线| 欧美一级日韩不卡播放免费| 日韩视频在线一区二区| 精品国产污网站| 久久精品视频网| 亚洲免费看黄网站| 午夜欧美大尺度福利影院在线看| 秋霞成人午夜伦在线观看| 国产伦精品一区二区三区免费| 国产成人精品综合在线观看| 91丨九色丨蝌蚪富婆spa| 欧美肥妇毛茸茸| 日本一二三四高清不卡| 一区二区国产视频| 另类中文字幕网| 91免费精品国自产拍在线不卡| 欧美亚洲愉拍一区二区| 久久综合999| 亚洲一区二区视频在线| 国产真实精品久久二三区| 91蜜桃视频在线| 精品免费日韩av| 亚洲黄色免费电影| 久久av资源站| 欧美日韩一区二区在线观看视频 | 成人综合在线观看| 欧美日韩免费在线视频| 久久九九99视频| 亚洲一区二区三区国产| 国产凹凸在线观看一区二区| 欧美巨大另类极品videosbest | 91精品久久久久久蜜臀| 久久精品一区二区三区不卡牛牛| 国产精品嫩草99a| 轻轻草成人在线| 日本韩国精品在线| 中文字幕va一区二区三区| 日本不卡一区二区三区高清视频| www.欧美色图| 精品国产伦一区二区三区观看体验 | 精品国产精品网麻豆系列| 亚洲综合精品久久| 99精品久久只有精品| 久久综合色播五月| 久久99深爱久久99精品| 欧美日韩国产在线观看| 亚洲欧美一区二区不卡| 国产·精品毛片| 国产欧美日韩三区| 狠狠色丁香婷婷综合| 日韩一区二区在线观看视频播放| 亚洲图片自拍偷拍| 日本道免费精品一区二区三区| 久久精品日产第一区二区三区高清版 | 日韩一级黄色片| 午夜久久久久久久久| 欧洲精品中文字幕| 亚洲影院久久精品| 色天使久久综合网天天| 亚洲美女视频在线| 色狠狠一区二区| 亚洲精品视频自拍| 91热门视频在线观看| 亚洲欧洲日产国产综合网| 不卡电影免费在线播放一区| 国产精品国产三级国产普通话三级 | 欧美一区二区三区思思人| 日本欧美在线看| 日韩欧美美女一区二区三区| 久久精品99久久久| 久久色成人在线| 国产精品77777竹菊影视小说| 久久人人97超碰com| 国产一区二区三区四| 国产精品美女一区二区| 成人爽a毛片一区二区免费| 综合欧美一区二区三区| 91国在线观看| 日产国产欧美视频一区精品| 欧美va亚洲va香蕉在线| 国产成人av福利| 亚洲色图视频网| 欧美高清激情brazzers| 人人超碰91尤物精品国产| 久久综合99re88久久爱| 99精品一区二区三区| 视频在线在亚洲| 久久亚洲精精品中文字幕早川悠里 | 亚洲一级二级三级在线免费观看| 欧美乱妇一区二区三区不卡视频| 久草精品在线观看| 亚洲日本中文字幕区| 宅男在线国产精品| 大尺度一区二区| 亚洲成人精品一区| 日本一区二区三区视频视频| 在线观看91精品国产入口| 开心九九激情九九欧美日韩精美视频电影 | 不卡免费追剧大全电视剧网站| 艳妇臀荡乳欲伦亚洲一区| 精品少妇一区二区三区在线视频| 国产91色综合久久免费分享| 亚洲国产欧美一区二区三区丁香婷| 欧美成人一区二区三区在线观看| 成人激情校园春色| 欧美aaa在线| 一区二区在线看| 国产欧美久久久精品影院| 欧美美女视频在线观看| av电影一区二区| 日韩高清一区在线| 亚洲免费在线看| 国产精品美女久久久久久久久久久| 欧美日韩一区二区三区高清| 成人av手机在线观看| 精品一区二区在线免费观看| 亚洲国产一区二区三区青草影视 | 色欧美88888久久久久久影院| 国产在线播放一区| 毛片基地黄久久久久久天堂| 亚洲国产综合色| 亚洲欧美偷拍三级| 日韩码欧中文字| 久久久久九九视频| 欧美videofree性高清杂交| 欧美巨大另类极品videosbest| 成人av在线一区二区| 高清不卡在线观看| 国产精品一区专区| 激情图片小说一区| 国产一区二区三区观看| 久久国产精品色婷婷| 久久精品国产久精国产| 日韩经典一区二区| 丝袜美腿成人在线| 亚洲成人动漫在线观看| 性感美女久久精品| 亚洲国产精品久久久久秋霞影院 | 久久亚洲精华国产精华液| 日韩一二三区视频| 欧美一区二区三区播放老司机| 欧美三级在线播放| 欧美精品国产精品| 欧美一区日本一区韩国一区| 日韩一级完整毛片| 亚洲精品一区二区三区四区高清 | 7777精品伊人久久久大香线蕉的 | 成人h动漫精品一区二| 成人一区二区三区视频| 成人激情电影免费在线观看| 99riav久久精品riav| 日本精品视频一区二区| 337p亚洲精品色噜噜| 日韩欧美一区在线观看| 欧美xingq一区二区| 久久精品人人做| 国产精品久久久久国产精品日日 | 日韩欧美中文一区二区| 久久久久亚洲综合| 国产精品久久久久9999吃药| 一区二区在线看| 免费欧美高清视频| 成人性生交大片| 欧美伊人精品成人久久综合97 | 91精品福利视频| 欧美一区二区三级| 欧美国产日韩亚洲一区| 伊人夜夜躁av伊人久久| 蜜桃免费网站一区二区三区| 成人av网址在线观看| 欧美日韩一区二区欧美激情| 久久久影视传媒| 一区二区三区av电影| 看电视剧不卡顿的网站| 91视频免费播放| 日韩三级电影网址| 亚洲久本草在线中文字幕| 精品亚洲成a人在线观看 | 91精品国产综合久久久久久| 久久综合网色—综合色88| 亚洲免费av高清| 国产成人亚洲精品青草天美| 欧美色窝79yyyycom| 中文一区二区在线观看| 婷婷综合在线观看|