Index: branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp
===================================================================
--- branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp	(revision 1210)
+++ branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp	(revision 1221)
@@ -1284,5 +1284,5 @@
 
 #if Q0074_COLOUR_REMAPPING_SEI
-    if (m_colourRemapSEIEnabled)
+    if( m_colourRemapSEIEnabled )
     {
       SEIMessages colourRemappingInfo = getSeisByType(pic->getSEIs(), SEI::COLOUR_REMAPPING_INFO );
@@ -1344,9 +1344,5 @@
     pic->getPicYuvRec()->setBorderExtension( false );
 
-#if FIX_ALIGN_BUMPING
     dpbStatus.m_numPicsInSubDpb[dpbStatus.m_layerIdToSubDpbIdMap[layerId]]--;
-#else
-    dpbStatus.m_numPicsInSubDpb[layerIdx]--;
-#endif
   }
 }
@@ -1360,11 +1356,7 @@
   {
     std::vector<Int>  listOfPocs;
-#if FIX_ALIGN_BUMPING
     std::vector<Int>  listOfPocsInEachLayer[MAX_VPS_LAYER_IDX_PLUS1];
     std::vector<Int>  listOfPocsPositionInEachLayer[MAX_VPS_LAYER_IDX_PLUS1];
-#else
-    std::vector<Int>  listOfPocsInEachLayer[MAX_LAYERS];
-    std::vector<Int>  listOfPocsPositionInEachLayer[MAX_LAYERS];
-#endif
+
     DpbStatus dpbStatus;
 
@@ -1384,4 +1376,5 @@
   markAllPicturesAsErased(layerId);
 }
