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

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

?? erc_do_i.c

?? 一個簡單的視頻會議VC++MFC工程文件
?? C
?? 第 1 頁 / 共 2 頁
字號:

/*!
 *************************************************************************************
 * \file 
 *      erc_do_i.c
 *
 * \brief
 *      Intra (I) frame error concealment algorithms for decoder
 *
 *  \author
 *      - Ari Hourunranta                <ari.hourunranta@nokia.com>
 *      - Viktor Varsa                     <viktor.varsa@nokia.com>
 *      - Ye-Kui Wang                   <wyk@ieee.org>
 *
 *************************************************************************************
 */

#include <stdlib.h>
#include "global.h"
#include "erc_do.h"

static void concealBlocks( int lastColumn, int lastRow, int comp, frame *recfr, int32 picSizeX, int *condition );
static void pixMeanInterpolateBlock( byte *src[], byte *block, int blockSize, int frameWidth );

/*!
 ************************************************************************
 * \brief
 *      The main function for Intra frame concealment.
 *      Calls "concealBlocks" for each color component (Y,U,V) seperately
 * \return
 *      0, if the concealment was not successful and simple concealment should be used
 *      1, otherwise (even if none of the blocks were concealed)
 * \param recfr
 *      Reconstructed frame buffer
 * \param picSizeX
 *      Width of the frame in pixels
 * \param picSizeY
 *      Height of the frame in pixels
 * \param errorVar   
 *      Variables for error concealment
 ************************************************************************
 */
int ercConcealIntraFrame( frame *recfr, int32 picSizeX, int32 picSizeY, ercVariables_t *errorVar ) 
{
  int lastColumn = 0, lastRow = 0;
  
  /* if concealment is on */
  if ( errorVar && errorVar->concealment ) 
  {
    /* if there are segments to be concealed */
    if ( errorVar->nOfCorruptedSegments ) 
    { 
      /* Y */
      lastRow = (int) (picSizeY>>3);
      lastColumn = (int) (picSizeX>>3);
      concealBlocks( lastColumn, lastRow, 0, recfr, picSizeX, errorVar->yCondition );
      
      /* U (dimensions halved compared to Y) */
      lastRow = (int) (picSizeY>>4);
      lastColumn = (int) (picSizeX>>4);
      concealBlocks( lastColumn, lastRow, 1, recfr, picSizeX, errorVar->uCondition );
      
      /* V ( dimensions equal to U ) */
      concealBlocks( lastColumn, lastRow, 2, recfr, picSizeX, errorVar->vCondition );
    }
    return 1;
  }
  else
    return 0;
}

/*!
 ************************************************************************
 * \brief
 *      Conceals the MB at position (row, column) using pixels from predBlocks[]
 *      using pixMeanInterpolateBlock()
 * \param currFrame
 *      current frame
 * \param row
 *      y coordinate in blocks
 * \param column
 *      x coordinate in blocks
 * \param predBlocks[]   
 *      list of neighboring source blocks (numbering 0 to 7, 1 means: use the neighbor)
 * \param frameWidth
 *      width of frame in pixels
 * \param mbWidthInBlocks
 *      2 for Y, 1 for U/V components
 ************************************************************************
 */
void ercPixConcealIMB(byte *currFrame, int row, int column, int predBlocks[], int frameWidth, int mbWidthInBlocks) 
{
   byte *src[8]={NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};
   byte *currBlock = NULL;

   /* collect the reliable neighboring blocks */
   if (predBlocks[0])
      src[0] = currFrame + (row-mbWidthInBlocks)*frameWidth*8 + (column+mbWidthInBlocks)*8;
   if (predBlocks[1])
      src[1] = currFrame + (row-mbWidthInBlocks)*frameWidth*8 + (column-mbWidthInBlocks)*8;
   if (predBlocks[2])
      src[2] = currFrame + (row+mbWidthInBlocks)*frameWidth*8 + (column-mbWidthInBlocks)*8;
   if (predBlocks[3])
      src[3] = currFrame + (row+mbWidthInBlocks)*frameWidth*8 + (column+mbWidthInBlocks)*8;
   if (predBlocks[4])
      src[4] = currFrame + (row-mbWidthInBlocks)*frameWidth*8 + column*8;
   if (predBlocks[5])
      src[5] = currFrame + row*frameWidth*8 + (column-mbWidthInBlocks)*8;
   if (predBlocks[6])
      src[6] = currFrame + (row+mbWidthInBlocks)*frameWidth*8 + column*8;
   if (predBlocks[7])
      src[7] = currFrame + row*frameWidth*8 + (column+mbWidthInBlocks)*8;
   
   currBlock = currFrame + row*frameWidth*8 + column*8;
   pixMeanInterpolateBlock( src, currBlock, mbWidthInBlocks*8, frameWidth );

}

