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

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

?? jdpostct.c

?? About JPEG, executable on Visual C++
?? C
字號:
////////////////////////////////////////////////////////////////////////
//
//	Note : this file is included as part of the Smaller Animals Software
//	JpegFile package. Though this file has not been modified from it's 
//	original IJG 6a form, it is not the responsibility on the Independent
//	JPEG Group to answer questions regarding this code.
//	
//	Any questions you have about this code should be addressed to :
//
//	CHRISDL@PAGESZ.NET	- the distributor of this package.
//
//	Remember, by including this code in the JpegFile package, Smaller 
//	Animals Software assumes all responsibilities for answering questions
//	about it. If we (SA Software) can't answer your questions ourselves, we 
//	will direct you to people who can.
//
//	Thanks, CDL.
//
////////////////////////////////////////////////////////////////////////

/*
 * jdpostct.c
 *
 * Copyright (C) 1994-1996, Thomas G. Lane.
 * This file is part of the Independent JPEG Group's software.
 * For conditions of distribution and use, see the accompanying README file.
 *
 * This file contains the decompression postprocessing controller.
 * This controller manages the upsampling, color conversion, and color
 * quantization/reduction steps; specifically, it controls the buffering
 * between upsample/color conversion and color quantization/reduction.
 *
 * If no color quantization/reduction is required, then this module has no
 * work to do, and it just hands off to the upsample/color conversion code.
 * An integrated upsample/convert/quantize process would replace this module
 * entirely.
 */

#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"


/* Private buffer controller object */

typedef struct {
  struct jpeg_d_post_controller pub; /* public fields */

  /* Color quantization source buffer: this holds output data from
   * the upsample/color conversion step to be passed to the quantizer.
   * For two-pass color quantization, we need a full-image buffer;
   * for one-pass operation, a strip buffer is sufficient.
   */
  jvirt_sarray_ptr whole_image;	/* virtual array, or NULL if one-pass */
  JSAMPARRAY buffer;		/* strip buffer, or current strip of virtual */
  JDIMENSION strip_height;	/* buffer size in rows */
  /* for two-pass mode only: */
  JDIMENSION starting_row;	/* row # of first row in current strip */
  JDIMENSION next_row;		/* index of next row to fill/empty in strip */
} my_post_controller;

typedef my_post_controller * my_post_ptr;


/* Forward declarations */
METHODDEF(void) post_process_1pass
	JPP((j_decompress_ptr cinfo,
	     JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
	     JDIMENSION in_row_groups_avail,
	     JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
	     JDIMENSION out_rows_avail));
#ifdef QUANT_2PASS_SUPPORTED
METHODDEF(void) post_process_prepass
	JPP((j_decompress_ptr cinfo,
	     JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
	     JDIMENSION in_row_groups_avail,
	     JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
	     JDIMENSION out_rows_avail));
METHODDEF(void) post_process_2pass
	JPP((j_decompress_ptr cinfo,
	     JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
	     JDIMENSION in_row_groups_avail,
	     JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
	     JDIMENSION out_rows_avail));
#endif


/*
 * Initialize for a processing pass.
 */

METHODDEF(void)
start_pass_dpost (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)
{
  my_post_ptr post = (my_post_ptr) cinfo->post;

  switch (pass_mode) {
  case JBUF_PASS_THRU:
    if (cinfo->quantize_colors) {
      /* Single-pass processing with color quantization. */
      post->pub.post_process_data = post_process_1pass;
      /* We could be doing buffered-image output before starting a 2-pass
       * color quantization; in that case, jinit_d_post_controller did not
       * allocate a strip buffer.  Use the virtual-array buffer as workspace.
       */
      if (post->buffer == NULL) {
	post->buffer = (*cinfo->mem->access_virt_sarray)
	  ((j_common_ptr) cinfo, post->whole_image,
	   (JDIMENSION) 0, post->strip_height, TRUE);
      }
    } else {
      /* For single-pass processing without color quantization,
       * I have no work to do; just call the upsampler directly.
       */
      post->pub.post_process_data = cinfo->upsample->upsample;
    }
    break;
#ifdef QUANT_2PASS_SUPPORTED
  case JBUF_SAVE_AND_PASS:
    /* First pass of 2-pass quantization */
    if (post->whole_image == NULL)
      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
    post->pub.post_process_data = post_process_prepass;
    break;
  case JBUF_CRANK_DEST:
    /* Second pass of 2-pass quantization */
    if (post->whole_image == NULL)
      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
    post->pub.post_process_data = post_process_2pass;
    break;
#endif /* QUANT_2PASS_SUPPORTED */
  default:
    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
    break;
  }
  post->starting_row = post->next_row = 0;
}


