亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
亚洲电影在线播放| 99久久99久久久精品齐齐| 亚洲风情在线资源站| 欧美最猛黑人xxxxx猛交| 777a∨成人精品桃花网| 精品久久国产老人久久综合| 中文字幕不卡的av| 三级成人在线视频| 不卡一二三区首页| 欧美岛国在线观看| 亚洲综合在线电影| 视频一区二区三区在线| 日韩三级中文字幕| 偷拍亚洲欧洲综合| 色综合天天综合网天天狠天天 | 欧美羞羞免费网站| 国产精品免费久久| 久久99精品视频| 色视频一区二区| 国产精品毛片久久久久久久| 色悠久久久久综合欧美99| 日韩激情一区二区| 国产精品网友自拍| 精品视频999| 亚洲风情在线资源站| 欧美精品一区二| 久久国产精品露脸对白| 91精品国产麻豆| 丝袜美腿亚洲一区二区图片| 久久婷婷国产综合精品青草| 日本伦理一区二区| 亚洲免费观看视频| www.亚洲精品| 亚洲欧美另类久久久精品| 欧美日韩精品一区二区在线播放| 中文字幕一区二区三区在线观看 | 在线电影一区二区三区| 亚洲国产精品久久艾草纯爱| 26uuu亚洲综合色| 欧美日韩一区二区三区在线| 国产精品自拍网站| 国产日韩欧美高清在线| 国产精品亚洲第一| 日韩电影网1区2区| 欧美mv日韩mv| 欧美日韩一级片在线观看| 成人性视频免费网站| 国产精品免费观看视频| 日韩精品一区二区三区在线| 在线亚洲免费视频| av电影天堂一区二区在线观看| 蜜臀av国产精品久久久久| 日韩精品一区二区三区swag| 欧美在线视频你懂得| 成人午夜视频在线观看| 久久福利资源站| 日韩精品电影一区亚洲| 亚洲综合无码一区二区| 亚洲日本青草视频在线怡红院| 欧美亚洲综合另类| 色婷婷亚洲一区二区三区| 成人网页在线观看| 国产成人午夜电影网| 亚洲欧洲综合另类| 国产精品九色蝌蚪自拍| 欧美电影影音先锋| 欧美日韩三级一区二区| 99精品久久久久久| 91在线一区二区三区| 成人动漫av在线| 大美女一区二区三区| 国产电影一区在线| 国产69精品久久久久毛片| 最新不卡av在线| 国产精品久久毛片av大全日韩| 国产欧美日韩在线看| 2021中文字幕一区亚洲| 国产色产综合色产在线视频| 精品视频1区2区3区| 国模少妇一区二区三区| 一卡二卡欧美日韩| 亚洲国产精品一区二区www在线| 亚洲男人的天堂av| 一区二区三区欧美视频| 亚洲第一福利视频在线| 五月天精品一区二区三区| 三级一区在线视频先锋 | 国精品**一区二区三区在线蜜桃| 免费成人在线网站| 亚洲三级在线免费| 亚洲激情校园春色| 久久久久九九视频| 欧美日韩dvd在线观看| 538prom精品视频线放| 日韩一级大片在线观看| 精品盗摄一区二区三区| 欧美视频在线一区| 日韩一区二区三区在线| 久久精品亚洲精品国产欧美| 最新中文字幕一区二区三区 | 亚洲在线视频免费观看| 午夜av电影一区| 狠狠色丁香婷综合久久| 成人av在线影院| 欧美三区免费完整视频在线观看| 欧美一区二区三区免费在线看| 久久午夜老司机| 亚洲乱码日产精品bd| 午夜视频一区二区| 狠狠v欧美v日韩v亚洲ⅴ| 91在线视频在线| 正在播放亚洲一区| 国产精品久久久久影院| 婷婷国产v国产偷v亚洲高清| 国产成人午夜电影网| 欧美性一二三区| 国产日韩欧美高清| 日韩精品高清不卡| 91性感美女视频| 国产不卡一区视频| 欧美精品一级二级| 欧美激情中文字幕一区二区| 亚洲电影在线免费观看| 国产美女精品人人做人人爽| 日本va欧美va精品| www.欧美色图| 日韩欧美色电影| 一区二区三区在线视频播放| 精品无码三级在线观看视频| 91免费视频网| 国产女同互慰高潮91漫画| 日本网站在线观看一区二区三区| 成人一区二区三区中文字幕| 欧美精品免费视频| 综合色天天鬼久久鬼色| 国产一区二区在线视频| 欧美日韩午夜在线视频| 国产精品高清亚洲| 国产一区二区三区免费观看| 欧美三级电影网| 亚洲女人****多毛耸耸8| 国内精品嫩模私拍在线| 欧美日韩国产影片| 亚洲人成网站在线| 成人开心网精品视频| 久久新电视剧免费观看| 蜜桃一区二区三区在线观看| 欧美私人免费视频| 亚洲激情图片一区| av动漫一区二区| 国产日产欧美一区| 国产盗摄女厕一区二区三区| 欧美xxxxx牲另类人与| 蜜臀av国产精品久久久久| 欧美日韩成人综合| 一区二区三区高清| 91丨porny丨在线| 一区免费观看视频| 成人av资源网站| 国产精品久久久久7777按摩| 成人免费黄色在线| 国产精品全国免费观看高清| 国产成人免费在线| 久久久综合精品| 国产a精品视频| 亚洲国产经典视频| 不卡大黄网站免费看| 国产精品福利av| 色综合视频一区二区三区高清| 亚洲丝袜美腿综合| 色天天综合久久久久综合片| 亚洲免费在线视频一区 二区| 91农村精品一区二区在线| 亚洲黄色性网站| 在线观看一区日韩| 天天色 色综合| 日韩一区二区麻豆国产| 毛片基地黄久久久久久天堂| 精品日韩一区二区| 国产传媒一区在线| 中文字幕在线一区| 91久久精品日日躁夜夜躁欧美| 一区二区三区色| 91精品国产全国免费观看| 日本少妇一区二区| 久久久www成人免费毛片麻豆 | 亚洲欧美aⅴ...| 91国产精品成人| 蜜桃视频一区二区三区| 国产三级精品视频| 91亚洲精华国产精华精华液| 婷婷激情综合网| 国产视频一区二区在线| 色综合久久99| 麻豆91在线播放| 一区视频在线播放| 日韩亚洲电影在线| 99久久精品免费看国产免费软件| 亚洲6080在线| 久久午夜色播影院免费高清|