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

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

?? getpic.c

?? mpeg2解壓縮從C語言源碼 沒有注釋
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* getpic.c, picture decoding                                               *//* 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 "config.h"#include "global.h"/* private prototypes*/static void picture_data _ANSI_ARGS_((int framenum));static void macroblock_modes _ANSI_ARGS_((int *pmacroblock_type, int *pstwtype,  int *pstwclass, int *pmotion_type, int *pmotion_vector_count, int *pmv_format, int *pdmv,  int *pmvscale, int *pdct_type));static void Clear_Block _ANSI_ARGS_((int comp));static void Sum_Block _ANSI_ARGS_((int comp));static void Saturate _ANSI_ARGS_((short *bp));static void Add_Block _ANSI_ARGS_((int comp, int bx, int by,  int dct_type, int addflag));static void Update_Picture_Buffers _ANSI_ARGS_((void));static void frame_reorder _ANSI_ARGS_((int bitstream_framenum,   int sequence_framenum));static void Decode_SNR_Macroblock _ANSI_ARGS_((int *SNRMBA, int *SNRMBAinc,   int MBA, int MBAmax, int *dct_type));static void motion_compensation _ANSI_ARGS_((int MBA, int macroblock_type,  int motion_type, int PMV[2][2][2], int motion_vertical_field_select[2][2],  int dmvector[2], int stwtype, int dct_type));static void skipped_macroblock _ANSI_ARGS_((int dc_dct_pred[3],   int PMV[2][2][2], int *motion_type, int motion_vertical_field_select[2][2],  int *stwtype, int *macroblock_type));static int slice _ANSI_ARGS_((int framenum, int MBAmax));static int start_of_slice _ANSI_ARGS_ ((int MBAmax, int *MBA,  int *MBAinc, int dc_dct_pred[3], int PMV[2][2][2]));static int decode_macroblock _ANSI_ARGS_((int *macroblock_type,   int *stwtype, int *stwclass, int *motion_type, int *dct_type,  int PMV[2][2][2], int dc_dct_pred[3],   int motion_vertical_field_select[2][2], int dmvector[2]));/* decode one frame or field picture */void Decode_Picture(bitstream_framenum, sequence_framenum)int bitstream_framenum, sequence_framenum;{  if (picture_structure==FRAME_PICTURE && Second_Field)  {    /* recover from illegal number of field pictures */    printf("odd number of field pictures\n");    Second_Field = 0;  }  /* IMPLEMENTATION: update picture buffer pointers */  Update_Picture_Buffers();#ifdef VERIFY   Check_Headers(bitstream_framenum, sequence_framenum);#endif /* VERIFY */  /* ISO/IEC 13818-4 section 2.4.5.4 "frame buffer intercept method" */  /* (section number based on November 1995 (Dallas) draft of the       conformance document) */  if(Ersatz_Flag)    Substitute_Frame_Buffer(bitstream_framenum, sequence_framenum);  /* form spatial scalable picture */   /* form spatial scalable picture */  /* ISO/IEC 13818-2 section 7.7: Spatial scalability */  if (base.pict_scal && !Second_Field)   {    Spatial_Prediction();  }  /* decode picture data ISO/IEC 13818-2 section 6.2.3.7 */  picture_data(bitstream_framenum);  /* write or display current or previously decoded reference frame */  /* ISO/IEC 13818-2 section 6.1.1.11: Frame reordering */  frame_reorder(bitstream_framenum, sequence_framenum);  if (picture_structure!=FRAME_PICTURE)    Second_Field = !Second_Field;}/* decode all macroblocks of the current picture *//* stages described in ISO/IEC 13818-2 section 7 */static void picture_data(framenum)int framenum;{  int MBAmax;  int ret;  /* number of macroblocks per picture */  MBAmax = mb_width*mb_height;  if (picture_structure!=FRAME_PICTURE)    MBAmax>>=1; /* field picture has half as mnay macroblocks as frame */  for(;;)  {    if((ret=slice(framenum, MBAmax))<0)      return;  }}/* decode all macroblocks of the current picture *//* ISO/IEC 13818-2 section 6.3.16 */static int slice(framenum, MBAmax)int framenum, MBAmax;{  int MBA;   int MBAinc, macroblock_type, motion_type, dct_type;  int dc_dct_pred[3];  int PMV[2][2][2], motion_vertical_field_select[2][2];  int dmvector[2];  int stwtype, stwclass;  int SNRMBA, SNRMBAinc;  int ret;  MBA = 0; /* macroblock address */  MBAinc = 0;  if((ret=start_of_slice(MBAmax, &MBA, &MBAinc, dc_dct_pred, PMV))!=1)    return(ret);  if (Two_Streams && enhan.scalable_mode==SC_SNR)  {    SNRMBA=0;    SNRMBAinc=0;  }  Fault_Flag=0;  for (;;)  {    /* this is how we properly exit out of picture */    if (MBA>=MBAmax)      return(-1); /* all macroblocks decoded */#ifdef TRACE    if (Trace_Flag)      printf("frame %d, MB %d\n",framenum,MBA);#endif /* TRACE */#ifdef DISPLAY    if (!progressive_frame && picture_structure==FRAME_PICTURE       && MBA==(MBAmax>>1) && framenum!=0 && Output_Type==T_X11        && !Display_Progressive_Flag)    {      Display_Second_Field();    }#endif    ld = &base;    if (MBAinc==0)    {      if (base.scalable_mode==SC_DP && base.priority_breakpoint==1)          ld = &enhan;      if (!Show_Bits(23) || Fault_Flag) /* next_start_code or fault */      {resync: /* if Fault_Flag: resynchronize to next next_start_code */        Fault_Flag = 0;        return(0);     /* trigger: go to next slice */      }      else /* neither next_start_code nor Fault_Flag */      {        if (base.scalable_mode==SC_DP && base.priority_breakpoint==1)          ld = &enhan;        /* decode macroblock address increment */        MBAinc = Get_macroblock_address_increment();        if (Fault_Flag) goto resync;      }    }    if (MBA>=MBAmax)    {      /* MBAinc points beyond picture dimensions */      if (!Quiet_Flag)        printf("Too many macroblocks in picture\n");      return(-1);    }    if (MBAinc==1) /* not skipped */    {      ret = decode_macroblock(&macroblock_type, &stwtype, &stwclass,              &motion_type, &dct_type, PMV, dc_dct_pred,               motion_vertical_field_select, dmvector);      if(ret==-1)        return(-1);         if(ret==0)        goto resync;    }    else /* MBAinc!=1: skipped macroblock */    {            /* ISO/IEC 13818-2 section 7.6.6 */      skipped_macroblock(dc_dct_pred, PMV, &motion_type,         motion_vertical_field_select, &stwtype, &macroblock_type);    }    /* SCALABILITY: SNR */    /* ISO/IEC 13818-2 section 7.8 */    /* NOTE: we currently ignore faults encountered in this routine */    if (Two_Streams && enhan.scalable_mode==SC_SNR)      Decode_SNR_Macroblock(&SNRMBA, &SNRMBAinc, MBA, MBAmax, &dct_type);    /* ISO/IEC 13818-2 section 7.6 */    motion_compensation(MBA, macroblock_type, motion_type, PMV,       motion_vertical_field_select, dmvector, stwtype, dct_type);    /* advance to next macroblock */    MBA++;    MBAinc--;     /* SCALABILITY: SNR */    if (Two_Streams && enhan.scalable_mode==SC_SNR)    {      SNRMBA++;      SNRMBAinc--;    }    if (MBA>=MBAmax)      return(-1); /* all macroblocks decoded */  }} /* ISO/IEC 13818-2 section 6.3.17.1: Macroblock modes */static void macroblock_modes(pmacroblock_type,pstwtype,pstwclass,  pmotion_type,pmotion_vector_count,pmv_format,pdmv,pmvscale,pdct_type)  int *pmacroblock_type, *pstwtype, *pstwclass;  int *pmotion_type, *pmotion_vector_count, *pmv_format, *pdmv, *pmvscale;  int *pdct_type;{  int macroblock_type;  int stwtype, stwcode, stwclass;  int motion_type = 0;  int motion_vector_count, mv_format, dmv, mvscale;  int dct_type;  static unsigned char stwc_table[3][4]    = { {6,3,7,4}, {2,1,5,4}, {2,5,7,4} };  static unsigned char stwclass_table[9]    = {0, 1, 2, 1, 1, 2, 3, 3, 4};  /* get macroblock_type */  macroblock_type = Get_macroblock_type();  if (Fault_Flag) return;  /* get spatial_temporal_weight_code */  if (macroblock_type & MB_WEIGHT)  {    if (spatial_temporal_weight_code_table_index==0)      stwtype = 4;    else    {      stwcode = Get_Bits(2);#ifdef TRACE      if (Trace_Flag)      {        printf("spatial_temporal_weight_code (");        Print_Bits(stwcode,2,2);        printf("): %d\n",stwcode);      }#endif /* TRACE */      stwtype = stwc_table[spatial_temporal_weight_code_table_index-1][stwcode];    }  }  else    stwtype = (macroblock_type & MB_CLASS4) ? 8 : 0;  /* SCALABILITY: derive spatial_temporal_weight_class (Table 7-18) */  stwclass = stwclass_table[stwtype];  /* get frame/field motion type */  if (macroblock_type & (MACROBLOCK_MOTION_FORWARD|MACROBLOCK_MOTION_BACKWARD))  {    if (picture_structure==FRAME_PICTURE) /* frame_motion_type */    {      motion_type = frame_pred_frame_dct ? MC_FRAME : Get_Bits(2);#ifdef TRACE      if (!frame_pred_frame_dct && Trace_Flag)      {        printf("frame_motion_type (");        Print_Bits(motion_type,2,2);        printf("): %s\n",motion_type==MC_FIELD?"Field":                         motion_type==MC_FRAME?"Frame":                         motion_type==MC_DMV?"Dual_Prime":"Invalid");      }#endif /* TRACE */    }    else /* field_motion_type */    {      motion_type = Get_Bits(2);#ifdef TRACE      if (Trace_Flag)      {        printf("field_motion_type (");        Print_Bits(motion_type,2,2);        printf("): %s\n",motion_type==MC_FIELD?"Field":                         motion_type==MC_16X8?"16x8 MC":                         motion_type==MC_DMV?"Dual_Prime":"Invalid");      }#endif /* TRACE */    }  }  else if ((macroblock_type & MACROBLOCK_INTRA) && concealment_motion_vectors)  {    /* concealment motion vectors */    motion_type = (picture_structure==FRAME_PICTURE) ? MC_FRAME : MC_FIELD;  }#if 0  else  {    printf("maroblock_modes(): unknown macroblock type\n");    motion_type = -1;  }#endif  /* derive motion_vector_count, mv_format and dmv, (table 6-17, 6-18) */  if (picture_structure==FRAME_PICTURE)  {    motion_vector_count = (motion_type==MC_FIELD && stwclass<2) ? 2 : 1;    mv_format = (motion_type==MC_FRAME) ? MV_FRAME : MV_FIELD;  }  else  {    motion_vector_count = (motion_type==MC_16X8) ? 2 : 1;    mv_format = MV_FIELD;  }  dmv = (motion_type==MC_DMV); /* dual prime */  /* field mv predictions in frame pictures have to be scaled   * ISO/IEC 13818-2 section 7.6.3.1 Decoding the motion vectors   * IMPLEMENTATION: mvscale is derived for later use in motion_vectors()   * it displaces the stage:   *   *    if((mv_format=="field")&&(t==1)&&(picture_structure=="Frame picture"))   *      prediction = PMV[r][s][t] DIV 2;   */  mvscale = ((mv_format==MV_FIELD) && (picture_structure==FRAME_PICTURE));  /* get dct_type (frame DCT / field DCT) */  dct_type = (picture_structure==FRAME_PICTURE)             && (!frame_pred_frame_dct)             && (macroblock_type & (MACROBLOCK_PATTERN|MACROBLOCK_INTRA))             ? Get_Bits(1)             : 0;#ifdef TRACE  if (Trace_Flag  && (picture_structure==FRAME_PICTURE)             && (!frame_pred_frame_dct)             && (macroblock_type & (MACROBLOCK_PATTERN|MACROBLOCK_INTRA)))    printf("dct_type (%d): %s\n",dct_type,dct_type?"Field":"Frame");#endif /* TRACE */  /* return values */  *pmacroblock_type = macroblock_type;  *pstwtype = stwtype;  *pstwclass = stwclass;  *pmotion_type = motion_type;  *pmotion_vector_count = motion_vector_count;  *pmv_format = mv_format;  *pdmv = dmv;  *pmvscale = mvscale;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产污污免费网站入口 | 欧美精选午夜久久久乱码6080| 欧美亚洲一区三区| 91麻豆精品国产自产在线 | 不卡的av在线播放| 精品理论电影在线| 五月天亚洲婷婷| 色一区在线观看| 国产精品久久久久久亚洲伦| 美女高潮久久久| 欧美日韩国产系列| 亚洲精品高清在线| 波多野结衣在线一区| 2021国产精品久久精品| 日韩成人一区二区三区在线观看| 99热精品一区二区| 国产农村妇女毛片精品久久麻豆 | 久久国产人妖系列| 欧美日韩精品一区二区三区四区| 亚洲精品视频免费看| aaa欧美色吧激情视频| 欧美激情自拍偷拍| 国产成人在线视频免费播放| 久久久午夜电影| 狠狠色丁香久久婷婷综| 日韩一区二区三区三四区视频在线观看 | 国产日韩在线不卡| 国产激情视频一区二区在线观看 | 亚洲视频电影在线| av毛片久久久久**hd| 亚洲欧美一区二区在线观看| 99精品视频在线播放观看| 国产精品久久久久永久免费观看 | 免费成人在线视频观看| 日韩亚洲欧美成人一区| 麻豆精品一区二区av白丝在线| 91精品国产综合久久精品图片| 日日嗨av一区二区三区四区| 制服丝袜亚洲播放| 国内久久婷婷综合| 中文字幕第一页久久| 99久久综合99久久综合网站| 亚洲欧美视频在线观看视频| 欧美怡红院视频| 免费观看成人鲁鲁鲁鲁鲁视频| 欧美xxxxxxxx| 国产成人av电影在线播放| 国产精品不卡在线| 欧美在线观看一二区| 日韩av电影一区| 久久久精品影视| 91碰在线视频| 免费在线观看成人| 国产欧美综合在线观看第十页| 99国产精品国产精品毛片| 亚洲色图在线视频| 91精品国产入口| 国产99精品国产| 亚洲一区二区三区四区五区中文 | 在线观看91av| 国产精品1区二区.| 亚洲综合精品自拍| 久久影音资源网| 日本精品视频一区二区三区| 日韩福利电影在线| 中文字幕一区日韩精品欧美| 欧美日韩小视频| 懂色av一区二区三区免费看| 性久久久久久久| 欧美国产97人人爽人人喊| 欧美久久久久久久久| 国产jizzjizz一区二区| 午夜精品免费在线| 中文字幕av资源一区| 91精品国产乱码久久蜜臀| jiyouzz国产精品久久| 免费在线看成人av| 亚洲精品欧美二区三区中文字幕| 欧美电影免费提供在线观看| 在线视频一区二区三| 国产精品夜夜爽| 日韩国产在线观看| 亚洲免费av在线| 国产精品久久久久久福利一牛影视| 欧美精选一区二区| 色久综合一二码| 国产成人高清在线| 黄色资源网久久资源365| 亚洲永久免费av| 中文字幕在线不卡| 国产亚洲va综合人人澡精品 | 成人欧美一区二区三区白人| 精品国产伦一区二区三区观看方式| 日本韩国精品一区二区在线观看| 国产又粗又猛又爽又黄91精品| 日韩**一区毛片| 亚洲一区二区成人在线观看| 亚洲免费资源在线播放| 国产精品久久久爽爽爽麻豆色哟哟 | 中文字幕一区免费在线观看 | 午夜天堂影视香蕉久久| 国产精品国产三级国产aⅴ入口| 久久综合色一综合色88| 欧美一级日韩一级| 欧美日韩国产bt| 欧美日韩国产一区| 在线观看欧美日本| 欧美综合视频在线观看| 91视频在线看| 色综合久久久久久久久| 色哟哟一区二区在线观看| 色素色在线综合| 色婷婷激情久久| 欧美日韩中字一区| 717成人午夜免费福利电影| 欧美日韩在线播放三区四区| 欧美色男人天堂| 在线播放视频一区| 欧美videofree性高清杂交| 日韩三级视频在线观看| 欧美精品一区二区三区高清aⅴ| 精品国产91亚洲一区二区三区婷婷| 欧美mv和日韩mv的网站| 久久午夜羞羞影院免费观看| 欧美激情一区二区三区蜜桃视频| 久久精品在这里| 中文字幕亚洲综合久久菠萝蜜| 亚洲视频一区二区在线观看| 一区二区三区精品| 午夜精品一区二区三区免费视频| 蜜桃传媒麻豆第一区在线观看| 久久精品国产一区二区三区免费看| 免费高清视频精品| 国产69精品久久久久777| 91免费看`日韩一区二区| 欧美专区亚洲专区| 日韩精品中午字幕| 综合色中文字幕| 视频一区二区三区中文字幕| 国产精品影音先锋| 91色婷婷久久久久合中文| 欧美福利一区二区| 国产日韩在线不卡| 亚洲一区二三区| 国产一区在线看| 欧美性猛交xxxxxxxx| 精品日韩一区二区三区免费视频| 国产欧美日韩久久| 亚洲成av人片一区二区三区| 国产一区二区日韩精品| 91亚洲精华国产精华精华液| 欧美精品三级日韩久久| 国产欧美日韩综合精品一区二区| 一区二区高清在线| 国产精一区二区三区| 91成人免费电影| 久久久午夜电影| 亚洲成a人v欧美综合天堂| 粉嫩蜜臀av国产精品网站| 欧美日韩成人在线一区| 国产精品美女久久久久aⅴ| 青青草一区二区三区| 色综合久久久久久久久| 26uuu亚洲综合色欧美| 亚洲综合视频网| 成人午夜视频福利| 精品国产污污免费网站入口 | 亚洲一二三四久久| 成人精品视频一区| 精品免费视频一区二区| 香蕉久久一区二区不卡无毒影院 | 日韩视频中午一区| 亚洲天堂精品在线观看| 国产剧情在线观看一区二区| 337p亚洲精品色噜噜| 亚洲一区二区视频在线| 91在线视频免费91| 国产精品日韩成人| 国产高清在线精品| 精品国精品国产| 免费亚洲电影在线| 精品污污网站免费看| 亚洲色图视频免费播放| 成人免费观看视频| 久久精品亚洲精品国产欧美| 久久成人麻豆午夜电影| 3d成人h动漫网站入口| 亚洲va欧美va天堂v国产综合| 色偷偷一区二区三区| 17c精品麻豆一区二区免费| 国产激情精品久久久第一区二区 | 久久中文娱乐网| 国产中文字幕精品| 精品动漫一区二区三区在线观看| 麻豆91精品91久久久的内涵| 欧美电影一区二区| 久久综合综合久久综合| 精品日韩一区二区三区免费视频| 日韩不卡手机在线v区| 日韩精品一区二区三区老鸭窝|