Changeset 1100 in SHVCSoftware


Ignore:
Timestamp:
6 Jul 2015, 20:20:51 (9 years ago)
Author:
seregin
Message:

macro cleanup: RESOLUTION_BASED_DPB

Location:
branches/SHM-dev/source
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp

    r1089 r1100  
    13871387    pic->getPicYuvRec()->setBorderExtension( false );
    13881388
    1389 #if RESOLUTION_BASED_DPB
    1390     dpbStatus.m_numPicsInLayer[layerIdx]--;
    1391 #endif
    13921389#if FIX_ALIGN_BUMPING
    13931390    dpbStatus.m_numPicsInSubDpb[dpbStatus.m_layerIdToSubDpbIdMap[layerId]]--;
     
    15321529  // Find DPB-information from the VPS
    15331530  DpbStatus maxDpbLimit;
    1534 #if RESOLUTION_BASED_DPB
    1535   Int targetLsIdx, subDpbIdx;
    1536   TComVPS *vps = findDpbParametersFromVps(listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, maxDpbLimit);
    1537 
    1538   if( getCommonDecoderParams()->getTargetOutputLayerSetIdx() == 0 )
    1539   {
    1540     targetLsIdx = 0;
    1541     subDpbIdx   = 0;
    1542   }
    1543   else
    1544   {
    1545     targetLsIdx = vps->getOutputLayerSetIdx( getCommonDecoderParams()->getTargetOutputLayerSetIdx() );
    1546     subDpbIdx   = vps->getSubDpbAssigned( targetLsIdx, layerIdx );
    1547   }
    1548 #else
    15491531#if FIX_ALIGN_BUMPING
    15501532  Int subDpbIdx = getCommonDecoderParams()->getTargetOutputLayerSetIdx() == 0
     
    15551537#endif
    15561538  findDpbParametersFromVps(listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, maxDpbLimit);
    1557 #endif
    15581539  // Assume that listOfPocs is sorted in increasing order - if not have to sort it.
    15591540  while( ifInvokeBumpingBeforeDecoding(dpbStatus, maxDpbLimit, layerIdx, subDpbIdx) )
     
    17471728      maxDpbLimit.m_maxLatencyPictures = sps->getMaxLatencyIncrease( highestTId ) + sps->getNumReorderPics( highestTId ) - 1;
    17481729    }
    1749 #if RESOLUTION_BASED_DPB
    1750     maxDpbLimit.m_numPicsInLayer[0] = sps->getMaxDecPicBuffering( highestTId );
    1751 #endif
    17521730    maxDpbLimit.m_numPicsInSubDpb[0] = sps->getMaxDecPicBuffering( highestTId );
    17531731  }
     
    18381816  // Number of pictures in each sub-DPB
    18391817  retVal |= ( dpbStatus.m_numPicsInSubDpb[subDpbIdx] >= dpbLimit.m_numPicsInSubDpb[subDpbIdx] );
    1840  
    1841 #if RESOLUTION_BASED_DPB
    1842   // Number of pictures in each layer
    1843   retVal |= ( dpbStatus.m_numPicsInLayer[layerIdx] >= dpbLimit.m_numPicsInLayer[layerIdx]);
    1844 #endif
    18451818
    18461819  return retVal;
     
    19091882          if( pic->getSlice(0)->isReferenced() || pic->getOutputMark() )
    19101883          {
    1911 #if RESOLUTION_BASED_DPB
    1912             dpbStatus.m_numPicsInLayer[i]++;  // Count pictures that are "used for reference" or "needed for output"
    1913 #else
    19141884            dpbStatus.m_numPicsInSubDpb[i]++;  // Count pictures that are "used for reference" or "needed for output"
    1915 #endif
    19161885          }
    19171886#if POC_RESET_IDC_DECODER
     
    19491918  {
    19501919    dpbStatus.m_numPicsNotDisplayedInLayer[i] = (Int)listOfPocsInEachLayer[i].size();
    1951 #if RESOLUTION_BASED_DPB
    1952     dpbStatus.m_numPicsInSubDpb[vps->getSubDpbAssigned(targetLsIdx,i)] += dpbStatus.m_numPicsInLayer[i];
    1953     dpbStatus.m_numPicsInSubDpb[i] += dpbStatus.m_numPicsInLayer[i];
    1954 #endif
    19551920  }
    19561921  assert( dpbStatus.m_numAUsNotDisplayed != -1 );
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.h

    r1066 r1100  
    139139  Int m_numAUsNotDisplayed;
    140140  Int m_numPicsNotDisplayedInLayer[MAX_LAYERS];
    141 #if RESOLUTION_BASED_DPB
    142   Int m_numPicsInLayer[MAX_LAYERS];   // Pictures marked as used_for_reference or needed for output in the layer
    143 #endif
    144141  Int m_numPicsInSubDpb[MAX_LAYERS];  // Pictures marked as used_for_reference or needed for output in the sub-DPB
    145142#if FIX_ALIGN_BUMPING
     
    162159    m_maxLatencyIncrease  = false;
    163160    m_maxLatencyPictures  = 0;
    164 #if RESOLUTION_BASED_DPB
    165     ::memset( m_numPicsInLayer,  0, sizeof(m_numPicsInLayer)  );
    166 #endif
    167161    ::memset( m_numPicsInSubDpb, 0, sizeof(m_numPicsInSubDpb) );
    168162    ::memset(m_numPicsNotDisplayedInLayer, 0, sizeof(m_numPicsNotDisplayedInLayer) );
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r1094 r1100  
    16441644#endif
    16451645#endif
    1646 #if RESOLUTION_BASED_DPB
    1647   vps->assignSubDpbIndices();
    1648 #else
    16491646  vps->deriveNumberOfSubDpbs();
    1650 #endif
    16511647  vps->setOutputLayerFlag( 0, 0, 1 );
    16521648
     
    17471743      Int maxNumReorderPics = -1;
    17481744#if CHANGE_NUMSUBDPB_IDX
    1749 #if RESOLUTION_BASED_DPB
    1750       for(Int k = 0; k < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet); k++)
    1751 #else
    17521745      for(Int k = 0; k < vps->getNumSubDpbs(layerSetIdxForOutputLayerSet); k++)
    1753 #endif
    17541746#else
    17551747      for(Int k = 0; k < vps->getNumSubDpbs(i); k++)
     
    17571749      {
    17581750        Int layerId = vps->getLayerSetLayerIdList(layerSetId, k); // k-th layer in the output layer set
    1759 #if RESOLUTION_BASED_DPB
    1760         vps->setMaxVpsLayerDecPicBuffMinus1( i, k, j, m_acTEncTop[layerId].getMaxDecPicBuffering(j) - 1 );
    1761         // Add sub-DPB sizes of layers belonging to a sub-DPB. If a different sub-DPB size is calculated
    1762         // at the encoder, modify below
    1763         Int oldValue = vps->getMaxVpsDecPicBufferingMinus1( i, vps->getSubDpbAssigned( layerSetIdxForOutputLayerSet, k ), j );
    1764         oldValue += vps->getMaxVpsLayerDecPicBuffMinus1( i, k, j ) + 1;
    1765         vps->setMaxVpsDecPicBufferingMinus1( i, vps->getSubDpbAssigned( layerSetIdxForOutputLayerSet, k ), j, oldValue );
    1766 #else
    17671751        vps->setMaxVpsDecPicBufferingMinus1( i, k, j,  m_acTEncTop[vps->getLayerIdxInVps(layerId)].getMaxDecPicBuffering(j) - 1 );
    1768 #endif
    17691752        maxNumReorderPics       = std::max( maxNumReorderPics, m_acTEncTop[vps->getLayerIdxInVps(layerId)].getNumReorderPics(j));
    17701753      }
    1771 #if RESOLUTION_BASED_DPB
    1772       for(Int k = 0; k < vps->getNumSubDpbs(i); k++)
    1773       {
    1774         // Decrement m_maxVpsDecPicBufferingMinus1
    1775         Int oldValue = vps->getMaxVpsDecPicBufferingMinus1( i, vps->getSubDpbAssigned( layerSetIdxForOutputLayerSet, k ), j );
    1776         vps->setMaxVpsDecPicBufferingMinus1( i, vps->getSubDpbAssigned( layerSetIdxForOutputLayerSet, k ), j, oldValue - 1 );
    1777       }
    1778 #endif
    17791754      vps->setMaxVpsNumReorderPics(i, j, maxNumReorderPics);
    17801755      vps->determineSubDpbInfoFlags();
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r1093 r1100  
    21532153  ::memset( m_subLayerDpbInfoPresentFlag,   0, sizeof(m_subLayerDpbInfoPresentFlag )  );
    21542154  ::memset( m_maxVpsDecPicBufferingMinus1,  0, sizeof(m_maxVpsDecPicBufferingMinus1 ) );
    2155 #if RESOLUTION_BASED_DPB
    2156   ::memset( m_maxVpsLayerDecPicBuffMinus1,  0, sizeof(m_maxVpsLayerDecPicBuffMinus1 ) );
    2157 #endif
    21582155  ::memset( m_maxVpsNumReorderPics,         0, sizeof(m_maxVpsNumReorderPics )        );
    21592156  ::memset( m_maxVpsLatencyIncreasePlus1,   0, sizeof(m_maxVpsLatencyIncreasePlus1 )  );
     
    32583255#endif
    32593256#endif
    3260 #if !RESOLUTION_BASED_DPB
    32613257#if VPS_DPB_SIZE_TABLE
    32623258Void TComVPS::deriveNumberOfSubDpbs()
     
    32823278}
    32833279#endif
    3284 #endif
    32853280#if VPS_VUI_TILES_NOT_IN_USE__FLAG
    32863281Void TComVPS::setTilesNotInUseFlag(Bool x)
     
    35333528          checkFlagInner[j] |= ( getMaxVpsDecPicBufferingMinus1(i, subDpbIdx, j - 1) != getMaxVpsDecPicBufferingMinus1(i, subDpbIdx, j) );
    35343529        }
    3535 #if RESOLUTION_BASED_DPB
    3536         for(Int layerIdx = 0; layerIdx < this->getNumLayersInIdList(layerSetIdxForOutputLayerSet) && !checkFlagInner[j]; layerIdx++)  // If checkFlagInner[j] is true, break and signal the values
    3537         {
    3538           checkFlagInner[j] |= ( getMaxVpsLayerDecPicBuffMinus1(i, layerIdx, j - 1) != getMaxVpsLayerDecPicBuffMinus1(i, layerIdx, j) );
    3539         }
    3540 #endif
    35413530      }
    35423531      // If checkFlagInner[j] = true, then some value needs to be signalled for the j-th sub-layer
     
    35603549}
    35613550#endif
    3562 #if RESOLUTION_BASED_DPB
    3563 Void TComVPS::assignSubDpbIndices()
    3564 {
    3565   RepFormat layerRepFormat  [MAX_LAYERS];
    3566   RepFormat subDpbRepFormat [MAX_LAYERS];
    3567 
    3568   for(Int lsIdx = 0; lsIdx < this->getNumLayerSets(); lsIdx++)
    3569   {
    3570     for(Int j = 0; j < MAX_LAYERS; j++)
    3571     {
    3572       layerRepFormat [j].init();
    3573       subDpbRepFormat[j].init();
    3574     }
    3575 
    3576     // Assign resolution, bit-depth, colour format for each layer in the layer set
    3577     for(Int i = 0; i < this->getNumLayersInIdList( lsIdx ); i++)
    3578     {
    3579       Int layerIdxInVps = this->getLayerIdxInVps( this->getLayerSetLayerIdList(lsIdx, i) );
    3580       Int repFormatIdx  = this->getVpsRepFormatIdx( layerIdxInVps );
    3581       RepFormat* repFormat = this->getVpsRepFormat( repFormatIdx );
    3582 
    3583       // Assign the rep_format() to the layer
    3584       layerRepFormat[i] = *repFormat;
    3585     }
    3586 
    3587     // ----------------------------------------
    3588     // Sub-DPB assignment
    3589     // ----------------------------------------
    3590     // For the base layer
    3591     m_subDpbAssigned[lsIdx][0] = 0;
    3592     subDpbRepFormat[0] = layerRepFormat[0];
    3593 
    3594     // Sub-DPB counter
    3595     Int subDpbCtr = 1;
    3596 
    3597     for(Int i = 1; i < this->getNumLayersInIdList( lsIdx ); i++)
    3598     {
    3599       Bool newSubDpbFlag = true;
    3600       for(Int j = 0; (j < subDpbCtr) && (newSubDpbFlag); j++)
    3601       {
    3602         if( RepFormat::checkSameSubDpb( layerRepFormat[i], subDpbRepFormat[j] ) )
    3603         {
    3604           // Belong to i-th sub-DPB
    3605           m_subDpbAssigned[lsIdx][i] = j;
    3606           newSubDpbFlag = false;
    3607         }
    3608       }
    3609       if( newSubDpbFlag )
    3610       {
    3611         // New sub-DPB
    3612         subDpbRepFormat[subDpbCtr] = layerRepFormat[i];
    3613         m_subDpbAssigned[lsIdx][i] = subDpbCtr;
    3614         subDpbCtr++;                                    // Increment # subDpbs
    3615       }
    3616     }
    3617     m_numSubDpbs[lsIdx] = subDpbCtr;
    3618   }
    3619 }
    3620 Int  TComVPS::findLayerIdxInLayerSet ( Int lsIdx, Int nuhLayerId )
    3621 {
    3622   for(Int i = 0; i < this->getNumLayersInIdList(lsIdx); i++)
    3623   {
    3624     if( this->getLayerSetLayerIdList( lsIdx, i) == nuhLayerId )
    3625     {
    3626       return i;
    3627     }
    3628   }
    3629   return -1;  // Layer not found
    3630 }
    3631 #endif
     3551
    36323552#if O0164_MULTI_LAYER_HRD
    36333553Void TComVPS::setBspHrdParameters( UInt hrdIdx, UInt frameRate, UInt numDU, UInt bitRate, Bool randomAccess )
     
    37983718#endif
    37993719
    3800 #if RESOLUTION_BASED_DPB
    3801 // RepFormat Assignment operator
    3802 RepFormat& RepFormat::operator= (const RepFormat &other)
    3803 {
    3804   if( this != &other)
    3805   {
    3806     m_chromaAndBitDepthVpsPresentFlag = other.m_chromaAndBitDepthVpsPresentFlag;
    3807     m_chromaFormatVpsIdc              = other.m_chromaFormatVpsIdc;
    3808     m_separateColourPlaneVpsFlag      = other.m_separateColourPlaneVpsFlag;
    3809     m_picWidthVpsInLumaSamples        = other.m_picWidthVpsInLumaSamples;
    3810     m_picHeightVpsInLumaSamples       = other.m_picHeightVpsInLumaSamples;
    3811     m_bitDepthVpsLuma                 = other.m_bitDepthVpsLuma;
    3812     m_bitDepthVpsChroma               = other.m_bitDepthVpsChroma;
    3813 #if R0156_CONF_WINDOW_IN_REP_FORMAT
    3814     m_conformanceWindowVps            = other.m_conformanceWindowVps;
    3815 #endif
    3816   }
    3817   return *this;
    3818 }
    3819 
    3820 // Check whether x and y share the same resolution, chroma format and bit-depth.
    3821 Bool RepFormat::checkSameSubDpb(const RepFormat &x, const RepFormat &y)
    3822 {
    3823   return (    (x.m_chromaFormatVpsIdc              == y.m_chromaFormatVpsIdc)
    3824           &&  (x.m_picWidthVpsInLumaSamples        == y.m_picWidthVpsInLumaSamples)
    3825           &&  (x.m_picHeightVpsInLumaSamples       == y.m_picHeightVpsInLumaSamples)
    3826           &&  (x.m_bitDepthVpsLuma                 == y.m_bitDepthVpsLuma)
    3827           &&  (x.m_bitDepthVpsChroma               == y.m_bitDepthVpsChroma)
    3828           );
    3829 }
    3830 #endif
    3831 
    38323720#if REPN_FORMAT_IN_VPS
    38333721UInt TComSlice::getPicWidthInLumaSamples()
     
    41194007, m_bitDepthVpsChroma           (0)
    41204008{}
    4121 #if RESOLUTION_BASED_DPB
    4122 Void RepFormat::init()
    4123 {
    4124   m_chromaFormatVpsIdc          = CHROMA_420;
    4125   m_separateColourPlaneVpsFlag  = false;
    4126   m_picWidthVpsInLumaSamples    = 0;
    4127   m_picHeightVpsInLumaSamples   = 0;
    4128   m_bitDepthVpsLuma             = 0;
    4129   m_bitDepthVpsChroma           = 0;
    4130 #if R0156_CONF_WINDOW_IN_REP_FORMAT
    4131   m_conformanceWindowVps.resetWindow();
    4132 #endif
    4133 }
    4134 #endif
    41354009#endif
    41364010
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r1094 r1100  
    531531public:
    532532  RepFormat();
    533 #if RESOLUTION_BASED_DPB
    534   Void init();
    535   RepFormat& operator= (const RepFormat &);
    536   static Bool checkSameSubDpb(const RepFormat &x, const RepFormat &y);
    537 #endif
    538533#if REPN_FORMAT_CONTROL_FLAG
    539534  Bool getChromaAndBitDepthVpsPresentFlag() { return m_chromaAndBitDepthVpsPresentFlag; }
     
    818813  Bool       m_subLayerDpbInfoPresentFlag  [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS];
    819814  Int        m_maxVpsDecPicBufferingMinus1 [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS][MAX_TLAYER];
    820 #if RESOLUTION_BASED_DPB
    821   Int        m_maxVpsLayerDecPicBuffMinus1 [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS][MAX_TLAYER]; 
    822 #endif
    823815  Int        m_maxVpsNumReorderPics        [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS];
    824816  Int        m_maxVpsLatencyIncreasePlus1  [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS];
     
    878870#if P0297_VPS_POC_LSB_ALIGNED_FLAG
    879871  Bool       m_vpsPocLsbAlignedFlag;
    880 #endif
    881 #if RESOLUTION_BASED_DPB
    882   Int        m_subDpbAssigned            [MAX_VPS_LAYER_SETS_PLUS1][MAX_LAYERS];
    883872#endif
    884873#if NECESSARY_LAYER_FLAG
     
    13651354  Int    getLayerIdcForOls( Int olsIdx, Int layerId );
    13661355
    1367 #if RESOLUTION_BASED_DPB
    1368   Int    getMaxVpsLayerDecPicBuffMinus1(Int i, Int k, Int j)        { assert(i != 0); return m_maxVpsLayerDecPicBuffMinus1[i][k][j]; }
    1369   Void   setMaxVpsLayerDecPicBuffMinus1(Int i, Int k, Int j, Int x) { m_maxVpsLayerDecPicBuffMinus1[i][k][j] = x;    }
    1370 #endif
    1371 
    13721356  Int    getMaxVpsNumReorderPics(Int olsIdx, Int subLayerIdx)        { assert(olsIdx != 0); return m_maxVpsNumReorderPics[olsIdx][subLayerIdx]; }
    13731357  Void   setMaxVpsNumReorderPics(Int olsIdx, Int subLayerIdx, Int x) { m_maxVpsNumReorderPics[olsIdx][subLayerIdx] = x;    }
     
    13971381  Int    getVpsNonVuiExtLength()         { return m_vpsNonVuiExtLength; }
    13981382  Void   setVpsNonVuiExtLength(Int x)    { m_vpsNonVuiExtLength = x; }
    1399 #endif
    1400 #if RESOLUTION_BASED_DPB
    1401   Void   assignSubDpbIndices();
    1402   Int    getSubDpbAssigned  (Int lsIdx, Int layerIdx) { return m_subDpbAssigned[lsIdx][layerIdx]; }
    1403   Int    findLayerIdxInLayerSet ( Int lsIdx, Int nuhLayerId );
    14041383#endif
    14051384#if O0164_MULTI_LAYER_HRD
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r1096 r1100  
    9595#define VPS_EXTN_UEV_CODING              1      ///< JCTVC-P0306: Code some syntax elements as ue(v), and remove some syntax elements that duplicate behaviour
    9696#define CHANGE_NUMSUBDPB_IDX             1      ///< Change index of NumSubDpb from output layer set to layer set, to be more aligned with the Spec
    97 #define RESOLUTION_BASED_DPB             0      ///< JCTVC-Q0154 - remove sharing of sub-DPB across layers
    98                                                 ///< JCTVC-P0192: Assign layers to sub-DPBs based on the rep_format() signaled in the VPS
    9997#define ALIGNED_BUMPING                  1      ///< JCTVC-P0192: Align bumping of pictures in an AU
    10098#define FIX_ALIGN_BUMPING                1
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1095 r1100  
    34243424#endif
    34253425#endif
    3426 #if RESOLUTION_BASED_DPB
    3427   vps->assignSubDpbIndices();
    3428 #endif
    34293426  READ_FLAG(uiCode, "max_one_active_ref_layer_flag" );
    34303427  vps->setMaxOneActiveRefLayerFlag(uiCode);
     
    37853782#endif
    37863783
    3787 #if !RESOLUTION_BASED_DPB
    37883784  vps->deriveNumberOfSubDpbs();
    3789 #endif
     3785
    37903786  for(Int i = 1; i < vps->getNumOutputLayerSets(); i++)
    37913787  {
     
    38433839        }
    38443840        READ_UVLC( uiCode, "max_vps_num_reorder_pics[i][j]" );              vps->setMaxVpsNumReorderPics( i, j, uiCode);
    3845 #if RESOLUTION_BASED_DPB
    3846         if( vps->getNumSubDpbs(layerSetIdxForOutputLayerSet) != vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ) ) 
    3847         {
    3848           for(Int k = 0; k < vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); k++)
    3849           {
    3850             READ_UVLC( uiCode, "max_vps_layer_dec_pic_buff_minus1[i][k][j]" ); vps->setMaxVpsLayerDecPicBuffMinus1( i, k, j, uiCode);
    3851           }
    3852         }
    3853         else  // vps->getNumSubDpbs(layerSetIdxForOutputLayerSet) == vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet )
    3854         {         
    3855           for(Int k = 0; k < vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); k++)
    3856           {
    3857             vps->setMaxVpsLayerDecPicBuffMinus1( i, k, j, vps->getMaxVpsDecPicBufferingMinus1( i, k, j));
    3858           }
    3859         }
    3860 #endif
     3841
    38613842        READ_UVLC( uiCode, "max_vps_latency_increase_plus1[i][j]" );        vps->setMaxVpsLatencyIncreasePlus1( i, j, uiCode);
    38623843      }
     
    38853866      if( !vps->getSubLayerDpbInfoPresentFlag(i, j) )  // If sub-layer DPB information is NOT present
    38863867      {
    3887 #if RESOLUTION_BASED_DPB
    3888         for(Int k = 0; k < vps->getNumSubDpbs(layerSetIdxForOutputLayerSet); k++)
    3889 #else
    38903868        for(Int k = 0; k < vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); k++)
    3891 #endif
    38923869        {
    38933870          vps->setMaxVpsDecPicBufferingMinus1( i, k, j, vps->getMaxVpsDecPicBufferingMinus1( i, k, j - 1 ) );
    38943871        }
    38953872        vps->setMaxVpsNumReorderPics( i, j, vps->getMaxVpsNumReorderPics( i, j - 1) );
    3896 #if RESOLUTION_BASED_DPB
    3897         for(Int k = 0; k < vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); k++)
    3898         {
    3899           vps->setMaxVpsLayerDecPicBuffMinus1( i, k, j, vps->getMaxVpsLayerDecPicBuffMinus1( i, k, j - 1));
    3900         }
    3901 #endif
    39023873        vps->setMaxVpsLatencyIncreasePlus1( i, j, vps->getMaxVpsLatencyIncreasePlus1( i, j - 1 ) );
    39033874      }
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1093 r1100  
    116116  m_firstPicInLayerDecodedFlag = false; 
    117117#endif
    118 #if RESOLUTION_BASED_DPB
    119   m_subDpbIdx = -1;
    120 #endif
    121118#if POC_RESET_IDC_DECODER
    122119  m_parseIdc = -1;
     
    280277  else
    281278  {
    282 #if RESOLUTION_BASED_DPB
    283     Int layerSetIdxForOutputLayerSet = pcSlice->getVPS()->getOutputLayerSetIdx( getCommonDecoderParams()->getTargetOutputLayerSetIdx() );
    284     Int layerIdx = pcSlice->getVPS()->findLayerIdxInLayerSet( layerSetIdxForOutputLayerSet, pcSlice->getLayerId() );  assert( layerIdx != -1 );
    285     m_iMaxRefPicNum = pcSlice->getVPS()->getMaxVpsLayerDecPicBuffMinus1( getCommonDecoderParams()->getTargetOutputLayerSetIdx(), layerIdx, pcSlice->getTLayer() ) + 1; // m_uiMaxDecPicBuffering has the space for the picture currently being decoded
    286 #else
    287279    m_iMaxRefPicNum = pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1( m_commonDecoderParams->getTargetOutputLayerSetIdx(), pcSlice->getVPS()->getLayerIdcForOls( pcSlice->getVPS()->getOutputLayerSetIdx( m_commonDecoderParams->getTargetOutputLayerSetIdx()), pcSlice->getLayerId() ), pcSlice->getTLayer() ) + 1; // m_uiMaxDecPicBuffering has the space for the picture currently being decoded
    288 #endif
    289280  }
    290281#else
     
    759750  checkValueOfTargetOutputLayerSetIdx( m_apcSlicePilot->getVPS());
    760751#endif
    761 #endif
    762 #if RESOLUTION_BASED_DPB
    763   // Following assignment should go wherever a new VPS is activated
    764   assignSubDpbs(m_apcSlicePilot->getVPS());
    765752#endif
    766753  m_apcSlicePilot->initSlice( nalu.m_layerId );
     
    28362823}
    28372824#endif
    2838 #if RESOLUTION_BASED_DPB
    2839 Void TDecTop::assignSubDpbs(TComVPS *vps)
    2840 {
    2841   if( m_subDpbIdx == -1 ) // Sub-DPB index is not already assigned
    2842   {
    2843     Int lsIdx = vps->getOutputLayerSetIdx( getCommonDecoderParams()->getTargetOutputLayerSetIdx() );
    2844 
    2845     Int layerIdx = vps->findLayerIdxInLayerSet( lsIdx, getLayerId() );
    2846     assert( layerIdx != -1 ); // Current layer should be found in the layer set.
    2847 
    2848     // Copy from the active VPS based on the layer ID.
    2849     m_subDpbIdx = vps->getSubDpbAssigned( lsIdx, layerIdx );
    2850   }
    2851 }
    2852 #endif
     2825
    28532826#if POC_RESET_IDC_DECODER
    28542827Void TDecTop::markAllPicsAsNoCurrAu(TComVPS *vps)
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h

    r1093 r1100  
    168168  Int                     m_prevPicOrderCnt;
    169169#endif
    170 #if RESOLUTION_BASED_DPB
    171   Int                     m_subDpbIdx;     // Index to the sub-DPB that the layer belongs to.
    172                                            // When new VPS is activated, this should be re-initialized to -1
    173 #endif
    174170#if CONFORMANCE_BITSTREAM_MODE
    175171  Bool m_confModeFlag;
     
    293289  ParameterSetManagerDecoder* getParameterSetManager() { return &m_parameterSetManagerDecoder; }
    294290#endif
    295 #if RESOLUTION_BASED_DPB
    296   Void setSubDpbIdx(Int idx)    { m_subDpbIdx = idx; }
    297   Int  getSubDpbIdx()           { return m_subDpbIdx; }
    298   Void assignSubDpbs(TComVPS *vps);
    299 #endif
    300291#if CONFORMANCE_BITSTREAM_MODE
    301292  std::vector<TComPic>* getConfListPic() {return &m_confListPic; }
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1095 r1100  
    26652665      {
    26662666#if CHANGE_NUMSUBDPB_IDX
    2667 #if RESOLUTION_BASED_DPB
    2668         for(Int k = 0; k < vps->getNumSubDpbs(layerSetIdxForOutputLayerSet); k++)
    2669 #else
    26702667        for(Int k = 0; k < vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); k++)
    2671 #endif
    26722668#else
    26732669        for(Int k = 0; k < vps->getNumSubDpbs(i); k++)
     
    26842680        }
    26852681        WRITE_UVLC( vps->getMaxVpsNumReorderPics( i, j), "max_vps_num_reorder_pics[i][j]" );             
    2686 #if RESOLUTION_BASED_DPB
    2687         if( vps->getNumSubDpbs(layerSetIdxForOutputLayerSet) != vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ) )  // NumSubDpbs
    2688         {
    2689           for(Int k = 0; k < vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); k++)
    2690           {
    2691             WRITE_UVLC( vps->getMaxVpsLayerDecPicBuffMinus1( i, k, j), "max_vps_layer_dec_pic_buff_minus1[i][k][j]" );
    2692           }
    2693         }
    2694 #endif
     2682
    26952683        WRITE_UVLC( vps->getMaxVpsLatencyIncreasePlus1( i, j), "max_vps_latency_increase_plus1[i][j]" );       
    26962684      }
Note: See TracChangeset for help on using the changeset viewer.