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

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

?? jdphuff.c

?? 常好且全面的jpeg圖像壓縮算法
?? C
?? 第 1 頁 / 共 2 頁
字號:
      (*block)[0] = (JCOEF) (s << Al);
    }

    /* Completed MCU, so update state */
    BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
    ASSIGN_STATE(entropy->saved, state);
  }

  /* Account for restart interval (no-op if not using restarts) */
  entropy->restarts_to_go--;

  return TRUE;
}


/*
 * MCU decoding for AC initial scan (either spectral selection,
 * or first pass of successive approximation).
 */

METHODDEF(boolean)
decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
{   
  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
  int Se = cinfo->Se;
  int Al = cinfo->Al;
  register int s, k, r;
  unsigned int EOBRUN;
  JBLOCKROW block;
  BITREAD_STATE_VARS;
  d_derived_tbl * tbl;

  /* Process restart marker if needed; may have to suspend */
  if (cinfo->restart_interval) {
    if (entropy->restarts_to_go == 0)
      if (! process_restart(cinfo))
	return FALSE;
  }

  /* If we've run out of data, just leave the MCU set to zeroes.
   * This way, we return uniform gray for the remainder of the segment.
   */
  if (! entropy->pub.insufficient_data) {

    /* Load up working state.
     * We can avoid loading/saving bitread state if in an EOB run.
     */
    EOBRUN = entropy->saved.EOBRUN;	/* only part of saved state we need */

    /* There is always only one block per MCU */

    if (EOBRUN > 0)		/* if it's a band of zeroes... */
      EOBRUN--;			/* ...process it now (we do nothing) */
    else {
      BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
      block = MCU_data[0];
      tbl = entropy->ac_derived_tbl;

      for (k = cinfo->Ss; k <= Se; k++) {
	HUFF_DECODE(s, br_state, tbl, return FALSE, label2);
	r = s >> 4;
	s &= 15;
	if (s) {
	  k += r;
	  CHECK_BIT_BUFFER(br_state, s, return FALSE);
	  r = GET_BITS(s);
	  s = HUFF_EXTEND(r, s);
	  /* Scale and output coefficient in natural (dezigzagged) order */
	  (*block)[jpeg_natural_order[k]] = (JCOEF) (s << Al);
	} else {
	  if (r == 15) {	/* ZRL */
	    k += 15;		/* skip 15 zeroes in band */
	  } else {		/* EOBr, run length is 2^r + appended bits */
	    EOBRUN = 1 << r;
	    if (r) {		/* EOBr, r > 0 */
	      CHECK_BIT_BUFFER(br_state, r, return FALSE);
	      r = GET_BITS(r);
	      EOBRUN += r;
	    }
	    EOBRUN--;		/* this band is processed at this moment */
	    break;		/* force end-of-band */
	  }
	}
      }

      BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
    }

    /* Completed MCU, so update state */
    entropy->saved.EOBRUN = EOBRUN;	/* only part of saved state we need */
  }

  /* Account for restart interval (no-op if not using restarts) */
  entropy->restarts_to_go--;

  return TRUE;
}


/*
 * MCU decoding for DC successive approximation refinement scan.
 * Note: we assume such scans can be multi-component, although the spec
 * is not very clear on the point.
 */

METHODDEF(boolean)
decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
{   
  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
  int p1 = 1 << cinfo->Al;	/* 1 in the bit position being coded */
  int blkn;
  JBLOCKROW block;
  BITREAD_STATE_VARS;

  /* Process restart marker if needed; may have to suspend */
  if (cinfo->restart_interval) {
    if (entropy->restarts_to_go == 0)
      if (! process_restart(cinfo))
	return FALSE;
  }

  /* Not worth the cycles to check insufficient_data here,
   * since we will not change the data anyway if we read zeroes.
   */

  /* Load up working state */
  BITREAD_LOAD_STATE(cinfo,entropy->bitstate);

  /* Outer loop handles each block in the MCU */

  for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
    block = MCU_data[blkn];

    /* Encoded data is simply the next bit of the two's-complement DC value */
    CHECK_BIT_BUFFER(br_state, 1, return FALSE);
    if (GET_BITS(1))
      (*block)[0] |= p1;
    /* Note: since we use |=, repeating the assignment later is safe */
  }

  /* Completed MCU, so update state */
  BITREAD_SAVE_STATE(cinfo,entropy->bitstate);

  /* Account for restart interval (no-op if not using restarts) */
  entropy->restarts_to_go--;

  return TRUE;
}


