Changeset 516 in SHVCSoftware for branches/SHM-4.1-dev/source/App


Ignore:
Timestamp:
17 Dec 2013, 10:27:32 (11 years ago)
Author:
qualcomm
Message:

DPB-information for output layer sets in the VPS extension. (MACRO: VPS_DPB_SIZE_TABLE)

Includes DPB-table signaling for output layer sets in the VPS extension.

From: Adarsh K. Ramasubramonian <aramasub@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r514 r516  
    9090    vps->setMaxDecPicBuffering             ( m_maxDecPicBuffering[i], i );
    9191  }
     92
    9293#if REPN_FORMAT_IN_VPS
    9394  vps->setRepFormatIdxPresentFlag( true );   // Could be disabled to optimize in some cases.
     
    11911192  }
    11921193#endif
     1194 #if VPS_DPB_SIZE_TABLE
     1195  // The Layer ID List variables can be derived here. 
     1196#if DERIVE_LAYER_ID_LIST_VARIABLES
     1197  vps->deriveLayerIdListVariables();
     1198#endif
     1199  vps->deriveNumberOfSubDpbs();
     1200  // Initialize dpb_size_table() for all ouput layer sets in the VPS extension
     1201  for(i = 1; i < vps->getNumOutputLayerSets(); i++)
     1202  {
     1203    Int layerSetId = vps->getOutputLayerSetIdx(i);
     1204
     1205    // For each output layer set, set the DPB size for each layer and the reorder/latency value the maximum for all layers
     1206    Bool checkFlagOuter = false;      // Used to calculate sub_layer_flag_info_present_flag
     1207    Bool checkFlagInner[MAX_TLAYER];  // Used to calculate sub_layer_dpb_info_present_flag
     1208
     1209    for(Int j = 0; j < vps->getMaxTLayers(); j++)
     1210    {
     1211
     1212      Int maxNumReorderPics = -1;
     1213      for(Int k = 0; k < vps->getNumSubDpbs(i); k++)
     1214      {
     1215        Int layerId = vps->getLayerSetLayerIdList(layerSetId, k); // k-th layer in the output layer set
     1216        vps->setMaxVpsDecPicBufferingMinus1( i, k, j,  m_acTEncTop[layerId].getMaxDecPicBuffering(j) );
     1217        maxNumReorderPics       = std::max( maxNumReorderPics, m_acTEncTop[layerId].getNumReorderPics(j));
     1218      }
     1219      vps->setMaxVpsNumReorderPics(i, j, maxNumReorderPics);
     1220     
     1221      if( j == 0 )  // checkFlagInner[0] is always 1
     1222      {
     1223        checkFlagInner[j] = true;     // Always signal sub-layer DPB information for the first sub-layer
     1224      }
     1225      else
     1226      {
     1227        checkFlagInner[j] = false;    // Initialize to be false. If the values of the current sub-layers matches with the earlier sub-layer,
     1228                                      // then will be continue to be false - i.e. the j-th sub-layer DPB info is not signaled
     1229        checkFlagInner[j] |= ( maxNumReorderPics != vps->getMaxVpsNumReorderPics(i, j - 1) );
     1230        for(Int k = 0; k < vps->getNumSubDpbs(i) && !checkFlagInner[j]; k++)  // If checkFlagInner[j] is true, break and signal the values
     1231        {
     1232          checkFlagInner[j] |= ( vps->getMaxVpsDecPicBufferingMinus1(i, k, j - 1) != vps->getMaxVpsDecPicBufferingMinus1(i, k, j) );
     1233        }
     1234      }
     1235      // If checkFlagInner[j] = true, then some value needs to be signalled for the j-th sub-layer
     1236      vps->setSubLayerDpbInfoPresentFlag( i, j, checkFlagInner[j] );
     1237    }
     1238    for(Int j = 1; j < vps->getMaxTLayers(); j++) // Check if DPB info of any of non-zero sub-layers is signaled. If so set flag to one
     1239    {
     1240      if( vps->getSubLayerDpbInfoPresentFlag(i, j) )
     1241      {
     1242        checkFlagOuter = true;
     1243        break;
     1244      }
     1245    }
     1246    vps->setSubLayerFlagInfoPresentFlag( i, checkFlagOuter );
     1247  }
     1248#endif
    11931249#if VPS_EXTN_DIRECT_REF_LAYERS
    11941250  // Direct reference layers
Note: See TracChangeset for help on using the changeset viewer.