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

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

?? jcmaster.c

?? 支持各種柵格圖像和矢量圖像讀取的庫
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * jcmaster.c * * Copyright (C) 1991-1997, 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 master control logic for the JPEG compressor. * These routines are concerned with parameter validation, initial setup, * and inter-pass control (determining the number of passes and the work  * to be done in each pass). */#define JPEG_INTERNALS#include "jinclude.h"#include "jpeglib.h"/* Private state */typedef enum {	main_pass,		/* input data, also do first output step */	huff_opt_pass,		/* Huffman code optimization pass */	output_pass		/* data output pass */} c_pass_type;typedef struct {  struct jpeg_comp_master pub;	/* public fields */  c_pass_type pass_type;	/* the type of the current pass */  int pass_number;		/* # of passes completed */  int total_passes;		/* total # of passes needed */  int scan_number;		/* current index in scan_info[] */} my_comp_master;typedef my_comp_master * my_master_ptr;/* * Support routines that do various essential calculations. */LOCAL(void)initial_setup (j_compress_ptr cinfo)/* Do computations that are needed before master selection phase */{  int ci;  jpeg_component_info *compptr;  long samplesperrow;  JDIMENSION jd_samplesperrow;  /* Sanity check on image dimensions */  if (cinfo->image_height <= 0 || cinfo->image_width <= 0      || cinfo->num_components <= 0 || cinfo->input_components <= 0)    ERREXIT(cinfo, JERR_EMPTY_IMAGE);  /* Make sure image isn't bigger than I can handle */  if ((long) cinfo->image_height > (long) JPEG_MAX_DIMENSION ||      (long) cinfo->image_width > (long) JPEG_MAX_DIMENSION)    ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION);  /* Width of an input scanline must be representable as JDIMENSION. */  samplesperrow = (long) cinfo->image_width * (long) cinfo->input_components;  jd_samplesperrow = (JDIMENSION) samplesperrow;  if ((long) jd_samplesperrow != samplesperrow)    ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);  /* For now, precision must match compiled-in value... */  if (cinfo->data_precision != BITS_IN_JSAMPLE)    ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision);  /* Check that number of components won't exceed internal array sizes */  if (cinfo->num_components > MAX_COMPONENTS)    ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,	     MAX_COMPONENTS);  /* Compute maximum sampling factors; check factor validity */  cinfo->max_h_samp_factor = 1;  cinfo->max_v_samp_factor = 1;  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;       ci++, compptr++) {    if (compptr->h_samp_factor<=0 || compptr->h_samp_factor>MAX_SAMP_FACTOR ||	compptr->v_samp_factor<=0 || compptr->v_samp_factor>MAX_SAMP_FACTOR)      ERREXIT(cinfo, JERR_BAD_SAMPLING);    cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor,				   compptr->h_samp_factor);    cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor,				   compptr->v_samp_factor);  }  /* Compute dimensions of components */  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;       ci++, compptr++) {    /* Fill in the correct component_index value; don't rely on application */    compptr->component_index = ci;    /* For compression, we never do DCT scaling. */    compptr->DCT_scaled_size = DCTSIZE;    /* Size in DCT blocks */    compptr->width_in_blocks = (JDIMENSION)      jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,		    (long) (cinfo->max_h_samp_factor * DCTSIZE));    compptr->height_in_blocks = (JDIMENSION)      jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,		    (long) (cinfo->max_v_samp_factor * DCTSIZE));    /* Size in samples */    compptr->downsampled_width = (JDIMENSION)      jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,		    (long) cinfo->max_h_samp_factor);    compptr->downsampled_height = (JDIMENSION)      jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,		    (long) cinfo->max_v_samp_factor);    /* Mark component needed (this flag isn't actually used for compression) */    compptr->component_needed = TRUE;  }  /* Compute number of fully interleaved MCU rows (number of times that   * main controller will call coefficient controller).   */  cinfo->total_iMCU_rows = (JDIMENSION)    jdiv_round_up((long) cinfo->image_height,		  (long) (cinfo->max_v_samp_factor*DCTSIZE));}#ifdef C_MULTISCAN_FILES_SUPPORTEDLOCAL(void)validate_script (j_compress_ptr cinfo)/* Verify that the scan script in cinfo->scan_info[] is valid; also * determine whether it uses progressive JPEG, and set cinfo->progressive_mode. */{  const jpeg_scan_info * scanptr;  int scanno, ncomps, ci, coefi, thisi;  int Ss, Se, Ah, Al;  boolean component_sent[MAX_COMPONENTS];#ifdef C_PROGRESSIVE_SUPPORTED  int * last_bitpos_ptr;  int last_bitpos[MAX_COMPONENTS][DCTSIZE2];  /* -1 until that coefficient has been seen; then last Al for it */#endif  if (cinfo->num_scans <= 0)    ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, 0);  /* For sequential JPEG, all scans must have Ss=0, Se=DCTSIZE2-1;   * for progressive JPEG, no scan can have this.   */  scanptr = cinfo->scan_info;  if (scanptr->Ss != 0 || scanptr->Se != DCTSIZE2-1) {#ifdef C_PROGRESSIVE_SUPPORTED    cinfo->progressive_mode = TRUE;    last_bitpos_ptr = & last_bitpos[0][0];    for (ci = 0; ci < cinfo->num_components; ci++)       for (coefi = 0; coefi < DCTSIZE2; coefi++)	*last_bitpos_ptr++ = -1;#else    ERREXIT(cinfo, JERR_NOT_COMPILED);#endif  } else {    cinfo->progressive_mode = FALSE;    for (ci = 0; ci < cinfo->num_components; ci++)       component_sent[ci] = FALSE;  }  for (scanno = 1; scanno <= cinfo->num_scans; scanptr++, scanno++) {    /* Validate component indexes */    ncomps = scanptr->comps_in_scan;    if (ncomps <= 0 || ncomps > MAX_COMPS_IN_SCAN)      ERREXIT2(cinfo, JERR_COMPONENT_COUNT, ncomps, MAX_COMPS_IN_SCAN);    for (ci = 0; ci < ncomps; ci++) {      thisi = scanptr->component_index[ci];      if (thisi < 0 || thisi >= cinfo->num_components)	ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno);      /* Components must appear in SOF order within each scan */      if (ci > 0 && thisi <= scanptr->component_index[ci-1])	ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno);    }    /* Validate progression parameters */    Ss = scanptr->Ss;    Se = scanptr->Se;    Ah = scanptr->Ah;    Al = scanptr->Al;    if (cinfo->progressive_mode) {#ifdef C_PROGRESSIVE_SUPPORTED      /* The JPEG spec simply gives the ranges 0..13 for Ah and Al, but that       * seems wrong: the upper bound ought to depend on data precision.       * Perhaps they really meant 0..N+1 for N-bit precision.       * Here we allow 0..10 for 8-bit data; Al larger than 10 results in       * out-of-range reconstructed DC values during the first DC scan,       * which might cause problems for some decoders.       */#if BITS_IN_JSAMPLE == 8#define MAX_AH_AL 10#else#define MAX_AH_AL 13#endif      if (Ss < 0 || Ss >= DCTSIZE2 || Se < Ss || Se >= DCTSIZE2 ||	  Ah < 0 || Ah > MAX_AH_AL || Al < 0 || Al > MAX_AH_AL)	ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);      if (Ss == 0) {	if (Se != 0)		/* DC and AC together not OK */	  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);      } else {	if (ncomps != 1)	/* AC scans must be for only one component */	  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);      }      for (ci = 0; ci < ncomps; ci++) {	last_bitpos_ptr = & last_bitpos[scanptr->component_index[ci]][0];	if (Ss != 0 && last_bitpos_ptr[0] < 0) /* AC without prior DC scan */	  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);	for (coefi = Ss; coefi <= Se; coefi++) {	  if (last_bitpos_ptr[coefi] < 0) {	    /* first scan of this coefficient */	    if (Ah != 0)	      ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);	  } else {	    /* not first scan */	    if (Ah != last_bitpos_ptr[coefi] || Al != Ah-1)	      ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);	  }	  last_bitpos_ptr[coefi] = Al;	}      }#endif    } else {      /* For sequential JPEG, all progression parameters must be these: */      if (Ss != 0 || Se != DCTSIZE2-1 || Ah != 0 || Al != 0)	ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);      /* Make sure components are not sent twice */      for (ci = 0; ci < ncomps; ci++) {	thisi = scanptr->component_index[ci];	if (component_sent[thisi])	  ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno);	component_sent[thisi] = TRUE;      }    }  }  /* Now verify that everything got sent. */  if (cinfo->progressive_mode) {#ifdef C_PROGRESSIVE_SUPPORTED    /* For progressive mode, we only check that at least some DC data     * got sent for each component; the spec does not require that all bits     * of all coefficients be transmitted.  Would it be wiser to enforce     * transmission of all coefficient bits??     */    for (ci = 0; ci < cinfo->num_components; ci++) {      if (last_bitpos[ci][0] < 0)	ERREXIT(cinfo, JERR_MISSING_DATA);    }#endif  } else {    for (ci = 0; ci < cinfo->num_components; ci++) {      if (! component_sent[ci])	ERREXIT(cinfo, JERR_MISSING_DATA);    }  }}#endif /* C_MULTISCAN_FILES_SUPPORTED */LOCAL(void)select_scan_parameters (j_compress_ptr cinfo)/* Set up the scan parameters for the current scan */{  int ci;#ifdef C_MULTISCAN_FILES_SUPPORTED  if (cinfo->scan_info != NULL) {    /* Prepare for current scan --- the script is already validated */    my_master_ptr master = (my_master_ptr) cinfo->master;    const jpeg_scan_info * scanptr = cinfo->scan_info + master->scan_number;    cinfo->comps_in_scan = scanptr->comps_in_scan;    for (ci = 0; ci < scanptr->comps_in_scan; ci++) {      cinfo->cur_comp_info[ci] =	&cinfo->comp_info[scanptr->component_index[ci]];    }    cinfo->Ss = scanptr->Ss;    cinfo->Se = scanptr->Se;    cinfo->Ah = scanptr->Ah;    cinfo->Al = scanptr->Al;  }  else#endif  {    /* Prepare for single sequential-JPEG scan containing all components */    if (cinfo->num_components > MAX_COMPS_IN_SCAN)      ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,	       MAX_COMPS_IN_SCAN);    cinfo->comps_in_scan = cinfo->num_components;    for (ci = 0; ci < cinfo->num_components; ci++) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人夜色高潮福利影视| 久久精品999| 国产精品久久久久影院色老大| 精品不卡在线视频| 精品女同一区二区| 91免费看`日韩一区二区| 九九国产精品视频| 国产一区二区伦理| 国产99精品国产| 一本色道久久综合亚洲aⅴ蜜桃 | 一本大道久久a久久精品综合| 成人综合婷婷国产精品久久免费| 成人黄色在线看| 欧美视频中文字幕| 欧美成人vps| 亚洲欧美日韩国产综合| 五月激情六月综合| 国产91精品露脸国语对白| 色呦呦日韩精品| 久久嫩草精品久久久久| 国产精品亲子乱子伦xxxx裸| 亚洲午夜国产一区99re久久| 狠狠色狠狠色综合日日91app| 91麻豆福利精品推荐| 91精品国产综合久久久蜜臀图片| 久久久久久久久久久99999| 91精品国模一区二区三区| 精品日韩av一区二区| 综合色中文字幕| 国产毛片一区二区| 欧美三级电影在线看| 综合激情成人伊人| 国产精品一级二级三级| 欧美日韩国产美女| 亚洲男女一区二区三区| 国产在线国偷精品产拍免费yy| 9191成人精品久久| 亚洲国产日产av| 色狠狠一区二区三区香蕉| 国产精品福利一区二区| 国产一二精品视频| 国产视频一区二区三区在线观看| 日本亚洲一区二区| 欧美一区二区三区四区视频| 夜夜嗨av一区二区三区四季av | 精品av久久707| 国产一区二区三区观看| 久久综合五月天婷婷伊人| 美腿丝袜亚洲一区| 欧美日韩午夜在线| 一区二区三区蜜桃网| 99国产精品国产精品久久| 亚洲欧美乱综合| 97久久精品人人澡人人爽| 亚洲美女视频在线观看| 欧美日韩在线免费视频| 韩国成人精品a∨在线观看| 国产日韩精品一区二区三区在线| 成人av第一页| 五月天丁香久久| 精品国产乱码91久久久久久网站| 国产成人午夜片在线观看高清观看 | 免费观看在线综合色| 久久久午夜精品| 777奇米四色成人影色区| 国产麻豆精品一区二区| 亚洲国产综合在线| 国产欧美一区二区三区沐欲| 色哟哟一区二区在线观看| 加勒比av一区二区| 亚洲va中文字幕| 一区视频在线播放| 久久嫩草精品久久久精品一| 欧美中文字幕一区二区三区| 视频一区视频二区中文| 亚洲精品一线二线三线| 欧美午夜在线一二页| 成人精品一区二区三区中文字幕| 亚洲成人av免费| 一区二区欧美在线观看| 欧美国产一区视频在线观看| 欧美一区二区三区免费观看视频| 91免费视频大全| 91免费观看视频在线| 成人免费视频网站在线观看| 日本不卡一二三| 视频一区中文字幕| 亚洲成人资源在线| 午夜电影一区二区| 午夜成人在线视频| 日韩在线一二三区| 久久www免费人成看片高清| 日日夜夜精品视频免费| 日本不卡1234视频| 久久99精品久久久久| 国产盗摄精品一区二区三区在线| 精品一区二区三区香蕉蜜桃| 亚洲综合激情小说| 午夜精品久久久久久久| 精品写真视频在线观看| 国产一区二区三区黄视频| 色综合天天综合| 成+人+亚洲+综合天堂| www.亚洲国产| 欧美剧情片在线观看| 精品国产乱码久久久久久浪潮 | 日韩av不卡一区二区| 蜜桃av一区二区三区| 成人一级视频在线观看| 97se狠狠狠综合亚洲狠狠| 欧美视频中文字幕| 国产欧美日韩激情| 香蕉久久夜色精品国产使用方法| 国产伦精品一区二区三区免费| 91碰在线视频| 久久综合九色综合97_久久久| 亚洲精品中文字幕乱码三区| 久久电影国产免费久久电影| 99久久精品国产一区| 久久精品夜色噜噜亚洲a∨| 婷婷开心久久网| 91国产免费观看| 国产精品久久一级| 国产v综合v亚洲欧| 亚洲精品一区二区三区99| 日韩经典一区二区| 在线观看一区不卡| 亚洲美女免费视频| 99久久99久久久精品齐齐| 欧美www视频| 亚洲人成小说网站色在线| 丁香另类激情小说| 欧美国产精品劲爆| 波多野结衣在线一区| 久久中文娱乐网| 国产精品中文字幕日韩精品| 精品国产一区二区三区不卡| 精品一二线国产| 久久精品一区八戒影视| 丁香六月综合激情| 亚洲精品免费看| 91精品国产乱| 国产露脸91国语对白| 中文字幕的久久| 在线亚洲高清视频| 久久精品国产99国产| 亚洲国产高清在线| 欧美日韩一区在线观看| 激情欧美一区二区| 欧美国产在线观看| 777久久久精品| jvid福利写真一区二区三区| 亚洲精品免费在线观看| 欧美大片在线观看一区二区| 国产一区二区三区高清播放| 亚洲精品视频免费看| 精品盗摄一区二区三区| 色综合久久66| 国产传媒久久文化传媒| 一区二区三区四区在线| 精品裸体舞一区二区三区| 经典三级视频一区| 亚洲伊人伊色伊影伊综合网| 精品久久人人做人人爱| 欧美日韩一区在线观看| 99视频在线观看一区三区| 美女免费视频一区二区| 最新欧美精品一区二区三区| 欧美α欧美αv大片| 欧美在线免费播放| 在线这里只有精品| 99精品视频一区二区三区| 国产成人精品免费| 黄网站免费久久| 麻豆视频观看网址久久| 日韩在线一区二区| 免费成人性网站| 久久精品国产成人一区二区三区| 亚洲电影你懂得| 琪琪久久久久日韩精品| 午夜欧美在线一二页| 性做久久久久久免费观看| 午夜精品久久久久久| 美美哒免费高清在线观看视频一区二区| 日韩毛片一二三区| 亚洲精品网站在线观看| 五月综合激情网| 蜜桃视频在线观看一区二区| 韩国成人在线视频| 91色视频在线| 9191久久久久久久久久久| 欧美刺激脚交jootjob| 国产精品日日摸夜夜摸av| 亚洲一区二区三区四区的| 亚洲一区二区三区视频在线| 理论电影国产精品| 奇米影视一区二区三区小说| 国产在线不卡视频| 欧美午夜精品久久久| 国产亚洲欧美中文|