Changeset 531 in SHVCSoftware for branches/SHM-4.1-dev/source/Lib/TLibEncoder


Ignore:
Timestamp:
31 Dec 2013, 16:50:03 (12 years ago)
Author:
nokia
Message:

JCTVC-O0149: implementation of cross_layer_bla_flag

Location:
branches/SHM-4.1-dev/source/Lib/TLibEncoder
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r530 r531  
    13411341      iBits++;
    13421342    }
     1343#if O0149_CROSS_LAYER_BLA_FLAG
     1344    if( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > iBits )
     1345    {
     1346      assert(!!"cross_layer_bla_flag");
     1347      WRITE_FLAG(pcSlice->getCrossLayerBLAFlag(), "cross_layer_bla_flag");
     1348      iBits++;
     1349    }
     1350#endif
    13431351    for ( ; iBits < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); iBits++)
    13441352    {
  • branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCfg.h

    r524 r531  
    398398#if HIGHER_LAYER_IRAP_SKIP_FLAG
    399399  Int       m_skipPictureAtArcSwitch;
     400#endif
     401#if O0149_CROSS_LAYER_BLA_FLAG
     402  Bool      m_crossLayerBLAFlag;
    400403#endif
    401404#endif
     
    952955  Void      setAltOuputLayerFlag(Bool b) { m_altOutputLayerFlag = b;    }
    953956#endif
     957#if O0149_CROSS_LAYER_BLA_FLAG
     958  Bool      getCrossLayerBLAFlag() const { return m_crossLayerBLAFlag; }
     959  Void      setCrossLayerBLAFlag(Bool b) { m_crossLayerBLAFlag = b;    }
     960#endif
    954961#endif
    955962};
  • branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r529 r531  
    635635    }
    636636#endif
     637#if O0149_CROSS_LAYER_BLA_FLAG
     638    if( m_layerId == 0 && (getNalUnitType(pocCurr, m_iLastIDR) == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType(pocCurr, m_iLastIDR) == NAL_UNIT_CODED_SLICE_IDR_N_LP) )
     639    {
     640      pcSlice->setCrossLayerBLAFlag(m_pcEncTop->getCrossLayerBLAFlag());
     641    }
     642    else
     643    {
     644      pcSlice->setCrossLayerBLAFlag(false);
     645    }
     646#endif
     647#if NO_CLRAS_OUTPUT_FLAG
     648    if (m_layerId == 0 &&
     649        (pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP
     650      || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL
     651      || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP
     652      || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL
     653      || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP
     654      || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA))
     655    {
     656      if (m_bFirst)
     657      {
     658        m_pcEncTop->setNoClrasOutputFlag(true);
     659      }
     660      else if (pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP
     661            || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL
     662            || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP)
     663      {
     664        m_pcEncTop->setNoClrasOutputFlag(true);
     665      }
     666#if O0149_CROSS_LAYER_BLA_FLAG
     667      else if ((pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP) &&
     668               pcSlice->getCrossLayerBLAFlag())
     669      {
     670        m_pcEncTop->setNoClrasOutputFlag(true);
     671      }
     672#endif
     673      else
     674      {
     675        m_pcEncTop->setNoClrasOutputFlag(false);
     676      }
     677      if (m_pcEncTop->getNoClrasOutputFlag())
     678      {
     679        for (UInt i = 0; i < m_pcCfg->getNumLayer(); i++)
     680        {
     681          m_ppcTEncTop[i]->setLayerInitializedFlag(false);
     682          m_ppcTEncTop[i]->setFirstPicInLayerDecodedFlag(false);
     683        }
     684      }
     685    }
     686#endif
    637687#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    638688    if (m_pcEncTop->getAdaptiveResolutionChange() > 0 && m_layerId == 1 && pocCurr > m_pcEncTop->getAdaptiveResolutionChange())
     
    913963
    914964    // Do decoding refresh marking if any
     965#if NO_CLRAS_OUTPUT_FLAG
     966    pcSlice->decodingRefreshMarking(m_pocCRA, m_bRefreshPending, rcListPic, m_pcEncTop->getNoClrasOutputFlag());
     967#else
    915968    pcSlice->decodingRefreshMarking(m_pocCRA, m_bRefreshPending, rcListPic);
     969#endif
    916970    m_pcEncTop->selectReferencePictureSet(pcSlice, pocCurr, iGOPid);
    917971    pcSlice->getRPS()->setNumberOfLongtermPictures(0);
  • branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r529 r531  
    9292  m_pocAdjustmentValue     = 0;
    9393#endif
     94#if NO_CLRAS_OUTPUT_FLAG
     95  m_noClrasOutputFlag          = false;
     96  m_layerInitializedFlag       = false;
     97  m_firstPicInLayerDecodedFlag = false;
     98  m_noOutputOfPriorPicsFlags   = false;
     99#endif
    94100#endif //SVC_EXTENSION
    95101}
     
    12321238  m_cPPS.setNumExtraSliceHeaderBits( 2 );
    12331239#endif
     1240#if O0149_CROSS_LAYER_BLA_FLAG
     1241  if (m_crossLayerBLAFlag)
     1242  {
     1243    m_cPPS.setNumExtraSliceHeaderBits( 3 );
     1244  }
     1245#endif
    12341246}
    12351247
  • branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncTop.h

    r507 r531  
    148148  Int                     m_pocAdjustmentValue;
    149149#endif
     150#if NO_CLRAS_OUTPUT_FLAG
     151  Bool                    m_noClrasOutputFlag;
     152  Bool                    m_layerInitializedFlag;
     153  Bool                    m_firstPicInLayerDecodedFlag;
     154  Bool                    m_noOutputOfPriorPicsFlags;
     155#endif
    150156#endif //SVC_EXTENSION
    151157protected:
     
    250256  Void setPocAdjustmentValue(Int x) { m_pocAdjustmentValue = x;   }
    251257#endif
     258#if NO_CLRAS_OUTPUT_FLAG
     259  Int  getNoClrasOutputFlag()                { return m_noClrasOutputFlag;}
     260  Void setNoClrasOutputFlag(Bool x)          { m_noClrasOutputFlag = x;   }
     261  Int  getLayerInitializedFlag()             { return m_layerInitializedFlag;}
     262  Void setLayerInitializedFlag(Bool x)       { m_layerInitializedFlag = x;   }
     263  Int  getFirstPicInLayerDecodedFlag()       { return m_firstPicInLayerDecodedFlag;}
     264  Void setFirstPicInLayerDecodedFlag(Bool x) { m_firstPicInLayerDecodedFlag = x;   }
     265  Int  getNoOutputOfPriorPicsFlags()         { return m_noOutputOfPriorPicsFlags;}
     266  Void setNoOutputOfPriorPicsFlags(Bool x)   { m_noOutputOfPriorPicsFlags = x;   }
     267#endif
    252268#else //SVC_EXTENSION
    253269  Void encode( Bool bEos, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut,
Note: See TracChangeset for help on using the changeset viewer.