Changeset 544 in SHVCSoftware for branches/SHM-4.1-dev/source/Lib/TLibDecoder


Ignore:
Timestamp:
11 Jan 2014, 01:46:01 (11 years ago)
Author:
seregin
Message:

JCTVC-O0109. Patch was provided by Yongjin Cho <choyongjin@…>

File:
1 edited

Legend:

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

    r542 r544  
    990990
    991991  READ_FLAG( uiCode, "avc_base_layer_flag" ); vps->setAvcBaseLayerFlag(uiCode ? true : false);
     992
     993#if O0109_MOVE_VPS_VUI_FLAG
     994  READ_FLAG( uiCode, "vps_vui_present_flag"); vps->setVpsVuiPresentFlag(uiCode ? true : false);
     995  if ( uiCode )
     996  {
     997#endif
    992998#if VPS_VUI_OFFSET
    993999  READ_CODE( 16, uiCode, "vps_vui_offset" );  vps->setVpsVuiOffset( uiCode );
     1000#endif
     1001#if O0109_MOVE_VPS_VUI_FLAG
     1002  }
    9941003#endif
    9951004  READ_FLAG( uiCode, "splitting_flag" ); vps->setSplittingFlag(uiCode ? true : false);
     
    10511060  //   However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val.
    10521061  {
     1062#if O0109_VIEW_ID_LEN
     1063    READ_CODE( 4, uiCode, "view_id_len" ); vps->setViewIdLen( uiCode );
     1064#else
    10531065    READ_CODE( 4, uiCode, "view_id_len_minus1" ); vps->setViewIdLenMinus1( uiCode );
    1054   }
    1055 
     1066#endif
     1067  }
     1068
     1069#if O0109_VIEW_ID_LEN
     1070  if ( vps->getViewIdLen() > 0 )
     1071  {
     1072    for(  i = 0; i < vps->getNumViews(); i++ )
     1073    {
     1074      READ_CODE( vps->getViewIdLen( ), uiCode, "view_id_val[i]" ); vps->setViewIdVal( i, uiCode );
     1075    }
     1076  }
     1077#else
    10561078  for(  i = 0; i < vps->getNumViews(); i++ )
    10571079  {
     
    10591081  }
    10601082#endif
     1083#endif // view id related signaling
    10611084#if VPS_EXTN_DIRECT_REF_LAYERS
    10621085  // For layer 0
     
    11681191    {
    11691192      READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); vps->setProfileLayerSetRef(idx, uiCode + 1);
     1193#if O0109_PROF_REF_MINUS1
     1194      assert( vps->getProfileLayerSetRef(idx) <= idx );
     1195#else
    11701196      assert( vps->getProfileLayerSetRef(idx) < idx );
    1171 
     1197#endif
    11721198      // Copy profile information as indicated
    11731199      vps->getPTLForExtn(idx)->copyProfileInfo( vps->getPTLForExtn( vps->getProfileLayerSetRef(idx) ) );
     
    11901216  if( numOutputLayerSets > 1 )
    11911217  {
     1218#if O0109_DEFAULT_ONE_OUT_LAYER_IDC
     1219    READ_CODE( 2, uiCode, "default_one_target_output_layer_idc" );   vps->setDefaultOneTargetOutputLayerIdc( uiCode );
     1220#else
    11921221    READ_FLAG( uiCode, "default_one_target_output_layer_flag" );   vps->setDefaultOneTargetOutputLayerFlag( uiCode ? true : false );
     1222#endif
    11931223  }
    11941224  vps->setNumOutputLayerSets( numOutputLayerSets );
     
    12181248      // Assign OutputLayerFlag depending on default_one_target_output_layer_flag
    12191249      Int lsIdx = i;
     1250#if O0109_DEFAULT_ONE_OUT_LAYER_IDC
     1251      if( vps->getDefaultOneTargetOutputLayerIdc() == 1 )
     1252      {
     1253        for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++)
     1254        {
     1255          vps->setOutputLayerFlag(i, j, (j == (vps->getNumLayersInIdList(lsIdx)-1)));
     1256        }
     1257      }
     1258      else if ( vps->getDefaultOneTargetOutputLayerIdc() == 0 )
     1259      {
     1260        for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++)
     1261        {
     1262          vps->setOutputLayerFlag(i, j, 1);
     1263        }
     1264      }
     1265      else
     1266      {
     1267        // Other values of default_one_target_output_layer_idc than 0 and 1 are reserved for future use.
     1268      }
     1269#else
    12201270      if( vps->getDefaultOneTargetOutputLayerFlag() )
    12211271      {
     
    12321282        }
    12331283      }
     1284#endif
    12341285    }
    12351286    Int numBits = 1;
     
    14111462#endif
    14121463
     1464#if !O0109_O0199_FLAGS_TO_VUI
    14131465#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    14141466  READ_FLAG(uiCode, "single_layer_for_non_irap_flag" ); vps->setSingleLayerForNonIrapFlag(uiCode == 1 ? true : false);
     
    14171469  READ_FLAG(uiCode, "higher_layer_irap_skip_flag" ); vps->setHigherLayerIrapSkipFlag(uiCode == 1 ? true : false);
    14181470#endif
    1419 
     1471#endif
     1472
     1473#if O0109_MOVE_VPS_VUI_FLAG
     1474  if ( vps->getVpsVuiPresentFlag() )
     1475#else
    14201476  READ_FLAG( uiCode,  "vps_vui_present_flag" );
    14211477  if (uiCode)
     1478#endif
    14221479  {
    14231480#if VPS_VUI
     
    15961653  }
    15971654#endif
     1655
     1656#if O0109_O0199_FLAGS_TO_VUI
     1657#if M0040_ADAPTIVE_RESOLUTION_CHANGE
     1658  READ_FLAG(uiCode, "single_layer_for_non_irap_flag" ); vps->setSingleLayerForNonIrapFlag(uiCode == 1 ? true : false);
     1659#endif
     1660#if HIGHER_LAYER_IRAP_SKIP_FLAG
     1661  READ_FLAG(uiCode, "higher_layer_irap_skip_flag" ); vps->setHigherLayerIrapSkipFlag(uiCode == 1 ? true : false);
     1662#endif
     1663#endif
     1664
    15981665#if N0160_VUI_EXT_ILP_REF
    15991666    READ_FLAG( uiCode, "num_ilp_restricted_ref_layers" ); vps->setNumIlpRestrictedRefLayers( uiCode == 1 );
Note: See TracChangeset for help on using the changeset viewer.