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

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

?? jcmarker.c

?? 常好且全面的jpeg圖像壓縮算法
?? C
?? 第 1 頁 / 共 2 頁
字號:
	  td = 0;		/* no DC table either */
      } else {
	td = 0;			/* AC scan */
      }
    }
    emit_byte(cinfo, (td << 4) + ta);
  }

  emit_byte(cinfo, cinfo->Ss);
  emit_byte(cinfo, cinfo->Se);
  emit_byte(cinfo, (cinfo->Ah << 4) + cinfo->Al);
}


LOCAL(void)
emit_jfif_app0 (j_compress_ptr cinfo)
/* Emit a JFIF-compliant APP0 marker */
{
  /*
   * Length of APP0 block	(2 bytes)
   * Block ID			(4 bytes - ASCII "JFIF")
   * Zero byte			(1 byte to terminate the ID string)
   * Version Major, Minor	(2 bytes - major first)
   * Units			(1 byte - 0x00 = none, 0x01 = inch, 0x02 = cm)
   * Xdpu			(2 bytes - dots per unit horizontal)
   * Ydpu			(2 bytes - dots per unit vertical)
   * Thumbnail X size		(1 byte)
   * Thumbnail Y size		(1 byte)
   */
  
  emit_marker(cinfo, M_APP0);
  
  emit_2bytes(cinfo, 2 + 4 + 1 + 2 + 1 + 2 + 2 + 1 + 1); /* length */

  emit_byte(cinfo, 0x4A);	/* Identifier: ASCII "JFIF" */
  emit_byte(cinfo, 0x46);
  emit_byte(cinfo, 0x49);
  emit_byte(cinfo, 0x46);
  emit_byte(cinfo, 0);
  emit_byte(cinfo, cinfo->JFIF_major_version); /* Version fields */
  emit_byte(cinfo, cinfo->JFIF_minor_version);
  emit_byte(cinfo, cinfo->density_unit); /* Pixel size information */
  emit_2bytes(cinfo, (int) cinfo->X_density);
  emit_2bytes(cinfo, (int) cinfo->Y_density);
  emit_byte(cinfo, 0);		/* No thumbnail image */
  emit_byte(cinfo, 0);
}


LOCAL(void)
emit_adobe_app14 (j_compress_ptr cinfo)
/* Emit an Adobe APP14 marker */
{
  /*
   * Length of APP14 block	(2 bytes)
   * Block ID			(5 bytes - ASCII "Adobe")
   * Version Number		(2 bytes - currently 100)
   * Flags0			(2 bytes - currently 0)
   * Flags1			(2 bytes - currently 0)
   * Color transform		(1 byte)
   *
   * Although Adobe TN 5116 mentions Version = 101, all the Adobe files
   * now in circulation seem to use Version = 100, so that's what we write.
   *
   * We write the color transform byte as 1 if the JPEG color space is
   * YCbCr, 2 if it's YCCK, 0 otherwise.  Adobe's definition has to do with
   * whether the encoder performed a transformation, which is pretty useless.
   */
  
  emit_marker(cinfo, M_APP14);
  
  emit_2bytes(cinfo, 2 + 5 + 2 + 2 + 2 + 1); /* length */

  emit_byte(cinfo, 0x41);	/* Identifier: ASCII "Adobe" */
  emit_byte(cinfo, 0x64);
  emit_byte(cinfo, 0x6F);
  emit_byte(cinfo, 0x62);
  emit_byte(cinfo, 0x65);
  emit_2bytes(cinfo, 100);	/* Version */
  emit_2bytes(cinfo, 0);	/* Flags0 */
  emit_2bytes(cinfo, 0);	/* Flags1 */
  switch (cinfo->jpeg_color_space) {
  case JCS_YCbCr:
    emit_byte(cinfo, 1);	/* Color transform = 1 */
    break;
  case JCS_YCCK:
    emit_byte(cinfo, 2);	/* Color transform = 2 */
    break;
  default:
    emit_byte(cinfo, 0);	/* Color transform = 0 */
    break;
  }
}


/*
 * These routines allow writing an arbitrary marker with parameters.
 * The only intended use is to emit COM or APPn markers after calling
 * write_file_header and before calling write_frame_header.
 * Other uses are not guaranteed to produce desirable results.
 * Counting the parameter bytes properly is the caller's responsibility.
 */

METHODDEF(void)
write_marker_header (j_compress_ptr cinfo, int marker, unsigned int datalen)
/* Emit an arbitrary marker header */
{
  if (datalen > (unsigned int) 65533)		/* safety check */
    ERREXIT(cinfo, JERR_BAD_LENGTH);

  emit_marker(cinfo, (JPEG_MARKER) marker);

  emit_2bytes(cinfo, (int) (datalen + 2));	/* total length */
}

