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

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

?? jquant2.c

?? 支持各種柵格圖像和矢量圖像讀取的庫
?? C
?? 第 1 頁 / 共 4 頁
字號:
  int numcolors = cinfo->actual_number_of_colors;  int maxc0, maxc1, maxc2;  int centerc0, centerc1, centerc2;  int i, x, ncolors;  INT32 minmaxdist, min_dist, max_dist, tdist;  INT32 mindist[MAXNUMCOLORS];	/* min distance to colormap entry i */  /* Compute true coordinates of update box's upper corner and center.   * Actually we compute the coordinates of the center of the upper-corner   * histogram cell, which are the upper bounds of the volume we care about.   * Note that since ">>" rounds down, the "center" values may be closer to   * min than to max; hence comparisons to them must be "<=", not "<".   */  maxc0 = minc0 + ((1 << BOX_C0_SHIFT) - (1 << C0_SHIFT));  centerc0 = (minc0 + maxc0) >> 1;  maxc1 = minc1 + ((1 << BOX_C1_SHIFT) - (1 << C1_SHIFT));  centerc1 = (minc1 + maxc1) >> 1;  maxc2 = minc2 + ((1 << BOX_C2_SHIFT) - (1 << C2_SHIFT));  centerc2 = (minc2 + maxc2) >> 1;  /* For each color in colormap, find:   *  1. its minimum squared-distance to any point in the update box   *     (zero if color is within update box);   *  2. its maximum squared-distance to any point in the update box.   * Both of these can be found by considering only the corners of the box.   * We save the minimum distance for each color in mindist[];   * only the smallest maximum distance is of interest.   */  minmaxdist = 0x7FFFFFFFL;  for (i = 0; i < numcolors; i++) {    /* We compute the squared-c0-distance term, then add in the other two. */    x = GETJSAMPLE(cinfo->colormap[0][i]);    if (x < minc0) {      tdist = (x - minc0) * C0_SCALE;      min_dist = tdist*tdist;      tdist = (x - maxc0) * C0_SCALE;      max_dist = tdist*tdist;    } else if (x > maxc0) {      tdist = (x - maxc0) * C0_SCALE;      min_dist = tdist*tdist;      tdist = (x - minc0) * C0_SCALE;      max_dist = tdist*tdist;    } else {      /* within cell range so no contribution to min_dist */      min_dist = 0;      if (x <= centerc0) {	tdist = (x - maxc0) * C0_SCALE;	max_dist = tdist*tdist;      } else {	tdist = (x - minc0) * C0_SCALE;	max_dist = tdist*tdist;      }    }    x = GETJSAMPLE(cinfo->colormap[1][i]);    if (x < minc1) {      tdist = (x - minc1) * C1_SCALE;      min_dist += tdist*tdist;      tdist = (x - maxc1) * C1_SCALE;      max_dist += tdist*tdist;    } else if (x > maxc1) {      tdist = (x - maxc1) * C1_SCALE;      min_dist += tdist*tdist;      tdist = (x - minc1) * C1_SCALE;      max_dist += tdist*tdist;    } else {      /* within cell range so no contribution to min_dist */      if (x <= centerc1) {	tdist = (x - maxc1) * C1_SCALE;	max_dist += tdist*tdist;      } else {	tdist = (x - minc1) * C1_SCALE;	max_dist += tdist*tdist;      }    }    x = GETJSAMPLE(cinfo->colormap[2][i]);    if (x < minc2) {      tdist = (x - minc2) * C2_SCALE;      min_dist += tdist*tdist;      tdist = (x - maxc2) * C2_SCALE;      max_dist += tdist*tdist;    } else if (x > maxc2) {      tdist = (x - maxc2) * C2_SCALE;      min_dist += tdist*tdist;      tdist = (x - minc2) * C2_SCALE;      max_dist += tdist*tdist;    } else {      /* within cell range so no contribution to min_dist */      if (x <= centerc2) {	tdist = (x - maxc2) * C2_SCALE;	max_dist += tdist*tdist;      } else {	tdist = (x - minc2) * C2_SCALE;	max_dist += tdist*tdist;      }    }    mindist[i] = min_dist;	/* save away the results */    if (max_dist < minmaxdist)      minmaxdist = max_dist;  }  /* Now we know that no cell in the update box is more than minmaxdist   * away from some colormap entry.  Therefore, only colors that are   * within minmaxdist of some part of the box need be considered.   */  ncolors = 0;  for (i = 0; i < numcolors; i++) {    if (mindist[i] <= minmaxdist)      colorlist[ncolors++] = (JSAMPLE) i;  }  return ncolors;}LOCAL(void)find_best_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2,		  int numcolors, JSAMPLE colorlist[], JSAMPLE bestcolor[])/* Find the closest colormap entry for each cell in the update box, * given the list of candidate colors prepared by find_nearby_colors. * Return the indexes of the closest entries in the bestcolor[] array. * This routine uses Thomas' incremental distance calculation method to * find the distance from a colormap entry to successive cells in the box. */{  int ic0, ic1, ic2;  int i, icolor;  register INT32 * bptr;	/* pointer into bestdist[] array */  JSAMPLE * cptr;		/* pointer into bestcolor[] array */  INT32 dist0, dist1;		/* initial distance values */  register INT32 dist2;		/* current distance in inner loop */  INT32 xx0, xx1;		/* distance increments */  register INT32 xx2;  INT32 inc0, inc1, inc2;	/* initial values for increments */  /* This array holds the distance to the nearest-so-far color for each cell */  INT32 bestdist[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS];  /* Initialize best-distance for each cell of the update box */  bptr = bestdist;  for (i = BOX_C0_ELEMS*BOX_C1_ELEMS*BOX_C2_ELEMS-1; i >= 0; i--)    *bptr++ = 0x7FFFFFFFL;    /* For each color selected by find_nearby_colors,   * compute its distance to the center of each cell in the box.   * If that's less than best-so-far, update best distance and color number.   */    /* Nominal steps between cell centers ("x" in Thomas article) */#define STEP_C0  ((1 << C0_SHIFT) * C0_SCALE)#define STEP_C1  ((1 << C1_SHIFT) * C1_SCALE)#define STEP_C2  ((1 << C2_SHIFT) * C2_SCALE)    for (i = 0; i < numcolors; i++) {    icolor = GETJSAMPLE(colorlist[i]);    /* Compute (square of) distance from minc0/c1/c2 to this color */    inc0 = (minc0 - GETJSAMPLE(cinfo->colormap[0][icolor])) * C0_SCALE;    dist0 = inc0*inc0;    inc1 = (minc1 - GETJSAMPLE(cinfo->colormap[1][icolor])) * C1_SCALE;    dist0 += inc1*inc1;    inc2 = (minc2 - GETJSAMPLE(cinfo->colormap[2][icolor])) * C2_SCALE;    dist0 += inc2*inc2;    /* Form the initial difference increments */    inc0 = inc0 * (2 * STEP_C0) + STEP_C0 * STEP_C0;    inc1 = inc1 * (2 * STEP_C1) + STEP_C1 * STEP_C1;    inc2 = inc2 * (2 * STEP_C2) + STEP_C2 * STEP_C2;    /* Now loop over all cells in box, updating distance per Thomas method */    bptr = bestdist;    cptr = bestcolor;    xx0 = inc0;    for (ic0 = BOX_C0_ELEMS-1; ic0 >= 0; ic0--) {      dist1 = dist0;      xx1 = inc1;      for (ic1 = BOX_C1_ELEMS-1; ic1 >= 0; ic1--) {	dist2 = dist1;	xx2 = inc2;	for (ic2 = BOX_C2_ELEMS-1; ic2 >= 0; ic2--) {	  if (dist2 < *bptr) {	    *bptr = dist2;	    *cptr = (JSAMPLE) icolor;	  }	  dist2 += xx2;	  xx2 += 2 * STEP_C2 * STEP_C2;	  bptr++;	  cptr++;	}	dist1 += xx1;	xx1 += 2 * STEP_C1 * STEP_C1;      }      dist0 += xx0;      xx0 += 2 * STEP_C0 * STEP_C0;    }  }}LOCAL(void)fill_inverse_cmap (j_decompress_ptr cinfo, int c0, int c1, int c2)/* Fill the inverse-colormap entries in the update box that contains *//* histogram cell c0/c1/c2.  (Only that one cell MUST be filled, but *//* we can fill as many others as we wish.) */{  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;  hist3d histogram = cquantize->histogram;  int minc0, minc1, minc2;	/* lower left corner of update box */  int ic0, ic1, ic2;  register JSAMPLE * cptr;	/* pointer into bestcolor[] array */  register histptr cachep;	/* pointer into main cache array */  /* This array lists the candidate colormap indexes. */  JSAMPLE colorlist[MAXNUMCOLORS];  int numcolors;		/* number of candidate colors */  /* This array holds the actually closest colormap index for each cell. */  JSAMPLE bestcolor[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS];  /* Convert cell coordinates to update box ID */  c0 >>= BOX_C0_LOG;  c1 >>= BOX_C1_LOG;  c2 >>= BOX_C2_LOG;  /* Compute true coordinates of update box's origin corner.   * Actually we compute the coordinates of the center of the corner   * histogram cell, which are the lower bounds of the volume we care about.   */  minc0 = (c0 << BOX_C0_SHIFT) + ((1 << C0_SHIFT) >> 1);  minc1 = (c1 << BOX_C1_SHIFT) + ((1 << C1_SHIFT) >> 1);  minc2 = (c2 << BOX_C2_SHIFT) + ((1 << C2_SHIFT) >> 1);    /* Determine which colormap entries are close enough to be candidates   * for the nearest entry to some cell in the update box.   */  numcolors = find_nearby_colors(cinfo, minc0, minc1, minc2, colorlist);  /* Determine the actually nearest colors. */  find_best_colors(cinfo, minc0, minc1, minc2, numcolors, colorlist,		   bestcolor);  /* Save the best color numbers (plus 1) in the main cache array */  c0 <<= BOX_C0_LOG;		/* convert ID back to base cell indexes */  c1 <<= BOX_C1_LOG;  c2 <<= BOX_C2_LOG;  cptr = bestcolor;  for (ic0 = 0; ic0 < BOX_C0_ELEMS; ic0++) {    for (ic1 = 0; ic1 < BOX_C1_ELEMS; ic1++) {      cachep = & histogram[c0+ic0][c1+ic1][c2];      for (ic2 = 0; ic2 < BOX_C2_ELEMS; ic2++) {	*cachep++ = (histcell) (GETJSAMPLE(*cptr++) + 1);      }    }  }}/* * Map some rows of pixels to the output colormapped representation. */METHODDEF(void)pass2_no_dither (j_decompress_ptr cinfo,		 JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows)/* This version performs no dithering */{  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;  hist3d histogram = cquantize->histogram;  register JSAMPROW inptr, outptr;  register histptr cachep;  register int c0, c1, c2;  int row;  JDIMENSION col;  JDIMENSION width = cinfo->output_width;  for (row = 0; row < num_rows; row++) {    inptr = input_buf[row];    outptr = output_buf[row];    for (col = width; col > 0; col--) {      /* get pixel value and index into the cache */      c0 = GETJSAMPLE(*inptr++) >> C0_SHIFT;      c1 = GETJSAMPLE(*inptr++) >> C1_SHIFT;      c2 = GETJSAMPLE(*inptr++) >> C2_SHIFT;      cachep = & histogram[c0][c1][c2];      /* If we have not seen this color before, find nearest colormap entry */      /* and update the cache */      if (*cachep == 0)	fill_inverse_cmap(cinfo, c0,c1,c2);      /* Now emit the colormap index for this cell */      *outptr++ = (JSAMPLE) (*cachep - 1);    }  }}METHODDEF(void)pass2_fs_dither (j_decompress_ptr cinfo,		 JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows)/* This version performs Floyd-Steinberg dithering */{  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;  hist3d histogram = cquantize->histogram;  register LOCFSERROR cur0, cur1, cur2;	/* current error or pixel value */  LOCFSERROR belowerr0, belowerr1, belowerr2; /* error for pixel below cur */  LOCFSERROR bpreverr0, bpreverr1, bpreverr2; /* error for below/prev col */  register FSERRPTR errorptr;	/* => fserrors[] at column before current */  JSAMPROW inptr;		/* => current input pixel */  JSAMPROW outptr;		/* => current output pixel */  histptr cachep;  int dir;			/* +1 or -1 depending on direction */  int dir3;			/* 3*dir, for advancing inptr & errorptr */  int row;  JDIMENSION col;  JDIMENSION width = cinfo->output_width;  JSAMPLE *range_limit = cinfo->sample_range_limit;  int *error_limit = cquantize->error_limiter;  JSAMPROW colormap0 = cinfo->colormap[0];  JSAMPROW colormap1 = cinfo->colormap[1];  JSAMPROW colormap2 = cinfo->colormap[2];  SHIFT_TEMPS  for (row = 0; row < num_rows; row++) {    inptr = input_buf[row];    outptr = output_buf[row];    if (cquantize->on_odd_row) {      /* work right to left in this row */      inptr += (width-1) * 3;	/* so point to rightmost pixel */      outptr += width-1;      dir = -1;      dir3 = -3;      errorptr = cquantize->fserrors + (width+1)*3; /* => entry after last column */      cquantize->on_odd_row = FALSE; /* flip for next time */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲视频香蕉人妖| 久久精品亚洲一区二区三区浴池 | 玖玖九九国产精品| 色欧美88888久久久久久影院| 精品国产免费视频| 午夜精品免费在线| 色综合咪咪久久| 国产午夜精品久久久久久免费视| 午夜激情久久久| 色综合一区二区| 国产精品毛片久久久久久| 蜜桃精品视频在线| 欧美三级电影网| 国产精品美女久久久久aⅴ| 久久 天天综合| 欧美一区二区啪啪| 午夜精品一区二区三区三上悠亚| 99riav久久精品riav| 日本一区二区综合亚洲| 国内成人免费视频| 91精品国产麻豆| 丝瓜av网站精品一区二区| 色悠悠久久综合| 国产精品久久久久影院色老大| 黄色精品一二区| 精品久久五月天| 久久精品国产亚洲高清剧情介绍| 91精品国产日韩91久久久久久| 午夜影院在线观看欧美| 在线观看免费亚洲| 亚洲美女精品一区| youjizz久久| 成人欧美一区二区三区| 成a人片国产精品| 国产精品福利一区二区三区| 国产成人亚洲综合a∨猫咪| 国产亚洲精品精华液| 国产精品一区在线观看乱码| 日韩精品一区二区三区在线| 免费视频最近日韩| 欧美成人精精品一区二区频| 美腿丝袜亚洲三区| 精品国产乱码久久久久久1区2区| 极品少妇一区二区| 亚洲精品一区二区三区99| 激情图片小说一区| 国产欧美日韩在线| 成年人国产精品| 亚洲男人的天堂在线aⅴ视频| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 欧美日本乱大交xxxxx| 亚洲线精品一区二区三区| 欧美日韩在线播放一区| 午夜电影久久久| 日韩手机在线导航| 国产一区美女在线| 国产精品系列在线| 91毛片在线观看| 图片区日韩欧美亚洲| 日韩欧美精品在线| 国产69精品久久久久777| 国产精品久久久久桃色tv| 色婷婷综合久久久中文一区二区| 亚洲国产视频a| 日韩欧美成人午夜| 成人免费毛片片v| 亚洲蜜臀av乱码久久精品 | 成人国产在线观看| 亚洲激情网站免费观看| 欧美巨大另类极品videosbest | jlzzjlzz亚洲日本少妇| 一区二区视频在线| 91精品国产91久久综合桃花| 精品一区二区三区在线播放 | 欧美精品一区二| 成人开心网精品视频| 亚洲一区二区美女| 欧美电影免费观看完整版| 丁香啪啪综合成人亚洲小说| 精品一区二区国语对白| 久久精品水蜜桃av综合天堂| 91视频你懂的| 奇米精品一区二区三区在线观看一 | 国产精品一二三区在线| 亚洲欧洲制服丝袜| 91精品视频网| 成人毛片视频在线观看| 午夜精品久久久久久| 久久亚洲二区三区| 日本精品免费观看高清观看| 秋霞午夜鲁丝一区二区老狼| 国产精品乱码一区二三区小蝌蚪| 欧美日韩dvd在线观看| 国产99久久久国产精品潘金网站| 亚洲卡通动漫在线| 久久在线免费观看| 欧美视频三区在线播放| 国产精品18久久久| 天堂影院一区二区| 中文字幕一区二区三区在线观看| 欧美老人xxxx18| 99精品视频在线播放观看| 麻豆国产欧美日韩综合精品二区| 中文字幕视频一区| 精品国产一区a| 欧美日韩一区二区三区四区| 国产91高潮流白浆在线麻豆 | 国产精品久久久爽爽爽麻豆色哟哟| 欧美日韩dvd在线观看| 不卡大黄网站免费看| 麻豆精品久久久| 亚洲国产精品久久久久秋霞影院 | 精品久久久久久无| 欧美午夜精品久久久| 成人爱爱电影网址| 久久国内精品视频| 亚洲一区二区av电影| 国产欧美日韩另类一区| 欧美一级国产精品| 在线免费观看日本一区| 成人av在线播放网站| 精品一区二区日韩| 天堂久久一区二区三区| 亚洲乱码国产乱码精品精98午夜| 久久久久久久久久久久久久久99| 制服丝袜激情欧洲亚洲| 色综合夜色一区| 成人性色生活片免费看爆迷你毛片| 美女网站色91| 日韩电影在线观看网站| 一区二区免费视频| 国产精品久久久久久久久免费桃花| 精品久久久影院| 日韩亚洲欧美高清| 91精品国产综合久久香蕉的特点| 在线观看日韩毛片| 色婷婷av一区二区三区软件| 99免费精品在线| 成人h精品动漫一区二区三区| 国产精品一区二区在线观看网站 | www.成人网.com| 国产成人精品一区二| 激情成人午夜视频| 麻豆91精品视频| 六月丁香婷婷久久| 麻豆精品在线视频| 九一九一国产精品| 久久精品国产77777蜜臀| 免费人成黄页网站在线一区二区| 亚洲 欧美综合在线网络| 亚洲电影第三页| 天天色综合天天| 日韩高清在线不卡| 日本中文字幕一区| 奇米亚洲午夜久久精品| 免费成人深夜小野草| 麻豆一区二区在线| 国产一区二区免费在线| 久久99国产精品尤物| 久草精品在线观看| 国产很黄免费观看久久| 成人国产在线观看| 91老师片黄在线观看| 91在线精品秘密一区二区| 91一区二区在线观看| 在线看一区二区| 欧美巨大另类极品videosbest | 日韩美一区二区三区| 欧美精品一区二区三区一线天视频| 精品国产免费一区二区三区香蕉| 精品欧美一区二区久久| 久久久精品免费网站| 国产精品久久久久久久久果冻传媒| 亚洲啪啪综合av一区二区三区| 亚洲乱码一区二区三区在线观看| 亚洲国产日韩精品| 日韩精品电影在线| 国内精品久久久久影院色| 成人精品鲁一区一区二区| 色中色一区二区| 91精品国产色综合久久| 久久奇米777| 亚洲少妇中出一区| 亚洲国产精品久久久久秋霞影院 | 国产电影精品久久禁18| 不卡一卡二卡三乱码免费网站| 色综合久久综合网97色综合 | 91免费视频观看| 在线观看91精品国产麻豆| 精品国产乱子伦一区| 国产精品水嫩水嫩| 亚洲国产一区二区视频| 久久99国产精品麻豆| a级高清视频欧美日韩| 欧美视频一区二区三区| 久久只精品国产| 亚洲精品中文在线观看| 久久99久久久欧美国产| a美女胸又www黄视频久久| 9191成人精品久久|