Changeset 625 in SHVCSoftware


Ignore:
Timestamp:
10 Mar 2014, 22:19:42 (11 years ago)
Author:
qualcomm
Message:

Include support for NoOutputOfPriorPicsFlag (Macro: NO_OUTPUT_OF_PRIOR_PICS)

Modify flushing of pictures based on NoOutputOfPriorPicsFlag

From: Adarsh K. Ramasubramonian <aramasub@…>

Location:
branches/SHM-5.1-dev/source
Files:
8 edited

Legend:

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

    r619 r625  
    256256#if ALIGNED_BUMPING
    257257      Bool outputPicturesFlag = true; 
     258#if NO_OUTPUT_OF_PRIOR_PICS
     259      if( m_acTDecTop[nalu.m_layerId].getNoOutputOfPriorPicsFlags() )
     260      {
     261        outputPicturesFlag = false;
     262      }
     263#endif
    258264
    259265      if (nalu.m_nalUnitType == NAL_UNIT_EOS) // End of sequence
     
    263269      if( bNewPicture ) // New picture, slice header parsed but picture not decoded
    264270      {
     271#if NO_OUTPUT_OF_PRIOR_PICS
     272        if(
     273#else
    265274        if ( bNewPOC &&
     275#endif
    266276           (   nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL
    267277            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP
     
    10411051      conf.getWindowBottomOffset()* yScal + defDisp.getWindowBottomOffset() );
    10421052  }
    1043        
    10441053  // update POC of display order
    10451054  pocLastDisplay = pic->getPOC();
  • branches/SHM-5.1-dev/source/Lib/TLibCommon/TComSlice.cpp

    r624 r625  
    111111, m_bCrossLayerBLAFlag            ( false )
    112112#endif
     113#if NO_OUTPUT_OF_PRIOR_PICS
     114, m_noOutputOfPriorPicsFlag       ( false )
     115, m_noRaslOutputFlag              ( false )
     116, m_handleCraAsBlaFlag            ( false )
     117#endif
    113118#endif //SVC_EXTENSION
    114119{
     
    194199      || getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA;
    195200}
     201#if NO_OUTPUT_OF_PRIOR_PICS
     202Bool TComSlice::getBlaPicFlag       ()
     203{
     204    return  getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP
     205    || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL
     206    || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP;
     207}
     208Bool TComSlice::getCraPicFlag       ()
     209{
     210    return getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA;
     211}
     212#endif
    196213
    197214/**
  • branches/SHM-5.1-dev/source/Lib/TLibCommon/TComSlice.h

    r624 r625  
    19521952  Bool        m_bCrossLayerBLAFlag;
    19531953#endif
     1954#if NO_OUTPUT_OF_PRIOR_PICS
     1955  Bool        m_noOutputOfPriorPicsFlag;
     1956  Bool        m_noRaslOutputFlag;
     1957  Bool        m_handleCraAsBlaFlag;
     1958#endif
    19541959#endif //SVC_EXTENSION
    19551960
     
    20382043  NalUnitType getNalUnitType    () const                        { return m_eNalUnitType;        }
    20392044  Bool      getRapPicFlag       (); 
     2045#if NO_OUTPUT_OF_PRIOR_PICS
     2046  Bool      getBlaPicFlag       ();
     2047  Bool      getCraPicFlag       ();
     2048#endif
    20402049  Bool      getIdrPicFlag       ()                              { return getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP; }
    20412050  Bool      isIRAP              () const                        { return (getNalUnitType() >= 16) && (getNalUnitType() <= 23); } 
     
    22592268
    22602269  Void setILRPic(TComPic **pcIlpPic);
     2270#if NO_OUTPUT_OF_PRIOR_PICS
     2271  Void setNoOutputOfPriorPicsFlag(const Bool x)   { m_noOutputOfPriorPicsFlag = x;    }
     2272  Bool getNoOutputOfPriorPicsFlag()               { return m_noOutputOfPriorPicsFlag; }
     2273
     2274  Void setNoRaslOutputFlag    ( const Bool val )   { m_noRaslOutputFlag = val;  }
     2275  Bool getNoRaslOutputFlag    ()                   { return m_noRaslOutputFlag; }
     2276
     2277  Void setHandleCraAsBlaFlag  ( const Bool val )   { m_handleCraAsBlaFlag = val;  }
     2278  Bool getHandleCraAsBlaFlag  ()                   { return m_handleCraAsBlaFlag; }
     2279
     2280#endif
    22612281
    22622282#endif //SVC_EXTENSION
  • branches/SHM-5.1-dev/source/Lib/TLibCommon/TypeDef.h

    r624 r625  
    8888#define POC_RESET_FLAG                   1      ///< JCTVC-N0244: POC reset flag for  layer pictures.
    8989#define POC_RESET_IDC                    1      ///< JCTVC-P0041: Include poc_reset_idc and related derivation - eventually will replace POC_RESET_FLAG
     90#define NO_OUTPUT_OF_PRIOR_PICS          1      ///< Use no_output_of_prior_pics_flag
    9091#define ALIGN_TSA_STSA_PICS              1      ///< JCTVC-N0084: Alignment of TSA and STSA pictures across AU.
    9192#define REPN_FORMAT_IN_VPS               1      ///< JCTVC-N0092: Signal represenation format (spatial resolution, bit depth, colour format) in the VPS
  • branches/SHM-5.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r624 r625  
    20492049  if( rpcSlice->getRapPicFlag())
    20502050  {
     2051#if !NO_OUTPUT_OF_PRIOR_PICS
    20512052    READ_FLAG( uiCode, "no_output_of_prior_pics_flag" );  //ignored
     2053#else
     2054    READ_FLAG( uiCode, "no_output_of_prior_pics_flag" );  rpcSlice->setNoOutputOfPriorPicsFlag( uiCode ? true : false );
     2055#endif
    20522056  }
    20532057  READ_UVLC (    uiCode, "slice_pic_parameter_set_id" );  rpcSlice->setPPSId(uiCode);
  • branches/SHM-5.1-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r620 r625  
    803803  TComPic*&   pcPic         = m_pcPic;
    804804#if SVC_EXTENSION
     805#if !NO_OUTPUT_OF_PRIOR_PICS
    805806#if NO_CLRAS_OUTPUT_FLAG
    806807  Bool bFirstSliceInSeq;
     808#endif
    807809#endif
    808810  m_apcSlicePilot->setVPS( m_parameterSetManagerDecoder.getPrefetchedVPS(0) );
     
    858860  m_apcSlicePilot->setAssociatedIRAPType(m_associatedIRAPType);
    859861
     862#if NO_OUTPUT_OF_PRIOR_PICS
     863  // Infer the value of NoOutputOfPriorPicsFlag
     864  if( m_apcSlicePilot->getRapPicFlag() )
     865  {
     866    if ( m_apcSlicePilot->getBlaPicFlag() || m_apcSlicePilot->getIdrPicFlag()  ||
     867        (m_apcSlicePilot->getCraPicFlag() && m_bFirstSliceInSequence) ||
     868        (m_apcSlicePilot->getCraPicFlag() && m_apcSlicePilot->getHandleCraAsBlaFlag()))
     869    {
     870      m_apcSlicePilot->setNoRaslOutputFlag( true );
     871    }
     872    else
     873    {
     874      m_apcSlicePilot->setNoRaslOutputFlag( false );
     875    }
     876  }
     877#endif
     878
    860879  // Skip pictures due to random access
    861880  if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay))
     
    879898#if SVC_EXTENSION
    880899  bNewPOC = (m_apcSlicePilot->getPOC()!= m_prevPOC);
     900
     901#if NO_OUTPUT_OF_PRIOR_PICS
     902#if NO_CLRAS_OUTPUT_FLAG
     903  if (m_layerId == 0 && m_apcSlicePilot->getRapPicFlag() )
     904  {
     905    if (m_bFirstSliceInSequence)
     906    {
     907      setNoClrasOutputFlag(true);
     908    }
     909    else if ( m_apcSlicePilot->getBlaPicFlag() )
     910    {
     911      setNoClrasOutputFlag(true);
     912    }
     913#if O0149_CROSS_LAYER_BLA_FLAG
     914    else if (m_apcSlicePilot->getIdrPicFlag() && m_apcSlicePilot->getCrossLayerBLAFlag())
     915    {
     916      setNoClrasOutputFlag(true);
     917    }
     918#endif
     919    else
     920    {
     921      setNoClrasOutputFlag(false);
     922    }     
     923  }
     924  else
     925  {
     926    setNoClrasOutputFlag(false);
     927  }
     928
     929  m_apcSlicePilot->decodingRefreshMarking(m_pocCRA, m_bRefreshPending, m_cListPic, getNoClrasOutputFlag());
     930#endif
     931
     932  // Derive the value of NoOutputOfPriorPicsFlag
     933  if( bNewPOC || m_layerId!=m_uiPrevLayerId )   // i.e. new coded picture
     934  {
     935    if( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA && m_apcSlicePilot->getNoRaslOutputFlag() )
     936    {
     937      this->setNoOutputOfPriorPicsFlags( true );
     938    }
     939    else if( m_apcSlicePilot->getRapPicFlag() && m_apcSlicePilot->getNoRaslOutputFlag() )
     940    {
     941      this->setNoOutputOfPriorPicsFlags( m_apcSlicePilot->getNoOutputOfPriorPicsFlag() );
     942    }
     943    else
     944    {
     945      if( this->m_ppcTDecTop[0]->getNoClrasOutputFlag() )
     946      {
     947        this->setNoOutputOfPriorPicsFlags( true );
     948      }
     949    }
     950  }
     951#endif
     952
    881953#if ALIGNED_BUMPING
    882954  if (bNewPOC || m_layerId!=m_uiPrevLayerId)
     
    9381010#endif
    9391011  }
     1012#if !NO_OUTPUT_OF_PRIOR_PICS
    9401013#if NO_CLRAS_OUTPUT_FLAG
    9411014  bFirstSliceInSeq = m_bFirstSliceInSequence;
     1015#endif
    9421016#endif
    9431017  m_bFirstSliceInSequence = false;
     
    11021176#endif
    11031177
     1178#if !NO_OUTPUT_OF_PRIOR_PICS
    11041179#if NO_CLRAS_OUTPUT_FLAG
    11051180    if (m_layerId == 0 &&
     
    11461221    m_apcSlicePilot->decodingRefreshMarking(m_pocCRA, m_bRefreshPending, m_cListPic, getNoClrasOutputFlag());
    11471222#endif
    1148 
     1223#else
     1224    if ( m_layerId == 0 && m_apcSlicePilot->getRapPicFlag() && getNoClrasOutputFlag() )
     1225    {
     1226      for (UInt i = 0; i < m_apcSlicePilot->getVPS()->getMaxLayers(); i++)
     1227      {
     1228        m_ppcTDecTop[i]->setLayerInitializedFlag(false);
     1229        m_ppcTDecTop[i]->setFirstPicInLayerDecodedFlag(false);
     1230      }
     1231    }
     1232#endif
    11491233    // Buffer initialize for prediction.
    11501234    m_cPrediction.initTempBuff();
  • branches/SHM-5.1-dev/source/Lib/TLibDecoder/TDecTop.h

    r595 r625  
    239239  fstream* getBLSyntaxFile() { return m_pBLSyntaxFile; }
    240240#endif
    241 
     241#if NO_OUTPUT_OF_PRIOR_PICS
     242#if NO_CLRAS_OUTPUT_FLAG
     243  Bool getNoOutputOfPriorPicsFlags()         { return m_noOutputOfPriorPicsFlags;}
     244  Void setNoOutputOfPriorPicsFlags(Bool x)   { m_noOutputOfPriorPicsFlags = x;   }
     245#endif
     246#endif
    242247protected:
    243248  Void  xGetNewPicBuffer  (TComSlice* pcSlice, TComPic*& rpcPic);
     
    266271  Int  getFirstPicInLayerDecodedFlag()       { return m_firstPicInLayerDecodedFlag;}
    267272  Void setFirstPicInLayerDecodedFlag(Bool x) { m_firstPicInLayerDecodedFlag = x;   }
     273#if !NO_OUTPUT_OF_PRIOR_PICS
    268274  Int  getNoOutputOfPriorPicsFlags()         { return m_noOutputOfPriorPicsFlags;}
    269275  Void setNoOutputOfPriorPicsFlags(Bool x)   { m_noOutputOfPriorPicsFlags = x;   }
    270276#endif
     277#endif
    271278};// END CLASS DEFINITION TDecTop
    272279
  • branches/SHM-5.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r624 r625  
    15671567  if ( pcSlice->getRapPicFlag() )
    15681568  {
     1569#if NO_OUTPUT_OF_PRIOR_PICS
     1570    WRITE_FLAG( pcSlice->getNoOutputOfPriorPicsFlag(), "no_output_of_prior_pics_flag" );
     1571#else
    15691572    WRITE_FLAG( 0, "no_output_of_prior_pics_flag" );
     1573#endif
    15701574  }
    15711575  WRITE_UVLC( pcSlice->getPPS()->getPPSId(), "slice_pic_parameter_set_id" );
Note: See TracChangeset for help on using the changeset viewer.