Ticket #1060: wpp_contexts.patch

File wpp_contexts.patch, 1.3 KB (added by ksuehring, 11 years ago)
  • source/Lib/TLibDecoder/TDecTop.cpp

     
    265265    assert (0);
    266266  }
    267267
     268  if( m_apcSlicePilot->isIRAP()&& pps->getDependentSliceSegmentsEnabledFlag() )
     269  {
     270    Int NumCtx = pps->getEntropyCodingSyncEnabledFlag()?2:1;
     271    m_cSliceDecoder.initCtxMem(NumCtx);
     272    for ( UInt st = 0; st < NumCtx; st++ )
     273    {
     274      TDecSbac* ctx = NULL;
     275      ctx = new TDecSbac;
     276      ctx->init( &m_cBinCABAC );
     277      m_cSliceDecoder.setCtxMem( ctx, st );
     278    }
     279  }
     280
    268281  m_apcSlicePilot->setPPS(pps);
    269282  m_apcSlicePilot->setSPS(sps);
    270283  pps->setSPS(sps);
     
    612625  TComPPS* pps = new TComPPS();
    613626  m_cEntropyDecoder.decodePPS( pps );
    614627  m_parameterSetManagerDecoder.storePrefetchedPPS( pps );
    615 
    616   if( pps->getDependentSliceSegmentsEnabledFlag() )
    617   {
    618     Int NumCtx = pps->getEntropyCodingSyncEnabledFlag()?2:1;
    619     m_cSliceDecoder.initCtxMem(NumCtx);
    620     for ( UInt st = 0; st < NumCtx; st++ )
    621     {
    622       TDecSbac* ctx = NULL;
    623       ctx = new TDecSbac;
    624       ctx->init( &m_cBinCABAC );
    625       m_cSliceDecoder.setCtxMem( ctx, st );
    626     }
    627   }
    628628}
    629629
    630630Void TDecTop::xDecodeSEI( TComInputBitstream* bs, const NalUnitType nalUnitType )