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


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@…>

Location:
branches/SHM-3.1-dev/source/Lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-3.1-dev/source/Lib/TLibCommon/TypeDef.h

    r411 r413  
    4949#define VPS_NUH_LAYER_ID                 1      ///< N0085: Assert that the nuh_layer_id of VPS NAL unit should be 0
    5050#if SVC_EXTENSION
    51 #define POC_RESET_FLAG                1         ///< N0244: POC reset flag for  layer pictures.
    5251#define MAX_LAYERS                       2      ///< max number of layers the codec is supposed to handle
     52#define POC_RESET_FLAG                   1      ///< N0244: POC reset flag for  layer pictures.
     53#define ALIGN_TSA_STSA_PICS              1      ///< N0084: Alignment of TSA and STSA pictures across AU.
    5354#define REPN_FORMAT_IN_VPS               1      ///< N0092: Signal represenation format (spatial resolution, bit depth, colour format) in the VPS
    5455#define TIMING_INFO_NONZERO_LAYERID_SPS  1      ///< N0085: Semantics of vui_timing_info_present_flag to always set that flag to zero for non-zero layer ID SPS
  • 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.