﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
163	bug related to GOP size setting	libin		"When using random access configuration, setting GOPSize=16 and RateGOPSize=8, the decoder crashed.
That is caused by for frame 8, at the encoder side, the reference frame list is [L0 0 16 ] [L1 0 16 ] [LC 0 16 ], which is treated as low delay B frame; but at the decoder side, the reference frame list is constructed as [L0 0 16 ] [L1 16 0 ] [LC 0 16 ], which is traditional B frame.

In my opinion, the fix can be
  // store lambda
  m_pcRdCost ->setLambda( dLambda );
  m_pcTrQuant->setLambda( dLambda );
  rpcSlice   ->setLambda( dLambda );

'''#if BUG_FIX_GOP_SIZE'''
  if ( rpcSlice->getPOC()%m_pcCfg->getGOPSize() == 0 )
  {
    eSliceType = P_SLICE;
  }
  else
  {
    eSliceType = B_SLICE;
  }
  eSliceType = (iPOCLast == 0 || uiPOCCurr % m_pcCfg->getIntraPeriod() == 0 || m_pcGOPEncoder->getGOPSize() == 0) ? I_SLICE : eSliceType;
  rpcSlice->setSliceType    ( eSliceType );
'''#endif'''
  
around line 353 in TEncSlice::initEncSlice()."	defect	closed	minor		HM		fixed		fbossen ksuehring davidf jct-vc@…
