Changeset 56 in SHVCSoftware for branches/HM-10.0-dev-SHM/source/Lib


Ignore:
Timestamp:
4 Mar 2013, 23:18:12 (12 years ago)
Author:
seregin
Message:

Intra-BL porting

Location:
branches/HM-10.0-dev-SHM/source/Lib/TLibCommon
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TComDataCU.cpp

    r54 r56  
    27122712  pcCULeftBottom->isDiffMER(xP-1, yP+nPSH, xP, yP) &&
    27132713#if SVC_MVP
    2714   ( !pcColCU || pcColCU->isIntra( uiAbsPartAddrBase ) || !pcCULeftBottom->hasEqualMotion( uiLeftBottomPartIdx, puhInterDirNeighbours[0], &pcMvFieldNeighbours[0]))
     2714  ( !pcColCU || pcColCU->isIntra( uiAbsPartAddrBase ) || !pcCULeftBottom->hasEqualMotion( uiLeftBottomPartIdx, puhInterDirNeighbours[0], &pcMvFieldNeighbours[0])) &&
    27152715#endif
    27162716  !pcCULeftBottom->isIntra( uiLeftBottomPartIdx ) ;
     
    27562756    pcCUAboveLeft->isDiffMER(xP-1, yP-1, xP, yP) &&
    27572757#if SVC_MVP
    2758     ( !pcColCU || pcColCU->isIntra( uiAbsPartAddrBase ) || !pcCUAboveLeft->hasEqualMotion( uiAboveLeftPartIdx, puhInterDirNeighbours[0], &pcMvFieldNeighbours[0] ))
     2758    ( !pcColCU || pcColCU->isIntra( uiAbsPartAddrBase ) || !pcCUAboveLeft->hasEqualMotion( uiAboveLeftPartIdx, puhInterDirNeighbours[0], &pcMvFieldNeighbours[0] )) &&
    27592759#endif
    27602760    !pcCUAboveLeft->isIntra( uiAboveLeftPartIdx );
  • branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TComUpsampleFilter.cpp

    r54 r56  
    171171  Int tempBufSizeRight = 0, tempBufSizeBottom = 0;
    172172 
    173   if ( pcBasePic->getPicCropRightOffset() )
    174   {
    175     tempBufSizeRight = pcBasePic->getPicCropRightOffset() * pcBasePic->getHeight();
    176   }
    177  
    178   if( pcBasePic->getPicCropBottomOffset() )
    179   {
    180     tempBufSizeBottom = pcBasePic->getPicCropBottomOffset() * pcBasePic->getWidth ();
     173  if( confBL.getWindowRightOffset())
     174  {
     175    tempBufSizeRight = confBL.getWindowRightOffset() * pcBasePic->getHeight();
     176  }
     177 
     178  if( confBL.getWindowBottomOffset() )
     179  {
     180    tempBufSizeBottom = confBL.getWindowBottomOffset() * pcBasePic->getWidth ();
    181181  }
    182182 
     
    241241    for( i = 0; i < pcBasePic->getHeight(); i++ )
    242242    {
    243       memcpy(piDstY, piSrcY, sizeof(Pel) * pcBasePic->getPicCropRightOffset());
     243      memcpy(piDstY, piSrcY, sizeof(Pel) * confBL.getWindowRightOffset());
    244244      piSrcY += iBStride;
    245       piDstY += pcBasePic->getPicCropRightOffset();
     245      piDstY += confBL.getWindowRightOffset();
    246246    }
    247247   
    248     if(pcBasePic->getPicCropRightOffset()>>1)
     248    if(confBL.getWindowRightOffset()>>1)
    249249    {
    250250      Int iBStrideChroma = (iBStride>>1);
    251251      piSrcU = piSrcBufU + (iBWidth>>1);
    252       piDstU = tempBufRight + pcBasePic->getPicCropRightOffset() * pcBasePic->getHeight();
     252      piDstU = tempBufRight + confBL.getWindowRightOffset() * pcBasePic->getHeight();
    253253      piSrcV = piSrcBufV + (iBWidth>>1);
    254       piDstV = piDstU + (pcBasePic->getPicCropRightOffset()>>1) * (pcBasePic->getHeight()>>1);
     254      piDstV = piDstU + (confBL.getWindowRightOffset()>>1) * (pcBasePic->getHeight()>>1);
    255255   
    256256      for( i = 0; i < pcBasePic->getHeight()>>1; i++ )
    257257      {
    258         memcpy(piDstU, piSrcU, sizeof(Pel) * (pcBasePic->getPicCropRightOffset()>>1));
     258        memcpy(piDstU, piSrcU, sizeof(Pel) * (confBL.getWindowRightOffset()>>1));
    259259        piSrcU += iBStrideChroma;
    260         piDstU += (pcBasePic->getPicCropRightOffset()>>1);
     260        piDstU += (confBL.getWindowRightOffset()>>1);
    261261       
    262         memcpy(piDstV, piSrcV, sizeof(Pel) * (pcBasePic->getPicCropRightOffset()>>1));
     262        memcpy(piDstV, piSrcV, sizeof(Pel) * (confBL.getWindowRightOffset()>>1));
    263263        piSrcV += iBStrideChroma;
    264         piDstV += (pcBasePic->getPicCropRightOffset()>>1);
     264        piDstV += (confBL.getWindowRightOffset()>>1);
    265265      }
    266266    }
     
    273273    piSrcY = piSrcBufY + iBHeight * iBStride;
    274274    piDstY = tempBufBottom;
    275     for( i = 0; i < pcBasePic->getPicCropBottomOffset(); i++ )
     275    for( i = 0; i < confBL.getWindowBottomOffset(); i++ )
    276276    {
    277277      memcpy(piDstY, piSrcY, sizeof(Pel) * pcBasePic->getWidth());
     
    280280    }
    281281   
    282     if(pcBasePic->getPicCropBottomOffset()>>1)
     282    if(confBL.getWindowBottomOffset()>>1)
    283283    {
    284284      Int iBStrideChroma = (iBStride>>1);
    285285      piSrcU = piSrcBufU + (iBHeight>>1) * iBStrideChroma;
    286       piDstU = tempBufBottom + pcBasePic->getPicCropBottomOffset() * pcBasePic->getWidth();
     286      piDstU = tempBufBottom + confBL.getWindowBottomOffset() * pcBasePic->getWidth();
    287287      piSrcV = piSrcBufV + (iBHeight>>1) * iBStrideChroma;
    288       piDstV = piDstU + (pcBasePic->getPicCropBottomOffset()>>1) * (pcBasePic->getWidth()>>1);
     288      piDstV = piDstU + (confBL.getWindowBottomOffset()>>1) * (pcBasePic->getWidth()>>1);
    289289     
    290       for( i = 0; i < pcBasePic->getPicCropBottomOffset()>>1; i++ )
     290      for( i = 0; i < confBL.getWindowBottomOffset()>>1; i++ )
    291291      {
    292292        memcpy(piDstU, piSrcU, sizeof(Pel) * (pcBasePic->getWidth()>>1));
     
    514514  {
    515515    // put the correct width back
    516     pcBasePic->setWidth(pcBasePic->getWidth()+pcBasePic->getPicCropRightOffset());
     516    pcBasePic->setWidth(pcBasePic->getWidth() + confBL.getWindowRightOffset());
    517517  }
    518518  if( tempBufSizeBottom )
    519519  {
    520     pcBasePic->setHeight(pcBasePic->getHeight()+pcBasePic->getPicCropBottomOffset());
    521   }
    522  
    523   iBWidth   = pcBasePic->getWidth () - pcBasePic->getPicCropLeftOffset() - pcBasePic->getPicCropRightOffset();
    524   iBHeight  = pcBasePic->getHeight() - pcBasePic->getPicCropTopOffset() - pcBasePic->getPicCropBottomOffset();
     520    pcBasePic->setHeight(pcBasePic->getHeight() + confBL.getWindowBottomOffset());
     521  }
     522 
     523  iBWidth   = pcBasePic->getWidth () - confBL.getWindowLeftOffset() - confBL.getWindowRightOffset();
     524  iBHeight  = pcBasePic->getHeight() - confBL.getWindowTopOffset() - confBL.getWindowBottomOffset();
    525525 
    526526  iBStride  = pcBasePic->getStride();
     
    533533    for( i = 0; i < pcBasePic->getHeight(); i++ )
    534534    {
    535       memcpy(piDstY, piSrcY, sizeof(Pel) * pcBasePic->getPicCropRightOffset());
    536       piSrcY += pcBasePic->getPicCropRightOffset();
     535      memcpy(piDstY, piSrcY, sizeof(Pel) * confBL.getWindowRightOffset() );
     536      piSrcY += confBL.getWindowRightOffset();
    537537      piDstY += iBStride;
    538538    }
    539539   
    540     if(pcBasePic->getPicCropRightOffset()>>1)
     540    if(confBL.getWindowRightOffset()>>1)
    541541    {
    542542      Int iBStrideChroma = (iBStride>>1);
    543       piSrcU = tempBufRight + pcBasePic->getPicCropRightOffset() * pcBasePic->getHeight();
     543      piSrcU = tempBufRight + confBL.getWindowRightOffset() * pcBasePic->getHeight();
    544544      piDstU = piSrcBufU + (iBWidth>>1);
    545       piSrcV = piSrcU + (pcBasePic->getPicCropRightOffset()>>1) * (pcBasePic->getHeight()>>1);
     545      piSrcV = piSrcU + (confBL.getWindowRightOffset()>>1) * (pcBasePic->getHeight()>>1);
    546546      piDstV = piSrcBufV + (iBWidth>>1);
    547547
    548548      for( i = 0; i < pcBasePic->getHeight()>>1; i++ )
    549549      {
    550         memcpy(piDstU, piSrcU, sizeof(Pel) * (pcBasePic->getPicCropRightOffset()>>1));
    551         piSrcU += (pcBasePic->getPicCropRightOffset()>>1);
     550        memcpy(piDstU, piSrcU, sizeof(Pel) * (confBL.getWindowRightOffset()>>1));
     551        piSrcU += (confBL.getWindowRightOffset()>>1);
    552552        piDstU += iBStrideChroma;
    553553       
    554         memcpy(piDstV, piSrcV, sizeof(Pel) * (pcBasePic->getPicCropRightOffset()>>1));
    555         piSrcV += (pcBasePic->getPicCropRightOffset()>>1);
     554        memcpy(piDstV, piSrcV, sizeof(Pel) * (confBL.getWindowRightOffset()>>1));
     555        piSrcV += (confBL.getWindowRightOffset()>>1);
    556556        piDstV += iBStrideChroma;
    557557      }
     
    563563    piDstY = piSrcBufY + iBHeight * iBStride;
    564564    piSrcY = tempBufBottom;
    565     for( i = 0; i < pcBasePic->getPicCropBottomOffset(); i++ )
     565    for( i = 0; i < confBL.getWindowBottomOffset(); i++ )
    566566    {
    567567      memcpy(piDstY, piSrcY, sizeof(Pel) * pcBasePic->getWidth());
     
    570570    }
    571571   
    572     if(pcBasePic->getPicCropBottomOffset()>>1)
     572    if(confBL.getWindowBottomOffset()>>1)
    573573    {
    574574      Int iBStrideChroma = (iBStride>>1);
    575       piSrcU = tempBufBottom + pcBasePic->getPicCropBottomOffset() * pcBasePic->getWidth();
     575      piSrcU = tempBufBottom + confBL.getWindowBottomOffset() * pcBasePic->getWidth();
    576576      piDstU = piSrcBufU + (iBHeight>>1) * iBStrideChroma;
    577       piSrcV = piSrcU + (pcBasePic->getPicCropBottomOffset()>>1) * (pcBasePic->getWidth()>>1);
     577      piSrcV = piSrcU + (confBL.getWindowBottomOffset()>>1) * (pcBasePic->getWidth()>>1);
    578578      piDstV = piSrcBufV + (iBHeight>>1) * iBStrideChroma;
    579579           
    580       for( i = 0; i < pcBasePic->getPicCropBottomOffset()>>1; i++ )
     580      for( i = 0; i < confBL.getWindowBottomOffset()>>1; i++ )
    581581      {
    582582        memcpy(piDstU, piSrcU, sizeof(Pel) * (pcBasePic->getWidth()>>1));
  • branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TypeDef.h

    r54 r56  
    7979
    8080#else
    81 #define INTRA_BL                         0      ///< inter-layer texture prediction
     81#define INTRA_BL                         1      ///< inter-layer texture prediction
    8282
    8383#if INTRA_BL
     
    439439  MODE_INTER,           ///< inter-prediction mode
    440440  MODE_INTRA,           ///< intra-prediction mode
     441#if INTRA_BL
     442  MODE_INTRA_BL,        ///< inter-layer intra-prediction mode
     443#endif
    441444  MODE_NONE = 15
    442445};
Note: See TracChangeset for help on using the changeset viewer.