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

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

?? jdatasrc.c

?? DigitalImageProcessing_base_on_Matlab 基于Matlab的數字圖像處理
?? C
字號:
/*
 * jdatasrc.c
 *
 * Copyright (C) 1994-1996, 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 decompression data source routines for the case of
 * reading JPEG data from a file (or any stdio stream).  While these routines
 * are sufficient for most applications, some will want to use a different
 * source manager.
 * IMPORTANT: we assume that fread() will correctly transcribe an array of
 * JOCTETs from 8-bit-wide elements on external storage.  If char is wider
 * than 8 bits on your machine, you may need to do some tweaking.
 */

/* this is not a core library module, so it doesn't define JPEG_INTERNALS */
#include "jinclude.h"
#include "jpeglib.h"
#include "jerror.h"


/* Expanded data source object for stdio input */

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

  FILE * infile;		/* source stream */
  JOCTET * buffer;		/* start of buffer */
  boolean start_of_file;	/* have we gotten any data yet? */
} my_source_mgr;

typedef my_source_mgr * my_src_ptr;

#define INPUT_BUF_SIZE  4096	/* choose an efficiently fread'able size */


/*
 * Initialize source --- called by jpeg_read_header
 * before any data is actually read.
 */

METHODDEF(void)
init_source (j_decompress_ptr cinfo)
{
  my_src_ptr src = (my_src_ptr) cinfo->src;

  /* We reset the empty-input-file flag for each image,
   * but we don't clear the input buffer.
   * This is correct behavior for reading a series of images from one source.
   */
  src->start_of_file = TRUE;
}


/*
 * Fill the input buffer --- called whenever buffer is emptied.
 *
 * In typical applications, this should read fresh data into the buffer
 * (ignoring the current state of next_input_byte & bytes_in_buffer),
 * reset the pointer & count to the start of the buffer, and return TRUE
 * indicating that the buffer has been reloaded.  It is not necessary to
 * fill the buffer entirely, only to obtain at least one more byte.
 *
 * There is no such thing as an EOF return.  If the end of the file has been
 * reached, the routine has a choice of ERREXIT() or inserting fake data into
 * the buffer.  In most cases, generating a warning message and inserting a
 * fake EOI marker is the best course of action --- this will allow the
 * decompressor to output however much of the image is there.  However,
 * the resulting error message is misleading if the real problem is an empty
 * input file, so we handle that case specially.
 *
 * In applications that need to be able to suspend compression due to input
 * not being available yet, a FALSE return indicates that no more data can be
 * obtained right now, but more may be forthcoming later.  In this situation,
 * the decompressor will return to its caller (with an indication of the
 * number of scanlines it has read, if any).  The application should resume
 * decompression after it has loaded more data into the input buffer.  Note
 * that there are substantial restrictions on the use of suspension --- see
 * the documentation.
 *
 * When suspending, the decompressor will back up to a convenient restart point
 * (typically the start of the current MCU). next_input_byte & bytes_in_buffer
 * indicate where the restart point will be if the current call returns FALSE.
 * Data beyond this point must be rescanned after resumption, so move it to
 * the front of the buffer rather than discarding it.
 */

METHODDEF(boolean)
fill_input_buffer (j_decompress_ptr cinfo)
{
  my_src_ptr src = (my_src_ptr) cinfo->src;
  size_t nbytes;

  nbytes = JFREAD(src->infile, src->buffer, INPUT_BUF_SIZE);

  if (nbytes <= 0) {
    if (src->start_of_file)	/* Treat empty input file as fatal error */
      ERREXIT(cinfo, JERR_INPUT_EMPTY);
    WARNMS(cinfo, JWRN_JPEG_EOF);
    /* Insert a fake EOI marker */
    src->buffer[0] = (JOCTET) 0xFF;
    src->buffer[1] = (JOCTET) JPEG_EOI;
    nbytes = 2;
  }

  src->pub.next_input_byte = src->buffer;
  src->pub.bytes_in_buffer = nbytes;
  src->start_of_file = FALSE;

  return TRUE;
}


/*
 * Skip data --- used to skip over a potentially large amount of
 * uninteresting data (such as an APPn marker).
 *
 * Writers of suspendable-input applications must note that skip_input_data
 * is not granted the right to give a suspension return.  If the skip extends
 * beyond the data currently in the buffer, the buffer can be marked empty so
 * that the next read will cause a fill_input_buffer call that can suspend.
 * Arranging for additional bytes to be discarded before reloading the input
 * buffer is the application writer's problem.
 */

