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

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

?? util.c

?? MPEG2 PLAYER in linux
?? C
字號(hào):
/* * util.c -- * *      Miscellaneous utility procedures. * *//* * Copyright (c) 1995 The Regents of the University of California. * All rights reserved. *  * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * hereby granted, provided that the above copyright notice and the following * two paragraphs appear in all copies of this software. *  * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *  * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. *//* * Portions of this software Copyright (c) 1995 Brown University. * All rights reserved. *  * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement * is hereby granted, provided that the above copyright notice and the * following two paragraphs appear in all copies of this software. *  * IN NO EVENT SHALL BROWN UNIVERSITY BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF BROWN * UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *  * BROWN UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" * BASIS, AND BROWN UNIVERSITY HAS NO OBLIGATION TO PROVIDE MAINTENANCE, * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */#include <stdlib.h>#include "video.h"#include "proto.h"#include "util.h"#ifndef NOCONTROLS#include "ctrlbar.h"#endif/*   Changes to make the code reentrant:     de-globalized: totNumFrames, realTimeStart, vid_stream, sys_layer,        bitOffset, bitLength, bitBuffer, curVidStream     setjmp/longjmp replaced   Additional changes:     only call DestroyVidStream up in mpegVidRsrc, not in correct_underflow   -lsh@cs.brown.edu (Loring Holden) *//* Bit masks used by bit i/o operations. */unsigned int nBitMask[] = { 0x00000000, 0x80000000, 0xc0000000, 0xe0000000, 			    0xf0000000, 0xf8000000, 0xfc000000, 0xfe000000, 			    0xff000000, 0xff800000, 0xffc00000, 0xffe00000, 			    0xfff00000, 0xfff80000, 0xfffc0000, 0xfffe0000, 			    0xffff0000, 0xffff8000, 0xffffc000, 0xffffe000, 			    0xfffff000, 0xfffff800, 0xfffffc00, 0xfffffe00, 			    0xffffff00, 0xffffff80, 0xffffffc0, 0xffffffe0, 			    0xfffffff0, 0xfffffff8, 0xfffffffc, 0xfffffffe};unsigned int bitMask[] = {  0xffffffff, 0x7fffffff, 0x3fffffff, 0x1fffffff, 			    0x0fffffff, 0x07ffffff, 0x03ffffff, 0x01ffffff,			    0x00ffffff, 0x007fffff, 0x003fffff, 0x001fffff,			    0x000fffff, 0x0007ffff, 0x0003ffff, 0x0001ffff,			    0x0000ffff, 0x00007fff, 0x00003fff, 0x00001fff,			    0x00000fff, 0x000007ff, 0x000003ff, 0x000001ff,			    0x000000ff, 0x0000007f, 0x0000003f, 0x0000001f,			    0x0000000f, 0x00000007, 0x00000003, 0x00000001};unsigned int rBitMask[] = { 0xffffffff, 0xfffffffe, 0xfffffffc, 0xfffffff8, 			    0xfffffff0, 0xffffffe0, 0xffffffc0, 0xffffff80, 			    0xffffff00, 0xfffffe00, 0xfffffc00, 0xfffff800, 			    0xfffff000, 0xffffe000, 0xffffc000, 0xffff8000, 			    0xffff0000, 0xfffe0000, 0xfffc0000, 0xfff80000, 			    0xfff00000, 0xffe00000, 0xffc00000, 0xff800000, 			    0xff000000, 0xfe000000, 0xfc000000, 0xf8000000, 			    0xf0000000, 0xe0000000, 0xc0000000, 0x80000000};unsigned int bitTest[] = {  0x80000000, 0x40000000, 0x20000000, 0x10000000, 			    0x08000000, 0x04000000, 0x02000000, 0x01000000,			    0x00800000, 0x00400000, 0x00200000, 0x00100000,			    0x00080000, 0x00040000, 0x00020000, 0x00010000,			    0x00008000, 0x00004000, 0x00002000, 0x00001000,			    0x00000800, 0x00000400, 0x00000200, 0x00000100,			    0x00000080, 0x00000040, 0x00000020, 0x00000010,			    0x00000008, 0x00000004, 0x00000002, 0x00000001};/* *-------------------------------------------------------------- * * correct_underflow -- * *	Called when buffer does not have sufficient data to  *      satisfy request for bits. *      Calls get_more_data, an application specific routine *      required to fill the buffer with more data. * * Results: *      None really. *   * Side effects: *	buf_length and buffer fields may be changed. * *-------------------------------------------------------------- */void correct_underflow(vid_stream)   VidStream *vid_stream;{  int status;  status = get_more_data(vid_stream);  if (status  < 0) {    if (!quietFlag) {      fprintf (stderr, "\n");      perror("Unexpected read error.");    }    exit(1);  }  else if ((status == 0) && (vid_stream->buf_length < 1)) {    if (!quietFlag) {      fprintf(stderr, "\nImproper or missing sequence end code.\n");    }#ifdef ANALYSIS    PrintAllStats(vid_stream);#endif    if (!quietFlag) {      PrintTimeInfo(vid_stream);    }    vid_stream->film_has_ended=TRUE;#ifndef NOCONTROLS    /* Hmm, don't really know if this works or not... */    clear_data_stream(vid_stream);    return;#else    if (loopFlag) {      clear_data_stream(vid_stream);    } /* destroy stream up in mpegVidRsrc */    return;#endif /* !NOCONTROLS */  }#ifdef UTIL2  vid_stream->curBits = *vid_stream->buffer << vid_stream->bit_offset;#else  vid_stream->curBits = *vid_stream->buffer;#endif}/* *-------------------------------------------------------------- * * next_bits -- * *	Compares next num bits to low order position in mask. *      Buffer pointer is NOT advanced. * * Results: *	TRUE, FALSE, or error code. * * Side effects: *	None. * *-------------------------------------------------------------- */int next_bits(num, mask, vid_stream)int num;unsigned int mask;VidStream *vid_stream;{  unsigned int stream;  int ret_value;  /* If no current stream, return error. */  if (vid_stream == NULL)    return NO_VID_STREAM;  /* Get next num bits, no buffer pointer advance. */  show_bitsn(num, stream);  /* Compare bit stream and mask. Set return value toTRUE if equal, FALSE if     differs.   */  if (mask == stream) {    ret_value = TRUE;  } else ret_value = FALSE;  /* Return return value. */  return ret_value;}/* *-------------------------------------------------------------- * * get_ext_data -- * *	Assumes that bit stream is at begining of extension *      data. Parses off extension data into dynamically  *      allocated space until start code is hit.  * * Results: *	Pointer to dynamically allocated memory containing *      extension data. * * Side effects: *	Bit stream irreversibly parsed. * *-------------------------------------------------------------- */char *get_ext_data (vid_stream)   VidStream *vid_stream;{  unsigned int size, marker;  char *dataPtr;  unsigned int data;  /* Set initial ext data buffer size. */  size = EXT_BUF_SIZE;  /* Allocate ext data buffer. */  dataPtr = (char *) malloc(size);  /* Initialize marker to keep place in ext data buffer. */  marker = 0;  /* While next data is not start code... */  while (!next_bits(24, 0x000001, vid_stream)) {    /* Get next byte of ext data. */    get_bits8(data);    /* Put ext data into ext data buffer. Advance marker. */    dataPtr[marker] = (char) data;    marker++;    /* If end of ext data buffer reached, resize data buffer. */    if (marker == size) {      size += EXT_BUF_SIZE;      dataPtr = (char *) realloc(dataPtr, size);    }  }  /* Realloc data buffer to free any extra space. */  dataPtr = (char *) realloc(dataPtr, marker);  /* Return pointer to ext data buffer. */  return dataPtr;}/* *-------------------------------------------------------------- * * next_start_code -- * *	Parses off bitstream until start code reached. When done *      next 4 bytes of bitstream will be start code. Bit offset *      reset to 0. * * Results: *	Status code. * * Side effects: *	Bit stream irreversibly parsed. * *-------------------------------------------------------------- */int next_start_code(vid_stream)   VidStream *vid_stream;{  int state;  int byteoff;  unsigned int data;  /* If no current stream, return error. */  if (vid_stream== NULL)    return NO_VID_STREAM;  /* If insufficient buffer length, correct underflow. */  if (vid_stream->buf_length < 4) {    correct_underflow(vid_stream);  }  /* If bit offset not zero, reset and advance buffer pointer. */  byteoff = vid_stream->bit_offset % 8;  if (byteoff != 0) {    flush_bits((8-byteoff));  }  /* Set state = 0. */  state = 0;  /* While buffer has data ... */  while(vid_stream->buf_length > 0) {    /* If insufficient data exists, correct underflow. */        if (vid_stream->buf_length < 4) {      correct_underflow(vid_stream);    }    /* If next byte is zero... */    get_bits8(data);    if (data == 0) {      /* If state < 2, advance state. */      if (state < 2) state++;    }    /* If next byte is one... */    else if (data == 1) {      /* If state == 2, advance state (i.e. start code found). */      if (state == 2) state++;      /* Otherwise, reset state to zero. */      else state = 0;    }    /* Otherwise byte is neither 1 or 0, reset state to 0. */    else {      state = 0;    }    /* If state == 3 (i.e. start code found)... */    if (state == 3) {      /* Set buffer pointer back and reset length & bit offsets so       * next bytes will be beginning of start code.        */      vid_stream->bit_offset = vid_stream->bit_offset - 24;#ifdef ANALYSIS      bitCount -= 24;#endif      if (vid_stream->bit_offset < 0) {        vid_stream->bit_offset = 32 + vid_stream->bit_offset;        vid_stream->buf_length++;        vid_stream->buffer--;#ifdef UTIL2        vid_stream->curBits = *vid_stream->buffer << vid_stream->bit_offset;#else        vid_stream->curBits = *vid_stream->buffer;#endif      }      else {#ifdef UTIL2        vid_stream->curBits = *vid_stream->buffer << vid_stream->bit_offset;#else        vid_stream->curBits = *vid_stream->buffer;#endif      }      /* Return success. */      return OK;    }  }  /* Return underflow error. */  return STREAM_UNDERFLOW;}/* *-------------------------------------------------------------- * * get_extra_bit_info -- * *	Parses off extra bit info stream into dynamically  *      allocated memory. Extra bit info is indicated by *      a flag bit set to 1, followed by 8 bits of data. *      This continues until the flag bit is zero. Assumes *      that bit stream set to first flag bit in extra *      bit info stream. * * Results: *	Pointer to dynamically allocated memory with extra *      bit info in it. Flag bits are NOT included. * * Side effects: *	Bit stream irreversibly parsed. * *-------------------------------------------------------------- */char *get_extra_bit_info(vid_stream)VidStream *vid_stream;{  unsigned int size, marker;  char *dataPtr;  unsigned int data;  /* Get first flag bit. */  get_bits1(data);  /* If flag is false, return NULL pointer (i.e. no extra bit info). */  if (!data) return NULL;  /* Initialize size of extra bit info buffer and allocate. */  size = EXT_BUF_SIZE;  dataPtr = (char *) malloc(size);  /* Reset marker to hold place in buffer. */  marker = 0;  /* While flag bit is true. */  while (data) {    /* Get next 8 bits of data. */    get_bits8(data);    /* Place in extra bit info buffer. */    dataPtr[marker] = (char) data;    marker++;    /* If buffer is full, reallocate. */    if (marker == size) {      size += EXT_BUF_SIZE;      dataPtr = (char *) realloc(dataPtr, size);    }    /* Get next flag bit. */    get_bits1(data);  }  /* Reallocate buffer to free extra space. */  dataPtr = (char *) realloc(dataPtr, marker);  /* Return pointer to extra bit info buffer. */  return dataPtr;}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲天堂中文字幕| 亚洲高清不卡在线观看| 欧美体内she精视频| 国产精品18久久久久久久网站| 亚洲欧美日韩精品久久久久| 26uuu另类欧美亚洲曰本| 在线观看亚洲a| 99麻豆久久久国产精品免费优播| 免费成人av资源网| 亚洲成av人在线观看| 成人欧美一区二区三区视频网页| 久久午夜羞羞影院免费观看| 91精品国产综合久久香蕉的特点| 91蝌蚪国产九色| 国产成+人+日韩+欧美+亚洲| 男女激情视频一区| 亚洲va在线va天堂| 一区二区日韩电影| 亚洲女人****多毛耸耸8| 亚洲国产精品高清| 久久久久久久久久久久久夜| 日韩女优制服丝袜电影| 91精品在线免费观看| 在线观看免费视频综合| 91原创在线视频| av一二三不卡影片| 成人免费毛片app| 国产精品99久久久久久久女警| 久久精品二区亚洲w码| 日韩av一区二区三区| 午夜a成v人精品| 五月天欧美精品| 日韩高清不卡一区二区| 视频一区中文字幕| 无码av中文一区二区三区桃花岛| 亚洲高清三级视频| 午夜私人影院久久久久| 亚洲国产日韩a在线播放| 一区二区三区鲁丝不卡| 亚洲一区在线观看视频| 亚洲国产精品一区二区久久恐怖片| 一区二区三区自拍| 亚洲v中文字幕| 日韩不卡在线观看日韩不卡视频| 亚洲va欧美va人人爽午夜| 午夜欧美视频在线观看 | 亚洲午夜日本在线观看| 亚洲午夜在线电影| 久久精品亚洲麻豆av一区二区| 欧美一区二区三区在线视频| 欧美亚洲国产一区二区三区| 国产精品国产三级国产普通话蜜臀 | 欧美日韩精品系列| 在线综合+亚洲+欧美中文字幕| 欧美卡1卡2卡| 精品99一区二区| 国产精品网站在线播放| 亚洲精品免费视频| 午夜精品一区二区三区电影天堂| 日韩在线一区二区三区| 久久国产剧场电影| 丁香婷婷深情五月亚洲| 色呦呦国产精品| 欧美一区二区三区在线看| 久久久久久久精| 中文字幕一区二区三区蜜月| 亚洲国产精品久久久久秋霞影院 | 制服视频三区第一页精品| 欧美一卡2卡三卡4卡5免费| 91精品一区二区三区在线观看| 成人h版在线观看| 色婷婷久久久亚洲一区二区三区| 在线播放中文一区| 久久久久久久综合日本| 依依成人精品视频| 久久成人羞羞网站| 96av麻豆蜜桃一区二区| 91麻豆精品国产91久久久久久久久 | 日本欧洲一区二区| 国产福利一区二区三区| 91黄色免费观看| 精品国精品自拍自在线| 亚洲欧美在线观看| 久久精品999| 91国偷自产一区二区使用方法| 欧美电视剧在线观看完整版| 国产精品国产a| 精品无码三级在线观看视频 | 亚洲精品亚洲人成人网| 国产色婷婷亚洲99精品小说| 夜夜亚洲天天久久| 国产91在线看| 337p亚洲精品色噜噜狠狠| 国产精品久久久久影院老司| 免费在线看成人av| 99精品国产91久久久久久| 日韩欧美高清一区| 亚洲一卡二卡三卡四卡| 成人一区二区视频| 精品理论电影在线观看| 亚洲线精品一区二区三区 | 91精品免费在线| 亚洲欧美日韩中文字幕一区二区三区 | 日韩美女视频一区二区在线观看| 亚洲精选免费视频| 成人污污视频在线观看| 日韩精品一区二区三区蜜臀 | 国产成人亚洲综合色影视| 777午夜精品视频在线播放| 亚洲美腿欧美偷拍| av影院午夜一区| 欧美激情在线看| 国产久卡久卡久卡久卡视频精品| 91精品国产综合久久久久久| 亚洲综合成人在线| 色999日韩国产欧美一区二区| 欧美国产禁国产网站cc| 国产一区二区三区香蕉| 日韩美女视频在线| 免费高清在线视频一区·| 欧美福利视频一区| 亚洲一区二区3| 欧美在线观看18| 亚洲一区自拍偷拍| 欧美中文一区二区三区| 亚洲自拍另类综合| 欧美午夜片在线观看| 一区二区三区**美女毛片| 欧美在线播放高清精品| 亚洲高清免费视频| 欧美日韩你懂的| 日本色综合中文字幕| 欧美一个色资源| 韩国v欧美v日本v亚洲v| 久久精品在这里| 成人性生交大合| 自拍偷拍亚洲欧美日韩| 97久久超碰精品国产| 亚洲最色的网站| 欧美视频一区二区三区四区| 石原莉奈在线亚洲三区| 欧美电视剧在线看免费| 国产麻豆午夜三级精品| 日本一区二区三区四区在线视频 | 国产精品 欧美精品| 欧美韩国日本不卡| 91亚洲午夜精品久久久久久| 亚洲精品中文在线影院| 在线不卡欧美精品一区二区三区| 日韩av一区二区在线影视| 精品国产91九色蝌蚪| 成人一二三区视频| 亚洲乱码国产乱码精品精可以看| 91豆麻精品91久久久久久| 午夜精品影院在线观看| 精品国产一区二区三区四区四| 国产精品一二三| 亚洲免费av高清| 欧美高清视频www夜色资源网| 极品美女销魂一区二区三区免费 | 亚洲成av人影院| 精品国产精品网麻豆系列| 成人精品一区二区三区中文字幕| 一区二区三区在线免费观看| 91精品国产综合久久久久久漫画| 国产一区二区精品久久| 亚洲特级片在线| 欧美一区二区三区不卡| 成人午夜激情视频| 天天影视网天天综合色在线播放 | 日韩电影免费在线看| 久久婷婷一区二区三区| 色婷婷综合久久久久中文一区二区 | 蜜臀va亚洲va欧美va天堂| 亚洲国产精品黑人久久久| 欧美日韩精品久久久| 国产精品18久久久久久久网站| 一区二区三区在线播| 亚洲精品一区二区三区福利| 一本到一区二区三区| 极品销魂美女一区二区三区| 亚洲日韩欧美一区二区在线| 日韩欧美一级片| 在线观看日韩电影| 国产一区二区不卡在线| 亚洲一区免费观看| 国产女主播一区| 日韩亚洲欧美在线| 欧洲视频一区二区| 国产成人午夜视频| 免费的成人av| 亚洲亚洲精品在线观看| 中文字幕精品综合| 日韩一卡二卡三卡| 91福利在线看| eeuss国产一区二区三区| 国模套图日韩精品一区二区| 亚洲福中文字幕伊人影院| ...av二区三区久久精品| 久久蜜桃av一区二区天堂|