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

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

?? erc_do_p.c

?? TML的參考源代碼
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
            {
              
              /* if Zero Motion Block, do the copying. This option is tried only once */
              if (isBlock(object_list, predMBNum, compPred, INTER_COPY)) 
              {
                
                if (fZeroMotionChecked) 
                {
                  continue;
                }
                else 
                {
                  fZeroMotionChecked = 1;

                  mvPred[0] = mvPred[1] = 0;
                  mvPred[2] = 0;
                  
                  buildPredRegionYUV(erc_img, mvPred, currRegion->xMin, currRegion->yMin, predMB);
                }
              }
              /* build motion using the neighbour's Motion Parameters */
              else if (isBlock(object_list,predMBNum,compPred,INTRA)) 
              {
                continue;
              }
              else 
              {
                mvptr = getParam(object_list, predMBNum, compPred, mv);
                
                mvPred[0] = mvptr[0];
                mvPred[1] = mvptr[1];
                mvPred[2] = mvptr[2];

                buildPredRegionYUV(erc_img, mvPred, currRegion->xMin, currRegion->yMin, predMB);
              }
              
              /* measure absolute boundary pixel difference */
              currDist = edgeDistortion(predBlocks, 
                MBNum2YBlock(currMBNum,comp,picSizeX),
                predMB, recfr->yptr, picSizeX, regionSize);
              
              /* if so far best -> store the pixels as the best concealment */
              if (currDist < minDist || !fInterNeighborExists) 
              {
                
                minDist = currDist;
                bestDir = i;
                
                for (k=0;k<3;k++) 
                  mvBest[k] = mvPred[k];
                
                currRegion->regionMode = 
                  (isBlock(object_list, predMBNum, compPred, INTER_COPY)) ? 
                  ((regionSize == 16) ? REGMODE_INTER_COPY : REGMODE_INTER_COPY_8x8) : 
                  ((regionSize == 16) ? REGMODE_INTER_PRED : REGMODE_INTER_PRED_8x8);
                
                copyPredMB(MBNum2YBlock(currMBNum,comp,picSizeX), predMB, recfr, 
                  picSizeX, regionSize);
              }
              
              fInterNeighborExists = 1;
            }
          }
        }
    }
    
    threshold--;
    
    } while ((threshold >= ERC_BLOCK_CONCEALED) && (fInterNeighborExists == 0));
    
    /* always try zero motion */
    if (!fZeroMotionChecked) 
    {
      mvPred[0] = mvPred[1] = 0;
      mvPred[2] = 0;

      buildPredRegionYUV(erc_img, mvPred, currRegion->xMin, currRegion->yMin, predMB);
      
      currDist = edgeDistortion(predBlocks, 
        MBNum2YBlock(currMBNum,comp,picSizeX),
        predMB, recfr->yptr, picSizeX, regionSize);
      
      if (currDist < minDist || !fInterNeighborExists) 
      {
        
        minDist = currDist;            
        for (k=0;k<3;k++) 
          mvBest[k] = mvPred[k];
        
        currRegion->regionMode = 
          ((regionSize == 16) ? REGMODE_INTER_COPY : REGMODE_INTER_COPY_8x8);
        
        copyPredMB(MBNum2YBlock(currMBNum,comp,picSizeX), predMB, recfr, 
          picSizeX, regionSize);
      }
    }
    
    for (i=0; i<3; i++)
      currRegion->mv[i] = mvBest[i];
    
    yCondition[MBNum2YBlock(currMBNum,comp,picSizeX)] = ERC_BLOCK_CONCEALED;
    comp = (comp+order+4)%4;
    compLeft--;
    
    } while (compLeft);
    
    return 0;
}

/*!
 ************************************************************************
 * \brief
 *      Builds the motion prediction pixels from the given location (in 1/4 or 1/8 pixel units) 
 *      of the reference frame. It not only copies the pixel values but builds the interpolation 
 *      when the pixel positions to be copied from is not full pixel (any 1/4 or 1/8 pixel position).
 *      It copies the resulting pixel vlaues into predMB.
 * \param img
 *      The pointer of img_par struture of current frame
 * \param mv
 *      The pointer of the predicted MV of the current (being concealed) MB
 * \param x
 *      The x-coordinate of the above-left corner pixel of the current MB
 * \param y
 *      The y-coordinate of the above-left corner pixel of the current MB
 * \param predMB
 *      memory area for storing temporary pixel values for a macroblock
 *      the Y,U,V planes are concatenated y = predMB, u = predMB+256, v = predMB+320
 ************************************************************************
 */
