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

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

?? jcmarker.c

?? 一款最完整的工業組態軟源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*
 * jcmarker.c
 *
 * Copyright (C) 1991-1998, 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 routines to write JPEG datastream markers.
 */

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


typedef enum {			/* JPEG marker codes */
  M_SOF0  = 0xc0,
  M_SOF1  = 0xc1,
  M_SOF2  = 0xc2,
  M_SOF3  = 0xc3,
  
  M_SOF5  = 0xc5,
  M_SOF6  = 0xc6,
  M_SOF7  = 0xc7,
  
  M_JPG   = 0xc8,
  M_SOF9  = 0xc9,
  M_SOF10 = 0xca,
  M_SOF11 = 0xcb,
  
  M_SOF13 = 0xcd,
  M_SOF14 = 0xce,
  M_SOF15 = 0xcf,
  
  M_DHT   = 0xc4,
  
  M_DAC   = 0xcc,
  
  M_RST0  = 0xd0,
  M_RST1  = 0xd1,
  M_RST2  = 0xd2,
  M_RST3  = 0xd3,
  M_RST4  = 0xd4,
  M_RST5  = 0xd5,
  M_RST6  = 0xd6,
  M_RST7  = 0xd7,
  
  M_SOI   = 0xd8,
  M_EOI   = 0xd9,
  M_SOS   = 0xda,
  M_DQT   = 0xdb,
  M_DNL   = 0xdc,
  M_DRI   = 0xdd,
  M_DHP   = 0xde,
  M_EXP   = 0xdf,
  
  M_APP0  = 0xe0,
  M_APP1  = 0xe1,
  M_APP2  = 0xe2,
  M_APP3  = 0xe3,
  M_APP4  = 0xe4,
  M_APP5  = 0xe5,
  M_APP6  = 0xe6,
  M_APP7  = 0xe7,
  M_APP8  = 0xe8,
  M_APP9  = 0xe9,
  M_APP10 = 0xea,
  M_APP11 = 0xeb,
  M_APP12 = 0xec,
  M_APP13 = 0xed,
  M_APP14 = 0xee,
  M_APP15 = 0xef,
  
  M_JPG0  = 0xf0,
  M_JPG13 = 0xfd,
  M_COM   = 0xfe,
  
  M_TEM   = 0x01,
  
  M_ERROR = 0x100
} JPEG_MARKER;


/* Private state */

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

  unsigned int last_restart_interval; /* last DRI value emitted; 0 after SOI */
} my_marker_writer;

typedef my_marker_writer * my_marker_ptr;


/*
 * Basic output routines.
 *
 * Note that we do not support suspension while writing a marker.
 * Therefore, an application using suspension must ensure that there is
 * enough buffer space for the initial markers (typ. 600-700 bytes) before
 * calling jpeg_start_compress, and enough space to write the trailing EOI
 * (a few bytes) before calling jpeg_finish_compress.  Multipass compression
 * modes are not supported at all with suspension, so those two are the only
 * points where markers will be written.
 */

LOCAL(void)
emit_byte (j_compress_ptr cinfo, int val)
/* Emit a byte */
{
  struct jpeg_destination_mgr * dest = cinfo->dest;

  *(dest->next_output_byte)++ = (JOCTET) val;
  if (--dest->free_in_buffer == 0) {
    if (! (*dest->empty_output_buffer) (cinfo))
      ERREXIT(cinfo, JERR_CANT_SUSPEND);
  }
}


LOCAL(void)
emit_marker (j_compress_ptr cinfo, JPEG_MARKER mark)
/* Emit a marker code */
{
  emit_byte(cinfo, 0xFF);
  emit_byte(cinfo, (int) mark);
}


LOCAL(void)
emit_2bytes (j_compress_ptr cinfo, int value)
/* Emit a 2-byte integer; these are always MSB first in JPEG files */
{
  emit_byte(cinfo, (value >> 8) & 0xFF);
  emit_byte(cinfo, value & 0xFF);
}


/*
 * Routines to write specific marker types.
 */

