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

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

?? jquant1.c

?? 一款最完整的工業(yè)組態(tài)軟源代碼
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
  JSAMPROW colorindex0 = cquantize->colorindex[0];
  JSAMPROW colorindex1 = cquantize->colorindex[1];
  JSAMPROW colorindex2 = cquantize->colorindex[2];
  int * dither0;		/* points to active row of dither matrix */
  int * dither1;
  int * dither2;
  int row_index, col_index;	/* current indexes into dither matrix */
  int row;
  JDIMENSION col;
  JDIMENSION width = cinfo->output_width;

  for (row = 0; row < num_rows; row++) {
    row_index = cquantize->row_index;
    input_ptr = input_buf[row];
    output_ptr = output_buf[row];
    dither0 = cquantize->odither[0][row_index];
    dither1 = cquantize->odither[1][row_index];
    dither2 = cquantize->odither[2][row_index];
    col_index = 0;

    for (col = width; col > 0; col--) {
      pixcode  = GETJSAMPLE(colorindex0[GETJSAMPLE(*input_ptr++) +
					dither0[col_index]]);
      pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*input_ptr++) +
					dither1[col_index]]);
      pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*input_ptr++) +
					dither2[col_index]]);
      *output_ptr++ = (JSAMPLE) pixcode;
      col_index = (col_index + 1) & ODITHER_MASK;
    }
    row_index = (row_index + 1) & ODITHER_MASK;
    cquantize->row_index = row_index;
  }
}


METHODDEF(void)
quantize_fs_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
		    JSAMPARRAY output_buf, int num_rows)
/* General case, with Floyd-Steinberg dithering */
{
  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
  register LOCFSERROR cur;	/* current error or pixel value */
  LOCFSERROR belowerr;		/* error for pixel below cur */
  LOCFSERROR bpreverr;		/* error for below/prev col */
  LOCFSERROR bnexterr;		/* error for below/next col */
  LOCFSERROR delta;
  register FSERRPTR errorptr;	/* => fserrors[] at column before current */
  register JSAMPROW input_ptr;
  register JSAMPROW output_ptr;
  JSAMPROW colorindex_ci;
  JSAMPROW colormap_ci;
  int pixcode;
  int nc = cinfo->out_color_components;
  int dir;			/* 1 for left-to-right, -1 for right-to-left */
  int dirnc;			/* dir * nc */
  int ci;
  int row;
  JDIMENSION col;
  JDIMENSION width = cinfo->output_width;
  JSAMPLE *range_limit = cinfo->sample_range_limit;
  SHIFT_TEMPS

  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)));
    for (ci = 0; ci < nc; ci++) {
      input_ptr = input_buf[row] + ci;
      output_ptr = output_buf[row];
      if (cquantize->on_odd_row) {
	/* work right to left in this row */
	input_ptr += (width-1) * nc; /* so point to rightmost pixel */
	output_ptr += width-1;
	dir = -1;
	dirnc = -nc;
	errorptr = cquantize->fserrors[ci] + (width+1); /* => entry after last column */
      } else {
	/* work left to right in this row */
	dir = 1;
	dirnc = nc;
	errorptr = cquantize->fserrors[ci]; /* => entry before first column */
      }
      colorindex_ci = cquantize->colorindex[ci];
      colormap_ci = cquantize->sv_colormap[ci];
      /* Preset error values: no error propagated to first pixel from left */
      cur = 0;
      /* and no error propagated to row below yet */
      belowerr = bpreverr = 0;

      for (col = width; col > 0; col--) {
	/* cur holds the error propagated from the previous pixel on the
	 * current line.  Add the error propagated from the previous line
	 * to form the complete error correction term for this pixel, and
	 * round the error term (which is expressed * 16) to an integer.
	 * RIGHT_SHIFT rounds towards minus infinity, so adding 8 is correct
	 * for either sign of the error value.
	 * Note: errorptr points to *previous* column's array entry.
	 */
	cur = RIGHT_SHIFT(cur + errorptr[dir] + 8, 4);
	/* Form pixel value + error, and range-limit to 0..MAXJSAMPLE.
	 * The maximum error is +- MAXJSAMPLE; this sets the required size
	 * of the range_limit array.
	 */
	cur += GETJSAMPLE(*input_ptr);
	cur = GETJSAMPLE(range_limit[cur]);
	/* Select output value, accumulate into output code for this pixel */
	pixcode = GETJSAMPLE(colorindex_ci[cur]);
	*output_ptr += (JSAMPLE) pixcode;
	/* Compute actual representation error at this pixel */
	/* Note: we can do this even though we don't have the final */
	/* pixel code, because the colormap is orthogonal. */
	cur -= GETJSAMPLE(colormap_ci[pixcode]);
	/* Compute error fractions to be propagated to adjacent pixels.
	 * Add these into the running sums, and simultaneously shift the
	 * next-line error sums left by 1 column.
	 */
	bnexterr = cur;
	delta = cur * 2;
	cur += delta;		/* form error * 3 */
	errorptr[0] = (FSERROR) (bpreverr + cur);
	cur += delta;		/* form error * 5 */
	bpreverr = belowerr + cur;
	belowerr = bnexterr;
	cur += delta;		/* form error * 7 */
	/* At this point cur contains the 7/16 error value to be propagated
	 * to the next pixel on the current line, and all the errors for the
	 * next line have been shifted over. We are therefore ready to move on.
	 */
	input_ptr += dirnc;	/* advance input ptr to next column */
	output_ptr += dir;	/* advance output ptr to next column */
	errorptr += dir;	/* advance errorptr to current column */
      }
      /* Post-loop cleanup: we must unload the final error value into the
       * final fserrors[] entry.  Note we need not unload belowerr because
       * it is for the dummy column before or after the actual array.
       */
      errorptr[0] = (FSERROR) bpreverr; /* unload prev err into array */
    }
    cquantize->on_odd_row = (cquantize->on_odd_row ? FALSE : TRUE);
  }
}


