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

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

?? jcmainct.c

?? JPEG source code converts the image into compressed format
?? C
字號(hào):
/*
 * jcmainct.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 main buffer controller for compression.
 * The main buffer lies between the pre-processor and the JPEG
 * compressor proper; it holds downsampled data in the JPEG colorspace.
 */

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


/* Note: currently, there is no operating mode in which a full-image buffer
 * is needed at this step.  If there were, that mode could not be used with
 * "raw data" input, since this module is bypassed in that case.  However,
 * we've left the code here for possible use in special applications.
 */
#undef FULL_MAIN_BUFFER_SUPPORTED


/* Private buffer controller object */

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

  JDIMENSION cur_iMCU_row;	/* number of current iMCU row */
  JDIMENSION rowgroup_ctr;	/* counts row groups received in iMCU row */
  boolean suspended;		/* remember if we suspended output */
  J_BUF_MODE pass_mode;		/* current operating mode */

  /* If using just a strip buffer, this points to the entire set of buffers
   * (we allocate one for each component).  In the full-image case, this
   * points to the currently accessible strips of the virtual arrays.
   */
  JSAMPARRAY buffer[MAX_COMPONENTS];

#ifdef FULL_MAIN_BUFFER_SUPPORTED
  /* If using full-image storage, this array holds pointers to virtual-array
   * control blocks for each component.  Unused if not full-image storage.
   */
  jvirt_sarray_ptr whole_image[MAX_COMPONENTS];
#endif
} my_main_controller;

typedef my_main_controller * my_main_ptr;


/* Forward declarations */
METHODDEF(void) process_data_simple_main
	JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf,
	     JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail));
#ifdef FULL_MAIN_BUFFER_SUPPORTED
METHODDEF(void) process_data_buffer_main
	JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf,
	     JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail));
#endif


/*
 * Initialize for a processing pass.
 */

