Changeset 56 in 3DVCSoftware for trunk/source/Lib/TLibCommon/TComPic.cpp


Ignore:
Timestamp:
11 May 2012, 21:20:17 (12 years ago)
Author:
hschwarz
Message:

updated trunk (move to HM6.1)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibCommon/TComPic.cpp

    r21 r56  
    22 * License, included below. This software may be subject to other third party
    33 * and contributor rights, including patent rights, and no such rights are
    4  * granted under this license.
     4 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2011, ISO/IEC
     6 * Copyright (c) 2010-2012, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    1515 *    this list of conditions and the following disclaimer in the documentation
    1616 *    and/or other materials provided with the distribution.
    17  *  * Neither the name of the ISO/IEC nor the names of its contributors may
     17 *  * Neither the name of the ITU/ISO/IEC nor the names of its contributors may
    1818 *    be used to endorse or promote products derived from this software without
    1919 *    specific prior written permission.
     
    3232 */
    3333
    34 
    35 
    3634/** \file     TComPic.cpp
    3735    \brief    picture class
     
    4139#include "SEI.h"
    4240
     41//! \ingroup TLibCommon
     42//! \{
     43
    4344// ====================================================================================================================
    4445// Constructor / destructor / create / destroy
     
    4748TComPic::TComPic()
    4849{
     50  m_uiTLayer          = 0;
     51
    4952  m_apcPicSym         = NULL;
    5053  m_apcPicYuv[0]      = NULL;
     
    6164  m_pcPicYuvPred      = NULL;
    6265  m_pcPicYuvResi      = NULL;
     66  m_bIsLongTerm       = false;
     67  m_bReconstructed    = false;
     68  m_usedForTMVP       = true;
     69  m_bNeededForOutput  = false;
     70  m_pSliceSUMap       = NULL;
     71  m_uiCurrSliceIdx    = 0;
    6372#if HHI_INTERVIEW_SKIP
    6473  m_pcUsedPelsMap     = NULL;
    6574#endif
    66  
    67 #if PARALLEL_MERGED_DEBLK
    68   m_pcPicYuvDeblkBuf     = NULL;
    69 #endif
    70 
    71   m_bReconstructed    = false;
    72 
    73   m_aiNumRefIdx[0]    = 0;
    74   m_aiNumRefIdx[1]    = 0;
    7575#if SONY_COLPIC_AVAILABILITY
    7676  m_iViewOrderIdx     = 0;
    7777#endif
    78   m_iViewIdx          = 0;
    7978  m_aaiCodedScale     = 0;
    8079  m_aaiCodedOffset    = 0;
     
    8584}
    8685
    87 Void TComPic::create( Int iWidth, Int iHeight, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth )
     86Void TComPic::create( Int iWidth, Int iHeight, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, Bool bIsVirtual )
    8887{
    8988  m_apcPicSym     = new TComPicSym;  m_apcPicSym   ->create( iWidth, iHeight, uiMaxWidth, uiMaxHeight, uiMaxDepth );
     89  if (!bIsVirtual)
     90  {
     91    m_apcPicYuv[0]  = new TComPicYuv;  m_apcPicYuv[0]->create( iWidth, iHeight, uiMaxWidth, uiMaxHeight, uiMaxDepth );
     92  }
    9093  m_apcPicYuv[1]  = new TComPicYuv;  m_apcPicYuv[1]->create( iWidth, iHeight, uiMaxWidth, uiMaxHeight, uiMaxDepth );
    91 
     94 
    9295  /* there are no SEI messages associated with this picture initially */
    9396  m_SEIs = NULL;
    94 
     97  m_bUsedByCurr = false;
    9598  return;
    9699}
     
    118121    m_apcPicYuv[1]  = NULL;
    119122  }
    120  
     123#if HHI_INTERVIEW_SKIP
     124  if( m_pcUsedPelsMap )
     125  {
     126    m_pcUsedPelsMap->destroy();
     127    delete m_pcUsedPelsMap;
     128    m_pcUsedPelsMap = NULL;
     129  }
     130#endif
    121131#if DEPTH_MAP_GENERATION
    122132  if( m_pcPredDepthMap )
     
    127137  }
    128138#endif
    129 
    130139#if HHI_INTER_VIEW_MOTION_PRED
    131140  if( m_pcOrgDepthMap )
     
    136145  }
    137146#endif
    138 
    139147#if HHI_INTER_VIEW_RESIDUAL_PRED
    140148  if( m_pcResidual )
     
    145153  }
    146154#endif
    147 
    148 #if HHI_INTERVIEW_SKIP
    149   if( m_pcUsedPelsMap )
    150   {
    151     m_pcUsedPelsMap->destroy();
    152     delete m_pcUsedPelsMap;
    153     m_pcUsedPelsMap = NULL;
    154   }
    155 #endif
    156 
    157 #if PARALLEL_MERGED_DEBLK
    158   if (m_pcPicYuvDeblkBuf)
    159   {
    160     m_pcPicYuvDeblkBuf->destroy();
    161     delete m_pcPicYuvDeblkBuf;
    162     m_pcPicYuvDeblkBuf  = NULL;
    163   }
    164 #endif
    165 
    166155  delete m_SEIs;
    167156}
    168157
    169 #if AMVP_BUFFERCOMPRESS
    170158Void TComPic::compressMotion()
    171159{
     
    177165  }
    178166}
    179 #endif
    180 
    181 
    182 
    183 Void
    184 TComPic::addOriginalBuffer()
    185 {
    186   AOT( m_apcPicYuv[0] );
    187   AOF( m_apcPicYuv[1] );
    188   Int   iWidth        = m_apcPicYuv[1]->getWidth      ();
    189   Int   iHeight       = m_apcPicYuv[1]->getHeight     ();
    190   UInt  uiMaxCuWidth  = m_apcPicYuv[1]->getMaxCuWidth ();
    191   UInt  uiMaxCuHeight = m_apcPicYuv[1]->getMaxCuHeight();
    192   UInt  uiMaxCuDepth  = m_apcPicYuv[1]->getMaxCuDepth ();
    193   m_apcPicYuv[0]      = new TComPicYuv;
    194   m_apcPicYuv[0]      ->create( iWidth, iHeight, uiMaxCuWidth, uiMaxCuHeight, uiMaxCuDepth );
    195 }
    196 
    197 #if PARALLEL_MERGED_DEBLK
    198 Void
    199 TComPic::addDeblockBuffer()
    200 {
    201   AOT( m_pcPicYuvDeblkBuf );
    202   AOF( m_apcPicYuv[1]     );
    203   Int   iWidth        = m_apcPicYuv[1]->getWidth      ();
    204   Int   iHeight       = m_apcPicYuv[1]->getHeight     ();
    205   UInt  uiMaxCuWidth  = m_apcPicYuv[1]->getMaxCuWidth ();
    206   UInt  uiMaxCuHeight = m_apcPicYuv[1]->getMaxCuHeight();
    207   UInt  uiMaxCuDepth  = m_apcPicYuv[1]->getMaxCuDepth ();
    208   m_pcPicYuvDeblkBuf  = new TComPicYuv;
    209   m_pcPicYuvDeblkBuf  ->create( iWidth, iHeight, uiMaxCuWidth, uiMaxCuHeight, uiMaxCuDepth );
    210 }
    211 #endif
    212167
    213168#if DEPTH_MAP_GENERATION
     
    259214#endif
    260215
     216#if DEPTH_MAP_GENERATION
     217Void
     218TComPic::removePrdDepthMapBuffer()
     219{
     220  if( m_pcPredDepthMap )
     221  {
     222    m_pcPredDepthMap->destroy();
     223    delete m_pcPredDepthMap;
     224    m_pcPredDepthMap = NULL;
     225  }
     226}
     227#endif
     228
     229#if HHI_INTER_VIEW_MOTION_PRED
     230Void
     231TComPic::removeOrgDepthMapBuffer()
     232{
     233  if( m_pcOrgDepthMap )
     234  {
     235    m_pcOrgDepthMap->destroy();
     236    delete m_pcOrgDepthMap;
     237    m_pcOrgDepthMap = NULL;
     238  }
     239}
     240#endif
     241
     242#if HHI_INTER_VIEW_RESIDUAL_PRED
     243Void
     244TComPic::removeResidualBuffer()
     245{
     246  if( m_pcResidual )
     247  {
     248    m_pcResidual->destroy();
     249    delete m_pcResidual;
     250    m_pcResidual = NULL;
     251  }
     252}
     253#endif
     254
     255/** Create non-deblocked filter information
     256 * \param pSliceStartAddress array for storing slice start addresses
     257 * \param numSlices number of slices in picture
     258 * \param sliceGranularityDepth slice granularity
     259 * \param bNDBFilterCrossSliceBoundary cross-slice-boundary in-loop filtering; true for "cross".
     260 * \param numTiles number of tiles in picture
     261 * \param bNDBFilterCrossTileBoundary cross-tile-boundary in-loop filtering; true for "cross".
     262 */
     263Void TComPic::createNonDBFilterInfo(UInt* pSliceStartAddress, Int numSlices, Int sliceGranularityDepth
     264                                    ,Bool bNDBFilterCrossSliceBoundary
     265                                    ,Int numTiles
     266                                    ,Bool bNDBFilterCrossTileBoundary)
     267{
     268  UInt maxNumSUInLCU = getNumPartInCU();
     269  UInt numLCUInPic   = getNumCUsInFrame();
     270  UInt picWidth      = getSlice(0)->getSPS()->getPicWidthInLumaSamples();
     271  UInt picHeight     = getSlice(0)->getSPS()->getPicHeightInLumaSamples();
     272  Int  numLCUsInPicWidth = getFrameWidthInCU();
     273  Int  numLCUsInPicHeight= getFrameHeightInCU();
     274  UInt maxNumSUInLCUWidth = getNumPartInWidth();
     275  UInt maxNumSUInLCUHeight= getNumPartInHeight();
     276
     277  m_bIndependentSliceBoundaryForNDBFilter = (bNDBFilterCrossSliceBoundary)?(false):((numSlices > 1)?(true):(false)) ;
     278  m_sliceGranularityForNDBFilter = sliceGranularityDepth;
     279  m_bIndependentTileBoundaryForNDBFilter  = (bNDBFilterCrossTileBoundary)?(false) :((numTiles > 1)?(true):(false));
     280
     281  m_pbValidSlice = new Bool[numSlices];
     282  for(Int s=0; s< numSlices; s++)
     283  {
     284    m_pbValidSlice[s] = true;
     285  }
     286#if !LCU_SYNTAX_ALF
     287  if( pSliceStartAddress == NULL || (numSlices == 1 && numTiles == 1) )
     288  {
     289    return;
     290  }
     291#endif
     292  m_pSliceSUMap = new Int[maxNumSUInLCU * numLCUInPic];
     293
     294  //initialization
     295  for(UInt i=0; i< (maxNumSUInLCU * numLCUInPic); i++ )
     296  {
     297    m_pSliceSUMap[i] = -1;
     298  }
     299  for( UInt CUAddr = 0; CUAddr < numLCUInPic ; CUAddr++ )
     300  {
     301    TComDataCU* pcCU = getCU( CUAddr );
     302    pcCU->setSliceSUMap(m_pSliceSUMap + (CUAddr* maxNumSUInLCU));
     303    pcCU->getNDBFilterBlocks()->clear();
     304  }
     305  m_vSliceCUDataLink.clear();
     306
     307  m_vSliceCUDataLink.resize(numSlices);
     308
     309  UInt startAddr, endAddr, firstCUInStartLCU, startLCU, endLCU, lastCUInEndLCU, uiAddr;
     310  UInt LPelX, TPelY, LCUX, LCUY;
     311  UInt currSU;
     312  UInt startSU, endSU;
     313
     314  for(Int s=0; s< numSlices; s++)
     315  {
     316    //1st step: decide the real start address
     317    startAddr = pSliceStartAddress[s];
     318    endAddr   = pSliceStartAddress[s+1] -1;
     319
     320    startLCU            = startAddr / maxNumSUInLCU;
     321    firstCUInStartLCU   = startAddr % maxNumSUInLCU;
     322
     323    endLCU              = endAddr   / maxNumSUInLCU;
     324    lastCUInEndLCU      = endAddr   % maxNumSUInLCU;   
     325
     326    uiAddr = m_apcPicSym->getCUOrderMap(startLCU);
     327
     328    LCUX      = getCU(uiAddr)->getCUPelX();
     329    LCUY      = getCU(uiAddr)->getCUPelY();
     330    LPelX     = LCUX + g_auiRasterToPelX[ g_auiZscanToRaster[firstCUInStartLCU] ];
     331    TPelY     = LCUY + g_auiRasterToPelY[ g_auiZscanToRaster[firstCUInStartLCU] ];
     332    currSU    = firstCUInStartLCU;
     333
     334    Bool bMoveToNextLCU = false;
     335    Bool bSliceInOneLCU = (startLCU == endLCU);
     336
     337    while(!( LPelX < picWidth ) || !( TPelY < picHeight ))
     338    {
     339      currSU ++;
     340
     341      if(bSliceInOneLCU)
     342      {
     343        if(currSU > lastCUInEndLCU)
     344        {
     345          m_pbValidSlice[s] = false;
     346          break;
     347        }
     348      }
     349
     350      if(currSU >= maxNumSUInLCU )
     351      {
     352        bMoveToNextLCU = true;
     353        break;
     354      }
     355
     356      LPelX = LCUX + g_auiRasterToPelX[ g_auiZscanToRaster[currSU] ];
     357      TPelY = LCUY + g_auiRasterToPelY[ g_auiZscanToRaster[currSU] ];
     358
     359    }
     360
     361
     362    if(!m_pbValidSlice[s])
     363    {
     364      continue;
     365    }
     366
     367    if(currSU != firstCUInStartLCU)
     368    {
     369      if(!bMoveToNextLCU)
     370      {
     371        firstCUInStartLCU = currSU;
     372      }
     373      else
     374      {
     375        startLCU++;
     376        firstCUInStartLCU = 0;
     377        assert( startLCU < getNumCUsInFrame());
     378      }
     379      assert(startLCU*maxNumSUInLCU + firstCUInStartLCU < endAddr);
     380    }
     381
     382
     383    //2nd step: assign NonDBFilterInfo to each processing block
     384    for(UInt i= startLCU; i <= endLCU; i++)
     385    {
     386      startSU = (i == startLCU)?(firstCUInStartLCU):(0);
     387      endSU   = (i == endLCU  )?(lastCUInEndLCU   ):(maxNumSUInLCU -1);
     388
     389      uiAddr = m_apcPicSym->getCUOrderMap(i);
     390      Int iTileID= m_apcPicSym->getTileIdxMap(uiAddr);
     391
     392      TComDataCU* pcCU = getCU(uiAddr);
     393      m_vSliceCUDataLink[s].push_back(pcCU);
     394
     395      createNonDBFilterInfoLCU(iTileID, s, pcCU, startSU, endSU, m_sliceGranularityForNDBFilter, picWidth, picHeight);
     396    }
     397  }
     398
     399  //step 3: border availability
     400  for(Int s=0; s< numSlices; s++)
     401  {
     402    if(!m_pbValidSlice[s])
     403    {
     404      continue;
     405    }
     406
     407    for(Int i=0; i< m_vSliceCUDataLink[s].size(); i++)
     408    {
     409      TComDataCU* pcCU = m_vSliceCUDataLink[s][i];
     410      uiAddr = pcCU->getAddr();
     411
     412      if(pcCU->getPic()==0)
     413      {
     414        continue;
     415      }
     416      Int iTileID= m_apcPicSym->getTileIdxMap(uiAddr);
     417      Bool bTopTileBoundary = false, bDownTileBoundary= false, bLeftTileBoundary= false, bRightTileBoundary= false;
     418
     419      if(m_bIndependentTileBoundaryForNDBFilter)
     420      {
     421        //left
     422        if( uiAddr % numLCUsInPicWidth != 0)
     423        {
     424          bLeftTileBoundary = ( m_apcPicSym->getTileIdxMap(uiAddr -1) != iTileID )?true:false;
     425        }
     426        //right
     427        if( (uiAddr % numLCUsInPicWidth) != (numLCUsInPicWidth -1) )
     428        {
     429          bRightTileBoundary = ( m_apcPicSym->getTileIdxMap(uiAddr +1) != iTileID)?true:false;
     430        }
     431        //top
     432        if( uiAddr >= numLCUsInPicWidth)
     433        {
     434          bTopTileBoundary = (m_apcPicSym->getTileIdxMap(uiAddr - numLCUsInPicWidth) !=  iTileID )?true:false;
     435        }
     436        //down
     437        if( uiAddr + numLCUsInPicWidth < numLCUInPic )
     438        {
     439          bDownTileBoundary = (m_apcPicSym->getTileIdxMap(uiAddr + numLCUsInPicWidth) != iTileID)?true:false;
     440        }
     441
     442      }
     443
     444      pcCU->setNDBFilterBlockBorderAvailability(numLCUsInPicWidth, numLCUsInPicHeight, maxNumSUInLCUWidth, maxNumSUInLCUHeight,picWidth, picHeight
     445        ,m_bIndependentSliceBoundaryForNDBFilter
     446        ,bTopTileBoundary, bDownTileBoundary, bLeftTileBoundary, bRightTileBoundary
     447        ,m_bIndependentTileBoundaryForNDBFilter);
     448
     449    }
     450
     451  }
     452
     453  if( m_bIndependentSliceBoundaryForNDBFilter || m_bIndependentTileBoundaryForNDBFilter)
     454  {
     455    m_pNDBFilterYuvTmp = new TComPicYuv();
     456    m_pNDBFilterYuvTmp->create(picWidth, picHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);
     457  }
     458}
     459
    261460#if HHI_INTERVIEW_SKIP
    262 Void
    263 TComPic::addUsedPelsMapBuffer()
     461Void TComPic::addUsedPelsMapBuffer()
    264462{
    265463  AOT( m_pcUsedPelsMap );
     
    267465  Int   iWidth        = m_apcPicYuv[1]->getWidth      ();
    268466  Int   iHeight       = m_apcPicYuv[1]->getHeight     ();
    269   UInt  uiMaxCuWidth  = m_apcPicYuv[1]->getMaxCuWidth ();
    270   UInt  uiMaxCuHeight = m_apcPicYuv[1]->getMaxCuHeight();
    271   UInt  uiMaxCuDepth  = m_apcPicYuv[1]->getMaxCuDepth ();
     467  UInt  uiMaxCuWidth  = m_apcPicSym->getMaxCUWidth();
     468  UInt  uiMaxCuHeight = m_apcPicSym->getMaxCUHeight();
     469  UInt  uiMaxCuDepth  = m_apcPicSym->getMaxCUDepth ();
    272470  m_pcUsedPelsMap     = new TComPicYuv;
    273471  m_pcUsedPelsMap     ->create( iWidth, iHeight, uiMaxCuWidth, uiMaxCuHeight, uiMaxCuDepth );
    274 }
    275 #endif
    276 
    277 Void
    278 TComPic::removeOriginalBuffer()
    279 {
    280   if( m_apcPicYuv[0] )
    281   {
    282     m_apcPicYuv[0]->destroy();
    283     delete m_apcPicYuv[0];
    284     m_apcPicYuv[0]  = NULL;
    285   }
    286 }
    287 
    288 #if PARALLEL_MERGED_DEBLK
    289 Void
    290 TComPic::removeDeblockBuffer()
    291 {
    292   if( m_pcPicYuvDeblkBuf )
    293   {
    294     m_pcPicYuvDeblkBuf->destroy();
    295     delete m_pcPicYuvDeblkBuf;
    296     m_pcPicYuvDeblkBuf  = NULL;
    297   }
    298 }
    299 #endif
    300 
    301 #if DEPTH_MAP_GENERATION
    302 Void
    303 TComPic::removePrdDepthMapBuffer()
    304 {
    305   if( m_pcPredDepthMap )
    306   {
    307     m_pcPredDepthMap->destroy();
    308     delete m_pcPredDepthMap;
    309     m_pcPredDepthMap = NULL;
    310   }
    311 }
    312 #endif
    313 
    314 #if HHI_INTER_VIEW_MOTION_PRED
    315 Void
    316 TComPic::removeOrgDepthMapBuffer()
    317 {
    318   if( m_pcOrgDepthMap )
    319   {
    320     m_pcOrgDepthMap->destroy();
    321     delete m_pcOrgDepthMap;
    322     m_pcOrgDepthMap = NULL;
    323   }
    324 }
    325 #endif
    326 
    327 #if HHI_INTER_VIEW_RESIDUAL_PRED
    328 Void
    329 TComPic::removeResidualBuffer()
    330 {
    331   if( m_pcResidual )
    332   {
    333     m_pcResidual->destroy();
    334     delete m_pcResidual;
    335     m_pcResidual = NULL;
    336   }
    337 }
    338 #endif
    339 
    340 #if HHI_INTERVIEW_SKIP
     472
     473}
    341474Void
    342475TComPic::removeUsedPelsMapBuffer()
     
    351484#endif
    352485
     486/** Create non-deblocked filter information for LCU
     487 * \param tileID tile index
     488 * \param sliceID slice index
     489 * \param pcCU CU data pointer
     490 * \param startSU start SU index in LCU
     491 * \param endSU end SU index in LCU
     492 * \param sliceGranularyDepth slice granularity
     493 * \param picWidth picture width
     494 * \param picHeight picture height
     495 */
     496Void TComPic::createNonDBFilterInfoLCU(Int tileID, Int sliceID, TComDataCU* pcCU, UInt startSU, UInt endSU, Int sliceGranularyDepth, UInt picWidth, UInt picHeight)
     497{
     498  UInt LCUX          = pcCU->getCUPelX();
     499  UInt LCUY          = pcCU->getCUPelY();
     500  Int* pCUSliceMap    = pcCU->getSliceSUMap();
     501  UInt maxNumSUInLCU = getNumPartInCU();
     502  UInt maxNumSUInSGU = maxNumSUInLCU >> (sliceGranularyDepth << 1);
     503  UInt maxNumSUInLCUWidth = getNumPartInWidth();
     504  UInt LPelX, TPelY;
     505  UInt currSU;
     506
     507
     508  //get the number of valid NBFilterBLock
     509  currSU   = startSU;
     510  while(currSU <= endSU)
     511  {
     512    LPelX = LCUX + g_auiRasterToPelX[ g_auiZscanToRaster[currSU] ];
     513    TPelY = LCUY + g_auiRasterToPelY[ g_auiZscanToRaster[currSU] ];
     514
     515    while(!( LPelX < picWidth ) || !( TPelY < picHeight ))
     516    {
     517      currSU += maxNumSUInSGU;
     518      if(currSU >= maxNumSUInLCU || currSU > endSU)
     519      {
     520        break;
     521      }
     522      LPelX = LCUX + g_auiRasterToPelX[ g_auiZscanToRaster[currSU] ];
     523      TPelY = LCUY + g_auiRasterToPelY[ g_auiZscanToRaster[currSU] ];
     524    }
     525
     526    if(currSU >= maxNumSUInLCU || currSU > endSU)
     527    {
     528      break;
     529    }
     530
     531    NDBFBlockInfo NDBFBlock;
     532
     533    NDBFBlock.tileID  = tileID;
     534    NDBFBlock.sliceID = sliceID;
     535    NDBFBlock.posY    = TPelY;
     536    NDBFBlock.posX    = LPelX;
     537    NDBFBlock.startSU = currSU;
     538
     539    UInt uiLastValidSU  = currSU;
     540    UInt uiIdx, uiLPelX_su, uiTPelY_su;
     541    for(uiIdx = currSU; uiIdx < currSU + maxNumSUInSGU; uiIdx++)
     542    {
     543      if(uiIdx > endSU)
     544      {
     545        break;       
     546      }
     547      uiLPelX_su   = LCUX + g_auiRasterToPelX[ g_auiZscanToRaster[uiIdx] ];
     548      uiTPelY_su   = LCUY + g_auiRasterToPelY[ g_auiZscanToRaster[uiIdx] ];
     549      if( !(uiLPelX_su < picWidth ) || !( uiTPelY_su < picHeight ))
     550      {
     551        continue;
     552      }
     553      pCUSliceMap[uiIdx] = sliceID;
     554      uiLastValidSU = uiIdx;
     555    }
     556    NDBFBlock.endSU = uiLastValidSU;
     557
     558    UInt rTLSU = g_auiZscanToRaster[ NDBFBlock.startSU ];
     559    UInt rBRSU = g_auiZscanToRaster[ NDBFBlock.endSU   ];
     560    NDBFBlock.widthSU  = (rBRSU % maxNumSUInLCUWidth) - (rTLSU % maxNumSUInLCUWidth)+ 1;
     561    NDBFBlock.heightSU = (UInt)(rBRSU / maxNumSUInLCUWidth) - (UInt)(rTLSU / maxNumSUInLCUWidth)+ 1;
     562    NDBFBlock.width    = NDBFBlock.widthSU  * getMinCUWidth();
     563    NDBFBlock.height   = NDBFBlock.heightSU * getMinCUHeight();
     564
     565    pcCU->getNDBFilterBlocks()->push_back(NDBFBlock);
     566
     567    currSU += maxNumSUInSGU;
     568  }
     569
     570}
     571
     572/** destroy non-deblocked filter information for LCU
     573 */
     574Void TComPic::destroyNonDBFilterInfo()
     575{
     576  if(m_pbValidSlice != NULL)
     577  {
     578    delete[] m_pbValidSlice;
     579    m_pbValidSlice = NULL;
     580  }
     581
     582  if(m_pSliceSUMap != NULL)
     583  {
     584    delete[] m_pSliceSUMap;
     585    m_pSliceSUMap = NULL;
     586  }
     587  for( UInt CUAddr = 0; CUAddr < getNumCUsInFrame() ; CUAddr++ )
     588  {
     589    TComDataCU* pcCU = getCU( CUAddr );
     590    pcCU->getNDBFilterBlocks()->clear();
     591  }
     592
     593  if( m_bIndependentSliceBoundaryForNDBFilter || m_bIndependentTileBoundaryForNDBFilter)
     594  {
     595    m_pNDBFilterYuvTmp->destroy();
     596    delete m_pNDBFilterYuvTmp;
     597    m_pNDBFilterYuvTmp = NULL;
     598  }
     599
     600}
     601
     602
     603//! \}
Note: See TracChangeset for help on using the changeset viewer.