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

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

?? predict.c

?? mpeg2編解標準源
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* predict.c, motion compensated prediction                                 *//* 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 predict_mb _ANSI_ARGS_((  unsigned char *oldref[], unsigned char *newref[], unsigned char *cur[],  int lx, int bx, int by, int pict_type, int pict_struct, int mb_type,  int motion_type, int secondfield,  int PMV[2][2][2], int mv_field_sel[2][2], int dmvector[2]));static void pred _ANSI_ARGS_((unsigned char *src[], int sfield,  unsigned char *dst[], int dfield,  int lx, int w, int h, int x, int y, int dx, int dy, int addflag));static void pred_comp _ANSI_ARGS_((unsigned char *src, unsigned char *dst,  int lx, int w, int h, int x, int y, int dx, int dy, int addflag));static void calc_DMV _ANSI_ARGS_((int DMV[][2], int *dmvector, int mvx,  int mvy));static void clearblock _ANSI_ARGS_((unsigned char *cur[], int i0, int j0));/* form prediction for a complete picture (frontend for predict_mb) * * reff: reference frame for forward prediction * refb: reference frame for backward prediction * cur:  destination (current) frame * secondfield: predict second field of a frame * mbi:  macroblock info * * Notes: * - cf. predict_mb */void predict(reff,refb,cur,secondfield,mbi)unsigned char *reff[],*refb[],*cur[3];int secondfield;struct mbinfo *mbi;{  int i, j, k;  k = 0;  /* loop through all macroblocks of the picture */  for (j=0; j<height2; j+=16)    for (i=0; i<width; i+=16)    {      predict_mb(reff,refb,cur,width,i,j,pict_type,pict_struct,                 mbi[k].mb_type,mbi[k].motion_type,secondfield,                 mbi[k].MV,mbi[k].mv_field_sel,mbi[k].dmvector);      k++;    }}/* form prediction for one macroblock * * oldref: reference frame for forward prediction * newref: reference frame for backward prediction * cur:    destination (current) frame * lx:     frame width (identical to global var `width') * bx,by:  picture (field or frame) coordinates of macroblock to be predicted * pict_type: I, P or B * pict_struct: FRAME_PICTURE, TOP_FIELD, BOTTOM_FIELD * mb_type:     MB_FORWARD, MB_BACKWARD, MB_INTRA * motion_type: MC_FRAME, MC_FIELD, MC_16X8, MC_DMV * secondfield: predict second field of a frame * PMV[2][2][2]: motion vectors (in half pel picture coordinates) * mv_field_sel[2][2]: motion vertical field selects (for field predictions) * dmvector: differential motion vectors (for dual prime) * * Notes: * - when predicting a P type picture which is the second field of *   a frame, the same parity reference field is in oldref, while the *   opposite parity reference field is assumed to be in newref! * - intra macroblocks are modelled to have a constant prediction of 128 *   for all pels; this results in a DC DCT coefficient symmetric to 0 * - vectors for field prediction in frame pictures are in half pel frame *   coordinates (vertical component is twice the field value and always *   even) * * already covers dual prime (not yet used) */static void predict_mb(oldref,newref,cur,lx,bx,by,pict_type,pict_struct,  mb_type,motion_type,secondfield,PMV,mv_field_sel,dmvector)unsigned char *oldref[],*newref[],*cur[];int lx;int bx,by;int pict_type;int pict_struct;int mb_type;int motion_type;int secondfield;int PMV[2][2][2], mv_field_sel[2][2], dmvector[2];{  int addflag, currentfield;  unsigned char **predframe;  int DMV[2][2];  if (mb_type&MB_INTRA)  {    clearblock(cur,bx,by);    return;  }  addflag = 0; /* first prediction is stored, second is added and averaged */  if ((mb_type & MB_FORWARD) || (pict_type==P_TYPE))  {    /* forward prediction, including zero MV in P pictures */    if (pict_struct==FRAME_PICTURE)    {      /* frame picture */      if ((motion_type==MC_FRAME) || !(mb_type & MB_FORWARD))      {        /* frame-based prediction in frame picture */        pred(oldref,0,cur,0,          lx,16,16,bx,by,PMV[0][0][0],PMV[0][0][1],0);      }      else if (motion_type==MC_FIELD)      {        /* field-based prediction in frame picture         *         * note scaling of the vertical coordinates (by, PMV[][0][1])         * from frame to field!         */        /* top field prediction */        pred(oldref,mv_field_sel[0][0],cur,0,          lx<<1,16,8,bx,by>>1,PMV[0][0][0],PMV[0][0][1]>>1,0);        /* bottom field prediction */        pred(oldref,mv_field_sel[1][0],cur,1,          lx<<1,16,8,bx,by>>1,PMV[1][0][0],PMV[1][0][1]>>1,0);      }      else if (motion_type==MC_DMV)      {        /* dual prime prediction */        /* calculate derived motion vectors */        calc_DMV(DMV,dmvector,PMV[0][0][0],PMV[0][0][1]>>1);        /* predict top field from top field */        pred(oldref,0,cur,0,          lx<<1,16,8,bx,by>>1,PMV[0][0][0],PMV[0][0][1]>>1,0);        /* predict bottom field from bottom field */        pred(oldref,1,cur,1,          lx<<1,16,8,bx,by>>1,PMV[0][0][0],PMV[0][0][1]>>1,0);        /* predict and add to top field from bottom field */        pred(oldref,1,cur,0,          lx<<1,16,8,bx,by>>1,DMV[0][0],DMV[0][1],1);        /* predict and add to bottom field from top field */        pred(oldref,0,cur,1,          lx<<1,16,8,bx,by>>1,DMV[1][0],DMV[1][1],1);      }      else      {        /* invalid motion_type in frame picture */        if (!quiet)          fprintf(stderr,"invalid motion_type\n");      }    }    else /* TOP_FIELD or BOTTOM_FIELD */    {      /* field picture */      currentfield = (pict_struct==BOTTOM_FIELD);      /* determine which frame to use for prediction */      if ((pict_type==P_TYPE) && secondfield          && (currentfield!=mv_field_sel[0][0]))        predframe = newref; /* same frame */      else        predframe = oldref; /* previous frame */      if ((motion_type==MC_FIELD) || !(mb_type & MB_FORWARD))      {        /* field-based prediction in field picture */        pred(predframe,mv_field_sel[0][0],cur,currentfield,          lx<<1,16,16,bx,by,PMV[0][0][0],PMV[0][0][1],0);      }      else if (motion_type==MC_16X8)      {        /* 16 x 8 motion compensation in field picture */        /* upper half */        pred(predframe,mv_field_sel[0][0],cur,currentfield,          lx<<1,16,8,bx,by,PMV[0][0][0],PMV[0][0][1],0);        /* determine which frame to use for lower half prediction */        if ((pict_type==P_TYPE) && secondfield            && (currentfield!=mv_field_sel[1][0]))          predframe = newref; /* same frame */        else          predframe = oldref; /* previous frame */        /* lower half */        pred(predframe,mv_field_sel[1][0],cur,currentfield,          lx<<1,16,8,bx,by+8,PMV[1][0][0],PMV[1][0][1],0);      }      else if (motion_type==MC_DMV)      {        /* dual prime prediction */        /* determine which frame to use for prediction */        if (secondfield)          predframe = newref; /* same frame */        else          predframe = oldref; /* previous frame */        /* calculate derived motion vectors */        calc_DMV(DMV,dmvector,PMV[0][0][0],PMV[0][0][1]);        /* predict from field of same parity */        pred(oldref,currentfield,cur,currentfield,          lx<<1,16,16,bx,by,PMV[0][0][0],PMV[0][0][1],0);        /* predict from field of opposite parity */        pred(predframe,!currentfield,cur,currentfield,          lx<<1,16,16,bx,by,DMV[0][0],DMV[0][1],1);      }      else      {        /* invalid motion_type in field picture */        if (!quiet)          fprintf(stderr,"invalid motion_type\n");      }    }    addflag = 1; /* next prediction (if any) will be averaged with this one */  }  if (mb_type & MB_BACKWARD)  {    /* backward prediction */    if (pict_struct==FRAME_PICTURE)    {      /* frame picture */      if (motion_type==MC_FRAME)      {        /* frame-based prediction in frame picture */        pred(newref,0,cur,0,          lx,16,16,bx,by,PMV[0][1][0],PMV[0][1][1],addflag);      }      else      {        /* field-based prediction in frame picture         *         * note scaling of the vertical coordinates (by, PMV[][1][1])         * from frame to field!         */        /* top field prediction */        pred(newref,mv_field_sel[0][1],cur,0,          lx<<1,16,8,bx,by>>1,PMV[0][1][0],PMV[0][1][1]>>1,addflag);        /* bottom field prediction */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
石原莉奈在线亚洲二区| 成人国产精品免费观看视频| 国产老妇另类xxxxx| 99久久99久久精品免费观看| 欧美一区二区大片| 樱桃视频在线观看一区| 国产精品99久久久| 欧美一二三区精品| 亚洲va欧美va人人爽| 99久久久久久| 久久精品人人做人人爽97| 天涯成人国产亚洲精品一区av| 成人免费视频国产在线观看| 精品久久国产97色综合| 日日摸夜夜添夜夜添精品视频| 一本大道久久a久久精二百| 久久九九99视频| 精品一区二区三区视频在线观看| 欧美少妇bbb| 亚洲码国产岛国毛片在线| 不卡欧美aaaaa| 亚洲国产精品成人久久综合一区| 精品一区二区影视| 精品日韩一区二区| 激情欧美一区二区三区在线观看| 91精品国产高清一区二区三区| 亚洲www啪成人一区二区麻豆| 色激情天天射综合网| 中文字幕综合网| 精品一区二区三区在线播放视频| 欧美影院一区二区| 亚洲成人综合在线| 欧美精品免费视频| 日韩电影在线观看网站| 在线播放国产精品二区一二区四区| 一区二区三区在线观看视频| 欧美亚洲精品一区| 亚洲高清视频中文字幕| 91精品黄色片免费大全| 免费视频一区二区| 久久久久久久免费视频了| 国产高清视频一区| 国产精品久久久久天堂| 色女孩综合影院| 五月婷婷综合网| 精品奇米国产一区二区三区| 国产精品中文字幕一区二区三区| 欧美国产乱子伦 | 日韩一区中文字幕| 色婷婷久久久久swag精品| 亚洲一区二区四区蜜桃| 欧美日韩国产成人在线免费| 美女视频一区在线观看| 国产欧美一区二区三区鸳鸯浴| 99久久国产综合色|国产精品| 亚洲成人久久影院| 久久久久久**毛片大全| 91视频在线看| 免费在线观看日韩欧美| 国产欧美精品一区| 欧美日韩一区视频| 国产美女在线精品| 亚洲乱码精品一二三四区日韩在线| 欧美日韩国产天堂| 成人激情综合网站| 日韩av高清在线观看| 国产欧美日韩三区| 欧美日本免费一区二区三区| 久久精品av麻豆的观看方式| 亚洲欧洲一区二区三区| 欧美刺激午夜性久久久久久久| 波多野结衣中文一区| 麻豆精品久久久| 亚洲色图欧洲色图| 精品国产在天天线2019| 一本大道久久a久久综合婷婷| 免费在线观看一区| 亚洲一区在线看| 中文字幕 久热精品 视频在线 | 久久久777精品电影网影网| 色婷婷国产精品综合在线观看| 蜜臀av性久久久久蜜臀aⅴ流畅| 亚洲色图一区二区三区| 国产亚洲美州欧州综合国| 欧美一区二区女人| 91精品福利视频| 成人国产精品免费网站| 国产乱淫av一区二区三区| 午夜精品一区二区三区电影天堂| 国产欧美日韩精品一区| 精品国产乱码久久久久久浪潮| 欧美视频一区二区三区| 波多野结衣在线aⅴ中文字幕不卡| 人禽交欧美网站| 亚洲国产美女搞黄色| 亚洲欧美经典视频| 欧美经典一区二区三区| 26uuu精品一区二区在线观看| 欧美日韩国产经典色站一区二区三区| 99久久婷婷国产| 成人动漫在线一区| 国产剧情在线观看一区二区| 另类中文字幕网| 欧美aaa在线| 日韩电影在线观看电影| 亚洲国产精品久久久久婷婷884| 国产精品久久久久久久久免费樱桃 | 亚洲视频 欧洲视频| 国产精品无码永久免费888| 久久蜜臀精品av| 久久噜噜亚洲综合| 久久蜜桃av一区精品变态类天堂| 欧美电影免费观看高清完整版在线观看 | 精品国产91亚洲一区二区三区婷婷| 欧美亚洲禁片免费| 欧美日韩电影一区| 欧美美女激情18p| 欧美一区国产二区| 在线不卡a资源高清| 欧美一区二区播放| 久久男人中文字幕资源站| 久久久久国产精品免费免费搜索| 久久亚洲影视婷婷| 中文字幕二三区不卡| 1024成人网| 亚洲国产成人精品视频| 免费精品99久久国产综合精品| 美国一区二区三区在线播放| 国产一区美女在线| www.日韩精品| 欧美在线free| 日韩一级完整毛片| 国产亚洲欧美激情| 亚洲一区自拍偷拍| 六月丁香综合在线视频| 国产精华液一区二区三区| 93久久精品日日躁夜夜躁欧美| 欧美影院一区二区| 欧美v国产在线一区二区三区| 国产日本一区二区| 一区二区三区中文字幕精品精品 | 亚洲国产精品嫩草影院| 日韩高清在线电影| 国产一区在线不卡| 91黄视频在线| 日韩欧美精品在线| 国产精品久久久久影院| 亚洲h精品动漫在线观看| 国产伦精品一区二区三区视频青涩 | 亚洲欧洲一区二区在线播放| 亚洲激情综合网| 久久国产精品99久久久久久老狼| 国产露脸91国语对白| 精品视频123区在线观看| 精品国产第一区二区三区观看体验 | 亚洲自拍偷拍av| 久久精品国产99| 欧美在线三级电影| 久久理论电影网| 日韩国产精品久久久| aaa亚洲精品| 精品国产一区二区三区忘忧草| 亚洲色图都市小说| 激情综合网天天干| 欧美日本高清视频在线观看| 中文字幕一区二区在线观看| 毛片av一区二区三区| 在线精品国精品国产尤物884a| 久久亚洲春色中文字幕久久久| 亚洲国产一二三| 波多野结衣精品在线| 精品少妇一区二区三区日产乱码| 日韩毛片视频在线看| 国产东北露脸精品视频| 欧美一区二区三区思思人| 亚洲免费在线电影| 成人综合在线视频| 337p日本欧洲亚洲大胆色噜噜| 偷拍与自拍一区| 色哟哟亚洲精品| 中文字幕一区三区| 夫妻av一区二区| 久久久99精品免费观看| 久久99久久久久| 欧美一区在线视频| 丝袜美腿亚洲综合| 在线日韩av片| 综合亚洲深深色噜噜狠狠网站| 国产成人综合网| 久久久青草青青国产亚洲免观| 日本美女一区二区三区视频| 欧美日韩国产综合一区二区三区| 怡红院av一区二区三区| 91视频你懂的| 亚洲图片欧美激情| 色欲综合视频天天天| 亚洲欧美日韩电影| 欧洲av在线精品| 天天av天天翘天天综合网| 欧美电影影音先锋|