Ignore:
Timestamp:
3 May 2013, 17:16:12 (12 years ago)
Author:
tech
Message:

Fixed erroneously removed parts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r367 r368  
    680680  if (uiCode)
    681681  {
     682#if H_MV
     683    READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" );    pcSPS->setInterViewMvVertConstraintFlag(uiCode == 1 ? true : false);
     684#else
    682685    while ( xMoreRbspData() )
    683686    {
    684687      READ_FLAG( uiCode, "sps_extension_data_flag");
    685688    }
     689#endif
    686690  }
    687691}
     
    693697  READ_CODE( 4,  uiCode,  "vps_video_parameter_set_id" );         pcVPS->setVPSId( uiCode );
    694698  READ_CODE( 2,  uiCode,  "vps_reserved_three_2bits" );           assert(uiCode == 3);
     699#if H_MV
     700  READ_CODE( 6,  uiCode,  "vps_max_layers_minus1" );              pcVPS->setMaxLayers( uiCode + 1 );
     701#else
    695702  READ_CODE( 6,  uiCode,  "vps_reserved_zero_6bits" );            assert(uiCode == 0);
     703#endif
    696704  READ_CODE( 3,  uiCode,  "vps_max_sub_layers_minus1" );          pcVPS->setMaxTLayers( uiCode + 1 );
    697705  READ_FLAG(     uiCode,  "vps_temporal_id_nesting_flag" );       pcVPS->setTemporalNestingFlag( uiCode ? true:false );
    698706  assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag());
     707#if H_MV
     708  READ_CODE( 16, uiCode,  "vps_extension_offset" );               
     709#else
    699710  READ_CODE( 16, uiCode,  "vps_reserved_ffff_16bits" );           assert(uiCode == 0xffff);
     711#endif
    700712  parsePTL ( pcVPS->getPTL(), true, pcVPS->getMaxTLayers()-1);
    701713#if SIGNAL_BITRATE_PICRATE_IN_VPS
     
    727739
    728740  assert( pcVPS->getNumHrdParameters() < MAX_VPS_OP_SETS_PLUS1 );
     741#if H_MV
     742  assert( pcVPS->getMaxNuhLayerId() < MAX_VPS_NUH_LAYER_ID_PLUS1 );
     743  READ_CODE( 6, uiCode, "vps_max_nuh_layer_id" );   pcVPS->setMaxNuhLayerId( uiCode );
     744#else
    729745  assert( pcVPS->getMaxNuhReservedZeroLayerId() < MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1 );
    730746  READ_CODE( 6, uiCode, "vps_max_nuh_reserved_zero_layer_id" );   pcVPS->setMaxNuhReservedZeroLayerId( uiCode );
     747#endif
    731748  READ_UVLC(    uiCode, "vps_max_op_sets_minus1" );               pcVPS->setMaxOpSets( uiCode + 1 );
    732749  for( UInt opsIdx = 1; opsIdx <= ( pcVPS->getMaxOpSets() - 1 ); opsIdx ++ )
    733750  {
    734751    // Operation point set
     752#if H_MV
     753    for( UInt i = 0; i <= pcVPS->getMaxNuhLayerId(); i ++ )
     754#else
    735755    for( UInt i = 0; i <= pcVPS->getMaxNuhReservedZeroLayerId(); i ++ )
     756#endif
    736757    {
    737758      READ_FLAG( uiCode, "layer_id_included_flag[opsIdx][i]" );     pcVPS->setLayerIdIncludedFlag( uiCode == 1 ? true : false, opsIdx, i );
     
    772793  if (uiCode)
    773794  {
     795#if H_MV
     796    m_pcBitstream->readOutTrailingBits();
     797
     798    READ_FLAG( uiCode, "avc_base_layer_flag" );                     pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false );
     799    READ_FLAG( uiCode, "splitting_flag" );                          pcVPS->setSplittingFlag( uiCode == 1 ? true : false );
     800
     801    // Parse scalability_mask[i]   
     802    for( Int sIdx = 0; sIdx < MAX_NUM_SCALABILITY_TYPES; sIdx++ )
     803    {
     804      READ_FLAG( uiCode,  "scalability_mask[i]" );                  pcVPS->setScalabilityMask( sIdx, uiCode == 1 ? true : false );     
     805    }
     806
     807    Int numScalabilityTypes = pcVPS->getNumScalabilityTypes();
     808
     809    // Parse dimension_id_len_minus1[j]   
     810    for( Int sIdx = 0; sIdx < numScalabilityTypes; sIdx++ )
     811    {
     812        READ_CODE( 3, uiCode, "dimension_id_len_minus1[j]" );       pcVPS->setDimensionIdLen( sIdx, uiCode + 1 );
     813    }
     814
     815    // vps_nuh_layer_id_present_flag
     816    READ_FLAG( uiCode, "vps_nuh_layer_id_present_flag" );           pcVPS->setVpsNuhLayerIdPresentFlag( uiCode == 1 ? true : false );
     817
     818    // parse layer_id_in_nuh[i] and derive LayerIdInVps
     819    pcVPS->setLayerIdInNuh( 0, 0 ); pcVPS->setLayerIdInVps( 0, 0 );
     820   
     821    for( Int layer = 1; layer <= pcVPS->getMaxLayers() - 1; layer++ )
     822    {
     823      UInt layerIdInNuh;
     824      if ( pcVPS->getVpsNuhLayerIdPresentFlag() )
     825      {
     826        READ_CODE( 6, uiCode, "layer_id_in_nuh[i]" );                layerIdInNuh = uiCode;
     827      }
     828      else
     829      {
     830        layerIdInNuh = layer;
     831      }     
     832
     833      pcVPS->setLayerIdInNuh( layer, layerIdInNuh );
     834      pcVPS->setLayerIdInVps( layerIdInNuh, layer );
     835
     836      // parse dimension_id[i][j]
     837      for( Int sIdx = 0; sIdx < numScalabilityTypes; sIdx++ )
     838      {
     839          READ_CODE( pcVPS->getDimensionIdLen( sIdx ), uiCode, "dimension_id[i][j]" );  pcVPS->setDimensionId( layer, sIdx, uiCode );
     840      }
     841    }
     842
     843    for( Int layerSet = 1; layerSet <= pcVPS->getMaxOpSets() - 1; layerSet++ )
     844    {
     845      READ_FLAG(  uiCode, "vps_profile_present_flag[lsIdx]" );    pcVPS->setVpsProfilePresentFlag( layerSet, uiCode == 1 ? true : false );
     846      if( pcVPS->getVpsProfilePresentFlag( layerSet ) == false )
     847      {
     848        READ_UVLC( uiCode, "profile_layer_set_ref_minus1[lsIdx]" ); pcVPS->setProfileLayerSetRefMinus1( layerSet, uiCode );
     849      }
     850
     851      parsePTL ( pcVPS->getPTL( layerSet ), pcVPS->getVpsProfilePresentFlag( layerSet ), pcVPS->getMaxTLayers()-1);
     852      if( pcVPS->getVpsProfilePresentFlag( layerSet ) == false )
     853      {
     854        TComPTL temp = *pcVPS->getPTL( layerSet );
     855        *pcVPS->getPTL( layerSet ) = *pcVPS->getPTL( pcVPS->getProfileLayerSetRefMinus1( layerSet ) + 1 );
     856        pcVPS->getPTL( layerSet )->copyLevelFrom( &temp );
     857      }
     858    }
     859
     860    READ_UVLC( uiCode, "num_output_layer_sets" );                  pcVPS->setNumOutputLayerSets( uiCode );
     861   
     862    for( Int layerSet = 0; layerSet < pcVPS->getNumOutputLayerSets(); layerSet++ )
     863    {
     864      READ_UVLC( uiCode, "output_layer_set_idx[i]" );              pcVPS->setOutputLayerSetIdx( layerSet, uiCode );
     865      for( Int layer = 0; layer <= pcVPS->getMaxNuhLayerId(); layer++ )
     866      {
     867        if( pcVPS->getLayerIdIncludedFlag( pcVPS->getOutputLayerSetIdx( layerSet ), layer ) == true )
     868        {
     869          READ_FLAG( uiCode, "output_layer_flag" );                 pcVPS->setOutputLayerFlag( layerSet, layer, uiCode == 1 ? true : false );
     870        }
     871      }
     872    }
     873
     874    for( Int i = 1; i <= pcVPS->getMaxLayers() - 1; i++ )
     875    {
     876      for( Int j = 0; j < i; j++ )
     877      {
     878        READ_FLAG( uiCode, "direct_dependency_flag[i][j]" );             pcVPS->setDirectDependencyFlag( i, j, uiCode );
     879      }
     880    }
     881   
     882    READ_FLAG( uiCode,  "vps_extension2_flag" );
     883    if (uiCode)
     884    {
     885      while ( xMoreRbspData() )
     886      {
     887        READ_FLAG( uiCode, "vps_extension2_data_flag");
     888      }
     889    }
     890
     891    pcVPS->checkVPSExtensionSyntax();
     892
     893    pcVPS->calcIvRefLayers();
     894
     895#else
    774896    while ( xMoreRbspData() )
    775897    {
    776898      READ_FLAG( uiCode, "vps_extension_data_flag");
    777899    }
     900#endif   
    778901  }
    779902 
     
    791914  TComPPS* pps = NULL;
    792915  TComSPS* sps = NULL;
     916#if H_MV
     917  TComVPS* vps = NULL;
     918#endif
    793919
    794920  UInt firstSliceSegmentInPic;
     
    805931  //!KS: need to add error handling code here, if SPS is not available
    806932  assert(sps!=0);
     933#if H_MV
     934  vps = parameterSetManager->getPrefetchedVPS(sps->getVPSId());
     935  assert(vps!=0);
     936  rpcSlice->setVPS(vps);
     937#endif
    807938  rpcSlice->setSPS(sps);
    808939  rpcSlice->setPPS(pps);
     
    13921523  for (Int i = 0; i < maxNumSubLayersMinus1; i++)
    13931524  {
     1525#if !H_MV
    13941526    if(profilePresentFlag)
    13951527    {
     1528#endif
    13961529      READ_FLAG( uiCode, "sub_layer_profile_present_flag[i]" ); rpcPTL->setSubLayerProfilePresentFlag(i, uiCode);
    1397     }
     1530#if H_MV
     1531    rpcPTL->setSubLayerProfilePresentFlag( i, profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) );
     1532#else
     1533    }
     1534#endif
    13981535    READ_FLAG( uiCode, "sub_layer_level_present_flag[i]"   ); rpcPTL->setSubLayerLevelPresentFlag  (i, uiCode);
    13991536  }
Note: See TracChangeset for help on using the changeset viewer.