LOCAL(int)
emit_dqt (j_compress_ptr cinfo, int index)
/* Emit a DQT marker */
/* Returns the precision used (0 = 8bits, 1 = 16bits) for baseline checking */
{
  JQUANT_TBL * qtbl = cinfo->quant_tbl_ptrs[index];
  int prec;
  int i;

  if (qtbl == NULL)
    ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, index);

  prec = 0;
  for (i = 0; i < DCTSIZE2; i++) {
    if (qtbl->quantval[i] > 255)
      prec = 1;
  }

  if (! qtbl->sent_table) {
    emit_marker(cinfo, M_DQT);

    emit_2bytes(cinfo, prec ? DCTSIZE2*2 + 1 + 2 : DCTSIZE2 + 1 + 2);

    emit_byte(cinfo, index + (prec<<4));

    for (i = 0; i < DCTSIZE2; i++) {
      /* The table entries must be emitted in zigzag order. */
      unsigned int qval = qtbl->quantval[jpeg_natural_order[i]];
      if (prec)
	emit_byte(cinfo, (int) (qval >> 8));
      emit_byte(cinfo, (int) (qval & 0xFF));
    }

    qtbl->sent_table = TRUE;
  }

  return prec;
}


LOCAL(void)
emit_dht (j_compress_ptr cinfo, int index, boolean is_ac)
/* Emit a DHT marker */
{
  JHUFF_TBL * htbl;
  int length, i;
  
  if (is_ac) {
    htbl = cinfo->ac_huff_tbl_ptrs[index];
    index += 0x10;		/* output index has AC bit set */
  } else {
    htbl = cinfo->dc_huff_tbl_ptrs[index];
  }

  if (htbl == NULL)
    ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, index);
  
  if (! htbl->sent_table) {
    emit_marker(cinfo, M_DHT);
    
    length = 0;
    for (i = 1; i <= 16; i++)
      length += htbl->bits[i];
    
    emit_2bytes(cinfo, length + 2 + 1 + 16);
    emit_byte(cinfo, index);
    
    for (i = 1; i <= 16; i++)
      emit_byte(cinfo, htbl->bits[i]);
    
    for (i = 0; i < length; i++)
      emit_byte(cinfo, htbl->huffval[i]);
    
    htbl->sent_table = TRUE;
  }
}


LOCAL(void)
emit_dac (j_compress_ptr cinfo)
/* Emit a DAC marker */
/* Since the useful info is so small, we want to emit all the tables in */
/* one DAC marker.  Therefore this routine does its own scan of the table. */
{
#ifdef C_ARITH_CODING_SUPPORTED
  char dc_in_use[NUM_ARITH_TBLS];
  char ac_in_use[NUM_ARITH_TBLS];
  int length, i;
  jpeg_component_info *compptr;
  
  for (i = 0; i < NUM_ARITH_TBLS; i++)
    dc_in_use[i] = ac_in_use[i] = 0;
  
  for (i = 0; i < cinfo->comps_in_scan; i++) {
    compptr = cinfo->cur_comp_info[i];
    dc_in_use[compptr->dc_tbl_no] = 1;
    ac_in_use[compptr->ac_tbl_no] = 1;
  }
  
  length = 0;
  for (i = 0; i < NUM_ARITH_TBLS; i++)
    length += dc_in_use[i] + ac_in_use[i];
  
  emit_marker(cinfo, M_DAC);
  
  emit_2bytes(cinfo, length*2 + 2);
  
  for (i = 0; i < NUM_ARITH_TBLS; i++) {
    if (dc_in_use[i]) {
      emit_byte(cinfo, i);
      emit_byte(cinfo, cinfo->arith_dc_L[i] + (cinfo->arith_dc_U[i]<<4));
    }
    if (ac_in_use[i]) {
      emit_byte(cinfo, i + 0x10);
      emit_byte(cinfo, cinfo->arith_ac_K[i]);
    }
  }
#endif /* C_ARITH_CODING_SUPPORTED */
}


LOCAL(void)
emit_dri (j_compress_ptr cinfo)
/* Emit a DRI marker */
{
  emit_marker(cinfo, M_DRI);
  
  emit_2bytes(cinfo, 4);	/* fixed length */

  emit_2bytes(cinfo, (int) cinfo->restart_interval);
}


