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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? jquant1.c

?? About JPEG, executable on Visual C++
?? C
?? 第 1 頁 / 共 3 頁
字號(hào):
{
  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
  JSAMPARRAY colormap;		/* Created colormap */
  int total_colors;		/* Number of distinct output colors */
  int i,j,k, nci, blksize, blkdist, ptr, val;

  /* Select number of colors for each component */
  total_colors = select_ncolors(cinfo, cquantize->Ncolors);

  /* Report selected color counts */
  if (cinfo->out_color_components == 3)
    TRACEMS4(cinfo, 1, JTRC_QUANT_3_NCOLORS,
	     total_colors, cquantize->Ncolors[0],
	     cquantize->Ncolors[1], cquantize->Ncolors[2]);
  else
    TRACEMS1(cinfo, 1, JTRC_QUANT_NCOLORS, total_colors);

  /* Allocate and fill in the colormap. */
  /* The colors are ordered in the map in standard row-major order, */
  /* i.e. rightmost (highest-indexed) color changes most rapidly. */

  colormap = (*cinfo->mem->alloc_sarray)
    ((j_common_ptr) cinfo, JPOOL_IMAGE,
     (JDIMENSION) total_colors, (JDIMENSION) cinfo->out_color_components);

  /* blksize is number of adjacent repeated entries for a component */
  /* blkdist is distance between groups of identical entries for a component */
  blkdist = total_colors;

  for (i = 0; i < cinfo->out_color_components; i++) {
    /* fill in colormap entries for i'th color component */
    nci = cquantize->Ncolors[i]; /* # of distinct values for this color */
    blksize = blkdist / nci;
    for (j = 0; j < nci; j++) {
      /* Compute j'th output value (out of nci) for component */
      val = output_value(cinfo, i, j, nci-1);
      /* Fill in all colormap entries that have this value of this component */
      for (ptr = j * blksize; ptr < total_colors; ptr += blkdist) {
	/* fill in blksize entries beginning at ptr */
	for (k = 0; k < blksize; k++)
	  colormap[i][ptr+k] = (JSAMPLE) val;
      }
    }
    blkdist = blksize;		/* blksize of this color is blkdist of next */
  }

  /* Save the colormap in private storage,
   * where it will survive color quantization mode changes.
   */
  cquantize->sv_colormap = colormap;
  cquantize->sv_actual = total_colors;
}


/*
 * Create the color index table.
 */

LOCAL(void)
create_colorindex (j_decompress_ptr cinfo)
{
  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
  JSAMPROW indexptr;
  int i,j,k, nci, blksize, val, pad;

  /* For ordered dither, we pad the color index tables by MAXJSAMPLE in
   * each direction (input index values can be -MAXJSAMPLE .. 2*MAXJSAMPLE).
   * This is not necessary in the other dithering modes.  However, we
   * flag whether it was done in case user changes dithering mode.
   */
  if (cinfo->dither_mode == JDITHER_ORDERED) {
    pad = MAXJSAMPLE*2;
    cquantize->is_padded = TRUE;
  } else {
    pad = 0;
    cquantize->is_padded = FALSE;
  }

  cquantize->colorindex = (*cinfo->mem->alloc_sarray)
    ((j_common_ptr) cinfo, JPOOL_IMAGE,
     (JDIMENSION) (MAXJSAMPLE+1 + pad),
     (JDIMENSION) cinfo->out_color_components);

  /* blksize is number of adjacent repeated entries for a component */
  blksize = cquantize->sv_actual;

  for (i = 0; i < cinfo->out_color_components; i++) {
    /* fill in colorindex entries for i'th color component */
    nci = cquantize->Ncolors[i]; /* # of distinct values for this color */
    blksize = blksize / nci;

    /* adjust colorindex pointers to provide padding at negative indexes. */
    if (pad)
      cquantize->colorindex[i] += MAXJSAMPLE;

    /* in loop, val = index of current output value, */
    /* and k = largest j that maps to current val */
    indexptr = cquantize->colorindex[i];
    val = 0;
    k = largest_input_value(cinfo, i, 0, nci-1);
    for (j = 0; j <= MAXJSAMPLE; j++) {
      while (j > k)		/* advance val if past boundary */
	k = largest_input_value(cinfo, i, ++val, nci-1);
      /* premultiply so that no multiplication needed in main processing */
      indexptr[j] = (JSAMPLE) (val * blksize);
    }
    /* Pad at both ends if necessary */
    if (pad)
      for (j = 1; j <= MAXJSAMPLE; j++) {
	indexptr[-j] = indexptr[0];
	indexptr[MAXJSAMPLE+j] = indexptr[MAXJSAMPLE];
      }
  }
}


