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

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? jdapimin.c

?? Evc編的一個(gè)在wince5.0上運(yùn)行的flash播放器
?? C
字號(hào):
/*
 * jdapimin.c
 *
 * Copyright (C) 1994-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 application interface code for the decompression half
 * of the JPEG library.  These are the "minimum" API routines that may be
 * needed in either the normal full-decompression case or the
 * transcoding-only case.
 *
 * Most of the routines intended to be called directly by an application
 * are in this file or in jdapistd.c.  But also see jcomapi.c for routines
 * shared by compression and decompression, and jdtrans.c for the transcoding
 * case.
 */

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


/*
 * Initialization of a JPEG decompression object.
 * The error manager must already be set up (in case memory manager fails).
 */

GLOBAL(void)
jpeg_CreateDecompress (j_decompress_ptr cinfo, int version, size_t structsize)
{
  int i;

  /* Guard against version mismatches between library and caller. */
  cinfo->mem = NULL;		/* so jpeg_destroy knows mem mgr not called */
  if (version != JPEG_LIB_VERSION)
    ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version);
  if (structsize != SIZEOF(struct jpeg_decompress_struct))
    ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, 
	     (int) SIZEOF(struct jpeg_decompress_struct), (int) structsize);

  /* For debugging purposes, we zero the whole master structure.
   * But the application has already set the err pointer, and may have set
   * client_data, so we have to save and restore those fields.
   * Note: if application hasn't set client_data, tools like Purify may
   * complain here.
   */
  {
    struct jpeg_error_mgr * err = cinfo->err;
    void * client_data = cinfo->client_data; /* ignore Purify complaint here */
    MEMZERO(cinfo, SIZEOF(struct jpeg_decompress_struct));
    cinfo->err = err;
    cinfo->client_data = client_data;
  }
  cinfo->is_decompressor = TRUE;

  /* Initialize a memory manager instance for this object */
  jinit_memory_mgr((j_common_ptr) cinfo);

  /* Zero out pointers to permanent structures. */
  cinfo->progress = NULL;
  cinfo->src = NULL;

  for (i = 0; i < NUM_QUANT_TBLS; i++)
    cinfo->quant_tbl_ptrs[i] = NULL;

  for (i = 0; i < NUM_HUFF_TBLS; i++) {
    cinfo->dc_huff_tbl_ptrs[i] = NULL;
    cinfo->ac_huff_tbl_ptrs[i] = NULL;
  }

  /* Initialize marker processor so application can override methods
   * for COM, APPn markers before calling jpeg_read_header.
   */
  cinfo->marker_list = NULL;
  jinit_marker_reader(cinfo);

  /* And initialize the overall input controller. */
  jinit_input_controller(cinfo);

  /* OK, I'm ready */
  cinfo->global_state = DSTATE_START;
}


/*
 * Destruction of a JPEG decompression object
 */

GLOBAL(void)
jpeg_destroy_decompress (j_decompress_ptr cinfo)
{
  jpeg_destroy((j_common_ptr) cinfo); /* use common routine */
}


/*
 * Abort processing of a JPEG decompression operation,
 * but don't destroy the object itself.
 */

GLOBAL(void)
jpeg_abort_decompress (j_decompress_ptr cinfo)
{
  jpeg_abort((j_common_ptr) cinfo); /* use common routine */
}


/*
 * Set default decompression parameters.
 */

