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

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

?? jcmarker.c

?? windows CE下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一区二区三区免费野_久草精品视频
日本韩国欧美一区二区三区| 国产视频一区在线播放| 久久久久久电影| 亚洲1区2区3区视频| 国产成人一级电影| 91精品国产一区二区三区蜜臀| 国产日产精品1区| 亚洲成人自拍网| jizzjizzjizz欧美| 日韩一区二区三区高清免费看看| 91精品欧美福利在线观看| 国产日产欧美精品一区二区三区| 国产日韩欧美综合一区| 日韩综合在线视频| 91久久精品一区二区| 欧美国产精品v| 日本成人在线电影网| 一本大道av伊人久久综合| 久久精品人人爽人人爽| 麻豆传媒一区二区三区| 555www色欧美视频| 亚洲国产成人porn| 欧美三级中文字幕在线观看| 亚洲另类一区二区| 91免费版在线| 亚洲欧美影音先锋| 99精品久久只有精品| 中文字幕一区二区5566日韩| 不卡视频一二三| 国产精品久久久久久一区二区三区 | 99riav一区二区三区| 精品国产凹凸成av人导航| 日本成人在线不卡视频| 欧美视频一二三区| 婷婷六月综合网| 91精品国产一区二区人妖| 日韩电影网1区2区| 精品处破学生在线二十三| 久久97超碰国产精品超碰| 精品国产青草久久久久福利| 国产在线不卡视频| 国产精品精品国产色婷婷| 97久久超碰精品国产| 一区二区三区在线视频免费 | 中文字幕在线观看不卡视频| 国产精品原创巨作av| 中国av一区二区三区| 99久久综合精品| 亚洲国产人成综合网站| 日韩一区二区视频| 国产成人午夜精品5599| 1024成人网色www| 欧美夫妻性生活| 精品写真视频在线观看| 亚洲国产成人午夜在线一区| 99r国产精品| 亚洲国产三级在线| 日韩一区二区电影网| 国产传媒一区在线| 亚洲日本青草视频在线怡红院| 精品亚洲国内自在自线福利| 国产网站一区二区| 99久久er热在这里只有精品15| 精品国产91九色蝌蚪| 国产福利一区二区三区视频| 亚洲天堂中文字幕| 日韩欧美第一区| 99re成人精品视频| 喷水一区二区三区| 日韩一区中文字幕| 精品福利在线导航| 一本到不卡精品视频在线观看| 日韩视频免费观看高清完整版 | 一区二区在线观看视频| 91精品国产综合久久香蕉麻豆| 亚洲视频在线一区观看| 91麻豆精品国产91久久久| 精品在线免费观看| 一区二区三区四区五区视频在线观看 | 91精品国产91久久综合桃花| 日本中文字幕不卡| 一级精品视频在线观看宜春院| 国产一区视频网站| 午夜精品一区二区三区电影天堂 | 日韩精品一区第一页| 久久综合一区二区| 欧美午夜免费电影| 成+人+亚洲+综合天堂| 韩国女主播一区| 亚洲午夜国产一区99re久久| 国产精品美女久久久久久久| 日韩亚洲欧美在线| 欧美三级一区二区| 色综合咪咪久久| 波多野结衣在线aⅴ中文字幕不卡| 欧美激情一区二区三区| 欧美日韩一区视频| 色婷婷亚洲一区二区三区| 国产成人aaa| 国产麻豆精品一区二区| 久久精品国产网站| 日本va欧美va瓶| 日精品一区二区三区| 亚洲国产日韩精品| 一区二区三区四区蜜桃| 亚洲欧美另类久久久精品2019| 欧美日免费三级在线| 91在线观看一区二区| 成人少妇影院yyyy| 国内外精品视频| 国产一区二区成人久久免费影院| 中文字幕一区二区日韩精品绯色| 色婷婷av一区二区三区软件 | 国产精品第一页第二页第三页| av资源网一区| 99精品久久久久久| 成人性生交大片免费看在线播放| 亚洲欧美日韩国产综合在线| 成人欧美一区二区三区黑人麻豆| 欧洲精品一区二区| 欧美日韩mp4| 91麻豆精品91久久久久同性| 69堂成人精品免费视频| 日韩欧美国产精品| 久久久综合精品| 久久久久国色av免费看影院| 欧美国产激情一区二区三区蜜月| 白白色亚洲国产精品| 99久久久国产精品免费蜜臀| 91网站最新地址| 精品视频一区三区九区| 欧美日韩一二区| 欧美变态凌虐bdsm| 中文乱码免费一区二区| 亚洲午夜免费电影| 黄色成人免费在线| 91小视频免费看| 91精品久久久久久久久99蜜臂| 欧美日韩精品福利| 欧美一区日韩一区| 欧美xxxxxxxxx| 综合网在线视频| 日韩精品一二三区| 国产99久久精品| 欧美久久久一区| 日本一区二区不卡视频| 亚洲一区二区视频| 激情综合网av| 色综合久久综合网欧美综合网 | 麻豆传媒一区二区三区| av在线一区二区| 91精品在线免费| 国产精品日日摸夜夜摸av| 亚洲电影你懂得| 国产成人免费网站| 日本韩国欧美国产| 久久欧美中文字幕| 亚洲国产视频网站| 国产91丝袜在线播放九色| 欧美日韩美少妇| 国产精品大尺度| 麻豆高清免费国产一区| 91丨九色porny丨蝌蚪| 日韩午夜电影在线观看| 中文字幕一区二区三区在线观看 | 久久新电视剧免费观看| 夜夜亚洲天天久久| 国产一区二区三区四区五区入口| 欧美aⅴ一区二区三区视频| 99久久99久久精品免费观看| 欧美一区二区三区色| 一区二区三区四区精品在线视频 | 懂色av一区二区夜夜嗨| 91精品国产一区二区三区香蕉| 91精彩视频在线| 国产亚洲精久久久久久| 日韩vs国产vs欧美| 99久久综合国产精品| 久久久久亚洲综合| 日本sm残虐另类| 精品视频在线免费看| 亚洲精品一二三四区| 成人精品视频一区| 国产视频在线观看一区二区三区| 久久久精品tv| 精品一区二区日韩| 欧美一区二区啪啪| 亚洲国产毛片aaaaa无费看| 色综合一个色综合| 国产精品久久久久久妇女6080| 中文字幕精品综合| 国产精品 日产精品 欧美精品| 丰满少妇在线播放bd日韩电影| 9久草视频在线视频精品| 久久综合色一综合色88| 精品在线免费视频| 2024国产精品视频| 精品一区二区三区不卡| 精品久久一二三区| 国产一区二区三区在线观看精品|