METHODDEF(void)
write_marker_byte (j_compress_ptr cinfo, int val)
/* Emit one byte of marker parameters following write_marker_header */
{
  emit_byte(cinfo, val);
}


/*
 * Write datastream header.
 * This consists of an SOI and optional APPn markers.
 * We recommend use of the JFIF marker, but not the Adobe marker,
 * when using YCbCr or grayscale data.  The JFIF marker should NOT
 * be used for any other JPEG colorspace.  The Adobe marker is helpful
 * to distinguish RGB, CMYK, and YCCK colorspaces.
 * Note that an application can write additional header markers after
 * jpeg_start_compress returns.
 */

METHODDEF(void)
write_file_header (j_compress_ptr cinfo)
{
  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;

  emit_marker(cinfo, M_SOI);	/* first the SOI */

  /* SOI is defined to reset restart interval to 0 */
  marker->last_restart_interval = 0;

  if (cinfo->write_JFIF_header)	/* next an optional JFIF APP0 */
    emit_jfif_app0(cinfo);
  if (cinfo->write_Adobe_marker) /* next an optional Adobe APP14 */
    emit_adobe_app14(cinfo);
}


/*
 * Write frame header.
 * This consists of DQT and SOFn markers.
 * Note that we do not emit the SOF until we have emitted the DQT(s).
 * This avoids compatibility problems with incorrect implementations that
 * try to error-check the quant table numbers as soon as they see the SOF.
 */

METHODDEF(void)
write_frame_header (j_compress_ptr cinfo)
{
  int ci, prec;
  boolean is_baseline;
  jpeg_component_info *compptr;
  
  /* Emit DQT for each quantization table.
   * Note that emit_dqt() suppresses any duplicate tables.
   */
  prec = 0;
  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
       ci++, compptr++) {
    prec += emit_dqt(cinfo, compptr->quant_tbl_no);
  }
  /* now prec is nonzero iff there are any 16-bit quant tables. */

  /* Check for a non-baseline specification.
   * Note we assume that Huffman table numbers won't be changed later.
   */
  if (cinfo->arith_code || cinfo->progressive_mode ||
      cinfo->data_precision != 8) {
    is_baseline = FALSE;
  } else {
    is_baseline = TRUE;
    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
	 ci++, compptr++) {
      if (compptr->dc_tbl_no > 1 || compptr->ac_tbl_no > 1)
	is_baseline = FALSE;
    }
    if (prec && is_baseline) {
      is_baseline = FALSE;
      /* If it's baseline except for quantizer size, warn the user */
      TRACEMS(cinfo, 0, JTRC_16BIT_TABLES);
    }
  }

  /* Emit the proper SOF marker */
  if (cinfo->arith_code) {
    emit_sof(cinfo, M_SOF9);	/* SOF code for arithmetic coding */
  } else {
    if (cinfo->progressive_mode)
      emit_sof(cinfo, M_SOF2);	/* SOF code for progressive Huffman */
    else if (is_baseline)
      emit_sof(cinfo, M_SOF0);	/* SOF code for baseline implementation */
    else
      emit_sof(cinfo, M_SOF1);	/* SOF code for non-baseline Huffman file */
  }
}


/*
 * Write scan header.
 * This consists of DHT or DAC markers, optional DRI, and SOS.
 * Compressed data will be written following the SOS.
 */

METHODDEF(void)
write_scan_header (j_compress_ptr cinfo)
{
  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;
  int i;
  jpeg_component_info *compptr;

  if (cinfo->arith_code) {
    /* Emit arith conditioning info.  We may have some duplication
     * if the file has multiple scans, but it's so small it's hardly
     * worth worrying about.
     */
    emit_dac(cinfo);
  } else {
    /* Emit Huffman tables.
     * Note that emit_dht() suppresses any duplicate tables.
     */
    for (i = 0; i < cinfo->comps_in_scan; i++) {
      compptr = cinfo->cur_comp_info[i];
      if (cinfo->progressive_mode) {
	/* Progressive mode: only DC or only AC tables are used in one scan */
	if (cinfo->Ss == 0) {
	  if (cinfo->Ah == 0)	/* DC needs no table for refinement scan */
	    emit_dht(cinfo, compptr->dc_tbl_no, FALSE);
	} else {
	  emit_dht(cinfo, compptr->ac_tbl_no, TRUE);
	}
      } else {
	/* Sequential mode: need both DC and AC tables */
	emit_dht(cinfo, compptr->dc_tbl_no, FALSE);
	emit_dht(cinfo, compptr->ac_tbl_no, TRUE);
      }
    }
  }

  /* Emit DRI if required --- note that DRI value could change for each scan.
   * We avoid wasting space with unnecessary DRIs, however.
   */
  if (cinfo->restart_interval != marker->last_restart_interval) {
    emit_dri(cinfo);
    marker->last_restart_interval = cinfo->restart_interval;
  }

  emit_sos(cinfo);
}


