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

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

?? jdmaster.c

?? 常好且全面的jpeg圖像壓縮算法
?? C
?? 第 1 頁 / 共 2 頁
字號:
 * We also initialize the decompressor input side to begin consuming data.
 *
 * Since jpeg_read_header has finished, we know what is in the SOF
 * and (first) SOS markers.  We also have all the application parameter
 * settings.
 */

LOCAL(void)
master_selection (j_decompress_ptr cinfo)
{
  my_master_ptr master = (my_master_ptr) cinfo->master;
  boolean use_c_buffer;
  long samplesperrow;
  JDIMENSION jd_samplesperrow;

  /* Initialize dimensions and other stuff */
  jpeg_calc_output_dimensions(cinfo);
  prepare_range_limit_table(cinfo);

  /* Width of an output scanline must be representable as JDIMENSION. */
  samplesperrow = (long) cinfo->output_width * (long) cinfo->out_color_components;
  jd_samplesperrow = (JDIMENSION) samplesperrow;
  if ((long) jd_samplesperrow != samplesperrow)
    ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);

  /* Initialize my private state */
  master->pass_number = 0;
  master->using_merged_upsample = use_merged_upsample(cinfo);

  /* Color quantizer selection */
  master->quantizer_1pass = NULL;
  master->quantizer_2pass = NULL;
  /* No mode changes if not using buffered-image mode. */
  if (! cinfo->quantize_colors || ! cinfo->buffered_image) {
    cinfo->enable_1pass_quant = FALSE;
    cinfo->enable_external_quant = FALSE;
    cinfo->enable_2pass_quant = FALSE;
  }
  if (cinfo->quantize_colors) {
    if (cinfo->raw_data_out)
      ERREXIT(cinfo, JERR_NOTIMPL);
    /* 2-pass quantizer only works in 3-component color space. */
    if (cinfo->out_color_components != 3) {
      cinfo->enable_1pass_quant = TRUE;
      cinfo->enable_external_quant = FALSE;
      cinfo->enable_2pass_quant = FALSE;
      cinfo->colormap = NULL;
    } else if (cinfo->colormap != NULL) {
      cinfo->enable_external_quant = TRUE;
    } else if (cinfo->two_pass_quantize) {
      cinfo->enable_2pass_quant = TRUE;
    } else {
      cinfo->enable_1pass_quant = TRUE;
    }

    if (cinfo->enable_1pass_quant) {
#ifdef QUANT_1PASS_SUPPORTED
      jinit_1pass_quantizer(cinfo);
      master->quantizer_1pass = cinfo->cquantize;
#else
      ERREXIT(cinfo, JERR_NOT_COMPILED);
#endif
    }

    /* We use the 2-pass code to map to external colormaps. */
    if (cinfo->enable_2pass_quant || cinfo->enable_external_quant) {
#ifdef QUANT_2PASS_SUPPORTED
      jinit_2pass_quantizer(cinfo);
      master->quantizer_2pass = cinfo->cquantize;
#else
      ERREXIT(cinfo, JERR_NOT_COMPILED);
#endif
    }
    /* If both quantizers are initialized, the 2-pass one is left active;
     * this is necessary for starting with quantization to an external map.
     */
  }

  /* Post-processing: in particular, color conversion first */
  if (! cinfo->raw_data_out) {
    if (master->using_merged_upsample) {
#ifdef UPSAMPLE_MERGING_SUPPORTED
      jinit_merged_upsampler(cinfo); /* does color conversion too */
#else
      ERREXIT(cinfo, JERR_NOT_COMPILED);
#endif
    } else {
      jinit_color_deconverter(cinfo);
      jinit_upsampler(cinfo);
    }
    jinit_d_post_controller(cinfo, cinfo->enable_2pass_quant);
  }
  /* Inverse DCT */
  jinit_inverse_dct(cinfo);
  /* Entropy decoding: either Huffman or arithmetic coding. */
  if (cinfo->arith_code) {
    ERREXIT(cinfo, JERR_ARITH_NOTIMPL);
  } else {
    if (cinfo->progressive_mode) {
#ifdef D_PROGRESSIVE_SUPPORTED
      jinit_phuff_decoder(cinfo);
#else
      ERREXIT(cinfo, JERR_NOT_COMPILED);
#endif
    } else
      jinit_huff_decoder(cinfo);
  }

  /* Initialize principal buffer controllers. */
  use_c_buffer = cinfo->inputctl->has_multiple_scans || cinfo->buffered_image;
  jinit_d_coef_controller(cinfo, use_c_buffer);

  if (! cinfo->raw_data_out)
    jinit_d_main_controller(cinfo, FALSE /* never need full buffer here */);

  /* We can now tell the memory manager to allocate virtual arrays. */
  (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo);

  /* Initialize input side of decompressor to consume first scan. */
  (*cinfo->inputctl->start_input_pass) (cinfo);