LOCAL(void)
emit_sof (j_compress_ptr cinfo, JPEG_MARKER code)
/* Emit a SOF marker */
{
  int ci;
  jpeg_component_info *compptr;
  
  emit_marker(cinfo, code);
  
  emit_2bytes(cinfo, 3 * cinfo->num_components + 2 + 5 + 1); /* length */

  /* Make sure image isn't bigger than SOF field can handle */
  if ((long) cinfo->image_height > 65535L ||
      (long) cinfo->image_width > 65535L)
    ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) 65535);

  emit_byte(cinfo, cinfo->data_precision);
  emit_2bytes(cinfo, (int) cinfo->image_height);
  emit_2bytes(cinfo, (int) cinfo->image_width);

  emit_byte(cinfo, cinfo->num_components);

  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
       ci++, compptr++) {
    emit_byte(cinfo, compptr->component_id);
    emit_byte(cinfo, (compptr->h_samp_factor << 4) + compptr->v_samp_factor);
    emit_byte(cinfo, compptr->quant_tbl_no);
  }
}


LOCAL(void)
emit_sos (j_compress_ptr cinfo)
/* Emit a SOS marker */
{
  int i, td, ta;
  jpeg_component_info *compptr;
  
  emit_marker(cinfo, M_SOS);
  
  emit_2bytes(cinfo, 2 * cinfo->comps_in_scan + 2 + 1 + 3); /* length */
  
  emit_byte(cinfo, cinfo->comps_in_scan);
  
  for (i = 0; i < cinfo->comps_in_scan; i++) {
    compptr = cinfo->cur_comp_info[i];
    emit_byte(cinfo, compptr->component_id);
    td = compptr->dc_tbl_no;
    ta = compptr->ac_tbl_no;
    if (cinfo->progressive_mode) {
      /* Progressive mode: only DC or only AC tables are used in one scan;
       * furthermore, Huffman coding of DC refinement uses no table at all.
       * We emit 0 for unused field(s); this is recommended by the P&M text
       * but does not seem to be specified in the standard.
       */
      if (cinfo->Ss == 0) {
	ta = 0;			/* DC scan */
	if (cinfo->Ah != 0 && !cinfo->arith_code)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线视频国内一区二区| 欧美日韩在线免费视频| 香蕉加勒比综合久久| 自拍av一区二区三区| 亚洲人成网站影音先锋播放| 久久久国产午夜精品| 久久久亚洲精品一区二区三区 | 国产一区二区福利| 日本不卡一二三| 黄色日韩网站视频| 国产原创一区二区三区| 国产二区国产一区在线观看| 成人精品小蝌蚪| 色综合久久99| 欧美一区在线视频| 精品国产一区二区精华| 国产午夜精品一区二区三区四区| 国产精品卡一卡二| 洋洋av久久久久久久一区| 婷婷久久综合九色综合伊人色| 日韩av电影免费观看高清完整版| 久久99精品国产麻豆婷婷| 成人自拍视频在线| 91成人国产精品| 精品日韩欧美一区二区| 中文字幕欧美激情| 亚洲成人在线免费| 国产精品夜夜嗨| 欧美亚洲尤物久久| 久久嫩草精品久久久久| 亚洲欧美在线高清| 天堂蜜桃一区二区三区| 国产成人免费视频网站高清观看视频| 一本色道综合亚洲| 精品88久久久久88久久久| 一区二区中文视频| 裸体在线国模精品偷拍| av高清不卡在线| 欧美videos中文字幕| 亚洲欧美激情一区二区| 韩日精品视频一区| 欧美日本视频在线| 中文字幕在线观看不卡| 精品一区二区在线播放| 91黄色激情网站| 国产欧美日韩久久| 久久精品国产999大香线蕉| 在线中文字幕一区二区| 国产校园另类小说区| 天堂蜜桃91精品| 99久久精品费精品国产一区二区| 欧美一卡在线观看| 一区二区三区日韩| 成人av中文字幕| 欧美tickling网站挠脚心| 亚洲综合免费观看高清完整版在线| 国产美女av一区二区三区| 欧美日韩美少妇| 亚洲另类一区二区| 国产91在线观看| 日韩欧美一二三四区| 亚洲一区二区三区精品在线| 国产99一区视频免费| 日韩天堂在线观看| 丝袜亚洲另类欧美| 欧美日韩中文字幕一区| 欧美国产禁国产网站cc| 精品写真视频在线观看| 欧美日韩激情在线| 亚洲大型综合色站| 欧美日韩一区不卡| 亚洲福利视频导航| 欧美视频中文字幕| 亚洲午夜视频在线观看| 欧美一a一片一级一片| 亚洲男人天堂一区| 色哦色哦哦色天天综合| 亚洲精品乱码久久久久久黑人| 99久久精品一区| 国产精品久久久久9999吃药| 国产高清视频一区| 中文字幕在线观看不卡视频| 91免费视频网| 亚洲图片自拍偷拍| 欧美日韩精品是欧美日韩精品| 亚洲影视资源网| 在线播放欧美女士性生活| 日韩不卡免费视频| 日韩欧美aaaaaa| 国产成人综合在线| 亚洲天堂久久久久久久| 欧美午夜精品一区二区三区| 亚洲第一激情av| 欧美精品一区二区不卡| 高清在线观看日韩| 一区二区三国产精华液| 日韩一区二区麻豆国产| 激情综合五月婷婷| 亚洲欧洲99久久| 欧美视频一区在线| 国模少妇一区二区三区| 国产精品你懂的在线欣赏| 欧美伊人久久久久久久久影院 | 国内久久精品视频| 国产色产综合色产在线视频| 96av麻豆蜜桃一区二区| 午夜免费欧美电影| 免费看精品久久片| 中文字幕一区二区日韩精品绯色| 91久久香蕉国产日韩欧美9色| 亚洲国产综合人成综合网站| 2021中文字幕一区亚洲| 91麻豆精东视频| 久久99精品久久久久婷婷| 中文字幕一区二区在线观看| 制服丝袜亚洲色图| 99在线精品一区二区三区| 五月天精品一区二区三区| 欧美国产一区二区在线观看| 欧美理论在线播放| 波多野结衣在线一区| 午夜不卡在线视频| 亚洲区小说区图片区qvod| 精品国产一区二区精华| 欧美日韩一区不卡| 99精品视频在线播放观看| 精久久久久久久久久久| 亚洲激情av在线| 国产精品理论在线观看| 欧美zozozo| 欧美夫妻性生活| 在线观看亚洲成人| 不卡视频一二三四| 国产精品123| 黑人精品欧美一区二区蜜桃 | 欧美伊人久久大香线蕉综合69| 九九热在线视频观看这里只有精品| 国产精品久久久久影院色老大| 精品日产卡一卡二卡麻豆| 91激情在线视频| 成人免费福利片| 国产乱对白刺激视频不卡 | 精品国产伦一区二区三区免费| 岛国精品在线播放| 日韩福利电影在线| 亚洲国产另类av| 亚洲女同一区二区| 国产亚洲一本大道中文在线| 欧美日韩国产美女| 免费观看在线综合色| 色噜噜狠狠一区二区三区果冻| 国产成人综合在线| 国产91丝袜在线播放0| 国产高清久久久| 高清日韩电视剧大全免费| 韩国三级在线一区| 黄色资源网久久资源365| 国产综合色精品一区二区三区| 麻豆极品一区二区三区| 美女一区二区视频| 久久精品国产久精国产| 久久成人免费网| 蜜臀av性久久久久蜜臀aⅴ流畅| 日韩精品电影一区亚洲| 51精品久久久久久久蜜臀| 欧美久久一区二区| 欧美精品在线观看一区二区| 日韩一级在线观看| 欧美精品一区二| 亚洲国产成人一区二区三区| 国产精品女同一区二区三区| 亚洲狼人国产精品| 日韩经典中文字幕一区| 另类的小说在线视频另类成人小视频在线 | 亚欧色一区w666天堂| 蜜桃视频一区二区三区在线观看| 极品少妇xxxx精品少妇偷拍| 国产一区二区福利视频| 91蜜桃在线观看| 欧美日韩国产在线播放网站| 欧美成人精品1314www| 久久综合九色综合97_久久久| 久久亚洲私人国产精品va媚药| 国产精品第一页第二页第三页| 亚洲欧美日韩一区二区 | 国产一区二区三区精品欧美日韩一区二区三区 | 日韩一区二区三区在线| 国产午夜亚洲精品羞羞网站| 一区二区三区在线不卡| 蜜臀久久久久久久| 成人免费视频app| 欧美精品自拍偷拍| 中文天堂在线一区| 日韩极品在线观看| 高清免费成人av| 在线不卡欧美精品一区二区三区| 久久久精品国产免费观看同学| 亚洲综合一区二区| 成人免费视频播放| 欧美电影免费观看高清完整版|