/*
 * Allocate workspace for Floyd-Steinberg errors.
 */

LOCAL(void)
alloc_fs_workspace (j_decompress_ptr cinfo)
{
  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
  size_t arraysize;
  int i;

  arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR));
  for (i = 0; i < cinfo->out_color_components; i++) {
    cquantize->fserrors[i] = (FSERRPTR)
      (*cinfo->mem->alloc_large)((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize);
  }
}


/*
 * Initialize for one-pass color quantization.
 */

METHODDEF(void)
start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
{
  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
  size_t arraysize;
  int i;

  /* Install my colormap. */
  cinfo->colormap = cquantize->sv_colormap;
  cinfo->actual_number_of_colors = cquantize->sv_actual;

  /* Initialize for desired dithering mode. */
  switch (cinfo->dither_mode) {
  case JDITHER_NONE:
    if (cinfo->out_color_components == 3)
      cquantize->pub.color_quantize = color_quantize3;
    else
      cquantize->pub.color_quantize = color_quantize;
    break;
  case JDITHER_ORDERED:
    if (cinfo->out_color_components == 3)
      cquantize->pub.color_quantize = quantize3_ord_dither;
    else
      cquantize->pub.color_quantize = quantize_ord_dither;
    cquantize->row_index = 0;	/* initialize state for ordered dither */
    /* If user changed to ordered dither from another mode,
     * we must recreate the color index table with padding.
     * This will cost extra space, but probably isn't very likely.
     */
    if (! cquantize->is_padded)
      create_colorindex(cinfo);
    /* Create ordered-dither tables if we didn't already. */
    if (cquantize->odither[0] == NULL)
      create_odither_tables(cinfo);
    break;
  case JDITHER_FS:
    cquantize->pub.color_quantize = quantize_fs_dither;
    cquantize->on_odd_row = FALSE; /* initialize state for F-S dither */
    /* Allocate Floyd-Steinberg workspace if didn't already. */
    if (cquantize->fserrors[0] == NULL)
      alloc_fs_workspace(cinfo);
    /* Initialize the propagated errors to zero. */
    arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR));
    for (i = 0; i < cinfo->out_color_components; i++)
      jzero_far((void FAR *) cquantize->fserrors[i], arraysize);
    break;
  default:
    ERREXIT(cinfo, JERR_NOT_COMPILED);
    break;
  }
}


/*
 * Finish up at the end of the pass.
 */

METHODDEF(void)
finish_pass_1_quant (j_decompress_ptr cinfo)
{
  /* no work in 1-pass case */
}


/*
 * Switch to a new external colormap between output passes.
 * Shouldn't get to this module!
 */