#ifdef D_MULTISCAN_FILES_SUPPORTED
  /* If jpeg_start_decompress will read the whole file, initialize
   * progress monitoring appropriately.  The input step is counted
   * as one pass.
   */
  if (cinfo->progress != NULL && ! cinfo->buffered_image &&
      cinfo->inputctl->has_multiple_scans) {
    int nscans;
    /* Estimate number of scans to set pass_limit. */
    if (cinfo->progressive_mode) {
      /* Arbitrarily estimate 2 interleaved DC scans + 3 AC scans/component. */
      nscans = 2 + 3 * cinfo->num_components;
    } else {
      /* For a nonprogressive multiscan file, estimate 1 scan per component. */
      nscans = cinfo->num_components;
    }
    cinfo->progress->pass_counter = 0L;
    cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans;
    cinfo->progress->completed_passes = 0;
    cinfo->progress->total_passes = (cinfo->enable_2pass_quant ? 3 : 2);
    /* Count the input pass as done */
    master->pass_number++;
  }
#endif /* D_MULTISCAN_FILES_SUPPORTED */
}


/*
 * Per-pass setup.
 * This is called at the beginning of each output pass.  We determine which
 * modules will be active during this pass and give them appropriate
 * start_pass calls.  We also set is_dummy_pass to indicate whether this
 * is a "real" output pass or a dummy pass for color quantization.
 * (In the latter case, jdapistd.c will crank the pass to completion.)
 */

METHODDEF(void)
prepare_for_output_pass (j_decompress_ptr cinfo)
{
  my_master_ptr master = (my_master_ptr) cinfo->master;

  if (master->pub.is_dummy_pass) {
#ifdef QUANT_2PASS_SUPPORTED
    /* Final pass of 2-pass quantization */
    master->pub.is_dummy_pass = FALSE;
    (*cinfo->cquantize->start_pass) (cinfo, FALSE);
    (*cinfo->post->start_pass) (cinfo, JBUF_CRANK_DEST);
    (*cinfo->main->start_pass) (cinfo, JBUF_CRANK_DEST);
#else
    ERREXIT(cinfo, JERR_NOT_COMPILED);
#endif /* QUANT_2PASS_SUPPORTED */
  } else {
    if (cinfo->quantize_colors && cinfo->colormap == NULL) {
      /* Select new quantization method */
      if (cinfo->two_pass_quantize && cinfo->enable_2pass_quant) {
	cinfo->cquantize = master->quantizer_2pass;
	master->pub.is_dummy_pass = TRUE;
      } else if (cinfo->enable_1pass_quant) {
	cinfo->cquantize = master->quantizer_1pass;
      } else {
	ERREXIT(cinfo, JERR_MODE_CHANGE);
      }
    }
    (*cinfo->idct->start_pass) (cinfo);
    (*cinfo->coef->start_output_pass) (cinfo);
    if (! cinfo->raw_data_out) {
      if (! master->using_merged_upsample)
	(*cinfo->cconvert->start_pass) (cinfo);
      (*cinfo->upsample->start_pass) (cinfo);
      if (cinfo->quantize_colors)
	(*cinfo->cquantize->start_pass) (cinfo, master->pub.is_dummy_pass);
      (*cinfo->post->start_pass) (cinfo,
	    (master->pub.is_dummy_pass ? JBUF_SAVE_AND_PASS : JBUF_PASS_THRU));
      (*cinfo->main->start_pass) (cinfo, JBUF_PASS_THRU);
    }
  }

  /* Set up progress monitor's pass info if present */
  if (cinfo->progress != NULL) {
    cinfo->progress->completed_passes = master->pass_number;
    cinfo->progress->total_passes = master->pass_number +
				    (master->pub.is_dummy_pass ? 2 : 1);
    /* In buffered-image mode, we assume one more output pass if EOI not
     * yet reached, but no more passes if EOI has been reached.
     */
    if (cinfo->buffered_image && ! cinfo->inputctl->eoi_reached) {
      cinfo->progress->total_passes += (cinfo->enable_2pass_quant ? 2 : 1);
    }
  }
}