+
 Void TAppDecTop::flushAllPictures(Bool outputPictures)
 {
@@ -1392,19 +1385,11 @@
   {
     std::vector<Int>  listOfPocs;
-#if FIX_ALIGN_BUMPING
     std::vector<Int>  listOfPocsInEachLayer[MAX_VPS_LAYER_IDX_PLUS1];
     std::vector<Int>  listOfPocsPositionInEachLayer[MAX_VPS_LAYER_IDX_PLUS1];
-#else
-    std::vector<Int>  listOfPocsInEachLayer[MAX_LAYERS];
-    std::vector<Int>  listOfPocsPositionInEachLayer[MAX_LAYERS];
-#endif
+
     DpbStatus dpbStatus;
 
     // Find the status of the DPB
-#if SVC_POC
     xFindDPBStatus(listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, dpbStatus, false);
-#else
-    xFindDPBStatus(listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, dpbStatus);
-#endif
 
     while( dpbStatus.m_numAUsNotDisplayed )
@@ -1420,9 +1405,5 @@
 Void TAppDecTop::markAllPicturesAsErased()
 {
-#if FIX_ALIGN_BUMPING
   for(Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1; i++)
-#else
-  for(Int i = 0; i < MAX_LAYERS; i++)
-#endif
   {
     markAllPicturesAsErased(i);
@@ -1456,14 +1437,9 @@
 
 Void TAppDecTop::checkOutputBeforeDecoding(Int layerIdx)
-{
-    
+{    
   std::vector<Int>  listOfPocs;
-#if FIX_ALIGN_BUMPING
   std::vector<Int>  listOfPocsInEachLayer[MAX_VPS_LAYER_IDX_PLUS1];
   std::vector<Int>  listOfPocsPositionInEachLayer[MAX_VPS_LAYER_IDX_PLUS1];
-#else
-  std::vector<Int>  listOfPocsInEachLayer[MAX_LAYERS];
-  std::vector<Int>  listOfPocsPositionInEachLayer[MAX_LAYERS];
-#endif
+
   DpbStatus dpbStatus;
 
@@ -1482,12 +1458,9 @@
   // Find DPB-information from the VPS
   DpbStatus maxDpbLimit;
-#if FIX_ALIGN_BUMPING
-  Int subDpbIdx = getCommonDecoderParams()->getTargetOutputLayerSetIdx() == 0 
-                  ? dpbStatus.m_layerIdToSubDpbIdMap[0] 
-                  : dpbStatus.m_layerIdToSubDpbIdMap[layerIdx];
-#else
-  Int subDpbIdx = getCommonDecoderParams()->getTargetOutputLayerSetIdx() == 0 ? 0 : layerIdx;
-#endif
+
+  Int subDpbIdx = getCommonDecoderParams()->getTargetOutputLayerSetIdx() == 0 ? dpbStatus.m_layerIdToSubDpbIdMap[0] : dpbStatus.m_layerIdToSubDpbIdMap[layerIdx];
+
   findDpbParametersFromVps(listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, maxDpbLimit);
+
   // Assume that listOfPocs is sorted in increasing order - if not have to sort it.
   while( ifInvokeBumpingBeforeDecoding(dpbStatus, maxDpbLimit, layerIdx, subDpbIdx) )
@@ -1500,11 +1473,7 @@
 {    
   std::vector<Int>  listOfPocs;
-#if FIX_ALIGN_BUMPING
   std::vector<Int>  listOfPocsInEachLayer[MAX_VPS_LAYER_IDX_PLUS1];
   std::vector<Int>  listOfPocsPositionInEachLayer[MAX_VPS_LAYER_IDX_PLUS1];
-#else
-  std::vector<Int>  listOfPocsInEachLayer[MAX_LAYERS];
-  std::vector<Int>  listOfPocsPositionInEachLayer[MAX_LAYERS];
-#endif
+
   DpbStatus dpbStatus;
 
@@ -1538,12 +1507,9 @@
   std::vector<int>::iterator it;
   TComList<TComPic*>::iterator iterPic;
-#if FIX_ALIGN_BUMPING
+
   for( Int dpbLayerCtr = 0; dpbLayerCtr < dpbStatus.m_numLayers; dpbLayerCtr++)
   {
     Int layerId  = dpbStatus.m_targetDecLayerIdList[dpbLayerCtr];
-#else
-  for( Int layerIdx = 0; layerIdx < dpbStatus.m_numLayers; layerIdx++)
-  {
-#endif
+
     // Check if picture with pocValue is present.
     it = find( listOfPocsInEachLayer[layerId].begin(), listOfPocsInEachLayer[layerId].end(), pocValue );
@@ -1585,16 +1551,8 @@
       listOfPocsInEachLayer[layerId].erase( it );
       listOfPocsPositionInEachLayer[layerId].erase( listOfPocsPositionInEachLayer[layerId].begin() + picPosition );
-#if FIX_ALIGN_BUMPING
       dpbStatus.m_numPicsInSubDpb[dpbStatus.m_layerIdToSubDpbIdMap[layerId]]--;
-#endif
-    }
-  }
-#if !FIX_ALIGN_BUMPING
-  // Update sub-DPB status
-  for( Int subDpbIdx = 0; subDpbIdx < dpbStatus.m_numSubDpbs; subDpbIdx++)
-  {
-    dpbStatus.m_numPicsInSubDpb[subDpbIdx]--;
-  }
-#endif
+    }
+  }
+
   dpbStatus.m_numAUsNotDisplayed--;
 
@@ -1688,9 +1646,5 @@
     // Find the VPS used for the pictures
     // -------------------------------------
-#if FIX_ALIGN_BUMPING
-    for(Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1; i++)
-#else
-    for(Int i = 0; i < MAX_LAYERS; i++)
-#endif
+    for( Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1; i++ )
     {
       if( m_acTDecTop[i].getListPic()->empty() )
@@ -1699,15 +1653,20 @@
         continue;
       }
+
       std::vector<Int>::const_iterator it;
       it = find( listOfPocsInEachLayer[i].begin(), listOfPocsInEachLayer[i].end(), listOfPocs[0] );
       TComList<TComPic*>::iterator iterPic;
+
       if( it != listOfPocsInEachLayer[i].end() )
       {
         Int picPosition = (Int)std::distance( listOfPocsInEachLayer[i].begin(), it );
         Int j;
-        for(j = 0, iterPic = m_acTDecTop[i].getListPic()->begin(); j < listOfPocsPositionInEachLayer[i][picPosition]; j++) // Picture to be output
+
+        // Picture to be output
+        for( j = 0, iterPic = m_acTDecTop[i].getListPic()->begin(); j < listOfPocsPositionInEachLayer[i][picPosition]; j++ )
         {
           iterPic++;
         }
+
         TComPic *pic = *iterPic;
         vps = pic->getSlice(0)->getVPS();
@@ -1721,16 +1680,13 @@
     maxDpbLimit.m_numAUsNotDisplayed = vps->getMaxVpsNumReorderPics( targetOutputLsIdx, highestTId ); // m_numAUsNotDisplayed is only variable name - stores reorderpics
     maxDpbLimit.m_maxLatencyIncrease  = vps->getMaxVpsLatencyIncreasePlus1(targetOutputLsIdx, highestTId ) > 0;
+
     if( maxDpbLimit.m_maxLatencyIncrease )
     {
       maxDpbLimit.m_maxLatencyPictures = vps->getMaxVpsNumReorderPics( targetOutputLsIdx, highestTId ) + vps->getMaxVpsLatencyIncreasePlus1(targetOutputLsIdx, highestTId ) - 1;
     }
+
     for(Int i = 0; i < vps->getNumLayersInIdList( targetLsIdx ); i++)
     {
-#if RESOUTION_BASED_DPB
-      maxDpbLimit.m_numPicsInLayer[i] = vps->getMaxVpsLayerDecPicBuffMinus1( targetOutputLsIdx, i, highestTId ) + 1;
-      maxDpbLimit.m_numPicsInSubDpb[vps->getSubDpbAssigned( targetLsIdx, i )] = vps->getMaxVpsDecPicBufferingMinus1( targetOutputLsIdx, vps->getSubDpbAssigned( targetLsIdx, i ), highestTId) + 1;
-#else
       maxDpbLimit.m_numPicsInSubDpb[i] = vps->getMaxVpsDecPicBufferingMinus1( targetOutputLsIdx, i, highestTId) + 1;
-#endif
     }
     // -------------------------------------
@@ -1738,11 +1694,8 @@
   return vps;
 }
+
 Void TAppDecTop::emptyUnusedPicturesNotNeededForOutput()
 {
-#if FIX_ALIGN_BUMPING
-  for(Int layerIdx = 0; layerIdx < MAX_VPS_LAYER_IDX_PLUS1; layerIdx++)
-#else
-  for(Int layerIdx = 0; layerIdx < MAX_LAYERS; layerIdx++)
-#endif
+  for( Int layerIdx = 0; layerIdx < MAX_VPS_LAYER_IDX_PLUS1; layerIdx++ )
   {
     TComList <TComPic*> *pcListPic = m_acTDecTop[layerIdx].getListPic();
@@ -1792,9 +1745,6 @@
   TComVPS *vps = NULL;
   dpbStatus.init();
-#if FIX_ALIGN_BUMPING
+
   for( Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1; i++ )
-#else
-  for( Int i = 0; i < MAX_LAYERS; i++ )
-#endif
   {
     if( m_acTDecTop[i].getListPic()->empty() )
@@ -1847,9 +1797,10 @@
   std::sort( listOfPocs.begin(), listOfPocs.end() );    // Sort in increasing order of POC
   Int targetLsIdx = vps->getOutputLayerSetIdx( getCommonDecoderParams()->getTargetOutputLayerSetIdx() );
+
   // Update status
   dpbStatus.m_numAUsNotDisplayed = (Int)listOfPocs.size();   // Number of AUs not displayed
   dpbStatus.m_numLayers = vps->getNumLayersInIdList( targetLsIdx );
-#if FIX_ALIGN_BUMPING
-  for(Int i = 0; i < dpbStatus.m_numLayers; i++)
+
+  for( Int i = 0; i < dpbStatus.m_numLayers; i++ )
   {
     dpbStatus.m_layerIdToSubDpbIdMap[vps->getLayerSetLayerIdList(targetLsIdx, i)] = i;
@@ -1857,14 +1808,6 @@
   }
   dpbStatus.m_numSubDpbs = vps->getNumSubDpbs( targetLsIdx ); 
-#else
-  dpbStatus.m_numSubDpbs = vps->getNumSubDpbs( vps->getOutputLayerSetIdx(
-                                                      this->getCommonDecoderParams()->getTargetOutputLayerSetIdx() ) );
-#endif
-
-#if FIX_ALIGN_BUMPING
-  for(Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1; i++)
-#else
-  for(Int i = 0; i < dpbStatus.m_numLayers; i++)
-#endif
+
+  for( Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1; i++ )
   {
     dpbStatus.m_numPicsNotDisplayedInLayer[i] = (Int)listOfPocsInEachLayer[i].size();
@@ -1877,11 +1820,7 @@
   { // All pictures in the DPB in that layer are to be output; this means other pictures would also be output
     std::vector<Int>  listOfPocs;
-#if FIX_ALIGN_BUMPING
     std::vector<Int>  listOfPocsInEachLayer[MAX_VPS_LAYER_IDX_PLUS1];
     std::vector<Int>  listOfPocsPositionInEachLayer[MAX_VPS_LAYER_IDX_PLUS1];
-#else
-    std::vector<Int>  listOfPocsInEachLayer[MAX_LAYERS];
-    std::vector<Int>  listOfPocsPositionInEachLayer[MAX_LAYERS];
-#endif
+
     DpbStatus dpbStatus;
 
@@ -1898,5 +1837,5 @@
   }
 }
-#endif
+#endif //ALIGNED_BUMPING
 
 #if Q0074_COLOUR_REMAPPING_SEI
Index: branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.h
===================================================================
--- branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.h	(revision 1210)
+++ branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.h	(revision 1221)
@@ -136,8 +136,6 @@
   Int m_numPicsNotDisplayedInLayer[MAX_LAYERS];
   Int m_numPicsInSubDpb[MAX_LAYERS];  // Pictures marked as used_for_reference or needed for output in the sub-DPB
-#if FIX_ALIGN_BUMPING
   Int m_layerIdToSubDpbIdMap[MAX_VPS_LAYER_IDX_PLUS1];
   Int m_targetDecLayerIdList[MAX_LAYERS];
-#endif
   Bool m_maxLatencyIncrease;
   Int m_maxLatencyPictures;
@@ -159,11 +157,10 @@
     m_numSubDpbs = -1;
     m_numLayers = -1;
-#if FIX_ALIGN_BUMPING
     ::memset( m_targetDecLayerIdList, 0, sizeof(m_targetDecLayerIdList) );
-    for(Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1; i++)
+
+    for( Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1; i++ )
     {
       m_layerIdToSubDpbIdMap[i] = -1;
     }
-#endif
   }
 };
