Changeset 1093 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibDecoder


Ignore:
Timestamp:
2 Jul 2015, 21:00:14 (10 years ago)
Author:
seregin
Message:

cleanup macros: POC_RESET_RPS, PREVTID0_POC_RESET, POC_RESET_FLAG

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

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1092 r1093  
    12421242  {
    12431243#if SVC_EXTENSION
    1244 #if POC_RESET_FLAG
    1245     Int iBits = 0;
    1246     if(pcSlice->getPPS()->getNumExtraSliceHeaderBits() > iBits)
    1247     {
    1248       READ_FLAG(uiCode, "poc_reset_flag");      pcSlice->setPocResetFlag( uiCode ? true : false );
    1249       iBits++;
    1250     }
    1251     if(pcSlice->getPPS()->getNumExtraSliceHeaderBits() > iBits)
    1252     {
    1253 #if DISCARDABLE_PIC_RPS
    1254       READ_FLAG(uiCode, "discardable_flag"); pcSlice->setDiscardableFlag( uiCode ? true : false );
    1255 #else
    1256       READ_FLAG(uiCode, "discardable_flag"); // ignored
    1257 #endif
    1258       iBits++;
    1259     }
    1260 #if O0149_CROSS_LAYER_BLA_FLAG
    1261     if(pcSlice->getPPS()->getNumExtraSliceHeaderBits() > iBits)
    1262     {
    1263       READ_FLAG(uiCode, "cross_layer_bla_flag");  pcSlice->setCrossLayerBLAFlag( uiCode ? true : false );
    1264       iBits++;
    1265     }
    1266 #endif
    1267     for (; iBits < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); iBits++)
    1268     {
    1269       READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored
    1270     }
    1271 #else
    12721244#if CROSS_LAYER_BLA_FLAG_FIX
    12731245    Int iBits = 0;
     
    13061278      READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored
    13071279    }
    1308 #endif
    13091280#else //SVC_EXTENSION
    13101281    for (Int i = 0; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1092 r1093  
    736736
    737737#if SVC_EXTENSION
    738 #if POC_RESET_FLAG
    739 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int &iPOCLastDisplay, UInt& curLayerId, Bool& bNewPOC )
    740 #else
    741738Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, UInt& curLayerId, Bool& bNewPOC )
    742 #endif
    743739#else
    744740Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay )
     
    13391335  m_bFirstSliceInSequence = false;
    13401336  m_bFirstSliceInBitstream  = false;
    1341 #if POC_RESET_FLAG
    1342   // This operation would do the following:
    1343   // 1. Update the other picture in the DPB. This should be done only for the first slice of the picture.
    1344   // 2. Update the value of m_pocCRA.
    1345   // 3. Reset the POC values at the decoder for the current picture to be zero.
    1346   // 4. update value of POCLastDisplay
    1347   if( m_apcSlicePilot->getPocResetFlag() )
    1348   {
    1349     if( m_apcSlicePilot->getSliceIdx() == 0 )
    1350     {
    1351       Int pocAdjustValue = m_apcSlicePilot->getPOC();
    1352 
    1353 #if PREVTID0_POC_RESET
    1354       m_apcSlicePilot->adjustPrevTid0POC(pocAdjustValue);
    1355 #endif
    1356       // If poc reset flag is set to 1, reset all POC for DPB -> basically do it for each slice in the picutre
    1357       TComList<TComPic*>::iterator  iterPic = m_cListPic.begin(); 
    1358 
    1359       // Iterate through all picture in DPB
    1360       while( iterPic != m_cListPic.end() )
    1361       {
    1362         TComPic *dpbPic = *iterPic;
    1363         // Check if the picture pointed to by iterPic is either used for reference or
    1364         // needed for output, are in the same layer, and not the current picture.
    1365         if( /*  ( ( dpbPic->getSlice(0)->isReferenced() ) || ( dpbPic->getOutputMark() ) )
    1366             &&*/ ( dpbPic->getLayerId() == m_apcSlicePilot->getLayerId() )
    1367               && ( dpbPic->getReconMark() )
    1368           )
    1369         {
    1370           for(Int i = dpbPic->getNumAllocatedSlice()-1; i >= 0; i--)
    1371           {
    1372 
    1373             TComSlice *slice = dpbPic->getSlice(i);
    1374             TComReferencePictureSet *rps = slice->getRPS();
    1375             slice->setPOC( slice->getPOC() - pocAdjustValue );
    1376 
    1377             // Also adjust the POC value stored in the RPS of each such slice
    1378             for(Int j = rps->getNumberOfPictures(); j >= 0; j--)
    1379             {
    1380               rps->setPOC( j, rps->getPOC(j) - pocAdjustValue );
    1381             }
    1382             // Also adjust the value of refPOC
    1383             for(Int k = 0; k < 2; k++)  // For List 0 and List 1
    1384             {
    1385               RefPicList list = (k == 1) ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
    1386               for(Int j = 0; j < slice->getNumRefIdx(list); j++)
    1387               {
    1388                 slice->setRefPOC( slice->getRefPOC(list, j) - pocAdjustValue, list, j);
    1389               }
    1390             }
    1391           }
    1392         }
    1393         iterPic++;
    1394       }
    1395       // Update the value of pocCRA
    1396       m_pocCRA -= pocAdjustValue;
    1397       // Update value of POCLastDisplay
    1398       iPOCLastDisplay -= pocAdjustValue;
    1399     }
    1400     // Reset current poc for current slice and RPS
    1401     m_apcSlicePilot->setPOC( 0 );
    1402   }
    1403 #endif
     1337
    14041338  // Alignment of TSA and STSA pictures across AU
    14051339#if !Q0108_TSA_STSA
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h

    r1089 r1093  
    312312  Void      xActivateParameterSets();
    313313#if SVC_EXTENSION
    314 #if POC_RESET_FLAG
    315   Bool      xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int &iPOCLastDisplay, UInt& curLayerId, Bool& bNewPOC);
    316 #else
    317314  Bool      xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, UInt& curLayerId, Bool& bNewPOC);
    318 #endif
    319315  Void      xSetSpatialEnhLayerFlag(TComSlice* slice, TComPic* pic);
    320316#else
Note: See TracChangeset for help on using the changeset viewer.