static void buildPredRegionYUV(struct img_par *img, int32 *mv, int x, int y, byte *predMB)
{
  int tmp_block[BLOCK_SIZE][BLOCK_SIZE];
  int i=0,j=0,ii=0,jj=0,i1=0,j1=0,j4=0,i4=0;
  int jf=0;
  int uv;
  int vec1_x=0,vec1_y=0,vec2_x=0,vec2_y=0;
  int ioff,joff;
  byte *pMB = predMB;

  int ii0,jj0,ii1,jj1,if1,jf1,if0,jf0;
  int mv_mul,f1,f2,f3,f4;

  int ref_frame = mv[2];

  /* Update coordinates of the current concealed macroblock */
  img->mb_x = x/MB_BLOCK_SIZE;
  img->mb_y = y/MB_BLOCK_SIZE;
  img->block_y = img->mb_y * BLOCK_SIZE;
  img->pix_c_y = img->mb_y * MB_BLOCK_SIZE/2;
  img->block_x = img->mb_x * BLOCK_SIZE;
  img->pix_c_x = img->mb_x * MB_BLOCK_SIZE/2;

  // set variables depending on mv_res
  if(img->mv_res)
  {
    mv_mul=8;
    f1=16;
    f2=15;
  }
  else
  {
    mv_mul=4;
    f1=8;
    f2=7;
  }

  f3=f1*f1;
  f4=f3/2;

  // luma *******************************************************

  for(j=0;j<MB_BLOCK_SIZE/BLOCK_SIZE;j++)
  {
    joff=j*4;
    j4=img->block_y+j;
    for(i=0;i<MB_BLOCK_SIZE/BLOCK_SIZE;i++)
    {
      ioff=i*4;
      i4=img->block_x+i;

      vec1_x = i4*4*mv_mul + mv[0];
      vec1_y = j4*4*mv_mul + mv[1];

      get_block(ref_frame,vec1_x,vec1_y,img,tmp_block);

      for(ii=0;ii<BLOCK_SIZE;ii++)
        for(jj=0;jj<MB_BLOCK_SIZE/BLOCK_SIZE;jj++)
          img->mpr[ii+ioff][jj+joff]=tmp_block[ii][jj];
    }
  }

  for (i = 0; i < 16; i++)
  {
    for (j = 0; j < 16; j++)
    {
      pMB[i*16+j] = img->mpr[j][i];
    }
  }
  pMB += 256;

  // chroma *******************************************************
  for(uv=0;uv<2;uv++)
  {
    for (j=4;j<6;j++)
    {
      joff=(j-4)*4;
      j4=img->pix_c_y+joff;
      for(i=0;i<2;i++)
      {
        ioff=i*4;
        i4=img->pix_c_x+ioff;
        for(jj=0;jj<4;jj++)
        {
          jf=(j4+jj)/2;
          for(ii=0;ii<4;ii++)
          {
            if1=(i4+ii)/2;
            i1=(img->pix_c_x+ii+ioff)*f1+mv[0];
            j1=(img->pix_c_y+jj+joff)*f1+mv[1];


            ii0=max (0, min (i1/f1, img->width_cr-1));
            jj0=max (0, min (j1/f1, img->height_cr-1));
            ii1=max (0, min ((i1+f2)/f1, img->width_cr-1));
            jj1=max (0, min ((j1+f2)/f1, img->height_cr-1));

            if1=(i1 & f2);
            jf1=(j1 & f2);
            if0=f1-if1;
            jf0=f1-jf1;
            img->mpr[ii+ioff][jj+joff]=(if0*jf0*mcef[ref_frame][uv][jj0][ii0]+
              if1*jf0*mcef[ref_frame][uv][jj0][ii1]+
              if0*jf1*mcef[ref_frame][uv][jj1][ii0]+
              if1*jf1*mcef[ref_frame][uv][jj1][ii1]+f4)/f3;

          }
        }
      }
    }

    for (i = 0; i < 8; i++)
    {
      for (j = 0; j < 8; j++)
      {
        pMB[i*8+j] = img->mpr[j][i];
      }
    }
    pMB += 64;

  }
}
/*!
 ************************************************************************
 * \brief
 *      Copies pixel values between a YUV frame and the temporary pixel value storage place. This is
 *      used to save some pixel values temporarily before overwriting it, or to copy back to a given 
 *      location in a frame the saved pixel values.
 * \param currYBlockNum   
 *      index of the block (8x8) in the Y plane
 * \param predMB          
 *      memory area where the temporary pixel values are stored
 *      the Y,U,V planes are concatenated y = predMB, u = predMB+256, v = predMB+320
 * \param recfr           
 *      pointer to a YUV frame
 * \param picSizeX        
 *      picture width in pixels
 * \param regionSize      
 *      can be 16 or 8 to tell the dimension of the region to copy
 ************************************************************************
 */