/*
 * MCU decoding for AC successive approximation refinement scan.
 */

METHODDEF(boolean)
decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
{   
  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
  int Se = cinfo->Se;
  int p1 = 1 << cinfo->Al;	/* 1 in the bit position being coded */
  int m1 = (-1) << cinfo->Al;	/* -1 in the bit position being coded */
  register int s, k, r;
  unsigned int EOBRUN;
  JBLOCKROW block;
  JCOEFPTR thiscoef;
  BITREAD_STATE_VARS;
  d_derived_tbl * tbl;
  int num_newnz;
  int newnz_pos[DCTSIZE2];

  /* Process restart marker if needed; may have to suspend */
  if (cinfo->restart_interval) {
    if (entropy->restarts_to_go == 0)
      if (! process_restart(cinfo))
	return FALSE;
  }

  /* If we've run out of data, don't modify the MCU.
   */
  if (! entropy->pub.insufficient_data) {

    /* Load up working state */
    BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
    EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */

    /* There is always only one block per MCU */
    block = MCU_data[0];
    tbl = entropy->ac_derived_tbl;

    /* If we are forced to suspend, we must undo the assignments to any newly
     * nonzero coefficients in the block, because otherwise we'd get confused
     * next time about which coefficients were already nonzero.
     * But we need not undo addition of bits to already-nonzero coefficients;
     * instead, we can test the current bit to see if we already did it.
     */
    num_newnz = 0;

    /* initialize coefficient loop counter to start of band */
    k = cinfo->Ss;

    if (EOBRUN == 0) {
      for (; k <= Se; k++) {
	HUFF_DECODE(s, br_state, tbl, goto undoit, label3);
	r = s >> 4;
	s &= 15;
	if (s) {
	  if (s != 1)		/* size of new coef should always be 1 */
	    WARNMS(cinfo, JWRN_HUFF_BAD_CODE);
	  CHECK_BIT_BUFFER(br_state, 1, goto undoit);
	  if (GET_BITS(1))
	    s = p1;		/* newly nonzero coef is positive */
	  else
	    s = m1;		/* newly nonzero coef is negative */
	} else {
	  if (r != 15) {
	    EOBRUN = 1 << r;	/* EOBr, run length is 2^r + appended bits */
	    if (r) {
	      CHECK_BIT_BUFFER(br_state, r, goto undoit);
	      r = GET_BITS(r);
	      EOBRUN += r;
	    }
	    break;		/* rest of block is handled by EOB logic */
	  }
	  /* note s = 0 for processing ZRL */
	}
	/* Advance over already-nonzero coefs and r still-zero coefs,
	 * appending correction bits to the nonzeroes.  A correction bit is 1
	 * if the absolute value of the coefficient must be increased.
	 */
	do {
	  thiscoef = *block + jpeg_natural_order[k];
	  if (*thiscoef != 0) {
	    CHECK_BIT_BUFFER(br_state, 1, goto undoit);
	    if (GET_BITS(1)) {
	      if ((*thiscoef & p1) == 0) { /* do nothing if already set it */
		if (*thiscoef >= 0)
		  *thiscoef += p1;
		else
		  *thiscoef += m1;
	      }
	    }
	  } else {
	    if (--r < 0)
	      break;		/* reached target zero coefficient */
	  }
	  k++;
	} while (k <= Se);
	if (s) {
	  int pos = jpeg_natural_order[k];
	  /* Output newly nonzero coefficient */
	  (*block)[pos] = (JCOEF) s;
	  /* Remember its position in case we have to suspend */
	  newnz_pos[num_newnz++] = pos;
	}
      }
    }

    if (EOBRUN > 0) {
      /* Scan any remaining coefficient positions after the end-of-band
       * (the last newly nonzero coefficient, if any).  Append a correction
       * bit to each already-nonzero coefficient.  A correction bit is 1
       * if the absolute value of the coefficient must be increased.
       */
      for (; k <= Se; k++) {
	thiscoef = *block + jpeg_natural_order[k];
	if (*thiscoef != 0) {
	  CHECK_BIT_BUFFER(br_state, 1, goto undoit);
	  if (GET_BITS(1)) {
	    if ((*thiscoef & p1) == 0) { /* do nothing if already changed it */
	      if (*thiscoef >= 0)
		*thiscoef += p1;
	      else
		*thiscoef += m1;
	    }
	  }
	}
      }
      /* Count one block completed in EOB run */
      EOBRUN--;
    }

    /* Completed MCU, so update state */
    BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
    entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */
  }

  /* Account for restart interval (no-op if not using restarts) */
  entropy->restarts_to_go--;

  return TRUE;

undoit:
  /* Re-zero any output coefficients that we made newly nonzero */
  while (num_newnz > 0)
    (*block)[newnz_pos[--num_newnz]] = 0;

  return FALSE;
}


