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

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

?? jrdgif.c

?? EVM板JPEG實現,Texas Instruments TMS320C54x EVM JPEG
?? C
?? 第 1 頁 / 共 2 頁
字號:
	symbol_tail[code] = (UINT8) firstcode;
	max_code++;
	/* Is it time to increase code_size? */
	if ((max_code >= limit_code) && (code_size < MAX_LZW_BITS)) {
	  code_size++;
	  limit_code <<= 1;         /* keep equal to 2^code_size */
	}
  }
  
  oldcode = incode;             /* save last input symbol for future use */
  return firstcode;             /* return first byte of symbol's expansion */
}


LOCAL void
ReadColorMap (compress_info_ptr cinfo, int cmaplen, JSAMPARRAY cmap)
/* Read a GIF colormap */
{
  int i;

  for (i = 0; i < cmaplen; i++) {
	cmap[CM_RED][i]   = (JSAMPLE) ReadByte(cinfo);
	cmap[CM_GREEN][i] = (JSAMPLE) ReadByte(cinfo);
	cmap[CM_BLUE][i]  = (JSAMPLE) ReadByte(cinfo);
  }
}


LOCAL void
DoExtension (compress_info_ptr cinfo)
/* Process an extension block */
/* Currently we ignore 'em all */
{
  int extlabel;

  /* Read extension label byte */
  extlabel = ReadByte(cinfo);

  /*
  TRACEMS1(cinfo->emethods, 1, "Ignoring GIF extension block of type 0x%02x",
	   extlabel);
  */

  /* Skip the data block(s) associated with the extension */
  SkipDataBlocks(cinfo);
}


/*
 * Read the file header; return image size and component count.
 */

