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

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

?? p_picture.c

?? tmn3.2編解碼源程序 Linux C環境編寫 文件齊全 壓縮包完整 試用正常 歡迎試用
?? C
?? 第 1 頁 / 共 5 頁
字號:
/************************************************************************ * *  coder.c, main coding engine 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. **//***************************************************************** * * Modified by Pat Mulroy, BT Labs to run syntax based arithmetic * coding.  SAC option, H.263 (Annex E). * *****************************************************************/#include"sim.h"/********************************************************************** * *	Name:           CodeOneOrTwo *	Description:	code one image normally or two images *                      as a PB-frame (CodeTwoPB and CodeOnePred merged) *	 *	Input:          pointer to image, prev_image, prev_recon, Q *         *	Returns:	pointer to reconstructed image *	Side effects:	memory is allocated to recon image * *	Date: 950221	Author:	<klillevo@mailbox.jf.intel.com> *            970831    modified by mikeg@ee.ubc.ca *            970815    modified by guyc@ee.ubc.ca * ***********************************************************************/void CodeOneOrTwo(PictImage *curr, PictImage *B_image, PictImage *prev,           PictImage *pr, int QP, int frameskip, Bits *bits,          Pict *pic, PictImage *B_recon, PictImage *recon){  unsigned char *prev_ipol,*prev_ipol_woRTYPE, *pi, *pi_woRTYPE;  PictImage *prev_recon=NULL, *pr_edge = NULL;  MotionVector *MV[7][MBR+1][MBC+2];  MotionVector *B_f_MV[7][MBR+1][MBC+2];  MotionVector ZERO = {0,0,0,0,0};  MB_Structure *recon_data_P;   MB_Structure *recon_data_B=NULL;   MB_Structure *diff;   int *qcoeff_P, *rcoeff, *coeff;  int *qcoeff_B=NULL;  int Mode;  int CBP, CBPB=0;  int bquant[] = {5,6,7,8};  int QP_B;  int newgob, advanced_temporarily_off = DEF_ADV_MODE;  int i,j,k,B;  /* buffer control vars */  float QP_cumulative = (float)0.0;  int abs_mb_num = 0, QuantChangePostponed = 0;  int QP_new, QP_prev, dquant, QP_xmitted=QP;  /* Rate control variables */  Bits *bits_prev = (Bits*)calloc(1,sizeof(Bits));  MB_Structure *pred_P = (MB_Structure *)malloc(sizeof(MB_Structure));  MB_Structure *pred_B = (MB_Structure *) malloc (sizeof (MB_Structure));    int PB_pred_type;  /* advanced intra coding variables */  int *store_rcoeff, *store_coeff, *pcoeff; /* used to do prediction in advanced intra coding */  int store_pb;   /* Reference Picture Selection variables */  static int sync_gob = 0;  int sync_gob_done = 0;  int encode_this_gob = 1; /* Always on if Annex N not used */  int sync_gob_this_frame = 0;  ZeroBits(bits);  /* Currently, the MV info is stored in 7 MV structs per MB. MV[0]   * stores the 16x16 MV. MV[1] through MV[4] store the 8x8 MVs. MV[6]   * stores the PB delta MV or the forward predicted B MV. MV[5]   * stores the backward predicted MV for true-B pictures. */   InitializeMV(MV);  InitializeMV(B_f_MV);  /* Mark PMV's outside the frame. */  for (i = 1; i < (pels>>4)+1; i++)   {    for (j = 0; j < 7; j++)    {      MarkVec(MV[j][0][i]);       MarkVec(B_f_MV[j][0][i]);     }    MV[0][0][i]->Mode = MODE_INTRA;    B_f_MV[0][0][i]->Mode = MODE_INTRA;  }  /* Zero out PMV's outside the frame */  for (i = 0; i < (lines>>4)+1; i++)   {    for (j = 0; j < 7; j++)     {      ZeroVec(MV[j][i][0]);      ZeroVec(MV[j][i][(pels>>4)+1]);      ZeroVec(B_f_MV[j][i][0]);      ZeroVec(B_f_MV[j][i][(pels>>4)+1]);    }    MV[0][i][0]->Mode = MODE_INTRA;    MV[0][i][(pels>>4)+1]->Mode = MODE_INTRA;    B_f_MV[0][i][0]->Mode = MODE_INTRA;    B_f_MV[0][i][(pels>>4)+1]->Mode = MODE_INTRA;  }  GenerateFrameAndInterpolatedImages(pr, pic, &prev_ipol, &prev_recon, &pi, &pr_edge);  /* Integer and half pel motion estimation */  MotionEstimatePicture( curr->lum,prev_recon->lum, NULL, prev_ipol,                         NULL, pic->seek_dist, MV, pic->use_gobsync,                         P_PICTURE_ESTIMATION);  if (successive_B_frames)  {    StoreDirectModeVectors(MV, True_B_Direct_Mode_MV);  }  if (pic->PB)  { /* Interpolate the image for B picture prediction without using ETYPE*/    if (mv_outside_frame)     {      if (long_vectors) B = 16; else  B = 8;      pi_woRTYPE = InterpolateImage(pr_edge->lum, pels+4*B, lines+4*B,0);      prev_ipol_woRTYPE = pi_woRTYPE + (2*pels + 8*B) * 4*B + 4*B;     }    else     {      pi_woRTYPE = InterpolateImage(pr->lum,pels,lines,0);      prev_ipol_woRTYPE = pi_woRTYPE;    }  }  if (PCT_IPB == pic->picture_coding_type)  {    if (adv_pred)    {      /* Turn off advanced coding since there can be only 1        * motion vector for B frames of IPB. */      advanced_temporarily_off = YES;      overlapping_MC = OFF;      adv_pred = OFF;      use_4mv = OFF;    }    /* Forward motion Integer and half pel estimation for improved PB frames.     * Motion estimation type is set to PB_PICTURE so that long vectors will      * not be used. */    MotionEstimatePicture( B_image->lum,prev_recon->lum, NULL, prev_ipol_woRTYPE,                           NULL, pic->seek_dist, B_f_MV, pic->use_gobsync,                            PB_PICTURE_ESTIMATION);                              if (advanced_temporarily_off)    {      advanced_temporarily_off = NO;      overlapping_MC = ON;      adv_pred = ON;      use_4mv = ON;    }  }  switch (rate_control_method)   {    case NO:    case OFFLINE_RC:      QP_new = QP_xmitted = QP_prev = QP; /* Copy the passed value of QP */      break;    case  TMN8_RC:            /* Initialization routine for Frame Layer Rate Control */      /* Jordi Ribas added more parameters to InitializeRateControlMB */      InitializeRateControlMB(curr, (float)pic->bit_rate,                               (pic->PB ? pic->target_frame_rate/2 : pic->target_frame_rate), MV,                              prev_recon, prev_ipol,                               pred_P, pic->PB, pic->RTYPE);      /* compute the first QP to be included in the picture header */      QP_new = Compute_QP(0,0);      QP_xmitted = QP_prev = QP_new;       break;    case  TMN5_RC:      /* Initialization routine for MB Layer Rate Control */      QP_new = InitializeQuantizer(PCT_INTER, (float)pic->bit_rate,                (pic->PB ? pic->target_frame_rate/2 : pic->target_frame_rate),               pic->QP_mean);      QP_xmitted = QP_prev = QP_new;      break;    default:      break;  }  dquant = 0;   for ( j = 0; j < lines/MB_SIZE; j++)   {    if (rate_control_method == TMN5_RC)     {      /* QP updated at the beginning of each row for Frame layer rate control */      AddBitsPicture(bits);      QP_new =  UpdateQuantizer(abs_mb_num, pic->QP_mean, PCT_INTER,                 (float)pic->bit_rate, pels/MB_SIZE, lines/MB_SIZE,                 bits->total);    }      newgob = 0;    /* Do VRC on GOBs -- just add sync gobs at user defined frequency for now      * and only in the sync frames */    if (pic->reference_picture_selection && pic->sync         && (pic->use_gobsync && j%pic->use_gobsync == 0))    {      /* Determine if this GOB is a sync GOB */      if (j == sync_gob && !sync_gob_done)      {        ++sync_gob_this_frame;        sync_gob = (sync_gob+pic->use_gobsync);        if (sync_gob >= (lines/MB_SIZE)) sync_gob = 0;        fprintf(stdout, "Coding Sync GOB: %d\n", j);        encode_this_gob = 1;        if (sync_gob_this_frame == sync_gobs_per_frame) sync_gob_done = 1;      }      else        encode_this_gob = 0;    }     /* encoder this GOBs (used for VRC on GOBs, otherwise always true) */    if (encode_this_gob)    {    if (j == 0)     {      if (advanced_intra_coding)      {         /* store the coeff for the frame */         if ((store_coeff=(int *)calloc(384*(pels/MB_SIZE)*(lines/MB_SIZE), sizeof(int))) == 0)          {            fprintf(stderr,"coder(): Couldn't allocate store_coeff.\n");            exit(-1);         }         if ((store_rcoeff=(int *)calloc(384*(pels/MB_SIZE)*(lines/MB_SIZE), sizeof(int))) == 0)          {            fprintf(stderr,"coder(): Couldn't allocate store_rcoeff.\n");            exit(-1);         }      }      pic->QUANT = QP_new;      bits->header += CountBitsPicture(pic);      QP_xmitted = QP_prev = QP_new;    }    else if (pic->use_gobsync && j%pic->use_gobsync == 0)     {      bits->header += CountBitsGOB(j,QP_new,pic); /* insert gob header */      QP_xmitted = QP_prev = QP_new;      newgob = 1;    }      for ( i = 0; i < pels/MB_SIZE; i++)     {           if (rate_control_method == TMN8_RC)       {        /* Compute optimized quantizer for the current macroblock */        QP_new = Compute_QP(i,j);      }      /* Update of dquant, check and correct its limit */      if (PCT_B != pic->picture_coding_type)      {                dquant = QP_new - QP_prev;        if ( dquant != 0 && MV[0][j+1][i+1]->Mode == MODE_INTER4V	     && !EPTYPE)         {          /* It is not possible to change the quantizer and at the same           * time use 8x8 vectors, unless H.263+ PLUS PTYPE is used.            * Turning off 8x8 vectors is not           * possible at this stage because the previous macroblock           * encoded assumed this one should use 8x8 vectors. Therefore           * the change of quantizer is postponed until the first MB           * without 8x8 vectors */      	   dquant = 0;           QP_xmitted = QP_prev;           QuantChangePostponed = 1;        }        else         {          QP_xmitted = QP_new;          QuantChangePostponed = 0;        }        /* Unless modified quantization mode is in use restrict the range of         * dquant to [-2,+2]*/        if (!modified_quantization) 	      {      	  if (dquant > 2)            {             dquant =  2;             QP_xmitted = QP_prev + dquant;          }   	      if (dquant < -2)           {             dquant = -2;             QP_xmitted = QP_prev + dquant;          }	      }        else         {          /* Modified quantization mode is in use. */#ifdef RESTRICTED_MQ          /* restrict dquant so that when the modified quantization mode is on quant only uses 2 bits*/          if (dquant != 0)          {            dquant= Get_restricted_MQ(dquant,QP_prev);            QP_xmitted = QP_prev + dquant;          }#endif          if (dquant!=0) 		        {            if ((QP_prev >= 21 && dquant == -3) ||                (QP_prev >= 11 && QP_prev <= 20 && dquant == -2) ||                (QP_prev >= 2  && QP_prev <= 10 && dquant == -1) ||                (QP_prev == 1  && dquant == 2)) 	          {   	          /* dquant will be coded into 2 bits*/       	      pic->dquant_size = 2;	            dquant = 2;            }            else             {              if ((QP_prev == 31 && dquant == -5) ||                  (QP_prev == 30 && dquant == 1) ||                  (QP_prev == 29 && dquant == 2) ||                  (QP_prev >= 21 && QP_prev <= 28 && dquant == 3) ||                  (QP_prev >= 11 && QP_prev <= 20 && dquant == 2) ||                  (QP_prev >= 1 && QP_prev <= 10 && dquant == 1))	            {		            /* dquant will be coded into 2 bits*/	      	      pic->dquant_size = 2;		            dquant = 3;	            } 	            else 	            {	              /* dquant will be coded intou 6 bits. */		            pic->dquant_size=6;		            /* instead of the difference between current quantizer and

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
...av二区三区久久精品| 色狠狠桃花综合| 日韩精品一卡二卡三卡四卡无卡| 中文字幕亚洲区| 在线亚洲一区二区| 国产成人av电影免费在线观看| 国内精品免费**视频| 韩国一区二区三区| 风间由美一区二区三区在线观看 | 欧美精品第1页| 欧美日韩精品一区二区三区| 4438x成人网最大色成网站| 欧美色综合久久| 911精品国产一区二区在线| 欧美高清视频一二三区| 欧美一区二区三区视频在线| 日韩欧美久久久| 久久日一线二线三线suv| 国产日韩高清在线| 亚洲欧美电影院| 一区二区三区在线观看国产 | 欧美精品少妇一区二区三区| 欧美乱妇23p| 精品国产电影一区二区| 久久精品男人天堂av| 一区二区在线观看视频在线观看| 亚洲美女免费在线| 久久成人久久爱| 国产福利精品一区| 日本高清不卡视频| 日韩欧美国产一区二区三区 | 91影院在线免费观看| 欧美日韩国产123区| 337p粉嫩大胆噜噜噜噜噜91av| 国产精品久久久久久久久免费相片| 自拍偷拍亚洲综合| 日韩高清一级片| 成人国产视频在线观看| 欧美日韩免费一区二区三区视频| 精品国产免费视频| 一区二区三区精品| 国产成人亚洲精品狼色在线| 91黄色激情网站| 26uuu国产在线精品一区二区| 欧美激情在线免费观看| 日韩国产欧美三级| 91免费国产在线观看| 欧美一区二区精品在线| 亚洲精品乱码久久久久久日本蜜臀| 日日夜夜免费精品视频| 91蝌蚪porny九色| 久久精品在线观看| 天堂va蜜桃一区二区三区漫画版| 国产成人免费视频网站| 欧美大黄免费观看| 亚洲午夜电影在线观看| 一个色妞综合视频在线观看| 精品一区二区三区欧美| 欧美人与z0zoxxxx视频| 亚洲色图欧洲色图婷婷| 久久精品国产久精国产爱| 91成人免费在线| 久久久久国产精品麻豆| 亚洲成a人v欧美综合天堂| 99精品在线观看视频| 国产亚洲精品精华液| 热久久一区二区| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 欧美老肥妇做.爰bbww视频| 中文字幕一区二区三区乱码在线| 国产黑丝在线一区二区三区| 日韩女优av电影| 蜜臀av性久久久久蜜臀aⅴ| 欧美日本高清视频在线观看| 精品国产一区二区三区忘忧草| 亚洲欧洲精品天堂一级| eeuss鲁一区二区三区| 国产女同互慰高潮91漫画| 精品一区二区三区免费观看| 2022国产精品视频| 国产一区二区免费在线| 久久久久国产精品麻豆| 成人精品小蝌蚪| 国产精品色在线| 91网页版在线| 亚洲图片欧美一区| 91.麻豆视频| 美女视频网站黄色亚洲| 精品国产伦一区二区三区免费| 韩日av一区二区| 国产精品视频免费| 色综合久久久久综合| 亚洲成av人在线观看| 日韩一区二区三区电影在线观看| 麻豆极品一区二区三区| 久久午夜国产精品| 91黄色免费看| 蜜臀91精品一区二区三区| 精品福利一二区| 99久久亚洲一区二区三区青草| 亚洲欧洲精品天堂一级| 欧美日韩国产色站一区二区三区| 免费日韩伦理电影| 国产精品卡一卡二| 欧美三级电影在线观看| 狠狠色丁香久久婷婷综合_中 | 中文字幕一区免费在线观看| 99久久精品99国产精品| 亚洲综合在线视频| 久久综合久久综合久久综合| 成人激情小说网站| 男女性色大片免费观看一区二区 | 免费观看久久久4p| 久久久久久久电影| 欧美日韩一区国产| 国产福利一区二区三区视频| 亚洲国产aⅴ天堂久久| 精品国产亚洲一区二区三区在线观看| 丁香激情综合五月| 久久久精品国产免大香伊 | 国产亚洲欧美一区在线观看| 宅男噜噜噜66一区二区66| 国产一区二区三区四区五区美女| 亚洲日本欧美天堂| 日韩欧美亚洲国产精品字幕久久久| eeuss国产一区二区三区| 日本va欧美va精品发布| 尤物视频一区二区| 国产亚洲综合性久久久影院| 欧美色视频在线| 北岛玲一区二区三区四区| 久久电影网站中文字幕| 亚洲一区二区在线视频| 中文天堂在线一区| www国产成人| 欧美日韩一区不卡| 色哟哟一区二区| 大陆成人av片| 国内久久精品视频| 午夜精彩视频在线观看不卡| 久久久久久电影| 精品粉嫩aⅴ一区二区三区四区| 欧美午夜精品一区二区三区| 99re视频这里只有精品| 盗摄精品av一区二区三区| 国产精品自在在线| 国内久久婷婷综合| 久草精品在线观看| 久久国产麻豆精品| 人人爽香蕉精品| 麻豆精品新av中文字幕| 久久精工是国产品牌吗| 日本亚洲三级在线| 蜜臀av亚洲一区中文字幕| 亚洲v日本v欧美v久久精品| 亚洲特黄一级片| 亚洲欧洲性图库| 一区二区三区中文免费| 亚洲电影视频在线| 亚洲成人av电影| 亚洲777理论| 日韩高清在线不卡| 国内精品国产三级国产a久久| 国产精品白丝jk白祙喷水网站| 麻豆精品视频在线| 国产美女一区二区三区| 国产99一区视频免费| 国产精品456| 国产美女视频一区| www.欧美色图| 欧美日韩三级在线| 日韩欧美综合在线| 国产欧美日韩不卡免费| 亚洲欧美另类小说视频| 国内精品免费在线观看| 国产91露脸合集magnet| 91污片在线观看| 欧美丰满少妇xxxxx高潮对白| 日韩亚洲欧美一区二区三区| 久久伊人中文字幕| 亚洲欧洲精品天堂一级| 亚洲成人激情自拍| 极品尤物av久久免费看| 国产盗摄精品一区二区三区在线| 国产成人亚洲精品狼色在线| 一本大道av伊人久久综合| 91精品在线一区二区| 精品日韩欧美在线| 国产精品国产三级国产aⅴ中文| 亚洲国产一区二区三区青草影视 | 亚洲一区二区三区免费视频| 亚洲成人资源网| 国产精品香蕉一区二区三区| 91久久精品一区二区三区| 精品乱人伦一区二区三区| 亚洲伦理在线精品| 国产一二精品视频| 欧美精品在欧美一区二区少妇| 国产精品免费av| 免费成人你懂的|