LOCAL(void)
default_decompress_parms (j_decompress_ptr cinfo)
{
  /* Guess the input colorspace, and set output colorspace accordingly. */
  /* (Wish JPEG committee had provided a real way to specify this...) */
  /* Note application may override our guesses. */
  switch (cinfo->num_components) {
  case 1:
    cinfo->jpeg_color_space = JCS_GRAYSCALE;
    cinfo->out_color_space = JCS_GRAYSCALE;
    break;
    
  case 3:
    if (cinfo->saw_JFIF_marker) {
      cinfo->jpeg_color_space = JCS_YCbCr; /* JFIF implies YCbCr */
    } else if (cinfo->saw_Adobe_marker) {
      switch (cinfo->Adobe_transform) {
      case 0:
	cinfo->jpeg_color_space = JCS_RGB;
	break;
      case 1:
	cinfo->jpeg_color_space = JCS_YCbCr;
	break;
      default:
	WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform);
	cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */
	break;
      }
    } else {
      /* Saw no special markers, try to guess from the component IDs */
      int cid0 = cinfo->comp_info[0].component_id;
      int cid1 = cinfo->comp_info[1].component_id;
      int cid2 = cinfo->comp_info[2].component_id;

      if (cid0 == 1 && cid1 == 2 && cid2 == 3)
	cinfo->jpeg_color_space = JCS_YCbCr; /* assume JFIF w/out marker */
      else if (cid0 == 82 && cid1 == 71 && cid2 == 66)
	cinfo->jpeg_color_space = JCS_RGB; /* ASCII 'R', 'G', 'B' */
      else {
	TRACEMS3(cinfo, 1, JTRC_UNKNOWN_IDS, cid0, cid1, cid2);
	cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */
      }
    }
    /* Always guess RGB is proper output colorspace. */
    cinfo->out_color_space = JCS_RGB;
    break;
    
  case 4:
    if (cinfo->saw_Adobe_marker) {
      switch (cinfo->Adobe_transform) {
      case 0:
	cinfo->jpeg_color_space = JCS_CMYK;
	break;
      case 2:
	cinfo->jpeg_color_space = JCS_YCCK;
	break;
      default:
	WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform);
	cinfo->jpeg_color_space = JCS_YCCK; /* assume it's YCCK */
	break;
      }
    } else {
      /* No special markers, assume straight CMYK. */
      cinfo->jpeg_color_space = JCS_CMYK;
    }
    cinfo->out_color_space = JCS_CMYK;
    break;
    
  default:
    cinfo->jpeg_color_space = JCS_UNKNOWN;
    cinfo->out_color_space = JCS_UNKNOWN;
    break;
  }

  /* Set defaults for other decompression parameters. */
  cinfo->scale_num = 1;		/* 1:1 scaling */
  cinfo->scale_denom = 1;
  cinfo->output_gamma = 1.0;
  cinfo->buffered_image = FALSE;
  cinfo->raw_data_out = FALSE;
  cinfo->dct_method = JDCT_DEFAULT;
  cinfo->do_fancy_upsampling = TRUE;
  cinfo->do_block_smoothing = TRUE;
  cinfo->quantize_colors = FALSE;
  /* We set these in case application only sets quantize_colors. */
  cinfo->dither_mode = JDITHER_FS;
#ifdef QUANT_2PASS_SUPPORTED
  cinfo->two_pass_quantize = TRUE;
#else
  cinfo->two_pass_quantize = FALSE;
#endif
  cinfo->desired_number_of_colors = 256;
  cinfo->colormap = NULL;
  /* Initialize for no mode change in buffered-image mode. */
  cinfo->enable_1pass_quant = FALSE;
  cinfo->enable_external_quant = FALSE;
  cinfo->enable_2pass_quant = FALSE;
}


/*
 * Decompression startup: read start of JPEG datastream to see what's there.
 * Need only initialize JPEG object and supply a data source before calling.
 *
 * This routine will read as far as the first SOS marker (ie, actual start of
 * compressed data), and will save all tables and parameters in the JPEG
 * object.  It will also initialize the decompression parameters to default
 * values, and finally return JPEG_HEADER_OK.  On return, the application may
 * adjust the decompression parameters and then call jpeg_start_decompress.
 * (Or, if the application only wanted to determine the image parameters,
 * the data need not be decompressed.  In that case, call jpeg_abort or
 * jpeg_destroy to release any temporary space.)
 * If an abbreviated (tables only) datastream is presented, the routine will
 * return JPEG_HEADER_TABLES_ONLY upon reaching EOI.  The application may then
 * re-use the JPEG object to read the abbreviated image datastream(s).
 * It is unnecessary (but OK) to call jpeg_abort in this case.
 * The JPEG_SUSPENDED return code only occurs if the data source module
 * requests suspension of the decompressor.  In this case the application
 * should load more source data and then re-call jpeg_read_header to resume
 * processing.
 * If a non-suspending data source is used and require_image is TRUE, then the
 * return code need not be inspected since only JPEG_HEADER_OK is possible.
 *
 * This routine is now just a front end to jpeg_consume_input, with some
 * extra error checking.
 */