METHODDEF void
input_init (compress_info_ptr cinfo)
{
  char hdrbuf[10];              /* workspace for reading control blocks */
  UINT16 width, height;         /* image dimensions */
  int colormaplen, aspectRatio;
  int c;

/* Allocate space to store the colormap */
  colormap = (*cinfo->emethods->alloc_small_sarray)
		((long) MAXCOLORMAPSIZE, (long) NUMCOLORS);
/* Read and verify GIF Header */
  if (!(ReadOK(cinfo->input_file, hdrbuf, 5)))
  {
/*  ERREXIT(cinfo->emethods, "Not a GIF file");     */
    send_command(ERR0);  /* send error message      */
    exit();
  }
  if (hdrbuf[0] != 'I' || hdrbuf[1] != 'F')
  {
/*  ERREXIT(cinfo->emethods, "Not a GIF file");     */
    send_command(ERR0);   /* send error message     */
    exit();
  }

  /* Check for expected version numbers.
   * If unknown version, give warning and try to process anyway;
   * this is per recommendation in GIF89a standard.
   */
/*if ((hdrbuf[2] != '8' || hdrbuf[3] != '7' || hdrbuf[4] != 'a') &&
	  (hdrbuf[2] != '8' || hdrbuf[3] != '9' || hdrbuf[4] != 'a'))
	TRACEMS3(cinfo->emethods, 1,
		 "Warning: unexpected GIF version number '%c%c%c'",
		 hdrbuf[3], hdrbuf[4], hdrbuf[5]);
*/
  /* Read and decipher Logical Screen Descriptor */

  if (! ReadOK(cinfo->input_file, hdrbuf, 7))
  {
/*  ERREXIT(cinfo->emethods, "Premature EOF in GIF file"); */
    send_command(ERR1);              /* send error message */
    exit();
  }

  width = LM_to_uint(hdrbuf[0],hdrbuf[1]);
  height = LM_to_uint(hdrbuf[2],hdrbuf[3]);
  colormaplen = 2 << (hdrbuf[4] & 0x07);
  /* we ignore the color resolution, sort flag, and background color index */
  aspectRatio = hdrbuf[6] & 0xFF;
/*if (aspectRatio != 0 && aspectRatio != 49)
	TRACEMS(cinfo->emethods, 1, "Warning: nonsquare pixels in input");
*/
  /* Read global colormap if header indicates it is present */
  if (BitSet(hdrbuf[4], COLORMAPFLAG))
	ReadColorMap(cinfo, colormaplen, colormap);

  /* Scan until we reach start of desired image.
   * We don't currently support skipping images, but could add it easily.
   */
  for (;;) {
	c = ReadByte(cinfo);

   if (c == ';')               /* GIF terminator??                */
   {
/*   ERREXIT(cinfo->emethods, "Too few images in GIF file");   */
     send_command(ERR2);   /* send error message               */
     exit();
   }

	if (c == '!') {             /* Extension */
	  DoExtension(cinfo);
	  continue;
	}
	
   if (c != ',') {             /* Not an image separator?                */
/* TRACEMS1(cinfo->emethods, 1, "Bogus input char 0x%02x, ignoring", c); */
     send_command(ERR3);       /* send error message                     */
	  continue;
	}

	/* Read and decipher Local Image Descriptor */

	if (! ReadOK(cinfo->input_file, hdrbuf, 9))
   {
/*   ERREXIT(cinfo->emethods, "Premature EOF in GIF file");    */
     send_command(ERR1);                 /* send error message */
     exit();
   }

	/* we ignore top/left position info, also sort flag */
	width = LM_to_uint(hdrbuf[4],hdrbuf[5]);
	height = LM_to_uint(hdrbuf[6],hdrbuf[7]);
	is_interlaced = BitSet(hdrbuf[8], INTERLACE);

   /* Read local colormap if header indicates it is present           */
   /* Note: if we wanted to support skipping images,                  */
   /* we'd need to skip rather than read colormap for ignored images  */
	if (BitSet(hdrbuf[8], COLORMAPFLAG)) {
	  colormaplen = 2 << (hdrbuf[8] & 0x07);
	  ReadColorMap(cinfo, colormaplen, colormap);
	}

   input_code_size = ReadByte(cinfo); /* get minimum-code-size byte   */
/* if (input_code_size < 2 || input_code_size >= MAX_LZW_BITS)
	  ERREXIT1(cinfo->emethods, "Bogus codesize %d", input_code_size); */

	/* Reached desired image, so break out of loop */
	/* If we wanted to skip this image, */
	/* we'd call SkipDataBlocks and then continue the loop */
	break;
  }

  /* Prepare to read selected image: first initialize LZW decompressor */
  symbol_head = (UINT16 FAR *) (*cinfo->emethods->alloc_medium)
				(LZW_TABLE_SIZE * SIZEOF(UINT16));
  symbol_tail = (UINT8 FAR *) (*cinfo->emethods->alloc_medium)
				(LZW_TABLE_SIZE * SIZEOF(UINT8));
  symbol_stack = (UINT8 FAR *) (*cinfo->emethods->alloc_medium)
				(LZW_TABLE_SIZE * SIZEOF(UINT8));
  InitLZWCode();

  /*
   * If image is interlaced, we read it into a full-size sample array,
   * decompressing as we go; then get_input_row selects rows from the
   * sample array in the proper order.
   */
  if (is_interlaced) {
	/* We request the big array now, but can't access it until the pipeline
	 * controller causes all the big arrays to be allocated.  Hence, the
	 * actual work of reading the image is postponed until the first call
	 * of get_input_row.
	 */
	interlaced_image = (*cinfo->emethods->request_big_sarray)
		((long) width, (long) height, 1L);
	cinfo->methods->get_input_row = load_interlaced_image;
	cinfo->total_passes++;      /* count file reading as separate pass */
  }

  /* Return info about the image. */
  cinfo->input_components = NUMCOLORS;
  cinfo->in_color_space = CS_RGB;
  cinfo->image_width = width;
  cinfo->image_height = height;
  cinfo->data_precision = 8;    /* always, even if 12-bit JSAMPLEs */

/*TRACEMS3(cinfo->emethods, 1, "%ux%ux%d GIF image",
	   (unsigned int) width, (unsigned int) height, colormaplen);
*/

}


