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

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

?? jcmainct.c

?? WinCE開發技巧與實例的配套源碼
?? C
字號:
/*
 * 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));
    }
  }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美军同video69gay| 久久99精品久久只有精品| 精品一区二区免费在线观看| 国产精品一区一区三区| 国产91丝袜在线播放0| 欧美视频一区二区三区四区| 精品日韩在线一区| 亚洲猫色日本管| 日韩中文字幕麻豆| 久久电影网电视剧免费观看| 91在线精品一区二区三区| 欧美日韩高清在线播放| 精品粉嫩超白一线天av| 国产精品视频一二三区| 捆绑变态av一区二区三区| 日本在线播放一区二区三区| 国产乱人伦精品一区二区在线观看| 一本到不卡免费一区二区| 精品伦理精品一区| 亚洲综合一二三区| 蜜桃av噜噜一区二区三区小说| 日本精品一区二区三区四区的功能| 久久久亚洲精品一区二区三区| 亚洲成人资源在线| 91在线视频播放地址| 2欧美一区二区三区在线观看视频| 亚洲主播在线观看| av电影在线不卡| 国产亚洲欧美激情| 麻豆91在线看| 欧美人牲a欧美精品| 亚洲欧美偷拍卡通变态| 国模套图日韩精品一区二区| 91精品国产综合久久精品麻豆| 1区2区3区国产精品| 国产麻豆欧美日韩一区| 欧美一区二区三区在线| 亚洲福利一区二区三区| 色综合天天性综合| 日本一区二区三区电影| 九九在线精品视频| 日韩一区二区精品| 偷拍一区二区三区四区| 欧美性生活一区| 亚洲女同一区二区| 91美女精品福利| 中文字幕日韩欧美一区二区三区| 国产揄拍国内精品对白| 日韩欧美国产三级电影视频| 日韩精品久久理论片| 欧美日韩精品欧美日韩精品| 亚洲精品高清在线| 色综合久久久网| 亚洲男女毛片无遮挡| aaa欧美色吧激情视频| 中文字幕亚洲视频| 不卡一区二区在线| 一区二区中文视频| av一区二区三区| 亚洲人午夜精品天堂一二香蕉| 成人夜色视频网站在线观看| 国产精品嫩草影院av蜜臀| 国产成a人亚洲| 亚洲国产精品t66y| 成人丝袜18视频在线观看| 日韩一卡二卡三卡| 另类人妖一区二区av| 欧美一二三区在线观看| 亚洲国产成人porn| 欧美一区二区在线播放| 亚洲第一福利一区| 7777精品伊人久久久大香线蕉 | 国产又黄又大久久| 久久蜜桃av一区精品变态类天堂| 国产在线精品不卡| 国产精品午夜久久| 99国产麻豆精品| 一区二区三区在线免费观看| 欧美亚洲丝袜传媒另类| 日本中文字幕一区| 久久免费的精品国产v∧| 成人激情午夜影院| 亚洲精选免费视频| 欧美日韩极品在线观看一区| 五月婷婷久久丁香| 日韩欧美国产系列| 成人免费毛片aaaaa**| 亚洲欧美日韩国产中文在线| 欧美日韩午夜在线视频| 美女视频黄 久久| 久久久久久久网| 99精品国产视频| 五月激情六月综合| 欧美精品一区二区三| www.欧美色图| 亚洲一区二区三区精品在线| 欧美日韩日本视频| 韩日精品视频一区| 国产午夜精品久久久久久免费视| 成人一区二区三区在线观看| 最新国产精品久久精品| 色吧成人激情小说| 美女在线观看视频一区二区| 中文av一区二区| 在线精品亚洲一区二区不卡| 免费欧美在线视频| 国产精品视频在线看| 欧美日韩小视频| 国产成人在线视频网站| 一区二区三区视频在线观看| 日韩免费视频线观看| 99re这里只有精品视频首页| 日韩精品亚洲专区| 国产精品人成在线观看免费 | 日本成人中文字幕| 国产精品久久久一本精品| 欧美精品v国产精品v日韩精品| 国产一区二区在线免费观看| 亚洲欧美日韩中文播放| 欧美日韩高清影院| 成人短视频下载| 日本麻豆一区二区三区视频| 国产精品久久久久久久久久免费看 | 久久久久国产精品麻豆ai换脸| 91蝌蚪porny| 久久99久久精品| 亚洲欧洲成人av每日更新| 在线观看日韩毛片| 国产河南妇女毛片精品久久久| 亚洲一区成人在线| 国产欧美日韩亚州综合| 欧美丰满少妇xxxbbb| av中文字幕亚洲| 国内偷窥港台综合视频在线播放| 亚洲一区二区黄色| 国产精品毛片a∨一区二区三区| 制服丝袜亚洲网站| 一本色道综合亚洲| 极品尤物av久久免费看| 亚洲二区在线视频| 最近中文字幕一区二区三区| 久久影院午夜论| 日韩欧美在线影院| 欧美性xxxxxxxx| 99re这里只有精品首页| 国产精品一区二区无线| 理论电影国产精品| 日韩在线播放一区二区| 一区二区三区日韩欧美精品| 亚洲国产精品二十页| 久久久久久亚洲综合影院红桃| 欧美区一区二区三区| 懂色av一区二区夜夜嗨| 免费高清视频精品| 亚洲永久免费视频| 亚洲你懂的在线视频| 国产精品福利一区二区| 国产无一区二区| 精品国产欧美一区二区| 欧美一卡在线观看| 欧美日韩国产在线观看| 色婷婷综合激情| 色呦呦国产精品| 色婷婷综合久久久| 一本大道久久精品懂色aⅴ | 国产日韩精品一区二区浪潮av| 精品久久久影院| 欧美mv日韩mv| 欧美不卡激情三级在线观看| 在线一区二区三区四区| 97精品超碰一区二区三区| 国产九色精品成人porny| 国产一区二区不卡| 久久成人久久鬼色| 久久成人18免费观看| 久草精品在线观看| 国产美女一区二区三区| 欧美午夜精品理论片a级按摩| 精品一区二区三区在线观看 | 午夜精品aaa| 天天色综合天天| 久久99热这里只有精品| 国产精品18久久久久久久久久久久| 国产成人久久精品77777最新版本| 波多野结衣亚洲| 欧美三级在线看| 日韩午夜电影在线观看| 国产欧美日韩久久| 一区二区三区四区乱视频| 日韩在线一区二区| 国产成人免费视频精品含羞草妖精| 国产不卡免费视频| 欧洲在线/亚洲| 日韩欧美一卡二卡| 国产精品视频你懂的| 亚洲大片精品永久免费| 国产做a爰片久久毛片| 不卡一区在线观看| 6080国产精品一区二区| 久久免费的精品国产v∧|