GLOBAL(int)
jpeg_read_header (j_decompress_ptr cinfo, boolean require_image)
{
  int retcode;

  if (cinfo->global_state != DSTATE_START &&
      cinfo->global_state != DSTATE_INHEADER)
    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);

  retcode = jpeg_consume_input(cinfo);

  switch (retcode) {
  case JPEG_REACHED_SOS:
    retcode = JPEG_HEADER_OK;
    break;
  case JPEG_REACHED_EOI:
    if (require_image)		/* Complain if application wanted an image */
      ERREXIT(cinfo, JERR_NO_IMAGE);
    /* Reset to start state; it would be safer to require the application to
     * call jpeg_abort, but we can't change it now for compatibility reasons.
     * A side effect is to free any temporary memory (there shouldn't be any).
     */
    jpeg_abort((j_common_ptr) cinfo); /* sets state = DSTATE_START */
    retcode = JPEG_HEADER_TABLES_ONLY;
    break;
  case JPEG_SUSPENDED:
    /* no work */
    break;
  }

  return retcode;
}


/*
 * Consume data in advance of what the decompressor requires.
 * This can be called at any time once the decompressor object has
 * been created and a data source has been set up.
 *
 * This routine is essentially a state machine that handles a couple
 * of critical state-transition actions, namely initial setup and
 * transition from header scanning to ready-for-start_decompress.
 * All the actual input is done via the input controller's consume_input
 * method.
 */

GLOBAL(int)
jpeg_consume_input (j_decompress_ptr cinfo)
{
  int retcode = JPEG_SUSPENDED;

  /* NB: every possible DSTATE value should be listed in this switch */
  switch (cinfo->global_state) {
  case DSTATE_START:
    /* Start-of-datastream actions: reset appropriate modules */
    (*cinfo->inputctl->reset_input_controller) (cinfo);
    /* Initialize application's data source module */
    (*cinfo->src->init_source) (cinfo);
    cinfo->global_state = DSTATE_INHEADER;
    /*FALLTHROUGH*/
  case DSTATE_INHEADER:
    retcode = (*cinfo->inputctl->consume_input) (cinfo);
    if (retcode == JPEG_REACHED_SOS) { /* Found SOS, prepare to decompress */
      /* Set up default parameters based on header data */
      default_decompress_parms(cinfo);
      /* Set global state: ready for start_decompress */
      cinfo->global_state = DSTATE_READY;
    }
    break;
  case DSTATE_READY:
    /* Can't advance past first SOS until start_decompress is called */
    retcode = JPEG_REACHED_SOS;
    break;
  case DSTATE_PRELOAD:
  case DSTATE_PRESCAN:
  case DSTATE_SCANNING:
  case DSTATE_RAW_OK:
  case DSTATE_BUFIMAGE:
  case DSTATE_BUFPOST:
  case DSTATE_STOPPING:
    retcode = (*cinfo->inputctl->consume_input) (cinfo);
    break;
  default:
    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
  }
  return retcode;
}


/*
 * Have we finished reading the input file?
 */

GLOBAL(boolean)
jpeg_input_complete (j_decompress_ptr cinfo)
{
  /* Check for valid jpeg object */
  if (cinfo->global_state < DSTATE_START ||
      cinfo->global_state > DSTATE_STOPPING)
    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
  return cinfo->inputctl->eoi_reached;
}


/*
 * Is there more than one scan?
 */

GLOBAL(boolean)
jpeg_has_multiple_scans (j_decompress_ptr cinfo)
{
  /* Only valid after jpeg_read_header completes */
  if (cinfo->global_state < DSTATE_READY ||
      cinfo->global_state > DSTATE_STOPPING)
    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
  return cinfo->inputctl->has_multiple_scans;
}


/*
 * Finish JPEG decompression.
 *
 * This will normally just verify the file trailer and release temp storage.
 *
 * Returns FALSE if suspended.  The return value need be inspected only if
 * a suspending data source is used.
 */