/*
 * Read one row of pixels.
 * This version is used for noninterlaced GIF images:
 * we read directly from the GIF file.
 */

METHODDEF void
get_input_row (compress_info_ptr cinfo, JSAMPARRAY pixel_row)
{
  register JSAMPROW ptr0, ptr1, ptr2;
  register long col;
  register int c;
  
  ptr0 = pixel_row[0];
  ptr1 = pixel_row[1];
  ptr2 = pixel_row[2];
  for (col = cinfo->image_width; col > 0; col--) {
	c = LZWReadByte(cinfo);
	*ptr0++ = colormap[CM_RED][c];
	*ptr1++ = colormap[CM_GREEN][c];
	*ptr2++ = colormap[CM_BLUE][c];
  }
}


/*
 * Read one row of pixels.
 * This version is used for the first call on get_input_row when
 * reading an interlaced GIF file: we read the whole image into memory.
 */

METHODDEF void
load_interlaced_image (compress_info_ptr cinfo, JSAMPARRAY pixel_row)
{
  JSAMPARRAY image_ptr;
  register JSAMPROW sptr;
  register long col;
  long row;

  /* Read the interlaced image into the big array we've created. */
  for (row = 0; row < cinfo->image_height; row++) {
	(*cinfo->methods->progress_monitor) (cinfo, row, cinfo->image_height);
	image_ptr = (*cinfo->emethods->access_big_sarray)
			(interlaced_image, row, TRUE);
	sptr = image_ptr[0];
	for (col = cinfo->image_width; col > 0; col--) {
	  *sptr++ = (JSAMPLE) LZWReadByte(cinfo);
	}
  }
  cinfo->completed_passes++;

  /* Replace method pointer so subsequent calls don't come here. */
  cinfo->methods->get_input_row = get_interlaced_row;
  /* Initialize for get_interlaced_row, and perform first call on it. */
  cur_row_number = 0;
  pass2_offset = (cinfo->image_height + 7L) / 8L;
  pass3_offset = pass2_offset + (cinfo->image_height + 3L) / 8L;
  pass4_offset = pass3_offset + (cinfo->image_height + 1L) / 4L;

  get_interlaced_row(cinfo, pixel_row);
}


/*
 * Read one row of pixels.
 * This version is used for interlaced GIF images:
 * we read from the big in-memory image.
 */

METHODDEF void
get_interlaced_row (compress_info_ptr cinfo, JSAMPARRAY pixel_row)
{
  JSAMPARRAY image_ptr;
  register JSAMPROW sptr, ptr0, ptr1, ptr2;
  register long col;
  register int c;
  long irow;

  /* Figure out which row of interlaced image is needed, and access it. */
  switch ((int) (cur_row_number & 7L)) {
  case 0:                       /* first-pass row */
	irow = cur_row_number >> 3;
	break;
  case 4:                       /* second-pass row */
	irow = (cur_row_number >> 3) + pass2_offset;
	break;
  case 2:                       /* third-pass row */
  case 6:
	irow = (cur_row_number >> 2) + pass3_offset;
	break;
  default:                      /* fourth-pass row */
	irow = (cur_row_number >> 1) + pass4_offset;
	break;
  }
  image_ptr = (*cinfo->emethods->access_big_sarray)
			(interlaced_image, irow, FALSE);
  /* Scan the row, expand colormap, and output */
  sptr = image_ptr[0];
  ptr0 = pixel_row[0];
  ptr1 = pixel_row[1];
  ptr2 = pixel_row[2];
  for (col = cinfo->image_width; col > 0; col--) {
	c = GETJSAMPLE(*sptr++);
	*ptr0++ = colormap[CM_RED][c];
	*ptr1++ = colormap[CM_GREEN][c];
	*ptr2++ = colormap[CM_BLUE][c];
  }
  cur_row_number++;             /* for next time */
}