METHODDEF(void)
new_color_map_1_quant (j_decompress_ptr cinfo)
{
  ERREXIT(cinfo, JERR_MODE_CHANGE);
}


/*
 * Module initialization routine for 1-pass color quantization.
 */

GLOBAL(void)
jinit_1pass_quantizer (j_decompress_ptr cinfo)
{
  my_cquantize_ptr cquantize;

  cquantize = (my_cquantize_ptr)
    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
				SIZEOF(my_cquantizer));
  cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize;
  cquantize->pub.start_pass = start_pass_1_quant;
  cquantize->pub.finish_pass = finish_pass_1_quant;
  cquantize->pub.new_color_map = new_color_map_1_quant;
  cquantize->fserrors[0] = NULL; /* Flag FS workspace not allocated */
  cquantize->odither[0] = NULL;	/* Also flag odither arrays not allocated */

  /* Make sure my internal arrays won't overflow */
  if (cinfo->out_color_components > MAX_Q_COMPS)
    ERREXIT1(cinfo, JERR_QUANT_COMPONENTS, MAX_Q_COMPS);
  /* Make sure colormap indexes can be represented by JSAMPLEs */
  if (cinfo->desired_number_of_colors > (MAXJSAMPLE+1))
    ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXJSAMPLE+1);

  /* Create the colormap and color index table. */
  create_colormap(cinfo);
  create_colorindex(cinfo);

  /* Allocate Floyd-Steinberg workspace now if requested.
   * We do this now since it is FAR storage and may affect the memory
   * manager's space calculations.  If the user changes to FS dither
   * mode in a later pass, we will allocate the space then, and will
   * possibly overrun the max_memory_to_use setting.
   */
  if (cinfo->dither_mode == JDITHER_FS)
    alloc_fs_workspace(cinfo);
}

