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


Ignore:
Timestamp:
17 Aug 2013, 06:27:19 (12 years ago)
Author:
seregin
Message:

merge SHM-3.0-dev branch

Location:
trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/source

  • trunk/source/Lib/TLibEncoder/TEncCavlc.cpp

    r313 r345  
    708708  }
    709709
     710#if SPL_FLG_CHK
     711  if(vps->getSplittingFlag())
     712  {
     713    UInt splDimSum=0;
     714    for(j = 0; j < vps->getNumScalabilityTypes(); j++)
     715    {
     716      splDimSum+=(vps->getDimensionIdLen(j));
     717    }
     718    assert(splDimSum<=6);
     719  }
     720#endif
     721
    710722  WRITE_FLAG( vps->getNuhLayerIdPresentFlag(),         "vps_nuh_layer_id_present_flag" );
    711723  for(i = 1; i < vps->getMaxLayers(); i++)
     
    737749#endif
    738750#if JCTVC_M0203_INTERLAYER_PRED_IDC
     751#if N0120_MAX_TID_REF_PRESENT_FLAG
     752   WRITE_FLAG( vps->getMaxTidIlRefPicsPlus1PresentFlag(), "max_tid_il_ref_pics_plus1_present_flag");
     753   if (vps->getMaxTidIlRefPicsPlus1PresentFlag())
     754   {
     755     for( i = 0; i < vps->getMaxLayers() - 1; i++)
     756     {
     757       WRITE_CODE(vps->getMaxSublayerForIlpPlus1(i), 3, "max_sublayer_for_ilp_plus1[i]" );
     758     }
     759   }
     760#else
    739761  for( i = 0; i < vps->getMaxLayers() - 1; i++)
    740762  {
    741763    WRITE_CODE(vps->getMaxSublayerForIlpPlus1(i), 3, "max_sublayer_for_ilp_plus1[i]" );
    742764  }
     765#endif
     766#endif
     767#if ILP_SSH_SIG
     768    WRITE_FLAG( vps->getIlpSshSignalingEnabledFlag(), "all_ref_layers_active_flag" );
    743769#endif
    744770#if VPS_EXTN_PROFILE_INFO
     
    10521078    }
    10531079
    1054 #if JCTVC_M0458_INTERLAYER_RPS_SIG   
    1055     if((pcSlice->getSPS()->getLayerId() > 0)  &&  (pcSlice->getNumILRRefIdx() > 0) )
     1080#if JCTVC_M0458_INTERLAYER_RPS_SIG
     1081#if ILP_SSH_SIG
     1082    if((pcSlice->getSPS()->getLayerId() > 0) && pcSlice->getVPS()->getIlpSshSignalingEnabledFlag() && (pcSlice->getNumILRRefIdx() > 0) )
     1083#else
     1084    if((pcSlice->getSPS()->getLayerId() > 0)  &&  (pcSlice->getNumILRRefIdx() > 0) )
     1085#endif
    10561086    {
    10571087      WRITE_FLAG(pcSlice->getInterLayerPredEnabledFlag(),"inter_layer_pred_enabled_flag");
     
    10691099            WRITE_CODE(pcSlice->getActiveNumILRRefIdx() - 1, numBits,"num_inter_layer_ref_pics_minus1");
    10701100          }       
     1101#if ILP_NUM_REF_CHK
     1102          if( pcSlice->getNumILRRefIdx() != pcSlice->getActiveNumILRRefIdx() )
     1103          {
     1104#endif
    10711105          for(Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ )
    10721106          {
    10731107            WRITE_CODE(pcSlice->getInterLayerPredLayerIdc(i),numBits,"inter_layer_pred_layer_idc[i]");   
    10741108          }
     1109#if ILP_NUM_REF_CHK
     1110          }
     1111#endif
    10751112        }
    10761113      }
     
    11871224    if ( pcSlice->getEnableTMVPFlag() )
    11881225    {
    1189 #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING
     1226#if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING
    11901227      if ( !pcSlice->getIdrPicFlag() && pcSlice->getLayerId() > 0 && pcSlice->getActiveNumILRRefIdx() > 0 && pcSlice->getNumMotionPredRefLayers() > 0 )
    11911228      {
     
    12101247        WRITE_UVLC( pcSlice->getColRefIdx(), "collocated_ref_idx" );
    12111248      }
    1212 #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING
     1249#if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING
    12131250      }
    12141251#endif
     
    17261763  return true;
    17271764}
    1728 
    1729 #if INTRA_BL
    1730 Void TEncCavlc::codeIntraBLFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
    1731 {
    1732   assert(0);
    1733 }
    1734 
    1735 #endif
    17361765//! \}
  • trunk/source/Lib/TLibEncoder/TEncCavlc.h

    r313 r345  
    112112  Void codeMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    113113  Void codeMergeIndex    ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    114 #if INTRA_BL
    115   Void codeIntraBLFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    116 #endif
    117114 
    118115  Void codeInterModeFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiEncMode );
  • trunk/source/Lib/TLibEncoder/TEncCu.cpp

    r313 r345  
    763763          }
    764764        }
    765 #if INTRA_BL
    766       if(m_pcPicYuvRecBase)
    767       {
    768         xCheckRDCostIntraBL( rpcBestCU, rpcTempCU );
    769         rpcTempCU->initEstData( uiDepth, iQP );
    770       }
    771 #endif
    772765#if (ENCODER_FAST_MODE)
    773766      if(pcPic->getLayerId() > 0)
     
    12151208    return;
    12161209  }
    1217 #if INTRA_BL
    1218   m_pcEntropyCoder->encodeIntraBLFlag( pcCU, uiAbsPartIdx );
    1219   if ( !pcCU->isIntraBL( uiAbsPartIdx ) )
    1220   {
    1221 #endif
    12221210  m_pcEntropyCoder->encodePredMode( pcCU, uiAbsPartIdx );
    12231211 
     
    12381226  // prediction Info ( Intra : direction mode, Inter : Mv, reference idx )
    12391227  m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx );
    1240 #if INTRA_BL
    1241   }
    1242 #endif
    12431228 
    12441229  // Encode Coefficients
     
    15681553 
    15691554  m_pcEntropyCoder->resetBits();
    1570 #if INTRA_BL
    1571   m_pcEntropyCoder->encodeIntraBLFlag ( rpcTempCU, 0,       true );
    1572 #endif
     1555
    15731556  if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())
    15741557  {
     
    16241607
    16251608  m_pcEntropyCoder->resetBits();
    1626 #if INTRA_BL
    1627   m_pcEntropyCoder->encodeIntraBLFlag ( rpcTempCU, 0,       true );
    1628 #endif
     1609
    16291610  if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())
    16301611  {
     
    18791860#endif
    18801861
    1881 #if INTRA_BL
    1882 Void TEncCu::xCheckRDCostIntraBL( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU )
    1883 {
    1884   UInt uiDepth = rpcTempCU->getDepth( 0 );
    1885   rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth );
    1886   rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );
    1887   rpcTempCU->setPredModeSubParts( MODE_INTRA_BL, 0, uiDepth ); 
    1888   rpcTempCU->setCUTransquantBypassSubParts( m_pcEncCfg->getCUTransquantBypassFlagValue(), 0, uiDepth );
    1889 
    1890   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 
    1902   m_pcPredSearch->estIntraBLPredQT( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth] );
    1903 
    1904   m_pcEntropyCoder->resetBits();
    1905   m_pcEntropyCoder->encodeIntraBLFlag ( rpcTempCU, 0,       true );
    1906   m_pcEntropyCoder->encodeSkipFlag( rpcTempCU, 0,       true );
    1907   if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())
    1908   {
    1909     m_pcEntropyCoder->encodeCUTransquantBypassFlag( rpcTempCU, 0,          true );
    1910   }
    1911 
    1912   // Encode Coefficients
    1913   Bool bCodeDQP = getdQPFlag();
    1914   m_pcEntropyCoder->encodeCoeff( rpcTempCU, 0, uiDepth, rpcTempCU->getWidth (0), rpcTempCU->getHeight(0), bCodeDQP );
    1915   setdQPFlag( bCodeDQP );
    1916  
    1917   if( m_bUseSBACRD ) m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]);
    1918  
    1919   rpcTempCU->getTotalBits() = m_pcEntropyCoder->getNumberOfWrittenBits();
    1920   if(m_pcEncCfg->getUseSBACRD())
    1921   {
    1922     rpcTempCU->getTotalBins() = ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded();
    1923   }
    1924   rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
    1925 #endif
    1926  
    1927   xCheckDQP( rpcTempCU );
    1928   xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth);
    1929 }
    1930 #endif
    19311862#if (ENCODER_FAST_MODE)
    19321863Void TEncCu::xCheckRDCostILRUni(TComDataCU *&rpcBestCU, TComDataCU *&rpcTempCU, UInt refLayerId)
  • trunk/source/Lib/TLibEncoder/TEncCu.h

    r313 r345  
    8484  //  Access channel
    8585  TEncCfg*                m_pcEncCfg;
    86 #if INTRA_BL
    87   TComPicYuv*             m_pcPicYuvRecBase;       ///< reconstructed base layer
    88 #endif
    8986  TEncSearch*             m_pcPredSearch;
    9087  TComTrQuant*            m_pcTrQuant;
     
    134131  Int   updateLCUDataISlice ( TComDataCU* pcCU, Int LCUIdx, Int width, Int height );
    135132#endif
    136 #if INTRA_BL
    137   Void  setBaseRecPic       ( TComPicYuv* p ) { m_pcPicYuvRecBase = p; }   
    138 #endif
     133
    139134protected:
    140135  Void  finishCU            ( TComDataCU*  pcCU, UInt uiAbsPartIdx,           UInt uiDepth        );
     
    157152#endif
    158153  Void  xCheckRDCostIntra   ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize  );
    159 #if INTRA_BL
    160   Void  xCheckRDCostIntraBL ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU  );
    161 #endif
    162154#if ENCODER_FAST_MODE
    163155  Void  xCheckRDCostILRUni  ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, UInt refLayerId);
  • trunk/source/Lib/TLibEncoder/TEncEntropy.cpp

    r313 r345  
    166166  }
    167167
    168 #if INTRA_BL
    169   if( pcCU->isIntraBL( uiAbsPartIdx ) )
    170   {
    171     return;
    172   }
    173 #endif
    174 
    175168  m_pcEntropyCoderIf->codePredMode( pcCU, uiAbsPartIdx );
    176169}
     
    251244    }
    252245  }
    253 #if INTRA_BL
    254     if( pcCU->isIntra(uiAbsPartIdx) && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_NxN && uiDepth == pcCU->getDepth(uiAbsPartIdx) )
    255 #else
    256246 
    257247  if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTRA && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_NxN && uiDepth == pcCU->getDepth(uiAbsPartIdx) )
    258 #endif
    259248  {
    260249    assert( uiSubdiv );
     
    342331    }
    343332   
    344 #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
    348     if( ( !pcCU->isIntra( uiAbsPartIdx ) ) && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )
    349 #endif
    350 #else
    351333    if( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )
    352 #endif
    353334    {
    354335      assert( pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, 0 ) );
     
    431412Void TEncEntropy::encodePredInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
    432413{
    433 #if INTRA_BL
    434   assert ( !pcCU->isIntraBL( uiAbsPartIdx ) );
    435 #endif
    436414  if( bRD )
    437415  {
     
    607585  UInt uiChromaOffset = uiLumaOffset>>2;
    608586   
    609 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    610   if( pcCU->isIntra(uiAbsPartIdx) && !pcCU->isIntraBL(uiAbsPartIdx) )
    611 #else
    612587  if( pcCU->isIntra(uiAbsPartIdx) )
    613 #endif
    614588  {
    615589    DTRACE_CABAC_VL( g_nSymbolCounter++ )
     
    759733}
    760734
    761 #if INTRA_BL
    762 Void TEncEntropy::encodeIntraBLFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
    763 {
    764   if( pcCU->getLayerId() == 0 )
    765   {
    766     return;
    767   }
    768 
    769   if( bRD )
    770   {
    771     uiAbsPartIdx = 0;
    772   }
    773   m_pcEntropyCoderIf->codeIntraBLFlag( pcCU, uiAbsPartIdx );
    774 }
    775 #endif
    776735//! \}
  • trunk/source/Lib/TLibEncoder/TEncEntropy.h

    r313 r345  
    8585  virtual Void codeMergeIndex    ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    8686  virtual Void codeSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    87  
    88 #if INTRA_BL
    89   virtual Void codeIntraBLFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    90 #endif
     87
    9188  virtual Void codePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    9289  virtual Void codePredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
     
    164161  Void encodeMergeFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    165162  Void encodeMergeIndex   ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    166 #if INTRA_BL
    167   Void encodeIntraBLFlag  ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    168 #endif
    169163  Void encodePredMode          ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    170164  Void encodePartSize          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool bRD = false );
  • trunk/source/Lib/TLibEncoder/TEncGOP.cpp

    r313 r345  
    511511#if M0457_COL_PICTURE_SIGNALING
    512512      pcSlice->setMFMEnabledFlag(false);
     513#if !REMOVE_COL_PICTURE_SIGNALING
    513514      pcSlice->setAltColIndicationFlag(false);
     515#endif
    514516#endif
    515517    }
     
    645647      pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_CRA);
    646648    }
    647 #if ZERO_NUM_DIRECT_LAYERS
     649
    648650    if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() == 0 && pcSlice->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA )
    649651    {
    650652      pcSlice->setSliceType(I_SLICE);
    651653    }
    652     else
    653 #endif
    654     if( m_layerId > 0 && !m_pcEncTop->getElRapSliceTypeB() )
     654    else if( m_layerId > 0 && !m_pcEncTop->getElRapSliceTypeB() )
    655655    {
    656656      if( (pcSlice->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP) &&
     
    760760
    761761#if REF_IDX_FRAMEWORK
    762 #if ZERO_NUM_DIRECT_LAYERS
    763762    if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() )
    764 #else
    765     if(m_layerId > 0)
    766 #endif
    767763    {
    768764#if RESTR_CHK
     
    820816    //  Set reference list
    821817#if REF_IDX_FRAMEWORK
    822 #if ZERO_NUM_DIRECT_LAYERS
    823818    if(m_layerId ==  0 || ( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() == 0 ) )
    824 #else
    825     if(m_layerId ==  0)
    826 #endif
    827819    {
    828820      pcSlice->setRefPicList( rcListPic);
     
    832824#endif
    833825#if REF_IDX_FRAMEWORK
    834 #if ZERO_NUM_DIRECT_LAYERS
    835826    if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() )
    836 #else
    837     if(m_layerId > 0)
    838 #endif
    839827    {
    840828      m_pcEncTop->setILRPic(pcPic);
     
    848836      {
    849837        pcSlice->setRefPOCListILP(m_pcEncTop->getIlpList(), pcSlice->getBaseColPic());
    850 #if M0457_COL_PICTURE_SIGNALING
     838#if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING
    851839        pcSlice->setMotionPredIlp(getMotionPredIlp(pcSlice));
    852840#endif
     
    858846#if REF_IDX_MFM
    859847#if M0457_COL_PICTURE_SIGNALING
     848#if REMOVE_COL_PICTURE_SIGNALING
     849      if( pcSlice->getMFMEnabledFlag() && pcSlice->getActiveNumILRRefIdx() > 0 && m_pcEncTop->getNumMotionPredRefLayers() > 0 )
     850#else
    860851      if( pcSlice->getMFMEnabledFlag() && !(pcSlice->getActiveNumILRRefIdx() > 0 && m_pcEncTop->getNumMotionPredRefLayers() > 0) )
     852#endif
    861853#else
    862854      if( pcSlice->getSPS()->getMFMEnabledFlag() )
     
    30052997}
    30062998
    3007 #if M0457_COL_PICTURE_SIGNALING
     2999#if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING
    30083000TComPic* TEncGOP::getMotionPredIlp(TComSlice* pcSlice)
    30093001{
  • trunk/source/Lib/TLibEncoder/TEncGOP.h

    r313 r345  
    198198  }
    199199  Void dblMetric( TComPic* pcPic, UInt uiNumSlices );
    200 #if M0457_COL_PICTURE_SIGNALING
     200#if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING
    201201  TComPic* getMotionPredIlp(TComSlice* pcSlice);
    202202#endif
  • trunk/source/Lib/TLibEncoder/TEncSbac.cpp

    r313 r345  
    8383, m_cTransformSkipSCModel     ( 1,             2,               NUM_TRANSFORMSKIP_FLAG_CTX    , m_contextModels + m_numContextModels, m_numContextModels)
    8484, m_CUTransquantBypassFlagSCModel( 1,          1,               NUM_CU_TRANSQUANT_BYPASS_FLAG_CTX, m_contextModels + m_numContextModels, m_numContextModels)
    85 #if INTRA_BL
    86 , m_cIntraBLPredFlagSCModel   (1,              1,               NUM_INTRA_BL_PRED_CTX         , m_contextModels + m_numContextModels, m_numContextModels)
    87 #endif
    8885{
    8986  assert( m_numContextModels <= MAX_NUM_CTX_MOD );
     
    134131  m_cCUTransSubdivFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_TRANS_SUBDIV_FLAG );
    135132  m_cSaoMergeSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_SAO_MERGE_FLAG );
    136 #if INTRA_BL
    137   m_cIntraBLPredFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTRA_BL_PRED_FLAG );
    138 #endif
    139133  m_cSaoTypeIdxSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SAO_TYPE_IDX );
    140134  m_cTransformSkipSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_TRANSFORMSKIP_FLAG );
     
    169163      curCost  = m_cCUSplitFlagSCModel.calcCost       ( curSliceType, qp, (UChar*)INIT_SPLIT_FLAG );
    170164      curCost += m_cCUSkipFlagSCModel.calcCost        ( curSliceType, qp, (UChar*)INIT_SKIP_FLAG );
    171 #if INTRA_BL
    172       curCost += m_cIntraBLPredFlagSCModel.calcCost   ( curSliceType, qp, (UChar*)INIT_INTRA_BL_PRED_FLAG );
    173 #endif
    174165      curCost += m_cCUMergeFlagExtSCModel.calcCost    ( curSliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT);
    175166      curCost += m_cCUMergeIdxExtSCModel.calcCost     ( curSliceType, qp, (UChar*)INIT_MERGE_IDX_EXT);
     
    243234  m_cCUTransSubdivFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_TRANS_SUBDIV_FLAG );
    244235  m_cSaoMergeSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_SAO_MERGE_FLAG );
    245 #if INTRA_BL
    246   m_cIntraBLPredFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTRA_BL_PRED_FLAG );
    247 #endif
    248236  m_cSaoTypeIdxSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SAO_TYPE_IDX );
    249237  m_cTransformSkipSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_TRANSFORMSKIP_FLAG );
     
    428416{
    429417  PartSize eSize         = pcCU->getPartitionSize( uiAbsPartIdx );
    430 #if INTRA_BL
    431   assert( !pcCU->isIntraBL( uiAbsPartIdx ) );
    432 #endif
     418
    433419  if ( pcCU->isIntra( uiAbsPartIdx ) )
    434420  {
     
    16001586}
    16011587
    1602 #if INTRA_BL
    1603 /** code intra_bl flag
    1604  * \param pcCU
    1605  * \param uiAbsPartIdx
    1606  * \returns Void
    1607  */
    1608 Void TEncSbac::codeIntraBLFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
    1609 {
    1610   // get context function is here
    1611   UInt uiSymbol = pcCU->isIntraBL( uiAbsPartIdx ) ? 1 : 0;
    1612 
    1613   UInt uiCtxIntraBL = pcCU->getCtxIntraBLFlag( uiAbsPartIdx ) ;
    1614   m_pcBinIf->encodeBin(uiSymbol, m_cIntraBLPredFlagSCModel.get( 0, 0, uiCtxIntraBL ));
    1615 
    1616   DTRACE_CABAC_VL( g_nSymbolCounter++ );
    1617   DTRACE_CABAC_T( "\tuiSymbol: ");
    1618   DTRACE_CABAC_V( uiSymbol );
    1619   DTRACE_CABAC_T( "\n");
    1620 }
    1621 #endif
    16221588//! \}
  • trunk/source/Lib/TLibEncoder/TEncSbac.h

    r313 r345  
    132132  Void codeSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    133133  Void codeMVPIdx        ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefList );
    134  
    135 #if INTRA_BL
    136   Void codeIntraBLFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    137 #endif
     134
    138135  Void codePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    139136  Void codePredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     
    206203  ContextModel3DBuffer m_cTransformSkipSCModel;
    207204  ContextModel3DBuffer m_CUTransquantBypassFlagSCModel;
    208 #if INTRA_BL
    209   ContextModel3DBuffer m_cIntraBLPredFlagSCModel;
    210 #endif
    211205};
    212206
  • trunk/source/Lib/TLibEncoder/TEncSearch.cpp

    r313 r345  
    906906        m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
    907907      }
    908 #if INTRA_BL
    909       m_pcEntropyCoder->encodeIntraBLFlag ( pcCU, 0, true );
    910       if( pcCU->isIntraBL( 0 ) )
    911       {
    912         return;
    913       }
    914 #endif     
     908   
    915909      m_pcEntropyCoder  ->encodePartSize( pcCU, 0, pcCU->getDepth(0), true );
    916910
     
    950944    }
    951945  }
    952 #if INTRA_BL
    953   if( pcCU->isIntraBL( 0 ) )
    954   {
    955     return;
    956   }
    957 #endif
     946
    958947  if( bChroma )
    959948  {
     
    10551044    pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, uiTrDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
    10561045    //===== get prediction signal =====
    1057 #if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED
    1058     if(pcCU->isIntraBL ( uiAbsPartIdx ) )
    1059     {
    1060       pcCU->getBaseLumaBlk( uiWidth, uiHeight, uiAbsPartIdx, piPred, uiStride );
    1061     }
    1062     else
    1063 #endif
    10641046    predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
    10651047    // save prediction
     
    12471229
    12481230    //===== get prediction signal =====
    1249 #if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED
    1250   if(pcCU->isIntraBL ( uiAbsPartIdx ) )
    1251   {
    1252     pcCU->getBaseChromaBlk( uiWidth, uiHeight, uiAbsPartIdx, piPred, uiStride, uiChromaId );
    1253   }
    1254   else
    1255 #endif
    1256     {
    1257       predIntraChromaAng( pPatChroma, uiChromaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
    1258     }
     1231    predIntraChromaAng( pPatChroma, uiChromaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     1232
    12591233    // save prediction
    12601234    if( default0Save1Load2 == 1 )
     
    45674541Void TEncSearch::encodeResAndCalcRdInterCU( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* pcYuvPred, TComYuv*& rpcYuvResi, TComYuv*& rpcYuvResiBest, TComYuv*& rpcYuvRec, Bool bSkipRes )
    45684542{
    4569 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    4570   if ( pcCU->isIntra(0) && !pcCU->isIntraBL(0))
    4571 #else
    45724543  if ( pcCU->isIntra(0) )
    4573 #endif
    45744544  {
    45754545    return;
     
    46824652      pcCU->setTransformSkipSubParts ( 0, 0, 0, 0, pcCU->getDepth(0) );
    46834653    }
    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
    46984654    else
    46994655    {
     
    49944950      Int scalingListType = 3 + g_eTTable[(Int)TEXT_LUMA];
    49954951      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
    50064952      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      
    50094953      const UInt uiNonzeroDistY = m_pcRdCost->getDistPart(g_bitDepthY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),
    50104954      pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth,trHeight );
     
    52755219        assert(scalingListType < 6);     
    52765220
    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
    52875221        m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),  pcCoeffCurrY, trWidth, trHeight, scalingListType, true );
    5288 #endif
    52895222
    52905223        uiNonzeroDistY = m_pcRdCost->getDistPart(g_bitDepthY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),
     
    56175550
    56185551  {
    5619 #if INTRA_BL
    5620 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    5621     assert( !pcCU->isIntra(uiAbsPartIdx) || pcCU->isIntraBL(uiAbsPartIdx));
    5622 #else
    5623     assert( !pcCU->isIntra(uiAbsPartIdx) );
    5624 #endif
    5625 #else
    56265552    assert( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA );
    5627 #endif
    56285553    if( bSubdivAndCbf )
    56295554    {
     
    58595784    }
    58605785    m_pcEntropyCoder->encodeSkipFlag ( pcCU, 0, true );
    5861 #if INTRA_BL
    5862     if(m_pcEncCfg->getLayerId())
    5863     {
    5864       m_pcEntropyCoder->encodeIntraBLFlag(pcCU, 0, true);
    5865 #if !NO_RESIDUAL_FLAG_FOR_BLPRED
    5866       assert( pcCU->isIntraBL( 0 ) == false );
    5867 #endif
    5868     }
    5869 #endif
    5870 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    5871     if( !pcCU->isIntraBL(0))
    5872     {
    5873 #endif
    58745786    m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
    58755787    m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth(0), true );
    58765788    m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
    5877 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    5878     }
    5879 #endif
     5789
    58805790    Bool bDummy = false;
    58815791    m_pcEntropyCoder->encodeCoeff   ( pcCU, 0, pcCU->getDepth(0), pcCU->getWidth(0), pcCU->getHeight(0), bDummy );
     
    62956205#endif
    62966206
    6297 #if INTRA_BL
    6298 Void
    6299 TEncSearch::estIntraBLPredQT( TComDataCU* pcCU,
    6300                            TComYuv*    pcOrgYuv,
    6301                            TComYuv*    pcPredYuv,
    6302                            TComYuv*    pcResiYuv,
    6303                            TComYuv*    pcRecoYuv )
    6304 {
    6305   UInt    uiDepth        = pcCU->getDepth(0);
    6306   UInt    uiOverallDistY = 0;
    6307   UInt    uiOverallDistC = 0;
    6308  
    6309   //===== set QP and clear Cbf =====
    6310   if ( pcCU->getSlice()->getPPS()->getUseDQP() == true)
    6311   {
    6312     pcCU->setQPSubParts( pcCU->getQP(0), 0, uiDepth );
    6313   }
    6314   else
    6315   {
    6316     pcCU->setQPSubParts( pcCU->getSlice()->getSliceQp(), 0, uiDepth );
    6317   }
    6318  
    6319   //===== init pattern for luma prediction =====
    6320   Bool bAboveAvail = false;
    6321   Bool bLeftAvail  = false;
    6322   pcCU->getPattern()->initPattern   ( pcCU, 0, 0 );
    6323   pcCU->getPattern()->initAdiPattern( pcCU, 0, 0, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
    6324  
    6325   pcCU->setLumaIntraDirSubParts ( DC_IDX, 0, uiDepth );
    6326  
    6327   // set context models
    6328   if( m_bUseSBACRD )
    6329   {
    6330     m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST] );
    6331   }
    6332  
    6333   // determine residual for partition
    6334   Double dPUCost   = 0.0;
    6335   xRecurIntraCodingQT( pcCU, 0, 0, false, pcOrgYuv, pcPredYuv, pcResiYuv, uiOverallDistY, uiOverallDistC, false, dPUCost );
    6336   xSetIntraResultQT( pcCU, 0, 0, false, pcRecoYuv );
    6337  
    6338   //=== update PU data ====
    6339   pcCU->copyToPic( uiDepth, 0, 0 );
    6340    
    6341   //===== reset context models =====
    6342   if(m_bUseSBACRD)
    6343   {
    6344     m_pcRDGoOnSbacCoder->load(m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST]);
    6345   }
    6346 
    6347   //===== set distortion (rate and r-d costs are determined later) =====
    6348   pcCU->getTotalDistortion() = uiOverallDistY + uiOverallDistC;
    6349 }
    6350 
    6351 #endif
    63526207//! \}
  • trunk/source/Lib/TLibEncoder/TEncSearch.h

    r313 r345  
    9999#if SVC_EXTENSION
    100100  TEncTop**       m_ppcTEncTop;
    101 #if INTRA_BL
    102   TComPicYuv*     m_pcPicYuvRecBase;       ///< reconstructed base layer
    103 #endif
    104101#endif
    105102 
     
    192189                                  TComYuv*    pcRecoYuv,
    193190                                  UInt        uiPreCalcDistC );
    194  
    195 #if INTRA_BL
    196   Void setBaseRecPic            ( TComPicYuv* pcPicYuvRecBase ) { m_pcPicYuvRecBase = pcPicYuvRecBase; } 
    197   TComPicYuv* getBaseRecPic     ()                              { return m_pcPicYuvRecBase; }
    198   Void  estIntraBLPredQT        ( TComDataCU* pcCU,
    199                                   TComYuv*    pcOrgYuv,
    200                                   TComYuv*    pcPredYuv,
    201                                   TComYuv*    pcResiYuv,
    202                                   TComYuv*    pcRecoYuv );
    203 #endif
    204191 
    205192  /// encoder estimation - inter prediction (non-skip)
  • trunk/source/Lib/TLibEncoder/TEncSlice.cpp

    r314 r345  
    345345
    346346#if JCTVC_M0259_LAMBDAREFINEMENT
    347   if( rpcSlice->getLayerId() > 0 && rpcSlice->getActiveNumILRRefIdx() && depth >= 3 && m_pcCfg->getGOPSize() == ( 1 << depth ) )
     347  if( rpcSlice->getLayerId() > 0 && m_ppcTEncTop[layerId]->getNumActiveRefLayers() && depth >= 3 && m_pcCfg->getGOPSize() == ( 1 << depth ) )
    348348  {
    349349    Int nCurLayer = rpcSlice->getLayerId();
     
    373373  weight = pow( 2.0, (iQP-g_aucChromaScale[qpc])/3.0 );  // takes into account of the chroma qp mapping and chroma qp Offset
    374374#if JCTVC_M0259_LAMBDAREFINEMENT
    375   if( rpcSlice->getLayerId() > 0 && rpcSlice->getActiveNumILRRefIdx() && m_pcCfg->getGOPSize() >= 8 && rpcSlice->isIntra() == false && depth == 0 )
     375  if( rpcSlice->getLayerId() > 0 && m_ppcTEncTop[layerId]->getNumActiveRefLayers() && m_pcCfg->getGOPSize() >= 8 && rpcSlice->isIntra() == false && depth == 0 )
    376376  {
    377377    dLambda *= 1.1;
     
    503503#if M0457_COL_PICTURE_SIGNALING
    504504    rpcSlice->setMFMEnabledFlag(m_ppcTEncTop[layerId]->getMFMEnabledFlag());
     505#if !REMOVE_COL_PICTURE_SIGNALING
    505506    rpcSlice->setAltColIndicationFlag(rpcSlice->getMFMEnabledFlag());
     507#endif
    506508#endif
    507509  }
     
    979981  UInt uiTileStartLCU = 0;
    980982  UInt uiTileLCUX     = 0;
    981 
    982 #if INTRA_BL
    983   m_pcCuEncoder->setBaseRecPic( rpcPic->getLayerId() > 0 ? rpcPic->getFullPelBaseRec(rpcPic->getLayerId()-1) : NULL);
    984 #endif
    985983
    986984  Bool depSliceSegmentsEnabled = pcSlice->getPPS()->getDependentSliceSegmentsEnabledFlag();
  • trunk/source/Lib/TLibEncoder/TEncTop.cpp

    r313 r345  
    886886  for( Int i = 0; i < getGOPSize()+m_extraRPSs; i++)
    887887  {
     888#if FINAL_RPL_CHANGE_N0082
     889    GOPEntry ge = m_ppcTEncTop[m_cSPS.getLayerId()]->getGOPEntry(i);
     890#else
    888891    GOPEntry ge = getGOPEntry(i);
     892#endif
    889893    rps = rpsList->getReferencePictureSet(i);
    890894    rps->setNumberOfPictures(ge.m_numRefPics);
     
    12041208  if( m_ppcTEncTop[m_layerId]->getNumDirectRefLayers() <= 0 )
    12051209  {
    1206 #if ZERO_NUM_DIRECT_LAYERS
    12071210    return (TEncTop *)getLayerEnc( 0 );
    1208 #else
    1209     return NULL;
    1210 #endif
    12111211  }
    12121212
Note: See TracChangeset for help on using the changeset viewer.