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

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

?? jdarith.c

?? 常好且全面的jpeg圖像壓縮算法
?? C
字號:
/* * jdarith.c *This programe is reedited  by Fujian Shi(fieagle@yahoo.com.cn). * The primitive code is writed by  Guido Vollbeding <guivol@esc.de>. * This program is designed to finish arithmetic decoding. */#include "commondecls.h"#define RIGHT_SHIFT(x,shft) x>=0? x>>shft:-((-x)>>shft)/* The following two definitions specify the allocation chunk size * for the statistics area. * According to sections F.1.4.4.1.3 and F.1.4.4.2, we need at least * 49 statistics bins for DC, and 245 statistics bins for AC coding. * Note that we use one additional AC bin for codings with fixed * probability (0.5), thus the minimum number for AC is 246. * * We use a compact representation with 1 byte per statistics bin, * thus the numbers directly represent byte sizes. * This 1 byte per statistics bin contains the meaning of the MPS * (more probable symbol) in the highest bit (mask 0x80), and the * index into the probability estimation state machine table * in the lower bits (mask 0x7F). */LOCAL (void)fill_input_buffer (j_compress_ptr cinfo){  jpeg_source_mgr *src =  cinfo->src;  size_t nbytes;  nbytes = JFREAD(cinfo->inputfile, cinfo->inbuffer[0], 4096);  if (nbytes <= 0) {   /* Insert a fake EOI marker to jump out the decoding programe*/    cinfo->inbuffer[0][0] = (JOCTET) 0xFF;    cinfo->inbuffer[0][1] = (JOCTET) 0xD9;    nbytes = 2;      }  src->next_input_byte = cinfo->inbuffer[0];  src->bytes_in_buffer = nbytes;  }LOCAL(int)get_byte (j_compress_ptr cinfo)/* Read next input byte; we do not support suspension in this module. */{  jpeg_source_mgr * src = cinfo->src;  int data;  if (src->bytes_in_buffer == 0){    printf("yes\n");    fill_input_buffer(cinfo);  }  src->bytes_in_buffer--;  data=*src->next_input_byte++;  return (data);}/* * The core arithmetic decoding routine (common in JPEG and JBIG). * This needs to go as fast as possible. * Machine-dependent optimization facilities * are not utilized in this portable implementation. * However, this code should be fairly efficient and * may be a good base for further optimizations anyway. * * Return value is 0 or 1 (binary decision). * * Note: I've changed the handling of the code base & bit * buffer register C compared to other implementations * based on the standards layout & procedures. * While it also contains both the actual base of the * coding interval (16 bits) and the next-bits buffer, * the cut-point between these two parts is floating * (instead of fixed) with the bit shift counter CT. * Thus, we also need only one (variable instead of * fixed size) shift for the LPS/MPS decision, and * we can get away with any renormalization update * of C (except for new data insertion, of course). * * I've also introduced a new scheme for accessing * the probability estimation state machine table, * derived from Markus Kuhn's JBIG implementation. */LOCAL(int)arith_decode (j_compress_ptr cinfo, unsigned char *st){  extern const INT32 jaritab[];  register arith_entropy_ptr e = (arith_entropy_ptr) cinfo->entropy;  register unsigned char nl, nm;  register INT32 qe, temp;  register int sv, data,cx;   /* Fetch values from our compact representation of Table D.2:   * Qe values and probability estimation state machine   */  cx=(e->c>>16)&0x0000ffff;  /*printf("%x",cx);*/  sv = *st;  qe = jaritab[sv & 0x7F];	/* => Qe_Value */  nl = qe & 0xFF; qe =(qe>>8)&0x00ffffff ;	/* Next_Index_LPS + Switch_MPS */  nm = qe & 0xFF; qe >>= 8;	/* Next_Index_MPS */  /* Decode & estimation procedures per sections D.2.4 & D.2.5 */  temp = e->a - qe;  e->a = temp;  /*temp <<= e->ct;*/  if (cx >= temp) {    cx -= temp;    /* Conditional LPS (less probable symbol) exchange */    if (e->a < qe) {      e->a = qe;      *st = (sv & 0x80) ^ nm;	/* Estimate_after_MPS */    } else {      e->a = qe;      *st = (sv & 0x80) ^ nl;	/* Estimate_after_LPS */      sv ^= 0x80;		/* Exchange LPS/MPS */    }  } else if (e->a < 0x8000L) {    /* Conditional MPS (more probable symbol) exchange */    if (e->a < qe) {      *st = (sv & 0x80) ^ nl;	/* Estimate_after_LPS */      sv ^= 0x80;		/* Exchange LPS/MPS */    } else {      *st = (sv & 0x80) ^ nm;	/* Estimate_after_MPS */    }  } e->c =(e->c & 0xFFFF)|(cx<<16); /* Renormalization & data input per section D.2.6 */  while (e->a < 0x8000L) {    if (e->ct == 0) {      /* Need to fetch next data byte */      e->ct=8;      if (cinfo->unread_marker){	printf("%x \n",cinfo->unread_marker);	data = 0;      }	      else {	data = get_byte(cinfo);	/* read next input byte */	if (data==0xff) {	  if ((data=get_byte(cinfo))==0)	    data=0xff;	  else {	    cinfo->unread_marker=data;	    data=0;	  }	}	e->c +=(data<<8);      }    }    e->a <<=1;    e->c <<=1;    e->ct--;  }  return (sv >> 7);}voiddecode_row (j_compress_ptr cinfo,int i){  arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;  unsigned char * st;  unsigned char context_a=0;  int num,ci, tbl, k, ke;  int v, v2, m,sign,Ra=0,Rc=0,predic_val=0;  entropy->context=0;  /* Encode the MCU data blocks */  for (num = 0; num < cinfo->image_width; num++) {        /* Sections F.1.4.1 & F.1.4.4.1: Encoding of DC coefficients */         /*printf("%x ",entropy->context);*/     /* Table F.4: Point to statistics bin S0 for DC coefficient coding */    st =entropy->dc_stats + entropy->context*5+entropy->context_b[num];    /*predic_val=last_val+((entropy->val_b[num]-Rc)>>1);*/    /*predic_val=entropy->val_b[num]+RIGHT_SHIFT(last_val-Rc,1);*/    /*predic_val=RIGHT_SHIFT(Ra+entropy->val_b[num],1);*/    /*    if (i==0)      printf("num:%d bin:%d *st:%x laval:%d pre:%d\n",num,context_a,*st,last_val,predic_val);*/    /* Figure F.4: Encode_DC_DIFF */    if ((arith_decode(cinfo,st)) == 0) {      entropy->context = 0;	                /* zero diff category */      v=0;     } else {      sign=arith_decode(cinfo, st+1);      st +=2;   st +=sign;      if ((m = arith_decode(cinfo, st)) != 0) {	if ( entropy->context_b[num]>8 )	  st=entropy->dc_stats+129;	else	  st = entropy->dc_stats + 100;   /* Table H.3: X1 = X1_context(Db)*/	/*st=entropy->dc_stats+20;*/	while (arith_decode(cinfo, st)) {	  m <<=1;	  st += 1;	}      }           if (m < (int) (((INT32) 1 << cinfo->arith_dc_L) >> 1))	entropy->context = 0;		   /* zero diff category */      else if (m > (int) (((INT32) 1 << cinfo->arith_dc_U)>>1 ))	entropy->context = 12 + (sign * 4); /* large diff category */      else	entropy->context = 4 + (sign * 4);  /* small diff category */      /* Figure F.24: Decoding the magnitude bit pattern of v */      v = m;      st += 14;      while (m >>= 1)	if (arith_decode(cinfo, st)) v |= m;      /* Section F.1.4.4.1.2: Establish dc_context conditioning category */           v += 1; if (sign) v = -v;          }       predic_val=return_pixel_val(cinfo,Ra,entropy->val_b[num],Rc,entropy->val_b[num+1],v);    /*if (i==0)      printf("row[%d]:%x v:%d\n",num,predic_val,v);*/        entropy->context_b[num]=entropy->context;    Rc=entropy->val_b[num];    Ra=entropy->val_b[num]=predic_val;    emit_byte(cinfo,predic_val);  }    }/*We assume the compressed data is larger than 8 bytes*/void     /*Here we can try to use function pointer later for study.*/ initial_decoder(j_compress_ptr cinfo){  arith_entropy_ptr e = (arith_entropy_ptr) cinfo->entropy;  int data;  data=get_byte(cinfo);  e->c +=(data<<8);  e->c <<=8;  data=get_byte(cinfo);  e->c +=(data<<8);  e->c <<=8;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99精品久久久久久| 激情欧美一区二区| 久久精品亚洲精品国产欧美kt∨| 波多野结衣亚洲| 久久精品99国产精品| 亚洲自拍另类综合| 国产精品家庭影院| 久久久亚洲国产美女国产盗摄| 欧美日韩免费视频| 色老头久久综合| 欧美一区二区三区四区五区| 成人av高清在线| 国产69精品一区二区亚洲孕妇 | 一区二区三区精品视频| 日本一区二区视频在线| 久久综合久久综合久久综合| 精品少妇一区二区三区在线视频| 在线免费亚洲电影| 色悠悠久久综合| 在线免费观看日本欧美| 91香蕉视频污| 欧美专区亚洲专区| 欧美调教femdomvk| 欧美性xxxxxxxx| 欧美系列一区二区| 6080午夜不卡| 久久久www免费人成精品| 久久久蜜臀国产一区二区| 国产精品久久久一区麻豆最新章节| 国产欧美1区2区3区| 中文字幕一区二区三区在线不卡| 中文字幕一区二区三区在线观看 | 99在线精品免费| 欧美日韩一级二级| 91麻豆精品国产| 2014亚洲片线观看视频免费| 精品国产一区二区三区久久久蜜月 | 日本一区二区不卡视频| 亚洲精品一二三区| 青青草原综合久久大伊人精品| 国产一区二区三区香蕉| 成人av电影观看| 日韩一区二区三区免费看| 国产精品久久久久久久久久久免费看 | 日日欢夜夜爽一区| 成人妖精视频yjsp地址| 欧美电影一区二区| 中文字幕一区二区不卡| 秋霞国产午夜精品免费视频| 成人福利视频在线看| 色综合一个色综合亚洲| 精品精品欲导航| 亚洲成人你懂的| 成人av集中营| 中文字幕国产一区| 蜜臀av性久久久久蜜臀aⅴ| 色婷婷久久久亚洲一区二区三区| 日韩三级中文字幕| 亚洲影视资源网| 色悠悠久久综合| 中文字幕在线不卡| 成人激情综合网站| 久久婷婷色综合| 国产美女一区二区| 91黄色免费看| 亚洲精品国产一区二区精华液| 激情图片小说一区| 91精品午夜视频| 日日夜夜精品免费视频| 3atv一区二区三区| 青青草国产精品亚洲专区无| 欧美老人xxxx18| 亚洲 欧美综合在线网络| 欧美三级韩国三级日本三斤 | 国内精品国产成人| 久久久五月婷婷| a级精品国产片在线观看| 最新热久久免费视频| 91麻豆.com| 亚洲国产综合91精品麻豆| 91福利在线看| 久热成人在线视频| 久久精品亚洲麻豆av一区二区| 国产suv一区二区三区88区| 亚洲欧洲精品一区二区三区不卡 | 精品久久久久一区| 成人午夜在线免费| 亚洲一区二区高清| 精品国产区一区| 99久久er热在这里只有精品66| 亚洲资源中文字幕| 日韩欧美国产综合一区| 97se亚洲国产综合自在线| 亚洲成人免费影院| 国产亚洲一二三区| 欧美欧美欧美欧美| 福利一区二区在线观看| 亚洲精品日韩一| 久久男人中文字幕资源站| 色综合久久综合| 久久er99精品| 丝袜美腿一区二区三区| 国产精品免费人成网站| 欧美疯狂做受xxxx富婆| 97精品电影院| 成人免费福利片| 久久99久久久欧美国产| 亚洲大片免费看| 亚洲视频狠狠干| 国产女主播一区| 久久精品人人做人人爽97| 在线电影一区二区三区| 欧美亚洲一区二区三区四区| 成人av资源在线观看| 国产成人亚洲精品狼色在线| 免费一级欧美片在线观看| 亚洲成人免费看| 亚洲成人综合网站| 日韩黄色免费电影| 首页国产欧美日韩丝袜| 日日夜夜精品视频免费| 日韩精品国产精品| 美女视频黄a大片欧美| 日本不卡视频在线| 久久99久久99精品免视看婷婷| 日本vs亚洲vs韩国一区三区二区| 日本在线观看不卡视频| 日本aⅴ精品一区二区三区| 日韩成人av影视| 精品一区二区精品| 激情五月婷婷综合| 国产精品 欧美精品| 丁香激情综合五月| 色悠悠亚洲一区二区| 91精品国产综合久久久久久久| 3d动漫精品啪啪1区2区免费| 欧美一二三在线| 欧美国产一区视频在线观看| 日韩一区欧美一区| 亚洲无人区一区| av中文字幕不卡| www.欧美亚洲| www.亚洲在线| 国产a久久麻豆| 国产精品资源在线观看| 男人操女人的视频在线观看欧美| 亚洲一区二区视频在线观看| 日韩欧美一区中文| 麻豆成人av在线| 成年人网站91| 91精品国产一区二区三区蜜臀 | 精彩视频一区二区| 色哟哟一区二区三区| 久久色.com| 亚洲国产日产av| av成人免费在线观看| 欧美一级二级在线观看| 亚洲欧美偷拍卡通变态| 日本一区二区免费在线观看视频| 国产视频一区二区在线| 午夜久久久久久久久久一区二区| 国产麻豆成人精品| 欧美亚洲国产怡红院影院| 久久久久国产精品麻豆| 日本亚洲天堂网| 91色.com| 亚洲摸摸操操av| 成人福利在线看| 中文字幕一区二区三区四区不卡| 国产精品一区二区你懂的| 欧美一区二区三区影视| 婷婷久久综合九色国产成人| 在线一区二区三区四区五区 | 亚洲精品久久久蜜桃| 成人黄色在线网站| 国产精品女人毛片| 成人永久看片免费视频天堂| 国产喷白浆一区二区三区| 国产激情91久久精品导航| 久久精品亚洲乱码伦伦中文| 国产一区999| 国产精品久久99| 99久久国产综合精品麻豆| 亚洲午夜在线电影| 4hu四虎永久在线影院成人| 久久99国产精品成人| 国产日产欧美一区二区视频| 成人激情免费网站| 亚洲影视在线播放| 日韩女优av电影在线观看| 国产麻豆成人精品| 一区二区三区精品在线观看| 欧美精品国产精品| 国产在线麻豆精品观看| 国产精品欧美一区喷水| 欧美在线观看视频一区二区| 日韩高清一区在线| 国产欧美日韩中文久久| 精品婷婷伊人一区三区三| 韩国精品在线观看|