Changeset 17 in SHVCSoftware for trunk/source/Lib/TLibEncoder


Ignore:
Timestamp:
29 Jan 2013, 03:06:57 (12 years ago)
Author:
seregin
Message:

NO_RESIDUAL_FLAG_FOR_BLPRED: Root cbf for Intra_BL (L0437)

Location:
trunk/source/Lib/TLibEncoder
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibEncoder/TEncCu.cpp

    r2 r17  
    15031503
    15041504  m_pcPredSearch->setBaseRecPic( m_pcPicYuvRecBase );
     1505#if NO_RESIDUAL_FLAG_FOR_BLPRED
     1506  rpcTempCU->setDepthSubParts( uiDepth, 0 );
     1507  //   rpcTempCU->setLumaIntraDirSubParts( DC_IDX, 0, uiDepth );
     1508  //   rpcTempCU->setChromIntraDirSubParts( DC_IDX, 0, uiDepth );
     1509  m_ppcPredYuvTemp[uiDepth]->copyFromPicLuma  ( rpcTempCU->getSlice()->getFullPelBaseRec(),  rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU(), 0, rpcTempCU->getWidth(0), rpcTempCU->getHeight(0));
     1510  m_ppcPredYuvTemp[uiDepth]->copyFromPicChroma( rpcTempCU->getSlice()->getFullPelBaseRec(),  rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU(), 0, (rpcTempCU->getWidth(0)>>1), (rpcTempCU->getHeight(0)>>1), 0);
     1511  m_ppcPredYuvTemp[uiDepth]->copyFromPicChroma( rpcTempCU->getSlice()->getFullPelBaseRec(),  rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU(), 0, (rpcTempCU->getWidth(0)>>1), (rpcTempCU->getHeight(0)>>1), 1);
     1512  m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcResiYuvBest[uiDepth], m_ppcRecoYuvTemp[uiDepth], false );
     1513  rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
     1514#else
     1515
    15051516  m_pcPredSearch->estIntraBLPredQT( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth] );
    15061517
     
    15261537  }
    15271538  rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
     1539#endif
    15281540 
    15291541  xCheckDQP( rpcTempCU );
  • trunk/source/Lib/TLibEncoder/TEncEntropy.cpp

    r6 r17  
    476476#endif
    477477#if INTRA_BL
     478#if NO_RESIDUAL_FLAG_FOR_BLPRED
     479    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 ) )
     480#else
    478481    if( ( !pcCU->isIntra( uiAbsPartIdx ) ) && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )
     482#endif
    479483#else   
    480484    if( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )
     
    754758  pcCU->convertTransIdx( uiAbsPartIdx, pcCU->getTransformIdx(uiAbsPartIdx), uiLumaTrMode, uiChromaTrMode );
    755759 
     760#if NO_RESIDUAL_FLAG_FOR_BLPRED
     761  if( pcCU->isIntra(uiAbsPartIdx) && !pcCU->isIntraBL(uiAbsPartIdx) )
     762#else
    756763  if( pcCU->isIntra(uiAbsPartIdx) )
     764#endif
    757765  {
    758766    DTRACE_CABAC_VL( g_nSymbolCounter++ )
  • trunk/source/Lib/TLibEncoder/TEncSearch.cpp

    r6 r17  
    47174717Void TEncSearch::encodeResAndCalcRdInterCU( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* pcYuvPred, TComYuv*& rpcYuvResi, TComYuv*& rpcYuvResiBest, TComYuv*& rpcYuvRec, Bool bSkipRes )
    47184718{
     4719#if NO_RESIDUAL_FLAG_FOR_BLPRED
     4720  if ( pcCU->isIntra(0) && !pcCU->isIntraBL(0))
     4721#else
    47194722  if ( pcCU->isIntra(0) )
     4723#endif
    47204724  {
    47214725    return;
     
    48404844#endif
    48414845    }
     4846#if NO_RESIDUAL_FLAG_FOR_BLPRED
     4847    else if(pcCU->getLayerId() > 0 && pcCU->isIntraBL(0) && uiZeroDistortion == uiDistortion) // all zeros
     4848    {
     4849      const UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> (pcCU->getDepth(0) << 1);
     4850      ::memset( pcCU->getTransformIdx()      , 0, uiQPartNum * sizeof(UChar) );
     4851      ::memset( pcCU->getCbf( TEXT_LUMA )    , 0, uiQPartNum * sizeof(UChar) );
     4852      ::memset( pcCU->getCbf( TEXT_CHROMA_U ), 0, uiQPartNum * sizeof(UChar) );
     4853      ::memset( pcCU->getCbf( TEXT_CHROMA_V ), 0, uiQPartNum * sizeof(UChar) );
     4854      ::memset( pcCU->getCoeffY()            , 0, uiWidth * uiHeight * sizeof( TCoeff )      );
     4855      ::memset( pcCU->getCoeffCb()           , 0, uiWidth * uiHeight * sizeof( TCoeff ) >> 2 );
     4856      ::memset( pcCU->getCoeffCr()           , 0, uiWidth * uiHeight * sizeof( TCoeff ) >> 2 );
     4857#if INTER_TRANSFORMSKIP
     4858      pcCU->setTransformSkipSubParts ( 0, 0, 0, 0, pcCU->getDepth(0) );
     4859#endif
     4860    }
     4861#endif
    48424862    else
    48434863    {
     
    51755195      Int scalingListType = 3 + g_eTTable[(Int)TEXT_LUMA];
    51765196      assert(scalingListType < 6);     
     5197#if NO_RESIDUAL_FLAG_FOR_BLPRED
     5198      if(pcCU->isIntraBL(uiAbsPartIdx) )
     5199        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
     5200      else
     5201        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
     5202#else
    51775203      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
     5204#endif
    51785205     
    51795206      const UInt uiNonzeroDistY = m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),
     
    55145541        assert(scalingListType < 6);     
    55155542
     5543#if NO_RESIDUAL_FLAG_FOR_BLPRED
     5544        if(pcCU->isIntraBL(uiAbsPartIdx) )
     5545          m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,DC_IDX, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),  pcCoeffCurrY, trWidth, trHeight, scalingListType, true );
     5546        else
     5547          m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),  pcCoeffCurrY, trWidth, trHeight, scalingListType, true );
     5548#else
    55165549        m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),  pcCoeffCurrY, trWidth, trHeight, scalingListType, true );
     5550#endif
    55175551
    55185552        uiNonzeroDistY = m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),
     
    58825916  {
    58835917#if INTRA_BL
     5918#if NO_RESIDUAL_FLAG_FOR_BLPRED
     5919    assert( !pcCU->isIntra(uiAbsPartIdx) || pcCU->isIntraBL(uiAbsPartIdx));
     5920#else
    58845921    assert( !pcCU->isIntra(uiAbsPartIdx) );
     5922#endif
    58855923#else
    58865924    assert( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA );
     
    61596197    {
    61606198      m_pcEntropyCoder->encodeIntraBLFlag(pcCU, 0, true);
     6199#if !NO_RESIDUAL_FLAG_FOR_BLPRED
    61616200      assert( pcCU->isIntraBL( 0 ) == false );
    6162     }
     6201#endif
     6202    }
     6203#endif
     6204#if NO_RESIDUAL_FLAG_FOR_BLPRED
     6205    if( !pcCU->isIntraBL(0))
     6206    {
    61636207#endif
    61646208    m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
    61656209    m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth(0), true );
    61666210    m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
     6211#if NO_RESIDUAL_FLAG_FOR_BLPRED
     6212    }
     6213#endif
    61676214    Bool bDummy = false;
    61686215    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.