Opened 9 years ago

Last modified 9 years ago

#1346 new defect

wrong STSA decision

Reported by: tee.jung Owned by:
Priority: major Milestone:
Component: HM Version: HM-16.2
Keywords: Cc: ksuehring, davidf, karlsharman, jct-vc@…

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 9 years ago by DefaultCC Plugin

  • Cc ksuehring davidf karlsharman jct-vc@… added

comment:2 Changed 9 years ago by tee.jung

updated patch.

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)
+                  if(m_pcCfg->getGOPEntry(kk).m_POC==tPoc && m_pcCfg->getGOPEntry(kk).m_temporalId == lTid)
+                  {
+                    isSTSA=false;
                     break;
+				  }
                 }
-                Int tTid=m_pcCfg->getGOPEntry(kk).m_temporalId;
-                if(tTid >= pcSlice->getTLayer())
-                {
-                  isSTSA=false;
-                  break;
-                }
               }
             }
           }

Note: 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

  • David Flynn(Subscriber)
  • jct-vc@…(Subscriber)
  • Karl Sharman(Subscriber)
  • karl.sharman@…(Always)
  • Karsten Suehring(Subscriber, Always)
  • Tee Jung(Reporter, Participant)