METHODDEF(void)
start_pass_main (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
{
  my_main_ptr main = (my_main_ptr) cinfo->main;

  /* Do nothing in raw-data mode. */
  if (cinfo->raw_data_in)
    return;

  main->cur_iMCU_row = 0;	/* initialize counters */
  main->rowgroup_ctr = 0;
  main->suspended = FALSE;
  main->pass_mode = pass_mode;	/* save mode for use by process_data */

  switch (pass_mode) {
  case JBUF_PASS_THRU:
#ifdef FULL_MAIN_BUFFER_SUPPORTED
    if (main->whole_image[0] != NULL)
      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
#endif
    main->pub.process_data = process_data_simple_main;
    break;
#ifdef FULL_MAIN_BUFFER_SUPPORTED
  case JBUF_SAVE_SOURCE:
  case JBUF_CRANK_DEST:
  case JBUF_SAVE_AND_PASS:
    if (main->whole_image[0] == NULL)
      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
    main->pub.process_data = process_data_buffer_main;
    break;
#endif
  default:
    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
    break;
  }
}


/*
 * Process some data.
 * This routine handles the simple pass-through mode,
 * where we have only a strip buffer.
 */

METHODDEF(void)
process_data_simple_main (j_compress_ptr cinfo,
			  JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
			  JDIMENSION in_rows_avail)
{
  my_main_ptr main = (my_main_ptr) cinfo->main;

  while (main->cur_iMCU_row < cinfo->total_iMCU_rows) {
    /* Read input data if we haven't filled the main buffer yet */
    if (main->rowgroup_ctr < DCTSIZE)
      (*cinfo->prep->pre_process_data) (cinfo,
					input_buf, in_row_ctr, in_rows_avail,
					main->buffer, &main->rowgroup_ctr,
					(JDIMENSION) DCTSIZE);

    /* If we don't have a full iMCU row buffered, return to application for
     * more data.  Note that preprocessor will always pad to fill the iMCU row
     * at the bottom of the image.
     */
    if (main->rowgroup_ctr != DCTSIZE)
      return;

    /* Send the completed row to the compressor */
    if (! (*cinfo->coef->compress_data) (cinfo, main->buffer)) {
      /* If compressor did not consume the whole row, then we must need to
       * suspend processing and return to the application.  In this situation
       * we pretend we didn't yet consume the last input row; otherwise, if
       * it happened to be the last row of the image, the application would
       * think we were done.
       */
      if (! main->suspended) {
	(*in_row_ctr)--;
	main->suspended = TRUE;
      }
      return;
    }
    /* We did finish the row.  Undo our little suspension hack if a previous
     * call suspended; then mark the main buffer empty.
     */
    if (main->suspended) {
      (*in_row_ctr)++;
      main->suspended = FALSE;
    }
    main->rowgroup_ctr = 0;
    main->cur_iMCU_row++;
  }
}


#ifdef FULL_MAIN_BUFFER_SUPPORTED

/*
 * Process some data.
 * This routine handles all of the modes that use a full-size buffer.
 */

METHODDEF(void)
process_data_buffer_main (j_compress_ptr cinfo,
			  JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
			  JDIMENSION in_rows_avail)
{
  my_main_ptr main = (my_main_ptr) cinfo->main;
  int ci;
  jpeg_component_info *compptr;
  boolean writing = (main->pass_mode != JBUF_CRANK_DEST);

  while (main->cur_iMCU_row < cinfo->total_iMCU_rows) {
    /* Realign the virtual buffers if at the start of an iMCU row. */
    if (main->rowgroup_ctr == 0) {
      for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
	   ci++, compptr++) {
	main->buffer[ci] = (*cinfo->mem->access_virt_sarray)
	  ((j_common_ptr) cinfo, main->whole_image[ci],
	   main->cur_iMCU_row * (compptr->v_samp_factor * DCTSIZE),
	   (JDIMENSION) (compptr->v_samp_factor * DCTSIZE), writing);
      }
      /* In a read pass, pretend we just read some source data. */
      if (! writing) {
	*in_row_ctr += cinfo->max_v_samp_factor * DCTSIZE;
	main->rowgroup_ctr = DCTSIZE;
      }
    }

    /* If a write pass, read input data until the current iMCU row is full. */
    /* Note: preprocessor will pad if necessary to fill the last iMCU row. */
    if (writing) {
      (*cinfo->prep->pre_process_data) (cinfo,
					input_buf, in_row_ctr, in_rows_avail,
					main->buffer, &main->rowgroup_ctr,
					(JDIMENSION) DCTSIZE);
      /* Return to application if we need more data to fill the iMCU row. */
      if (main->rowgroup_ctr < DCTSIZE)
	return;
    }

    /* Emit data, unless this is a sink-only pass. */
    if (main->pass_mode != JBUF_SAVE_SOURCE) {
      if (! (*cinfo->coef->compress_data) (cinfo, main->buffer)) {
	/* If compressor did not consume the whole row, then we must need to
	 * suspend processing and return to the application.  In this situation
	 * we pretend we didn't yet consume the last input row; otherwise, if
	 * it happened to be the last row of the image, the application would
	 * think we were done.
	 */
	if (! main->suspended) {
	  (*in_row_ctr)--;
	  main->suspended = TRUE;
	}
	return;
      }
      /* We did finish the row.  Undo our little suspension hack if a previous
       * call suspended; then mark the main buffer empty.
       */
      if (main->suspended) {
	(*in_row_ctr)++;
	main->suspended = FALSE;
      }
    }

    /* If get here, we are done with this iMCU row.  Mark buffer empty. */
    main->rowgroup_ctr = 0;
    main->cur_iMCU_row++;
  }
}

#endif /* FULL_MAIN_BUFFER_SUPPORTED */


/*
 * Initialize main buffer controller.
 */

