Changeset 1248 in SHVCSoftware for branches/SHM-dev


Ignore:
Timestamp:
14 Jul 2015, 00:33:29 (9 years ago)
Author:
seregin
Message:

port rev 4242

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

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibCommon/TComLoopFilter.cpp

    r1246 r1248  
    454454    else
    455455    {
    456       if (edgeDir == EDGE_HOR)
    457       {
    458         pcCUP = pcCUQ->getPUAbove(uiPartP, uiPartQ, !pCtu->getSlice()->getLFCrossSliceBoundaryFlag(), false, !m_bLFCrossTileBoundary);
    459       }
    460456      if (pcSlice->isInterB() || pcCUP->getSlice()->isInterB())
    461457      {
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCu.cpp

    r1246 r1248  
    13801380          }
    13811381
    1382           rpcTempCU->setSkipFlagSubParts( rpcTempCU->getQtRootCbf(0) == 0, 0, uhDepth );
    13831382          Int orgQP = rpcTempCU->getQP( 0 );
    13841383          xCheckDQP( rpcTempCU );
     
    14431442  DEBUG_STRING_NEW(sTest)
    14441443
     1444  // prior to this, rpcTempCU will have just been reset using rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    14451445  UChar uhDepth = rpcTempCU->getDepth( 0 );
    1446 
    1447   rpcTempCU->setDepthSubParts( uhDepth, 0 );
    1448 
    1449   rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
    14501446
    14511447  rpcTempCU->setPartSizeSubParts  ( ePartSize,  0, uhDepth );
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp

    r1247 r1248  
    22752275#endif
    22762276
    2277       for( Int i=0; i < numModesForFullRD; i++ ) 
     2277      for( Int i=0; i < numModesForFullRD; i++ )
    22782278      {
    22792279        CandCostList[ i ] = MAX_DOUBLE;
     
    23342334      pcCU->getIntraDirPredictor( uiPartOffset, uiPreds, COMPONENT_Y, &iMode );
    23352335#endif
    2336       const Int numCand = ( iMode >= 0 ) ? iMode : Int(NUM_MOST_PROBABLE_MODES);     
     2336      const Int numCand = ( iMode >= 0 ) ? iMode : Int(NUM_MOST_PROBABLE_MODES);
    23372337
    23382338      for( Int j=0; j < numCand; j++)
     
    45154515  UInt        uiHeight     = pcCU->getHeight( 0 );
    45164516
     4517  // The pcCU is not marked as skip-mode at this point, and its coeffs and arlCoeffs will all be 0.
     4518  // due to prior calls to TComDataCU::initEstData(  );
     4519
    45174520  //  No residual coding : SKIP mode
    45184521  if ( bSkipRes )
     
    45824585  }
    45834586
     4587  // TODO: there should be a check on the CU depth (but see to-do below regarding this feature) eg:
     4588  // bHighPass = (bHighPass && pcCU->getDepth(0) <= pcCU->getSlice()->getPPS()->getMaxCuDQPDepth());
    45844589#if SVC_EXTENSION
    45854590  qpMin =  bHighPass ? Clip3( -pcCU->getSlice()->getQpBDOffsetY(), MAX_QP, pcCU->getQP(0) - m_iMaxDeltaQP ) : pcCU->getQP( 0 );
     
    45944599  TComTURecurse tuLevel0(pcCU, 0);
    45954600
    4596   for ( qp = qpMin; qp <= qpMax; qp++ )
     4601  for ( qp = qpMin; qp <= qpMax; qp++ ) // TODO: see the to-do below about this loop.
    45974602  {
    45984603    dCost = 0.;
    45994604    uiBits = 0;
    46004605    uiDistortion = 0;
     4606
     4607    // TODO: see the to-do below. eg:
     4608    //if (qpMin != qpMax)
     4609    //{
     4610    //  pcCU->setQPSubParts(qp, 0, pcCU->getDepth(0));
     4611    //  pcCU->setSkipFlagSubParts(false, 0, pcCU->getDepth(0));
     4612    //}
    46014613
    46024614    m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ pcCU->getDepth( 0 ) ][ CI_CURR_BEST ] );
     
    46214633    }
    46224634
    4623     if ( dZeroCost < dCost )
     4635    const Bool bRootCbf=pcCU->getQtRootCbf(0)!=0;
     4636    if ( dZeroCost < dCost || !bRootCbf )
    46244637    {
    46254638      if ( dZeroCost < dCost )
     
    46344647      {
    46354648        const ComponentID component = ComponentID(ch);
    4636         const UInt componentShift   = pcCU->getPic()->getComponentScaleX(component) + pcCU->getPic()->getComponentScaleY(component);
    46374649        ::memset( pcCU->getCbf( component ) , 0, uiQPartNum * sizeof(UChar) );
    4638         ::memset( pcCU->getCoeff(component), 0, (uiWidth*uiHeight*sizeof(TCoeff))>>componentShift );
     4650        if (qpMin != qpMax) // If there is only one iteration, then these will already be 0.
     4651        {
     4652          const UInt componentShift   = pcCU->getPic()->getComponentScaleX(component) + pcCU->getPic()->getComponentScaleY(component);
     4653          ::memset( pcCU->getCoeff(component), 0, (uiWidth*uiHeight*sizeof(TCoeff))>>componentShift );
     4654#if ADAPTIVE_QP_SELECTION
     4655          ::memset( pcCU->getArlCoeff(component), 0, (uiWidth*uiHeight*sizeof(TCoeff))>>componentShift );
     4656#endif
     4657        }
    46394658        ::memset( pcCU->getCrossComponentPredictionAlpha(component), 0, ( uiQPartNum * sizeof(Char) ) );
    46404659      }
     
    47064725  if( qpMin != qpMax && qpBest != qpMax )
    47074726  {
     4727    // TODO: this code has never been used, the qp doesn't change the QP coded, and the following assert prevented this code running.
     4728    //        also, skip flag got stuck-on, as nothing cleared it. Recommend removing this.
    47084729    assert( 0 ); // check
    47094730    m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ pcCU->getDepth( 0 ) ][ CI_TEMP_BEST ] );
     
    47244745      ::memcpy( pcCU->getCrossComponentPredictionAlpha(compID),  m_phQTTempCrossComponentPredictionAlpha[compID], uiQPartNum * sizeof( Char ) );
    47254746    }
     4747    // TODO: see to-do above. eg:
     4748    // pcCU->setSkipFlagSubParts(  (pcCU->getMergeFlag( 0 ) && pcCU->getPartitionSize( 0 ) == SIZE_2Nx2N && !pcCU->getQtRootCbf( 0 )), 0, pcCU->getDepth(0) );
    47264749  }
    47274750  pcYuvRec->addClip ( pcYuvPred, pcYuvResiBest, 0, uiWidth );
     
    47414764  pcCU->getTotalCost()       = dCostBest;
    47424765
    4743   if ( pcCU->isSkipped(0) )
    4744   {
    4745     static const UInt cbfZero[MAX_NUM_COMPONENT]={0,0,0};
    4746     pcCU->setCbfSubParts( cbfZero, 0, pcCU->getDepth( 0 ) );
    4747   }
    4748 
    4749   pcCU->setQPSubParts( qpBest, 0, pcCU->getDepth(0) );
     4766  if( qpMin != qpMax) // TODO: see to-do above
     4767  {
     4768    pcCU->setQPSubParts( qpBest, 0, pcCU->getDepth(0) );
     4769  }
    47504770}
    47514771
     
    54755495
    54765496
    5477 Void TEncSearch::xSetResidualQTData( TComYuv* pcResi, Bool bSpatial, TComTU &rTu )
     5497Void TEncSearch::xSetResidualQTData( TComYuv* pcResi, Bool bSpatial, TComTU &rTu ) // TODO: turn this into two functions for bSpatial=true and false.
    54785498{
    54795499  TComDataCU* pcCU=rTu.getCU();
Note: See TracChangeset for help on using the changeset viewer.