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

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

?? jquant2.c

?? 支持各種柵格圖像和矢量圖像讀取的庫(kù)
?? C
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
    } else {      /* work left to right in this row */      dir = 1;      dir3 = 3;      errorptr = cquantize->fserrors; /* => entry before first real column */      cquantize->on_odd_row = TRUE; /* flip for next time */    }    /* Preset error values: no error propagated to first pixel from left */    cur0 = cur1 = cur2 = 0;    /* and no error propagated to row below yet */    belowerr0 = belowerr1 = belowerr2 = 0;    bpreverr0 = bpreverr1 = bpreverr2 = 0;    for (col = width; col > 0; col--) {      /* curN 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.       */      cur0 = RIGHT_SHIFT(cur0 + errorptr[dir3+0] + 8, 4);      cur1 = RIGHT_SHIFT(cur1 + errorptr[dir3+1] + 8, 4);      cur2 = RIGHT_SHIFT(cur2 + errorptr[dir3+2] + 8, 4);      /* Limit the error using transfer function set by init_error_limit.       * See comments with init_error_limit for rationale.       */      cur0 = error_limit[cur0];      cur1 = error_limit[cur1];      cur2 = error_limit[cur2];      /* Form pixel value + error, and range-limit to 0..MAXJSAMPLE.       * The maximum error is +- MAXJSAMPLE (or less with error limiting);       * this sets the required size of the range_limit array.       */      cur0 += GETJSAMPLE(inptr[0]);      cur1 += GETJSAMPLE(inptr[1]);      cur2 += GETJSAMPLE(inptr[2]);      cur0 = GETJSAMPLE(range_limit[cur0]);      cur1 = GETJSAMPLE(range_limit[cur1]);      cur2 = GETJSAMPLE(range_limit[cur2]);      /* Index into the cache with adjusted pixel value */      cachep = & histogram[cur0>>C0_SHIFT][cur1>>C1_SHIFT][cur2>>C2_SHIFT];      /* If we have not seen this color before, find nearest colormap */      /* entry and update the cache */      if (*cachep == 0)	fill_inverse_cmap(cinfo, cur0>>C0_SHIFT,cur1>>C1_SHIFT,cur2>>C2_SHIFT);      /* Now emit the colormap index for this cell */      { register int pixcode = *cachep - 1;	*outptr = (JSAMPLE) pixcode;	/* Compute representation error for this pixel */	cur0 -= GETJSAMPLE(colormap0[pixcode]);	cur1 -= GETJSAMPLE(colormap1[pixcode]);	cur2 -= GETJSAMPLE(colormap2[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.       */      { register LOCFSERROR bnexterr, delta;	bnexterr = cur0;	/* Process component 0 */	delta = cur0 * 2;	cur0 += delta;		/* form error * 3 */	errorptr[0] = (FSERROR) (bpreverr0 + cur0);	cur0 += delta;		/* form error * 5 */	bpreverr0 = belowerr0 + cur0;	belowerr0 = bnexterr;	cur0 += delta;		/* form error * 7 */	bnexterr = cur1;	/* Process component 1 */	delta = cur1 * 2;	cur1 += delta;		/* form error * 3 */	errorptr[1] = (FSERROR) (bpreverr1 + cur1);	cur1 += delta;		/* form error * 5 */	bpreverr1 = belowerr1 + cur1;	belowerr1 = bnexterr;	cur1 += delta;		/* form error * 7 */	bnexterr = cur2;	/* Process component 2 */	delta = cur2 * 2;	cur2 += delta;		/* form error * 3 */	errorptr[2] = (FSERROR) (bpreverr2 + cur2);	cur2 += delta;		/* form error * 5 */	bpreverr2 = belowerr2 + cur2;	belowerr2 = bnexterr;	cur2 += delta;		/* form error * 7 */      }      /* At this point curN 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.       */      inptr += dir3;		/* Advance pixel pointers to next column */      outptr += dir;      errorptr += dir3;		/* advance errorptr to current column */    }    /* Post-loop cleanup: we must unload the final error values into the     * final fserrors[] entry.  Note we need not unload belowerrN because     * it is for the dummy column before or after the actual array.     */    errorptr[0] = (FSERROR) bpreverr0; /* unload prev errs into array */    errorptr[1] = (FSERROR) bpreverr1;    errorptr[2] = (FSERROR) bpreverr2;  }}/* * Initialize the error-limiting transfer function (lookup table). * The raw F-S error computation can potentially compute error values of up to * +- MAXJSAMPLE.  But we want the maximum correction applied to a pixel to be * much less, otherwise obviously wrong pixels will be created.  (Typical * effects include weird fringes at color-area boundaries, isolated bright * pixels in a dark area, etc.)  The standard advice for avoiding this problem * is to ensure that the "corners" of the color cube are allocated as output * colors; then repeated errors in the same direction cannot cause cascading * error buildup.  However, that only prevents the error from getting * completely out of hand; Aaron Giles reports that error limiting improves * the results even with corner colors allocated. * A simple clamping of the error values to about +- MAXJSAMPLE/8 works pretty * well, but the smoother transfer function used below is even better.  Thanks * to Aaron Giles for this idea. */LOCAL(void)init_error_limit (j_decompress_ptr cinfo)/* Allocate and fill in the error_limiter table */{  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;  int * table;  int in, out;  table = (int *) (*cinfo->mem->alloc_small)    ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE*2+1) * SIZEOF(int));  table += MAXJSAMPLE;		/* so can index -MAXJSAMPLE .. +MAXJSAMPLE */  cquantize->error_limiter = table;#define STEPSIZE ((MAXJSAMPLE+1)/16)  /* Map errors 1:1 up to +- MAXJSAMPLE/16 */  out = 0;  for (in = 0; in < STEPSIZE; in++, out++) {    table[in] = out; table[-in] = -out;  }  /* Map errors 1:2 up to +- 3*MAXJSAMPLE/16 */  for (; in < STEPSIZE*3; in++, out += (in&1) ? 0 : 1) {    table[in] = out; table[-in] = -out;  }  /* Clamp the rest to final out value (which is (MAXJSAMPLE+1)/8) */  for (; in <= MAXJSAMPLE; in++) {    table[in] = out; table[-in] = -out;  }#undef STEPSIZE}/* * Finish up at the end of each pass. */METHODDEF(void)finish_pass1 (j_decompress_ptr cinfo){  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;  /* Select the representative colors and fill in cinfo->colormap */  cinfo->colormap = cquantize->sv_colormap;  select_colors(cinfo, cquantize->desired);  /* Force next pass to zero the color index table */  cquantize->needs_zeroed = TRUE;}METHODDEF(void)finish_pass2 (j_decompress_ptr cinfo){  /* no work */}/* * Initialize for each processing pass. */METHODDEF(void)start_pass_2_quant (j_decompress_ptr cinfo, boolean is_pre_scan){  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;  hist3d histogram = cquantize->histogram;  int i;  /* Only F-S dithering or no dithering is supported. */  /* If user asks for ordered dither, give him F-S. */  if (cinfo->dither_mode != JDITHER_NONE)    cinfo->dither_mode = JDITHER_FS;  if (is_pre_scan) {    /* Set up method pointers */    cquantize->pub.color_quantize = prescan_quantize;    cquantize->pub.finish_pass = finish_pass1;    cquantize->needs_zeroed = TRUE; /* Always zero histogram */  } else {    /* Set up method pointers */    if (cinfo->dither_mode == JDITHER_FS)      cquantize->pub.color_quantize = pass2_fs_dither;    else      cquantize->pub.color_quantize = pass2_no_dither;    cquantize->pub.finish_pass = finish_pass2;    /* Make sure color count is acceptable */    i = cinfo->actual_number_of_colors;    if (i < 1)      ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, 1);    if (i > MAXNUMCOLORS)      ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS);    if (cinfo->dither_mode == JDITHER_FS) {      size_t arraysize = (size_t) ((cinfo->output_width + 2) *				   (3 * SIZEOF(FSERROR)));      /* Allocate Floyd-Steinberg workspace if we didn't already. */      if (cquantize->fserrors == NULL)	cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large)	  ((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize);      /* Initialize the propagated errors to zero. */      jzero_far((void FAR *) cquantize->fserrors, arraysize);      /* Make the error-limit table if we didn't already. */      if (cquantize->error_limiter == NULL)	init_error_limit(cinfo);      cquantize->on_odd_row = FALSE;    }  }  /* Zero the histogram or inverse color map, if necessary */  if (cquantize->needs_zeroed) {    for (i = 0; i < HIST_C0_ELEMS; i++) {      jzero_far((void FAR *) histogram[i],		HIST_C1_ELEMS*HIST_C2_ELEMS * SIZEOF(histcell));    }    cquantize->needs_zeroed = FALSE;  }}/* * Switch to a new external colormap between output passes. */METHODDEF(void)new_color_map_2_quant (j_decompress_ptr cinfo){  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;  /* Reset the inverse color map */  cquantize->needs_zeroed = TRUE;}/* * Module initialization routine for 2-pass color quantization. */GLOBAL(void)jinit_2pass_quantizer (j_decompress_ptr cinfo){  my_cquantize_ptr cquantize;  int i;  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_2_quant;  cquantize->pub.new_color_map = new_color_map_2_quant;  cquantize->fserrors = NULL;	/* flag optional arrays not allocated */  cquantize->error_limiter = NULL;  /* Make sure jdmaster didn't give me a case I can't handle */  if (cinfo->out_color_components != 3)    ERREXIT(cinfo, JERR_NOTIMPL);  /* Allocate the histogram/inverse colormap storage */  cquantize->histogram = (hist3d) (*cinfo->mem->alloc_small)    ((j_common_ptr) cinfo, JPOOL_IMAGE, HIST_C0_ELEMS * SIZEOF(hist2d));  for (i = 0; i < HIST_C0_ELEMS; i++) {    cquantize->histogram[i] = (hist2d) (*cinfo->mem->alloc_large)      ((j_common_ptr) cinfo, JPOOL_IMAGE,       HIST_C1_ELEMS*HIST_C2_ELEMS * SIZEOF(histcell));  }  cquantize->needs_zeroed = TRUE; /* histogram is garbage now */  /* Allocate storage for the completed colormap, if required.   * We do this now since it is FAR storage and may affect   * the memory manager's space calculations.   */  if (cinfo->enable_2pass_quant) {    /* Make sure color count is acceptable */    int desired = cinfo->desired_number_of_colors;    /* Lower bound on # of colors ... somewhat arbitrary as long as > 0 */    if (desired < 8)      ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, 8);    /* Make sure colormap indexes can be represented by JSAMPLEs */    if (desired > MAXNUMCOLORS)      ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS);    cquantize->sv_colormap = (*cinfo->mem->alloc_sarray)      ((j_common_ptr) cinfo,JPOOL_IMAGE, (JDIMENSION) desired, (JDIMENSION) 3);    cquantize->desired = desired;  } else    cquantize->sv_colormap = NULL;  /* Only F-S dithering or no dithering is supported. */  /* If user asks for ordered dither, give him F-S. */  if (cinfo->dither_mode != JDITHER_NONE)    cinfo->dither_mode = JDITHER_FS;  /* Allocate Floyd-Steinberg workspace if necessary.   * This isn't really needed until pass 2, but again it is FAR storage.   * Although we will cope with a later change in dither_mode,   * we do not promise to honor max_memory_to_use if dither_mode changes.   */  if (cinfo->dither_mode == JDITHER_FS) {    cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large)      ((j_common_ptr) cinfo, JPOOL_IMAGE,       (size_t) ((cinfo->output_width + 2) * (3 * SIZEOF(FSERROR))));    /* Might as well create the error-limiting table too. */    init_error_limit(cinfo);  }}#endif /* QUANT_2PASS_SUPPORTED */

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久99精品国产91久久来源| 欧美电影免费观看高清完整版在线 | 久久婷婷久久一区二区三区| 亚洲一区国产视频| 51精品久久久久久久蜜臀| 日本一二三不卡| 91污在线观看| 国模套图日韩精品一区二区 | 天天操天天色综合| 国产一区二区中文字幕| 久久亚洲二区三区| www.亚洲国产| 午夜视黄欧洲亚洲| 欧美大尺度电影在线| 国产老女人精品毛片久久| 亚洲妇女屁股眼交7| 国产成人8x视频一区二区| 精品对白一区国产伦| 国精产品一区一区三区mba桃花| 日韩精品一区二区三区三区免费| 成人v精品蜜桃久久一区| 亚洲国产精品麻豆| 久久亚洲欧美国产精品乐播 | 色婷婷国产精品| 狠狠色狠狠色综合日日91app| 一区二区三区精品| 国产亚洲欧美色| 欧美一级在线视频| jlzzjlzz国产精品久久| 麻豆精品在线视频| 亚洲综合色婷婷| 亚洲三级在线看| 亚洲国产激情av| 欧美tickle裸体挠脚心vk| 欧美综合天天夜夜久久| 不卡电影免费在线播放一区| 亚洲一区二区三区不卡国产欧美| 久久久久久久久99精品| 欧美性色综合网| 欧美午夜片在线观看| 成人aa视频在线观看| 国产精品白丝av| 国产福利电影一区二区三区| 日本成人在线网站| 日韩电影在线观看一区| 五月激情综合色| 免费观看在线综合| 五月婷婷另类国产| 久久精品国产**网站演员| 婷婷丁香激情综合| 美女久久久精品| 精品一区二区三区在线视频| 国产一区二区三区四| 国产不卡在线一区| 91电影在线观看| 欧美一区二区三区视频| 久久天堂av综合合色蜜桃网| 国产精品夫妻自拍| 亚洲综合另类小说| 久国产精品韩国三级视频| 国产美女精品一区二区三区| 成人综合在线观看| 欧美伊人久久久久久久久影院| 欧美日韩一二三区| 亚洲综合区在线| 午夜电影网一区| 亚洲国产精品精华液网站| 亚洲人成网站色在线观看| 麻豆精品一二三| 欧洲中文字幕精品| 欧美精品一区二区三区久久久| 亚洲欧美日韩久久| 国产东北露脸精品视频| 欧美性猛片xxxx免费看久爱| 欧美电视剧在线看免费| 国产精品丝袜91| 日本午夜精品视频在线观看| av网站一区二区三区| 精品国精品国产尤物美女| 国产欧美一区视频| 喷水一区二区三区| 日本二三区不卡| 中文字幕在线观看一区二区| 美腿丝袜在线亚洲一区| 91福利视频在线| 综合久久久久久| 丁香另类激情小说| 久久久精品日韩欧美| 国内偷窥港台综合视频在线播放| 欧美一区二区三区在线| 婷婷成人激情在线网| 91精品国产色综合久久不卡电影| 性做久久久久久久久| 日韩欧美国产一区在线观看| 日韩精品一级二级 | 99久久精品免费看国产| 久久婷婷久久一区二区三区| 喷水一区二区三区| 精品少妇一区二区三区视频免付费 | 亚洲午夜精品17c| 欧美精选午夜久久久乱码6080| 亚洲成人免费在线观看| 777色狠狠一区二区三区| 激情欧美一区二区三区在线观看| 欧美一区二区三区视频在线观看| 天天做天天摸天天爽国产一区| 欧美日韩在线播放| 日韩黄色免费网站| 国产喂奶挤奶一区二区三区| 国产精品主播直播| 亚洲美腿欧美偷拍| 欧美疯狂性受xxxxx喷水图片| 国产一区二区按摩在线观看| 亚洲欧美日韩在线播放| 欧美区一区二区三区| 国产成人亚洲综合a∨婷婷图片| 中文字幕一区在线观看视频| 777奇米四色成人影色区| 成人午夜精品在线| 一区二区三区精密机械公司| 精品国产一区二区三区av性色| caoporn国产精品| 欧美a一区二区| 亚洲色图视频网站| 精品久久人人做人人爽| 91九色最新地址| 成人午夜激情在线| 国产毛片精品视频| 亚洲综合999| 蜜桃一区二区三区在线| 国产精品欧美一区喷水| 欧美成人官网二区| 精品视频999| 色综合色综合色综合 | 亚洲一区二区三区四区在线观看| 久久精品日产第一区二区三区高清版| 在线免费视频一区二区| 成人99免费视频| 成人高清av在线| 国产成人精品免费在线| 美女精品自拍一二三四| 视频在线观看一区| 亚洲一区二区在线免费看| 中文字幕中文字幕中文字幕亚洲无线| 国产片一区二区| 亚洲同性同志一二三专区| 最新欧美精品一区二区三区| 日本一区二区三区四区在线视频| 精品国产欧美一区二区| 精品日韩成人av| 国产日韩欧美精品综合| 欧美一区二区三区成人| 欧美日韩一卡二卡三卡| 欧美三级三级三级| 91成人在线精品| 欧美视频一区二区三区四区| 色狠狠色狠狠综合| 一本色道a无线码一区v| aaa亚洲精品一二三区| 99久久婷婷国产综合精品电影| 欧美视频日韩视频| 欧美高清性hdvideosex| 欧美白人最猛性xxxxx69交| 精品毛片乱码1区2区3区| 日韩欧美一二三四区| 久久久久久久久蜜桃| 亚洲影院理伦片| 国产精品99久久久久久宅男| 色就色 综合激情| 亚洲精品在线观看网站| 亚洲国产精品一区二区久久| 国产麻豆视频一区二区| 91黄色激情网站| 国产精品色婷婷| 久久精品久久精品| 91在线观看免费视频| 久久香蕉国产线看观看99| 亚洲美女视频在线观看| 国产另类ts人妖一区二区| 欧美日本高清视频在线观看| 欧美高清在线视频| 激情文学综合网| 欧美喷水一区二区| 亚洲视频一区在线观看| 国内精品久久久久影院薰衣草| 欧美日韩亚洲综合在线| 亚洲欧美电影一区二区| 国产99久久久国产精品潘金网站| 91麻豆精品国产91久久久久久久久| 亚洲美女在线国产| 99久久综合狠狠综合久久| 国产精品乱码一区二区三区软件| 韩国v欧美v亚洲v日本v| 26uuu精品一区二区三区四区在线| 免费的国产精品| 欧美videos中文字幕| 韩国精品一区二区| 国产免费久久精品| 99久久99久久综合| 亚洲乱码中文字幕|