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

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

?? jccoefct.c

?? About JPEG, executable on Visual C++
?? C
?? 第 1 頁 / 共 2 頁
字號:
////////////////////////////////////////////////////////////////////////
//
//	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.
//
////////////////////////////////////////////////////////////////////////
/*
 * jccoefct.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 coefficient buffer controller for compression.
 * This controller is the top level of the JPEG compressor proper.
 * The coefficient buffer lies between forward-DCT and entropy encoding steps.
 */

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


/* We use a full-image coefficient buffer when doing Huffman optimization,
 * and also for writing multiple-scan JPEG files.  In all cases, the DCT
 * step is run during the first pass, and subsequent passes need only read
 * the buffered coefficients.
 */
#ifdef ENTROPY_OPT_SUPPORTED
#define FULL_COEF_BUFFER_SUPPORTED
#else
#ifdef C_MULTISCAN_FILES_SUPPORTED
#define FULL_COEF_BUFFER_SUPPORTED
#endif
#endif


/* Private buffer controller object */

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

  JDIMENSION iMCU_row_num;	/* iMCU row # within image */
  JDIMENSION mcu_ctr;		/* counts MCUs processed in current row */
  int MCU_vert_offset;		/* counts MCU rows within iMCU row */
  int MCU_rows_per_iMCU_row;	/* number of such rows needed */

  /* For single-pass compression, it's sufficient to buffer just one MCU
   * (although this may prove a bit slow in practice).  We allocate a
   * workspace of C_MAX_BLOCKS_IN_MCU coefficient blocks, and reuse it for each
   * MCU constructed and sent.  (On 80x86, the workspace is FAR even though
   * it's not really very big; this is to keep the module interfaces unchanged
   * when a large coefficient buffer is necessary.)
   * In multi-pass modes, this array points to the current MCU's blocks
   * within the virtual arrays.
   */
  JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU];

  /* In multi-pass modes, we need a virtual block array for each component. */
  jvirt_barray_ptr whole_image[MAX_COMPONENTS];
} my_coef_controller;

typedef my_coef_controller * my_coef_ptr;


/* Forward declarations */
METHODDEF(boolean) compress_data
    JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
#ifdef FULL_COEF_BUFFER_SUPPORTED
METHODDEF(boolean) compress_first_pass
    JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
METHODDEF(boolean) compress_output
    JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
#endif


LOCAL(void)
start_iMCU_row (j_compress_ptr cinfo)
/* Reset within-iMCU-row counters for a new row */
{
  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;

  /* In an interleaved scan, an MCU row is the same as an iMCU row.
   * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows.
   * But at the bottom of the image, process only what's left.
   */
  if (cinfo->comps_in_scan > 1) {
    coef->MCU_rows_per_iMCU_row = 1;
  } else {
    if (coef->iMCU_row_num < (cinfo->total_iMCU_rows-1))
      coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor;
    else
      coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height;
  }

  coef->mcu_ctr = 0;
  coef->MCU_vert_offset = 0;
}


/*
 * Initialize for a processing pass.
 */

METHODDEF(void)
start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
{
  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;

  coef->iMCU_row_num = 0;
  start_iMCU_row(cinfo);

  switch (pass_mode) {
  case JBUF_PASS_THRU:
    if (coef->whole_image[0] != NULL)
      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
    coef->pub.compress_data = compress_data;
    break;
#ifdef FULL_COEF_BUFFER_SUPPORTED
  case JBUF_SAVE_AND_PASS:
    if (coef->whole_image[0] == NULL)
      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
    coef->pub.compress_data = compress_first_pass;
    break;
  case JBUF_CRANK_DEST:
    if (coef->whole_image[0] == NULL)
      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
    coef->pub.compress_data = compress_output;
    break;
#endif
  default:
    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
    break;
  }
}


/*
 * Process some data in the single-pass case.
 * We process the equivalent of one fully interleaved MCU row ("iMCU" row)
 * per call, ie, v_samp_factor block rows for each component in the image.
 * Returns TRUE if the iMCU row is completed, FALSE if suspended.
 *
 * NB: input_buf contains a plane for each component in image.
 * For single pass, this is the same as the components in the scan.
 */

