Changeset 874 in SHVCSoftware


Ignore:
Timestamp:
28 Aug 2014, 00:57:07 (10 years ago)
Author:
qualcomm
Message:

Removal of avc_base_layer_flag. This flag was in the earlier version of spec but have been replaced by two other flags vps_base_layer_internal_flag and vps_base_layer_available_flag
(MACRO: VPS_AVC_BL_FLAG_REMOVAL)

From: Hendry (fhendry@…)

Location:
branches/SHM-dev
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/cfg/layers.cfg

    r861 r874  
    11NumLayers                     : 2
    2 AvcBase                       : 0
     2NonHEVCBase                   : 0
    33ScalabilityMask1              : 0           # Multiview
    44ScalabilityMask2              : 1           # Scalable
  • branches/SHM-dev/cfg/layers_avcbase.cfg

    r713 r874  
    11NumLayers                     : 2
    2 AvcBase                       : 1
     2NonHEVCBase                   : 1
    33ScalabilityMask1              : 0           # Multiview
    44ScalabilityMask2              : 1           # Scalable
     
    3838InitialQP1                    : 0           # Rate control: initial QP for layer 1
    3939RCForceIntraQP1               : 0           # Rate control: force intra QP to be equal to initial QP for layer 1
     40
     41
     42NumLayerSets                  : 2                       # Include default layer set, value of 0 not allowed
     43NumLayerInIdList1             : 2                       # 0-th layer set is default, need not specify LayerSetLayerIdList0 or NumLayerInIdList0
     44LayerSetLayerIdList1          : 0 1
     45
     46NumAddLayerSets               : 0
     47NumOutputLayerSets            : 2                       # Include defualt OLS, value of 0 not allowed
     48DefaultTargetOutputLayerIdc   : 1
     49NumLayersInOutputLayerSet     : 1                       # The number of layers in the 0-th OLS should not be specified,
     50                                                        # ListOfOutputLayers0 need not be specified
     51ListOfOutputLayers1           : 1                       
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp

    r856 r874  
    12001200
    12011201      // pcPic is statically created for the external (AVC) base layer, no need to delete it
     1202#if VPS_AVC_BL_FLAG_REMOVAL
     1203      if( !m_acTDecTop[layerIdx].getParameterSetManager()->getActiveVPS()->getNonHEVCBaseLayerFlag() || layerIdx )
     1204#else
    12021205      if( !m_acTDecTop[layerIdx].getParameterSetManager()->getActiveVPS()->getAvcBaseLayerFlag() || layerIdx )
     1206#endif
    12031207      {
    12041208        delete pcPic;
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r868 r874  
    6767: m_pBitstreamFile()
    6868#if AVC_BASE
     69#if VPS_AVC_BL_FLAG_REMOVAL
     70, m_nonHEVCBaseLayerFlag(0)
     71#else
    6972, m_avcBaseLayerFlag(0)
     73#endif
    7074#endif
    7175, m_maxTidRefPresentFlag(1)
     
    743747#endif
    744748#if AVC_BASE
     749#if VPS_AVC_BL_FLAG_REMOVAL
     750  ("NonHEVCBase,-nonhevc",            m_nonHEVCBaseLayerFlag,     0, "BL is available but not internal")
     751#else
    745752  ("AvcBase,-avc",            m_avcBaseLayerFlag,     0, "avc_base_layer_flag")
     753#endif
    746754  ("InputBLFile,-ibl",        cfg_BLInputFile,     string(""), "Base layer rec YUV input file name")
    747755#endif
     
    12161224#if SVC_EXTENSION
    12171225#if AVC_BASE
     1226#if VPS_AVC_BL_FLAG_REMOVAL
     1227  if( m_nonHEVCBaseLayerFlag )
     1228#else
    12181229  if( m_avcBaseLayerFlag )
     1230#endif
    12191231  {
    12201232    *cfg_InputFile[0] = cfg_BLInputFile;
     
    25742586 
    25752587  // it can be updated after AVC BL support will be added to the WD
     2588#if VPS_AVC_BL_FLAG_REMOVAL
     2589  if( m_nonHEVCBaseLayerFlag )
     2590#else
    25762591  if( m_avcBaseLayerFlag )
     2592#endif
    25772593  {
    25782594    m_crossLayerIrapAlignFlag = false;
     
    35613577  printf("Scalable                      : %d\n", m_scalabilityMask[SCALABILITY_ID] );
    35623578#if AVC_BASE
     3579#if VPS_AVC_BL_FLAG_REMOVAL
     3580  printf("Base layer                    : %s\n", m_nonHEVCBaseLayerFlag ? "Non-HEVC" : "HEVC");
     3581#else
    35633582  printf("Base layer                    : %s\n", m_avcBaseLayerFlag ? "AVC" : "HEVC");
     3583#endif
    35643584#endif
    35653585#if AUXILIARY_PICTURES
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h

    r868 r874  
    6969  Int       m_framesToBeEncoded;                              ///< number of encoded frames
    7070#if AVC_BASE
     71#if VPS_AVC_BL_FLAG_REMOVAL
     72  Int       m_nonHEVCBaseLayerFlag;                           ///< non HEVC BL
     73#else
    7174  Int       m_avcBaseLayerFlag;                               ///< avc_baselayer_flag
     75#endif
    7276#endif
    7377  Bool      m_maxTidRefPresentFlag;
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r872 r874  
    234234#if REF_IDX_MFM
    235235#if AVC_BASE
     236#if VPS_AVC_BL_FLAG_REMOVAL
     237    m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : ( m_nonHEVCBaseLayerFlag ? false : true ) && m_acLayerCfg[layer].getNumMotionPredRefLayers());
     238#else
    236239    m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : ( m_avcBaseLayerFlag ? false : true ) && m_acLayerCfg[layer].getNumMotionPredRefLayers());
     240#endif
    237241#else
    238242    m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : ( m_acLayerCfg[layer].getNumMotionPredRefLayers() > 0 ) );
     
    12391243  UInt i = 0, dimIdLen = 0;
    12401244#if AVC_BASE
     1245#if VPS_AVC_BL_FLAG_REMOVAL
     1246  vps->setNonHEVCBaseLayerFlag( m_nonHEVCBaseLayerFlag );
     1247  if ( m_nonHEVCBaseLayerFlag )
     1248  {
     1249    vps->setBaseLayerInternalFlag (false);
     1250  }
     1251#else
    12411252  vps->setAvcBaseLayerFlag(m_avcBaseLayerFlag);
     1253#endif
    12421254#else
    12431255  vps->setAvcBaseLayerFlag(false);
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r873 r874  
    21312131  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
    21322132  {
     2133#if VPS_AVC_BL_FLAG_REMOVAL
     2134    if( layerId == 0 && vps->getNonHEVCBaseLayerFlag() )
     2135#else
    21332136    if( layerId == 0 && vps->getAvcBaseLayerFlag() )
     2137#endif
    21342138#else
    21352139  if ( layerId == 0 )
     
    21702174  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
    21712175  {
     2176#if VPS_AVC_BL_FLAG_REMOVAL
     2177    if( layerId == 0 && vps->getNonHEVCBaseLayerFlag() )
     2178#else
    21722179    if( layerId == 0 && vps->getAvcBaseLayerFlag() )
     2180#endif
    21732181#else
    21742182  if ( layerId == 0 )
     
    22182226  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
    22192227  {
     2228#if VPS_AVC_BL_FLAG_REMOVAL
     2229    if( layerId == 0 && vps->getNonHEVCBaseLayerFlag() )
     2230#else
    22202231    if( layerId == 0 && vps->getAvcBaseLayerFlag() )
     2232#endif
    22212233#else
    22222234  if ( layerId == 0 )
     
    23272339  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
    23282340  {
     2341#if VPS_AVC_BL_FLAG_REMOVAL
     2342    if( layerId == 0 && vps->getNonHEVCBaseLayerFlag() )
     2343#else
    23292344    if( layerId == 0 && vps->getAvcBaseLayerFlag() )
     2345#endif
    23302346#else
    23312347  if ( layerId == 0 )
     
    24552471  }
    24562472#if VPS_EXTN_MASK_AND_DIM_INFO
     2473#if VPS_AVC_BL_FLAG_REMOVAL
     2474  m_nonHEVCBaseLayerFlag = false;
     2475#else
    24572476  m_avcBaseLayerFlag = false;
     2477#endif
    24582478  m_splittingFlag = false;
    24592479  ::memset(m_scalabilityMask, 0, sizeof(m_scalabilityMask));
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r873 r874  
    599599  // ------------------------------------------
    600600#if VPS_EXTN_MASK_AND_DIM_INFO
     601#if VPS_AVC_BL_FLAG_REMOVAL
     602  Bool       m_nonHEVCBaseLayerFlag;
     603#else
    601604  Bool       m_avcBaseLayerFlag;                                // For now, always set to true.
     605#endif
    602606  Bool       m_splittingFlag;
    603607  Bool       m_scalabilityMask[MAX_VPS_NUM_SCALABILITY_TYPES];
     
    965969  Void    setNumLayerSets(UInt v)                               { m_numLayerSets = v;    }
    966970#if VPS_EXTN_MASK_AND_DIM_INFO
     971#if VPS_AVC_BL_FLAG_REMOVAL
     972  Bool   getNonHEVCBaseLayerFlag()                              { return m_nonHEVCBaseLayerFlag;       }
     973  Void   setNonHEVCBaseLayerFlag(Bool x)                        { m_nonHEVCBaseLayerFlag = x;          }
     974#else
    967975  Bool   getAvcBaseLayerFlag()                                  { return m_avcBaseLayerFlag;       }
    968976  Void   setAvcBaseLayerFlag(Bool x)                            { m_avcBaseLayerFlag = x;          }
     977#endif
    969978
    970979  Bool   getSplittingFlag()                                     { return m_splittingFlag;          }
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r873 r874  
    4444#define MAX_LAYERS                       8      ///< max number of layers the codec is supposed to handle
    4545
     46#define VPS_AVC_BL_FLAG_REMOVAL          1      ///< remove avc_base_layer_flag and direct the function its offer to vps_base_layer_internal_flag and vps_base_layer_available_flag
    4647#define VPS_RESERVED_FLAGS               1      ///< vps_base_layer_internal_flag and vps_base_layer_available_flag
    4748#define VPS_VUI_VST_PARAMS               1      ///< JCTVC-R0227: Related to signalling of VST parameters of the base layer.
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r872 r874  
    10021002  READ_FLAG( uiCode, "vps_base_layer_internal_flag");             pcVPS->setBaseLayerInternalFlag( uiCode ? true : false );
    10031003  READ_FLAG( uiCode, "vps_base_layer_available_flag");            pcVPS->setBaseLayerAvailableFlag( uiCode ? true : false );
     1004#if VPS_AVC_BL_FLAG_REMOVAL
     1005  pcVPS->setNonHEVCBaseLayerFlag( (pcVPS->getBaseLayerAvailableFlag() && !pcVPS->getBaseLayerInternalFlag()) ? true : false);
     1006#endif
    10041007#else
    10051008  READ_CODE( 2,  uiCode,  "vps_reserved_three_2bits" );           assert(uiCode == 3);
     
    11781181  UInt numScalabilityTypes = 0, i = 0, j = 0;
    11791182
     1183#if !VPS_AVC_BL_FLAG_REMOVAL
    11801184  READ_FLAG( uiCode, "avc_base_layer_flag" ); vps->setAvcBaseLayerFlag(uiCode ? true : false);
     1185#endif
    11811186
    11821187#if !P0307_REMOVE_VPS_VUI_OFFSET
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r873 r874  
    347347#else
    348348    m_iMaxRefPicNum = pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1( getCommonDecoderParams()->getTargetOutputLayerSetIdx(), pcSlice->getLayerId(), pcSlice->getTLayer() ) + 1; // m_uiMaxDecPicBuffering has the space for the picture currently being decoded
     349    //TODO: HENDRY -- Do the checking here.
    349350#endif
    350351  }
     
    742743
    743744    // When avc_base_layer_flag is equal to 1, it is a requirement of bitstream conformance that the value of sps_scaling_list_ref_layer_id shall be greater than 0
     745#if VPS_AVC_BL_FLAG_REMOVAL
     746    if( activeVPS->getNonHEVCBaseLayerFlag() )
     747#else
    744748    if( activeVPS->getAvcBaseLayerFlag() )
     749#endif
    745750    {
    746751      assert( refLayerId > 0 );
     
    771776
    772777    // When avc_base_layer_flag is equal to 1, it is a requirement of bitstream conformance that the value of sps_scaling_list_ref_layer_id shall be greater than 0
     778#if VPS_AVC_BL_FLAG_REMOVAL
     779    if( activeVPS->getNonHEVCBaseLayerFlag() )
     780#else
    773781    if( activeVPS->getAvcBaseLayerFlag() )
     782#endif
    774783    {
    775784      assert( refLayerId > 0 );
     
    797806
    798807#if AVC_BASE
     808#if VPS_AVC_BL_FLAG_REMOVAL
     809  if( activeVPS->getNonHEVCBaseLayerFlag() )
     810#else
    799811  if( activeVPS->getAvcBaseLayerFlag() )
     812#endif
    800813  {
    801814    TComPic* pBLPic = (*m_ppcTDecTop[0]->getListPic()->begin());
     
    10591072    m_isNoOutputPriorPics = false;
    10601073  }
     1074
     1075  //TODO: HENDRY -- Probably do the checking for max number of positive and negative pics here
     1076
    10611077
    10621078  //For inference of PicOutputFlag
     
    15801596  {
    15811597#if AVC_BASE
     1598#if VPS_AVC_BL_FLAG_REMOVAL
     1599    if( m_layerId == 1 && m_parameterSetManagerDecoder.getPrefetchedVPS(0)->getNonHEVCBaseLayerFlag() )
     1600#else
    15821601    if( m_layerId == 1 && m_parameterSetManagerDecoder.getPrefetchedVPS(0)->getAvcBaseLayerFlag() )
     1602#endif
    15831603    {
    15841604      TComPic* pBLPic = (*m_ppcTDecTop[0]->getListPic()->begin());
     
    19411961        UInt refLayerId = pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc);
    19421962#if AVC_BASE
     1963#if VPS_AVC_BL_FLAG_REMOVAL
     1964        if( refLayerId == 0 && m_parameterSetManagerDecoder.getActiveVPS()->getNonHEVCBaseLayerFlag() )
     1965#else
    19431966        if( refLayerId == 0 && m_parameterSetManagerDecoder.getActiveVPS()->getAvcBaseLayerFlag() )
     1967#endif
    19441968        {         
    19451969          TComPic* pic = *m_ppcTDecTop[0]->getListPic()->begin();
     
    21162140        UInt refLayerIdc = pcSlice->getInterLayerPredLayerIdc(i);
    21172141#if AVC_BASE
     2142#if VPS_AVC_BL_FLAG_REMOVAL
     2143        if( pcSlice->getVPS()->getRefLayerId( m_layerId, refLayerIdc ) == 0 && m_parameterSetManagerDecoder.getActiveVPS()->getNonHEVCBaseLayerFlag() )
     2144#else
    21182145        if( pcSlice->getVPS()->getRefLayerId( m_layerId, refLayerIdc ) == 0 && m_parameterSetManagerDecoder.getActiveVPS()->getAvcBaseLayerFlag() )
     2146#endif
    21192147        {
    21202148          pcSlice->setBaseColPic ( refLayerIdc, *m_ppcTDecTop[0]->getListPic()->begin() );
     
    24372465#endif
    24382466#if AVC_BASE
     2467#if VPS_AVC_BL_FLAG_REMOVAL
     2468      if( m_parameterSetManagerDecoder.getPrefetchedVPS(0)->getNonHEVCBaseLayerFlag() )
     2469#else
    24392470      if( m_parameterSetManagerDecoder.getPrefetchedVPS(0)->getAvcBaseLayerFlag() )
     2471#endif
    24402472      {
    24412473        if( !m_ppcTDecTop[0]->getBLReconFile()->good() )
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r872 r874  
    931931#if VPS_EXTN_MASK_AND_DIM_INFO
    932932  UInt i = 0, j = 0;
    933 
     933#if !VPS_AVC_BL_FLAG_REMOVAL
    934934  WRITE_FLAG( vps->getAvcBaseLayerFlag(),              "avc_base_layer_flag" );
     935#endif
    935936#if !P0307_REMOVE_VPS_VUI_OFFSET
    936937#if O0109_MOVE_VPS_VUI_FLAG
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r873 r874  
    993993      // inferring of the scaling list can be moved to the config file
    994994      UInt refLayerId = 0;
     995#if VPS_AVC_BL_FLAG_REMOVAL
     996      if( m_layerId > 0 && !m_pcEncTop->getVPS()->getNonHEVCBaseLayerFlag() && m_pcEncTop->getVPS()->getRecursiveRefLayerFlag( m_layerId, refLayerId ) )
     997#else
    995998      if( m_layerId > 0 && !m_pcEncTop->getVPS()->getAvcBaseLayerFlag() && m_pcEncTop->getVPS()->getRecursiveRefLayerFlag( m_layerId, refLayerId ) )
     999#endif
    9961000      {
    9971001        m_pcEncTop->getSPS()->setInferScalingListFlag( true );
     
    10231027      // inferring of the scaling list can be moved to the config file
    10241028      UInt refLayerId = 0;
     1029#if VPS_AVC_BL_FLAG_REMOVAL
     1030      if( m_layerId > 0 && !m_pcEncTop->getVPS()->getNonHEVCBaseLayerFlag() && m_pcEncTop->getVPS()->getRecursiveRefLayerFlag( m_layerId, refLayerId ) )
     1031#else
    10251032      if( m_layerId > 0 && !m_pcEncTop->getVPS()->getAvcBaseLayerFlag() && m_pcEncTop->getVPS()->getRecursiveRefLayerFlag( m_layerId, refLayerId ) )
     1033#endif
    10261034      {
    10271035        m_pcEncTop->getSPS()->setInferScalingListFlag( true );
     
    21102118    startCUAddrSliceSegmentIdx++;
    21112119#if AVC_BASE
     2120#if VPS_AVC_BL_FLAG_REMOVAL
     2121    if( m_layerId == 0 && m_pcEncTop->getVPS()->getNonHEVCBaseLayerFlag() )
     2122#else
    21122123    if( m_layerId == 0 && m_pcEncTop->getVPS()->getAvcBaseLayerFlag() )
     2124#endif
    21132125    {
    21142126      pcPic->getPicYuvOrg()->copyToPic( pcPic->getPicYuvRec() );
     
    22232235      OutputNALUnit nalu( NAL_UNIT_VPS, 0, 0 ); // The value of nuh_layer_id of VPS NAL unit shall be equal to 0.
    22242236#if AVC_BASE
     2237#if VPS_AVC_BL_FLAG_REMOVAL
     2238      if( ( m_layerId == 1 && m_pcEncTop->getVPS()->getNonHEVCBaseLayerFlag() ) || ( m_layerId == 0 && !m_pcEncTop->getVPS()->getNonHEVCBaseLayerFlag() ) )
     2239#else
    22252240      if( ( m_layerId == 1 && m_pcEncTop->getVPS()->getAvcBaseLayerFlag() ) || ( m_layerId == 0 && !m_pcEncTop->getVPS()->getAvcBaseLayerFlag() ) )
     2241#endif
    22262242#else
    22272243      if( m_layerId == 0 )
Note: See TracChangeset for help on using the changeset viewer.