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

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

?? subspic.c

?? 實現對TS->PES->ES,分離出TS流里的視頻音頻,也可將視頻音頻合并為TS流. 實現對PS->PES->ES->PES->TS,分離出PS流里的視頻音頻,也
?? C
字號:
/* #define DEBUG *//* subspic.c, Frame buffer substitution routines *//* Copyright (C) 1996, MPEG Software Simulation Group. All Rights Reserved. *//* * Disclaimer of Warranty * * These software programs are available to the user without any license fee or * royalty on an "as is" basis.  The MPEG Software Simulation Group disclaims * any and all warranties, whether express, implied, or statuary, including any * implied warranties or merchantability or of fitness for a particular * purpose.  In no event shall the copyright-holder be liable for any * incidental, punitive, or consequential damages of any kind whatsoever * arising from the use of these programs. * * This disclaimer of warranty extends to the user of these programs and user's * customers, employees, agents, transferees, successors, and assigns. * * The MPEG Software Simulation Group does not represent or warrant that the * programs furnished hereunder are free of infringement of any third-party * patents. * * Commercial implementations of MPEG-1 and MPEG-2 video, including shareware, * are subject to royalty fees to patent holders.  Many of these patents are * general enough such that they are unavoidable regardless of implementation * design. * */#include <stdio.h>#include <stdlib.h>#include <fcntl.h>#include "config.h"#include "global.h"/* private prototypes*/static void Read_Frame _ANSI_ARGS_((char *filename,   unsigned char *frame_buffer[], int framenum));static void Copy_Frame _ANSI_ARGS_((unsigned char *src, unsigned char *dst,   int width, int height, int parity, int incr));static int Read_Components _ANSI_ARGS_ ((char *filename,   unsigned char *frame[3], int framenum));static int Read_Component _ANSI_ARGS_ ((char *fname, unsigned char *frame,   int width, int height));static int Extract_Components _ANSI_ARGS_ ((char *filename,  unsigned char *frame[3], int framenum));/* substitute frame buffer routine */void Substitute_Frame_Buffer (bitstream_framenum, sequence_framenum)int bitstream_framenum;int sequence_framenum;{  /* static tracking variables */  static int previous_temporal_reference;  static int previous_bitstream_framenum;  static int previous_anchor_temporal_reference;  static int previous_anchor_bitstream_framenum;  static int previous_picture_coding_type;  static int bgate;    /* local temporary variables */  int substitute_display_framenum;#ifdef DEBUG  printf("SUB: seq fn(%d) bitfn(%d) tempref(%d) picstr(%d) type(%d)\n",     sequence_framenum, bitstream_framenum, temporal_reference,     picture_structure, picture_coding_type);#endif  /* we don't substitute at the first picture of a sequence */  if((sequence_framenum!=0)||(Second_Field))  {    /* only at the start of the frame */    if ((picture_structure==FRAME_PICTURE)||(!Second_Field))    {      if(picture_coding_type==P_TYPE)      {        /* the most recently decoded reference frame needs substituting */        substitute_display_framenum = bitstream_framenum - 1;                Read_Frame(Substitute_Picture_Filename, forward_reference_frame,           substitute_display_framenum);      }      /* only the first B frame in a consequitve set of B pictures         loads a substitute backward_reference_frame since all subsequent         B frames predict from the same reference pictures */      else if((picture_coding_type==B_TYPE)&&(bgate!=1))      {        substitute_display_framenum =           (previous_temporal_reference - temporal_reference)             + bitstream_framenum - 1;        Read_Frame(Substitute_Picture_Filename, backward_reference_frame,           substitute_display_framenum);      }    } /* P fields can predict from the two most recently decoded fields, even         from the first field of the same frame being decoded */    else if(Second_Field && (picture_coding_type==P_TYPE))    {      /* our favourite case: the IP field picture pair */      if((previous_picture_coding_type==I_TYPE)&&(picture_coding_type==P_TYPE))      {        substitute_display_framenum = bitstream_framenum;      }      else /* our more generic P field picture pair */      {        substitute_display_framenum =           (temporal_reference - previous_anchor_temporal_reference)             + bitstream_framenum - 1;      }      Read_Frame(Substitute_Picture_Filename, current_frame, substitute_display_framenum);    }#ifdef DEBUG    else if((picture_coding_type!=B_TYPE)||(picture_coding_type!=D_TYPE))    {      printf("NO SUBS FOR THIS PICTURE\n");    }#endif  }  /* set b gate so we don't redundantly load next time around */  if(picture_coding_type==B_TYPE)    bgate = 1;  else    bgate = 0;  /* update general tracking variables */  if((picture_structure==FRAME_PICTURE)||(!Second_Field))  {    previous_temporal_reference  = temporal_reference;    previous_bitstream_framenum  = bitstream_framenum;  }    /* update reference frame tracking variables */  if((picture_coding_type!=B_TYPE) &&     ((picture_structure==FRAME_PICTURE)||Second_Field))  {    previous_anchor_temporal_reference  = temporal_reference;    previous_anchor_bitstream_framenum  = bitstream_framenum;  }  previous_picture_coding_type = picture_coding_type;}/* Note: fields are only read to serve as the same-frame reference for    a second field */static void Read_Frame(fname,frame,framenum)char *fname;unsigned char *frame[];int framenum;{  int parity;  int rerr = 0;  int field_mode;  if(framenum<0)    printf("ERROR: framenum (%d) is less than zero\n", framenum);  if(Big_Picture_Flag)    rerr = Extract_Components(fname, substitute_frame, framenum);  else    rerr = Read_Components(fname, substitute_frame, framenum);  if(rerr!=0)  {    printf("was unable to substitute frame\n");  }  /* now copy to the appropriate buffer */  /* first field (which we are attempting to substitute) must be     of opposite field parity to the current one */  if((Second_Field)&&(picture_coding_type==P_TYPE))  {    parity      = (picture_structure==TOP_FIELD ? 1:0);          field_mode  = (picture_structure==FRAME_PICTURE ? 0:1);  }  else  {    /* Like frame structued pictures, B pictures only substitute an entire frame        since both fields always predict from the same frame (with respect        to forward/backwards directions) */    parity = 0;    field_mode = 0;  }  Copy_Frame(substitute_frame[0], frame[0], Coded_Picture_Width,     Coded_Picture_Height, parity, field_mode);    Copy_Frame(substitute_frame[1], frame[1], Chroma_Width, Chroma_Height,     parity, field_mode);    Copy_Frame(substitute_frame[2], frame[2], Chroma_Width, Chroma_Height,    parity, field_mode);#ifdef VERBOSE  if(Verbose_Flag > NO_LAYER)    printf("substituted %s %d\n",      (field_mode ? (parity?"bottom field":"bottom field"):"frame"), framenum);#endif}static int Read_Components(filename, frame, framenum) char *filename;unsigned char *frame[3];int framenum;{  int err = 0;  char outname[FILENAME_LENGTH];  char name[FILENAME_LENGTH];  sprintf(outname,filename,framenum);  sprintf(name,"%s.Y",outname);  err += Read_Component(name, frame[0], Coded_Picture_Width,     Coded_Picture_Height);  sprintf(name,"%s.U",outname);  err += Read_Component(name, frame[1], Chroma_Width, Chroma_Height);  sprintf(name,"%s.V",outname);  err += Read_Component(name, frame[2], Chroma_Width, Chroma_Height);  return(err);}static int Read_Component(Filename, Frame, Width, Height)char *Filename;unsigned char *Frame;int Width;int Height;{  int Size;  int Bytes_Read;  int Infile;  Size = Width*Height;#ifdef DEBUG  printf("SUBS: reading %s\n", filename);#endif  if(!(Infile=open(Filename,O_RDONLY|O_BINARY))<0)  {    printf("ERROR: unable to open reference filename (%s)\n", Filename);	return(-1);  }  Bytes_Read = read(Infile, Frame, Size);    if(Bytes_Read!=Size)  {    printf("was able to read only %d bytes of %d of file %s\n",      Bytes_Read, Size, Filename);  }   close(Infile);   return(0);}/* optimization: do not open the big file each time. Open once at start   of decoder, and close at the very last frame *//* Note: "big" files were used in E-mail exchanges almost exclusively by the    MPEG Committee's syntax validation and conformance ad-hoc groups from    the year 1993 until 1995 */static int Extract_Components(filename, frame, framenum) char *filename;unsigned char *frame[3];int framenum;{/*  int err = 0; */  FILE *fd;  int line;  int size, offset;  if (!(fd = fopen(filename,"rb")))  {    sprintf(Error_Text,"Couldn't open %s\n",filename);    return(-1);  }  /* compute size of each frame (in bytes) */  size = (Coded_Picture_Width*Coded_Picture_Height);  if(chroma_format==CHROMA444)    size = (size * 3);  else if(chroma_format==CHROMA422)    size = (size * 2);  else if(chroma_format==CHROMA420)    size = ((size*3)>>1);  else    printf("ERROR: chroma_format (%d) not recognized\n", chroma_format);  /* compute distance into "big" file */  offset = size*framenum;#ifdef DEBUG  printf("EXTRACTING: frame(%d) offset(%d), size (%d) from %s\n",     framenum, offset, size, filename);#endif  /* seek to location in big file where desired frame begins */  /* note: this offset cannot exceed a few billion bytes due to the */  /*       obvious limitations of 32-bit integers */  fseek(fd, offset, 0);  /* Y  */  for (line=0; line<Coded_Picture_Height; line++)  {    fread(frame[0]+(line*Coded_Picture_Width),1,Coded_Picture_Width,fd);  }  /* Cb */  for (line=0; line<Chroma_Height; line++)  {    fread(frame[1]+(line*Chroma_Width),1,Chroma_Width,fd);  }  /* Cr */  for (line=0; line<Chroma_Height; line++)  {    fread(frame[2]+(line*Chroma_Width),1,Chroma_Width,fd);  }  fclose(fd);  return(0);}static void Copy_Frame(src, dst, width, height, parity, field_mode)unsigned char *src;unsigned char *dst;int width;int height;int parity;        /* field parity (top or bottom) to overwrite */int field_mode;    /* 0 = frame, 1 = field                      */{  int row, col;  int s, d;  int incr;  s = d = 0;#ifdef DEBUG  printf("COPYING (w=%d, h=%d, parity=%d, field_mode=%d)\n",    width,height,parity,field_mode);#endif /* DEBUG */  if(field_mode)  {    incr = 2;    if(parity==0)      s += width;  }  else  {    incr = 1;  }  for(row=0; row<height; row+=incr)   {    for(col=0; col<width; col++)    {      dst[d+col] = src[s+col];    }        d += (width*incr);    s += (width*incr);  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91丨porny丨首页| 精品亚洲国内自在自线福利| 色吊一区二区三区| 亚洲同性同志一二三专区| 91麻豆国产福利在线观看| 亚洲综合一区二区三区| 欧美精品一级二级三级| 石原莉奈在线亚洲三区| 精品国产区一区| 国产成人亚洲综合a∨婷婷图片| 国产精品青草久久| 日本乱码高清不卡字幕| 天涯成人国产亚洲精品一区av| 日韩午夜在线影院| 国产99久久久精品| 一区二区三区欧美在线观看| 在线成人免费视频| 国产精品一区二区在线播放| 亚洲人午夜精品天堂一二香蕉| 欧美日韩在线三区| 国产在线精品一区二区三区不卡| 天天综合网天天综合色| 国产精品自拍av| 亚洲欧美成人一区二区三区| 91精品国产91久久久久久一区二区| 国产麻豆午夜三级精品| 亚洲免费观看高清完整版在线观看熊| 欧美日韩国产美女| 国产精品资源网| 亚洲一区在线观看免费| 欧美成人精品二区三区99精品| 成人黄色国产精品网站大全在线免费观看| 亚洲综合在线第一页| 久久综合狠狠综合久久综合88| 99久久精品国产毛片| 免费在线视频一区| 国产精品欧美久久久久无广告| 欧美日韩综合在线免费观看| 国产乱码一区二区三区| 亚洲激情第一区| 欧美精品一区二区三区蜜臀 | 日韩电影免费在线看| 久久九九久久九九| 精品视频一区三区九区| 国产丶欧美丶日本不卡视频| 亚洲国产成人精品视频| 国产日韩在线不卡| 欧美美女一区二区三区| 国产99久久久久久免费看农村| 午夜久久久影院| 国产精品女上位| 欧美成人一区二区三区片免费| 色婷婷国产精品| 国产酒店精品激情| 日韩精品一二三四| 亚洲色图丝袜美腿| 国产午夜精品一区二区三区嫩草 | 亚洲欧美在线高清| 日韩欧美视频在线| 欧美在线免费视屏| 粉嫩av一区二区三区| 免费观看在线综合| 一区二区三区在线看| 欧美激情一二三区| 日韩美女一区二区三区四区| 欧美性xxxxxxxx| 成人手机在线视频| 国产在线不卡视频| 首页亚洲欧美制服丝腿| 一区二区三区在线不卡| 国产欧美一区二区三区在线老狼| 日韩一级黄色大片| 在线亚洲欧美专区二区| 国产乱子伦视频一区二区三区 | 韩国精品主播一区二区在线观看 | 国产高清在线精品| 日本系列欧美系列| 亚洲一区二三区| 国产精品不卡在线观看| 国产亚洲一区二区在线观看| 欧美一区二区久久| 欧美日韩成人综合天天影院 | 欧美高清在线一区| 日韩欧美在线影院| 精品视频一区二区不卡| 色综合天天综合| 99这里都是精品| 成人中文字幕合集| 国产成人精品亚洲日本在线桃色 | 精品久久久久久久久久久久久久久久久| 欧美性色欧美a在线播放| 色综合中文字幕| aaa欧美大片| eeuss鲁片一区二区三区在线观看| 国产高清久久久| 国产美女精品一区二区三区| 精品写真视频在线观看| 麻豆久久久久久| 久久精品久久精品| 久久成人18免费观看| 麻豆成人久久精品二区三区小说| 日本强好片久久久久久aaa| 视频精品一区二区| 秋霞国产午夜精品免费视频| 日韩黄色片在线观看| 亚洲成人777| 亚洲大型综合色站| 亚洲地区一二三色| 日韩黄色免费网站| 久久激情综合网| 伦理电影国产精品| 久久99久久久久久久久久久| 极品少妇xxxx精品少妇| 毛片不卡一区二区| 国产乱人伦偷精品视频不卡| 国产精品一区免费视频| 波多野结衣精品在线| 91伊人久久大香线蕉| 在线观看一区不卡| 欧美日韩不卡一区二区| 欧美一区二区二区| 精品乱码亚洲一区二区不卡| 久久久久久久久久久久久久久99 | 久久久久亚洲蜜桃| 国产视频一区在线播放| 国产精品乱人伦| 亚洲欧美区自拍先锋| 亚洲影视在线播放| 成人在线综合网| 成人福利在线看| 91视频观看视频| 欧美日韩精品一区二区三区| 欧美一区午夜精品| 久久婷婷国产综合国色天香| 国产精品日韩精品欧美在线| 亚洲精品视频在线| 日韩国产欧美三级| 激情五月婷婷综合网| 成人av在线一区二区三区| 在线中文字幕一区二区| 91精品国产综合久久久久久漫画 | 欧美一区二区二区| 久久久精品国产免费观看同学| 国产精品福利在线播放| 亚洲一卡二卡三卡四卡无卡久久| 日韩高清不卡一区二区| 国产福利一区二区三区视频| 91视视频在线直接观看在线看网页在线看| 一本色道久久综合亚洲aⅴ蜜桃 | 亚洲欧美韩国综合色| 午夜精品久久久久久久久| 久久精品国产网站| 成人黄色小视频| 欧美日韩国产电影| 亚洲精品在线观| 亚洲免费伊人电影| 日本伊人精品一区二区三区观看方式| 国产成人精品影视| 在线观看av一区| 精品久久久久99| 最好看的中文字幕久久| 日韩电影在线免费| 成人美女视频在线看| 欧美三级韩国三级日本一级| 久久人人97超碰com| 亚洲综合视频在线| 国产精品综合在线视频| 色狠狠av一区二区三区| 日韩欧美国产高清| 中文字幕中文字幕一区二区| 青青草97国产精品免费观看无弹窗版| 国产麻豆视频一区| 欧美日韩精品一区二区天天拍小说| 国产色一区二区| 爽好多水快深点欧美视频| 成人福利视频网站| 欧美一级日韩不卡播放免费| 亚洲天堂成人在线观看| 久久 天天综合| 欧美性色欧美a在线播放| 日本一区二区三区在线不卡 | 韩国在线一区二区| 色婷婷久久一区二区三区麻豆| 日韩欧美久久久| 一级日本不卡的影视| 国产mv日韩mv欧美| 欧美一区二区三区在线看| 亚洲日本一区二区三区| 国产又黄又大久久| 欧美日韩成人高清| 亚洲视频每日更新| 国产精品中文字幕日韩精品 | 亚洲国产精品成人综合| 日韩精品福利网| 91久久精品一区二区二区| 亚洲影视在线播放| 精品在线视频一区| 欧美人伦禁忌dvd放荡欲情| 亚洲色图色小说| 国产 日韩 欧美大片|