Changeset 580 in SHVCSoftware


Ignore:
Timestamp:
31 Jan 2014, 02:45:49 (11 years ago)
Author:
qualcomm
Message:

Move calculation of sub-DPB information flags at the encoder to a new function.

From: Adarsh K. Ramasubramonian <aramasub@…>

Location:
branches/SHM-5.0-dev/source
Files:
3 edited

Legend:

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

    r579 r580  
    11861186    Int layerSetId = vps->getOutputLayerSetIdx(i);
    11871187
    1188     // For each output layer set, set the DPB size for each layer and the reorder/latency value the maximum for all layers
    1189     Bool checkFlagOuter = false;      // Used to calculate sub_layer_flag_info_present_flag
    1190     Bool checkFlagInner[MAX_TLAYER];  // Used to calculate sub_layer_dpb_info_present_flag
    1191 
    11921188    for(Int j = 0; j < vps->getMaxTLayers(); j++)
    11931189    {
     
    12051201      }
    12061202      vps->setMaxVpsNumReorderPics(i, j, maxNumReorderPics);
    1207      
    1208       if( j == 0 )  // checkFlagInner[0] is always 1
    1209       {
    1210         checkFlagInner[j] = true;     // Always signal sub-layer DPB information for the first sub-layer
    1211       }
    1212       else
    1213       {
    1214         checkFlagInner[j] = false;    // Initialize to be false. If the values of the current sub-layers matches with the earlier sub-layer,
    1215                                       // then will be continue to be false - i.e. the j-th sub-layer DPB info is not signaled
    1216         checkFlagInner[j] |= ( maxNumReorderPics != vps->getMaxVpsNumReorderPics(i, j - 1) );
    1217 #if CHANGE_NUMSUBDPB_IDX
    1218         for(Int k = 0; k < vps->getNumSubDpbs(layerSetIdxForOutputLayerSet) && !checkFlagInner[j]; k++)  // If checkFlagInner[j] is true, break and signal the values
    1219 #else
    1220         for(Int k = 0; k < vps->getNumSubDpbs(i) && !checkFlagInner[j]; k++)  // If checkFlagInner[j] is true, break and signal the values
    1221 #endif
    1222         {
    1223           checkFlagInner[j] |= ( vps->getMaxVpsDecPicBufferingMinus1(i, k, j - 1) != vps->getMaxVpsDecPicBufferingMinus1(i, k, j) );
    1224         }
    1225       }
    1226       // If checkFlagInner[j] = true, then some value needs to be signalled for the j-th sub-layer
    1227       vps->setSubLayerDpbInfoPresentFlag( i, j, checkFlagInner[j] );
    1228     }
    1229     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
    1230     {
    1231       if( vps->getSubLayerDpbInfoPresentFlag(i, j) )
    1232       {
    1233         checkFlagOuter = true;
    1234         break;
    1235       }
    1236     }
    1237     vps->setSubLayerFlagInfoPresentFlag( i, checkFlagOuter );
     1203      vps->determineSubDpbInfoFlags();
     1204    }
    12381205  }
    12391206#endif
  • branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.cpp

    r579 r580  
    23022302
    23032303  return scalIdx;
     2304}
     2305#endif
     2306#if VPS_DPB_SIZE_TABLE
     2307Void TComVPS::determineSubDpbInfoFlags()
     2308{
     2309  for(Int i = 1; i < getNumOutputLayerSets(); i++)
     2310  {
     2311    Int layerSetIdxForOutputLayerSet = getOutputLayerSetIdx( i );
     2312    // For each output layer set, set the DPB size for each layer and the reorder/latency value the maximum for all layers
     2313    Bool checkFlagOuter = false;      // Used to calculate sub_layer_flag_info_present_flag
     2314    Bool checkFlagInner[MAX_TLAYER];  // Used to calculate sub_layer_dpb_info_present_flag
     2315
     2316    for(Int j = 0; j < getMaxTLayers(); j++)
     2317    {
     2318      // --------------------------------------------------------
     2319      // To determine value of m_subLayerDpbInfoPresentFlag
     2320      // --------------------------------------------------------
     2321      if( j == 0 )  // checkFlagInner[0] is always 1
     2322      {
     2323        checkFlagInner[j] = true;     // Always signal sub-layer DPB information for the first sub-layer
     2324      }
     2325      else
     2326      {
     2327        checkFlagInner[j] = false;    // Initialize to be false. If the values of the current sub-layers matches with the earlier sub-layer,
     2328                                      // then will be continue to be false - i.e. the j-th sub-layer DPB info is not signaled
     2329        checkFlagInner[j] |= ( getMaxVpsNumReorderPics(i, j) != getMaxVpsNumReorderPics(i, j - 1) );
     2330#if CHANGE_NUMSUBDPB_IDX
     2331        for(Int k = 0; k < getNumSubDpbs(layerSetIdxForOutputLayerSet) && !checkFlagInner[j]; k++)  // If checkFlagInner[j] is true, break and signal the values
     2332#else
     2333        for(Int k = 0; k < getNumSubDpbs(i) && !checkFlagInner[j]; k++)  // If checkFlagInner[j] is true, break and signal the values
     2334#endif
     2335        {
     2336          checkFlagInner[j] |= ( getMaxVpsDecPicBufferingMinus1(i, k, j - 1) != getMaxVpsDecPicBufferingMinus1(i, k, j) );
     2337        }
     2338      }
     2339      // If checkFlagInner[j] = true, then some value needs to be signalled for the j-th sub-layer
     2340      setSubLayerDpbInfoPresentFlag( i, j, checkFlagInner[j] );
     2341    }
     2342
     2343    // --------------------------------------------------------
     2344    // To determine value of m_subLayerFlagInfoPresentFlag
     2345    // --------------------------------------------------------
     2346
     2347    for(Int j = 1; j < getMaxTLayers(); j++) // Check if DPB info of any of non-zero sub-layers is signaled. If so set flag to one
     2348    {
     2349      if( getSubLayerDpbInfoPresentFlag(i, j) )
     2350      {
     2351        checkFlagOuter = true;
     2352        break;
     2353      }
     2354    }
     2355    setSubLayerFlagInfoPresentFlag( i, checkFlagOuter );
     2356  }
    23042357}
    23052358#endif
  • branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.h

    r579 r580  
    10281028  Int     getNumSubDpbs(Int i)                          { return m_numSubDpbs[i]; }
    10291029  Void    setNumSubDpbs(Int i, Int x)                   { m_numSubDpbs[i] = x;    }
     1030  Void    determineSubDpbInfoFlags();
    10301031#endif
    10311032
Note: See TracChangeset for help on using the changeset viewer.