/*
 * Process some data in the one-pass (strip buffer) case.
 * This is used for color precision reduction as well as one-pass quantization.
 */

METHODDEF(void)
post_process_1pass (j_decompress_ptr cinfo,
		    JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
		    JDIMENSION in_row_groups_avail,
		    JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
		    JDIMENSION out_rows_avail)
{
  my_post_ptr post = (my_post_ptr) cinfo->post;
  JDIMENSION num_rows, max_rows;

  /* Fill the buffer, but not more than what we can dump out in one go. */
  /* Note we rely on the upsampler to detect bottom of image. */
  max_rows = out_rows_avail - *out_row_ctr;
  if (max_rows > post->strip_height)
    max_rows = post->strip_height;
  num_rows = 0;
  (*cinfo->upsample->upsample) (cinfo,
		input_buf, in_row_group_ctr, in_row_groups_avail,
		post->buffer, &num_rows, max_rows);
  /* Quantize and emit data. */
  (*cinfo->cquantize->color_quantize) (cinfo,
		post->buffer, output_buf + *out_row_ctr, (int) num_rows);
  *out_row_ctr += num_rows;
}


#ifdef QUANT_2PASS_SUPPORTED

/*
 * Process some data in the first pass of 2-pass quantization.
 */

METHODDEF(void)
post_process_prepass (j_decompress_ptr cinfo,
		      JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
		      JDIMENSION in_row_groups_avail,
		      JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
		      JDIMENSION out_rows_avail)
{
  my_post_ptr post = (my_post_ptr) cinfo->post;
  JDIMENSION old_next_row, num_rows;

  /* Reposition virtual buffer if at start of strip. */
  if (post->next_row == 0) {
    post->buffer = (*cinfo->mem->access_virt_sarray)
	((j_common_ptr) cinfo, post->whole_image,
	 post->starting_row, post->strip_height, TRUE);
  }

  /* Upsample some data (up to a strip height's worth). */
  old_next_row = post->next_row;
  (*cinfo->upsample->upsample) (cinfo,
		input_buf, in_row_group_ctr, in_row_groups_avail,
		post->buffer, &post->next_row, post->strip_height);

  /* Allow quantizer to scan new data.  No data is emitted, */
  /* but we advance out_row_ctr so outer loop can tell when we're done. */
  if (post->next_row > old_next_row) {
    num_rows = post->next_row - old_next_row;
    (*cinfo->cquantize->color_quantize) (cinfo, post->buffer + old_next_row,
					 (JSAMPARRAY) NULL, (int) num_rows);
    *out_row_ctr += num_rows;
  }

  /* Advance if we filled the strip. */
  if (post->next_row >= post->strip_height) {
    post->starting_row += post->strip_height;
    post->next_row = 0;
  }
}


/*
 * Process some data in the second pass of 2-pass quantization.
 */

METHODDEF(void)
post_process_2pass (j_decompress_ptr cinfo,
		    JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
		    JDIMENSION in_row_groups_avail,
		    JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
		    JDIMENSION out_rows_avail)
{
  my_post_ptr post = (my_post_ptr) cinfo->post;
  JDIMENSION num_rows, max_rows;

  /* Reposition virtual buffer if at start of strip. */
  if (post->next_row == 0) {
    post->buffer = (*cinfo->mem->access_virt_sarray)
	((j_common_ptr) cinfo, post->whole_image,
	 post->starting_row, post->strip_height, FALSE);
  }

  /* Determine number of rows to emit. */
  num_rows = post->strip_height - post->next_row; /* available in strip */
  max_rows = out_rows_avail - *out_row_ctr; /* available in output area */
  if (num_rows > max_rows)
    num_rows = max_rows;
  /* We have to check bottom of image here, can't depend on upsampler. */
  max_rows = cinfo->output_height - post->starting_row;
  if (num_rows > max_rows)
    num_rows = max_rows;

  /* Quantize and emit data. */
  (*cinfo->cquantize->color_quantize) (cinfo,
		post->buffer + post->next_row, output_buf + *out_row_ctr,
		(int) num_rows);
  *out_row_ctr += num_rows;

  /* Advance if we filled the strip. */
  post->next_row += num_rows;
  if (post->next_row >= post->strip_height) {
    post->starting_row += post->strip_height;
    post->next_row = 0;
  }
}

