Changeset 413 in SHVCSoftware for branches/SHM-3.1-dev/source/Lib/TLibEncoder


Ignore:
Timestamp:
8 Oct 2013, 08:37:32 (11 years ago)
Author:
qualcomm
Message:

JCTVC-N0084: Alignment of TSA and STSA pictures (MACRO: ALIGN_TSA_STSA_PICS)

Added check at the encoder to ensure that the TSA and STSA pictures are aligned.

From: Adarsh K. Ramasubramonian <aramasub@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-3.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r412 r413  
    818818          pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_TSA_R);
    819819        }
     820#if ALIGN_TSA_STSA_PICS
     821        if( pcSlice->getLayerId() > 0 )
     822        {
     823          for(Int i = 0; i < pcSlice->getLayerId(); i++)
     824          {
     825            TComList<TComPic*> *cListPic = m_ppcTEncTop[i]->getListPic();
     826            TComPic* lowerLayerPic = pcSlice->getRefPic(*cListPic, pcSlice->getPOC() );
     827            if( lowerLayerPic ) // If picture exists in Layer i
     828            {
     829              assert( ( lowerLayerPic->getSlice(0)->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N ) ||
     830                      ( lowerLayerPic->getSlice(0)->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_R ) );
     831              // TSA pictures are aligned within an access unit.
     832            }
     833          }
     834        }
     835#endif
    820836      }
    821837      else if(pcSlice->isStepwiseTemporalLayerSwitchingPointCandidate(rcListPic))
     
    859875            pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_STSA_R);
    860876          }
     877#if ALIGN_TSA_STSA_PICS
     878          if( pcSlice->getLayerId() > 0 )
     879          {
     880            for(Int i = 0; i < pcSlice->getLayerId(); i++)
     881            {
     882              TComList<TComPic*> *cListPic = m_ppcTEncTop[i]->getListPic();
     883              TComPic* lowerLayerPic = pcSlice->getRefPic(*cListPic, pcSlice->getPOC() );
     884              if( lowerLayerPic ) // If picture exists in Layer i
     885              {
     886                assert( ( lowerLayerPic->getSlice(0)->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N ) ||
     887                        ( lowerLayerPic->getSlice(0)->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_R ) );
     888              }
     889              // STSA pictures are aligned within an access unit.
     890            }
     891          }
     892#endif
    861893        }
    862894      }
Note: See TracChangeset for help on using the changeset viewer.