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

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

?? jdmarker.c

?? MPEG4解碼程序源代碼(能夠對各種MPEG4文件進行解碼)
?? C
?? 第 1 頁 / 共 3 頁
字號:
first_marker (j_decompress_ptr cinfo)
/* Like next_marker, but used to obtain the initial SOI marker. */
/* For this marker, we do not allow preceding garbage or fill; otherwise,
 * we might well scan an entire input file before realizing it ain't JPEG.
 * If an application wants to process non-JFIF files, it must seek to the
 * SOI before calling the JPEG library.
 */
{
  int c, c2;
  INPUT_VARS(cinfo);

  INPUT_BYTE(cinfo, c, return FALSE);
  INPUT_BYTE(cinfo, c2, return FALSE);
  if (c != 0xFF || c2 != (int) M_SOI)
    ERREXIT2(cinfo, JERR_NO_SOI, c, c2);

  cinfo->unread_marker = c2;

  INPUT_SYNC(cinfo);
  return TRUE;
}


/*
 * Read markers until SOS or EOI.
 *
 * Returns same codes as are defined for jpeg_consume_input:
 * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI.
 */

METHODDEF(int)
read_markers (j_decompress_ptr cinfo)
{
  /* Outer loop repeats once for each marker. */
  for (;;) {
    /* Collect the marker proper, unless we already did. */
    /* NB: first_marker() enforces the requirement that SOI appear first. */
    if (cinfo->unread_marker == 0) {
      if (! cinfo->marker->saw_SOI) {
	if (! first_marker(cinfo))
	  return JPEG_SUSPENDED;
      } else {
	if (! next_marker(cinfo))
	  return JPEG_SUSPENDED;
      }
    }
    /* At this point cinfo->unread_marker contains the marker code and the
     * input point is just past the marker proper, but before any parameters.
     * A suspension will cause us to return with this state still true.
     */
    switch (cinfo->unread_marker) {
    case M_SOI:
      if (! get_soi(cinfo))
	return JPEG_SUSPENDED;
      break;

    case M_SOF0:		/* Baseline */
    case M_SOF1:		/* Extended sequential, Huffman */
      if (! get_sof(cinfo, FALSE, FALSE))
	return JPEG_SUSPENDED;
      break;

    case M_SOF2:		/* Progressive, Huffman */
      if (! get_sof(cinfo, TRUE, FALSE))
	return JPEG_SUSPENDED;
      break;

    case M_SOF9:		/* Extended sequential, arithmetic */
      if (! get_sof(cinfo, FALSE, TRUE))
	return JPEG_SUSPENDED;
      break;

    case M_SOF10:		/* Progressive, arithmetic */
      if (! get_sof(cinfo, TRUE, TRUE))
	return JPEG_SUSPENDED;
      break;

    /* Currently unsupported SOFn types */
    case M_SOF3:		/* Lossless, Huffman */
    case M_SOF5:		/* Differential sequential, Huffman */
    case M_SOF6:		/* Differential progressive, Huffman */
    case M_SOF7:		/* Differential lossless, Huffman */
    case M_JPG:			/* Reserved for JPEG extensions */
    case M_SOF11:		/* Lossless, arithmetic */
    case M_SOF13:		/* Differential sequential, arithmetic */
    case M_SOF14:		/* Differential progressive, arithmetic */
    case M_SOF15:		/* Differential lossless, arithmetic */
      ERREXIT1(cinfo, JERR_SOF_UNSUPPORTED, cinfo->unread_marker);
      break;

    case M_SOS:
      if (! get_sos(cinfo))
	return JPEG_SUSPENDED;
      cinfo->unread_marker = 0;	/* processed the marker */
      return JPEG_REACHED_SOS;
    
    case M_EOI:
      TRACEMS(cinfo, 1, JTRC_EOI);
      cinfo->unread_marker = 0;	/* processed the marker */
      return JPEG_REACHED_EOI;
      
    case M_DAC:
      if (! get_dac(cinfo))
	return JPEG_SUSPENDED;
      break;
      
    case M_DHT:
      if (! get_dht(cinfo))
	return JPEG_SUSPENDED;
      break;
      
    case M_DQT:
      if (! get_dqt(cinfo))
	return JPEG_SUSPENDED;
      break;
      
    case M_DRI:
      if (! get_dri(cinfo))
	return JPEG_SUSPENDED;
      break;
      
    case M_APP0:
    case M_APP1:
    case M_APP2:
    case M_APP3:
    case M_APP4:
    case M_APP5:
    case M_APP6:
    case M_APP7:
    case M_APP8:
    case M_APP9:
    case M_APP10:
    case M_APP11:
    case M_APP12:
    case M_APP13:
    case M_APP14:
    case M_APP15:
      if (! (*cinfo->marker->process_APPn[cinfo->unread_marker - (int) M_APP0]) (cinfo))
	return JPEG_SUSPENDED;
      break;
      
    case M_COM:
      if (! (*cinfo->marker->process_COM) (cinfo))
	return JPEG_SUSPENDED;
      break;

    case M_RST0:		/* these are all parameterless */
    case M_RST1:
    case M_RST2:
    case M_RST3:
    case M_RST4:
    case M_RST5:
    case M_RST6:
    case M_RST7:
    case M_TEM:
      TRACEMS1(cinfo, 1, JTRC_PARMLESS_MARKER, cinfo->unread_marker);
      break;

    case M_DNL:			/* Ignore DNL ... perhaps the wrong thing */
      if (! skip_variable(cinfo))
	return JPEG_SUSPENDED;
      break;

    default:			/* must be DHP, EXP, JPGn, or RESn */
      /* For now, we treat the reserved markers as fatal errors since they are
       * likely to be used to signal incompatible JPEG Part 3 extensions.
       * Once the JPEG 3 version-number marker is well defined, this code
       * ought to change!
       */
      ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, cinfo->unread_marker);
      break;
    }
    /* Successfully processed marker, so reset state variable */
    cinfo->unread_marker = 0;
  } /* end loop */
}


