Opened 10 years ago Last modified 10 years ago #1346 new defectwrong STSA decision
Description
In HEVC specification, STSA is noted as in below:
Pictures following an STSA picture in decoding order with the same TemporalId as the STSA picture do not use picture prior to the STSA picture in decoding order with the same TemporalId as the STSA picture for inter prediction reference.
However, TEncGop.cpp decides nal_unit_type as STSA when STSA is not used for reference for pictures following an STSA picture in decoding order with the same TemporalId as the STA picture. (as shown in below)
Bool isSTSA=true; for(Int ii=iGOPid+1;(ii<m_pcCfg->getGOPSize() && isSTSA==true);ii++) { Int lTid= m_pcCfg->getGOPEntry(ii).m_temporalId; if(lTid==pcSlice->getTLayer()) { TComReferencePictureSet* nRPS = pcSlice->getSPS()->getRPSList()->getReferencePictureSet(ii); for(Int jj=0;jj<nRPS->getNumberOfPictures();jj++) { if(nRPS->getUsed(jj)) { Int tPoc=m_pcCfg->getGOPEntry(ii).m_POC+nRPS->getDeltaPOC(jj); Int kk=0; for(kk=0;kk<m_pcCfg->getGOPSize();kk++) { if(m_pcCfg->getGOPEntry(kk).m_POC==tPoc) break; } Int tTid=m_pcCfg->getGOPEntry(kk).m_temporalId; if(tTid >= pcSlice->getTLayer()) { isSTSA=false; break; } } } }
I made a quick patch for this bug, and confirmed it working. Index: Lib/TLibEncoder/TEncGOP.cpp =================================================================== --- Lib/TLibEncoder/TEncGOP.cpp (revision 4178) +++ Lib/TLibEncoder/TEncGOP.cpp (working copy) @@ -910,23 +910,20 @@ if(lTid==pcSlice->getTLayer()) { TComReferencePictureSet* nRPS = pcSlice->getSPS()->getRPSList()->getReferencePictureSet(ii); - for(Int jj=0;jj<nRPS->getNumberOfPictures();jj++) + for(Int jj=0;(jj<nRPS->getNumberOfPictures() && isSTSA==true);jj++) { if(nRPS->getUsed(jj)) { Int tPoc=m_pcCfg->getGOPEntry(ii).m_POC+nRPS->getDeltaPOC(jj); Int kk=0; - for(kk=0;kk<m_pcCfg->getGOPSize();kk++) + for(kk=0;kk<iGOPid;kk++) { if(m_pcCfg->getGOPEntry(kk).m_POC==tPoc) + { + isSTSA=false; break; + } } - Int tTid=m_pcCfg->getGOPEntry(kk).m_temporalId; - if(tTid >= pcSlice->getTLayer()) - { - isSTSA=false; - break; - } } } } Change History (2)comment:1 Changed 10 years ago by DefaultCC Plugin
comment:2 Changed 10 years ago by tee.jungNote: See
TracTickets for help on using
tickets. | This list contains all users that will be notified about changes made to this ticket. These roles will be notified: Reporter, Owner, Subscriber, Participant
|
updated patch.