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

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

?? erc_do_i.c

?? TML的參考源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*
***********************************************************************
* COPYRIGHT AND WARRANTY INFORMATION
*
* Copyright 2001, International Telecommunications Union, Geneva
*
* DISCLAIMER OF WARRANTY
*
* These software programs are available to the user without any
* license fee or royalty on an "as is" basis. The ITU disclaims
* any and all warranties, whether express, implied, or
* statutory, including any implied warranties of merchantability
* or of fitness for a particular purpose.  In no event shall the
* contributor or the ITU 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 ITU does not represent or warrant that the programs furnished
* hereunder are free of infringement of any third-party patents.
* Commercial implementations of ITU-T Recommendations, including
* shareware, may be subject to royalty fees to patent holders.
* Information regarding the ITU-T patent policy is available from
* the ITU Web site at http://www.itu.int.
*
* THIS IS NOT A GRANT OF PATENT RIGHTS - SEE THE ITU-T PATENT POLICY.
************************************************************************
*/

/*!
 *************************************************************************************
 * \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                   <wangy@cs.tut.fi>
 *
 *************************************************************************************
 */

#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          

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品色婷婷久久58| 久久不见久久见中文字幕免费| 亚洲福利视频导航| 韩国一区二区三区| 欧美日韩中文一区| 自拍av一区二区三区| 久久成人久久鬼色| 欧美色精品在线视频| 国产精品美女一区二区| 国产一区二区三区视频在线播放| 欧美视频在线观看一区二区| 欧美国产精品一区二区三区| 久久99蜜桃精品| 6080亚洲精品一区二区| 亚洲欧美成aⅴ人在线观看| 国产成人av福利| 精品日韩99亚洲| 免费在线观看成人| 欧美日韩精品一区二区三区蜜桃| 国产精品高清亚洲| 国产成人免费在线视频| 久久亚洲精品国产精品紫薇| 水蜜桃久久夜色精品一区的特点| 91免费版pro下载短视频| 中文字幕一区不卡| 不卡的电影网站| 中文字幕一区二区三区四区不卡 | 4438x亚洲最大成人网| 亚洲欧美日韩在线播放| 成人一区二区三区视频在线观看| 精品剧情v国产在线观看在线| 日本不卡高清视频| 日韩限制级电影在线观看| 五月综合激情网| 欧美精品久久天天躁| 五月激情丁香一区二区三区| 欧美视频精品在线观看| 国产乱人伦精品一区二区在线观看| 欧美精品精品一区| 日韩高清一区在线| 日韩精品一区二区三区在线 | 亚洲欧美aⅴ...| 色综合久久久久| 亚洲另类中文字| 欧美偷拍一区二区| 免费日韩伦理电影| 久久综合色婷婷| 国产成a人亚洲| 中文字幕亚洲成人| 在线免费视频一区二区| 日韩精品高清不卡| 欧美zozo另类异族| 粉嫩一区二区三区在线看| 国产精品三级av| 91成人国产精品| 麻豆精品视频在线| 国产亚洲精品精华液| 色婷婷久久综合| 日韩 欧美一区二区三区| 国产三区在线成人av| 91影院在线观看| 日韩国产精品久久久久久亚洲| 日韩欧美国产综合| 91毛片在线观看| 青青草91视频| 成人免费在线视频观看| 欧美日韩国产天堂| 国产成人午夜视频| 亚洲午夜视频在线观看| 2019国产精品| 欧美三级午夜理伦三级中视频| 日本不卡在线视频| 中文字幕高清一区| 91精品福利在线一区二区三区| 国产激情一区二区三区四区 | 欧美aaaaaa午夜精品| 国产精品久久国产精麻豆99网站| 欧美日本乱大交xxxxx| 国产精品99久久久久久宅男| 亚洲一区二区在线免费观看视频| 26uuu欧美| 欧美性猛交一区二区三区精品| 狠狠色丁香久久婷婷综| 亚洲一区二区三区视频在线 | 亚洲国产日韩a在线播放| 欧美视频在线不卡| 国产一区二区三区四| 亚洲一区二区精品视频| 亚洲国产激情av| 日韩欧美电影在线| 欧美丝袜丝交足nylons| 99久久久免费精品国产一区二区| 久久精品国产精品亚洲红杏 | 欧美在线免费观看视频| 国产河南妇女毛片精品久久久| 亚洲高清免费观看| 亚洲精品乱码久久久久久久久| 久久精品亚洲乱码伦伦中文| 亚洲精品一区二区三区精华液| 欧美日韩久久不卡| 色综合久久中文字幕| 成人av午夜影院| 国产伦精品一区二区三区免费| 欧美成人三级电影在线| 久久99精品久久久久久动态图| 一区二区三区高清在线| 色综合激情久久| 成年人网站91| 国产盗摄一区二区| 国产一区二区视频在线播放| 美国三级日本三级久久99| 五月婷婷综合在线| 亚洲综合色自拍一区| ...av二区三区久久精品| 国产精品污污网站在线观看| 久久久久久久久久久久久夜| 精品国产一区二区三区四区四| 日韩一区二区三免费高清| 3d成人动漫网站| 91精品久久久久久蜜臀| 欧美精品第1页| 欧美一二三区精品| 69堂精品视频| 26uuu另类欧美| xfplay精品久久| 国产亚洲欧洲一区高清在线观看| 精品国精品国产尤物美女| 久久免费看少妇高潮| 亚洲免费观看高清| 一区二区三区国产精华| 精品电影一区二区| 欧美性高清videossexo| 亚洲精品你懂的| 亚洲大型综合色站| 日韩国产高清影视| 蜜臀av性久久久久av蜜臀妖精| 精品亚洲成av人在线观看| 国产综合色在线视频区| 国产成人免费av在线| 97精品久久久久中文字幕| 在线亚洲免费视频| 6080yy午夜一二三区久久| 精品第一国产综合精品aⅴ| 国产欧美精品在线观看| 国产精品水嫩水嫩| 中文字幕一区二区不卡| 亚洲国产cao| 国产永久精品大片wwwapp| jlzzjlzz欧美大全| 欧美日韩在线三级| 欧美精品一区在线观看| 日韩理论在线观看| 日韩高清电影一区| 国产目拍亚洲精品99久久精品| 中文字幕在线一区| 一区二区三区产品免费精品久久75| 岛国av在线一区| 国产在线播放一区| 日本道精品一区二区三区| 欧美一区二区三级| 日韩美女精品在线| 狠狠色丁香久久婷婷综合_中| 91免费看片在线观看| 日韩亚洲电影在线| 亚洲综合偷拍欧美一区色| 精品在线观看视频| 欧美日韩一区三区四区| 国产午夜精品一区二区三区嫩草| 亚洲国产欧美在线| 成人综合激情网| 精品国产欧美一区二区| 亚洲美女视频一区| 国产福利不卡视频| 欧美极品xxx| 久久精品国产一区二区三| 91麻豆成人久久精品二区三区| 2023国产精华国产精品| 午夜电影网一区| 91网站在线播放| 欧美激情一区二区三区| 69成人精品免费视频| 一个色妞综合视频在线观看| 欧美中文字幕一区| 久久婷婷久久一区二区三区| 亚洲卡通欧美制服中文| 久久99国产精品免费| 色女孩综合影院| 国产精品久久久久久久裸模| 精品一区二区免费视频| 制服丝袜中文字幕一区| 亚洲午夜久久久| 在线视频国产一区| 亚洲欧美综合在线精品| 丁香天五香天堂综合| 精品久久久久久久人人人人传媒| 丝袜美腿亚洲色图| 欧美视频在线一区二区三区| 亚洲自拍偷拍av| 欧美视频第二页| 午夜激情综合网|