GLOBAL(void)
jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer)
{
  my_main_ptr main;
  int ci;
  jpeg_component_info *compptr;

  main = (my_main_ptr)
    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
				SIZEOF(my_main_controller));
  cinfo->main = (struct jpeg_c_main_controller *) main;
  main->pub.start_pass = start_pass_main;

  /* We don't need to create a buffer in raw-data mode. */
  if (cinfo->raw_data_in)
    return;

  /* Create the buffer.  It holds downsampled data, so each component
   * may be of a different size.
   */
  if (need_full_buffer) {
#ifdef FULL_MAIN_BUFFER_SUPPORTED
    /* Allocate a full-image virtual array for each component */
    /* Note we pad the bottom to a multiple of the iMCU height */
    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
	 ci++, compptr++) {
      main->whole_image[ci] = (*cinfo->mem->request_virt_sarray)
	((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
	 compptr->width_in_blocks * DCTSIZE,
	 (JDIMENSION) jround_up((long) compptr->height_in_blocks,
				(long) compptr->v_samp_factor) * DCTSIZE,
	 (JDIMENSION) (compptr->v_samp_factor * DCTSIZE));
    }
#else
    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
#endif
  } else {
#ifdef FULL_MAIN_BUFFER_SUPPORTED
    main->whole_image[0] = NULL; /* flag for no virtual arrays */
#endif
    /* Allocate a strip buffer for each component */
    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
	 ci++, compptr++) {
      main->buffer[ci] = (*cinfo->mem->alloc_sarray)
	((j_common_ptr) cinfo, JPOOL_IMAGE,
	 compptr->width_in_blocks * DCTSIZE,
	 (JDIMENSION) (compptr->v_samp_factor * DCTSIZE));
    }
  }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本韩国欧美三级| 亚洲一区二区在线播放相泽| 亚洲人成网站精品片在线观看| 亚洲午夜久久久久久久久电影网 | 国产精品视频在线看| 亚洲成人黄色小说| 粉嫩蜜臀av国产精品网站| 91精品欧美福利在线观看| 亚洲日本va午夜在线电影| 国产精品综合网| 777午夜精品视频在线播放| 亚洲色图丝袜美腿| 精品一区二区三区香蕉蜜桃 | 精品无人码麻豆乱码1区2区| 日本道精品一区二区三区 | 欧美日韩一区二区三区视频| 国产亚洲女人久久久久毛片| 日韩中文欧美在线| 91成人在线免费观看| 欧美国产一区在线| 国内欧美视频一区二区| 91精品国产福利| 亚洲一区二区三区三| 91视频免费看| 国产精品网站一区| 粉嫩13p一区二区三区| 欧美成va人片在线观看| 日韩av在线免费观看不卡| 欧美手机在线视频| 一区二区三区在线观看动漫| 99视频精品在线| 国产精品美女久久久久高潮| 国产精品白丝jk黑袜喷水| 精品福利av导航| 久久国产精品第一页| 欧美一区二区观看视频| 日本视频中文字幕一区二区三区| 欧美色大人视频| 一区二区三区蜜桃网| 色综合一个色综合| 亚洲欧美另类小说| heyzo一本久久综合| 欧美极品aⅴ影院| 国产一区不卡在线| 久久蜜臀中文字幕| 国产在线不卡视频| 精品国产免费一区二区三区香蕉| 精品在线观看视频| 久久色在线观看| 高清不卡一二三区| 亚洲国产精品国自产拍av| 成人性生交大合| 国产精品久久久久久久午夜片| va亚洲va日韩不卡在线观看| 国产精品国产三级国产普通话99| 成人国产精品免费观看动漫| 日本一区二区免费在线观看视频| 国产91富婆露脸刺激对白| 欧美激情在线一区二区| 国产91精品露脸国语对白| 亚洲欧洲性图库| 91黄色免费网站| 日本午夜一本久久久综合| 欧美第一区第二区| 国产精品一级片| 国产精品网站导航| 一本到三区不卡视频| 亚洲乱码国产乱码精品精的特点 | 99久久久免费精品国产一区二区| 欧美韩国日本不卡| 在线观看日韩精品| 奇米四色…亚洲| 久久青草欧美一区二区三区| jlzzjlzz欧美大全| 婷婷中文字幕一区三区| 午夜精品久久一牛影视| 欧美一区二区三区免费| 国产一区二区在线观看免费| 国产精品久久久久久久久免费樱桃 | 一区二区三区日韩欧美精品| 欧美亚洲动漫制服丝袜| 日本三级亚洲精品| 久久久亚洲精品一区二区三区| 成人国产精品免费观看视频| 一区二区三区产品免费精品久久75| 欧美精品xxxxbbbb| 国内成人精品2018免费看| 中国av一区二区三区| 在线视频一区二区三| 蜜臀av在线播放一区二区三区| 国产三级欧美三级日产三级99| 色激情天天射综合网| 免费亚洲电影在线| 欧美韩国日本综合| 欧美精品在线观看播放| 大桥未久av一区二区三区中文| 亚洲一区二区欧美| 精品免费日韩av| 色综合一个色综合| 国内精品嫩模私拍在线| 一区二区三区不卡视频在线观看| 日韩欧美久久久| 91麻豆国产福利在线观看| 美女视频黄免费的久久 | 久久精品亚洲乱码伦伦中文| 色婷婷综合久久久中文一区二区| 五月婷婷激情综合| 国产精品久久久久影院亚瑟| 91精品婷婷国产综合久久| 成人免费毛片片v| 日韩av中文字幕一区二区 | 日韩欧美视频在线 | 韩国三级在线一区| 一区二区三区四区亚洲| 久久久久久日产精品| 7777精品伊人久久久大香线蕉经典版下载 | 56国语精品自产拍在线观看| 国产成人精品免费视频网站| 日精品一区二区三区| 亚洲欧美日韩在线不卡| 久久这里只有精品首页| 欧美日韩美女一区二区| av电影天堂一区二区在线| 精品无码三级在线观看视频| 亚洲国产欧美另类丝袜| 中文字幕精品一区二区三区精品| 日韩一区二区电影| 欧洲精品一区二区三区在线观看| 丁香婷婷综合激情五月色| 麻豆精品新av中文字幕| 亚洲国产精品影院| 中文字幕中文字幕一区| 国产日产精品一区| 精品免费国产二区三区| 在线不卡一区二区| 欧美性猛片aaaaaaa做受| 91在线播放网址| 成人性生交大合| 高潮精品一区videoshd| 国产综合一区二区| 久久99国产乱子伦精品免费| 图片区日韩欧美亚洲| 亚洲在线观看免费| 亚洲精品高清在线观看| 国产精品传媒在线| 亚洲国产精品二十页| 久久精品综合网| 久久久久久黄色| 久久久久久久久久久99999| 精品国产乱码久久久久久浪潮| 日韩欧美中文字幕一区| 日韩一区二区在线观看视频 | 色悠悠亚洲一区二区| 成人午夜精品一区二区三区| 国产精品18久久久久久久久久久久| 日产国产欧美视频一区精品 | 国产精品福利在线播放| 国产精品蜜臀在线观看| 国产亚洲一区字幕| 久久精品夜夜夜夜久久| 国产亚洲一二三区| 国产三级久久久| 国产午夜亚洲精品午夜鲁丝片 | 91久久精品国产91性色tv| 色欧美日韩亚洲| 欧亚一区二区三区| 欧美中文字幕一区| 欧美日韩在线免费视频| 欧美一区二区视频免费观看| 这里只有精品视频在线观看| 91精品欧美福利在线观看| 91麻豆精品国产无毒不卡在线观看| 欧美女孩性生活视频| 欧美岛国在线观看| 久久久精品影视| 国产精品你懂的| 亚洲激情网站免费观看| 婷婷国产v国产偷v亚洲高清| 麻豆精品在线视频| 国产传媒久久文化传媒| 99视频热这里只有精品免费| 在线亚洲精品福利网址导航| 欧美日产在线观看| 精品欧美一区二区久久| 欧美激情艳妇裸体舞| 亚洲综合丝袜美腿| 婷婷激情综合网| 韩国精品一区二区| 99久久伊人网影院| 欧美男人的天堂一二区| 欧美成人三级电影在线| 国产欧美精品日韩区二区麻豆天美| 亚洲欧洲综合另类| 亚洲一卡二卡三卡四卡| 日本视频中文字幕一区二区三区| 激情久久五月天| 91啪亚洲精品| 日韩欧美电影一区| 国产三区在线成人av| 亚洲九九爱视频|