Changeset 550 in SHVCSoftware for branches/SHM-5.0-dev/source/Lib/TLibDecoder


Ignore:
Timestamp:
21 Jan 2014, 18:47:46 (11 years ago)
Author:
seregin
Message:

merge from trunk

Location:
branches/SHM-5.0-dev/source
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-5.0-dev/source

  • branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r540 r550  
    866866  READ_CODE( 2,  uiCode,  "vps_reserved_three_2bits" );           assert(uiCode == 3);
    867867#if VPS_RENAME
    868   READ_CODE( 6,  uiCode,  "vps_max_layers_minus1" );              pcVPS->setMaxLayers( uiCode + 1);
     868#if O0137_MAX_LAYERID
     869  READ_CODE( 6,  uiCode,  "vps_max_layers_minus1" );              pcVPS->setMaxLayers( min( 62u, uiCode) + 1 );
     870#else
     871  READ_CODE( 6,  uiCode,  "vps_max_layers_minus1" );              pcVPS->setMaxLayers( uiCode + 1 );
     872#endif
    869873#else
    870874  READ_CODE( 6,  uiCode,  "vps_reserved_zero_6bits" );            assert(uiCode == 0);
     
    990994
    991995  READ_FLAG( uiCode, "avc_base_layer_flag" ); vps->setAvcBaseLayerFlag(uiCode ? true : false);
     996
     997#if O0109_MOVE_VPS_VUI_FLAG
     998  READ_FLAG( uiCode, "vps_vui_present_flag"); vps->setVpsVuiPresentFlag(uiCode ? true : false);
     999  if ( uiCode )
     1000  {
     1001#endif
     1002#if VPS_VUI_OFFSET
     1003  READ_CODE( 16, uiCode, "vps_vui_offset" );  vps->setVpsVuiOffset( uiCode );
     1004#endif
     1005#if O0109_MOVE_VPS_VUI_FLAG
     1006  }
     1007#endif
    9921008  READ_FLAG( uiCode, "splitting_flag" ); vps->setSplittingFlag(uiCode ? true : false);
    9931009
     
    10481064  //   However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val.
    10491065  {
     1066#if O0109_VIEW_ID_LEN
     1067    READ_CODE( 4, uiCode, "view_id_len" ); vps->setViewIdLen( uiCode );
     1068#else
    10501069    READ_CODE( 4, uiCode, "view_id_len_minus1" ); vps->setViewIdLenMinus1( uiCode );
    1051   }
    1052 
     1070#endif
     1071  }
     1072
     1073#if O0109_VIEW_ID_LEN
     1074  if ( vps->getViewIdLen() > 0 )
     1075  {
     1076    for(  i = 0; i < vps->getNumViews(); i++ )
     1077    {
     1078      READ_CODE( vps->getViewIdLen( ), uiCode, "view_id_val[i]" ); vps->setViewIdVal( i, uiCode );
     1079    }
     1080  }
     1081#else
    10531082  for(  i = 0; i < vps->getNumViews(); i++ )
    10541083  {
     
    10561085  }
    10571086#endif
     1087#endif // view id related signaling
    10581088#if VPS_EXTN_DIRECT_REF_LAYERS
    10591089  // For layer 0
     
    11651195    {
    11661196      READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); vps->setProfileLayerSetRef(idx, uiCode + 1);
     1197#if O0109_PROF_REF_MINUS1
     1198      assert( vps->getProfileLayerSetRef(idx) <= idx );
     1199#else
    11671200      assert( vps->getProfileLayerSetRef(idx) < idx );
    1168 
     1201#endif
    11691202      // Copy profile information as indicated
    11701203      vps->getPTLForExtn(idx)->copyProfileInfo( vps->getPTLForExtn( vps->getProfileLayerSetRef(idx) ) );
     
    11871220  if( numOutputLayerSets > 1 )
    11881221  {
     1222#if O0109_DEFAULT_ONE_OUT_LAYER_IDC
     1223    READ_CODE( 2, uiCode, "default_one_target_output_layer_idc" );   vps->setDefaultOneTargetOutputLayerIdc( uiCode );
     1224#else
    11891225    READ_FLAG( uiCode, "default_one_target_output_layer_flag" );   vps->setDefaultOneTargetOutputLayerFlag( uiCode ? true : false );
     1226#endif
    11901227  }
    11911228  vps->setNumOutputLayerSets( numOutputLayerSets );
     
    12151252      // Assign OutputLayerFlag depending on default_one_target_output_layer_flag
    12161253      Int lsIdx = i;
     1254#if O0109_DEFAULT_ONE_OUT_LAYER_IDC
     1255      if( vps->getDefaultOneTargetOutputLayerIdc() == 1 )
     1256      {
     1257        for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++)
     1258        {
     1259#if O0135_DEFAULT_ONE_OUT_SEMANTIC
     1260          vps->setOutputLayerFlag(i, j, (j == (vps->getNumLayersInIdList(lsIdx)-1)) && (vps->getDimensionId(j,1)==0) );
     1261#else
     1262          vps->setOutputLayerFlag(i, j, (j == (vps->getNumLayersInIdList(lsIdx)-1)));
     1263#endif
     1264        }
     1265      }
     1266      else if ( vps->getDefaultOneTargetOutputLayerIdc() == 0 )
     1267      {
     1268        for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++)
     1269        {
     1270          vps->setOutputLayerFlag(i, j, 1);
     1271        }
     1272      }
     1273      else
     1274      {
     1275        // Other values of default_one_target_output_layer_idc than 0 and 1 are reserved for future use.
     1276      }
     1277#else
    12171278      if( vps->getDefaultOneTargetOutputLayerFlag() )
    12181279      {
     
    12291290        }
    12301291      }
     1292#endif
    12311293    }
    12321294    Int numBits = 1;
     
    14081470#endif
    14091471
     1472#if !O0109_O0199_FLAGS_TO_VUI
    14101473#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    14111474  READ_FLAG(uiCode, "single_layer_for_non_irap_flag" ); vps->setSingleLayerForNonIrapFlag(uiCode == 1 ? true : false);
     
    14141477  READ_FLAG(uiCode, "higher_layer_irap_skip_flag" ); vps->setHigherLayerIrapSkipFlag(uiCode == 1 ? true : false);
    14151478#endif
    1416 
     1479#endif
     1480
     1481#if O0109_MOVE_VPS_VUI_FLAG
     1482  if ( vps->getVpsVuiPresentFlag() )
     1483#else
    14171484  READ_FLAG( uiCode,  "vps_vui_present_flag" );
    14181485  if (uiCode)
     1486#endif
    14191487  {
    14201488#if VPS_VUI
     
    15931661  }
    15941662#endif
     1663
     1664#if O0109_O0199_FLAGS_TO_VUI
     1665#if M0040_ADAPTIVE_RESOLUTION_CHANGE
     1666  READ_FLAG(uiCode, "single_layer_for_non_irap_flag" ); vps->setSingleLayerForNonIrapFlag(uiCode == 1 ? true : false);
     1667#endif
     1668#if HIGHER_LAYER_IRAP_SKIP_FLAG
     1669  READ_FLAG(uiCode, "higher_layer_irap_skip_flag" ); vps->setHigherLayerIrapSkipFlag(uiCode == 1 ? true : false);
     1670#endif
     1671#endif
     1672
    15951673#if N0160_VUI_EXT_ILP_REF
    15961674    READ_FLAG( uiCode, "num_ilp_restricted_ref_layers" ); vps->setNumIlpRestrictedRefLayers( uiCode == 1 );
  • branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r549 r550  
    17341734  m_cEntropyDecoder.setBitstream      (nalu.m_Bitstream);
    17351735
     1736#if O0137_MAX_LAYERID
     1737  // ignore any NAL units with nuh_layer_id == 63
     1738  if (nalu.m_layerId == 63 )
     1739  { 
     1740    return false;
     1741  }
     1742#endif
    17361743  switch (nalu.m_nalUnitType)
    17371744  {
Note: See TracChangeset for help on using the changeset viewer.