static void copyPredMB (int currYBlockNum, byte *predMB, frame *recfr, 
                        int32 picSizeX, int32 regionSize) 
{
  
  int j, k, xmin, ymin, xmax, ymax;
  int32 locationTmp, locationPred;
  
  xmin = (xPosYBlock(currYBlockNum,picSizeX)<<3);
  ymin = (yPosYBlock(currYBlockNum,picSizeX)<<3);
  xmax = xmin + regionSize -1;
  ymax = ymin + regionSize -1;
  
  for (j = ymin; j <= ymax; j++) 
  {
    for (k = xmin; k <= xmax; k++)
    {
      locationPred = j * picSizeX + k;
      locationTmp = (j-ymin) * 16 + (k-xmin);
      imgY[j][k] = predMB[locationTmp];
    }
  }
  
  for (j = (ymin>>1); j <= (ymax>>1); j++) 
  {
    for (k = (xmin>>1); k <= (xmax>>1); k++)
    {
      locationPred = j * picSizeX / 2 + k;
      locationTmp = (j-(ymin>>1)) * 8 + (k-(xmin>>1)) + 256;
      imgUV[0][j][k] = predMB[locationTmp];
      
      locationTmp += 64;
      
      imgUV[1][j][k] = predMB[locationTmp];
    }
  }
}

/*!
 ************************************************************************
 * \brief
 *      Calculates a weighted pixel difference between edge Y pixels of the macroblock stored in predMB
 *      and the pixels in the given Y plane of a frame (recY) that would become neighbor pixels if 
 *      predMB was placed at currYBlockNum block position into the frame. This "edge distortion" value
 *      is used to determine how well the given macroblock in predMB would fit into the frame when
 *      considering spatial smoothness. If there are correctly received neighbor blocks (status stored 
 *      in predBlocks) only they are used in calculating the edge distorion; otherwise also the already
 *      concealed neighbor blocks can also be used.
 * \return 
 *      The calculated weighted pixel difference at the edges of the MB.
 * \param predBlocks      
 *      status array of the neighboring blocks (if they are OK, concealed or lost)
 * \param currYBlockNum   
 *      index of the block (8x8) in the Y plane
 * \param predMB          
 *      memory area where the temporary pixel values are stored
 *      the Y,U,V planes are concatenated y = predMB, u = predMB+256, v = predMB+320
 * \param recY            
 *      pointer to a Y plane of a YUV frame
 * \param picSizeX        
 *      picture width in pixels
 * \param regionSize      
 *      can be 16 or 8 to tell the dimension of the region to copy
 ************************************************************************
 */
