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

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

?? mpeg2dec.c

?? mpeg2解壓縮從C語言源碼 沒有注釋
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* mpeg2dec.c, main(), initialization, option processing                    *//* 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 <ctype.h>#include <fcntl.h>#define GLOBAL#include "config.h"#include "global.h"/* private prototypes */static int  video_sequence _ANSI_ARGS_((int *framenum));static int Decode_Bitstream _ANSI_ARGS_((void));static int  Headers _ANSI_ARGS_((void));static void Initialize_Sequence _ANSI_ARGS_((void));static void Initialize_Decoder _ANSI_ARGS_((void));static void Deinitialize_Sequence _ANSI_ARGS_((void));static void Process_Options _ANSI_ARGS_((int argc, char *argv[]));#if OLDstatic int  Get_Val _ANSI_ARGS_((char *argv[]));#endif/* #define DEBUG */static void Clear_Options();#ifdef DEBUGstatic void Print_Options();#endifint main(argc,argv)int argc;char *argv[];{  int ret, code;  Clear_Options();  /* decode command line arguments */  Process_Options(argc,argv);#ifdef DEBUG  Print_Options();#endif  ld = &base; /* select base layer context */  /* open MPEG base layer bitstream file(s) */  /* NOTE: this is either a base layer stream or a spatial enhancement stream */  if ((base.Infile=open(Main_Bitstream_Filename,O_RDONLY|O_BINARY))<0)  {    fprintf(stderr,"Base layer input file %s not found\n", Main_Bitstream_Filename);    exit(1);  }  if(base.Infile != 0)  {    Initialize_Buffer();       if(Show_Bits(8)==0x47)    {      sprintf(Error_Text,"Decoder currently does not parse transport streams\n");      Error(Error_Text);    }    next_start_code();    code = Show_Bits(32);    switch(code)    {    case SEQUENCE_HEADER_CODE:      break;    case PACK_START_CODE:      System_Stream_Flag = 1;    case VIDEO_ELEMENTARY_STREAM:      System_Stream_Flag = 1;      break;    default:      sprintf(Error_Text,"Unable to recognize stream type\n");      Error(Error_Text);      break;    }    lseek(base.Infile, 0l, 0);    Initialize_Buffer();   }  if(base.Infile!=0)  {    lseek(base.Infile, 0l, 0);  }  Initialize_Buffer();   if(Two_Streams)  {    ld = &enhan; /* select enhancement layer context */    if ((enhan.Infile = open(Enhancement_Layer_Bitstream_Filename,O_RDONLY|O_BINARY))<0)    {      sprintf(Error_Text,"enhancment layer bitstream file %s not found\n",        Enhancement_Layer_Bitstream_Filename);      Error(Error_Text);    }    Initialize_Buffer();    ld = &base;  }  Initialize_Decoder();  ret = Decode_Bitstream();  close(base.Infile);  if (Two_Streams)    close(enhan.Infile);  return 0;}/* IMPLEMENTAION specific rouintes */static void Initialize_Decoder(){  int i;  /* Clip table */  if (!(Clip=(unsigned char *)malloc(1024)))    Error("Clip[] malloc failed\n");  Clip += 384;  for (i=-384; i<640; i++)    Clip[i] = (i<0) ? 0 : ((i>255) ? 255 : i);  /* IDCT */  if (Reference_IDCT_Flag)    Initialize_Reference_IDCT();  else    Initialize_Fast_IDCT();}/* mostly IMPLEMENTAION specific rouintes */static void Initialize_Sequence(){  int cc, size;  static int Table_6_20[3] = {6,8,12};  /* check scalability mode of enhancement layer */  if (Two_Streams && (enhan.scalable_mode!=SC_SNR) && (base.scalable_mode!=SC_DP))    Error("unsupported scalability mode\n");  /* force MPEG-1 parameters for proper decoder behavior */  /* see ISO/IEC 13818-2 section D.9.14 */  if (!base.MPEG2_Flag)  {    progressive_sequence = 1;    progressive_frame = 1;    picture_structure = FRAME_PICTURE;    frame_pred_frame_dct = 1;    chroma_format = CHROMA420;    matrix_coefficients = 5;  }  /* round to nearest multiple of coded macroblocks */  /* ISO/IEC 13818-2 section 6.3.3 sequence_header() */  mb_width = (horizontal_size+15)/16;  mb_height = (base.MPEG2_Flag && !progressive_sequence) ? 2*((vertical_size+31)/32)                                        : (vertical_size+15)/16;  Coded_Picture_Width = 16*mb_width;  Coded_Picture_Height = 16*mb_height;  /* ISO/IEC 13818-2 sections 6.1.1.8, 6.1.1.9, and 6.1.1.10 */  Chroma_Width = (chroma_format==CHROMA444) ? Coded_Picture_Width                                           : Coded_Picture_Width>>1;  Chroma_Height = (chroma_format!=CHROMA420) ? Coded_Picture_Height                                            : Coded_Picture_Height>>1;    /* derived based on Table 6-20 in ISO/IEC 13818-2 section 6.3.17 */  block_count = Table_6_20[chroma_format-1];  for (cc=0; cc<3; cc++)  {    if (cc==0)      size = Coded_Picture_Width*Coded_Picture_Height;    else      size = Chroma_Width*Chroma_Height;    if (!(backward_reference_frame[cc] = (unsigned char *)malloc(size)))      Error("backward_reference_frame[] malloc failed\n");    if (!(forward_reference_frame[cc] = (unsigned char *)malloc(size)))      Error("forward_reference_frame[] malloc failed\n");    if (!(auxframe[cc] = (unsigned char *)malloc(size)))      Error("auxframe[] malloc failed\n");    if(Ersatz_Flag)      if (!(substitute_frame[cc] = (unsigned char *)malloc(size)))        Error("substitute_frame[] malloc failed\n");    if (base.scalable_mode==SC_SPAT)    {      /* this assumes lower layer is 4:2:0 */      if (!(llframe0[cc] = (unsigned char *)malloc((lower_layer_prediction_horizontal_size*lower_layer_prediction_vertical_size)/(cc?4:1))))        Error("llframe0 malloc failed\n");      if (!(llframe1[cc] = (unsigned char *)malloc((lower_layer_prediction_horizontal_size*lower_layer_prediction_vertical_size)/(cc?4:1))))        Error("llframe1 malloc failed\n");    }  }  /* SCALABILITY: Spatial */  if (base.scalable_mode==SC_SPAT)  {    if (!(lltmp = (short *)malloc(lower_layer_prediction_horizontal_size*((lower_layer_prediction_vertical_size*vertical_subsampling_factor_n)/vertical_subsampling_factor_m)*sizeof(short))))      Error("lltmp malloc failed\n");  }#ifdef DISPLAY  if (Output_Type==T_X11)  {    Initialize_Display_Process("");    Initialize_Dither_Matrix();  }#endif /* DISPLAY */}void Error(text)char *text;{  fprintf(stderr,text);  exit(1);}/* Trace_Flag output */void Print_Bits(code,bits,len)int code,bits,len;{  int i;  for (i=0; i<len; i++)    printf("%d",(code>>(bits-1-i))&1);}/* option processing */static void Process_Options(argc,argv)int argc;                  /* argument count  */char *argv[];              /* argument vector */{  int i, LastArg, NextArg;  /* at least one argument should be present */  if (argc<2)  {    printf("\n%s, %s\n",Version,Author);    printf("Usage:  mpeg2decode {options}\n\Options: -b  file  main bitstream (base or spatial enhancement layer)\n\         -cn file  conformance report (n: level)\n\         -e  file  enhancement layer bitstream (SNR or Data Partitioning)\n\         -f        store/display interlaced video in frame format\n\         -g        concatenated file format for substitution method (-x)\n\         -in file  information & statistics report  (n: level)\n\         -l  file  file name pattern for lower layer sequence\n\                   (for spatial scalability)\n\         -on file  output format (0:YUV 1:SIF 2:TGA 3:PPM 4:X11 5:X11HiQ)\n\         -q        disable warnings to stderr\n\         -r        use double precision reference IDCT\n\         -t        enable low level tracing to stdout\n\         -u  file  print user_data to stdio or file\n\         -vn       verbose output (n: level)\n\         -x  file  filename pattern of picture substitution sequence\n\n\File patterns:  for sequential filenames, \"printf\" style, e.g. rec%%d\n\                 or rec%%d%%c for fieldwise storage\n\Levels:        0:none 1:sequence 2:picture 3:slice 4:macroblock 5:block\n\n\Example:       mpeg2decode -b bitstream.mpg -f -r -o0 rec%%d\n\         \n");    exit(0);  }  Output_Type = -1;  i = 1;  /* command-line options are proceeded by '-' */  while(i < argc)  {    /* check if this is the last argument */    LastArg = ((argc-i)==1);    /* parse ahead to see if another flag immediately follows current       argument (this is used to tell if a filename is missing) */    if(!LastArg)      NextArg = (argv[i+1][0]=='-');    else      NextArg = 0;    /* second character, [1], after '-' is the switch */    if(argv[i][0]=='-')    {      switch(toupper(argv[i][1]))      {        /* third character. [2], is the value */      case 'B':        Main_Bitstream_Flag = 1;        if(NextArg || LastArg)        {          printf("ERROR: -b must be followed the main bitstream filename\n");	}        else          Main_Bitstream_Filename = argv[++i];         break;      case 'C':#ifdef VERIFY        Verify_Flag = atoi(&argv[i][2]);         if((Verify_Flag < NO_LAYER) || (Verify_Flag > ALL_LAYERS))        {          printf("ERROR: -c level (%d) out of range [%d,%d]\n",            Verify_Flag, NO_LAYER, ALL_LAYERS);          exit(ERROR);        }#else  /* VERIFY */        printf("This program not compiled for Verify_Flag option\n");#endif /* VERIFY */        break;      case 'E':        Two_Streams = 1; /* either Data Partitioning (DP) or SNR Scalability enhancment */	                           if(NextArg || LastArg)        {          printf("ERROR: -e must be followed by filename\n");          exit(ERROR);        }        else          Enhancement_Layer_Bitstream_Filename = argv[++i];         break;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人一级黄色片| 成人午夜免费视频| 亚洲精品成人天堂一二三| 国产日韩精品一区二区浪潮av| 91精品国产一区二区三区蜜臀| 欧美色精品在线视频| 欧美日韩免费电影| 欧美美女喷水视频| 8x福利精品第一导航| 欧美日韩亚洲综合| 欧美一区二区视频在线观看2020| 欧美妇女性影城| 欧美白人最猛性xxxxx69交| 日韩欧美国产综合一区 | 国产精品一区二区三区四区| 久久99热这里只有精品| 国产精品一区三区| 99久久伊人久久99| 欧美伊人久久大香线蕉综合69 | 性感美女久久精品| 日韩国产欧美一区二区三区| 麻豆精品在线视频| 国产麻豆视频一区二区| 99re热这里只有精品免费视频| 欧洲国内综合视频| 精品国产一区二区三区av性色| 久久久久高清精品| 一区二区三区久久| 经典三级视频一区| 91日韩一区二区三区| 制服丝袜激情欧洲亚洲| 欧美国产禁国产网站cc| 亚洲图片自拍偷拍| 国产精品亚洲视频| 欧美日韩中文另类| 久久精品日产第一区二区三区高清版| 国产精品不卡在线观看| 午夜精品爽啪视频| 国产69精品久久久久毛片| 欧美性一二三区| 精品国产乱码久久久久久浪潮| 亚洲色图第一区| 国产福利一区二区三区在线视频| 成人污视频在线观看| 91精品国产91久久久久久一区二区 | 久久免费视频色| 亚洲影视资源网| 成人听书哪个软件好| 日韩一区二区在线免费观看| 国产精品不卡在线观看| 另类综合日韩欧美亚洲| 欧美视频一区二| 中文字幕一区二区三区在线不卡| 蜜桃视频一区二区三区在线观看| 一本久道久久综合中文字幕 | 成人国产电影网| 日韩一区二区三区精品视频| 亚洲男人电影天堂| 懂色一区二区三区免费观看| 日韩精品中文字幕一区| 午夜影院在线观看欧美| 色综合天天综合给合国产| 国产视频一区二区在线观看| 久久成人18免费观看| 欧美日韩1区2区| 亚洲国产乱码最新视频| 色就色 综合激情| 亚洲天堂av老司机| 97久久久精品综合88久久| 欧美国产精品久久| 国产1区2区3区精品美女| 久久综合久久综合久久综合| 美女在线一区二区| 欧美成人r级一区二区三区| 日韩黄色在线观看| 在线不卡一区二区| 亚洲成a人片综合在线| 在线观看三级视频欧美| 一区二区三区自拍| 欧美在线free| 亚洲电影中文字幕在线观看| 欧美日韩国产小视频| 午夜视频在线观看一区二区| 欧美日韩亚洲丝袜制服| 日韩国产欧美一区二区三区| 91精品啪在线观看国产60岁| 日韩高清不卡一区| 精品久久人人做人人爰| 国产一区二区伦理片| 欧美韩国日本不卡| 97精品国产露脸对白| 亚洲精品成人在线| 777午夜精品视频在线播放| 日本成人在线不卡视频| 精品国产免费人成电影在线观看四季| 久久99国产精品免费网站| 久久久久99精品一区| 成人动漫在线一区| 亚洲一区二区三区四区五区中文| 欧美剧情电影在线观看完整版免费励志电影| 一区二区欧美在线观看| 欧美二区乱c少妇| 国产一区二区三区av电影| 国产精品美女久久久久久久久久久 | 中文字幕一区二区三区不卡| 色成年激情久久综合| 日韩电影网1区2区| 日本一区二区三区久久久久久久久不 | 精品国产一区二区在线观看| 国产成人av电影在线播放| 亚洲欧美激情插| 欧美一区二区视频在线观看2020 | 91精品国产综合久久久久久| 国产综合成人久久大片91| 中文字幕一区二区三| 欧美疯狂性受xxxxx喷水图片| 国产成人小视频| 亚洲国产色一区| 国产嫩草影院久久久久| 欧美日韩视频一区二区| 成人少妇影院yyyy| 琪琪一区二区三区| 亚洲一区在线观看免费| 国产偷国产偷亚洲高清人白洁| 日本道免费精品一区二区三区| 轻轻草成人在线| 亚洲精品中文字幕在线观看| 精品国产百合女同互慰| 精品污污网站免费看| 99久久99久久久精品齐齐| 美女一区二区久久| 亚洲不卡av一区二区三区| 国产精品美女久久久久久| 欧美xxxx老人做受| 欧美另类z0zxhd电影| 在线一区二区三区四区五区| 国产91丝袜在线播放九色| 久久精品国产久精国产| 日韩精品一二三| 亚洲777理论| 亚洲乱码国产乱码精品精98午夜 | 日韩午夜在线观看| 欧美三级视频在线观看| av在线播放不卡| 成人精品gif动图一区| 国产一区视频网站| 久久99久久久久| 久久福利视频一区二区| 男女男精品网站| 热久久久久久久| 免费在线成人网| 久久精品国产99| 精品一区二区三区免费观看| 色综合色综合色综合色综合色综合| 久久精品免费观看| 九色综合国产一区二区三区| 蜜桃av一区二区| 久久国产精品一区二区| 国产一区二区三区| 国产成人午夜视频| 成人成人成人在线视频| av综合在线播放| 日本福利一区二区| 91精品欧美久久久久久动漫 | 中文字幕欧美日韩一区| 国产欧美精品国产国产专区| 亚洲国产精品高清| 中文字幕一区二区视频| 伊人夜夜躁av伊人久久| 五月天亚洲精品| 麻豆国产精品一区二区三区 | 中文字幕一区二区三区乱码在线| 综合激情成人伊人| 亚洲va欧美va国产va天堂影院| 天天综合色天天综合色h| 麻豆成人av在线| 东方aⅴ免费观看久久av| 91美女蜜桃在线| 这里只有精品免费| 国产日韩精品一区二区三区 | 日韩高清一区二区| 精品一二三四在线| 99久久国产综合精品女不卡| 欧美日韩一区国产| 1区2区3区国产精品| 午夜精品福利一区二区蜜股av| 久久国产麻豆精品| 91蝌蚪国产九色| 欧美成人女星排名| 一区在线播放视频| 麻豆久久久久久| 色综合久久久网| 26uuu另类欧美| 亚洲一区二区视频| 国产91精品久久久久久久网曝门| 欧美人牲a欧美精品| 中文字幕+乱码+中文字幕一区| 亚洲成人动漫在线观看| 国产**成人网毛片九色| 91精品免费观看|