Changeset 319 in SHVCSoftware for branches/SHM-3.0-dev/source/Lib/TLibEncoder


Ignore:
Timestamp:
2 Aug 2013, 22:20:38 (11 years ago)
Author:
seregin
Message:

remove NO_RESIDUAL_FLAG_FOR_BLPRED

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

Legend:

Unmodified
Added
Removed
  • branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCu.cpp

    r313 r319  
    18891889
    18901890  m_pcPredSearch->setBaseRecPic( m_pcPicYuvRecBase );
    1891 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    1892   rpcTempCU->setDepthSubParts( uiDepth, 0 );
    1893   //   rpcTempCU->setLumaIntraDirSubParts( DC_IDX, 0, uiDepth );
    1894   //   rpcTempCU->setChromIntraDirSubParts( DC_IDX, 0, uiDepth );
    1895   m_ppcPredYuvTemp[uiDepth]->copyFromPicLuma  ( rpcTempCU->getSlice()->getFullPelBaseRec(rpcTempCU->getLayerId() - 1),  rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU(), 0, rpcTempCU->getWidth(0), rpcTempCU->getHeight(0));
    1896   m_ppcPredYuvTemp[uiDepth]->copyFromPicChroma( rpcTempCU->getSlice()->getFullPelBaseRec(rpcTempCU->getLayerId() - 1),  rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU(), 0, (rpcTempCU->getWidth(0)>>1), (rpcTempCU->getHeight(0)>>1), 0);
    1897   m_ppcPredYuvTemp[uiDepth]->copyFromPicChroma( rpcTempCU->getSlice()->getFullPelBaseRec(rpcTempCU->getLayerId() - 1),  rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU(), 0, (rpcTempCU->getWidth(0)>>1), (rpcTempCU->getHeight(0)>>1), 1);
    1898   m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcResiYuvBest[uiDepth], m_ppcRecoYuvTemp[uiDepth], false );
    1899   rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
    1900 #else
    1901 
    19021891  m_pcPredSearch->estIntraBLPredQT( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth] );
    19031892
     
    19231912  }
    19241913  rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
    1925 #endif
    19261914 
    19271915  xCheckDQP( rpcTempCU );
  • branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncEntropy.cpp

    r313 r319  
    343343   
    344344#if INTRA_BL
    345 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    346     if( ( !pcCU->isIntra( uiAbsPartIdx ) || pcCU->isIntraBL(uiAbsPartIdx)) && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )
    347 #else
    348345    if( ( !pcCU->isIntra( uiAbsPartIdx ) ) && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )
    349 #endif
    350346#else
    351347    if( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )
     
    607603  UInt uiChromaOffset = uiLumaOffset>>2;
    608604   
    609 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    610   if( pcCU->isIntra(uiAbsPartIdx) && !pcCU->isIntraBL(uiAbsPartIdx) )
    611 #else
    612605  if( pcCU->isIntra(uiAbsPartIdx) )
    613 #endif
    614606  {
    615607    DTRACE_CABAC_VL( g_nSymbolCounter++ )
  • branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncSearch.cpp

    r313 r319  
    10551055    pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, uiTrDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
    10561056    //===== get prediction signal =====
    1057 #if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED
     1057#if INTRA_BL
    10581058    if(pcCU->isIntraBL ( uiAbsPartIdx ) )
    10591059    {
     
    12471247
    12481248    //===== get prediction signal =====
    1249 #if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED
     1249#if INTRA_BL
    12501250  if(pcCU->isIntraBL ( uiAbsPartIdx ) )
    12511251  {
     
    45674567Void TEncSearch::encodeResAndCalcRdInterCU( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* pcYuvPred, TComYuv*& rpcYuvResi, TComYuv*& rpcYuvResiBest, TComYuv*& rpcYuvRec, Bool bSkipRes )
    45684568{
    4569 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    4570   if ( pcCU->isIntra(0) && !pcCU->isIntraBL(0))
    4571 #else
    45724569  if ( pcCU->isIntra(0) )
    4573 #endif
    45744570  {
    45754571    return;
     
    46824678      pcCU->setTransformSkipSubParts ( 0, 0, 0, 0, pcCU->getDepth(0) );
    46834679    }
    4684 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    4685     else if(pcCU->getLayerId() > 0 && pcCU->isIntraBL(0) && uiZeroDistortion == uiDistortion) // all zeros
    4686     {
    4687       const UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> (pcCU->getDepth(0) << 1);
    4688       ::memset( pcCU->getTransformIdx()      , 0, uiQPartNum * sizeof(UChar) );
    4689       ::memset( pcCU->getCbf( TEXT_LUMA )    , 0, uiQPartNum * sizeof(UChar) );
    4690       ::memset( pcCU->getCbf( TEXT_CHROMA_U ), 0, uiQPartNum * sizeof(UChar) );
    4691       ::memset( pcCU->getCbf( TEXT_CHROMA_V ), 0, uiQPartNum * sizeof(UChar) );
    4692       ::memset( pcCU->getCoeffY()            , 0, uiWidth * uiHeight * sizeof( TCoeff )      );
    4693       ::memset( pcCU->getCoeffCb()           , 0, uiWidth * uiHeight * sizeof( TCoeff ) >> 2 );
    4694       ::memset( pcCU->getCoeffCr()           , 0, uiWidth * uiHeight * sizeof( TCoeff ) >> 2 );
    4695       pcCU->setTransformSkipSubParts ( 0, 0, 0, 0, pcCU->getDepth(0) );
    4696     }
    4697 #endif
    46984680    else
    46994681    {
     
    49944976      Int scalingListType = 3 + g_eTTable[(Int)TEXT_LUMA];
    49954977      assert(scalingListType < 6);     
    4996 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    4997       if(pcCU->isIntraBL(uiAbsPartIdx) )
    4998       {
    4999         m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,DC_IDX, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),  pcCoeffCurrY, trWidth, trHeight, scalingListType );//this is for inter mode only
    5000       }
    5001       else
    5002       {
    5003         m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),  pcCoeffCurrY, trWidth, trHeight, scalingListType );//this is for inter mode only
    5004       }
    5005 #else
    50064978      m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),  pcCoeffCurrY, trWidth, trHeight, scalingListType );//this is for inter mode only
    5007 #endif
    5008      
    50094979      const UInt uiNonzeroDistY = m_pcRdCost->getDistPart(g_bitDepthY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),
    50104980      pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth,trHeight );
     
    52755245        assert(scalingListType < 6);     
    52765246
    5277 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    5278         if(pcCU->isIntraBL(uiAbsPartIdx) )
    5279         {
    5280           m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,DC_IDX, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),  pcCoeffCurrY, trWidth, trHeight, scalingListType, true );
    5281         }
    5282         else
    5283         {
    5284           m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),  pcCoeffCurrY, trWidth, trHeight, scalingListType, true );
    5285         }
    5286 #else
    52875247        m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),  pcCoeffCurrY, trWidth, trHeight, scalingListType, true );
    5288 #endif
    52895248
    52905249        uiNonzeroDistY = m_pcRdCost->getDistPart(g_bitDepthY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),
     
    56185577  {
    56195578#if INTRA_BL
    5620 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    5621     assert( !pcCU->isIntra(uiAbsPartIdx) || pcCU->isIntraBL(uiAbsPartIdx));
    5622 #else
    56235579    assert( !pcCU->isIntra(uiAbsPartIdx) );
    5624 #endif
    56255580#else
    56265581    assert( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA );
     
    58635818    {
    58645819      m_pcEntropyCoder->encodeIntraBLFlag(pcCU, 0, true);
    5865 #if !NO_RESIDUAL_FLAG_FOR_BLPRED
    58665820      assert( pcCU->isIntraBL( 0 ) == false );
    5867 #endif
    5868     }
    5869 #endif
    5870 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    5871     if( !pcCU->isIntraBL(0))
    5872     {
     5821    }
    58735822#endif
    58745823    m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
    58755824    m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth(0), true );
    58765825    m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
    5877 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    5878     }
    5879 #endif
     5826
    58805827    Bool bDummy = false;
    58815828    m_pcEntropyCoder->encodeCoeff   ( pcCU, 0, pcCU->getDepth(0), pcCU->getWidth(0), pcCU->getHeight(0), bDummy );
Note: See TracChangeset for help on using the changeset viewer.