/*
 * Finish up at end of an output pass.
 */

METHODDEF(void)
finish_output_pass (j_decompress_ptr cinfo)
{
  my_master_ptr master = (my_master_ptr) cinfo->master;

  if (cinfo->quantize_colors)
    (*cinfo->cquantize->finish_pass) (cinfo);
  master->pass_number++;
}


#ifdef D_MULTISCAN_FILES_SUPPORTED

/*
 * Switch to a new external colormap between output passes.
 */

GLOBAL(void)
jpeg_new_colormap (j_decompress_ptr cinfo)
{
  my_master_ptr master = (my_master_ptr) cinfo->master;

  /* Prevent application from calling me at wrong times */
  if (cinfo->global_state != DSTATE_BUFIMAGE)
    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);

  if (cinfo->quantize_colors && cinfo->enable_external_quant &&
      cinfo->colormap != NULL) {
    /* Select 2-pass quantizer for external colormap use */
    cinfo->cquantize = master->quantizer_2pass;
    /* Notify quantizer of colormap change */
    (*cinfo->cquantize->new_color_map) (cinfo);
    master->pub.is_dummy_pass = FALSE; /* just in case */
  } else
    ERREXIT(cinfo, JERR_MODE_CHANGE);
}

#endif /* D_MULTISCAN_FILES_SUPPORTED */


/*
 * Initialize master decompression control and select active modules.
 * This is performed at the start of jpeg_start_decompress.
 */

