Changeset 884 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecCu.cpp


Ignore:
Timestamp:
29 Mar 2014, 18:55:16 (11 years ago)
Author:
tech
Message:

Merged HTM-10.1-dev0@883. (MV-HEVC 7 HLS)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibDecoder/TDecCu.cpp

    r872 r884  
    293293
    294294
    295 #if MTK_DDD_G0063
     295#if H_3D_DDD
    296296      pcCU->setUseDDD( false, uiAbsPartIdx, uiDepth );
    297297#endif
     
    339339      if( pcCU->getSlice()->getIsDepth())
    340340      {
    341 #if SEC_DEPTH_DV_DERIVAITON_G0074
    342341        DvInfo.bDV = m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo);
    343 #else
    344         DvInfo.bDV = m_ppcCU[uiDepth]->getDispNeighBlocks(0, 0, &DvInfo);
    345 #endif
    346342      }
    347343      else
     
    414410    m_pcEntropyDecoder->decodeMergeIndex( pcCU, 0, uiAbsPartIdx, uiDepth );
    415411    UInt uiMergeIndex = pcCU->getMergeIndex(uiAbsPartIdx);
    416 
    417 #if !SEC_IC_ARP_SIG_G0072
     412#if H_3D_ARP
     413    m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth );
     414#endif
    418415#if H_3D_IC
    419416    m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    420 #endif
    421 #endif
    422 #if H_3D_ARP
    423     m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth );
    424 #endif
    425 #if SEC_IC_ARP_SIG_G0072
    426 #if H_3D_IC
    427     m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    428 #endif
    429417#endif
    430418
     
    466454    pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, 0, uiDepth );
    467455
    468 #if MTK_DDD_G0063
     456#if H_3D_DDD
    469457    if( uiMergeIndex == m_ppcCU[uiDepth]->getUseDDDCandIdx() )
    470458    {
     
    484472        pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
    485473        pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
    486 #if NTT_STORE_SPDV_VSP_G0148
     474#if H_3D_VSP
    487475        if( pcCU->getVSPFlag( uiAbsPartIdx ) != 0 )
    488476        {
     
    551539  m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth );
    552540
    553 #if QC_SDC_UNIFY_G0130
     541#if H_3D_DIM_SDC
    554542  m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
    555543#endif
     
    573561  // prediction mode ( Intra : direction mode, Inter : Mv, reference idx )
    574562  m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
    575 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    576   m_pcEntropyDecoder->decodeInterSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
    577 #endif
    578563  // Coefficient decoding
    579564  Bool bCodeDQP = getdQPFlag();
     
    663648#endif
    664649#if H_3D_INTER_SDC
    665 #if QC_SDC_UNIFY_G0130
    666650      if( m_ppcCU[uiDepth]->getSDCFlag( 0 ) )
    667 #else
    668       if( m_ppcCU[uiDepth]->getInterSDCFlag( 0 ) )
    669 #endif
    670651      {
    671652        xReconInterSDC( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth );
     
    730711  UInt  uiWidth      = pcCU->getWidth ( 0 );
    731712  UInt  uiHeight     = pcCU->getHeight( 0 );
    732 #if !SEC_INTER_SDC_G0101
    733   UChar* pMask       = pcCU->getInterSDCMask();
    734 
    735   memset( pMask, 0, uiWidth*uiHeight );
    736   pcCU->xSetInterSDCCUMask( pcCU, pMask );
    737 #endif
    738713
    739714  Pel  *pResi;
     
    746721    for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ )
    747722    {
    748 #if SEC_INTER_SDC_G0101
    749723      pResi[ uiPelX ] = pcCU->getSDCSegmentDCOffset( 0, 0 );
    750 #else
    751       UChar uiSeg = pMask[ uiPelX + uiPelY*uiWidth ];
    752 #if QC_SDC_UNIFY_G0130
    753       pResi[ uiPelX ] = pcCU->getSDCSegmentDCOffset( uiSeg, 0 );
    754 #else
    755       pResi[ uiPelX ] = pcCU->getInterSDCSegmentDCOffset( uiSeg, 0 );
    756 #endif
    757 #endif
    758724    }
    759725    pResi += uiResiStride;
     
    929895#endif
    930896 
    931 #if H_3D && UPDATE_HM13
     897#if H_3D
    932898  Bool useDltFlag = (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps());
    933899
     
    955921    {
    956922#if H_3D
    957 #if UPDATE_HM13
    958923      if ( useDltFlag )
    959 #else
    960       if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) )
    961 #endif
    962924      {
    963925        pReco    [ uiX ] = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) );
     
    11511113  UInt uiWidth        = pcCU->getWidth  ( 0 );
    11521114  UInt uiHeight       = pcCU->getHeight ( 0 );
    1153 #if QC_PKU_SDC_SPLIT_G0123
    1154 #if HS_TSINGHUA_SDC_SPLIT_G0111
    1155 #if QC_GENERIC_SDC_G0122
    11561115  TComWedgelet* dmm4SegmentationOrg = new TComWedgelet( uiWidth, uiHeight );
    1157 #endif
    1158 #else
    1159 #if QC_GENERIC_SDC_G0122
    1160   TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
    1161 #endif
    1162 #endif
    1163 #endif
    1164 #if QC_PKU_SDC_SPLIT_G0123
    11651116  UInt numParts = 1;
    1166   UInt i = 0;
    11671117  UInt sdcDepth    = 0;
    11681118  TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
     
    11811131  UInt    uiLumaPredMode = 0; 
    11821132
    1183 #if HS_TSINGHUA_SDC_SPLIT_G0111
    11841133  if ((uiWidth >> pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize()) > 1)
    11851134  {
     
    11881137    uiWidth = uiHeight = (1 << pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize());
    11891138  }
    1190 #else
    1191   if (uiWidth == 64)
    1192   {
    1193     numParts = 4;
    1194     sdcDepth = 1;
    1195     uiWidth = uiHeight = 32;
    1196   }
    1197 #endif
    1198 
    1199   for ( i = 0; i < numParts; i++ )
     1139
     1140  for ( Int i = 0; i < numParts; i++ )
    12001141  {
    12011142    uiStride    = pcRecoYuv->getStride  ();
     
    12031144    piPred      = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    12041145    piResi      = pcResiYuv->getLumaAddr( uiAbsPartIdx );
    1205  
     1146
    12061147    uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    12071148    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
     
    12111152
    12121153    AOF( uiWidth == uiHeight );
    1213 #else
    1214   TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
    1215   TComYuv* pcPredYuv  = m_ppcYuvReco[uiDepth];
    1216   TComYuv* pcResiYuv  = m_ppcYuvResi[uiDepth];
    1217  
    1218   UInt    uiStride    = pcRecoYuv->getStride  ();
    1219   Pel*    piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
    1220   Pel*    piPred      = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    1221   Pel*    piResi      = pcResiYuv->getLumaAddr( uiAbsPartIdx );
    1222  
    1223   UInt    uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    1224   Pel*    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
    1225   UInt    uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
    1226  
    1227   UInt    uiLumaPredMode    = pcCU->getLumaIntraDir     ( uiAbsPartIdx );
    1228  
    1229   AOF( uiWidth == uiHeight );
    1230   AOF( uiAbsPartIdx == 0 );
    1231   AOF( pcCU->getSDCAvailable(uiAbsPartIdx) );
    1232   AOF( pcCU->getSDCFlag(uiAbsPartIdx) );
    1233 #endif
    1234  
    1235   //===== init availability pattern =====
    1236   Bool  bAboveAvail = false;
    1237   Bool  bLeftAvail  = false;
    1238 #if QC_PKU_SDC_SPLIT_G0123
    1239   pcCU->getPattern()->initPattern   ( pcCU, sdcDepth, uiAbsPartIdx );
    1240   pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail );
    1241 #else
    1242   pcCU->getPattern()->initPattern   ( pcCU, 0, uiAbsPartIdx );
    1243   pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail );
    1244 #endif
    1245 #if !QC_PKU_SDC_SPLIT_G0123
    1246 #if QC_GENERIC_SDC_G0122
    1247   TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
    1248 #endif
    1249 #endif
    1250 #if HS_TSINGHUA_SDC_SPLIT_G0111
    1251   TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
    1252 #endif
    1253   //===== get prediction signal =====
    1254 #if H_3D_DIM
    1255   if( isDimMode( uiLumaPredMode ) )
    1256   {
    1257     m_pcPrediction->predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight
    1258 #if QC_GENERIC_SDC_G0122
    1259       , false, dmm4Segmentation
    1260 #endif
    1261       );
    1262 #if HS_TSINGHUA_SDC_SPLIT_G0111
    1263     Bool* dmm4PatternSplit = dmm4Segmentation->getPattern();
    1264     Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern();
    1265     for( UInt k = 0; k < (uiWidth*uiHeight); k++ )
    1266     {
    1267       dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k];
    1268     }
    1269 #endif
    1270   }
    1271   else
    1272   {
    1273 #endif
    1274     m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
    1275 #if H_3D_DIM
    1276   }
    1277 #endif
    1278 #if QC_PKU_SDC_SPLIT_G0123
     1154
     1155    //===== init availability pattern =====
     1156    Bool  bAboveAvail = false;
     1157    Bool  bLeftAvail  = false;
     1158
     1159    pcCU->getPattern()->initPattern   ( pcCU, sdcDepth, uiAbsPartIdx );
     1160    pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail );
     1161
     1162    TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
     1163    //===== get prediction signal =====
     1164    if( isDimMode( uiLumaPredMode ) )
     1165    {
     1166      m_pcPrediction->predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, false, dmm4Segmentation  );
     1167      Bool* dmm4PatternSplit = dmm4Segmentation->getPattern();
     1168      Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern();
     1169      for( UInt k = 0; k < (uiWidth*uiHeight); k++ )
     1170      {
     1171        dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k];
     1172      }
     1173    }
     1174    else
     1175    {
     1176      m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     1177    }
     1178
    12791179    if ( numParts > 1 )
    12801180    {
     
    12921192    }
    12931193    uiAbsPartIdx += ( (uiWidth * uiWidth) >> 4 );
    1294 #if HS_TSINGHUA_SDC_SPLIT_G0111
    12951194    dmm4Segmentation->destroy(); delete dmm4Segmentation;
    1296 #endif
    12971195  }
    12981196  uiAbsPartIdx = 0;
     
    13091207  piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
    13101208  uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
    1311 #endif
    13121209  // number of segments depends on prediction mode
    13131210  UInt uiNumSegments = 1;
     
    13261223    uiMaskStride = pcWedgelet->getStride();
    13271224  }
    1328 #if QC_GENERIC_SDC_G0122
    13291225  if( getDimType( uiLumaPredMode ) == DMM4_IDX )
    13301226  {
    13311227    uiNumSegments = 2;
    1332 #if HS_TSINGHUA_SDC_SPLIT_G0111
    13331228    pbMask  = dmm4SegmentationOrg->getPattern();
    13341229    uiMaskStride = dmm4SegmentationOrg->getStride();
    1335 #else
    1336     pbMask  = dmm4Segmentation->getPattern();
    1337     uiMaskStride = dmm4Segmentation->getStride();
    1338 #endif
    1339   }
    1340 #endif
     1230  }
    13411231  // get DC prediction for each segment
    13421232  Pel apDCPredValues[2];
     
    14001290    pRecCr += uiStrideC;
    14011291  }
    1402 #if QC_GENERIC_SDC_G0122
    1403 #if HS_TSINGHUA_SDC_SPLIT_G0111
    14041292  dmm4SegmentationOrg->destroy(); delete dmm4SegmentationOrg;
    1405 #else
    1406   dmm4Segmentation->destroy(); delete dmm4Segmentation;
    1407 #endif
    1408 #endif
    14091293}
    14101294#endif
Note: See TracChangeset for help on using the changeset viewer.