/*
 * Read a restart marker, which is expected to appear next in the datastream;
 * if the marker is not there, take appropriate recovery action.
 * Returns FALSE if suspension is required.
 *
 * This is called by the entropy decoder after it has read an appropriate
 * number of MCUs.  cinfo->unread_marker may be nonzero if the entropy decoder
 * has already read a marker from the data source.  Under normal conditions
 * cinfo->unread_marker will be reset to 0 before returning; if not reset,
 * it holds a marker which the decoder will be unable to read past.
 */

METHODDEF(boolean)
read_restart_marker (j_decompress_ptr cinfo)
{
  /* Obtain a marker unless we already did. */
  /* Note that next_marker will complain if it skips any data. */
  if (cinfo->unread_marker == 0) {
    if (! next_marker(cinfo))
      return FALSE;
  }

  if (cinfo->unread_marker ==
      ((int) M_RST0 + cinfo->marker->next_restart_num)) {
    /* Normal case --- swallow the marker and let entropy decoder continue */
    TRACEMS1(cinfo, 3, JTRC_RST, cinfo->marker->next_restart_num);
    cinfo->unread_marker = 0;
  } else {
    /* Uh-oh, the restart markers have been messed up. */
    /* Let the data source manager determine how to resync. */
    if (! (*cinfo->src->resync_to_restart) (cinfo,
					    cinfo->marker->next_restart_num))
      return FALSE;
  }

  /* Update next-restart state */
  cinfo->marker->next_restart_num = (cinfo->marker->next_restart_num + 1) & 7;

  return TRUE;
}


