Changeset 1287 in 3DVCSoftware for branches/HTM-14.1-update-dev1/source/Lib


Ignore:
Timestamp:
20 Jul 2015, 14:13:33 (9 years ago)
Author:
tech
Message:

Upgrade to HM-16.6.

Location:
branches/HTM-14.1-update-dev1/source/Lib
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/CommonDef.h

    r1279 r1287  
    7373#if NH_MV
    7474#define NV_VERSION        "14.1"                ///< Current software version
    75 #define HM_VERSION        "16.5"                ///<
    76 #else
    77 #define NV_VERSION        "16.5"                 ///< Current software version
     75#define HM_VERSION        "16.6"                ///<
     76#else
     77#define NV_VERSION        "16.6"                 ///< Current software version
    7878#endif
    7979// ====================================================================================================================
  • branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComPattern.cpp

    r1200 r1287  
    113113
    114114// TODO: move this function to TComPrediction.cpp.
    115 Void TComPrediction::initIntraPatternChType( TComTU &rTu, Bool& bAbove, Bool& bLeft, const ComponentID compID, const Bool bFilterRefSamples DEBUG_STRING_FN_DECLARE(sDebug))
     115Void TComPrediction::initIntraPatternChType( TComTU &rTu, const ComponentID compID, const Bool bFilterRefSamples DEBUG_STRING_FN_DECLARE(sDebug))
    116116{
    117117  const ChannelType chType    = toChannelType(compID);
     
    151151  iNumIntraNeighbor  += isLeftAvailable      ( pcCU, uiPartIdxLT, uiPartIdxLB, (bNeighborFlags + iLeftUnits - 1)                    );
    152152  iNumIntraNeighbor  += isBelowLeftAvailable ( pcCU, uiPartIdxLT, uiPartIdxLB, (bNeighborFlags + iLeftUnits - 1 - iTUHeightInUnits) );
    153 
    154   bAbove = true;
    155   bLeft  = true;
    156153
    157154  const UInt         uiROIWidth  = uiTuWidth2+1;
  • branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComPrediction.cpp

    r1279 r1287  
    216216// Function for calculating DC value of the reference samples used in Intra prediction
    217217//NOTE: Bit-Limit - 25-bit source
    218 Pel TComPrediction::predIntraGetPredValDC( const Pel* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight, Bool bAbove, Bool bLeft )
     218Pel TComPrediction::predIntraGetPredValDC( const Pel* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight)
    219219{
    220220  assert(iWidth > 0 && iHeight > 0);
     
    222222  Pel pDcVal;
    223223
    224   if (bAbove)
    225   {
    226     for (iInd = 0;iInd < iWidth;iInd++)
    227     {
    228       iSum += pSrc[iInd-iSrcStride];
    229     }
    230   }
    231   if (bLeft)
    232   {
    233     for (iInd = 0;iInd < iHeight;iInd++)
    234     {
    235       iSum += pSrc[iInd*iSrcStride-1];
    236     }
    237   }
    238 
    239   if (bAbove && bLeft)
    240   {
    241     pDcVal = (iSum + iWidth) / (iWidth + iHeight);
    242   }
    243   else if (bAbove)
    244   {
    245     pDcVal = (iSum + iWidth/2) / iWidth;
    246   }
    247   else if (bLeft)
    248   {
    249     pDcVal = (iSum + iHeight/2) / iHeight;
    250   }
    251   else
    252   {
    253     pDcVal = pSrc[-1]; // Default DC value already calculated and placed in the prediction array if no neighbors are available
    254   }
     224  for (iInd = 0;iInd < iWidth;iInd++)
     225  {
     226    iSum += pSrc[iInd-iSrcStride];
     227  }
     228  for (iInd = 0;iInd < iHeight;iInd++)
     229  {
     230    iSum += pSrc[iInd*iSrcStride-1];
     231  }
     232
     233  pDcVal = (iSum + iWidth) / (iWidth + iHeight);
    255234
    256235  return pDcVal;
     
    287266                                          Pel* pTrueDst, Int dstStrideTrue,
    288267                                          UInt uiWidth, UInt uiHeight, ChannelType channelType,
    289                                           UInt dirMode, Bool blkAboveAvailable, Bool blkLeftAvailable
    290                                   , const Bool bEnableEdgeFilters
     268                                          UInt dirMode, const Bool bEnableEdgeFilters
    291269                                  )
    292270{
     
    301279  if (modeDC)
    302280  {
    303     const Pel dcval = predIntraGetPredValDC(pSrc, srcStride, width, height, blkAboveAvailable, blkLeftAvailable);
     281    const Pel dcval = predIntraGetPredValDC(pSrc, srcStride, width, height);
    304282
    305283    for (Int y=height;y>0;y--, pTrueDst+=dstStrideTrue)
     
    332310    Pel  refLeft[2*MAX_CU_SIZE+1];
    333311
    334     // Initialise the Main and Left reference array.
     312    // Initialize the Main and Left reference array.
    335313    if (intraPredAngle < 0)
    336314    {
     
    445423}
    446424
    447 Void TComPrediction::predIntraAng( const ComponentID compID, UInt uiDirMode, Pel* piOrg /* Will be null for decoding */, UInt uiOrgStride, Pel* piPred, UInt uiStride, TComTU &rTu, Bool bAbove, Bool bLeft, const Bool bUseFilteredPredSamples, const Bool bUseLosslessDPCM )
     425Void TComPrediction::predIntraAng( const ComponentID compID, UInt uiDirMode, Pel* piOrg /* Will be null for decoding */, UInt uiOrgStride, Pel* piPred, UInt uiStride, TComTU &rTu, const Bool bUseFilteredPredSamples, const Bool bUseLosslessDPCM )
    448426{
    449427  const ChannelType    channelType = toChannelType(compID);
     
    519497      const Int channelsBitDepthForPrediction = rTu.getCU()->getSlice()->getSPS()->getBitDepth(channelType);
    520498#endif
    521       xPredIntraAng( channelsBitDepthForPrediction, ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight, channelType, uiDirMode, bAbove, bLeft, enableEdgeFilters );
    522 
    523       if(( uiDirMode == DC_IDX ) && bAbove && bLeft )
     499      xPredIntraAng( channelsBitDepthForPrediction, ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight, channelType, uiDirMode, enableEdgeFilters );
     500
     501      if( uiDirMode == DC_IDX )
    524502      {
    525503        xDCPredFiltering( ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight, channelType );
  • branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComPrediction.h

    r1279 r1287  
    9898  TComYuv m_cYuvDepthOnVsp;
    9999#endif
    100 
    101   Void xPredIntraAng            ( Int bitDepth, const Pel* pSrc, Int srcStride, Pel* pDst, Int dstStride, UInt width, UInt height, ChannelType channelType, UInt dirMode, Bool blkAboveAvailable, Bool blkLeftAvailable, const Bool bEnableEdgeFilters );
     100  Void xPredIntraAng            ( Int bitDepth, const Pel* pSrc, Int srcStride, Pel* pDst, Int dstStride, UInt width, UInt height, ChannelType channelType, UInt dirMode, const Bool bEnableEdgeFilters );
    102101  Void xPredIntraPlanar         ( const Pel* pSrc, Int srcStride, Pel* rpDst, Int dstStride, UInt width, UInt height );
    103102
     
    159158
    160159  // Angular Intra
    161   Void predIntraAng               ( const ComponentID compID, UInt uiDirMode, Pel *piOrg /* Will be null for decoding */, UInt uiOrgStride, Pel* piPred, UInt uiStride, TComTU &rTu, Bool bAbove, Bool bLeft, const Bool bUseFilteredPredSamples, const Bool bUseLosslessDPCM = false );
    162 
     160  Void predIntraAng               ( const ComponentID compID, UInt uiDirMode, Pel *piOrg /* Will be null for decoding */, UInt uiOrgStride, Pel* piPred, UInt uiStride, TComTU &rTu, const Bool bUseFilteredPredSamples, const Bool bUseLosslessDPCM = false );
     161
     162  Pel  predIntraGetPredValDC      ( const Pel* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight);
    163163#if NH_3D_DMM
    164164  Void predIntraLumaDmm           ( TComDataCU* pcCU, UInt uiAbsPartIdx, DmmID dmmType, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight );
     
    187187  /// set parameters from CU data for accessing intra data
    188188  Void initIntraPatternChType ( TComTU &rTu,
    189                               Bool&       bAbove,
    190                               Bool&       bLeft,
    191189                              const ComponentID compID, const Bool bFilterRefSamples
    192190                              DEBUG_STRING_FN_DECLARE(sDebug)
  • branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComSlice.cpp

    r1279 r1287  
    5656, m_iAssociatedIRAP               ( 0 )
    5757, m_iAssociatedIRAPType           ( NAL_UNIT_INVALID )
    58 , m_pcRPS                         ( 0 )
    59 , m_LocalRPS                      ( )
    60 , m_iBDidx                        ( 0 )
     58, m_pRPS                          ( 0 )
     59, m_localRPS                      ( )
     60, m_rpsIdx                        ( 0 )
    6161, m_RefPicListModification        ( )
    6262, m_eNalUnitType                  ( NAL_UNIT_CODED_SLICE_IDR_W_RADL )
     
    465465  Int i;
    466466
    467   for(i=0; i < m_pcRPS->getNumberOfNegativePictures(); i++)
    468   {
    469     if(m_pcRPS->getUsed(i))
    470     {
    471       pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pcRPS->getDeltaPOC(i));
     467  for(i=0; i < m_pRPS->getNumberOfNegativePictures(); i++)
     468  {
     469    if(m_pRPS->getUsed(i))
     470    {
     471      pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pRPS->getDeltaPOC(i));
    472472      pcRefPic->setIsLongTerm(0);
    473473      pcRefPic->getPicYuvRec()->extendPicBorder();
     
    478478  }
    479479
    480   for(; i < m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures(); i++)
    481   {
    482     if(m_pcRPS->getUsed(i))
    483     {
    484       pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pcRPS->getDeltaPOC(i));
     480  for(; i < m_pRPS->getNumberOfNegativePictures()+m_pRPS->getNumberOfPositivePictures(); i++)
     481  {
     482    if(m_pRPS->getUsed(i))
     483    {
     484      pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pRPS->getDeltaPOC(i));
    485485      pcRefPic->setIsLongTerm(0);
    486486      pcRefPic->getPicYuvRec()->extendPicBorder();
     
    491491  }
    492492
    493   for(i = m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()+m_pcRPS->getNumberOfLongtermPictures()-1; i > m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()-1 ; i--)
    494   {
    495     if(m_pcRPS->getUsed(i))
    496     {
    497       pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i));
     493  for(i = m_pRPS->getNumberOfNegativePictures()+m_pRPS->getNumberOfPositivePictures()+m_pRPS->getNumberOfLongtermPictures()-1; i > m_pRPS->getNumberOfNegativePictures()+m_pRPS->getNumberOfPositivePictures()-1 ; i--)
     494  {
     495    if(m_pRPS->getUsed(i))
     496    {
     497      pcRefPic = xGetLongTermRefPic(rcListPic, m_pRPS->getPOC(i), m_pRPS->getCheckLTMSBPresent(i));
    498498      pcRefPic->setIsLongTerm(1);
    499499      pcRefPic->getPicYuvRec()->extendPicBorder();
     
    503503    if(pcRefPic==NULL)
    504504    {
    505       pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i));
    506     }
    507     pcRefPic->setCheckLTMSBPresent(m_pcRPS->getCheckLTMSBPresent(i));
     505      pcRefPic = xGetLongTermRefPic(rcListPic, m_pRPS->getPOC(i), m_pRPS->getCheckLTMSBPresent(i));
     506    }
     507    pcRefPic->setCheckLTMSBPresent(m_pRPS->getCheckLTMSBPresent(i));
    508508  }
    509509
     
    620620  m_pocsInCurrRPSs.clear();
    621621#endif
    622   for(i=0; i < m_pcRPS->getNumberOfNegativePictures(); i++)
    623   {
    624     if(m_pcRPS->getUsed(i))
    625     {
    626       pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pcRPS->getDeltaPOC(i));
     622  for(i=0; i < m_pRPS->getNumberOfNegativePictures(); i++)
     623  {
     624    if(m_pRPS->getUsed(i))
     625    {
     626      pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pRPS->getDeltaPOC(i));
    627627      pcRefPic->setIsLongTerm(0);
    628628      pcRefPic->getPicYuvRec()->extendPicBorder();
     
    636636  }
    637637 
    638   for(; i < m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures(); i++)
    639   {
    640     if(m_pcRPS->getUsed(i))
    641     {
    642       pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pcRPS->getDeltaPOC(i));
     638  for(; i < m_pRPS->getNumberOfNegativePictures()+m_pRPS->getNumberOfPositivePictures(); i++)
     639  {
     640    if(m_pRPS->getUsed(i))
     641    {
     642      pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pRPS->getDeltaPOC(i));
    643643      pcRefPic->setIsLongTerm(0);
    644644      pcRefPic->getPicYuvRec()->extendPicBorder();
     
    652652  }
    653653 
    654   for(i = m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()+m_pcRPS->getNumberOfLongtermPictures()-1; i > m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()-1 ; i--)
    655   {
    656     if(m_pcRPS->getUsed(i))
    657     {
    658       pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i));
     654  for(i = m_pRPS->getNumberOfNegativePictures()+m_pRPS->getNumberOfPositivePictures()+m_pRPS->getNumberOfLongtermPictures()-1; i > m_pRPS->getNumberOfNegativePictures()+m_pRPS->getNumberOfPositivePictures()-1 ; i--)
     655  {
     656    if(m_pRPS->getUsed(i))
     657    {
     658      pcRefPic = xGetLongTermRefPic(rcListPic, m_pRPS->getPOC(i), m_pRPS->getCheckLTMSBPresent(i));
    659659      pcRefPic->setIsLongTerm(1);
    660660      pcRefPic->getPicYuvRec()->extendPicBorder();
     
    667667    if(pcRefPic==NULL)
    668668    {
    669       pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i));
    670     }
    671     pcRefPic->setCheckLTMSBPresent(m_pcRPS->getCheckLTMSBPresent(i)); 
     669      pcRefPic = xGetLongTermRefPic(rcListPic, m_pRPS->getPOC(i), m_pRPS->getCheckLTMSBPresent(i));
     670    }
     671    pcRefPic->setCheckLTMSBPresent(m_pRPS->getCheckLTMSBPresent(i)); 
    672672  }
    673673
     
    798798    return 0;
    799799  }
    800   for(UInt i=0; i < m_pcRPS->getNumberOfNegativePictures()+ m_pcRPS->getNumberOfPositivePictures() + m_pcRPS->getNumberOfLongtermPictures(); i++)
    801   {
    802     if(m_pcRPS->getUsed(i))
     800  for(UInt i=0; i < m_pRPS->getNumberOfNegativePictures()+ m_pRPS->getNumberOfPositivePictures() + m_pRPS->getNumberOfLongtermPictures(); i++)
     801  {
     802    if(m_pRPS->getUsed(i))
    803803    {
    804804      numRpsCurrTempList++;
     
    10971097  m_pcVPS                = pSrc->m_pcVPS;
    10981098#endif
    1099   m_pcRPS                = pSrc->m_pcRPS;
    1100   m_iLastIDR             = pSrc->m_iLastIDR;
     1099  m_pRPS                = pSrc->m_pRPS;  m_iLastIDR             = pSrc->m_iLastIDR;
    11011100
    11021101  m_pcPic                = pSrc->m_pcPic;
     
    16871686  Int nrOfNegativePictures = 0;
    16881687  Int nrOfPositivePictures = 0;
    1689   TComReferencePictureSet* pcRPS = this->getLocalRPS();
     1688  TComReferencePictureSet* pLocalRPS = this->getLocalRPS();
     1689  (*pLocalRPS)=TComReferencePictureSet();
     1690
    16901691  Bool irapIsInRPS = false; // Used when bEfficientFieldIRAPEnabled==true
    16911692
     
    17051706        // This picture exists as a reference picture
    17061707        // and should be added to the explicit Reference Picture Set
    1707         pcRPS->setDeltaPOC(k, pReferencePictureSet->getDeltaPOC(i));
    1708         pcRPS->setUsed(k, pReferencePictureSet->getUsed(i) && (!isRAP));
     1708        pLocalRPS->setDeltaPOC(k, pReferencePictureSet->getDeltaPOC(i));
     1709        pLocalRPS->setUsed(k, pReferencePictureSet->getUsed(i) && (!isRAP));
    17091710        if (bEfficientFieldIRAPEnabled)
    17101711        {
    1711         pcRPS->setUsed(k, pcRPS->getUsed(k) && !(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess) );
    1712         }
    1713 
    1714         if(pcRPS->getDeltaPOC(k) < 0)
     1712          pLocalRPS->setUsed(k, pLocalRPS->getUsed(k) && !(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess) );
     1713        }
     1714
     1715        if(pLocalRPS->getDeltaPOC(k) < 0)
    17151716        {
    17161717          nrOfNegativePictures++;
     
    17391740      if(rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getAssociatedIRAPPOC() && this->getAssociatedIRAPPOC() == this->getPOC()+1)
    17401741      {
    1741         pcRPS->setDeltaPOC(k, 1);
    1742         pcRPS->setUsed(k, true);
     1742        pLocalRPS->setDeltaPOC(k, 1);
     1743        pLocalRPS->setUsed(k, true);
    17431744        nrOfPositivePictures++;
    17441745        k ++;
     
    17471748    }
    17481749  }
    1749   pcRPS->setNumberOfNegativePictures(nrOfNegativePictures);
    1750   pcRPS->setNumberOfPositivePictures(nrOfPositivePictures);
    1751   pcRPS->setNumberOfPictures(nrOfNegativePictures+nrOfPositivePictures);
     1750  pLocalRPS->setNumberOfNegativePictures(nrOfNegativePictures);
     1751  pLocalRPS->setNumberOfPositivePictures(nrOfPositivePictures);
     1752  pLocalRPS->setNumberOfPictures(nrOfNegativePictures+nrOfPositivePictures);
    17521753  // This is a simplistic inter rps example. A smarter encoder will look for a better reference RPS to do the
    17531754  // inter RPS prediction with.  Here we just use the reference used by pReferencePictureSet.
     
    17551756  if (!pReferencePictureSet->getInterRPSPrediction() || useNewRPS )
    17561757  {
    1757     pcRPS->setInterRPSPrediction(false);
    1758     pcRPS->setNumRefIdc(0);
     1758    pLocalRPS->setInterRPSPrediction(false);
     1759    pLocalRPS->setNumRefIdc(0);
    17591760  }
    17601761  else
     
    17691770      Int deltaPOC = ((i != iRefPics)? pcRefRPS->getDeltaPOC(i) : 0);  // check if the reference abs POC is >= 0
    17701771      Int iRefIdc = 0;
    1771       for (j=0; j < pcRPS->getNumberOfPictures(); j++) // loop through the  pictures in the new RPS
    1772       {
    1773         if ( (deltaPOC + deltaRPS) == pcRPS->getDeltaPOC(j))
    1774         {
    1775           if (pcRPS->getUsed(j))
     1772      for (j=0; j < pLocalRPS->getNumberOfPictures(); j++) // loop through the  pictures in the new RPS
     1773      {
     1774        if ( (deltaPOC + deltaRPS) == pLocalRPS->getDeltaPOC(j))
     1775        {
     1776          if (pLocalRPS->getUsed(j))
    17761777          {
    17771778            iRefIdc = 1;
     
    17831784        }
    17841785      }
    1785       pcRPS->setRefIdc(i, iRefIdc);
     1786      pLocalRPS->setRefIdc(i, iRefIdc);
    17861787      iNewIdc++;
    17871788    }
    1788     pcRPS->setInterRPSPrediction(true);
    1789     pcRPS->setNumRefIdc(iNewIdc);
    1790     pcRPS->setDeltaRPS(deltaRPS);
    1791     pcRPS->setDeltaRIdxMinus1(pReferencePictureSet->getDeltaRIdxMinus1() + this->getSPS()->getRPSList()->getNumberOfReferencePictureSets() - this->getRPSidx());
    1792   }
    1793 
    1794   this->setRPS(pcRPS);
     1789    pLocalRPS->setInterRPSPrediction(true);
     1790    pLocalRPS->setNumRefIdc(iNewIdc);
     1791    pLocalRPS->setDeltaRPS(deltaRPS);
     1792    pLocalRPS->setDeltaRIdxMinus1(pReferencePictureSet->getDeltaRIdxMinus1() + this->getSPS()->getRPSList()->getNumberOfReferencePictureSets() - this->getRPSidx());
     1793  }
     1794
     1795  this->setRPS(pLocalRPS);
    17951796  this->setRPSidx(-1);
    17961797}
  • branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComSlice.h

    r1279 r1287  
    24792479  Int                        m_iAssociatedIRAP;
    24802480  NalUnitType                m_iAssociatedIRAPType;
    2481   TComReferencePictureSet*   m_pcRPS;
    2482   TComReferencePictureSet    m_LocalRPS;
    2483   Int                        m_iBDidx;
     2481  const TComReferencePictureSet* m_pRPS;             //< pointer to RPS, either in the SPS or the local RPS in the same slice header
     2482  TComReferencePictureSet    m_localRPS;             //< RPS when present in slice header
     2483  Int                        m_rpsIdx;               //< index of used RPS in the SPS or -1 for local RPS in the slice header
    24842484  TComRefPicListModification m_RefPicListModification;
    24852485  NalUnitType                m_eNalUnitType;         ///< Nal unit type for the slice
     
    26762676  Void                        setSaoEnabledFlag(ChannelType chType, Bool s)          {m_saoEnabledFlag[chType] =s;                                   }
    26772677  Bool                        getSaoEnabledFlag(ChannelType chType) const            { return m_saoEnabledFlag[chType];                              }
    2678   Void                        setRPS( TComReferencePictureSet *pcRPS )               { m_pcRPS = pcRPS;                                              }
    2679   TComReferencePictureSet*    getRPS()                                               { return m_pcRPS;                                               }
    2680   TComReferencePictureSet*    getLocalRPS()                                          { return &m_LocalRPS;                                           }
    2681 
    2682   Void                        setRPSidx( Int iBDidx )                                { m_iBDidx = iBDidx;                                            }
    2683   Int                         getRPSidx() const                                      { return m_iBDidx;                                              }
     2678  Void                        setRPS( const TComReferencePictureSet *pcRPS )         { m_pRPS = pcRPS;                                               }
     2679  const TComReferencePictureSet* getRPS()                                            { return m_pRPS;                                                }
     2680  TComReferencePictureSet*    getLocalRPS()                                          { return &m_localRPS;                                           }
     2681
     2682  Void                        setRPSidx( Int rpsIdx )                                { m_rpsIdx = rpsIdx;                                            }
     2683  Int                         getRPSidx() const                                      { return m_rpsIdx;                                              }
    26842684  TComRefPicListModification* getRefPicListModification()                            { return &m_RefPicListModification;                             }
    26852685  Void                        setLastIDR(Int iIDRPOC)                                { m_iLastIDR = iIDRPOC;                                         }
  • branches/HTM-14.1-update-dev1/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1279 r1287  
    23492349#endif
    23502350      TComReferencePictureSet* rps = pcSlice->getLocalRPS();
    2351       rps->setNumberOfNegativePictures(0);
    2352       rps->setNumberOfPositivePictures(0);
    2353       rps->setNumberOfLongtermPictures(0);
    2354       rps->setNumberOfPictures(0);
     2351      (*rps)=TComReferencePictureSet();
    23552352      pcSlice->setRPS(rps);
    23562353#if NH_MV
     
    23912388      TComReferencePictureSet* rps;
    23922389      rps = pcSlice->getLocalRPS();
     2390      (*rps)=TComReferencePictureSet();
     2391
    23932392      pcSlice->setRPS(rps);
    23942393      READ_FLAG( uiCode, "short_term_ref_pic_set_sps_flag" );
     
    25282527        // In the case of BLA picture types, rps data is read from slice header but ignored
    25292528        rps = pcSlice->getLocalRPS();
    2530         rps->setNumberOfNegativePictures(0);
    2531         rps->setNumberOfPositivePictures(0);
    2532         rps->setNumberOfLongtermPictures(0);
    2533         rps->setNumberOfPictures(0);
     2529        (*rps)=TComReferencePictureSet();
    25342530        pcSlice->setRPS(rps);
    25352531      }
  • branches/HTM-14.1-update-dev1/source/Lib/TLibDecoder/TDecCu.cpp

    r1279 r1287  
    8585#endif
    8686
    87   UInt uiNumPartitions;
    8887  for ( UInt ui = 0; ui < m_uiMaxDepth-1; ui++ )
    8988  {
    90     uiNumPartitions = 1<<( ( m_uiMaxDepth - ui - 1 )<<1 );
     89    UInt uiNumPartitions = 1<<( ( m_uiMaxDepth - ui - 1 )<<1 );
    9190    UInt uiWidth  = uiMaxWidth  >> ui;
    9291    UInt uiHeight = uiMaxHeight >> ui;
     92
     93    // The following arrays (m_ppcYuvResi, m_ppcYuvReco and m_ppcCU) are only required for CU depths
     94    // although data is allocated for all possible depths of the CU/TU tree except the last.
     95    // Since the TU tree will always include at least one additional depth greater than the CU tree,
     96    // there will be enough entries for these arrays.
     97    // (Section 7.4.3.2: "The CVS shall not contain data that result in (Log2MinTrafoSize) MinTbLog2SizeY
     98    //                    greater than or equal to MinCbLog2SizeY")
     99    // TODO: tidy the array allocation given the above comment.
    93100
    94101    m_ppcYuvResi[ui] = new TComYuv;    m_ppcYuvResi[ui]->create( uiWidth, uiHeight, chromaFormatIDC );
     
    778785  {
    779786    const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, VER_IDX, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag());
    780     m_pcPrediction->initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, COMPONENT_Y, bUseFilteredPredictions  DEBUG_STRING_PASS_INTO(sTemp) );
    781     m_pcPrediction->predIntraAng( COMPONENT_Y,   VER_IDX, 0 /* Decoder does not have an original image */, 0, piReco, uiStride, rTu, bAboveAvail, bLeftAvail, bUseFilteredPredictions );
     787    m_pcPrediction->initIntraPatternChType( rTu, COMPONENT_Y, bUseFilteredPredictions  DEBUG_STRING_PASS_INTO(sTemp) );
     788    m_pcPrediction->predIntraAng( COMPONENT_Y,   VER_IDX, 0 /* Decoder does not have an original image */, 0, piReco, uiStride, rTu, bUseFilteredPredictions );
    782789  }
    783790  else if ( pcCU->getDISType(uiAbsPartIdx) == 1 )
    784791  {
    785792    const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, HOR_IDX, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag());
    786     m_pcPrediction->initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, COMPONENT_Y, bUseFilteredPredictions  DEBUG_STRING_PASS_INTO(sTemp) );
    787     m_pcPrediction->predIntraAng( COMPONENT_Y,   HOR_IDX, 0 /* Decoder does not have an original image */, 0, piReco, uiStride, rTu, bAboveAvail, bLeftAvail, bUseFilteredPredictions );
     793    m_pcPrediction->initIntraPatternChType( rTu, COMPONENT_Y, bUseFilteredPredictions  DEBUG_STRING_PASS_INTO(sTemp) );
     794    m_pcPrediction->predIntraAng( COMPONENT_Y,   HOR_IDX, 0 /* Decoder does not have an original image */, 0, piReco, uiStride, rTu, bUseFilteredPredictions );
    788795  }
    789796  else if ( pcCU->getDISType(uiAbsPartIdx) == 2 )
     
    10311038
    10321039  //===== init availability pattern =====
    1033   Bool  bAboveAvail = false;
    1034   Bool  bLeftAvail  = false;
    1035 
    10361040  const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(compID, uiChFinalMode, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag());
    10371041
     
    10411045
    10421046  DEBUG_STRING_NEW(sTemp)
    1043   m_pcPrediction->initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, compID, bUseFilteredPredictions  DEBUG_STRING_PASS_INTO(sTemp) );
     1047  m_pcPrediction->initIntraPatternChType( rTu, compID, bUseFilteredPredictions  DEBUG_STRING_PASS_INTO(sTemp) );
    10441048
    10451049
     
    10531057  {
    10541058#endif
    1055   m_pcPrediction->predIntraAng( compID,   uiChFinalMode, 0 /* Decoder does not have an original image */, 0, piPred, uiStride, rTu, bAboveAvail, bLeftAvail, bUseFilteredPredictions );
     1059  m_pcPrediction->predIntraAng( compID,   uiChFinalMode, 0 /* Decoder does not have an original image */, 0, piPred, uiStride, rTu, bUseFilteredPredictions );
    10561060#if NH_3D_DMM
    10571061  }
     
    12691273    TComTURecurse tuRecurseWithPU(tuRecurseCU, false, TComTU::DONT_SPLIT);
    12701274
    1271     Bool bAboveAvail = false;
    1272     Bool bLeftAvail  = false;
    1273     m_pcPrediction->initIntraPatternChType( tuRecurseWithPU, bAboveAvail, bLeftAvail, COMPONENT_Y, false DEBUG_STRING_PASS_INTO(sTemp) );
     1275    m_pcPrediction->initIntraPatternChType( tuRecurseWithPU, COMPONENT_Y, false DEBUG_STRING_PASS_INTO(sTemp) );
    12741276
    12751277    // get partition
     
    13211323     
    13221324      //===== init pattern for luma prediction =====
    1323       Bool bAboveAvail = false;
    1324       Bool bLeftAvail  = false;
    13251325     
    1326       m_pcPrediction->initIntraPatternChType( tuRecurseWithPU, bAboveAvail, bLeftAvail, COMPONENT_Y, bUseFilter  DEBUG_STRING_PASS_INTO(sTemp) );
     1326      m_pcPrediction->initIntraPatternChType( tuRecurseWithPU, COMPONENT_Y, bUseFilter  DEBUG_STRING_PASS_INTO(sTemp) );
    13271327     
    1328       m_pcPrediction->predIntraAng( COMPONENT_Y, uiLumaPredMode, NULL, uiStrideTU, piPredTU, uiStrideTU, tuRecurseWithPU, bAboveAvail, bLeftAvail, bUseFilter );
     1328      m_pcPrediction->predIntraAng( COMPONENT_Y, uiLumaPredMode, NULL, uiStrideTU, piPredTU, uiStrideTU, tuRecurseWithPU, bUseFilter );
    13291329     
    13301330      // copy for prediction of next part
  • branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncCfg.h

    r1279 r1287  
    257257  Int*      m_aidQP;
    258258  UInt      m_uiDeltaQpRD;
     259  Bool      m_bFastDeltaQP;
    259260
    260261  Bool      m_bUseConstrainedIntraPred;
     
    710711  Void      setdQPs                         ( Int*  p )     { m_aidQP       = p; }
    711712  Void      setDeltaQpRD                    ( UInt  u )     {m_uiDeltaQpRD  = u; }
     713  Void      setFastDeltaQp                  ( Bool  b )     {m_bFastDeltaQP = b; }
    712714  Bool      getUseASR                       ()      { return m_bUseASR;     }
    713715  Bool      getUseHADME                     ()      { return m_bUseHADME;   }
     
    758760  Void setIntraSmoothingDisabledFlag               (Bool bValue) { m_intraSmoothingDisabledFlag=bValue; }
    759761
    760   Int*      getdQPs                         ()      { return m_aidQP;       }
    761   UInt      getDeltaQpRD                    ()      { return m_uiDeltaQpRD; }
     762  Int*      getdQPs                         ()       { return m_aidQP;       }
     763  UInt      getDeltaQpRD                    () const { return m_uiDeltaQpRD; }
     764  Bool      getFastDeltaQp                  () const { return m_bFastDeltaQP; }
    762765
    763766  //====== Slice ========
  • branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncCu.cpp

    r1285 r1287  
    122122  m_stillToCodeChromaQpOffsetFlag  = false;
    123123  m_cuChromaQpOffsetIdxPlus1       = 0;
     124  m_bFastDeltaQP                   = false;
    124125
    125126  // initialize partition order.
     
    406407*/
    407408#if AMP_ENC_SPEEDUP
    408 Void TEncCu::xCompressCU( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, UInt uiDepth DEBUG_STRING_FN_DECLARE(sDebug_), PartSize eParentPartSize )
    409 #else
    410 Void TEncCu::xCompressCU( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, UInt uiDepth )
     409Void TEncCu::xCompressCU( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, const UInt uiDepth DEBUG_STRING_FN_DECLARE(sDebug_), PartSize eParentPartSize )
     410#else
     411Void TEncCu::xCompressCU( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, const UInt uiDepth )
    411412#endif
    412413{
     
    415416  const TComPPS &pps=*(rpcTempCU->getSlice()->getPPS());
    416417  const TComSPS &sps=*(rpcTempCU->getSlice()->getSPS());
     418 
     419  // These are only used if getFastDeltaQp() is true
     420  const UInt fastDeltaQPCuMaxSize    = Clip3(sps.getMaxCUHeight()>>sps.getLog2DiffMaxMinCodingBlockSize(), sps.getMaxCUHeight(), 32u);
    417421
    418422
     
    437441  Bool    bTrySplitDQP  = true;
    438442#endif
    439 
    440     // variable for Early CU determination
    441   Bool    bSubBranch = true;
    442 
    443443  // variable for Cbf fast mode PU decision
    444444  Bool    doNotBlockPu = true;
     
    453453#endif
    454454#endif
    455   Bool bBoundary = false;
    456   UInt uiLPelX   = rpcBestCU->getCUPelX();
    457   UInt uiRPelX   = uiLPelX + rpcBestCU->getWidth(0)  - 1;
    458   UInt uiTPelY   = rpcBestCU->getCUPelY();
    459   UInt uiBPelY   = uiTPelY + rpcBestCU->getHeight(0) - 1;
     455  const UInt uiLPelX   = rpcBestCU->getCUPelX();
     456  const UInt uiRPelX   = uiLPelX + rpcBestCU->getWidth(0)  - 1;
     457  const UInt uiTPelY   = rpcBestCU->getCUPelY();
     458  const UInt uiBPelY   = uiTPelY + rpcBestCU->getHeight(0) - 1;
     459  const UInt uiWidth   = rpcBestCU->getWidth(0);
    460460
    461461#if H_MV_ENC_DEC_TRAC
     
    515515
    516516  TComSlice * pcSlice = rpcTempCU->getPic()->getSlice(rpcTempCU->getPic()->getCurrSliceIdx());
    517   // We need to split, so don't try these modes.
    518   if ( ( uiRPelX < sps.getPicWidthInLumaSamples() ) &&
    519        ( uiBPelY < sps.getPicHeightInLumaSamples() ) )
     517
     518  const Bool bBoundary = !( uiRPelX < sps.getPicWidthInLumaSamples() && uiBPelY < sps.getPicHeightInLumaSamples() );
     519
     520  if ( !bBoundary )
    520521  {
    521522#if  H_3D_FAST_TEXTURE_ENCODING
     
    11871188    }
    11881189
    1189     m_pcRDGoOnSbacCoder->load(m_pppcRDSbacCoder[uiDepth][CI_NEXT_BEST]);
    1190     m_pcEntropyCoder->resetBits();
    1191     m_pcEntropyCoder->encodeSplitFlag( rpcBestCU, 0, uiDepth, true );
    1192     rpcBestCU->getTotalBits() += m_pcEntropyCoder->getNumberOfWrittenBits(); // split bits
    1193     rpcBestCU->getTotalBins() += ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded();
     1190    if( rpcBestCU->getTotalCost()!=MAX_DOUBLE )
     1191    {
     1192      m_pcRDGoOnSbacCoder->load(m_pppcRDSbacCoder[uiDepth][CI_NEXT_BEST]);
     1193      m_pcEntropyCoder->resetBits();
     1194      m_pcEntropyCoder->encodeSplitFlag( rpcBestCU, 0, uiDepth, true );
     1195      rpcBestCU->getTotalBits() += m_pcEntropyCoder->getNumberOfWrittenBits(); // split bits
     1196      rpcBestCU->getTotalBins() += ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded();
    11941197#if NH_3D_VSO // M8
    11951198    if ( m_pcRdCost->getUseVSO() )   
     
    12001203#endif
    12011204      rpcBestCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcBestCU->getTotalBits(), rpcBestCU->getTotalDistortion() );
    1202     m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_NEXT_BEST]);
    1203 
    1204     // Early CU determination
    1205     if( m_pcEncCfg->getUseEarlyCU() && rpcBestCU->isSkipped(0) )
    1206     {
    1207       bSubBranch = false;
    1208     }
    1209     else
    1210     {
    1211       bSubBranch = true;
     1205      m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_NEXT_BEST]);
    12121206    }
    12131207#if  H_3D_FAST_TEXTURE_ENCODING
     
    12181212#endif
    12191213  }
    1220   else
    1221   {
    1222     bBoundary = true;
    1223   }
    1224 
    1225   // copy orginal YUV samples to PCM buffer
    1226   if( rpcBestCU->isLosslessCoded(0) && (rpcBestCU->getIPCMFlag(0) == false))
     1214
     1215  // copy original YUV samples to PCM buffer
     1216  if( rpcBestCU->getTotalCost()!=MAX_DOUBLE && rpcBestCU->isLosslessCoded(0) && (rpcBestCU->getIPCMFlag(0) == false))
    12271217  {
    12281218    xFillPCMBuffer(rpcBestCU, m_ppcOrigYuv[uiDepth]);
     
    12581248  }
    12591249
    1260   for (Int iQP=iMinQP; iQP<=iMaxQP; iQP++)
    1261   {
    1262     const Bool bIsLosslessMode = false; // False at this level. Next level down may set it to true.
    1263 
    1264     rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    1265 
     1250  const Bool bSubBranch = bBoundary || !( m_pcEncCfg->getUseEarlyCU() && rpcBestCU->getTotalCost()!=MAX_DOUBLE && rpcBestCU->isSkipped(0) );
     1251#if NH_3D_QTLPC
     1252  if( bSubBranch && uiDepth < sps.getLog2DiffMaxMinCodingBlockSize() && (!getFastDeltaQp() || uiWidth > fastDeltaQPCuMaxSize || bBoundary) && bTrySplitDQP )
     1253#else
     1254  if( bSubBranch && uiDepth < sps.getLog2DiffMaxMinCodingBlockSize() && (!getFastDeltaQp() || uiWidth > fastDeltaQPCuMaxSize || bBoundary))
     1255#endif
     1256  {
    12661257    // further split
    1267 #if NH_3D_QTLPC
    1268 
    1269     if( bSubBranch && bTrySplitDQP && uiDepth < sps.getLog2DiffMaxMinCodingBlockSize() )
    1270 #else
    1271     if( bSubBranch && uiDepth < sps.getLog2DiffMaxMinCodingBlockSize() )
    1272 #endif
    1273     {
     1258    for (Int iQP=iMinQP; iQP<=iMaxQP; iQP++)
     1259    {
     1260      const Bool bIsLosslessMode = false; // False at this level. Next level down may set it to true.
     1261
     1262      rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
     1263
    12741264#if NH_3D_VSO // M9
    12751265      // reset Model
     
    13101300#if AMP_ENC_SPEEDUP
    13111301          DEBUG_STRING_NEW(sChild)
    1312           if ( !rpcBestCU->isInter(0) )
     1302          if ( !(rpcBestCU->getTotalCost()!=MAX_DOUBLE && rpcBestCU->isInter(0)) )
    13131303          {
    13141304            xCompressCU( pcSubBestPartCU, pcSubTempPartCU, uhNextDepth DEBUG_STRING_PASS_INTO(sChild), NUMBER_OF_PART_SIZES );
     
    13661356        }
    13671357
    1368         UInt uiTargetPartIdx = 0;
    13691358        if ( hasResidual )
    13701359        {
    13711360          m_pcEntropyCoder->resetBits();
    1372           m_pcEntropyCoder->encodeQP( rpcTempCU, uiTargetPartIdx, false );
     1361          m_pcEntropyCoder->encodeQP( rpcTempCU, 0, false );
    13731362          rpcTempCU->getTotalBits() += m_pcEntropyCoder->getNumberOfWrittenBits(); // dQP bits
    13741363          rpcTempCU->getTotalBins() += ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded();
     
    13831372
    13841373          Bool foundNonZeroCbf = false;
    1385           rpcTempCU->setQPSubCUs( rpcTempCU->getRefQP( uiTargetPartIdx ), 0, uiDepth, foundNonZeroCbf );
     1374          rpcTempCU->setQPSubCUs( rpcTempCU->getRefQP( 0 ), 0, uiDepth, foundNonZeroCbf );
    13861375          assert( foundNonZeroCbf );
    13871376        }
    13881377        else
    13891378        {
    1390           rpcTempCU->setQPSubParts( rpcTempCU->getRefQP( uiTargetPartIdx ), 0, uiDepth ); // set QP to default QP
     1379          rpcTempCU->setQPSubParts( rpcTempCU->getRefQP( 0 ), 0, uiDepth ); // set QP to default QP
    13911380        }
    13921381      }
     
    13991388      // This can be achieved by forcing the decision to be that of the rpcTempCU.
    14001389      // The exception is each slice / slice-segment must have at least one CTU.
    1401       const Bool isEndOfSlice        =    pcSlice->getSliceMode()==FIXED_NUMBER_OF_BYTES
    1402                                        && ((pcSlice->getSliceBits()+rpcBestCU->getTotalBits())>pcSlice->getSliceArgument()<<3)
    1403                                        && rpcBestCU->getCtuRsAddr() != pcPic->getPicSym()->getCtuTsToRsAddrMap(pcSlice->getSliceCurStartCtuTsAddr())
    1404                                        && rpcBestCU->getCtuRsAddr() != pcPic->getPicSym()->getCtuTsToRsAddrMap(pcSlice->getSliceSegmentCurStartCtuTsAddr());
    1405       const Bool isEndOfSliceSegment =    pcSlice->getSliceSegmentMode()==FIXED_NUMBER_OF_BYTES
    1406                                        && ((pcSlice->getSliceSegmentBits()+rpcBestCU->getTotalBits()) > pcSlice->getSliceSegmentArgument()<<3)
    1407                                        && rpcBestCU->getCtuRsAddr() != pcPic->getPicSym()->getCtuTsToRsAddrMap(pcSlice->getSliceSegmentCurStartCtuTsAddr());
    1408                                            // Do not need to check slice condition for slice-segment since a slice-segment is a subset of a slice.
    1409       if(isEndOfSlice||isEndOfSliceSegment)
     1390      if (rpcBestCU->getTotalCost()!=MAX_DOUBLE)
    14101391      {
    1411         rpcBestCU->getTotalCost()=MAX_DOUBLE;
     1392        const Bool isEndOfSlice        =    pcSlice->getSliceMode()==FIXED_NUMBER_OF_BYTES
     1393                                         && ((pcSlice->getSliceBits()+rpcBestCU->getTotalBits())>pcSlice->getSliceArgument()<<3)
     1394                                         && rpcBestCU->getCtuRsAddr() != pcPic->getPicSym()->getCtuTsToRsAddrMap(pcSlice->getSliceCurStartCtuTsAddr())
     1395                                         && rpcBestCU->getCtuRsAddr() != pcPic->getPicSym()->getCtuTsToRsAddrMap(pcSlice->getSliceSegmentCurStartCtuTsAddr());
     1396        const Bool isEndOfSliceSegment =    pcSlice->getSliceSegmentMode()==FIXED_NUMBER_OF_BYTES
     1397                                         && ((pcSlice->getSliceSegmentBits()+rpcBestCU->getTotalBits()) > pcSlice->getSliceSegmentArgument()<<3)
     1398                                         && rpcBestCU->getCtuRsAddr() != pcPic->getPicSym()->getCtuTsToRsAddrMap(pcSlice->getSliceSegmentCurStartCtuTsAddr());
     1399                                             // Do not need to check slice condition for slice-segment since a slice-segment is a subset of a slice.
     1400        if(isEndOfSlice||isEndOfSliceSegment)
     1401        {
     1402          rpcBestCU->getTotalCost()=MAX_DOUBLE;
     1403        }
    14121404      }
    14131405
    14141406      xCheckBestMode( rpcBestCU, rpcTempCU, uiDepth DEBUG_STRING_PASS_INTO(sDebug) DEBUG_STRING_PASS_INTO(sTempDebug) DEBUG_STRING_PASS_INTO(false) ); // RD compare current larger prediction
    1415                                                                                        // with sub partitioned prediction.
     1407                                                                                                                                                       // with sub partitioned prediction.
    14161408    }
    14171409  }
     
    17851777{
    17861778  assert( rpcTempCU->getSlice()->getSliceType() != I_SLICE );
     1779  if(getFastDeltaQp())
     1780  {
     1781    return;   // never check merge in fast deltaqp mode
     1782  }
    17871783#if NH_3D_MLC
    17881784  TComMvField  cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists
     
    22472243  DEBUG_STRING_NEW(sTest)
    22482244
     2245  if(getFastDeltaQp())
     2246  {
     2247    const TComSPS &sps=*(rpcTempCU->getSlice()->getSPS());
     2248    const UInt fastDeltaQPCuMaxSize = Clip3(sps.getMaxCUHeight()>>(sps.getLog2DiffMaxMinCodingBlockSize()), sps.getMaxCUHeight(), 32u);
     2249    if(ePartSize != SIZE_2Nx2N || rpcTempCU->getWidth( 0 ) > fastDeltaQPCuMaxSize)
     2250    {
     2251      return; // only check necessary 2Nx2N Inter in fast deltaqp mode
     2252    }
     2253  }
     2254
    22492255  // prior to this, rpcTempCU will have just been reset using rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    22502256#if H_3D || NH_3D_ARP
     
    27402746  DEBUG_STRING_NEW(sTest)
    27412747
     2748  if(getFastDeltaQp())
     2749  {
     2750    const TComSPS &sps=*(rpcTempCU->getSlice()->getSPS());
     2751    const UInt fastDeltaQPCuMaxSize = Clip3(sps.getMaxCUHeight()>>(sps.getLog2DiffMaxMinCodingBlockSize()), sps.getMaxCUHeight(), 32u);
     2752    if(rpcTempCU->getWidth( 0 ) > fastDeltaQPCuMaxSize)
     2753    {
     2754      return; // only check necessary 2Nx2N Intra in fast deltaqp mode
     2755    }
     2756  }
     2757
    27422758  UInt uiDepth = rpcTempCU->getDepth( 0 );
    27432759#if NH_3D_VSO // M5
     
    28442860Void TEncCu::xCheckIntraPCM( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU )
    28452861{
     2862  if(getFastDeltaQp())
     2863  {
     2864    const TComSPS &sps=*(rpcTempCU->getSlice()->getSPS());
     2865    const UInt fastDeltaQPCuMaxPCMSize = Clip3((UInt)1<<sps.getPCMLog2MinSize(), (UInt)1<<sps.getPCMLog2MaxSize(), 32u);
     2866    if (rpcTempCU->getWidth( 0 ) > fastDeltaQPCuMaxPCMSize)
     2867    {
     2868      return;   // only check necessary PCM in fast deltaqp mode
     2869    }
     2870  }
     2871 
    28462872  UInt uiDepth = rpcTempCU->getDepth( 0 );
    28472873
  • branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncCu.h

    r1282 r1287  
    8888  //  Data : encoder control
    8989  Bool                    m_bEncodeDQP;
     90  Bool                    m_bFastDeltaQP;
    9091  Bool                    m_stillToCodeChromaQpOffsetFlag; //indicates whether chroma QP offset flag needs to coded at this particular CU granularity.
    9192  Int                     m_cuChromaQpOffsetIdxPlus1; // if 0, then cu_chroma_qp_offset_flag will be 0, otherwise cu_chroma_qp_offset_flag will be 1.
     
    132133#endif
    133134
     135  Void setFastDeltaQp       ( Bool b)                 { m_bFastDeltaQP = b;         }
     136
    134137protected:
    135138  Void  finishCU            ( TComDataCU*  pcCU, UInt uiAbsPartIdx );
    136139#if AMP_ENC_SPEEDUP
    137   Void  xCompressCU         ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, UInt uiDepth DEBUG_STRING_FN_DECLARE(sDebug), PartSize eParentPartSize = NUMBER_OF_PART_SIZES );
    138 #else
    139   Void  xCompressCU         ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, UInt uiDepth        );
     140  Void  xCompressCU         ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, const UInt uiDepth DEBUG_STRING_FN_DECLARE(sDebug), PartSize eParentPartSize = NUMBER_OF_PART_SIZES );
     141#else
     142  Void  xCompressCU         ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, const UInt uiDepth        );
    140143#endif
    141144  Void  xEncodeCU           ( TComDataCU*  pcCU, UInt uiAbsPartIdx,           UInt uiDepth        );
     
    181184  Void setdQPFlag           ( Bool b )                { m_bEncodeDQP = b;           }
    182185
     186  Bool getFastDeltaQp       () const                  { return m_bFastDeltaQP;      }
     187
    183188  Bool getCodeChromaQpAdjFlag() { return m_stillToCodeChromaQpOffsetFlag; }
    184189  Void setCodeChromaQpAdjFlag( Bool b ) { m_stillToCodeChromaQpOffsetFlag = b; }
  • branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncGOP.cpp

    r1279 r1287  
    12641264    pcSlice->decodingRefreshMarking(m_pocCRA, m_bRefreshPending, rcListPic, m_pcCfg->getEfficientFieldIRAPEnabled());
    12651265    m_pcEncTop->selectReferencePictureSet(pcSlice, pocCurr, iGOPid);
    1266     pcSlice->getRPS()->setNumberOfLongtermPictures(0);
    12671266    if (!m_pcCfg->getEfficientFieldIRAPEnabled())
    12681267    {
     
    17571756      {
    17581757        m_pcSliceEncoder->precompressSlice( pcPic );
    1759         m_pcSliceEncoder->compressSlice   ( pcPic, false );
     1758        m_pcSliceEncoder->compressSlice   ( pcPic, false, false );
    17601759
    17611760        const UInt curSliceSegmentEnd = pcSlice->getSliceSegmentCurEndCtuTsAddr();
     
    27412740Void TEncGOP::arrangeLongtermPicturesInRPS(TComSlice *pcSlice, TComList<TComPic*>& rcListPic)
    27422741{
    2743   TComReferencePictureSet *rps = pcSlice->getRPS();
    2744   if(!rps->getNumberOfLongtermPictures())
     2742  if(pcSlice->getRPS()->getNumberOfLongtermPictures() == 0)
    27452743  {
    27462744    return;
    27472745  }
     2746  // we can only modify the local RPS!
     2747  assert (pcSlice->getRPSidx()==-1);
     2748  TComReferencePictureSet *rps = pcSlice->getLocalRPS();
    27482749
    27492750  // Arrange long-term reference pictures in the correct order of LSB and MSB,
  • branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncSearch.cpp

    r1283 r1287  
    116116
    117117TEncSearch::TEncSearch()
     118: m_puhQTTempTrIdx(NULL)
     119, m_pcQTTempTComYuv(NULL)
     120, m_pcEncCfg (NULL)
     121, m_pcTrQuant (NULL)
     122, m_pcRdCost (NULL)
     123, m_pcEntropyCoder (NULL)
     124, m_iSearchRange (0)
     125, m_bipredSearchRange (0)
     126, m_iFastSearch (0)
     127, m_pppcRDSbacCoder (NULL)
     128, m_pcRDGoOnSbacCoder (NULL)
     129, m_pTempPel (NULL)
     130, m_puiDFilter (NULL)
     131, m_isInitialized (false)
    118132{
    119133  for (UInt ch=0; ch<MAX_NUM_COMPONENT; ch++)
     
    134148    m_puhQTTempTransformSkipFlag[ch]               = NULL;
    135149  }
    136   m_puhQTTempTrIdx                                 = NULL;
    137   m_pcQTTempTComYuv                                = NULL;
    138   m_pcEncCfg                                       = NULL;
    139   m_pcEntropyCoder                                 = NULL;
    140   m_pTempPel                                       = NULL;
     150
     151  for (Int i=0; i<MAX_NUM_REF_LIST_ADAPT_SR; i++)
     152  {
     153    memset (m_aaiAdaptSR[i], 0, MAX_IDX_ADAPT_SR * sizeof (Int));
     154  }
     155  for (Int i=0; i<AMVP_MAX_NUM_CANDS+1; i++)
     156  {
     157    memset (m_auiMVPIdxCost[i], 0, (AMVP_MAX_NUM_CANDS+1) * sizeof (UInt) );
     158  }
     159
    141160  setWpScalingDistParam( NULL, -1, REF_PIC_LIST_X );
    142161}
    143162
    144163
    145 
    146 
    147 TEncSearch::~TEncSearch()
     164Void TEncSearch::destroy()
    148165{
     166  assert (m_isInitialized);
    149167  if ( m_pTempPel )
    150168  {
     
    197215
    198216  m_tmpYuvPred.destroy();
     217  m_isInitialized = false;
     218}
     219
     220TEncSearch::~TEncSearch()
     221{
     222  if (m_isInitialized)
     223  {
     224    destroy();
     225  }
    199226}
    200227
     
    216243                      )
    217244{
     245  assert (!m_isInitialized);
    218246  m_pcEncCfg             = pcEncCfg;
    219247  m_pcTrQuant            = pcTrQuant;
     
    296324  m_pcQTTempTransformSkipTComYuv.create( maxCUWidth, maxCUHeight, pcEncCfg->getChromaFormatIdc() );
    297325  m_tmpYuvPred.create(MAX_CU_SIZE, MAX_CU_SIZE, pcEncCfg->getChromaFormatIdc());
     326  m_isInitialized = true;
    298327}
    299328
     
    12241253
    12251254  //===== init availability pattern =====
    1226   Bool  bAboveAvail = false;
    1227   Bool  bLeftAvail  = false;
    1228 
    12291255  DEBUG_STRING_NEW(sTemp)
    12301256
     
    12351261    const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(compID, uiChFinalMode, uiWidth, uiHeight, chFmt, sps.getSpsRangeExtension().getIntraSmoothingDisabledFlag());
    12361262
    1237     initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, compID, bUseFilteredPredictions DEBUG_STRING_PASS_INTO(sDebug) );
     1263    initIntraPatternChType( rTu, compID, bUseFilteredPredictions DEBUG_STRING_PASS_INTO(sDebug) );
    12381264
    12391265    //===== get prediction signal =====
     
    12461272    {
    12471273#endif
    1248     predIntraAng( compID, uiChFinalMode, piOrg, uiStride, piPred, uiStride, rTu, bAboveAvail, bLeftAvail, bUseFilteredPredictions );
     1274    predIntraAng( compID, uiChFinalMode, piOrg, uiStride, piPred, uiStride, rTu, bUseFilteredPredictions );
    12491275#if NH_3D_DMM
    12501276    }
     
    15751601  checkTransformSkip           &= (!pcCU->getCUTransquantBypass(0));
    15761602
     1603  assert (rTu.ProcessComponentSection(COMPONENT_Y));
     1604  const UInt totalAdjustedDepthChan   = rTu.GetTransformDepthTotalAdj(COMPONENT_Y);
     1605
    15771606  if ( m_pcEncCfg->getUseTransformSkipFast() )
    15781607  {
     
    16091638        }
    16101639
    1611         if (rTu.ProcessComponentSection(COMPONENT_Y))
    1612         {
    1613           const UInt totalAdjustedDepthChan = rTu.GetTransformDepthTotalAdj(COMPONENT_Y);
    1614           pcCU->setTransformSkipSubParts ( modeId, COMPONENT_Y, uiAbsPartIdx, totalAdjustedDepthChan );
    1615 
    1616           xIntraCodingTUBlock( pcOrgYuv, pcPredYuv, pcResiYuv, resiLumaSingle, false, singleDistTmpLuma, COMPONENT_Y, rTu DEBUG_STRING_PASS_INTO(sModeString), default0Save1Load2 );
    1617         }
     1640
     1641        pcCU->setTransformSkipSubParts ( modeId, COMPONENT_Y, uiAbsPartIdx, totalAdjustedDepthChan );
     1642        xIntraCodingTUBlock( pcOrgYuv, pcPredYuv, pcResiYuv, resiLumaSingle, false, singleDistTmpLuma, COMPONENT_Y, rTu DEBUG_STRING_PASS_INTO(sModeString), default0Save1Load2 );
     1643
    16181644        singleCbfTmpLuma = pcCU->getCbf( uiAbsPartIdx, COMPONENT_Y, uiTrDepth );
    16191645
     
    16691695      }
    16701696
    1671       if (rTu.ProcessComponentSection(COMPONENT_Y))
    1672       {
    1673         const UInt totalAdjustedDepthChan   = rTu.GetTransformDepthTotalAdj(COMPONENT_Y);
    1674         pcCU ->setTransformSkipSubParts ( bestModeId[COMPONENT_Y], COMPONENT_Y, uiAbsPartIdx, totalAdjustedDepthChan );
    1675       }
     1697      pcCU ->setTransformSkipSubParts ( bestModeId[COMPONENT_Y], COMPONENT_Y, uiAbsPartIdx, totalAdjustedDepthChan );
    16761698
    16771699      if(bestModeId[COMPONENT_Y] == firstCheckId)
    16781700      {
    16791701        xLoadIntraResultQT(COMPONENT_Y, rTu );
    1680         if (rTu.ProcessComponentSection(COMPONENT_Y))
    1681         {
    1682           pcCU->setCbfSubParts  ( uiSingleCbfLuma << uiTrDepth, COMPONENT_Y, uiAbsPartIdx, rTu.GetTransformDepthTotalAdj(COMPONENT_Y) );
    1683         }
     1702        pcCU->setCbfSubParts  ( uiSingleCbfLuma << uiTrDepth, COMPONENT_Y, uiAbsPartIdx, rTu.GetTransformDepthTotalAdj(COMPONENT_Y) );
    16841703
    16851704        m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiFullDepth ][ CI_TEMP_BEST ] );
     
    16951714      //----- code luma/chroma block with given intra prediction mode and store Cbf-----
    16961715      dSingleCost   = 0.0;
    1697 
    1698       if (rTu.ProcessComponentSection(COMPONENT_Y))
    1699       {
    1700         const UInt totalAdjustedDepthChan   = rTu.GetTransformDepthTotalAdj(COMPONENT_Y);
    1701         pcCU ->setTransformSkipSubParts ( 0, COMPONENT_Y, uiAbsPartIdx, totalAdjustedDepthChan );
    1702       }
    17031716#if NH_3D_ENC_DEPTH
    17041717      xIntraCodingTUBlock( pcOrgYuv, pcPredYuv, pcResiYuv, resiLumaSingle, false, uiSingleDistLuma, COMPONENT_Y, rTu DEBUG_STRING_PASS_INTO(sDebug), zeroResiFlag );
    17051718#else
     1719      pcCU ->setTransformSkipSubParts ( 0, COMPONENT_Y, uiAbsPartIdx, totalAdjustedDepthChan );
    17061720      xIntraCodingTUBlock( pcOrgYuv, pcPredYuv, pcResiYuv, resiLumaSingle, false, uiSingleDistLuma, COMPONENT_Y, rTu DEBUG_STRING_PASS_INTO(sDebug));
    17071721#endif
     
    18351849    pcCU->setTrIdxSubParts( uiTrDepth, uiAbsPartIdx, uiFullDepth );
    18361850    const TComRectangle &tuRect=rTu.getRect(COMPONENT_Y);
    1837     const UInt totalAdjustedDepthChan   = rTu.GetTransformDepthTotalAdj(COMPONENT_Y);
    18381851    pcCU->setCbfSubParts  ( uiSingleCbfLuma << uiTrDepth, COMPONENT_Y, uiAbsPartIdx, totalAdjustedDepthChan );
    18391852    pcCU ->setTransformSkipSubParts  ( bestModeId[COMPONENT_Y], COMPONENT_Y, uiAbsPartIdx, totalAdjustedDepthChan );
     
    18891902  //===== reconstruction =====
    18901903
    1891   Bool bAboveAvail = false;
    1892   Bool bLeftAvail  = false;
    1893 
    18941904  TComTURecurse rTu(pcCU, 0);
    18951905  const ChromaFormat chFmt     = rTu.GetChromaFormat();
     
    18981908  {
    18991909    const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, VER_IDX, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag());
    1900     initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, COMPONENT_Y, bUseFilteredPredictions  DEBUG_STRING_PASS_INTO(sTemp) );
    1901     predIntraAng( COMPONENT_Y, VER_IDX, 0, uiStride, piPred, uiStride, rTu, bAboveAvail, bLeftAvail, bUseFilteredPredictions );
     1910    initIntraPatternChType( rTu, COMPONENT_Y, bUseFilteredPredictions  DEBUG_STRING_PASS_INTO(sTemp) );
     1911    predIntraAng( COMPONENT_Y, VER_IDX, 0, uiStride, piPred, uiStride, rTu, bUseFilteredPredictions );
    19021912  }
    19031913  else if ( uiPredMode == 1 )
    19041914  {
    19051915    const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, HOR_IDX, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag());
    1906     initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, COMPONENT_Y, bUseFilteredPredictions  DEBUG_STRING_PASS_INTO(sTemp) );
    1907     predIntraAng( COMPONENT_Y, HOR_IDX, 0, uiStride, piPred, uiStride, rTu, bAboveAvail, bLeftAvail, bUseFilteredPredictions );
     1916    initIntraPatternChType( rTu, COMPONENT_Y, bUseFilteredPredictions  DEBUG_STRING_PASS_INTO(sTemp) );
     1917    predIntraAng( COMPONENT_Y, HOR_IDX, 0, uiStride, piPred, uiStride, rTu, bUseFilteredPredictions );
    19081918  }
    19091919  else if ( uiPredMode == 2 )
     
    20192029    TComTURecurse tuRecurseWithPU(tuRecurseCU, false, TComTU::DONT_SPLIT);
    20202030
    2021     Bool bAboveAvail = false;
    2022     Bool bLeftAvail  = false;
    2023     initIntraPatternChType( tuRecurseWithPU, bAboveAvail, bLeftAvail, COMPONENT_Y, false DEBUG_STRING_PASS_INTO(sTemp) );
     2031    initIntraPatternChType( tuRecurseWithPU, COMPONENT_Y, false DEBUG_STRING_PASS_INTO(sTemp) );
    20242032
    20252033    // get partition
     
    20752083     
    20762084      //===== init pattern for luma prediction =====
    2077       Bool bAboveAvail = false;
    2078       Bool bLeftAvail  = false;
    20792085     
    2080       initIntraPatternChType( tuRecurseWithPU, bAboveAvail, bLeftAvail, COMPONENT_Y, bUseFilter DEBUG_STRING_PASS_INTO(sTemp2) );
     2086      initIntraPatternChType( tuRecurseWithPU, COMPONENT_Y, bUseFilter DEBUG_STRING_PASS_INTO(sTemp2) );
    20812087     
    2082       predIntraAng( COMPONENT_Y, uiLumaPredMode, piOrgTU, uiStrideTU, piPredTU, uiStrideTU, tuRecurseWithPU, bAboveAvail, bLeftAvail, bUseFilter );
     2088      predIntraAng( COMPONENT_Y, uiLumaPredMode, piOrgTU, uiStrideTU, piPredTU, uiStrideTU, tuRecurseWithPU, bUseFilter );
    20832089     
    20842090      // copy for prediction of next part
     
    28582864  //{
    28592865    //===== init pattern for luma prediction =====
    2860     Bool bAboveAvail = false;
    2861     Bool bLeftAvail  = false;
    28622866    DEBUG_STRING_NEW(sTemp2)
    28632867
     
    28672871    Int numModesForFullRD = m_pcEncCfg->getFastUDIUseMPMEnabled()?g_aucIntraModeNumFast_UseMPM[ uiWidthBit ] : g_aucIntraModeNumFast_NotUseMPM[ uiWidthBit ];
    28682872
    2869     if (tuRecurseWithPU.ProcessComponentSection(COMPONENT_Y))
    2870     {
    2871       initIntraPatternChType( tuRecurseWithPU, bAboveAvail, bLeftAvail, COMPONENT_Y, true DEBUG_STRING_PASS_INTO(sTemp2) );
    2872     }
     2873    // this should always be true
     2874    assert (tuRecurseWithPU.ProcessComponentSection(COMPONENT_Y));
     2875    initIntraPatternChType( tuRecurseWithPU, COMPONENT_Y, true DEBUG_STRING_PASS_INTO(sTemp2) );
    28732876#if NH_3D_ENC_DEPTH
    28742877    if( bOnlyIVP )
     
    29172920        const Bool bUseFilter=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, uiMode, puRect.width, puRect.height, chFmt, sps.getSpsRangeExtension().getIntraSmoothingDisabledFlag());
    29182921
    2919         predIntraAng( COMPONENT_Y, uiMode, piOrg, uiStride, piPred, uiStride, tuRecurseWithPU, bAboveAvail, bLeftAvail, bUseFilter, TComPrediction::UseDPCMForFirstPassIntraEstimation(tuRecurseWithPU, uiMode) );
     2922        predIntraAng( COMPONENT_Y, uiMode, piOrg, uiStride, piPred, uiStride, tuRecurseWithPU, bUseFilter, TComPrediction::UseDPCMForFirstPassIntraEstimation(tuRecurseWithPU, uiMode) );
    29202923#if NH_3D_VSO // M34
    29212924        Dist uiSad;           
     
    63666369                  nonCoeffDist = m_pcRdCost->getDistPart( channelBitDepth, m_pcQTTempTComYuv[uiQTTempAccessLayer].getAddrPix( compID, tuCompRect.x0, tuCompRect.y0 ),
    63676370                                                          m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride( compID ), pcResi->getAddrPix( compID, tuCompRect.x0, tuCompRect.y0 ),
    6368                                                           pcResi->getStride(compID), tuCompRect.width, tuCompRect.height, compID); // initialized with zero residual destortion
     6371                                                          pcResi->getStride(compID), tuCompRect.width, tuCompRect.height, compID); // initialized with zero residual distortion
    63696372                }
    63706373                else
     
    63886391#endif
    63896392                    nonCoeffDist = m_pcRdCost->getDistPart( channelBitDepth, m_pTempPel, tuCompRect.width, pcResi->getAddrPix( compID, tuCompRect.x0, tuCompRect.y0 ),
    6390                                                           pcResi->getStride(compID), tuCompRect.width, tuCompRect.height, compID); // initialized with zero residual destortion
     6393                                                          pcResi->getStride(compID), tuCompRect.width, tuCompRect.height, compID); // initialized with zero residual distortion
    63916394                   
    63926395                }
     
    64126415              if((puiZeroDist != NULL) && isFirstMode)
    64136416              {
    6414                 *puiZeroDist += nonCoeffDist; // initialized with zero residual destortion
     6417                *puiZeroDist += nonCoeffDist; // initialized with zero residual distortion
    64156418              }
    64166419
  • branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncSearch.h

    r1279 r1287  
    127127  TComMv          m_integerMv2Nx2N[NUM_REF_PIC_LIST_01][MAX_NUM_REF];
    128128
     129  Bool            m_isInitialized;
    129130public:
    130131  TEncSearch();
    131132  virtual ~TEncSearch();
    132133
    133   Void init(  TEncCfg*      pcEncCfg,
     134  Void init(TEncCfg*      pcEncCfg,
    134135            TComTrQuant*  pcTrQuant,
    135136            Int           iSearchRange,
     
    143144            TEncSbac***   pppcRDSbacCoder,
    144145            TEncSbac*     pcRDGoOnSbacCoder );
     146
     147  Void destroy();
    145148
    146149protected:
  • branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncSlice.cpp

    r1279 r1287  
    680680
    681681    // try compress
    682     compressSlice   ( pcPic, true );
     682    compressSlice   ( pcPic, true, m_pcCfg->getFastDeltaQp());
    683683
    684684#if NH_3D_VSO
     
    751751/** \param pcPic   picture class
    752752 */
    753 Void TEncSlice::compressSlice( TComPic* pcPic, const Bool bCompressEntireSlice )
     753Void TEncSlice::compressSlice( TComPic* pcPic, const Bool bCompressEntireSlice, const Bool bFastDeltaQP )
    754754{
    755755  // if bCompressEntireSlice is true, then the entire slice (not slice segment) is compressed,
     
    781781  TComBitCounter  tempBitCounter;
    782782  const UInt      frameWidthInCtus = pcPic->getPicSym()->getFrameWidthInCtus();
     783 
     784  m_pcCuEncoder->setFastDeltaQp(bFastDeltaQP);
    783785
    784786  //------------------------------------------------------------------------------
  • branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncSlice.h

    r1200 r1287  
    126126  // compress and encode slice
    127127  Void    precompressSlice    ( TComPic* pcPic                                     );      ///< precompress slice for multi-loop slice-level QP opt.
    128   Void    compressSlice       ( TComPic* pcPic, const Bool bCompressEntireSlice    );      ///< analysis stage of slice
     128  Void    compressSlice       ( TComPic* pcPic, const Bool bCompressEntireSlice, const Bool bFastDeltaQP );      ///< analysis stage of slice
    129129  Void    calCostSliceI       ( TComPic* pcPic );
    130130  Void    encodeSlice         ( TComPic* pcPic, TComOutputBitstream* pcSubstreams, UInt &numBinsCoded );
  • branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncTop.cpp

    r1279 r1287  
    174174  m_cLoopFilter.        destroy();
    175175  m_cRateCtrl.          destroy();
     176  m_cSearch.            destroy();
    176177  Int iDepth;
    177178  for ( iDepth = 0; iDepth < m_maxTotalCUDepth+1; iDepth++ )
     
    953954      hrd->setCpbSizeValueMinus1( i, j, 0, ( cpbSizeValue - 1 ) );
    954955      hrd->setDuCpbSizeValueMinus1( i, j, 0, ( duCpbSizeValue - 1 ) );
     956      hrd->setDuBitRateValueMinus1( i, j, 0, ( duBitRateValue - 1 ) );
    955957      hrd->setCbrFlag( i, j, 0, false );
    956958
     
    13231325  }
    13241326
    1325   TComReferencePictureSet *rps=slice->getLocalRPS();
    1326   (*rps) = *(slice->getSPS()->getRPSList()->getReferencePictureSet(slice->getRPSidx()));
     1327  const TComReferencePictureSet *rps = (slice->getSPS()->getRPSList()->getReferencePictureSet(slice->getRPSidx()));
    13271328  slice->setRPS(rps);
    1328   slice->getRPS()->setNumberOfPictures(slice->getRPS()->getNumberOfNegativePictures()+slice->getRPS()->getNumberOfPositivePictures());
    13291329#if NH_MV
    13301330  }
Note: See TracChangeset for help on using the changeset viewer.