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

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

?? jquant1.c

?? MPEG4解碼程序源代碼(能夠對各種MPEG4文件進行解碼)
?? C
?? 第 1 頁 / 共 3 頁
字號:
{
  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;
  long 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 * ((long) (ncolors - 1));
  for (j = 0; j < ODITHER_SIZE; j++) {
    for (k = 0; k < ODITHER_SIZE; k++) {
      num = ((long) (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,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区免费在线| 91在线小视频| 天天色天天爱天天射综合| 日韩av电影天堂| 成人永久aaa| 日韩亚洲欧美在线| 亚洲午夜久久久久久久久电影网| 日韩二区在线观看| 成人永久看片免费视频天堂| 欧美私人免费视频| 久久久久国产精品免费免费搜索| 亚洲乱码国产乱码精品精的特点 | 韩国精品久久久| 97久久精品人人做人人爽| 欧美日韩aaaaaa| 欧美韩国日本综合| 蜜桃av一区二区在线观看| 99久久精品国产麻豆演员表| 日韩视频一区二区三区在线播放| 亚洲人成网站色在线观看| 美女网站一区二区| 在线观看日韩国产| 中文字幕欧美一| 成人动漫在线一区| 国产精品久久久久久久久快鸭| 国产精品福利一区二区| 麻豆国产精品官网| 欧美日韩小视频| 国产精品另类一区| 国产精品18久久久久| 在线成人高清不卡| 亚洲一区二区在线播放相泽| 99免费精品在线观看| 久久久久国产精品厨房| 久久精品国产亚洲aⅴ| 欧美日韩午夜在线| 亚洲精品视频在线| 成人午夜av电影| 久久精品视频一区二区三区| 蜜桃视频一区二区| 4438x亚洲最大成人网| 亚洲国产人成综合网站| 欧美影视一区二区三区| 国产无遮挡一区二区三区毛片日本| 男女性色大片免费观看一区二区 | 亚洲综合一区二区| 亚洲最大的成人av| 麻豆成人av在线| 久久精品综合网| eeuss鲁片一区二区三区| 国产精品久久久久aaaa| 色妹子一区二区| 美女在线视频一区| 欧美激情一区二区三区四区| 色哦色哦哦色天天综合| 丝袜美腿亚洲一区二区图片| 26uuu另类欧美| youjizz国产精品| 偷拍自拍另类欧美| 久久久精品人体av艺术| 色爱区综合激月婷婷| 天堂va蜜桃一区二区三区| 久久久久久久久久久黄色| 91啪亚洲精品| 精品一区二区三区av| 国产精品美女久久久久久久久久久| 日本久久电影网| 黄网站免费久久| 亚洲综合一区二区三区| 欧美tickle裸体挠脚心vk| 91美女视频网站| 极品少妇xxxx偷拍精品少妇| 亚洲三级在线看| 精品国偷自产国产一区| 91蜜桃在线观看| 黄页视频在线91| 亚洲成年人网站在线观看| 国产欧美日韩另类一区| 欧美一区二区视频网站| 91麻豆国产在线观看| 国产中文一区二区三区| 婷婷久久综合九色综合伊人色| 国产免费久久精品| 日韩久久久久久| 欧美中文字幕一区二区三区| 国产经典欧美精品| 日本亚洲视频在线| 亚洲黄色免费网站| 国产精品沙发午睡系列990531| 日韩欧美久久久| 在线播放一区二区三区| 色偷偷88欧美精品久久久| 大胆亚洲人体视频| 精品一区二区三区久久久| 亚洲高清视频中文字幕| 亚洲免费在线观看视频| 国产精品国产a级| 久久五月婷婷丁香社区| 日韩一二三区视频| 欧美日本韩国一区| 欧美日韩不卡视频| 欧美视频中文字幕| 在线看不卡av| 91视频国产资源| 99re这里只有精品视频首页| 国产成人精品1024| 高潮精品一区videoshd| 国产suv一区二区三区88区| 国内精品在线播放| 国产精品一线二线三线精华| 极品销魂美女一区二区三区| 九九**精品视频免费播放| 久久99精品久久久久久动态图| 日韩av电影免费观看高清完整版| 亚洲成人先锋电影| 亚洲h精品动漫在线观看| 天天做天天摸天天爽国产一区| 亚洲h在线观看| 麻豆免费看一区二区三区| 久久99国内精品| 国产一区二区免费看| 国产成人免费在线视频| www.日韩精品| 色视频成人在线观看免| 欧美日韩精品一二三区| 日韩一级精品视频在线观看| 2022国产精品视频| 国产精品人人做人人爽人人添| 国产精品久久一级| 亚洲亚洲人成综合网络| 青青草国产精品亚洲专区无| 久久99热这里只有精品| 国v精品久久久网| 色乱码一区二区三区88| 91 com成人网| 久久麻豆一区二区| 中文字幕亚洲综合久久菠萝蜜| 一区二区三区中文字幕| 免费日韩伦理电影| 国产福利91精品一区二区三区| 99r精品视频| 欧美一级片免费看| 久久久久久综合| 中文字幕字幕中文在线中不卡视频| 亚洲综合色自拍一区| 久久国产欧美日韩精品| 成人app软件下载大全免费| 91福利区一区二区三区| 精品久久五月天| 亚洲精品国产a久久久久久| 毛片av一区二区| 色女孩综合影院| 久久久欧美精品sm网站| 亚洲国产精品久久人人爱蜜臀| 久久国产婷婷国产香蕉| 色菇凉天天综合网| 精品黑人一区二区三区久久| 一区二区三区在线影院| 国产精品一区二区久久精品爱涩| 在线免费观看视频一区| 国产人久久人人人人爽| 亚洲成人综合在线| 91丨九色丨尤物| 精品国产凹凸成av人网站| 亚洲国产一区二区三区 | 最好看的中文字幕久久| 麻豆精品新av中文字幕| 欧美视频一区二区在线观看| 中日韩免费视频中文字幕| 日产国产欧美视频一区精品| 91看片淫黄大片一级| 欧美韩国一区二区| 精东粉嫩av免费一区二区三区| 在线观看欧美精品| 最新不卡av在线| 成人午夜电影网站| 日韩精品一区二区三区蜜臀| 亚洲成a人v欧美综合天堂| 91免费版pro下载短视频| 国产精品午夜在线| 国产麻豆午夜三级精品| 欧美成人精品高清在线播放| 亚洲成a人v欧美综合天堂下载| 91国产免费观看| 亚洲精品国产一区二区三区四区在线| 粉嫩在线一区二区三区视频| 日韩女优av电影| 蜜臀精品久久久久久蜜臀| 欧美视频中文一区二区三区在线观看| 亚洲视频狠狠干| 91浏览器在线视频| 亚洲视频在线观看三级| 99精品视频一区| 亚洲同性同志一二三专区| 99视频国产精品| 日韩伦理电影网| 在线影院国内精品| 亚洲国产日韩a在线播放| 欧美日韩免费一区二区三区视频 | 中文字幕欧美国产|