/*
 * This is the default resync_to_restart method for data source managers
 * to use if they don't have any better approach.  Some data source managers
 * may be able to back up, or may have additional knowledge about the data
 * which permits a more intelligent recovery strategy; such managers would
 * presumably supply their own resync method.
 *
 * read_restart_marker calls resync_to_restart if it finds a marker other than
 * the restart marker it was expecting.  (This code is *not* used unless
 * a nonzero restart interval has been declared.)  cinfo->unread_marker is
 * the marker code actually found (might be anything, except 0 or FF).
 * The desired restart marker number (0..7) is passed as a parameter.
 * This routine is supposed to apply whatever error recovery strategy seems
 * appropriate in order to position the input stream to the next data segment.
 * Note that cinfo->unread_marker is treated as a marker appearing before
 * the current data-source input point; usually it should be reset to zero
 * before returning.
 * Returns FALSE if suspension is required.
 *
 * This implementation is substantially constrained by wanting to treat the
 * input as a data stream; this means we can't back up.  Therefore, we have
 * only the following actions to work with:
 *   1. Simply discard the marker and let the entropy decoder resume at next
 *      byte of file.
 *   2. Read forward until we find another marker, discarding intervening
 *      data.  (In theory we could look ahead within the current bufferload,
 *      without having to discard data if we don't find the desired marker.
 *      This idea is not implemented here, in part because it makes behavior
 *      dependent on buffer size and chance buffer-boundary positions.)
 *   3. Leave the marker unread (by failing to zero cinfo->unread_marker).
 *      This will cause the entropy decoder to process an empty data segment,
 *      inserting dummy zeroes, and then we will reprocess the marker.
 *
 * #2 is appropriate if we think the desired marker lies ahead, while #3 is
 * appropriate if the found marker is a future restart marker (indicating
 * that we have missed the desired restart marker, probably because it got
 * corrupted).
 * We apply #2 or #3 if the found marker is a restart marker no more than
 * two counts behind or ahead of the expected one.  We also apply #2 if the
 * found marker is not a legal JPEG marker code (it's certainly bogus data).
 * If the found marker is a restart marker more than 2 counts away, we do #1
 * (too much risk that the marker is erroneous; with luck we will be able to
 * resync at some future point).
 * For any valid non-restart JPEG marker, we apply #3.  This keeps us from
 * overrunning the end of a scan.  An implementation limited to single-scan
 * files might find it better to apply #2 for markers other than EOI, since
 * any other marker would have to be bogus data in that case.
 */

GLOBAL(boolean)
jpeg_resync_to_restart (j_decompress_ptr cinfo, int desired)
{
  int marker = cinfo->unread_marker;
  int action = 1;
  
  /* Always put up a warning. */
  WARNMS2(cinfo, JWRN_MUST_RESYNC, marker, desired);
  
  /* Outer loop handles repeated decision after scanning forward. */
  for (;;) {
    if (marker < (int) M_SOF0)
      action = 2;		/* invalid marker */
    else if (marker < (int) M_RST0 || marker > (int) M_RST7)
      action = 3;		/* valid non-restart marker */
    else {
      if (marker == ((int) M_RST0 + ((desired+1) & 7)) ||
	  marker == ((int) M_RST0 + ((desired+2) & 7)))
	action = 3;		/* one of the next two expected restarts */
      else if (marker == ((int) M_RST0 + ((desired-1) & 7)) ||
	       marker == ((int) M_RST0 + ((desired-2) & 7)))
	action = 2;		/* a prior restart, so advance */
      else
	action = 1;		/* desired restart or too far away */
    }
    TRACEMS2(cinfo, 4, JTRC_RECOVERY_ACTION, marker, action);
    switch (action) {
    case 1:
      /* Discard marker and let entropy decoder resume processing. */
      cinfo->unread_marker = 0;
      return TRUE;
    case 2:
      /* Scan to the next marker, and repeat the decision loop. */
      if (! next_marker(cinfo))
	return FALSE;
      marker = cinfo->unread_marker;
      break;
    case 3:
      /* Return without advancing past this marker. */
      /* Entropy decoder will be forced to process an empty segment. */
      return TRUE;
    }
  } /* end loop */
}


/*
 * Reset marker processing state to begin a fresh datastream.
 */

