Ignore:
Timestamp:
7 Oct 2014, 20:41:24 (10 years ago)
Author:
tech
Message:

Integrated Fix PTL inference.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-12.0-dev1/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1060 r1062  
    803803
    804804    parsePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1);
     805#if H_MV_HLS10_PTL_INFER_FIX
     806    pcSPS->getPTL()->inferGeneralValues ( true, 0, NULL );
     807    pcSPS->getPTL()->inferSubLayerValues( pcSPS->getMaxTLayers() - 1, 0, NULL );
     808#endif
    805809#if H_MV
    806810  }
     
    11461150  READ_CODE( 16, uiCode,  "vps_reserved_ffff_16bits" );           assert(uiCode == 0xffff);
    11471151  parsePTL ( pcVPS->getPTL(), true, pcVPS->getMaxTLayers()-1);
     1152#if H_MV_HLS10_PTL_INFER_FIX
     1153#if H_MV
     1154  pcVPS->getPTL()->inferGeneralValues ( true, 0, NULL );
     1155  pcVPS->getPTL()->inferSubLayerValues( pcVPS->getMaxTLayers() - 1, 0, NULL );
     1156#endif
     1157#endif
    11481158  UInt subLayerOrderingInfoPresentFlag;
    11491159  READ_FLAG(subLayerOrderingInfoPresentFlag, "vps_sub_layer_ordering_info_present_flag");
     
    12691279    parsePTL( pcVPS->getPTL( 1 ),0, pcVPS->getMaxSubLayersMinus1()  ); 
    12701280   
     1281#if !H_MV_HLS10_PTL_INFER_FIX
    12711282    // Copy Profile info
    12721283    TComPTL temp = *pcVPS->getPTL( 1 );
    12731284    *pcVPS->getPTL( 1 ) = *pcVPS->getPTL( 0 );
    12741285    pcVPS->getPTL( 1 )->copyLevelFrom( &temp );
     1286#else
     1287    pcVPS->getPTL( 1 )->inferGeneralValues ( false, 1, pcVPS->getPTL( 0 ) );
     1288    pcVPS->getPTL( 1 )->inferSubLayerValues( pcVPS->getMaxSubLayersMinus1(), 1, pcVPS->getPTL( 0 ) );   
     1289#endif
    12751290  }
    12761291#endif
     
    14041419    READ_FLAG(  uiCode, "vps_profile_present_flag[i]" );    pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 );
    14051420    parsePTL ( pcVPS->getPTL( offsetVal ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1);
     1421#if H_MV_HLS10_PTL_INFER_FIX
     1422    pcVPS->getPTL( offsetVal )->inferGeneralValues ( pcVPS->getVpsProfilePresentFlag( i ), offsetVal, pcVPS->getPTL( offsetVal - 1 ) );   
     1423    pcVPS->getPTL( offsetVal )->inferSubLayerValues( pcVPS->getMaxSubLayersMinus1()      , offsetVal, pcVPS->getPTL( offsetVal - 1 ) );   
     1424#else
    14061425    if( !pcVPS->getVpsProfilePresentFlag( i ) )
    14071426    {
     
    14101429      pcVPS->getPTL( offsetVal )->copyLevelFrom( &temp );
    14111430    }
     1431#endif
    14121432    offsetVal++;
    14131433  }
     
    31663186      READ_FLAG( uiCode, "sub_layer_profile_present_flag[i]" ); rpcPTL->setSubLayerProfilePresentFlag(i, uiCode);
    31673187#if H_MV
    3168     rpcPTL->setSubLayerProfilePresentFlag( i, profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) );
     3188#if !H_MV_HLS10_PTL_INFER_FIX
     3189      rpcPTL->setSubLayerProfilePresentFlag( i, profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) );
     3190#else
     3191      // When profilePresentFlag is equal to 0, sub_layer_profile_present_flag[ i ] shall be equal to 0.
     3192      assert( profilePresentFlag || !rpcPTL->getSubLayerProfilePresentFlag(i) );
     3193#endif
    31693194#else
    31703195    }
     
    31843209  for(Int i = 0; i < maxNumSubLayersMinus1; i++)
    31853210  {
    3186     if( profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) )
     3211#if H_MV_HLS10_PTL_INFER_FIX
     3212#if H_MV
     3213    if( rpcPTL->getSubLayerProfilePresentFlag(i) )         
     3214#else
     3215    if( profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) )         
     3216#endif
     3217#else
     3218    if( profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) )   
     3219#endif
    31873220    {
    31883221      parseProfileTier(rpcPTL->getSubLayerPTL(i));
     
    32183251 
    32193252#if H_MV_HLS10_PTL
     3253#if H_MV_HLS10_PTL_INFER_FIX
     3254  if( ptl->getV2ConstraintsPresentFlag() )
     3255#else
    32203256  if( ptl->getProfileIdc( ) ==  4 || ptl->getProfileCompatibilityFlag( 4 )  ||
    32213257      ptl->getProfileIdc( ) ==  5 || ptl->getProfileCompatibilityFlag( 5 )  ||
    32223258      ptl->getProfileIdc( ) ==  6 || ptl->getProfileCompatibilityFlag( 6 )  ||
    32233259      ptl->getProfileIdc( ) ==  7 || ptl->getProfileCompatibilityFlag( 7 ) )
    3224   {
    3225     READ_FLAG( uiCode, "max_12bit_constraint_flag" ); ptl->setMax12bitConstraintFlag( uiCode == 1 );
    3226     READ_FLAG( uiCode, "max_10bit_constraint_flag" ); ptl->setMax10bitConstraintFlag( uiCode == 1 );
    3227     READ_FLAG( uiCode, "max_8bit_constraint_flag" ); ptl->setMax8bitConstraintFlag( uiCode == 1 );
    3228     READ_FLAG( uiCode, "max_422chroma_constraint_flag" ); ptl->setMax422chromaConstraintFlag( uiCode == 1 );
    3229     READ_FLAG( uiCode, "max_420chroma_constraint_flag" ); ptl->setMax420chromaConstraintFlag( uiCode == 1 );
    3230     READ_FLAG( uiCode, "max_monochrome_constraint_flag" ); ptl->setMaxMonochromeConstraintFlag( uiCode == 1 );
    3231     READ_FLAG( uiCode, "intra_constraint_flag" ); ptl->setIntraConstraintFlag( uiCode == 1 );
     3260#endif
     3261  {
     3262    READ_FLAG( uiCode, "max_12bit_constraint_flag" );        ptl->setMax12bitConstraintFlag      ( uiCode == 1 );
     3263    READ_FLAG( uiCode, "max_10bit_constraint_flag" );        ptl->setMax10bitConstraintFlag      ( uiCode == 1 );
     3264    READ_FLAG( uiCode, "max_8bit_constraint_flag" );         ptl->setMax8bitConstraintFlag       ( uiCode == 1 );
     3265    READ_FLAG( uiCode, "max_422chroma_constraint_flag" );    ptl->setMax422chromaConstraintFlag  ( uiCode == 1 );
     3266    READ_FLAG( uiCode, "max_420chroma_constraint_flag" );    ptl->setMax420chromaConstraintFlag  ( uiCode == 1 );
     3267    READ_FLAG( uiCode, "max_monochrome_constraint_flag" );   ptl->setMaxMonochromeConstraintFlag ( uiCode == 1 );
     3268    READ_FLAG( uiCode, "intra_constraint_flag" );            ptl->setIntraConstraintFlag         ( uiCode == 1 );
    32323269    READ_FLAG( uiCode, "one_picture_only_constraint_flag" ); ptl->setOnePictureOnlyConstraintFlag( uiCode == 1 );
    3233     READ_FLAG( uiCode, "lower_bit_rate_constraint_flag" ); ptl->setLowerBitRateConstraintFlag( uiCode == 1 );   
     3270    READ_FLAG( uiCode, "lower_bit_rate_constraint_flag" );   ptl->setLowerBitRateConstraintFlag  ( uiCode == 1 );   
    32343271    READ_CODE(16, uiCode, "XXX_reserved_zero_34bits[0..15]");
    32353272    READ_CODE(16, uiCode, "XXX_reserved_zero_34bits[16..31]");
     
    32423279    READ_CODE(11, uiCode, "XXX_reserved_zero_43bits[32..42]");
    32433280  }
     3281#if H_MV_HLS10_PTL_INFER_FIX
     3282  if( ptl->getInbldPresentFlag() )
     3283#else
    32443284  if( ( ptl->getProfileIdc() >= 1 && ptl->getProfileIdc() <= 5 )  ||
    32453285    ptl->getProfileCompatibilityFlag( 1 ) || ptl->getProfileCompatibilityFlag( 2 )  ||
    32463286    ptl->getProfileCompatibilityFlag( 3 ) || ptl->getProfileCompatibilityFlag( 4 )  ||
    32473287    ptl->getProfileCompatibilityFlag( 5 ) )
     3288#endif
    32483289  {
    32493290    READ_FLAG( uiCode, "inbld_flag" ); ptl->setInbldFlag( uiCode == 1 );
Note: See TracChangeset for help on using the changeset viewer.