METHODDEF(boolean)
compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
{
  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
  JDIMENSION MCU_col_num;	/* index of current MCU within row */
  JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1;
  JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
  int blkn, bi, ci, yindex, yoffset, blockcnt;
  JDIMENSION ypos, xpos;
  jpeg_component_info *compptr;

  /* Loop to write as much as one whole iMCU row */
  for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;
       yoffset++) {
    for (MCU_col_num = coef->mcu_ctr; MCU_col_num <= last_MCU_col;
	 MCU_col_num++) {
      /* Determine where data comes from in input_buf and do the DCT thing.
       * Each call on forward_DCT processes a horizontal row of DCT blocks
       * as wide as an MCU; we rely on having allocated the MCU_buffer[] blocks
       * sequentially.  Dummy blocks at the right or bottom edge are filled in
       * specially.  The data in them does not matter for image reconstruction,
       * so we fill them with values that will encode to the smallest amount of
       * data, viz: all zeroes in the AC entries, DC entries equal to previous
       * block's DC value.  (Thanks to Thomas Kinsman for this idea.)
       */
      blkn = 0;
      for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
	compptr = cinfo->cur_comp_info[ci];
	blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width
						: compptr->last_col_width;
	xpos = MCU_col_num * compptr->MCU_sample_width;
	ypos = yoffset * DCTSIZE; /* ypos == (yoffset+yindex) * DCTSIZE */
	for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
	  if (coef->iMCU_row_num < last_iMCU_row ||
	      yoffset+yindex < compptr->last_row_height) {
	    (*cinfo->fdct->forward_DCT) (cinfo, compptr,
					 input_buf[ci], coef->MCU_buffer[blkn],
					 ypos, xpos, (JDIMENSION) blockcnt);
	    if (blockcnt < compptr->MCU_width) {
	      /* Create some dummy blocks at the right edge of the image. */
	      jzero_far((void FAR *) coef->MCU_buffer[blkn + blockcnt],
			(compptr->MCU_width - blockcnt) * SIZEOF(JBLOCK));
	      for (bi = blockcnt; bi < compptr->MCU_width; bi++) {
		coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn+bi-1][0][0];
	      }
	    }
	  } else {
	    /* Create a row of dummy blocks at the bottom of the image. */
	    jzero_far((void FAR *) coef->MCU_buffer[blkn],
		      compptr->MCU_width * SIZEOF(JBLOCK));
	    for (bi = 0; bi < compptr->MCU_width; bi++) {
	      coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn-1][0][0];
	    }
	  }
	  blkn += compptr->MCU_width;
	  ypos += DCTSIZE;
	}
      }
      /* Try to write the MCU.  In event of a suspension failure, we will
       * re-DCT the MCU on restart (a bit inefficient, could be fixed...)
       */
      if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) {
	/* Suspension forced; update state counters and exit */
	coef->MCU_vert_offset = yoffset;
	coef->mcu_ctr = MCU_col_num;
	return FALSE;
      }
    }
    /* Completed an MCU row, but perhaps not an iMCU row */
    coef->mcu_ctr = 0;
  }
  /* Completed the iMCU row, advance counters for next one */
  coef->iMCU_row_num++;
  start_iMCU_row(cinfo);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色噜噜狠狠一区二区三区果冻| 午夜精品福利视频网站| 欧美mv日韩mv亚洲| 欧美va在线播放| 日韩欧美国产麻豆| 亚洲精品一区二区三区蜜桃下载 | 色久优优欧美色久优优| 色综合欧美在线视频区| 欧美综合久久久| 3atv一区二区三区| www激情久久| 亚洲男同1069视频| 亚洲日本免费电影| 亚洲mv在线观看| 免费观看久久久4p| 国产一区二区三区| 91亚洲国产成人精品一区二区三| 99精品视频在线免费观看| 色av综合在线| 日韩视频免费观看高清完整版在线观看| 精品毛片乱码1区2区3区| 欧美国产成人精品| 亚洲成人先锋电影| 国产精品一区二区男女羞羞无遮挡| 国产毛片一区二区| 成人黄色国产精品网站大全在线免费观看| 99久久亚洲一区二区三区青草| 91成人免费电影| 亚洲精品在线三区| 一区二区三区在线高清| 裸体歌舞表演一区二区| 99精品国产视频| 久久伊人蜜桃av一区二区| 国产精品免费视频观看| 欧美一区二区三区色| 国产精品高潮呻吟| 捆绑变态av一区二区三区| 99国产一区二区三精品乱码| 日韩一区二区三区四区| 亚洲精品国久久99热| 狠狠色狠狠色综合日日91app| 在线观看亚洲精品| 久久网这里都是精品| 天天色天天操综合| www.亚洲色图.com| 久久午夜国产精品| 亚洲成a人片在线不卡一二三区| 国产精品99久| 亚洲视频一区二区在线| 亚洲精品中文字幕乱码三区| 久久国产精品72免费观看| 欧美中文字幕一区二区三区| 国产农村妇女毛片精品久久麻豆| 一区二区三区日韩| 波多野结衣中文字幕一区二区三区| 日韩丝袜情趣美女图片| 亚洲国产欧美日韩另类综合| av激情亚洲男人天堂| 国产亚洲精品资源在线26u| 日日嗨av一区二区三区四区| 欧美最猛性xxxxx直播| 国产精品午夜春色av| 国产一区二区三区日韩| 日韩欧美一区二区免费| 日韩精品电影在线观看| 色婷婷av一区| 亚洲免费观看在线视频| eeuss鲁片一区二区三区| 国产视频在线观看一区二区三区| 日日摸夜夜添夜夜添精品视频| 欧美无人高清视频在线观看| 亚洲欧洲国产日韩| 91小宝寻花一区二区三区| 国产精品免费观看视频| 成人黄动漫网站免费app| 欧美国产激情二区三区| 粉嫩高潮美女一区二区三区| 欧美激情中文不卡| jvid福利写真一区二区三区| 国产精品卡一卡二| 93久久精品日日躁夜夜躁欧美| 欧美激情一区二区三区在线| 不卡视频在线观看| 一区二区中文视频| 色婷婷综合久久久| 亚洲国产色一区| 日韩视频一区二区三区| 激情图片小说一区| 亚洲国产精品高清| 在线这里只有精品| 石原莉奈在线亚洲二区| 久久日韩精品一区二区五区| 国产乱码精品一区二区三区忘忧草 | 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 欧美日韩一区二区在线视频| 亚洲123区在线观看| 日韩精品一区二区三区视频在线观看| 日韩av不卡在线观看| 久久精品视频一区二区| 欧美日韩一区二区三区在线| 午夜精品久久久久久久| 欧美一二区视频| 国产精品夜夜嗨| 亚洲制服欧美中文字幕中文字幕| 在线综合+亚洲+欧美中文字幕| 久久aⅴ国产欧美74aaa| 国产精品国产成人国产三级| 欧美日韩一区精品| 国产成人免费9x9x人网站视频| 亚洲激情av在线| 久久综合九色综合欧美98| 色综合天天综合网天天狠天天| 秋霞午夜鲁丝一区二区老狼| 国产亚洲精品免费| 欧美日韩一区二区在线观看| 国产精品一区二区黑丝| 亚洲成人高清在线| 中文字幕乱码一区二区免费| 欧美日韩一卡二卡| 国产91在线观看丝袜| 欧美bbbbb| 一区二区在线观看免费视频播放| 欧美xxxx老人做受| 欧美午夜精品电影| 韩国欧美国产一区| 一区二区在线观看不卡| 国产欧美日本一区二区三区| 欧美一区二区三区小说| 91国产视频在线观看| 国产经典欧美精品| 美腿丝袜亚洲三区| 亚洲午夜精品17c| 亚洲欧美色一区| 国产精品国产成人国产三级| 久久久久久久电影| 精品久久久久久久人人人人传媒| 欧美自拍丝袜亚洲| 一本色道久久综合狠狠躁的推荐 | 亚洲电影一级片| 亚洲免费色视频| 中文字幕亚洲一区二区va在线| 亚洲精品一区二区三区香蕉| 欧美一二三区在线| 91精品麻豆日日躁夜夜躁| 在线观看免费亚洲| 一本久久a久久免费精品不卡| 波多野结衣在线aⅴ中文字幕不卡| 国产一区二区在线观看免费| 国产美女在线观看一区| 韩国成人在线视频| 国产一区二区成人久久免费影院| 青草国产精品久久久久久| 香蕉久久一区二区不卡无毒影院 | 一区二区三区在线免费| 亚洲图片另类小说| 亚洲精品免费看| 亚洲国产精品影院| 日韩中文字幕一区二区三区| 亚洲成人免费视| 久久精品国产77777蜜臀| 麻豆视频观看网址久久| 国产一区二三区| 成人福利视频网站| 在线看国产一区二区| 欧美日韩精品一区二区三区四区| 欧美日韩国产经典色站一区二区三区 | jlzzjlzz国产精品久久| 91在线国产福利| 欧美日韩一区小说| 91精品国产一区二区| 亚洲精品在线电影| 亚洲欧洲美洲综合色网| 午夜精品一区二区三区电影天堂| 国产在线视频不卡二| av在线不卡电影| 欧美日韩黄视频| 久久久久久久久久久久久久久99 | 粉嫩av一区二区三区粉嫩| 91免费在线看| 欧美一区二区三区视频| 国产精品午夜免费| 香蕉久久夜色精品国产使用方法 | 成人丝袜视频网| 日本高清无吗v一区| 欧美zozo另类异族| 一区二区三区中文字幕电影 | 日韩欧美在线1卡| 国产精品入口麻豆原神| 亚洲bt欧美bt精品| 丁香婷婷综合网| 欧美一区二区三区在线观看 | 懂色中文一区二区在线播放| 欧美在线制服丝袜| 欧美国产日韩一二三区| 日韩av一区二| 在线免费观看视频一区| 亚洲国产高清在线观看视频| 免费观看成人鲁鲁鲁鲁鲁视频| aaa亚洲精品一二三区| 日韩精品在线看片z|