/*
 * Create an ordered-dither array for a component having ncolors
 * distinct output values.
 */

LOCAL(ODITHER_MATRIX_PTR)
make_odither_array (j_decompress_ptr cinfo, int ncolors)
{
  ODITHER_MATRIX_PTR odither;
  int j,k;
  INT32 num,den;

  odither = (ODITHER_MATRIX_PTR)
    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
				SIZEOF(ODITHER_MATRIX));
  /* The inter-value distance for this color is MAXJSAMPLE/(ncolors-1).
   * Hence the dither value for the matrix cell with fill order f
   * (f=0..N-1) should be (N-1-2*f)/(2*N) * MAXJSAMPLE/(ncolors-1).
   * On 16-bit-int machine, be careful to avoid overflow.
   */
  den = 2 * ODITHER_CELLS * ((INT32) (ncolors - 1));
  for (j = 0; j < ODITHER_SIZE; j++) {
    for (k = 0; k < ODITHER_SIZE; k++) {
      num = ((INT32) (ODITHER_CELLS-1 - 2*((int)base_dither_matrix[j][k])))
	    * MAXJSAMPLE;
      /* Ensure round towards zero despite C's lack of consistency
       * about rounding negative values in integer division...
       */
      odither[j][k] = (int) (num<0 ? -((-num)/den) : num/den);
    }
  }
  return odither;
}


/*
 * Create the ordered-dither tables.
 * Components having the same number of representative colors may 
 * share a dither table.
 */

LOCAL(void)
create_odither_tables (j_decompress_ptr cinfo)
{
  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
  ODITHER_MATRIX_PTR odither;
  int i, j, nci;

  for (i = 0; i < cinfo->out_color_components; i++) {
    nci = cquantize->Ncolors[i]; /* # of distinct values for this color */
    odither = NULL;		/* search for matching prior component */
    for (j = 0; j < i; j++) {
      if (nci == cquantize->Ncolors[j]) {
	odither = cquantize->odither[j];
	break;
      }
    }
    if (odither == NULL)	/* need a new table? */
      odither = make_odither_array(cinfo, nci);
    cquantize->odither[i] = odither;
  }
}


/*
 * Map some rows of pixels to the output colormapped representation.
 */

METHODDEF(void)
color_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
		JSAMPARRAY output_buf, int num_rows)
/* General case, no dithering */
{
  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
  JSAMPARRAY colorindex = cquantize->colorindex;
  register int pixcode, ci;
  register JSAMPROW ptrin, ptrout;
  int row;
  JDIMENSION col;
  JDIMENSION width = cinfo->output_width;
  register int nc = cinfo->out_color_components;

  for (row = 0; row < num_rows; row++) {
    ptrin = input_buf[row];
    ptrout = output_buf[row];
    for (col = width; col > 0; col--) {
      pixcode = 0;
      for (ci = 0; ci < nc; ci++) {
	pixcode += GETJSAMPLE(colorindex[ci][GETJSAMPLE(*ptrin++)]);
      }
      *ptrout++ = (JSAMPLE) pixcode;
    }
  }
}


METHODDEF(void)
color_quantize3 (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
		 JSAMPARRAY output_buf, int num_rows)
/* Fast path for out_color_components==3, no dithering */
{
  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
  register int pixcode;
  register JSAMPROW ptrin, ptrout;
  JSAMPROW colorindex0 = cquantize->colorindex[0];
  JSAMPROW colorindex1 = cquantize->colorindex[1];
  JSAMPROW colorindex2 = cquantize->colorindex[2];
  int row;
  JDIMENSION col;
  JDIMENSION width = cinfo->output_width;

  for (row = 0; row < num_rows; row++) {
    ptrin = input_buf[row];
    ptrout = output_buf[row];
    for (col = width; col > 0; col--) {
      pixcode  = GETJSAMPLE(colorindex0[GETJSAMPLE(*ptrin++)]);
      pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*ptrin++)]);
      pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*ptrin++)]);
      *ptrout++ = (JSAMPLE) pixcode;
    }
  }
}