METHODDEF(void)
reset_marker_reader (j_decompress_ptr cinfo)
{
  cinfo->comp_info = NULL;		/* until allocated by get_sof */
  cinfo->input_scan_number = 0;		/* no SOS seen yet */
  cinfo->unread_marker = 0;		/* no pending marker */
  cinfo->marker->saw_SOI = FALSE;	/* set internal state too */
  cinfo->marker->saw_SOF = FALSE;
  cinfo->marker->discarded_bytes = 0;
}


/*
 * Initialize the marker reader module.
 * This is called only once, when the decompression object is created.
 */

GLOBAL(void)
jinit_marker_reader (j_decompress_ptr cinfo)
{
  int i;

  /* Create subobject in permanent pool */
  cinfo->marker = (struct jpeg_marker_reader *)
    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
				SIZEOF(struct jpeg_marker_reader));
  /* Initialize method pointers */
  cinfo->marker->reset_marker_reader = reset_marker_reader;
  cinfo->marker->read_markers = read_markers;
  cinfo->marker->read_restart_marker = read_restart_marker;
  cinfo->marker->process_COM = skip_variable;
  for (i = 0; i < 16; i++)
    cinfo->marker->process_APPn[i] = skip_variable;
  cinfo->marker->process_APPn[0] = get_app0;
  cinfo->marker->process_APPn[14] = get_app14;
  /* Reset marker processing state */
  reset_marker_reader(cinfo);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
