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

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

?? jcmarker.c

?? wince下CxImage
?? 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一区二区三区免费野_久草精品视频
91年精品国产| 亚洲综合免费观看高清在线观看| 免费视频最近日韩| 777久久久精品| 日韩激情一二三区| 宅男噜噜噜66一区二区66| 日韩国产欧美三级| 日韩午夜在线播放| 国产精品资源在线| 中文字幕在线视频一区| 91无套直看片红桃| 亚洲国产乱码最新视频| 欧美一区二区三区免费观看视频| 免费成人av在线播放| 久久这里只精品最新地址| 国产成人av电影在线播放| 成人免费在线视频观看| 欧美亚洲一区二区在线| 麻豆国产欧美一区二区三区| 中文字幕乱码亚洲精品一区| 91麻豆免费观看| 日韩激情中文字幕| 国产精品国产三级国产aⅴ原创 | 粉嫩aⅴ一区二区三区四区五区| 中文字幕欧美国产| 欧美亚洲日本国产| 久久av中文字幕片| 亚洲免费观看高清完整| 日韩欧美中文字幕公布| 99国产精品99久久久久久| 五月激情六月综合| 中文字幕第一区二区| 欧美二区三区的天堂| 国产jizzjizz一区二区| 亚洲成人精品影院| 国产亚洲欧洲997久久综合| 欧美在线观看视频在线| 国产永久精品大片wwwapp| 亚洲天天做日日做天天谢日日欢| 777亚洲妇女| a亚洲天堂av| 久久97超碰色| 亚洲国产成人av| 欧美激情综合网| 欧美一区欧美二区| 一本色道久久加勒比精品| 精品影视av免费| 亚洲午夜一区二区| 中文字幕在线观看一区| 精品国产一二三| 91精品综合久久久久久| 色狠狠综合天天综合综合| 国产99一区视频免费| 日韩国产高清影视| 洋洋成人永久网站入口| 欧美激情一区二区| 精品国产一区a| 欧美一区二区三区在线观看视频| 色婷婷综合久久久久中文一区二区 | 亚洲精品欧美激情| 国产日韩欧美精品电影三级在线| 91精品国产福利在线观看| 欧美日韩免费在线视频| 91视频你懂的| 99综合电影在线视频| 国产盗摄精品一区二区三区在线 | 韩国三级在线一区| 日本怡春院一区二区| 亚洲大片免费看| 亚洲一区二区三区影院| 一区二区三区高清不卡| 亚洲精品免费在线观看| 亚洲日本在线视频观看| 亚洲视频一区在线观看| 亚洲色图欧洲色图婷婷| 亚洲青青青在线视频| 日韩毛片在线免费观看| 中文字幕在线一区免费| 中文字幕一区二区三区不卡 | 亚洲图片你懂的| 国产精品久久看| 亚洲欧洲99久久| 综合自拍亚洲综合图不卡区| 自拍偷拍国产亚洲| 亚洲在线视频免费观看| 亚洲午夜免费视频| 日韩有码一区二区三区| 美女网站视频久久| 国模娜娜一区二区三区| 国产精品456| gogo大胆日本视频一区| 99久久久无码国产精品| 色欧美日韩亚洲| 3751色影院一区二区三区| 欧美tickle裸体挠脚心vk| 久久影院视频免费| 中文乱码免费一区二区| 一区二区三区蜜桃| 亚洲成精国产精品女| 男男成人高潮片免费网站| 国内久久精品视频| av亚洲精华国产精华精| 色欧美88888久久久久久影院| 欧美日本韩国一区| 久久久亚洲高清| 一区二区不卡在线视频 午夜欧美不卡在| 一区二区三区免费观看| 美女任你摸久久| 成人av资源网站| 欧美精品丝袜久久久中文字幕| 精品理论电影在线观看| 日韩一区欧美小说| 日日骚欧美日韩| 国产成人精品www牛牛影视| 日本丰满少妇一区二区三区| 欧美一级片在线| 国产精品久久久久久久久动漫| 亚洲福利国产精品| 国产精品白丝jk黑袜喷水| 日本精品一级二级| 日韩美女视频一区二区在线观看| 国产精品久久一级| 日本伊人午夜精品| 99久久精品国产导航| 欧美高清dvd| |精品福利一区二区三区| 免费成人av在线| 色婷婷精品久久二区二区蜜臂av| 精品欧美久久久| 亚洲精品高清在线| 国产精品888| 日韩亚洲国产中文字幕欧美| 亚洲精品国产精华液| 国产99久久久国产精品潘金 | 日韩精品一区二区三区蜜臀| 亚洲女人****多毛耸耸8| 老司机精品视频线观看86| 色婷婷av久久久久久久| 国产欧美日韩另类一区| 日韩电影在线免费看| 色噜噜狠狠成人中文综合| 久久久久久久久久久电影| 日韩综合一区二区| 日本久久精品电影| 国产精品久久久久影院亚瑟 | 1024亚洲合集| 国产suv精品一区二区883| 精品伦理精品一区| 天堂成人国产精品一区| 色狠狠桃花综合| 亚洲日本一区二区| 国产99精品视频| 久久久久久久久一| 久久99国产乱子伦精品免费| 欧美一卡2卡3卡4卡| 亚洲成av人片在线| 欧美亚洲国产一区在线观看网站| 国产精品美女久久久久久久久 | 在线一区二区三区| 国产精品视频九色porn| 国模一区二区三区白浆| 日韩亚洲欧美一区| 另类小说色综合网站| 日韩视频一区二区在线观看| 天天综合色天天综合色h| 色婷婷亚洲综合| 亚洲图片一区二区| 欧美视频精品在线观看| 亚洲成人av福利| 欧美日韩三级视频| 日韩不卡一区二区三区| 欧美日韩精品一区二区三区蜜桃 | 日韩一区欧美二区| 91精品国产色综合久久ai换脸| 日日摸夜夜添夜夜添国产精品| 在线播放欧美女士性生活| 日韩一区欧美二区| 欧美v日韩v国产v| 国产成人免费高清| 国产精品高潮久久久久无| av欧美精品.com| 亚洲一区二区三区四区在线观看 | 日韩一区二区中文字幕| 日韩高清一级片| 欧美v亚洲v综合ⅴ国产v| 九九视频精品免费| 国产精品视频你懂的| 91丝袜美腿高跟国产极品老师 | 日本色综合中文字幕| 欧美成人vr18sexvr| 国产福利不卡视频| 国产精品成人免费| 在线亚洲高清视频| 免费人成在线不卡| 国产午夜精品理论片a级大结局| 成人av片在线观看| 亚洲风情在线资源站| 久久综合九色综合欧美亚洲| 成人精品国产一区二区4080| 一区二区三区四区不卡视频|