Changeset 798 in SHVCSoftware for branches/SHM-6-dev/source/App


Ignore:
Timestamp:
10 Jun 2014, 01:10:15 (11 years ago)
Author:
qualcomm
Message:

JCTVC-P0041: Signalling and decoding of POC (Several macros)

The following macros describe the code each contains:

  1. POC_RESET_IDC_SIGNALLING - signalling of POC-related syntax elements
  2. POC_RESET_IDC_ENCODER - support for POC reset at encoder
  3. POC_RESET_IDC_DECODER - support for POC reset at decoder

In addition two bugfixes, under macros ALIGN_IRAP_BUGFIX and UNAVAILABLE_PIC_BUGFIX are also submitted.

From: Adarsh K. Ramasubramonian <aramasub@…>

Location:
branches/SHM-6-dev/source/App/TAppDecoder
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-6-dev/source/App/TAppDecoder/TAppDecTop.cpp

    r746 r798  
    191191    InputNALUnit nalu;
    192192    byteStreamNALUnit(bytestream, nalUnit, stats);
    193 
    194193    // call actual decoding function
    195194    Bool bNewPicture = false;
     
    215214      {
    216215        bNewPicture = m_acTDecTop[nalu.m_layerId].decode(nalu, m_iSkipFrame, m_aiPOCLastDisplay[nalu.m_layerId], curLayerId, bNewPOC);
     216#if POC_RESET_IDC_DECODER
     217        if ( (bNewPicture && m_acTDecTop[nalu.m_layerId].getParseIdc() == 3) || (m_acTDecTop[nalu.m_layerId].getParseIdc() == 0) )
     218#else
    217219        if (bNewPicture)
     220#endif
    218221        {
    219222          bitstreamFile.clear();
     
    225228          bytestream.reset();
    226229        }
    227       }
    228     }
    229 
     230#if POC_RESET_IDC_DECODER
     231        else if(m_acTDecTop[nalu.m_layerId].getParseIdc() == 1)
     232        {
     233          bitstreamFile.clear();
     234          // This is before third parse of the NAL unit, and
     235          // location points to correct beginning of the NALU
     236          bitstreamFile.seekg(location);
     237          bytestream.reset();
     238        }
     239#endif
     240      }
     241    }
     242
     243#if POC_RESET_IDC_DECODER
     244    if ((bNewPicture && m_acTDecTop[nalu.m_layerId].getParseIdc() == 3) || (m_acTDecTop[nalu.m_layerId].getParseIdc() == 0) || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS)
     245#else
    230246    if (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS)
     247#endif
    231248    {
    232249#if O0194_DIFFERENT_BITDEPTH_EL_BL
     
    245262    }
    246263
     264#if POC_RESET_IDC_DECODER
     265    if( bNewPicture && m_acTDecTop[nalu.m_layerId].getParseIdc() == 0 )
     266    {
     267      outputAllPictures( nalu.m_layerId, true );
     268    }
     269#endif
     270
    247271    if( pcListPic )
    248272    {
     
    269293        flushAllPictures( nalu.m_layerId, outputPicturesFlag );       
    270294      }
     295
     296#if POC_RESET_IDC_DECODER
     297      if( bNewPicture && m_acTDecTop[nalu.m_layerId].getParseIdc() != 0 )
     298      // New picture, slice header parsed but picture not decoded
     299#else
    271300      if( bNewPicture ) // New picture, slice header parsed but picture not decoded
     301#endif
    272302      {
    273303#if NO_OUTPUT_OF_PRIOR_PICS
     
    15041534                            , std::vector<Int> *listOfPocsPositionInEachLayer
    15051535                            , DpbStatus &dpbStatus
     1536#if POC_RESET_IDC_DECODER
     1537                            , Bool notOutputCurrAu
     1538#endif
    15061539                            )
    15071540{
     
    15281561          vps = pic->getSlice(0)->getVPS();
    15291562        }
    1530 
    1531         std::vector<Int>::iterator it;
    1532         if( pic->getOutputMark() ) // && pic->getPOC() > m_aiPOCLastDisplay[i])
    1533         {
    1534           it = find( listOfPocs.begin(), listOfPocs.end(), pic->getPOC() ); // Check if already included
    1535           if( it == listOfPocs.end() )  // New POC value - i.e. new AU - add to the list
     1563#if POC_RESET_IDC_DECODER
     1564        if( !(pic->isCurrAu() && notOutputCurrAu ) )
     1565        {
     1566#endif
     1567          std::vector<Int>::iterator it;
     1568          if( pic->getOutputMark() ) // && pic->getPOC() > m_aiPOCLastDisplay[i])
    15361569          {
    1537             listOfPocs.push_back( pic->getPOC() );
     1570            it = find( listOfPocs.begin(), listOfPocs.end(), pic->getPOC() ); // Check if already included
     1571            if( it == listOfPocs.end() )  // New POC value - i.e. new AU - add to the list
     1572            {
     1573              listOfPocs.push_back( pic->getPOC() );
     1574            }
     1575            listOfPocsInEachLayer         [i].push_back( pic->getPOC()    );    // POC to be output in each layer
     1576            listOfPocsPositionInEachLayer [i].push_back( picPositionInList  );  // For ease of access
    15381577          }
    1539           listOfPocsInEachLayer         [i].push_back( pic->getPOC()    );    // POC to be output in each layer
    1540           listOfPocsPositionInEachLayer [i].push_back( picPositionInList  );  // For ease of access
    1541         }
    1542         if( pic->getSlice(0)->isReferenced() || pic->getOutputMark() )
    1543         {
    1544           dpbStatus.m_numPicsInLayer[i]++;  // Count pictures that are "used for reference" or "needed for output"
    1545         }
     1578          if( pic->getSlice(0)->isReferenced() || pic->getOutputMark() )
     1579          {
     1580            dpbStatus.m_numPicsInLayer[i]++;  // Count pictures that are "used for reference" or "needed for output"
     1581          }
     1582#if POC_RESET_IDC_DECODER
     1583        }
     1584#endif
    15461585      }
    15471586      iterPic++;
     
    15691608  }
    15701609  assert( dpbStatus.m_numAUsNotDisplayed != -1 );
    1571 
    1572 
    15731610
     1611
     1612#if POC_RESET_IDC_DECODER
     1613Void TAppDecTop::outputAllPictures(Int layerId, Bool notOutputCurrPic)
     1614{
     1615  { // All pictures in the DPB in that layer are to be output; this means other pictures would also be output
     1616    std::vector<Int>  listOfPocs;
     1617    std::vector<Int>  listOfPocsInEachLayer[MAX_LAYERS];
     1618    std::vector<Int>  listOfPocsPositionInEachLayer[MAX_LAYERS];
     1619    DpbStatus dpbStatus;
     1620
     1621    // Find the status of the DPB
     1622    xFindDPBStatus(listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, dpbStatus, notOutputCurrPic);
     1623
     1624    if( listOfPocs.size() )
     1625    {
     1626      while( listOfPocsInEachLayer[layerId].size() )    // As long as there picture in the layer to be output
     1627      {
     1628        bumpingProcess( listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, dpbStatus );
     1629      }
     1630    }
     1631  }
     1632}
     1633#endif
    15741634#endif
    15751635//! \}
  • branches/SHM-6-dev/source/App/TAppDecoder/TAppDecTop.h

    r644 r798  
    107107
    108108  Void xOutputAndMarkPic( TComPic *pic, const Char *reconFile, const Int layerID, Int &pocLastDisplay, DpbStatus &dpbStatus);
     109#if POC_RESET_IDC_DECODER
     110  Void outputAllPictures(Int layerId, Bool notOutputCurrAu);
     111#endif
    109112  Void xFindDPBStatus( std::vector<Int> &listOfPocs
    110113                            , std::vector<Int> *listOfPocsInEachLayer
    111114                            , std::vector<Int> *listOfPocsPositionInEachLayer
    112115                            , DpbStatus &dpbStatus
     116#if POC_RESET_IDC_DECODER
     117                            , Bool notOutputCurrAu = true
     118#endif
    113119                            );
    114120
Note: See TracChangeset for help on using the changeset viewer.