/*!
 ************************************************************************
 * \brief
 *      This function checks the neighbours of a Macroblock for usability in
 *      concealment. First the OK Macroblocks are marked, and if there is not 
 *      enough of them, then the CONCEALED ones as well.
 *      A "1" in the the output array means reliable, a "0" non reliable MB.
 *      The block order in "predBlocks":
 *              1 4 0
 *              5 x 7
 *              2 6 3   
 *      i.e., corners first.
 * \return
 *      Number of useable neighbour Macroblocks for concealment.
 * \param predBlocks[] 
 *      Array for indicating the valid neighbor blocks
 * \param currRow 
 *      Current block row in the frame
 * \param currColumn    
 *      Current block column in the frame
 * \param condition    
 *      The block condition (ok, lost) table
 * \param maxRow      
 *      Number of block rows in the frame
 * \param maxColumn   
 *      Number of block columns in the frame
 * \param step          
 *      Number of blocks belonging to a MB, when counting
 *      in vertical/horizontal direction. (Y:2 U,V:1)
 * \param fNoCornerNeigh 
 *      No corner neighbours are considered
 ************************************************************************
 */
int ercCollect8PredBlocks( int predBlocks[], int currRow, int currColumn, int *condition, 
                          int maxRow, int maxColumn, int step, byte fNoCornerNeigh )
{
  int srcCounter = 0, srcCountMin = (fNoCornerNeigh ? 2 : 4),
    threshold = ERC_BLOCK_CONCEALED;
  
  memset( predBlocks, 0, 8*sizeof(int) );
  
  /* collect the reliable neighboring blocks */
  do 
  {
    srcCounter = 0;
    /* Top */
    if (currRow > 0 && condition[ (currRow-1)*maxColumn + currColumn ] >= threshold ) 
    {                           //ERC_BLOCK_OK (3) or ERC_BLOCK_CONCEALED (2)
      predBlocks[4] = condition[ (currRow-1)*maxColumn + currColumn ];
      srcCounter++;
    }
    /* Bottom */
    if ( currRow < (maxRow-step) && condition[ (currRow+step)*maxColumn + currColumn ] >= threshold ) 
    {
      predBlocks[6] = condition[ (currRow+step)*maxColumn + currColumn ];
      srcCounter++;
    }
    
    if ( currColumn > 0 ) 
    {
      /* Left */
      if ( condition[ currRow*maxColumn + currColumn - 1 ] >= threshold ) 
      {
        predBlocks[5] = condition[ currRow*maxColumn + currColumn - 1 ];
        srcCounter++;
      }
      
      if ( !fNoCornerNeigh ) 
      {
        /* Top-Left */
        if ( currRow > 0 && condition[ (currRow-1)*maxColumn + currColumn - 1 ] >= threshold ) 
        {
          predBlocks[1] = condition[ (currRow-1)*maxColumn + currColumn - 1 ];
          srcCounter++;
        }
        /* Bottom-Left */
        if ( currRow < (maxRow-step) && condition[ (currRow+step)*maxColumn + currColumn - 1 ] >= threshold ) 
        {
          predBlocks[2] = condition[ (currRow+step)*maxColumn + currColumn - 1 ];
          srcCounter++;
        }
      }
    }
    
    if ( currColumn < (maxColumn-step) ) 
    {
      /* Right */
      if ( condition[ currRow*maxColumn+currColumn + step ] >= threshold ) 
      {
        predBlocks[7] = condition[ currRow*maxColumn+currColumn + step ];
        srcCounter++;
      }
      
      if ( !fNoCornerNeigh ) 
      {
        /* Top-Right */
        if ( currRow > 0 && condition[ (currRow-1)*maxColumn + currColumn + step ] >= threshold ) 
        {
          predBlocks[0] = condition[ (currRow-1)*maxColumn + currColumn + step ];
          srcCounter++;
        }
        /* Bottom-Right */
        if ( currRow < (maxRow-step) && condition[ (currRow+step)*maxColumn + currColumn + step ] >= threshold ) 
        {
          predBlocks[3] = condition[ (currRow+step)*maxColumn + currColumn + step ];
          srcCounter++;
        }
      }
    }
    /* prepare for the next round */
    threshold--;
    if (threshold < ERC_BLOCK_CONCEALED)
      break;
  } while ( srcCounter < srcCountMin);
  
  return srcCounter;
}