8x8x8国产精品| 欧美精品乱人伦久久久久久| 国产suv精品一区二区三区| 国产精品一区免费视频| 夫妻av一区二区| 欧美日韩一区二区三区四区五区| 911精品国产一区二区在线| 欧美日韩一二三区| 久久先锋资源网| 亚洲欧美日韩人成在线播放| 日本中文字幕一区二区有限公司| 日本不卡123| 91免费视频大全| 这里只有精品免费| 国产精品毛片久久久久久| 亚洲愉拍自拍另类高清精品| 美女尤物国产一区| 91理论电影在线观看| 日韩欧美一级片| 日韩一区日韩二区| 久久国产精品99久久人人澡| 91在线观看一区二区| 日韩三级视频在线观看| 亚洲精品中文字幕乱码三区| 国产毛片精品视频| 欧美日韩夫妻久久| 国产亚洲短视频| 美脚の诱脚舐め脚责91| 日本韩国精品在线| 亚洲国产成人私人影院tom| 日韩高清在线观看| 成人av在线资源网站| 久久亚洲精精品中文字幕早川悠里| 中文字幕一区二区三区蜜月| 国产麻豆精品一区二区| 欧美一区二区在线不卡| 亚洲永久精品国产| 国产成人av一区二区三区在线 | 国产精品久久久久久久久图文区 | 久久久久久久一区| 秋霞成人午夜伦在线观看| 欧美综合亚洲图片综合区| 国产精品乱码妇女bbbb| 久久精品国产秦先生| 欧美人体做爰大胆视频| 亚洲一区二区精品久久av| 99re视频这里只有精品| 亚洲欧美综合在线精品| 成人免费高清在线观看| 久久久五月婷婷| 激情五月婷婷综合| 日韩欧美国产一区二区在线播放| 国产精品久久免费看| 国产成人99久久亚洲综合精品| 久久日一线二线三线suv| 蜜臀av性久久久久蜜臀av麻豆| 色菇凉天天综合网| 成人欧美一区二区三区白人| 成人激情免费网站| 国产精品不卡一区| 成人黄色在线网站| 一区二区三区日韩| 5858s免费视频成人| 秋霞成人午夜伦在线观看| 精品国产免费视频| 国产精品自拍网站| 国产精品网站在线播放| 97精品超碰一区二区三区| 亚洲欧美自拍偷拍色图| 欧美亚洲另类激情小说| 亚洲黄一区二区三区| 欧美日韩色综合| 日本不卡视频一二三区| 精品动漫一区二区三区在线观看| 精品在线播放免费| 国产精品久久久久永久免费观看 | 久久精品一区二区三区不卡牛牛 | 亚洲精品视频在线观看网站| 欧美色国产精品| 免费日韩伦理电影| 麻豆精品久久精品色综合| 欧美国产乱子伦| 日韩一区二区三区在线| 91亚洲精品久久久蜜桃| 国产乱国产乱300精品| 午夜视频一区二区三区| 中文字幕av一区二区三区| 日韩欧美在线综合网| 91国在线观看| gogo大胆日本视频一区| 美女脱光内衣内裤视频久久网站| 亚洲美女在线一区| 国产精品成人网| 久久精品日产第一区二区三区高清版| 欧美日韩视频在线一区二区| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 亚洲免费电影在线| 国产日韩欧美精品一区| 日韩欧美综合在线| 欧美午夜不卡视频| 91视频精品在这里| 成人va在线观看| 成人污污视频在线观看| 国产精品一区二区你懂的| 美国一区二区三区在线播放| 偷拍自拍另类欧美| 五月天激情小说综合| 午夜久久久久久久久| 亚洲成人资源网| 亚洲成人在线免费| 亚洲成人动漫在线免费观看| 亚洲综合男人的天堂| 亚洲综合成人网| 亚洲综合在线五月| 亚洲五码中文字幕| 五月婷婷综合在线| 亚洲一区在线电影| 视频一区中文字幕国产| 日韩福利视频网| 精品一区免费av| 国产福利91精品| 成人免费高清在线| 99久久777色| 色诱视频网站一区| 欧美日韩中字一区| 日韩视频免费观看高清完整版在线观看 | 欧美综合在线视频| 欧美群妇大交群中文字幕| 91精品国产全国免费观看| 日韩视频一区在线观看| 精品国精品国产| 久久精品一区四区| 亚洲三级在线免费| 亚洲一区二区三区美女| 免费在线观看一区| 国产美女一区二区| 色综合久久综合| 欧美挠脚心视频网站| 久久女同性恋中文字幕| 日韩毛片在线免费观看| 亚洲成va人在线观看| 日本不卡的三区四区五区| 国产+成+人+亚洲欧洲自线| 91小宝寻花一区二区三区| 欧美夫妻性生活| 欧美激情综合五月色丁香| 亚洲国产视频在线| 激情综合色播激情啊| 色综合久久中文字幕综合网| 7777女厕盗摄久久久| 国产欧美一区二区精品性色超碰| 一区二区三区.www| 国产自产2019最新不卡| 欧美视频日韩视频| 中文字幕免费观看一区| 亚洲高清免费在线| 国产精品1区二区.| 欧美剧在线免费观看网站| 久久精品网站免费观看| 亚洲444eee在线观看| 国产成人亚洲综合色影视| 欧美日韩亚洲高清一区二区| 国产女同性恋一区二区| 日韩福利电影在线| 色综合久久综合中文综合网| 精品99一区二区| 日韩不卡一区二区三区| 色狠狠色狠狠综合| 国产精品视频一二三区| 久久成人免费电影| 在线观看日韩国产| 国产精品久线观看视频| 久久精品国产一区二区三| 在线国产电影不卡| 亚洲视频资源在线| 国产成人高清视频| 日韩亚洲欧美综合| 一区二区欧美在线观看| 国产成人激情av| 久久亚洲精精品中文字幕早川悠里 | 免费高清不卡av| 欧美亚洲国产一区二区三区va| 国产精品三级电影| 国产一区二区三区综合| 欧美高清视频一二三区| 一区二区三区 在线观看视频| 成人h精品动漫一区二区三区| 久久久久国色av免费看影院| 日本在线观看不卡视频| 欧美色视频一区| 亚洲激情第一区| 91免费视频大全| 亚洲色图视频免费播放| 91美女在线观看| 亚洲欧美一区二区不卡| 91亚洲资源网| 一区二区三区四区在线免费观看| 97久久超碰国产精品| 亚洲四区在线观看| 色天使色偷偷av一区二区|