Changeset 1456 in SHVCSoftware


Ignore:
Timestamp:
20 Aug 2015, 03:33:38 (9 years ago)
Author:
seregin
Message:

conformance check for PTL

File:
1 edited

Legend:

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

    r1454 r1456  
    21812181    READ_FLAG(    uiCode, PTL_TRACE_TEXT("lower_bit_rate_constraint_flag"  )); ptl->setLowerBitRateConstraintFlag(uiCode != 0);
    21822182#if SVC_EXTENSION
    2183     READ_CODE(32, uiCode, "general_reserved_zero_34bits");  READ_CODE(2, uiCode, "general_reserved_zero_34bits");
    2184   }
    2185   else if( ptl->getProfileIdc() == Profile::SCALABLEMAIN )
    2186   {
    2187     READ_FLAG(    uiCode, "general_max_12bit_constraint_flag" ); assert (uiCode == 1);
    2188     READ_FLAG(    uiCode, "general_max_10bit_constraint_flag" ); assert (uiCode == 1);
    2189     READ_FLAG(    uiCode, "general_max_8bit_constraint_flag"  ); ptl->setProfileIdc  ((uiCode) ? Profile::SCALABLEMAIN : Profile::SCALABLEMAIN10);
    2190     READ_FLAG(    uiCode, "general_max_422chroma_constraint_flag"  ); assert (uiCode == 1);
    2191     READ_FLAG(    uiCode, "general_max_420chroma_constraint_flag"  ); assert (uiCode == 1);
    2192     READ_FLAG(    uiCode, "general_max_monochrome_constraint_flag" ); assert (uiCode == 0);
    2193     READ_FLAG(    uiCode, "general_intra_constraint_flag"); assert (uiCode == 0);
    2194     READ_FLAG(    uiCode, "general_one_picture_only_constraint_flag"); assert (uiCode == 0);
    2195     READ_FLAG(    uiCode, "general_lower_bit_rate_constraint_flag"); assert (uiCode == 1);
    2196     READ_CODE(32, uiCode, "general_reserved_zero_34bits");  READ_CODE(2, uiCode, "general_reserved_zero_34bits");
     2183    READ_CODE(32, uiCode, "reserved_zero_34bits");  READ_CODE(2, uiCode, "reserved_zero_34bits");
     2184  }
     2185  else if( ptl->getProfileIdc() == Profile::SCALABLEMAIN || ptl->getProfileCompatibilityFlag(Profile::SCALABLEMAIN) )
     2186  {
     2187    READ_FLAG(    uiCode, "max_12bit_constraint_flag" ); assert (uiCode == 1);
     2188    READ_FLAG(    uiCode, "max_10bit_constraint_flag" ); assert (uiCode == 1);
     2189    READ_FLAG(    uiCode, "max_8bit_constraint_flag"  ); ptl->setProfileIdc  ((uiCode) ? Profile::SCALABLEMAIN : Profile::SCALABLEMAIN10);
     2190    READ_FLAG(    uiCode, "max_422chroma_constraint_flag"  ); assert (uiCode == 1);
     2191    READ_FLAG(    uiCode, "max_420chroma_constraint_flag"  ); assert (uiCode == 1);
     2192    READ_FLAG(    uiCode, "max_monochrome_constraint_flag" ); assert (uiCode == 0);
     2193    READ_FLAG(    uiCode, "intra_constraint_flag"); assert (uiCode == 0);
     2194    READ_FLAG(    uiCode, "one_picture_only_constraint_flag"); assert (uiCode == 0);
     2195    READ_FLAG(    uiCode, "lower_bit_rate_constraint_flag"); assert (uiCode == 1);
     2196    READ_CODE(32, uiCode, "reserved_zero_34bits");  READ_CODE(2, uiCode, "reserved_zero_34bits");
    21972197  }
    21982198  else
     
    22022202    ptl->setIntraConstraintFlag(false);
    22032203    ptl->setLowerBitRateConstraintFlag(true);
    2204     READ_CODE(32,  uiCode, "general_reserved_zero_43bits");  READ_CODE(11,  uiCode, "general_reserved_zero_43bits");
     2204    READ_CODE(32,  uiCode, "reserved_zero_43bits");  READ_CODE(11,  uiCode, "reserved_zero_43bits");
    22052205  }
    22062206#else
     
    29572957        //The following assert may be updated / upgraded to take care of general_profile_compatibility_flag.
    29582958
    2959         // The assertion below is not valid for independent non-base layers
    2960         if (vps->getNumAddLayerSets() == 0)
    2961         {
    2962           if( j > 0 && vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j) != 0 && vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j - 1) != 0 && vps->getNecessaryLayerFlag(i, j-1) )
     2959        if( layerSetIdxForOutputLayerSet <= vps->getVpsNumLayerSetsMinus1() )
     2960        {
     2961          if( vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j) != 0 && vps->getNecessaryLayerFlag(i, j) )
    29632962          {
    2964             assert(vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL()->getProfileIdc() == vps->getPTL(vps->getProfileLevelTierIdx(i, j - 1))->getGeneralPTL()->getProfileIdc() ||
    2965               vps->getPTL(vps->getProfileLevelTierIdx(i, j - 1))->getGeneralPTL()->getProfileCompatibilityFlag(vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL()->getProfileIdc()) || 
    2966               vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL()->getProfileCompatibilityFlag(vps->getPTL(vps->getProfileLevelTierIdx(i, j - 1))->getGeneralPTL()->getProfileIdc())  );
     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           
     2975            ProfileTierLevel* ptl = vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL();
     2976
     2977            Bool found = false;
     2978            for( Int p = 0; p < profiles.size(); p++ )
     2979            {
     2980              found = ptl->getProfileIdc() == profiles[p] || ptl->getProfileCompatibilityFlag(Int(profiles[p]));
     2981            }
     2982
     2983            assert( found );
    29672984          }
    29682985        }
Note: See TracChangeset for help on using the changeset viewer.