GLOBAL(void)
jinit_master_decompress (j_decompress_ptr cinfo)
{
  my_master_ptr master;

  master = (my_master_ptr)
      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
				  SIZEOF(my_decomp_master));
  cinfo->master = (struct jpeg_decomp_master *) master;
  master->pub.prepare_for_output_pass = prepare_for_output_pass;
  master->pub.finish_output_pass = finish_output_pass;

  master->pub.is_dummy_pass = FALSE;

  master_selection(cinfo);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产人妖乱国产精品人妖| 激情成人综合网| 精品视频1区2区| 在线观看网站黄不卡| 国产欧美综合色| 国产精品1区二区.| 亚洲丝袜美腿综合| 91.麻豆视频| 成人一区二区三区| 天使萌一区二区三区免费观看| 国产99精品国产| 麻豆精品在线视频| 中文字幕一区二区三区在线观看| 欧美日韩精品一区二区天天拍小说 | 午夜激情一区二区三区| 精品久久久久久综合日本欧美| 99精品国产热久久91蜜凸| 日本女人一区二区三区| 在线亚洲+欧美+日本专区| 国产麻豆精品95视频| 亚洲高清中文字幕| 中文字幕免费不卡| 91精品国产乱码久久蜜臀| 色综合久久九月婷婷色综合| 东方aⅴ免费观看久久av| 奇米色一区二区| 亚洲成年人影院| 最新国产精品久久精品| 久久青草欧美一区二区三区| 欧美一卡2卡3卡4卡| 欧美性猛片xxxx免费看久爱| thepron国产精品| 国产精品888| 欧美国产精品中文字幕| 欧美va天堂va视频va在线| 欧美浪妇xxxx高跟鞋交| 51精品秘密在线观看| 欧美精品久久天天躁| 在线不卡欧美精品一区二区三区| 欧美日韩视频第一区| 欧美三级中文字幕在线观看| 欧美日韩精品欧美日韩精品一综合| 91成人网在线| 7777精品伊人久久久大香线蕉经典版下载 | 国产日产欧产精品推荐色| 欧美一级生活片| 欧美精品三级在线观看| 色又黄又爽网站www久久| 国产成人精品三级麻豆| 国产乱理伦片在线观看夜一区| 人人超碰91尤物精品国产| 视频一区二区中文字幕| 天天做天天摸天天爽国产一区| 亚洲精品日日夜夜| 亚洲人成影院在线观看| 亚洲免费资源在线播放| 亚洲欧美激情插| 亚洲欧美日韩中文播放| 亚洲精品亚洲人成人网在线播放| 亚洲人成网站在线| 一级特黄大欧美久久久| 亚洲欧美激情视频在线观看一区二区三区 | 日韩视频一区二区三区在线播放 | 国产欧美日韩在线看| 国产精品进线69影院| 亚洲免费在线电影| 天天综合日日夜夜精品| 久久99久久久欧美国产| 丰满少妇久久久久久久| 91成人免费网站| 欧美成人综合网站| 中文字幕一区二区三| 一区二区三区欧美激情| 久久aⅴ国产欧美74aaa| 99久久99久久精品免费观看| 91精品国产综合久久精品性色| 久久综合精品国产一区二区三区| 日韩理论片一区二区| 日本大胆欧美人术艺术动态| 成人精品小蝌蚪| 欧美日韩aaa| 国产精品午夜久久| 五月天激情小说综合| 国产成人自拍网| 欧美日韩一区成人| 国产精品久久久久久亚洲毛片| 亚洲高清免费观看| 大陆成人av片| 日韩一区二区三区在线视频| 国产精品久久久久久久久快鸭 | 国产精品乱人伦中文| 亚洲丰满少妇videoshd| 成人午夜av影视| 欧美一区二区三区成人| 成人免费在线播放视频| 精品一区二区国语对白| 欧美色欧美亚洲另类二区| 国产欧美日韩精品在线| 欧美a级一区二区| 在线观看视频91| 国产精品理伦片| 精久久久久久久久久久| 欧美人与性动xxxx| 日韩理论在线观看| 国产99精品国产| 精品日产卡一卡二卡麻豆| 亚洲第一福利一区| 91亚洲永久精品| 欧美激情一区二区三区四区 | 麻豆专区一区二区三区四区五区| 色综合天天综合网天天狠天天| 国产三级精品三级在线专区| 麻豆精品蜜桃视频网站| 欧美猛男男办公室激情| 一区二区三区免费看视频| av电影天堂一区二区在线观看| 精品国产成人系列| 日本欧美一区二区在线观看| 日本韩国一区二区三区| 亚洲男同1069视频| 99免费精品视频| 国产欧美日韩另类视频免费观看| 美腿丝袜亚洲三区| 91精品国产91久久综合桃花| 亚洲国产婷婷综合在线精品| 91国产丝袜在线播放| 亚洲天堂2014| 成人国产亚洲欧美成人综合网| 国产欧美日韩精品一区| 亚洲成av人片一区二区| 欧美日韩综合一区| 一区二区三区精品视频在线| 91亚洲国产成人精品一区二区三 | 久久国产精品72免费观看| 日韩欧美自拍偷拍| 欧美aaaaaa午夜精品| 日韩一区二区三区在线观看| 美洲天堂一区二卡三卡四卡视频| 日韩一区二区免费高清| 久久精工是国产品牌吗| 精品国产亚洲在线| 国产精品亚洲一区二区三区在线 | 91电影在线观看| 日韩毛片视频在线看| 成人av网站免费| 久久久久久黄色| 国产一区二区三区在线观看免费视频 | 久久9热精品视频| 日韩欧美一二三| 青青青爽久久午夜综合久久午夜| 欧美福利视频导航| 婷婷成人综合网| 欧美日韩视频在线一区二区| 午夜影院久久久| 91精品国产色综合久久不卡电影 | 欧美v国产在线一区二区三区| 黑人巨大精品欧美一区| 国产精品色噜噜| 欧美日韩国产区一| 日本三级亚洲精品| 中文字幕乱码久久午夜不卡| 91麻豆自制传媒国产之光| 亚洲国产aⅴ成人精品无吗| 亚洲动漫第一页| 日韩三区在线观看| 国产高清亚洲一区| 亚洲最快最全在线视频| 日韩午夜激情视频| 国产69精品久久久久毛片| 一区二区三区在线免费播放| 5566中文字幕一区二区电影| 国产91丝袜在线播放0| 一区二区三区波多野结衣在线观看| 777亚洲妇女| 国产高清不卡二三区| 亚洲一卡二卡三卡四卡| 日韩精品中文字幕一区二区三区| 成人丝袜高跟foot| 午夜精品福利一区二区三区蜜桃| 精品女同一区二区| 91国产免费看| 国产精品亚洲一区二区三区妖精| 亚洲欧美精品午睡沙发| 久久午夜羞羞影院免费观看| 91久久国产综合久久| 国产精品888| 婷婷久久综合九色综合绿巨人| 国产女人水真多18毛片18精品视频| 欧美日韩卡一卡二| 粉嫩一区二区三区性色av| 亚洲va欧美va国产va天堂影院| 久久久电影一区二区三区| 欧美中文字幕一二三区视频| 国产成人在线网站| 琪琪久久久久日韩精品| 亚洲女与黑人做爰| 国产欧美日韩激情| 精品国产一区二区三区久久久蜜月| 色综合久久久久久久| 国产大陆亚洲精品国产|