METHODDEF(void)
quantize_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
		     JSAMPARRAY output_buf, int num_rows)
/* General case, with ordered dithering */
{
  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
  register JSAMPROW input_ptr;
  register JSAMPROW output_ptr;
  JSAMPROW colorindex_ci;
  int * dither;			/* points to active row of dither matrix */
  int row_index, col_index;	/* current indexes into dither matrix */
  int nc = cinfo->out_color_components;
  int ci;
  int row;
  JDIMENSION col;
  JDIMENSION width = cinfo->output_width;

  for (row = 0; row < num_rows; row++) {
    /* Initialize output values to 0 so can process components separately */
    jzero_far((void FAR *) output_buf[row],
	      (size_t) (width * SIZEOF(JSAMPLE)));
    row_index = cquantize->row_index;
    for (ci = 0; ci < nc; ci++) {
      input_ptr = input_buf[row] + ci;
      output_ptr = output_buf[row];
      colorindex_ci = cquantize->colorindex[ci];
      dither = cquantize->odither[ci][row_index];
      col_index = 0;

      for (col = width; col > 0; col--) {
	/* Form pixel value + dither, range-limit to 0..MAXJSAMPLE,
	 * select output value, accumulate into output code for this pixel.
	 * Range-limiting need not be done explicitly, as we have extended
	 * the colorindex table to produce the right answers for out-of-range
	 * inputs.  The maximum dither is +- MAXJSAMPLE; this sets the
	 * required amount of padding.
	 */
	*output_ptr += colorindex_ci[GETJSAMPLE(*input_ptr)+dither[col_index]];
	input_ptr += nc;
	output_ptr++;
	col_index = (col_index + 1) & ODITHER_MASK;
      }
    }
    /* Advance row index for next row */
    row_index = (row_index + 1) & ODITHER_MASK;
    cquantize->row_index = row_index;
  }
}