static int edgeDistortion (int predBlocks[], int currYBlockNum, byte *predMB, 
                           byte *recY, int32 picSizeX, int32 regionSize)
{
  int i, j, distortion, numOfPredBlocks, threshold = ERC_BLOCK_OK;
  byte *currBlock = NULL, *neighbor = NULL;
  int32 currBlockOffset = 0;
  
  currBlock = recY + (yPosYBlock(currYBlockNum,picSizeX)<<3)*picSizeX + (xPosYBlock(currYBlockNum,picSizeX)<<3);
  
  do 
  {
    
    distortion = 0; numOfPredBlocks = 0;
    
    /* loop the 4 neighbours */
    for (j = 4; j < 8; j++) 
    {
      /* if reliable, count boundary pixel difference */
      if (predBlocks[j] >= threshold) 
      {
        
        switch (j) 
        {
        case 4:
          neighbor = currBlock - picSizeX;
          for ( i = 0; i < regionSize; i++ ) 
          {
            distortion += mabs(predMB[i] - neighbor[i]);
          }
          break;          
        case 5:
          neighbor = currBlock - 1;
          for ( i = 0; i < regionSize; i++ ) 
          {
            distortion += mabs(predMB[i*16] - neighbor[i*picSizeX]);
          }
          break;                
        case 6:
          neighbor = currBlock + regionSize*picSizeX;
          currBlockOffset = (regionSize-1)*16;
          for ( i = 0; i < regionSize; i++ ) 
          {
            distortion += mabs(predMB[i+currBlockOffset] - neighbor[i]);
          }
          break;                
        case 7:
          neighbor = currBlock + regionSize;
          currBlockOffset = regionSize-1;
          for ( i = 0; i < regionSize; i++ ) 
          {
            distortion += mabs(predMB[i*16+currBlockOffset] - neighbor[i*picSizeX]);
          }
          break;
        }
        
        numOfPredBlocks++;
      }
    }
    
    threshold--;
    if (threshold < ERC_BLOCK_CONCEALED)
      break;
  } while (numOfPredBlocks == 0);
  
  return (distortion/numOfPredBlocks);
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜电影网一区| 精品国产麻豆免费人成网站| 成人午夜视频福利| 亚洲高清久久久| 久久久久9999亚洲精品| 欧美在线免费视屏| 国产+成+人+亚洲欧洲自线| 午夜国产不卡在线观看视频| 国产精品久久久久久一区二区三区| 欧美日韩精品欧美日韩精品| 成人午夜视频在线| 紧缚奴在线一区二区三区| 亚洲精品中文字幕在线观看| 久久亚区不卡日本| 91精品国产免费久久综合| av电影一区二区| 国产久卡久卡久卡久卡视频精品| 日韩激情av在线| 一区二区三区四区不卡在线| 国产日韩欧美麻豆| 精品国产一二三| 欧美一区二区在线不卡| 91黄视频在线观看| 99久久久免费精品国产一区二区| 国精产品一区一区三区mba桃花 | 欧美三级蜜桃2在线观看| 成人丝袜18视频在线观看| 久久国产精品色| 午夜久久久久久电影| 一区二区三区中文免费| 国产精品丝袜黑色高跟| 2021中文字幕一区亚洲| 欧美成人午夜电影| 欧美一级片在线| 在线观看免费亚洲| 成人精品gif动图一区| 韩日av一区二区| 精东粉嫩av免费一区二区三区| 日本女优在线视频一区二区| 午夜精品一区在线观看| 亚洲第一电影网| 婷婷夜色潮精品综合在线| 午夜精彩视频在线观看不卡| 亚瑟在线精品视频| 日韩福利电影在线| 日韩成人免费看| 日韩av在线播放中文字幕| 日本人妖一区二区| 美女一区二区三区在线观看| 另类小说欧美激情| 九色综合狠狠综合久久| 国产剧情一区二区| 99久久精品国产毛片| 色综合久久久久久久| 在线亚洲欧美专区二区| 欧美高清精品3d| 日韩区在线观看| 国产亚洲午夜高清国产拍精品| 国产午夜精品在线观看| 国产精品成人免费在线| 一区二区成人在线| 精品一区二区免费看| 亚洲精品中文字幕在线观看| 亚洲另类春色国产| 一区二区三区电影在线播| 亚洲午夜免费电影| 日本亚洲免费观看| 国产精品自拍一区| av不卡免费在线观看| 欧美日韩三级视频| 26uuu久久天堂性欧美| 欧美经典一区二区| 一区二区三区精品视频在线| 日韩综合小视频| 国产一区二区三区精品视频| av在线不卡电影| 欧美日韩国产美| 亚洲精品国产品国语在线app| 亚洲另类在线视频| 久久99精品久久久| 欧美一区二区三区在线看| 欧美少妇bbb| 精品国产乱码久久久久久牛牛| 国产精品人人做人人爽人人添| 一个色妞综合视频在线观看| 精品制服美女久久| 色婷婷激情久久| 日韩视频免费观看高清在线视频| 欧美激情中文字幕一区二区| 亚洲va天堂va国产va久| 国产精品乡下勾搭老头1| 91久久精品一区二区三| 久久午夜色播影院免费高清| 亚洲一区视频在线观看视频| 国产真实乱对白精彩久久| 在线观看不卡视频| 国产亚洲综合色| 天天免费综合色| 99久久精品费精品国产一区二区| 日韩午夜在线播放| 亚洲激情校园春色| 国产91在线观看| 日韩午夜av一区| 亚洲亚洲精品在线观看| 成人avav在线| xf在线a精品一区二区视频网站| 亚洲一区二区三区四区不卡| 成人免费毛片app| 精品国产乱码久久久久久蜜臀| 亚洲福利一区二区三区| 99精品视频一区二区三区| 精品国产髙清在线看国产毛片| 亚洲高清在线视频| 一本到不卡精品视频在线观看| 国产无人区一区二区三区| 男女性色大片免费观看一区二区 | proumb性欧美在线观看| 精品国产污污免费网站入口| 同产精品九九九| 欧美色图一区二区三区| 亚洲人成亚洲人成在线观看图片 | 日韩高清在线一区| 在线视频国内一区二区| 国产精品激情偷乱一区二区∴| 经典三级在线一区| 日韩欧美的一区| 日本成人在线一区| 亚洲国产精品ⅴa在线观看| 琪琪久久久久日韩精品| 欧美剧在线免费观看网站| 亚洲激情中文1区| 91久久精品网| 亚洲老司机在线| 色婷婷一区二区三区四区| 亚洲欧美视频在线观看视频| 成a人片亚洲日本久久| 国产精品网站一区| 成人白浆超碰人人人人| 欧美精彩视频一区二区三区| 国产精品一级在线| 久久久www成人免费毛片麻豆| 激情国产一区二区 | 欧美videos中文字幕| 蜜桃久久久久久| 欧美videofree性高清杂交| 青青草成人在线观看| 日韩午夜精品电影| 精品系列免费在线观看| 精品国产乱码久久久久久老虎| 国产一区二区三区免费播放| 亚洲国产成人自拍| 91看片淫黄大片一级在线观看| 一区二区三区在线观看视频| 91久久香蕉国产日韩欧美9色| 亚洲精品免费在线| 欧美精品高清视频| 免费的成人av| 久久精品日产第一区二区三区高清版 | 久久夜色精品国产噜噜av| 国产在线视频不卡二| 欧美极品另类videosde| 91啪亚洲精品| 日日夜夜免费精品| 精品国产乱码久久久久久蜜臀 | 亚洲第一会所有码转帖| 欧美性猛交xxxx乱大交退制版| 欧美色图在线观看| 男人的天堂亚洲一区| 久久午夜羞羞影院免费观看| 不卡免费追剧大全电视剧网站| 亚洲精品视频免费看| 5月丁香婷婷综合| 国产伦精品一区二区三区视频青涩 | 91视频观看免费| 亚洲一区二区三区在线播放| 日韩一区二区三区观看| 成人听书哪个软件好| 亚洲成av人片在线| 久久蜜桃一区二区| 色婷婷狠狠综合| 精品一区二区三区免费播放| 日韩影院在线观看| 久久无码av三级| 欧美综合视频在线观看| 黄色成人免费在线| 最新久久zyz资源站| 精品视频一区二区三区免费| 91香蕉视频黄| 蜜臀91精品一区二区三区| 国产精品天干天干在观线| 欧美日本韩国一区| 成人激情动漫在线观看| 日韩国产成人精品| 亚洲美女精品一区| 555夜色666亚洲国产免| 国产成人午夜视频| 亚洲午夜精品在线| 精品伦理精品一区| 欧美色网站导航| 91女神在线视频|