/*!
 ************************************************************************
 * \brief
 *      collects prediction blocks only from the current column
 * \return
 *      Number of useable neighbour Macroblocks for concealment.
 * \param predBlocks[] 
 *      Array for indicating the valid neighbor blocks
 * \param currRow 
 *      Current block row in the frame
 * \param currColumn    
 *      Current block column in the frame
 * \param condition    
 *      The block condition (ok, lost) table
 * \param maxRow      
 *      Number of block rows in the frame
 * \param maxColumn   
 *      Number of block columns in the frame
 * \param step          
 *      Number of blocks belonging to a MB, when counting
 *      in vertical/horizontal direction. (Y:2 U,V:1)
 ************************************************************************
 */
int ercCollectColumnBlocks( int predBlocks[], int currRow, int currColumn, int *condition, int maxRow, int maxColumn, int step )
{
  int srcCounter = 0, threshold = ERC_BLOCK_CORRUPTED;
  
  memset( predBlocks, 0, 8*sizeof(int) );
  
  /* in this case, row > 0 and row < 17 */
  if ( condition[ (currRow-1)*maxColumn + currColumn ] > threshold ) 
  {
    predBlocks[4] = 1;
    srcCounter++;
  }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
韩国女主播一区| 1区2区3区国产精品| 精品久久久久久久久久久久包黑料| 精品国产一区二区三区久久久蜜月 | 欧美日韩国产综合草草| 中文字幕不卡一区| 国产大陆a不卡| 久久亚洲一区二区三区四区| 国产亚洲一区二区三区四区 | 国产成人在线影院 | 国产亚洲欧美色| 婷婷成人激情在线网| 欧美亚洲高清一区二区三区不卡| 久久久久国产精品免费免费搜索| 1024成人网| 午夜影院久久久| 在线视频国内一区二区| 欧美精品日韩一区| 99久久精品国产观看| 欧美成人三级电影在线| 国产一区二三区| 99re66热这里只有精品3直播| 欧美r级电影在线观看| 天天色图综合网| 国产成人精品午夜视频免费| av资源网一区| 国内成人免费视频| 国产亚洲欧美激情| 在线观看不卡视频| 欧美人牲a欧美精品| 午夜精品福利一区二区蜜股av | 久久精品国产一区二区三区免费看 | 韩国女主播一区二区三区| 国产午夜精品一区二区三区四区| 日本一区二区三区久久久久久久久不| 久久久精品黄色| 成人免费在线视频观看| 久久精品国产99国产精品| 成+人+亚洲+综合天堂| 日韩一区二区影院| 久久伊99综合婷婷久久伊| 午夜精品福利在线| 一本色道久久综合亚洲aⅴ蜜桃| 成人免费在线视频| av一区二区久久| 国产三级欧美三级日产三级99| 欧美aaa在线| 91精品国产综合久久精品图片| 一区二区三区欧美亚洲| 精品午夜久久福利影院 | 丁香六月综合激情| 2020国产精品自拍| 91精品国产全国免费观看| 国产精品女人毛片| 亚洲欧洲日产国码二区| 日韩成人dvd| 欧美日韩精品免费观看视频| 国产精品国产三级国产aⅴ中文| 国产成人自拍在线| 久久久国产一区二区三区四区小说| 寂寞少妇一区二区三区| 欧美哺乳videos| 成人一二三区视频| 国产精品久久久久久福利一牛影视 | 一区二区三区日韩在线观看| 国产91精品在线观看| 在线播放日韩导航| 国产毛片一区二区| 中文字幕的久久| 91小视频免费观看| 肉丝袜脚交视频一区二区| 久久久亚洲欧洲日产国码αv| 午夜精品成人在线视频| 欧美手机在线视频| 久久99久久99精品免视看婷婷| 亚洲精品在线免费播放| 91精彩视频在线观看| 视频一区中文字幕国产| 久久婷婷综合激情| 成人免费观看视频| 亚洲福中文字幕伊人影院| 日韩视频在线你懂得| 国产精一品亚洲二区在线视频| 国产黄色91视频| 亚洲一区电影777| 97精品国产97久久久久久久久久久久| 怡红院av一区二区三区| 一区二区三区成人| 激情欧美日韩一区二区| 国产日韩精品一区二区三区在线| 国产精品一区二区x88av| 国产精品免费av| 91香蕉视频在线| 日韩免费看网站| av在线综合网| 日本不卡一区二区三区高清视频| 欧美精品一区二区三区蜜臀| 91免费在线视频观看| 美国欧美日韩国产在线播放| 国产精品久久久久aaaa樱花 | 这里是久久伊人| www.视频一区| 亚洲美女免费在线| 日韩精品在线看片z| 色诱亚洲精品久久久久久| 美女视频网站久久| 一区二区视频在线看| 欧美精品一区二区三区久久久| 狠狠色综合日日| 国产精品动漫网站| 精品第一国产综合精品aⅴ| www.日韩大片| 国产精品综合二区| 日韩精品电影在线观看| 亚洲三级在线看| 欧美一级日韩免费不卡| av影院午夜一区| 国产mv日韩mv欧美| 五月天久久比比资源色| 久久精品一区八戒影视| 欧美人xxxx| 91在线porny国产在线看| 精品一区二区在线播放| 亚洲欧美日韩电影| 久久久久久久久99精品| 欧美精品日韩综合在线| 欧洲精品一区二区| 成人免费黄色大片| 国产一区二区精品久久91| 六月丁香综合在线视频| 一区二区三区四区中文字幕| 亚洲欧美日韩一区二区| 国产精品久久久久久久久快鸭| 国产精品传媒入口麻豆| 欧美在线免费观看亚洲| 99re视频这里只有精品| 成人高清免费观看| 国产一区二区导航在线播放| 日本亚洲三级在线| 日韩成人一区二区| 免费欧美在线视频| 麻豆国产精品一区二区三区| 久久99热这里只有精品| 国产一区二区导航在线播放| 国产白丝精品91爽爽久久 | 日本成人中文字幕在线视频| 午夜精品久久久久久久久久久| 一区二区三区中文在线观看| 亚洲免费在线电影| 亚洲欧美区自拍先锋| 亚洲精品国久久99热| 国产精品国产三级国产普通话99 | 欧美日韩中文国产| 7777精品伊人久久久大香线蕉 | 久久er精品视频| 激情文学综合插| 成人精品国产免费网站| 极品少妇一区二区| 国产精品18久久久久久vr| 国产一区二区三区四区五区美女 | 日本道免费精品一区二区三区| 欧美在线免费播放| 日韩精品一区二| 国产精品夫妻自拍| 麻豆一区二区三| 91丨porny丨中文| 欧美精品日韩综合在线| 久久日一线二线三线suv| 国产精品久久久久久久久晋中 | 亚洲国产一区二区在线播放| 日韩精品一卡二卡三卡四卡无卡| 麻豆成人91精品二区三区| 亚洲成a人片综合在线| 青青草国产精品亚洲专区无| 国产成人夜色高潮福利影视| 91蝌蚪porny成人天涯| 欧美一区日韩一区| 国产精品你懂的在线| 日本在线不卡视频一二三区| 成人教育av在线| 欧美精品第1页| 国产精品不卡在线观看| 日本不卡高清视频| 色综合久久中文字幕| 精品国产露脸精彩对白| 一二三区精品视频| 国产成人av一区二区| 欧美日本在线观看| 中文字幕字幕中文在线中不卡视频| 久久疯狂做爰流白浆xx| 一本到三区不卡视频| 26uuu色噜噜精品一区二区| 亚洲综合视频在线| 天堂va蜜桃一区二区三区漫画版| 国产一区二区久久| 久久精品视频网| 国产精品系列在线观看| 久久久久久亚洲综合影院红桃 | 亚洲精品免费播放| 91麻豆高清视频|