#endif /* QUANT_1PASS_SUPPORTED */

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美视频一区二区三区在线观看| 在线观看国产一区二区| 亚洲欧美成人一区二区三区| 91.成人天堂一区| 成人小视频在线| 欧美aaaaa成人免费观看视频| 国产精品久久久久影院亚瑟| 日韩视频在线永久播放| 在线观看视频一区| 精品一区二区三区视频在线观看| 一区二区三区精品视频在线| 欧美精品一区二区三| 欧美日韩亚洲综合在线 | 亚洲欧美日韩中文字幕一区二区三区 | 蜜桃视频第一区免费观看| 亚洲欧美中日韩| 精品国产凹凸成av人导航| 欧美日韩电影在线播放| av在线不卡免费看| 国内精品视频666| 日韩精品一级二级| 一区二区三区日本| 国产精品久久久久影院亚瑟| 久久精品水蜜桃av综合天堂| 5858s免费视频成人| 91高清视频在线| 99视频在线精品| 成人午夜在线视频| 国产精品香蕉一区二区三区| 免费精品视频在线| 日本在线播放一区二区三区| 亚洲国产一区视频| 亚洲精品伦理在线| 亚洲精品伦理在线| 一区二区三区久久久| 亚洲免费观看高清完整版在线观看| 久久精品日韩一区二区三区| 精品福利二区三区| wwww国产精品欧美| 精品少妇一区二区三区日产乱码| 91精品久久久久久久91蜜桃| 欧美中文字幕一区| 在线观看日韩国产| 欧洲精品中文字幕| 欧美三级资源在线| 欧美日韩国产免费| 欧美久久久久久久久中文字幕| 88在线观看91蜜桃国自产| 欧美三级视频在线观看| 欧美情侣在线播放| 在线成人高清不卡| 日韩你懂的电影在线观看| 精品国产91久久久久久久妲己 | 亚洲综合一二区| 亚洲国产精品一区二区www| 一区二区欧美国产| 亚洲午夜成aⅴ人片| 日韩国产高清在线| 九一九一国产精品| 国产精一品亚洲二区在线视频| 粉嫩一区二区三区在线看| 91一区二区三区在线播放| 欧美自拍丝袜亚洲| 日韩欧美三级在线| 中文字幕欧美日韩一区| 亚洲欧洲综合另类| 婷婷六月综合亚洲| 国产伦精品一区二区三区视频青涩| 国产成人免费9x9x人网站视频| 成人激情校园春色| 欧美三级午夜理伦三级中视频| 精品免费99久久| 中文在线免费一区三区高中清不卡| 成人免费在线观看入口| 亚洲.国产.中文慕字在线| 久久精品99国产精品| 成人高清免费观看| 欧美日韩免费观看一区二区三区 | 欧美亚洲综合另类| 日韩欧美中文字幕精品| 中文字幕av不卡| 亚瑟在线精品视频| 国产精品69毛片高清亚洲| 一本大道久久精品懂色aⅴ| 91精品国产综合久久精品图片| 国产日韩影视精品| 亚洲第一av色| 国产.欧美.日韩| 欧美日韩精品一区二区三区蜜桃| 国产亚洲精品中文字幕| 亚洲国产美女搞黄色| 国产乱码精品一区二区三区av| 在线观看欧美日本| 国产午夜精品在线观看| 亚洲chinese男男1069| 成人免费视频免费观看| 欧美影视一区二区三区| 国产日韩欧美精品综合| 日韩一区精品视频| 99久免费精品视频在线观看| 日韩三级伦理片妻子的秘密按摩| 中文字幕一区二区三区不卡在线| 日韩成人av影视| 色综合天天狠狠| www日韩大片| 五月天国产精品| 99re免费视频精品全部| 久久一日本道色综合| 午夜精品免费在线观看| av一区二区久久| 精品久久国产老人久久综合| 亚洲国产精品久久一线不卡| 不卡电影一区二区三区| 久久精品视频在线免费观看| 麻豆精品在线播放| 欧美剧情电影在线观看完整版免费励志电影 | 国产精品自拍三区| 日韩欧美一区中文| 亚洲国产精品嫩草影院| 91年精品国产| 中文字幕不卡在线| 国产一区二区三区四| 欧美一区二区三区日韩视频| 亚洲一区二区视频在线| av资源网一区| 国产日产欧美一区二区三区| 日本vs亚洲vs韩国一区三区二区| 欧美日韩高清一区二区不卡| 一区二区三区中文字幕| 91啪亚洲精品| 一区精品在线播放| av一二三不卡影片| 国产精品网曝门| 国产 日韩 欧美大片| 日本一区二区免费在线| 国产乱码精品一区二区三区五月婷| 欧美不卡一二三| 久久99久久久欧美国产| 精品国产精品网麻豆系列| 久久国产生活片100| 精品国产人成亚洲区| 极品瑜伽女神91| 久久久久久一二三区| 高清视频一区二区| 欧美国产日韩精品免费观看| 成人一区二区三区视频| 国产精品美日韩| 91香蕉视频在线| 一区二区三区中文字幕精品精品| 欧美视频一区在线观看| 日韩高清不卡在线| 91精品午夜视频| 狠狠久久亚洲欧美| 国产亚洲欧美日韩俺去了| 成人激情免费电影网址| 亚洲精品自拍动漫在线| 欧美三区在线视频| 美国毛片一区二区| 国产清纯美女被跳蛋高潮一区二区久久w | 亚洲欧美成aⅴ人在线观看| 在线观看免费视频综合| 免费观看在线综合| 国产色产综合色产在线视频| 不卡欧美aaaaa| 亚洲成人中文在线| 精品伦理精品一区| 成人一区在线看| 亚洲综合成人在线| 欧美电影免费观看完整版| 国产精品91一区二区| 一区二区成人在线观看| 日韩欧美电影一区| 成人一级片在线观看| 亚洲国产日韩一区二区| 精品国精品国产尤物美女| 成人av免费观看| 亚洲电影一级片| 久久精品视频一区二区| 在线观看日产精品| 激情欧美日韩一区二区| 成人免费一区二区三区在线观看| 欧美三区在线观看| 国产激情一区二区三区| 亚洲国产成人av好男人在线观看| 国产亚洲一区二区三区在线观看 | 精品国产91乱码一区二区三区| av一区二区三区| 伦理电影国产精品| 1区2区3区国产精品| 日韩欧美资源站| 色综合久久综合| 国产一本一道久久香蕉| 亚洲国产aⅴ天堂久久| 国产免费观看久久| 欧美久久久影院| 99久久er热在这里只有精品15| 美女视频免费一区| 亚洲已满18点击进入久久| 国产欧美1区2区3区| 7777精品伊人久久久大香线蕉的|