GLOBAL(boolean)
jpeg_finish_decompress (j_decompress_ptr cinfo)
{
  if ((cinfo->global_state == DSTATE_SCANNING ||
       cinfo->global_state == DSTATE_RAW_OK) && ! cinfo->buffered_image) {
    /* Terminate final pass of non-buffered mode */
    if (cinfo->output_scanline < cinfo->output_height)
      ERREXIT(cinfo, JERR_TOO_LITTLE_DATA);
    (*cinfo->master->finish_output_pass) (cinfo);
    cinfo->global_state = DSTATE_STOPPING;
  } else if (cinfo->global_state == DSTATE_BUFIMAGE) {
    /* Finishing after a buffered-image operation */
    cinfo->global_state = DSTATE_STOPPING;
  } else if (cinfo->global_state != DSTATE_STOPPING) {
    /* STOPPING = repeat call after a suspension, anything else is error */
    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
  }
  /* Read until EOI */
  while (! cinfo->inputctl->eoi_reached) {
    if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED)
      return FALSE;		/* Suspend, come back later */
  }
  /* Do final cleanup */
  (*cinfo->src->term_source) (cinfo);
  /* We can use jpeg_abort to release memory and reset global_state */
  jpeg_abort((j_common_ptr) cinfo);
  return TRUE;
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
**性色生活片久久毛片| 精品在线播放免费| 欧美午夜一区二区三区免费大片| 亚洲精品你懂的| 欧美男女性生活在线直播观看| 日日摸夜夜添夜夜添精品视频| 日韩一区二区在线看片| 国产一区999| 国产精品黄色在线观看| 欧美午夜电影网| 青青草成人在线观看| 久久久高清一区二区三区| 91在线精品一区二区| 亚洲一区二区3| 欧美va在线播放| 成人一区二区在线观看| 一级女性全黄久久生活片免费| 欧美日韩一区二区三区在线看| 乱一区二区av| 国产精品嫩草影院av蜜臀| 欧美系列日韩一区| 国产一区二区三区四区在线观看| 国产精品入口麻豆原神| 欧美日韩久久久| 国产一区二区导航在线播放| 亚洲欧洲av在线| 日韩一区二区三区四区| 国产99精品国产| 亚洲网友自拍偷拍| 久久理论电影网| 91久久一区二区| 久久精品国产色蜜蜜麻豆| 日韩伦理av电影| 日韩欧美在线网站| 91麻豆视频网站| 蜜桃久久精品一区二区| 国产精品久久一卡二卡| 欧美丰满一区二区免费视频| 国产aⅴ综合色| 日韩影院免费视频| 国产精品乱码一区二三区小蝌蚪| 欧美日本一区二区三区| 粉嫩一区二区三区在线看| 亚洲成人www| 国产精品久久久久久一区二区三区 | 一区二区三区四区在线免费观看| 91麻豆精品国产91久久久更新时间| 国产成人福利片| 偷拍一区二区三区四区| 中文字幕一区二区视频| 日韩午夜精品电影| 91九色最新地址| 国产伦精品一区二区三区在线观看| 一区二区三区丝袜| 国产欧美日韩三区| 欧美一区二区性放荡片| 色八戒一区二区三区| 国产麻豆日韩欧美久久| 午夜精品福利视频网站| 中文字幕一区二区三区蜜月 | 欧美丰满高潮xxxx喷水动漫| 粗大黑人巨茎大战欧美成人| 蜜桃精品视频在线| 一区二区三区成人在线视频| 欧美国产精品中文字幕| 精品国精品自拍自在线| 欧美日韩国产三级| 日本黄色一区二区| 成人免费毛片片v| 久久99精品国产麻豆婷婷| 亚洲丶国产丶欧美一区二区三区| 国产精品久久久久久久久久免费看 | 日本中文字幕一区| 亚洲日本免费电影| 国产欧美一区二区三区在线老狼| 欧美高清激情brazzers| 在线视频一区二区免费| 波多野结衣一区二区三区| 国产一区二区三区日韩 | 青青草原综合久久大伊人精品优势| 亚洲欧美日韩一区二区三区在线观看| 久久这里只精品最新地址| 制服丝袜亚洲网站| 欧美日韩三级视频| 欧美午夜精品久久久久久超碰 | 91在线码无精品| 成人高清视频免费观看| 精品综合久久久久久8888| 爽好久久久欧美精品| 亚洲一区欧美一区| 一区二区三区在线视频免费| 亚洲欧美日韩在线| 亚洲视频图片小说| 中文字幕日本不卡| 国产精品成人一区二区三区夜夜夜| 亚洲国产精品黑人久久久| 欧美精品一区二区三区很污很色的| 日韩一区二区视频在线观看| 欧美一区二区三区精品| 91精品国产欧美日韩| 777a∨成人精品桃花网| 欧美另类一区二区三区| 欧美日韩在线播| 欧美日韩精品三区| 在线播放/欧美激情| 在线不卡一区二区| 5566中文字幕一区二区电影| 7878成人国产在线观看| 日韩一区二区影院| 精品国产乱码久久久久久夜甘婷婷 | 精品视频123区在线观看| 欧美色网一区二区| 欧美男男青年gay1069videost| 欧美三级日本三级少妇99| 欧美精品黑人性xxxx| 欧美一区二区视频在线观看| 日韩一区二区三区观看| 欧美xfplay| 国产精品午夜在线观看| 亚洲色图视频免费播放| 亚洲激情六月丁香| 午夜在线成人av| 欧美96一区二区免费视频| 久久成人免费日本黄色| 国产黄色精品网站| av一区二区三区| 在线精品视频一区二区三四| 欧美美女一区二区在线观看| 欧美一区二区二区| 久久亚洲春色中文字幕久久久| 国产精品美女久久久久久久久久久| 亚洲乱码日产精品bd| 五月婷婷激情综合| 久久97超碰国产精品超碰| 国产成人在线网站| 波多野结衣亚洲| 欧美日韩夫妻久久| 久久美女艺术照精彩视频福利播放| 欧美国产欧美综合| 亚洲一区二区视频在线| 麻豆精品在线观看| 国产91精品露脸国语对白| 一本到不卡精品视频在线观看| 欧美日本高清视频在线观看| 精品日韩欧美在线| 综合网在线视频| 日韩激情一区二区| 国产福利91精品一区| 色综合天天性综合| 日韩一区二区在线观看视频| 亚洲国产精品高清| 亚洲一区二区三区视频在线 | 成人黄动漫网站免费app| 91精品办公室少妇高潮对白| 91麻豆精品国产无毒不卡在线观看 | 福利一区二区在线| 欧美亚洲愉拍一区二区| 欧美成人艳星乳罩| 中文字幕日韩一区| 美国十次综合导航| 99国产麻豆精品| 欧美成人精品福利| **网站欧美大片在线观看| 蜜臀av一区二区在线免费观看| 成人av集中营| 欧美一区二区三区视频| 国产精品久久久久久久岛一牛影视 | 欧美一级久久久| 欧美国产日韩一二三区| 天堂蜜桃91精品| 成人午夜激情影院| 69精品人人人人| 国产精品二区一区二区aⅴ污介绍| 视频一区中文字幕| youjizz久久| 日韩一级免费观看| 亚洲女同女同女同女同女同69| 美女精品一区二区| 色婷婷综合久久久中文字幕| 亚洲精品在线免费观看视频| 亚洲黄色av一区| 国产麻豆午夜三级精品| 欧美日韩在线亚洲一区蜜芽| 欧美激情一区二区三区全黄| 日韩精品高清不卡| 91欧美激情一区二区三区成人| 精品国产sm最大网站| 亚洲一级片在线观看| 风间由美一区二区三区在线观看 | 成人精品小蝌蚪| 日韩免费高清av| 一区二区三区产品免费精品久久75| 国产精品中文字幕一区二区三区| 欧美日韩国产小视频在线观看| 国产精品久久久久久久久免费相片| 久久成人18免费观看| 在线成人av影院| 亚洲一区二区视频在线| 99九九99九九九视频精品| 久久久影视传媒|