/*
 * Module initialization routine for progressive Huffman entropy decoding.
 */

GLOBAL(void)
jinit_phuff_decoder (j_decompress_ptr cinfo)
{
  phuff_entropy_ptr entropy;
  int *coef_bit_ptr;
  int ci, i;

  entropy = (phuff_entropy_ptr)
    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
				SIZEOF(phuff_entropy_decoder));
  cinfo->entropy = (struct jpeg_entropy_decoder *) entropy;
  entropy->pub.start_pass = start_pass_phuff_decoder;

  /* Mark derived tables unallocated */
  for (i = 0; i < NUM_HUFF_TBLS; i++) {
    entropy->derived_tbls[i] = NULL;
  }

  /* Create progression status table */
  cinfo->coef_bits = (int (*)[DCTSIZE2])
    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
				cinfo->num_components*DCTSIZE2*SIZEOF(int));
  coef_bit_ptr = & cinfo->coef_bits[0][0];
  for (ci = 0; ci < cinfo->num_components; ci++) 
    for (i = 0; i < DCTSIZE2; i++)
      *coef_bit_ptr++ = -1;
}

#endif /* D_PROGRESSIVE_SUPPORTED */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91久久久免费一区二区| 日本在线观看不卡视频| 成人黄色在线看| 国产精品久99| 色婷婷国产精品| 亚洲成av人片在www色猫咪| 欧美日韩成人综合天天影院| 青青草国产成人99久久| 国产亚洲一本大道中文在线| av中文字幕亚洲| 亚洲主播在线观看| 日韩视频一区在线观看| 国产成人精品免费| 亚洲精品一二三| 欧美日韩二区三区| 国产精品18久久久| 亚洲免费电影在线| 日韩欧美一二三四区| 成人午夜电影网站| 亚洲1区2区3区视频| ww亚洲ww在线观看国产| 色综合久久88色综合天天6 | 国产精品亲子伦对白| 91色在线porny| 日本在线不卡视频| 国产精品进线69影院| 91精品国产综合久久小美女| 国产毛片精品一区| 一区二区高清在线| 久久综合国产精品| 日本道免费精品一区二区三区| 免费视频最近日韩| 亚洲伦理在线免费看| 精品三级av在线| 在线亚洲精品福利网址导航| 国产一区二区三区免费观看| 一区二区三区在线不卡| 久久欧美一区二区| 欧美日精品一区视频| 成人免费毛片高清视频| 欧美亚洲动漫制服丝袜| 精品一区中文字幕| 亚洲香蕉伊在人在线观| 久久免费美女视频| 91精品国产一区二区三区蜜臀| jvid福利写真一区二区三区| 久久99精品久久久久久动态图| 一区二区欧美在线观看| 国产精品乱码妇女bbbb| 久久综合成人精品亚洲另类欧美| 欧美日韩亚洲综合| 91麻豆123| av不卡免费在线观看| 国产v综合v亚洲欧| 国产一区二区三区四区五区美女 | 色悠悠久久综合| 国产精品一区二区久久精品爱涩| 五月天久久比比资源色| 最新国产精品久久精品| 国产日本欧美一区二区| 亚洲精品一区二区三区精华液 | 欧美日韩国产一级| 色哟哟精品一区| eeuss鲁一区二区三区| 精品一区二区三区免费观看| 丝袜国产日韩另类美女| 亚洲1区2区3区4区| 亚洲成在人线在线播放| 一区二区三区四区在线| 亚洲欧美另类图片小说| 亚洲欧洲日韩在线| 中文字幕永久在线不卡| 国产精品久久久久久久久快鸭 | 在线区一区二视频| 成人一区二区三区| 成人午夜av在线| 99国产精品99久久久久久| heyzo一本久久综合| av综合在线播放| 91在线看国产| 欧美色图一区二区三区| 欧美亚洲综合久久| 欧美区在线观看| 日韩一区二区三免费高清| 精品欧美乱码久久久久久| 久久综合狠狠综合久久激情| 欧美国产精品久久| 亚洲欧美日本韩国| 亚洲一区二区三区精品在线| 日韩电影免费在线| 国产在线一区观看| 日韩精品一区国产麻豆| 久久久久久99久久久精品网站| 久久久久久久免费视频了| 国产精品第一页第二页第三页| 亚洲婷婷综合久久一本伊一区| 亚洲一区在线播放| 日本伊人午夜精品| 国产乱码一区二区三区| 99r精品视频| 欧美久久久久久蜜桃| 精品电影一区二区三区 | 洋洋av久久久久久久一区| 亚洲国产精品精华液网站 | 国产一区二区三区综合| 成人黄色在线看| 欧美精品免费视频| 国产婷婷色一区二区三区在线| 亚洲精品免费电影| 久久国内精品自在自线400部| 成人午夜av在线| 在线91免费看| 国产精品毛片a∨一区二区三区| 一区二区三区中文字幕电影| 精品一区二区三区在线观看国产| 国产成a人亚洲| 欧美精品高清视频| 日本一区二区久久| 天天综合色天天综合色h| 国产精品123| 宅男噜噜噜66一区二区66| 国产日韩欧美不卡| 日韩va欧美va亚洲va久久| 高清国产一区二区三区| 欧美一级一级性生活免费录像| 国产精品欧美一区喷水| 美女脱光内衣内裤视频久久影院| 成人精品小蝌蚪| 精品久久人人做人人爰| 一区二区三区.www| 波多野结衣中文字幕一区| 制服.丝袜.亚洲.另类.中文| 亚洲日本丝袜连裤袜办公室| 狠狠色伊人亚洲综合成人| 欧美少妇bbb| 亚洲欧美日韩在线不卡| 国产成人综合在线播放| 欧美一区二区三区视频在线观看 | 国产日韩欧美一区二区三区乱码 | 色悠久久久久综合欧美99| 国产亚洲欧美日韩日本| 日本特黄久久久高潮| 91成人网在线| 国产精品日日摸夜夜摸av| 国产一区二区三区免费| 欧美一区二区视频在线观看2020| 一区二区三区欧美亚洲| av一区二区不卡| 国产三级一区二区三区| 精品一区二区成人精品| 91精品国产综合久久香蕉的特点| 一区二区在线免费| 一本色道综合亚洲| 亚洲女同一区二区| 精品国产99国产精品| 美腿丝袜一区二区三区| 欧美欧美欧美欧美| 亚洲最新视频在线观看| 91女厕偷拍女厕偷拍高清| 国产精品久久久久久久久晋中 | 91精品一区二区三区在线观看| 亚洲自拍偷拍综合| 欧美在线啊v一区| 一区二区三区在线视频免费观看 | 日韩不卡一二三区| 欧美日韩国产小视频| 午夜精品福利一区二区蜜股av| 在线观看一区二区视频| 亚洲国产毛片aaaaa无费看| 欧美综合欧美视频| 亚洲国产视频网站| 欧美狂野另类xxxxoooo| 秋霞午夜鲁丝一区二区老狼| 欧美岛国在线观看| 国产xxx精品视频大全| 亚洲欧洲精品天堂一级| 91首页免费视频| 亚洲午夜精品17c| 91麻豆精品国产无毒不卡在线观看 | 国产91丝袜在线播放九色| 欧美国产日韩亚洲一区| 99久久精品情趣| 一区二区成人在线| 欧美福利一区二区| 激情综合色播五月| 国产免费观看久久| 91麻豆产精品久久久久久 | 蜜桃一区二区三区在线| 日韩精品中文字幕一区二区三区| 国产一区二区三区香蕉 | 亚洲成人av福利| 亚洲精品一区二区三区影院| 成人av电影在线播放| 亚洲六月丁香色婷婷综合久久| 欧美日韩成人综合在线一区二区| 狠狠v欧美v日韩v亚洲ⅴ| 国产精品国产三级国产普通话蜜臀 | 国产综合一区二区| 国产精品久久久久天堂| 欧美日韩视频专区在线播放|