/*
 * Finish up at the end of the file.
 */

METHODDEF void
input_term (compress_info_ptr cinfo)
{
  /* no work (we let free_all release the workspace) */
}


/*
 * The method selection routine for GIF format input.
 * Note that this must be called by the user interface before calling
 * jpeg_compress.  If multiple input formats are supported, the
 * user interface is responsible for discovering the file format and
 * calling the appropriate method selection routine.
 */

GLOBAL void
jselrgif (compress_info_ptr cinfo)
{
  cinfo->methods->input_init = input_init;
  cinfo->methods->get_input_row = get_input_row; /* assume uninterlaced */
  cinfo->methods->input_term = input_term;
}

#endif /* GIF_SUPPORTED */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品免费在线观看| 国产综合色产在线精品| 久久精品国产免费| 色一情一乱一乱一91av| wwwwxxxxx欧美| 五月婷婷综合网| 色猫猫国产区一区二在线视频| 久久久蜜桃精品| 免费在线看成人av| 欧美在线观看视频一区二区| 国产精品青草综合久久久久99| 蜜桃视频一区二区三区在线观看| 日本丰满少妇一区二区三区| 久久精品在线观看| 久久不见久久见中文字幕免费| 欧美日韩一区二区三区不卡| 自拍偷拍亚洲激情| av一本久道久久综合久久鬼色| 2020国产精品久久精品美国| 免费在线成人网| 欧美精品色一区二区三区| 夜夜亚洲天天久久| 欧洲人成人精品| 亚洲精品免费看| 欧美性视频一区二区三区| 亚洲卡通欧美制服中文| 在线中文字幕不卡| 亚洲女同ⅹxx女同tv| 99国产欧美另类久久久精品| 国产精品你懂的在线欣赏| 国产高清无密码一区二区三区| 亚洲精品一区二区三区香蕉| 韩国女主播成人在线观看| 26uuu欧美日本| 国产不卡视频一区| 亚洲天堂免费在线观看视频| 99国内精品久久| 亚洲一区二区三区在线播放| 欧美在线观看视频一区二区 | 久久久美女毛片| 国产精品一区二区男女羞羞无遮挡 | 日韩美女视频19| 91在线免费看| 一区二区三区资源| 欧美性猛交xxxxxx富婆| 亚洲国产成人av好男人在线观看| 欧美精品日日鲁夜夜添| 精品一区二区三区久久| 国产精品二区一区二区aⅴ污介绍| 99精品久久久久久| 国产日本欧洲亚洲| av午夜一区麻豆| 亚洲欧洲av另类| 欧美在线综合视频| 青青草国产精品97视觉盛宴| 欧美变态tickling挠脚心| 国产成a人亚洲| 亚洲国产视频直播| 久久久91精品国产一区二区精品| 成人精品国产免费网站| 亚洲午夜电影在线观看| 精品国产一区久久| 色一情一伦一子一伦一区| 另类欧美日韩国产在线| 国产精品久久久久久久久久免费看| 91丝袜美腿高跟国产极品老师 | 在线免费观看视频一区| 日韩av二区在线播放| 国产欧美一区二区精品秋霞影院| 色综合婷婷久久| 久久精品理论片| 亚洲综合男人的天堂| 欧美精品一区二区久久久| 色噜噜狠狠一区二区三区果冻| 美国十次综合导航| 亚洲精品免费视频| 国产日韩一级二级三级| 在线不卡欧美精品一区二区三区| 国v精品久久久网| 三级欧美在线一区| 亚洲男同性恋视频| 国产日韩欧美精品一区| 欧美成人一区二区三区在线观看| 色香蕉久久蜜桃| 国产高清精品在线| 麻豆视频一区二区| 亚洲国产你懂的| 中文字幕一区二区在线播放| 精品少妇一区二区三区免费观看| 欧洲一区在线电影| 色综合天天综合网天天看片| 国产福利一区在线观看| 蜜臀av一级做a爰片久久| 香蕉久久一区二区不卡无毒影院| 国产精品色噜噜| 日本一区二区视频在线| 精品国产91洋老外米糕| 欧美一级理论片| 欧美一区二区日韩| 日韩一区二区免费高清| 欧美美女喷水视频| 欧美精品亚洲一区二区在线播放| 在线视频国内自拍亚洲视频| 91精品国产色综合久久ai换脸| 91在线国产福利| av在线不卡电影| 波多野结衣一区二区三区| 国产成都精品91一区二区三| 国产麻豆精品theporn| 韩国欧美国产1区| 国产一区二区在线观看免费 | 日韩欧美一级二级三级| 精品视频999| 欧美日韩国产高清一区二区 | 日韩精品欧美精品| 日韩va欧美va亚洲va久久| 亚洲123区在线观看| 亚洲成a人片综合在线| 天堂成人免费av电影一区| 全国精品久久少妇| 麻豆91在线播放免费| 国产精品一区不卡| 99久久久国产精品| 色网综合在线观看| 欧美三级一区二区| 欧美一区二区视频观看视频| 日韩女优视频免费观看| 久久九九全国免费| 亚洲精品欧美在线| 青青草视频一区| 国产大陆亚洲精品国产| 91免费看`日韩一区二区| 欧美在线一区二区| 精品欧美一区二区久久| 久久久精品蜜桃| 亚洲另类在线视频| 老司机精品视频在线| 国产丶欧美丶日本不卡视频| av高清久久久| 欧美久久久久久蜜桃| 久久久影视传媒| 亚洲一二三四在线| 国产另类ts人妖一区二区| 91玉足脚交白嫩脚丫在线播放| 欧美日韩亚洲综合一区二区三区 | 中文字幕一区二区不卡| 亚洲五月六月丁香激情| 国产主播一区二区| 91成人免费网站| 精品免费一区二区三区| 亚洲天天做日日做天天谢日日欢 | 91久久线看在观草草青青 | 色婷婷av久久久久久久| 欧美一区二区三区在线视频| 国产精品每日更新在线播放网址| 天天av天天翘天天综合网| 国产精品正在播放| 欧美日韩不卡在线| 国产精品电影一区二区三区| 视频精品一区二区| av在线这里只有精品| 欧美日韩国产首页在线观看| 国产喷白浆一区二区三区| 亚洲电影欧美电影有声小说| 国产suv精品一区二区6| 91精品国产91久久久久久一区二区| 国产精品天美传媒| 久久国产精品区| 欧美私人免费视频| 日韩美女久久久| 国产99久久久精品| 精品久久人人做人人爱| 亚洲chinese男男1069| 99riav久久精品riav| 国产清纯白嫩初高生在线观看91 | 99re8在线精品视频免费播放| 欧美一区2区视频在线观看| 亚洲精选一二三| 成人精品在线视频观看| 精品人伦一区二区色婷婷| 亚洲韩国一区二区三区| 99久久免费国产| 亚洲国产成人私人影院tom | 亚洲午夜久久久久| 在线中文字幕一区| 亚洲免费三区一区二区| 日韩欧美国产精品一区| 亚洲国产视频一区二区| 一本一道久久a久久精品| 中文字幕一区二区三区不卡| 国产成人精品一区二| 久久久久久久一区| 国产精品资源在线观看| 2017欧美狠狠色| 国产在线精品一区二区不卡了 | 亚洲日本丝袜连裤袜办公室| 懂色av一区二区三区免费观看| 久久免费视频色| 粉嫩一区二区三区性色av| 国产欧美日韩激情|