METHODDEF(void)
skip_input_data (j_decompress_ptr cinfo, long num_bytes)
{
  my_src_ptr src = (my_src_ptr) cinfo->src;

  /* Just a dumb implementation for now.  Could use fseek() except
   * it doesn't work on pipes.  Not clear that being smart is worth
   * any trouble anyway --- large skips are infrequent.
   */
  if (num_bytes > 0) {
    while (num_bytes > (long) src->pub.bytes_in_buffer) {
      num_bytes -= (long) src->pub.bytes_in_buffer;
      (void) fill_input_buffer(cinfo);
      /* note we assume that fill_input_buffer will never return FALSE,
       * so suspension need not be handled.
       */
    }
    src->pub.next_input_byte += (size_t) num_bytes;
    src->pub.bytes_in_buffer -= (size_t) num_bytes;
  }
}


/*
 * An additional method that can be provided by data source modules is the
 * resync_to_restart method for error recovery in the presence of RST markers.
 * For the moment, this source module just uses the default resync method
 * provided by the JPEG library.  That method assumes that no backtracking
 * is possible.
 */


/*
 * Terminate source --- called by jpeg_finish_decompress
 * after all data has been read.  Often a no-op.
 *
 * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding
 * application must deal with any cleanup that should happen even
 * for error exit.
 */

METHODDEF(void)
term_source (j_decompress_ptr cinfo)
{
  /* no work necessary here */
}


/*
 * Prepare for input from a stdio stream.
 * The caller must have already opened the stream, and is responsible
 * for closing it after finishing decompression.
 */