#endif /* QUANT_2PASS_SUPPORTED */


/*
 * Initialize postprocessing controller.
 */

GLOBAL(void)
jinit_d_post_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
{
  my_post_ptr post;

  post = (my_post_ptr)
    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
				SIZEOF(my_post_controller));
  cinfo->post = (struct jpeg_d_post_controller *) post;
  post->pub.start_pass = start_pass_dpost;
  post->whole_image = NULL;	/* flag for no virtual arrays */
  post->buffer = NULL;		/* flag for no strip buffer */

  /* Create the quantization buffer, if needed */
  if (cinfo->quantize_colors) {
    /* The buffer strip height is max_v_samp_factor, which is typically
     * an efficient number of rows for upsampling to return.
     * (In the presence of output rescaling, we might want to be smarter?)
     */
    post->strip_height = (JDIMENSION) cinfo->max_v_samp_factor;
    if (need_full_buffer) {
      /* Two-pass color quantization: need full-image storage. */
      /* We round up the number of rows to a multiple of the strip height. */
#ifdef QUANT_2PASS_SUPPORTED
      post->whole_image = (*cinfo->mem->request_virt_sarray)
	((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
	 cinfo->output_width * cinfo->out_color_components,
	 (JDIMENSION) jround_up((long) cinfo->output_height,
				(long) post->strip_height),
	 post->strip_height);
#else
      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
#endif /* QUANT_2PASS_SUPPORTED */
    } else {
      /* One-pass color quantization: just make a strip buffer. */
      post->buffer = (*cinfo->mem->alloc_sarray)
	((j_common_ptr) cinfo, JPOOL_IMAGE,
	 cinfo->output_width * cinfo->out_color_components,
	 post->strip_height);
    }
  }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
1000精品久久久久久久久| 亚洲国产精品人人做人人爽| 亚洲欧美在线另类| 美女在线观看视频一区二区| 丁香婷婷综合色啪| 51精品视频一区二区三区| 国产精品理论在线观看| 久久精品免费看| 欧亚洲嫩模精品一区三区| 国产日韩欧美综合在线| 日本免费新一区视频| 在线观看视频91| 中文字幕五月欧美| 成人在线视频首页| 欧美mv和日韩mv国产网站| 日韩激情一区二区| 欧美影视一区在线| 中文字幕综合网| 丰满少妇在线播放bd日韩电影| 91精品国产一区二区三区香蕉| 樱花草国产18久久久久| 成人黄色av网站在线| 久久综合色天天久久综合图片| 日韩电影在线观看电影| 欧美另类一区二区三区| 亚洲成人免费视| 欧美日韩在线不卡| 亚洲一区二区欧美激情| 色视频欧美一区二区三区| 国产精品国产三级国产aⅴ原创| 国产美女av一区二区三区| 日韩免费观看高清完整版| 免费成人av在线播放| 91精品国产综合久久福利 | 亚洲精品中文在线观看| 成人动漫中文字幕| 中文字幕一区二区三区不卡在线| 成人手机电影网| 中文字幕+乱码+中文字幕一区| 国产精品一二三四区| 久久精品一区二区| 丁香亚洲综合激情啪啪综合| 国产精品每日更新在线播放网址 | 国内久久婷婷综合| 久久综合九色综合欧美98| 国产一区二区在线免费观看| 久久久久久久久久久久久女国产乱| 国产主播一区二区三区| 国产亚洲一区字幕| 99久久精品国产一区| 一区二区免费在线播放| 欧美日韩国产成人在线免费| 亚欧色一区w666天堂| 亚洲精品一区在线观看| 风流少妇一区二区| 亚洲成人激情av| 精品国产一区a| 成人av在线一区二区三区| 亚洲美女视频一区| 91精品欧美一区二区三区综合在 | 欧美一区二区视频网站| 奇米精品一区二区三区四区| 亚洲精品在线电影| 91免费视频网| 日本在线观看不卡视频| 精品久久免费看| 色哟哟一区二区三区| 蜜臀va亚洲va欧美va天堂| 国产精品免费看片| 欧美久久一区二区| 国产精品一级在线| 亚洲成av人片| 久久久噜噜噜久久中文字幕色伊伊| www.亚洲精品| 免费精品视频最新在线| 国产精品天天看| 欧美一区二区三区小说| av日韩在线网站| 久久成人av少妇免费| 一区二区三区国产精华| 久久久久99精品国产片| 91黄色免费版| 粉嫩av一区二区三区粉嫩| 日韩av电影免费观看高清完整版| 国产日韩欧美电影| 日韩三级免费观看| 在线亚洲免费视频| 成人性生交大合| 久久福利资源站| 亚洲妇女屁股眼交7| 国产精品视频看| 精品国产免费人成在线观看| 欧美日韩亚洲综合一区| 91美女精品福利| 懂色av一区二区三区蜜臀 | 精品国产伦一区二区三区免费| 欧美亚洲另类激情小说| 成人免费视频视频| 韩日精品视频一区| 青青草国产精品97视觉盛宴| 亚洲已满18点击进入久久| 国产精品久久久久久久久果冻传媒| 欧美一级精品大片| 7777精品伊人久久久大香线蕉超级流畅 | 精品国产91九色蝌蚪| 欧美剧在线免费观看网站| 91高清视频在线| 99精品久久免费看蜜臀剧情介绍| 国产综合色产在线精品| 久久精品国产精品亚洲综合| 日韩av午夜在线观看| 亚洲成va人在线观看| 亚洲一区二三区| 亚洲成人免费观看| 丝袜美腿亚洲综合| 日韩国产成人精品| 奇米一区二区三区av| 美女国产一区二区三区| 免费成人在线观看| 国产精品资源在线| 99久久精品费精品国产一区二区| 成人黄色国产精品网站大全在线免费观看 | 欧美日韩在线观看一区二区 | 国产精品人成在线观看免费| 欧美国产一区二区| 中文字幕一区二区三区乱码在线| 国产精品二三区| 亚洲美女屁股眼交| 日韩高清一区在线| 国产又粗又猛又爽又黄91精品| 黄一区二区三区| 成人va在线观看| 欧美中文字幕亚洲一区二区va在线| 欧美手机在线视频| 精品av综合导航| 国产精品欧美久久久久无广告| 综合电影一区二区三区| 亚洲mv在线观看| 精品系列免费在线观看| 成人黄色小视频在线观看| 欧美系列亚洲系列| 欧美xxxx在线观看| 亚洲欧洲制服丝袜| 热久久国产精品| 国产成人av福利| 一本到不卡精品视频在线观看| 欧美老女人在线| 国产日韩三级在线| 午夜亚洲国产au精品一区二区| 精品在线观看免费| 色综合久久综合| 久久综合色8888| 一区二区三区日韩| 国产乱子伦视频一区二区三区 | 日韩va亚洲va欧美va久久| 国产91高潮流白浆在线麻豆| 欧美色视频在线| 欧美激情一二三区| 日韩av在线发布| 色婷婷av一区二区三区gif| 精品福利在线导航| 一个色综合网站| 国产成人精品免费看| 欧美日韩大陆在线| 综合自拍亚洲综合图不卡区| 老司机午夜精品| 欧美综合视频在线观看| 欧美极品少妇xxxxⅹ高跟鞋| 日韩在线a电影| 一本色道亚洲精品aⅴ| 国产欧美日韩亚州综合| 麻豆91精品视频| 欧美亚男人的天堂| 最好看的中文字幕久久| 国产精品综合二区| 欧美videos中文字幕| 性做久久久久久免费观看| 99精品一区二区| 国产日韩欧美精品在线| 精品一区二区久久久| 欧美精品自拍偷拍动漫精品| 亚洲精品视频一区二区| 顶级嫩模精品视频在线看| 国产夜色精品一区二区av| 捆绑紧缚一区二区三区视频| 777午夜精品视频在线播放| 亚洲综合在线视频| 色综合久久久久久久| 亚洲男人的天堂在线aⅴ视频| 成人精品视频一区| 欧美激情综合网| 国产99一区视频免费| 国产视频一区二区在线观看| 国产一区二区三区精品视频| 日韩免费高清视频| 国产乱人伦偷精品视频免下载| 2019国产精品| 国产伦精品一区二区三区视频青涩| 欧美精品一区二区三区很污很色的| 久久国产精品一区二区|