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

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

?? mot_est.c

?? H.263標準的c語言實現
?? C
?? 第 1 頁 / 共 3 頁
字號:
/************************************************************************ * *  mot_est.c, part of tmn (TMN encoder) * *  Copyright (C) 1997  University of BC, Canada * *  Contacts:  *  Michael Gallant                   <mikeg@ee.ubc.ca> *  Guy Cote                          <guyc@ee.ubc.ca> *  Berna Erol                        <bernae@ee.ubc.ca> * *  UBC Image Processing Laboratory   http://www.ee.ubc.ca/image *  2356 Main Mall                    tel.: +1 604 822 4051 *  Vancouver BC Canada V6T1Z4        fax.: +1 604 822 5949 * *  Copyright (C) 1995, 1996  Telenor R&D, Norway * *  Contacts: *  Robert Danielsen                  <Robert.Danielsen@nta.no> * *  Telenor Research and Development  http://www.nta.no/brukere/DVC/ *  P.O.Box 83                        tel.:   +47 63 84 84 00 *  N-2007 Kjeller, Norway            fax.:   +47 63 81 00 76 * ************************************************************************//* Disclaimer of Warranty *  * These software programs are available to the user without any license fee * or royalty on an "as is" basis. The University of British Columbia * 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 University of British Columbia does not represent or warrant that the * programs furnished hereunder are free of infringement of any * third-party patents. *  * Commercial implementations of H.263, 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 "sim.h"/********************************************************************** * *	Name:          MotionEstimatePicture *	Description:   Finds integer and half pel motion estimation *                     and chooses 8x8 or 16x16  *	 *	Input:	       current image, previous image, interpolated *                     reconstructed previous image, seek_dist, *                     motion vector array *	Returns:        *	Side effects:  Allocates memory for MV structure * *	Date: 950209   Author: Karl.Lillevold@nta.no * ***********************************************************************/void MotionEstimatePicture( unsigned char *curr, unsigned char *prev,                            unsigned char *next, unsigned char *prev_ipol,                             unsigned char *next_ipol, int seek_dist,                             MotionVector *MV[7][MBR+1][MBC+2],                             int gobsync, int estimation_type)                      {  int i,j,k;  int pmv0,pmv0b,pmv1,pmv1b,xoff,yoff, xoffb, yoffb;  int curr_mb[16][16];  int sad8 = INT_MAX, sad16, sad16b, sad0, sad0b;  int newgob;  MotionVector *f0,*f1,*f2,*f3,*f4,*fBack;  /* Do motion estimation and store result in array */  for ( j = 0; j < lines/MB_SIZE; j++)   {    newgob = 0;    if (gobsync && j%gobsync == 0)     {      newgob = 1;    }    for ( i = 0; i < pels/MB_SIZE; i++)     {      /* Integer pel search */      f0 = MV[0][j+1][i+1];      f1 = MV[1][j+1][i+1];      f2 = MV[2][j+1][i+1];      f3 = MV[3][j+1][i+1];      f4 = MV[4][j+1][i+1];      fBack = MV[5][j+1][i+1];      /* P-picture or PB-picture prediction. */      if (B_PICTURE_ESTIMATION != estimation_type)      {        /* Here the PMV's are found using integer motion vectors for         * the forward prediction only. */        FindPMV(MV,i+1,j+1,&pmv0,&pmv1,0,newgob,0);        if (long_vectors && (estimation_type != PB_PICTURE_ESTIMATION) )        {          /* Always divisable by two. */          xoff = pmv0/2;          yoff = pmv1/2;        }        else         {          xoff = yoff = 0;        }              MotionEstimation( curr, prev, i*MB_SIZE, j*MB_SIZE,                           xoff, yoff, seek_dist, MV,                          &sad0,estimation_type, 0,pmv0,pmv1);        sad16 = f0->min_error;        if (use_4mv)        {          sad8 = f1->min_error + f2->min_error + f3->min_error + f4->min_error;        }        f0->Mode = ChooseMode(curr,i*MB_SIZE,j*MB_SIZE, mmin(sad8,sad16));        if(intra_mb_refresh && intra_refresh[j+1][i+1]>=intra_mb_refresh)        {          f0->Mode = MODE_INTRA;        }        /* Half pel search. Forward */        if (f0->Mode != MODE_INTRA)         {          FindMB(i*MB_SIZE,j*MB_SIZE ,curr, curr_mb);          FindHalfPel(i*MB_SIZE,j*MB_SIZE,f0, prev_ipol, &curr_mb[0][0],16,0);          sad16 = f0->min_error;          if (use_4mv)           {            FindHalfPel(i*MB_SIZE,j*MB_SIZE,f1, prev_ipol, &curr_mb[0][0],8,0);            FindHalfPel(i*MB_SIZE,j*MB_SIZE,f2, prev_ipol, &curr_mb[0][8],8,1);            FindHalfPel(i*MB_SIZE,j*MB_SIZE,f3, prev_ipol, &curr_mb[8][0],8,2);            FindHalfPel(i*MB_SIZE,j*MB_SIZE,f4, prev_ipol, &curr_mb[8][8],8,3);            sad8 = f1->min_error +f2->min_error +f3->min_error +f4->min_error;            sad8 += PREF_16_VEC;                      /* Choose Zero Vector, 8x8 or 16x16 vectors */            if (sad0 < sad8 && sad0 < sad16)             {              f0->x = f0->y = 0;              f0->x_half = f0->y_half = 0;            }            else             {              if (sad8 < sad16)                  f0->Mode = MODE_INTER4V;            }          }          else           {            /* Choose Zero Vector or 16x16 vectors */            if (sad0 < sad16)             {              f0->x = f0->y = 0;              f0->x_half = f0->y_half = 0;            }          }        }        else        {           for (k = 0; k < 5; k++)          {            ZeroVec(MV[k][j+1][i+1]);          }        }      }      /* B-Picture. */      else      {        /* Here the PMV's are found using integer motion vectors          * for both backward and forward prediction. */        FindPMV(MV,i+1,j+1,&pmv0,&pmv1,0,newgob,0);        FindPMV(MV,i+1,j+1,&pmv0b,&pmv1b,5,newgob,0);              if (long_vectors && (estimation_type != PB_PICTURE_ESTIMATION) )        {          /* Always divisable by two. */          xoff = pmv0/2;          yoff = pmv1/2;          xoffb = pmv0b/2;          yoffb = pmv1b/2;        }        else         {          xoff = yoff = xoffb = yoffb = 0;        }        /* Forward prediction. */        MotionEstimation( curr, prev, i*MB_SIZE, j*MB_SIZE,                           xoff, yoff, seek_dist, MV,                          &sad0, estimation_type, 0, pmv0, pmv1);        sad16 = f0->min_error;        /* Backward prediction. */        MotionEstimation( curr, next, i*MB_SIZE, j*MB_SIZE,                           xoffb, yoffb, seek_dist, MV,                          &sad0b, estimation_type, 1, pmv0b, pmv1b);        sad16b = fBack->min_error;        FindMB(i*MB_SIZE, j*MB_SIZE, curr, curr_mb);        FindHalfPel(i*MB_SIZE,j*MB_SIZE, f0, prev_ipol, &curr_mb[0][0],16,0);        sad16 = f0->min_error;        /* Choose Zero Vector or 16x16 vectors */        if (sad0 < sad16)         {          f0->x = f0->y = 0;          f0->x_half = f0->y_half = 0;        }               FindHalfPel(i*MB_SIZE,j*MB_SIZE, fBack, next_ipol, &curr_mb[0][0],16,0);        sad16b = fBack->min_error;        /* Choose Zero Vector or 16x16 vectors */        if (sad0b < sad16b)         {          fBack->x = fBack->y = 0;          fBack->x_half = fBack->y_half = 0;        }      }    }  }#ifdef PRINTMV  fprintf(stdout,"Motion estimation\n");  fprintf(stdout,"16x16 vectors:\n");  for ( j = 0; j < lines/MB_SIZE; j++)   {    for ( i = 0; i < pels/MB_SIZE; i++)     {      /* B picture. */      if (B_PICTURE_ESTIMATION == estimation_type)      {        /* Forward MV. */        fprintf(stdout," forward (B): %3d%3d",        2*MV[0][j+1][i+1]->x + MV[0][j+1][i+1]->x_half,        2*MV[0][j+1][i+1]->y + MV[0][j+1][i+1]->y_half);        fprintf(stdout," backward (B): %3d%3d",        2*MV[5][j+1][i+1]->x + MV[5][j+1][i+1]->x_half,        2*MV[5][j+1][i+1]->y + MV[5][j+1][i+1]->y_half);      }      /* P picture. */      else if (MV[0][j+1][i+1]->Mode != MODE_INTRA)       {        fprintf(stdout," %3d%3d",        2*MV[0][j+1][i+1]->x + MV[0][j+1][i+1]->x_half,        2*MV[0][j+1][i+1]->y + MV[0][j+1][i+1]->y_half);      }      else      {        fprintf(stdout,"  .  . ");      }    }    fprintf(stdout,"\n");  }  if (use_4mv)   {    fprintf(stdout,"8x8 vectors:\n");    for (k = 1; k < 5; k++)     {      fprintf(stdout,"Block: %d\n", k-1);      for ( j = 0; j < lines/MB_SIZE; j++)       {        for ( i = 0; i < pels/MB_SIZE; i++) 	      {          if (MV[0][j+1][i+1]->Mode != MODE_INTRA)            fprintf(stdout," %3d%3d",            2*MV[k][j+1][i+1]->x + MV[k][j+1][i+1]->x_half,            2*MV[k][j+1][i+1]->y + MV[k][j+1][i+1]->y_half);          else            fprintf(stdout,"  .  . ");        }        fprintf(stdout,"\n");      }    }  }#endif  return;}/********************************************************************** * *	Name:        MotionEstimation *	Description:	Estimate all motion vectors for one MB * *	Input:        pointers to current and reference (previous) *                    image, pointers to current slice and *                    current MB *	Returns: *	Side effects:	motion vector information in MB changed * *	Date: 930118	Author: Karl.Lillevold@nta.no *            940203    Mod. to use PGB's faster search *            941208    Mod to use spiral search from mpeg2encode *            951001    Mod for extended motion vector range *            970526	  Fast motion estimation by mikeg@ee.ubc.ca *            971119    Added new motion vector range for RVLC *                      modified by guyc@ee.ubc.ca. *            980701    Fixed bugs with various MV extrapolation ranges *                      and incorporated forward and backward ME into *                      same routine by mikeg@ee.ubc.ca * ***********************************************************************/void MotionEstimation (unsigned char *curr, unsigned char *reference, int x_curr,                        int y_curr, int xoff, int yoff, int seek_dist,                        MotionVector * MV[7][MBR + 1][MBC + 2], int                       *SAD_0, int estimation_type, int backward_pred,                       int pmv0, int pmv1){  int Min_FRAME[7];  MotionVector MV_FRAME[7];  unsigned char *act_block, *aa, *ii;  unsigned char *search_area, *adv_search_area = NULL, *zero_area = NULL;  int sxy, i, k, j, l;  int xlim, ylim;  int ihigh, ilow, jhigh, jlow, h_length, v_length;  int adv_ihigh, adv_ilow, adv_jhigh, adv_jlow, adv_h_length, adv_v_length;  int xmax, ymax, block, sad, lx;  int adv_x_curr, adv_y_curr, xvec, yvec;  int yoff_new;#ifndef FULLSEARCH  static htp[4] = {-1, 0, 1, 0};  static vtp[4] = {0, 1, 0, -1};  int j_min_now, i_min_now, i_min_next, j_min_next, sad_layr;  int distortion_0, distortion_1, distortion_2;  int m;#endif  xmax = pels;  ymax = lines;  xlim = ylim = seek_dist;  /* There are 8 scenarios for motion vector extrapolaton range   * and search window size combinations   *  1. No optional modes   *  2. Annex F (H.263 or H.263+) only.   *  3. Annex D (H.263) only.   *  4. Annex D (H.263) + Annex F   *  5. Annex D (H.263+, uui = '01' i.e. unlimited unrestricted MVs) only   *  6. Annex D (H.263+, uui = '01' i.e. unlimited unrestricted MVs) + Annex F   *  7. Annex D (H.263+, uui = '1' i.e. MVs based on picture size) only   *  8. Annex D (H.263+, uui = '1' i.e. MVs based on picture size) + Annex F */  /* The Unrestricted Motion Vector mode (see Annex D) is disabled. */  if ( (!long_vectors) || (estimation_type == PB_PICTURE_ESTIMATION) )  {        /* When the Advanced Prediction mode (see Annex F) is used without      * the Unrestricted Motion Vector mode, the extrapolation range is      * a maximum of 16 pixels outside the coded picture area. */    if (mv_outside_frame)    {      /* Maximum normal search range centered around the predicted vector       * Special handling for 8x8 vectors, as the 8x8 search may change        * the MV predictor for some of the blocks within the macroblock.        * When we impose this limitation, we are sure that any 8x8 vector 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91官网在线免费观看| 26uuu欧美日本| 欧美成人aa大片| 中文字幕一区不卡| 免费视频最近日韩| 色欧美乱欧美15图片| 久久久av毛片精品| 日韩激情中文字幕| 日本高清不卡aⅴ免费网站| 久久亚区不卡日本| 日av在线不卡| 欧美三级欧美一级| 1区2区3区精品视频| 国产酒店精品激情| 日韩久久精品一区| 亚洲高清三级视频| 91视频一区二区三区| 国产视频一区二区在线| 免费精品视频在线| 91精品国产免费| 午夜不卡在线视频| 欧美三级电影精品| 一区二区三区精品视频在线| proumb性欧美在线观看| 国产日产欧产精品推荐色| 日本aⅴ免费视频一区二区三区 | 国产精品日韩成人| 国产在线一区二区综合免费视频| 911国产精品| 亚洲国产日产av| 在线观看亚洲成人| 亚洲最大色网站| 一本到三区不卡视频| 日韩一区中文字幕| 99久久免费国产| 亚洲日本中文字幕区| 91丝袜美女网| 一区二区三区蜜桃网| 欧美三级视频在线观看| 天天av天天翘天天综合网色鬼国产| 欧美在线观看一区| 午夜不卡在线视频| 精品免费99久久| 国产美女精品在线| 国产精品麻豆99久久久久久| aaa国产一区| 一区二区日韩av| 777a∨成人精品桃花网| 欧美aaa在线| 久久青草欧美一区二区三区| 国产成人午夜精品影院观看视频| 国产精品嫩草久久久久| 一本色道亚洲精品aⅴ| 亚洲一区在线视频| 欧美一区二区成人6969| 精品一区二区三区的国产在线播放| 亚洲精品一区二区三区蜜桃下载| 久久国产精品72免费观看| 久久久久国产精品免费免费搜索| av高清久久久| 婷婷成人激情在线网| 精品99999| 91麻豆免费视频| 日本美女一区二区三区视频| 久久综合狠狠综合久久激情| 99久久国产综合精品麻豆| 亚洲午夜免费福利视频| 欧美成人性战久久| 91视视频在线直接观看在线看网页在线看| 亚洲成人动漫在线观看| 国产亚洲精品中文字幕| 色妹子一区二区| 韩国成人福利片在线播放| 亚洲免费高清视频在线| 日韩色视频在线观看| 成人激情文学综合网| 无吗不卡中文字幕| 中文av一区特黄| 91精品国产高清一区二区三区 | 欧美一区二区三区四区高清| 激情五月播播久久久精品| 亚洲女女做受ⅹxx高潮| 精品理论电影在线观看| 欧洲在线/亚洲| 成人午夜在线视频| 久久国产精品第一页| 亚洲国产日韩a在线播放| 亚洲国产精品av| 日韩欧美在线网站| 欧美性猛交xxxxxx富婆| 成人精品小蝌蚪| 激情综合网最新| 日韩精品乱码av一区二区| 日韩美女视频一区二区| 久久久一区二区| 日韩欧美中文字幕公布| 欧美亚洲精品一区| 99精品视频中文字幕| 国产麻豆精品一区二区| 奇米综合一区二区三区精品视频| 亚洲欧美日本韩国| 国产精品久久久久aaaa| 国产无一区二区| 久久久久久麻豆| 欧美不卡一区二区三区四区| 欧美日韩国产综合视频在线观看| 色婷婷综合久久久| 一本一本久久a久久精品综合麻豆| 成人一道本在线| 国产成人精品一区二区三区网站观看| 久久精品国产精品亚洲红杏| 日韩成人一级大片| 日韩精品亚洲一区二区三区免费| 亚洲成在线观看| 一区二区三区丝袜| 亚洲自拍偷拍欧美| 亚洲午夜视频在线观看| 亚洲国产一区视频| 午夜欧美2019年伦理| 天天色天天操综合| 人人狠狠综合久久亚洲| 久久99国产精品尤物| 狠狠久久亚洲欧美| 国产精品一区二区久激情瑜伽| 激情六月婷婷久久| 国产成人综合视频| eeuss鲁片一区二区三区| 色综合久久中文字幕| 欧美一a一片一级一片| 欧美在线观看视频一区二区| 欧美色偷偷大香| 欧美精品乱码久久久久久| 欧美一区二区视频在线观看 | 精品在线一区二区三区| 黑人精品欧美一区二区蜜桃| 国产精品一区一区三区| 成人av在线看| 在线观看91精品国产入口| 91精品国产综合久久福利软件| 日韩欧美中文一区二区| 国产日产欧美一区二区视频| 亚洲人成人一区二区在线观看| 亚洲午夜在线视频| 精品在线一区二区| 成人激情小说乱人伦| 欧美色图第一页| 国产无人区一区二区三区| 亚洲另类中文字| 美女视频黄频大全不卡视频在线播放| 韩国视频一区二区| 一本大道久久精品懂色aⅴ| 7777精品伊人久久久大香线蕉经典版下载 | 欧美成人一区二区三区| 中文字幕一区二区三区在线不卡 | 欧美大片日本大片免费观看| 久久丝袜美腿综合| 一区二区三区国产豹纹内裤在线 | 国产色产综合色产在线视频| 亚洲激情一二三区| 国内外成人在线| 欧美日韩三级一区二区| 国产日产精品一区| 琪琪久久久久日韩精品| 91香蕉视频在线| 26uuu精品一区二区在线观看| 亚洲黄色片在线观看| 国产毛片精品一区| 7777精品伊人久久久大香线蕉经典版下载 | 国产清纯白嫩初高生在线观看91| 一区二区成人在线观看| 国产麻豆精品久久一二三| 欧美日韩成人综合在线一区二区| 国产亚洲一区字幕| 美女免费视频一区二区| 欧美写真视频网站| 综合色天天鬼久久鬼色| 国产美女一区二区三区| 337p亚洲精品色噜噜| 亚洲另类色综合网站| 国产成人免费9x9x人网站视频| 日韩一区二区免费在线观看| 有坂深雪av一区二区精品| 国产不卡视频在线观看| 日韩免费视频一区| 日韩成人一级片| 欧美乱熟臀69xxxxxx| 亚洲影视资源网| 在线区一区二视频| 亚洲视频每日更新| 99久久精品国产精品久久| 国产三级一区二区| 国产一区在线观看视频| 日韩一区二区不卡| 蜜臀av性久久久久蜜臀aⅴ流畅| 日本韩国欧美一区二区三区| 国产精品成人免费精品自在线观看| 国产久卡久卡久卡久卡视频精品| 日韩免费高清av| 久久激情综合网| 精品三级在线观看|