GLOBAL(void)
jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile)
{
  my_src_ptr src;

  /* The source object and input buffer are made permanent so that a series
   * of JPEG images can be read from the same file by calling jpeg_stdio_src
   * only before the first one.  (If we discarded the buffer at the end of
   * one image, we'd likely lose the start of the next one.)
   * This makes it unsafe to use this manager and a different source
   * manager serially with the same JPEG object.  Caveat programmer.
   */
  if (cinfo->src == NULL) {	/* first time for this JPEG object? */
    cinfo->src = (struct jpeg_source_mgr *)
      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
				  SIZEOF(my_source_mgr));
    src = (my_src_ptr) cinfo->src;
    src->buffer = (JOCTET *)
      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
				  INPUT_BUF_SIZE * SIZEOF(JOCTET));
  }

  src = (my_src_ptr) cinfo->src;
  src->pub.init_source = init_source;
  src->pub.fill_input_buffer = fill_input_buffer;
  src->pub.skip_input_data = skip_input_data;
  src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */
  src->pub.term_source = term_source;
  src->infile = infile;
  src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */
  src->pub.next_input_byte = NULL; /* until buffer loaded */
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美色国产精品| 欧美zozo另类异族| 精品国产乱码久久久久久1区2区| 欧美日韩精品久久久| 国产一区久久久| 亚洲码国产岛国毛片在线| 亚洲一区免费在线观看| 欧美国产精品一区二区三区| 综合婷婷亚洲小说| 免费欧美高清视频| 精品一区精品二区高清| 91小视频免费观看| 热久久久久久久| 岛国一区二区三区| 色94色欧美sute亚洲13| 欧美电影精品一区二区| 欧美日韩黄色一区二区| 久久久久久久久蜜桃| 亚洲国产美国国产综合一区二区| 久久精品国产一区二区三| 99r精品视频| 精品美女被调教视频大全网站| 综合电影一区二区三区| 免费成人深夜小野草| 91玉足脚交白嫩脚丫在线播放| 91精品在线免费| 亚洲色图在线播放| 国产成人福利片| 欧美精品色综合| 亚洲视频你懂的| 国产精品一区二区三区四区| 欧美亚洲高清一区| 成人欧美一区二区三区黑人麻豆| 黑人巨大精品欧美一区| 91精品蜜臀在线一区尤物| 亚洲最色的网站| 国产一区二三区好的| 欧美日韩国产高清一区二区 | 成人午夜在线视频| 欧美一区午夜视频在线观看| 亚洲高清三级视频| 色综合久久久久| 日韩美女天天操| 日韩中文字幕麻豆| 国产精品久久三区| 国产黄色精品网站| 久久精品视频在线看| 精品亚洲成a人在线观看| 欧美一区二区三区影视| 日韩电影在线一区二区三区| 欧美午夜精品一区| 亚洲综合一区二区精品导航| 99这里只有久久精品视频| 欧美高清一级片在线观看| 亚洲国产色一区| 欧美视频在线一区二区三区 | 欧美一级艳片视频免费观看| 日韩av午夜在线观看| 欧美伊人久久久久久久久影院 | 国产欧美一区在线| 国产不卡视频在线观看| 国产日韩高清在线| 成人app软件下载大全免费| 国产精品第五页| 一本久久a久久免费精品不卡| 亚洲欧美精品午睡沙发| 色综合久久99| 午夜视频在线观看一区| 欧美日本高清视频在线观看| 另类成人小视频在线| 精品成人私密视频| 激情深爱一区二区| 国产精品网站在线| 色94色欧美sute亚洲线路二| 日韩影院精彩在线| 欧美一区二区免费视频| 国产剧情一区二区| 亚洲三级小视频| 884aa四虎影成人精品一区| 精品一区二区三区欧美| 国产女人18水真多18精品一级做| www.日韩在线| 午夜a成v人精品| 91精品国产免费| 成人的网站免费观看| 伊人婷婷欧美激情| 日韩女优av电影在线观看| 国产一区不卡视频| 樱桃视频在线观看一区| 欧美成人a视频| 91小视频免费观看| 欧美96一区二区免费视频| 久久久精品国产99久久精品芒果| 欧美在线观看视频一区二区 | 欧美xxxx在线观看| 成人高清视频免费观看| 亚洲一区日韩精品中文字幕| 国产精品污www在线观看| 欧美精品一区二区三区在线| 欧美日韩综合一区| 一本色道久久综合亚洲91| 成人国产精品免费网站| 国产精品综合av一区二区国产馆| 日韩国产欧美在线视频| 亚洲成人资源在线| 亚洲一区二区精品视频| 亚洲人成精品久久久久| 中文字幕欧美一区| 欧美极品少妇xxxxⅹ高跟鞋 | 亚洲美女免费视频| 亚洲四区在线观看| 国产精品国产馆在线真实露脸| 久久亚洲一区二区三区四区| 日韩精品一区国产麻豆| 日韩欧美电影在线| 欧美v亚洲v综合ⅴ国产v| 日韩三级精品电影久久久 | 久久精品国产免费看久久精品| 亚洲不卡在线观看| 视频一区中文字幕国产| 亚洲国产精品尤物yw在线观看| 亚洲美女偷拍久久| 一区二区三区日韩精品| 亚洲国产wwwccc36天堂| 亚洲不卡在线观看| 蜜桃在线一区二区三区| 韩国三级在线一区| www.亚洲人| 在线精品视频小说1| 精品视频999| 欧美一级xxx| 欧美精品一区二区高清在线观看| 久久久精品中文字幕麻豆发布| 欧美激情一区二区三区四区| 中文在线资源观看网站视频免费不卡| 国产欧美一区二区三区在线看蜜臀 | 97精品国产露脸对白| 欧洲精品一区二区三区在线观看| 欧美伦理电影网| 精品国产乱码久久久久久久| 中文字幕 久热精品 视频在线| 亚洲黄色小视频| 美女视频黄a大片欧美| 狠狠色丁香婷婷综合| jlzzjlzz亚洲日本少妇| 在线精品视频一区二区三四| 日韩情涩欧美日韩视频| 国产色婷婷亚洲99精品小说| 一区二区三区在线视频免费观看| 婷婷久久综合九色综合伊人色| 九九久久精品视频| 99热这里都是精品| 欧美一级一区二区| 国产精品第五页| 美女视频一区在线观看| thepron国产精品| 日韩一级片在线观看| 国产精品美女久久福利网站| 亚洲成av人综合在线观看| 国产一区二区按摩在线观看| 色噜噜狠狠成人中文综合| 日韩欧美另类在线| 一区二区三区鲁丝不卡| 国产一区二区电影| 51精品国自产在线| 最新热久久免费视频| 久久电影国产免费久久电影| 99久久精品免费看国产免费软件| 欧美剧情电影在线观看完整版免费励志电影| wwwwxxxxx欧美| 亚洲成a人在线观看| a4yy欧美一区二区三区| 精品美女在线观看| 亚洲成a人v欧美综合天堂下载| 成人免费不卡视频| 精品99一区二区三区| 亚洲一区二区三区四区不卡| 成年人网站91| 亚洲精品在线免费观看视频| 午夜a成v人精品| 欧美探花视频资源| 成人欧美一区二区三区小说| 国产精品夜夜嗨| 欧美一区二区黄| 亚洲午夜国产一区99re久久| 成人免费视频视频| 久久精品一区二区三区四区| 日韩成人一级大片| 欧美日韩一区成人| 亚洲黄色av一区| 一本色道久久综合亚洲aⅴ蜜桃| 国产精品色噜噜| 国产精品自拍网站| 久久综合999| 国内精品第一页| 久久影音资源网| 国产揄拍国内精品对白| 日韩精品一区二区三区swag | 91精品国产欧美一区二区成人| 一卡二卡三卡日韩欧美|