/*
 * Write datastream trailer.
 */

METHODDEF(void)
write_file_trailer (j_compress_ptr cinfo)
{
  emit_marker(cinfo, M_EOI);
}


/*
 * Write an abbreviated table-specification datastream.
 * This consists of SOI, DQT and DHT tables, and EOI.
 * Any table that is defined and not marked sent_table = TRUE will be
 * emitted.  Note that all tables will be marked sent_table = TRUE at exit.
 */

METHODDEF(void)
write_tables_only (j_compress_ptr cinfo)
{
  int i;

  emit_marker(cinfo, M_SOI);

  for (i = 0; i < NUM_QUANT_TBLS; i++) {
    if (cinfo->quant_tbl_ptrs[i] != NULL)
      (void) emit_dqt(cinfo, i);
  }

  if (! cinfo->arith_code) {
    for (i = 0; i < NUM_HUFF_TBLS; i++) {
      if (cinfo->dc_huff_tbl_ptrs[i] != NULL)
	emit_dht(cinfo, i, FALSE);
      if (cinfo->ac_huff_tbl_ptrs[i] != NULL)
	emit_dht(cinfo, i, TRUE);
    }
  }

  emit_marker(cinfo, M_EOI);
}


/*
 * Initialize the marker writer module.
 */

GLOBAL(void)
jinit_marker_writer (j_compress_ptr cinfo)
{
  my_marker_ptr marker;

  /* Create the subobject */
  marker = (my_marker_ptr)
    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
				SIZEOF(my_marker_writer));
  cinfo->marker = (struct jpeg_marker_writer *) marker;
  /* Initialize method pointers */
  marker->pub.write_file_header = write_file_header;
  marker->pub.write_frame_header = write_frame_header;
  marker->pub.write_scan_header = write_scan_header;
  marker->pub.write_file_trailer = write_file_trailer;
  marker->pub.write_tables_only = write_tables_only;
  marker->pub.write_marker_header = write_marker_header;
  marker->pub.write_marker_byte = write_marker_byte;
  /* Initialize private state */
  marker->last_restart_interval = 0;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品欧美一区二区三区| 亚洲一卡二卡三卡四卡无卡久久| 成人欧美一区二区三区白人| 天天综合色天天| 成人av在线资源网站| 日韩欧美不卡在线观看视频| 亚洲男同性视频| 欧美图片一区二区三区| 久久久久久久久97黄色工厂| 亚洲国产一区二区在线播放| 成人h动漫精品| 精品久久久三级丝袜| 亚洲一二三专区| 成人91在线观看| 精品国产欧美一区二区| 午夜精品影院在线观看| 成人激情午夜影院| 久久精品欧美日韩| 日韩国产精品久久久久久亚洲| 欧洲亚洲国产日韩| 亚洲欧洲成人精品av97| 国产乱子伦一区二区三区国色天香| 欧美在线免费播放| 亚洲影院理伦片| 色婷婷av一区二区三区软件| 国产精品日韩精品欧美在线| 国产成人免费在线视频| 久久色在线视频| 国产一区二区三区国产| 日韩免费观看2025年上映的电影| 亚洲bt欧美bt精品| 欧美主播一区二区三区| 一区二区高清免费观看影视大全 | 国产亚洲欧洲一区高清在线观看| 日本免费新一区视频 | www.亚洲色图.com| 国产精品天干天干在线综合| 国产成人精品一区二区三区四区 | 欧美精品一卡两卡| 五月天久久比比资源色| 777奇米四色成人影色区| 午夜在线电影亚洲一区| 91精品久久久久久久久99蜜臂| 亚洲成人在线网站| 欧美一级爆毛片| 狠狠色狠狠色综合| 久久免费看少妇高潮| 国产一区二区剧情av在线| 精品国产区一区| 成人一级视频在线观看| 中文字幕成人在线观看| 色婷婷精品大在线视频| 亚洲成人免费视频| 欧美xxxxxxxx| 豆国产96在线|亚洲| 亚洲免费观看视频| 欧美日韩黄视频| 老司机午夜精品| 国产精品国产三级国产aⅴ中文| 色妹子一区二区| 婷婷六月综合亚洲| 久久久久久久久久电影| 色悠悠久久综合| 日本亚洲视频在线| 国产精品久久久久影院色老大| 色婷婷久久99综合精品jk白丝 | 91麻豆精品国产91久久久使用方法 | 石原莉奈一区二区三区在线观看| 欧美一级高清片在线观看| 国产白丝网站精品污在线入口| 中文字幕在线不卡一区 | 午夜精品久久久久久久蜜桃app| 日韩天堂在线观看| 99久久免费视频.com| 爽爽淫人综合网网站| 国产日韩欧美精品一区| 欧美色精品在线视频| 国产成人在线影院| 日韩不卡一二三区| 国产精品成人免费精品自在线观看| 欧美日韩中文一区| 高清在线成人网| 日韩av一区二区三区四区| 国产精品欧美久久久久一区二区| 在线播放91灌醉迷j高跟美女| 成人在线一区二区三区| 日韩不卡一区二区三区| 亚洲精品第1页| 中文字幕免费观看一区| 欧美xxxxxxxxx| 欧美日韩一区二区三区四区| www.欧美日韩| 精品一区二区三区在线观看| 亚洲成va人在线观看| 亚洲日本乱码在线观看| 国产欧美视频一区二区| 欧美zozo另类异族| 欧美一区二区三区免费在线看| 色综合天天综合| 国产成人在线视频免费播放| 久国产精品韩国三级视频| 视频一区视频二区在线观看| 亚洲一区二区三区四区的| 中文字幕中文字幕在线一区| 欧美韩日一区二区三区四区| 精品区一区二区| 日韩免费性生活视频播放| 欧美精品 日韩| 欧美日韩国产系列| 欧美日韩aaa| 在线成人午夜影院| 91精品国产综合久久久久久漫画| 91福利视频久久久久| 一本一道久久a久久精品| 不卡电影免费在线播放一区| 国产91色综合久久免费分享| 国产很黄免费观看久久| 国产电影一区二区三区| 国产成人av电影在线播放| 国产成人av网站| 成人黄动漫网站免费app| 国产精品一区免费视频| 国产91精品在线观看| eeuss影院一区二区三区| 91视视频在线观看入口直接观看www| 97aⅴ精品视频一二三区| 色婷婷av一区二区三区gif| 欧美日韩视频专区在线播放| 欧美一级xxx| 欧美激情在线一区二区三区| 亚洲欧洲精品一区二区精品久久久| 亚洲色图欧美在线| 亚洲成人免费看| 蜜乳av一区二区| 国产盗摄一区二区| 91丨porny丨最新| 欧美日韩精品电影| 久久亚洲一区二区三区明星换脸| 国产精品伦理一区二区| 亚洲在线视频网站| 另类小说图片综合网| 成人精品小蝌蚪| 在线播放欧美女士性生活| 久久色视频免费观看| 亚洲日本va午夜在线影院| 日韩主播视频在线| 不卡的电影网站| 欧美一区二区三区视频免费播放| 久久一区二区三区四区| 一区二区三区 在线观看视频| 日韩高清欧美激情| 成人av在线电影| 91精品国产全国免费观看| 国产婷婷色一区二区三区| 亚洲专区一二三| 国内外成人在线视频| 91成人网在线| 久久久亚洲午夜电影| 亚洲国产成人高清精品| 国产高清不卡一区| 欧美挠脚心视频网站| 中文字幕乱码亚洲精品一区| 三级在线观看一区二区| 成人avav影音| 日韩欧美一级片| 亚洲一区自拍偷拍| 国产老妇另类xxxxx| 欧美日韩免费高清一区色橹橹| 国产午夜一区二区三区| 亚洲成人中文在线| av一二三不卡影片| 久久综合狠狠综合| 蜜桃一区二区三区在线| 欧美视频在线一区| 亚洲精品成人精品456| 国产精品小仙女| 欧美一区二区三区视频在线观看| 一区二区三区蜜桃网| 成人黄色综合网站| 久久久久久久综合色一本| 美女国产一区二区| 在线成人小视频| 性欧美大战久久久久久久久| 在线观看网站黄不卡| 中文字幕中文字幕在线一区| 国产精品亚洲人在线观看| 欧美电影免费观看高清完整版在| 午夜精品久久久久久久久久久 | 欧美成人vps| 日日骚欧美日韩| 欧美精品精品一区| 亚洲18色成人| 欧美视频一二三区| 亚洲国产视频a| 欧美日韩久久久一区| 夜夜嗨av一区二区三区四季av| 91啪九色porn原创视频在线观看| 国产精品电影一区二区| av不卡在线观看| 亚洲人午夜精品天堂一二香蕉|