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

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

?? jdarith.c~

?? 常好且全面的jpeg圖像壓縮算法
?? C~
字號:
/* * jdarith.c * * Copyright (C) 1997, Guido Vollbeding <guivol@esc.de>. * This file is NOT part of the Independent JPEG Group's software * for legal reasons. * See the accompanying README file for conditions of distribution and use. * * This file contains portable arithmetic entropy decoding routines for JPEG * (implementing the ISO/IEC IS 10918-1 and CCITT Recommendation ITU-T T.81). * * Both sequential and progressive modes are supported in this single module. * * Suspension is not currently supported in this module. */#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一区二区三区免费野_久草精品视频
中文字幕一区二区三区在线播放 | 亚洲国产美女搞黄色| 亚洲成av人片观看| 成人免费高清在线| 欧美一区二区久久久| 国产精品理论在线观看| 美腿丝袜亚洲综合| 欧美在线三级电影| 国产精品免费丝袜| 狠狠色综合播放一区二区| 色婷婷久久一区二区三区麻豆| 欧美体内she精视频| 国产欧美日本一区二区三区| 亚洲一区二区在线观看视频| 国产不卡视频在线观看| 日韩视频免费观看高清完整版在线观看 | 在线播放中文一区| 中文字幕中文在线不卡住| 美女尤物国产一区| 欧美日韩国产区一| 亚洲视频在线一区| 国产精品亚洲专一区二区三区| 欧美日韩一区精品| 亚洲女同一区二区| www.日韩在线| 国产精品乱人伦一区二区| 国产在线精品免费| 2023国产精品| 日本欧洲一区二区| 717成人午夜免费福利电影| 一区二区三区中文在线观看| www.在线成人| 国产精品亲子伦对白| 国产成人午夜精品影院观看视频| 精品国产乱码久久久久久老虎| 日韩黄色片在线观看| 欧美日韩免费观看一区二区三区| 亚洲人精品一区| 色女孩综合影院| 亚洲最新在线观看| 欧美亚洲图片小说| 午夜视频一区在线观看| 91精品国产福利| 麻豆极品一区二区三区| 日韩欧美在线网站| 国产自产视频一区二区三区| 久久精品无码一区二区三区| 国产.精品.日韩.另类.中文.在线.播放| 欧美不卡视频一区| 国产精品一级片| 国产精品理伦片| 色系网站成人免费| 日日摸夜夜添夜夜添亚洲女人| 欧美蜜桃一区二区三区| 成人av网址在线观看| 最新中文字幕一区二区三区| 日本道色综合久久| 偷偷要91色婷婷| 精品裸体舞一区二区三区| 国产精品一二三区在线| 亚洲视频在线一区观看| 欧美艳星brazzers| 热久久一区二区| 国产欧美一区二区在线观看| 99re6这里只有精品视频在线观看| 欧美激情一区二区三区全黄| 91在线播放网址| 亚洲成av人片一区二区三区| 精品成人一区二区| 91在线你懂得| 免费在线成人网| 国产三区在线成人av| 欧美性淫爽ww久久久久无| 蜜桃av噜噜一区| 亚洲图片另类小说| 欧美一卡二卡在线| 成人不卡免费av| 天天影视网天天综合色在线播放 | 日韩高清电影一区| 久久精品一二三| 欧美午夜电影网| 黄网站免费久久| 丝袜美腿亚洲综合| 中文字幕一区二区在线播放| 日韩一区二区免费在线观看| 91麻豆精品在线观看| 精品一区二区三区免费播放 | 色猫猫国产区一区二在线视频| 青娱乐精品在线视频| 亚洲丝袜制服诱惑| 精品福利av导航| 在线中文字幕一区| 高清不卡一区二区| 蜜臀精品久久久久久蜜臀 | 午夜视黄欧洲亚洲| 国产婷婷精品av在线| 欧美一区二区三区在线电影| 91免费视频大全| 成人精品高清在线| 国产精品99久久久久| 蜜桃视频一区二区| 一区二区欧美国产| 亚洲欧洲99久久| 亚洲国产精品精华液2区45| 日韩视频123| 91精品一区二区三区在线观看| 91小视频在线| 99综合电影在线视频| 粉嫩绯色av一区二区在线观看| 色婷婷亚洲婷婷| 91色|porny| 日本久久一区二区| 在线中文字幕一区二区| 一道本成人在线| 一本色道久久综合狠狠躁的推荐 | 中文字幕一区在线观看视频| 久久亚洲欧美国产精品乐播 | 国产精品情趣视频| 国产三级欧美三级日产三级99 | 亚洲超碰精品一区二区| 亚洲欧美一区二区在线观看| 国产欧美综合在线观看第十页| 久久久久99精品一区| 精品国精品国产| www国产亚洲精品久久麻豆| 欧美v国产在线一区二区三区| 欧美成人性战久久| 久久久久久一级片| 国产精品久久久久一区| 国产精品国产三级国产aⅴ无密码| 欧美激情在线一区二区三区| 国产精品午夜春色av| 中文字幕二三区不卡| 亚洲人成网站影音先锋播放| 一区二区在线看| 亚洲1区2区3区视频| 老司机精品视频线观看86| 青青草原综合久久大伊人精品 | 国产精品乱人伦中文| 亚洲免费色视频| 日韩在线卡一卡二| 7799精品视频| 精品剧情在线观看| 成人欧美一区二区三区在线播放| 国产欧美日本一区二区三区| 亚洲人午夜精品天堂一二香蕉| 手机精品视频在线观看| 日本成人在线看| 久久国产精品无码网站| 91丨九色丨尤物| 精品美女在线观看| 亚洲色欲色欲www| 五月天亚洲精品| 成人一道本在线| 欧美肥胖老妇做爰| 国产欧美一区二区精品性色| 亚洲制服丝袜一区| 国产乱码精品一区二区三区忘忧草 | 色一情一伦一子一伦一区| 欧美日精品一区视频| 久久久www成人免费无遮挡大片 | 欧美亚洲一区二区三区四区| 亚洲精品一线二线三线| 18欧美乱大交hd1984| 蜜臀av国产精品久久久久| 91亚洲精品乱码久久久久久蜜桃| 欧美一区永久视频免费观看| 亚洲欧洲精品一区二区三区不卡| 日韩精品一区第一页| 不卡的电视剧免费网站有什么| 欧美性猛交xxxx乱大交退制版 | 中文字幕精品一区二区精品绿巨人| 亚洲综合偷拍欧美一区色| 国产精品一区二区不卡| 色爱区综合激月婷婷| 国产亚洲va综合人人澡精品 | 欧美mv日韩mv国产| 亚洲国产成人精品视频| 成人av片在线观看| 亚洲精品一区二区三区在线观看| 亚洲一线二线三线视频| 成人免费看片app下载| 精品福利av导航| 日韩精品成人一区二区三区| 色婷婷久久久亚洲一区二区三区| 欧美激情中文字幕一区二区| 日本视频在线一区| 欧美精品亚洲二区| 亚洲一区欧美一区| 色中色一区二区| 国产精品丝袜一区| 国产成人鲁色资源国产91色综| 91精品婷婷国产综合久久性色 | 国产午夜亚洲精品理论片色戒| 日本美女视频一区二区| 欧美精品久久久久久久多人混战 | 2024国产精品| 免费观看成人av| 日韩精品在线看片z| 蜜臀av一区二区在线观看|