METHODDEF(void)
quantize3_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品麻豆一区二区| 日韩一区二区三区电影| 国产福利精品一区| 久久国产三级精品| 天堂久久一区二区三区| 亚洲国产另类av| 伊人性伊人情综合网| 亚洲视频每日更新| 亚洲欧美一区二区久久| 一区二区三区欧美日| 亚洲精品视频免费观看| 亚洲国产精品欧美一二99| 亚洲线精品一区二区三区| 亚洲国产成人porn| 五月婷婷综合在线| 免费人成在线不卡| 黄色精品一二区| 国产不卡在线播放| 91亚洲精华国产精华精华液| 色综合天天做天天爱| 欧美无人高清视频在线观看| 欧美精品自拍偷拍| 精品国产乱码91久久久久久网站| 久久综合精品国产一区二区三区| 国产日韩欧美综合一区| 中文字幕一区三区| 日韩主播视频在线| 久久99精品国产.久久久久| 国产精品一区不卡| 91免费看`日韩一区二区| 欧美日韩精品综合在线| 日韩精品在线网站| 中文一区在线播放| 亚洲愉拍自拍另类高清精品| 免费人成网站在线观看欧美高清| 国产精品一品视频| 欧美视频中文一区二区三区在线观看 | 免费在线成人网| 国产成人av在线影院| 91福利资源站| 精品精品欲导航| 日韩美女啊v在线免费观看| 亚洲成va人在线观看| 国内精品在线播放| 色系网站成人免费| 精品国产一区二区三区四区四| 中文字幕av一区二区三区免费看 | 丝瓜av网站精品一区二区| 国产一区二区三区免费观看| 99精品久久久久久| 91精品国产麻豆| 1000精品久久久久久久久| 日韩精品一二三| 99综合影院在线| 日韩亚洲欧美一区| 一区二区三区中文字幕| 精品一区二区三区不卡| 欧美视频一区二区三区在线观看 | 亚洲精品国产a| 极品少妇xxxx精品少妇偷拍| 欧美吻胸吃奶大尺度电影 | 国产aⅴ综合色| 91麻豆精品国产91| 亚洲欧美激情插 | 欧美色老头old∨ideo| 亚洲国产精品成人综合色在线婷婷| 亚洲亚洲精品在线观看| 波多野结衣91| 亚洲精品在线观| 日本不卡123| 在线观看不卡一区| 国产精品美女久久久久久| 久久精品72免费观看| 欧美视频一区二区三区四区| 国产精品久久久久久久久久免费看 | 国产亚洲短视频| 欧美aaaaaa午夜精品| 欧美在线观看18| 国产精品家庭影院| 国产真实精品久久二三区| 91精品啪在线观看国产60岁| 一区二区三区欧美日韩| 不卡av在线网| 欧美激情在线一区二区三区| 国产一区二区三区视频在线播放| 91精品婷婷国产综合久久竹菊| 亚洲欧美一区二区三区久本道91 | 色噜噜狠狠色综合欧洲selulu| 国产欧美日韩综合| 国产精品2024| 久久综合丝袜日本网| 另类调教123区| 欧美一区二区三区四区久久 | 日本高清免费不卡视频| 亚洲欧洲日韩女同| 国产一区二区三区高清播放| 日韩视频免费直播| 日韩电影在线观看一区| 91精品国产综合久久小美女| 婷婷夜色潮精品综合在线| 在线视频观看一区| 亚洲超碰精品一区二区| 欧美日韩亚洲国产综合| 五月天中文字幕一区二区| 欧美日韩成人综合| 午夜精品福利一区二区三区av | 久久午夜电影网| 狠狠v欧美v日韩v亚洲ⅴ| 精品久久久久久久人人人人传媒| 麻豆视频一区二区| 精品美女一区二区| 国产精品一区二区在线看| 国产三级久久久| 成人的网站免费观看| 亚洲乱码国产乱码精品精98午夜| 一本大道久久a久久精二百| 亚洲国产一区二区三区| 欧美一区二区三区免费大片| 日本三级亚洲精品| 久久久久久9999| 成人精品gif动图一区| 亚洲三级在线播放| 欧美视频一区二区三区四区| 男人的天堂久久精品| 久久嫩草精品久久久久| 岛国av在线一区| 亚洲欧洲精品一区二区三区不卡 | 亚洲男人的天堂在线观看| 在线看一区二区| 免费在线一区观看| 国产亚洲一区二区三区四区 | 精品国产区一区| 成人手机电影网| 亚洲一区在线播放| 精品少妇一区二区三区在线播放| 成人毛片在线观看| 亚洲第一主播视频| 国产色一区二区| 在线观看日韩电影| 国产一区二区在线观看视频| 亚洲美女视频一区| 日韩欧美国产精品一区| 国产精品99久久久久久久vr| 亚洲精品免费电影| 日韩精品一区二区在线| 成人美女视频在线看| 日韩一区欧美二区| 日本一区二区电影| 欧美高清激情brazzers| 国产成人精品www牛牛影视| 一区二区三区美女视频| 2021国产精品久久精品| 94色蜜桃网一区二区三区| 首页国产丝袜综合| 中文字幕在线播放不卡一区| 日韩视频在线你懂得| 色天使色偷偷av一区二区| 激情图区综合网| 亚洲午夜在线电影| 亚洲国产精品成人久久综合一区| 欧美日韩国产综合久久| 国产精品一区二区久激情瑜伽| 亚洲成人久久影院| 欧美国产视频在线| 欧美一级搡bbbb搡bbbb| 99re热视频这里只精品| 国内一区二区在线| 亚州成人在线电影| ...av二区三区久久精品| 日韩欧美一级精品久久| 欧美性大战久久久久久久| 国产iv一区二区三区| 久久精品国产**网站演员| 亚洲一区二区四区蜜桃| 中文字幕在线观看一区| 久久亚洲一区二区三区四区| 欧美精品 国产精品| 91精彩视频在线观看| 成人免费va视频| 国内精品国产成人| 日本亚洲三级在线| 亚洲动漫第一页| 亚洲激情在线播放| 中文字幕在线免费不卡| 国产人成亚洲第一网站在线播放 | 亚洲v中文字幕| 亚洲欧美另类图片小说| 日本一区二区三区久久久久久久久不 | 国产成a人无v码亚洲福利| 久久9热精品视频| 午夜精品久久久久久久99水蜜桃 | 国产一区二区剧情av在线| 日韩精品一卡二卡三卡四卡无卡| 亚洲一区二区三区在线看| 亚洲乱码精品一二三四区日韩在线| 亚洲国产精品成人综合色在线婷婷 | 久久久欧美精品sm网站| 精品国产在天天线2019| 欧美岛国在线观看| 欧美大片免费久久精品三p|