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

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

?? getpic.c

?? MPEG2編解碼的源代碼.zip
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
/* 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;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩在线一区二区三区| 午夜国产精品影院在线观看| 91行情网站电视在线观看高清版| 青青草视频一区| 国产精品三级视频| 欧美一区二区在线看| 大胆亚洲人体视频| 青青草精品视频| 一区二区三区四区五区视频在线观看| 精品91自产拍在线观看一区| 一本色道a无线码一区v| 狠狠色丁香久久婷婷综合_中 | 97se亚洲国产综合自在线观| 喷水一区二区三区| 亚洲午夜影视影院在线观看| 欧美极品aⅴ影院| 日韩一级视频免费观看在线| 色婷婷精品久久二区二区蜜臂av| 国产成人福利片| 免费日韩伦理电影| 午夜欧美电影在线观看| 亚洲欧美视频在线观看视频| 国产日韩精品一区二区三区| 日韩欧美国产1| 欧美日韩亚洲高清一区二区| 91麻豆国产福利在线观看| 国产福利精品导航| 国产一区在线精品| 久久精品国产成人一区二区三区| 亚洲一本大道在线| 亚洲综合色区另类av| 中文字幕一区二区三区乱码在线 | 久久久久国产精品麻豆| 日韩欧美国产一区在线观看| 91精品国产综合久久久蜜臀图片| 欧美亚洲高清一区二区三区不卡| 色综合久久88色综合天天 | 日韩欧美激情在线| 日韩欧美国产综合| 欧美va亚洲va| 久久中文字幕电影| 久久精品亚洲精品国产欧美| 久久久亚洲综合| 337p日本欧洲亚洲大胆精品| 欧美videos大乳护士334| 亚洲精品一区二区三区在线观看| 精品少妇一区二区三区视频免付费| 91精品国产91热久久久做人人 | 91丝袜高跟美女视频| 91影视在线播放| 色婷婷久久综合| 欧洲国内综合视频| 欧美久久久久久蜜桃| 欧美精选午夜久久久乱码6080| 欧美喷潮久久久xxxxx| 91精品国产综合久久香蕉的特点| 欧美成人性战久久| 国产亚洲精久久久久久| 国产日韩欧美精品在线| 国产精品久久久久久久久动漫 | 99re66热这里只有精品3直播| 99久久久免费精品国产一区二区| 一本久道中文字幕精品亚洲嫩| 欧美综合久久久| 欧美一区二区二区| www久久久久| 亚洲天堂av一区| 亚洲成av人片一区二区| 美国毛片一区二区三区| 国产黄色成人av| 色婷婷精品久久二区二区蜜臂av| 欧美日韩国产另类一区| 精品播放一区二区| 亚洲色图欧洲色图婷婷| 日韩国产成人精品| 国产成人一级电影| 欧美性视频一区二区三区| 欧美酷刑日本凌虐凌虐| 国产视频一区二区在线观看| 亚洲男人的天堂网| 老司机免费视频一区二区三区| 成人免费视频国产在线观看| 91国偷自产一区二区三区观看| 欧美大胆人体bbbb| 亚洲色图制服丝袜| 美国十次综合导航| 91热门视频在线观看| 日韩三级视频在线看| 国产精品福利在线播放| 免费在线观看一区二区三区| 丰满少妇在线播放bd日韩电影| 欧美性欧美巨大黑白大战| 久久久噜噜噜久久中文字幕色伊伊| 亚洲精品免费在线| 国产精一品亚洲二区在线视频| 日本韩国欧美国产| 国产亚洲精品7777| 日本女人一区二区三区| 97精品久久久午夜一区二区三区| 日韩欧美国产高清| 一区二区三区 在线观看视频| 国产在线精品视频| 欧美一级一级性生活免费录像| 中文字幕中文字幕一区二区| 久久精品久久精品| 欧美日韩大陆在线| 亚洲天堂中文字幕| 成人精品鲁一区一区二区| 欧美日韩的一区二区| 亚洲品质自拍视频| 高清在线成人网| 日韩精品中文字幕一区| 亚洲第一在线综合网站| 91丨国产丨九色丨pron| 久久久精品蜜桃| 久久99久久精品| 欧美精品久久99久久在免费线| 国产精品久久久久久久久晋中 | 国产精品91一区二区| 91精品午夜视频| 一区二区三区蜜桃| 91色乱码一区二区三区| 国产精品另类一区| 国产寡妇亲子伦一区二区| 日韩欧美国产综合| 天天操天天干天天综合网| 在线观看亚洲精品| 一区二区三区高清| 在线观看欧美黄色| 亚洲男人都懂的| 欧美性猛交xxxx乱大交退制版| 亚洲天堂精品在线观看| 99久久99久久久精品齐齐| 国产精品网站一区| av资源站一区| 日本一区二区动态图| 国产精品羞羞答答xxdd| 久久久99精品免费观看不卡| 精品无人区卡一卡二卡三乱码免费卡| 欧美一二三四在线| 美国十次综合导航| 精品国产伦一区二区三区免费 | 成人免费在线播放视频| 成人午夜激情片| 国产精品久久久久久久久久久免费看 | 在线电影欧美成精品| 香蕉成人伊视频在线观看| 欧美视频你懂的| 日日骚欧美日韩| 欧美一区二区三区不卡| 毛片不卡一区二区| 久久综合五月天婷婷伊人| 国产91色综合久久免费分享| 国产精品国产三级国产有无不卡| 99久久免费精品| 亚洲一本大道在线| 91精品国产综合久久久久久久久久| 麻豆91免费观看| 久久久精品免费免费| 99久久久精品| 五月综合激情网| 2017欧美狠狠色| 91亚洲精品久久久蜜桃网站 | 欧美高清一级片在线观看| 91免费视频大全| 午夜av电影一区| 久久久久久久一区| 日本久久一区二区| 麻豆国产精品官网| 国产精品超碰97尤物18| 欧美久久久久免费| 国产精品888| 亚洲一区二区在线观看视频| 欧美高清一级片在线| 国产一区二区三区高清播放| 一区二区视频在线看| 日韩欧美国产一二三区| av男人天堂一区| 青娱乐精品在线视频| 中文字幕在线观看一区| 欧美久久免费观看| 成人丝袜18视频在线观看| 午夜天堂影视香蕉久久| 国产日韩欧美综合在线| 欧美日韩中文一区| 国产成人精品aa毛片| 日韩av中文在线观看| 国产精品看片你懂得| 日韩美女视频一区二区在线观看| www.欧美亚洲| 日韩av在线播放中文字幕| 国产精品久久久久久久久免费相片| 欧美一区二区在线看| 91在线云播放| 精品一区二区三区香蕉蜜桃| 樱花草国产18久久久久| 久久久精品日韩欧美| 欧美精品高清视频| 一本色道久久综合亚洲91 | 韩国午夜理伦三级不卡影院|