Changeset 1461 in SHVCSoftware


Ignore:
Timestamp:
21 Aug 2015, 02:13:49 (9 years ago)
Author:
seregin
Message:

update PTL check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1458 r1461  
    28922892  vps->getProfileLevelTierIdx(0)->push_back( vps->getBaseLayerInternalFlag() && vps->getMaxLayers() > 1 ? 1 : 0);
    28932893
     2894  std::vector<Profile::Name> profiles;
     2895
     2896  if( vps->getScalabilityMask( VIEW_ORDER_INDEX ) )
     2897  {
     2898    profiles.push_back( Profile::MULTIVIEWMAIN );
     2899  }
     2900
     2901  if( vps->getScalabilityMask( SCALABILITY_ID ) )
     2902  {
     2903    profiles.push_back( Profile::SCALABLEMAIN );
     2904  }
     2905
    28942906  for(i = 1; i < numOutputLayerSets; i++)
    28952907  {
     
    29422954
    29432955    vps->getProfileLevelTierIdx(i)->assign(vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet), -1);
     2956
     2957    std::vector<UInt> passedCheck(profiles.size(), 0);
     2958    UInt numIncludedLayers = 0;
    29442959
    29452960    for( j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet); j++ )
     
    29612976          if( vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j) != 0 && vps->getNecessaryLayerFlag(i, j) )
    29622977          {
    2963             std::vector<Profile::Name> profiles;
    2964 
    2965             if( vps->getScalabilityMask( VIEW_ORDER_INDEX ) )
    2966             {
    2967               profiles.push_back( Profile::MULTIVIEWMAIN );
    2968             }
    2969 
    2970             if( vps->getScalabilityMask( SCALABILITY_ID ) )
    2971             {
    2972               profiles.push_back( Profile::SCALABLEMAIN );
    2973             }
    2974            
    29752978            ProfileTierLevel* ptl = vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL();
    2976 
    2977             Bool found = false;
     2979            numIncludedLayers++;
     2980            const Profile::Name profileName = ptl->getProfileIdc() == Profile::SCALABLEMAIN10 ? Profile::SCALABLEMAIN : ptl->getProfileIdc();
     2981
    29782982            for( Int p = 0; p < profiles.size(); p++ )
    29792983            {
    2980               found = ptl->getProfileIdc() == profiles[p] || ptl->getProfileCompatibilityFlag(Int(profiles[p]));
     2984              passedCheck[p] += profileName == profiles[p] || ptl->getProfileCompatibilityFlag(Int(profiles[p]));
    29812985            }
    2982 
    2983             assert( found );
    29842986          }
    29852987        }
    29862988      }
    29872989    }
     2990
     2991    // check whether all layers are compatible to at least one extension profile
     2992    assert( std::find(passedCheck.begin(), passedCheck.end(), numIncludedLayers) != passedCheck.end() );
    29882993
    29892994    NumOutputLayersInOutputLayerSet[i] = 0;
Note: See TracChangeset for help on using the changeset viewer.