Ignore:
Timestamp:
23 Jun 2013, 05:16:22 (13 years ago)
Author:
tech
Message:

Integrated all new syntax elements and variables in semantics.

Location:
branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp

    r488 r490  
    329329  {
    330330    WRITE_FLAG(pcVUI->getTilesFixedStructureFlag(),             "tiles_fixed_structure_flag");
     331#if H_MV
     332    if ( pcSPS->getLayerId() > 0 )
     333    {
     334      WRITE_FLAG( pcVUI->getTileBoundariesAlignedFlag( ) ? 1 : 0 , "tile_boundaries_aligned_flag" );
     335    }
     336#endif
    331337    WRITE_FLAG(pcVUI->getMotionVectorsOverPicBoundariesFlag(),  "motion_vectors_over_pic_boundaries_flag");
    332338    WRITE_FLAG(pcVUI->getRestrictedRefPicListsFlag(),           "restricted_ref_pic_lists_flag");
     
    556562  WRITE_FLAG( 1, "sps_extension_flag" );
    557563  WRITE_FLAG( pcSPS->getInterViewMvVertConstraintFlag() ? 1 : 0, "inter_view_mv_vert_constraint_flag" );
     564  ////   sps_extension_vui_parameters( )
     565  if( pcSPS->getVuiParameters()->getBitstreamRestrictionFlag() )
     566  { 
     567    WRITE_UVLC( pcSPS->getNumIlpRestrictedRefLayers( ),           "num_ilp_restricted_ref_layers" );
     568    for( Int i = 0; i < pcSPS->getNumIlpRestrictedRefLayers( ); i++ )
     569    { 
     570      WRITE_UVLC( pcSPS->getMinSpatialSegmentOffsetPlus1( i ),    "min_spatial_segment_offset_plus1" );
     571      if( pcSPS->getMinSpatialSegmentOffsetPlus1( i ) > 0 )
     572      { 
     573        WRITE_FLAG( pcSPS->getCtuBasedOffsetEnabledFlag( i ),      "ctu_based_offset_enabled_flag[ i ]");
     574        if( pcSPS->getCtuBasedOffsetEnabledFlag( i ) ) 
     575        {
     576          WRITE_UVLC( pcSPS->getMinHorizontalCtuOffsetPlus1( i ), "min_horizontal_ctu_offset_plus1[ i ]");
     577        }
     578      } 
     579    } 
     580  } 
     581  ////   sps_extension_vui_parameters( ) END
     582  WRITE_UVLC( 0, "sps_shvc_reserved_zero_idc" );
    558583#if !H_3D
    559584  WRITE_FLAG( 0, "sps_extension2_flag" );
     
    700725 
    701726  for( Int i = 0; i <= pcVPS->getMaxLayers() - 1; i++ )
    702   {
     727  {     
    703728    if ( pcVPS->getVpsNuhLayerIdPresentFlag() && ( i > 0 ) )
    704729    {
    705730      WRITE_CODE( pcVPS->getLayerIdInNuh( i ), 6,          "layer_id_in_nuh[i]");
    706731    }
    707 
     732    else
     733    {
     734      assert( pcVPS->getLayerIdInNuh( i ) == i );
     735    }
     736
     737    assert(  pcVPS->getLayerIdInVps( pcVPS->getLayerIdInNuh( i ) ) == i );
     738     
    708739    if ( !pcVPS->getSplittingFlag() )
    709740    {   
     
    738769      WRITE_CODE( pcVPS->getProfileRefMinus1( i ), 6, "profile_ref_minus1[i]" );
    739770    }
    740 
    741771    codePTL( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 );
    742772  }
    743773
    744   Int numOutputLayerSets = pcVPS->getNumOutputLayerSets();
    745 
    746   WRITE_FLAG( pcVPS->getVpsMoreOutputLayerSetsThanDefaultFlag( ) ? 1 : 0, "more_output_layer_sets_than_default_flag" );
    747 
    748   if ( pcVPS->getVpsMoreOutputLayerSetsThanDefaultFlag( ) )
     774  Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1;
     775
     776  WRITE_FLAG( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) ? 1 : 0, "more_output_layer_sets_than_default_flag" );
     777
     778  if ( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) )
    749779  {
    750780    WRITE_CODE( pcVPS->getNumAddOutputLayerSetsMinus1( )    , 10,    "num_add_output_layer_sets_minus1"      );
     
    760790  {
    761791    if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) )
    762     {
    763       Int lsIdx = pcVPS->getOutputLayerSetIdxMinus1( i ) + 1;
    764       WRITE_UVLC( lsIdx,      "output_layer_set_idx[i]" );
    765 
     792    {     
     793      WRITE_UVLC( pcVPS->getOutputLayerSetIdxMinus1( i ),      "output_layer_set_idx_minus1[i]" );
    766794      for( Int j = 0; j <= pcVPS->getNumLayersInIdList( j ); j++ )
    767795      {
    768         //WRITE_FLAG( pcVPS->getOutputLayerFlag( i, j) ? 1 : 0, "output_layer_flag" );
    769       }
    770 
     796        WRITE_FLAG( pcVPS->getOutputLayerFlag( i, j) ? 1 : 0, "output_layer_flag" );
     797      }
    771798      WRITE_CODE( pcVPS->getProfileLevelTierIdx( i ), pcVPS->getProfileLevelTierIdxLen() ,"profile_level_tier_idx[ i ]" );   
    772799    }
     
    799826Void TEncCavlc::codeSliceHeader         ( TComSlice* pcSlice )
    800827{
     828#if H_MV
     829  TComVPS* vps = pcSlice->getVPS();
     830#endif
    801831#if ENC_DEC_TRACE 
    802832  xTraceSliceHeader (pcSlice);
     
    841871  if ( !pcSlice->getDependentSliceSegmentFlag() )
    842872  {
     873#if H_MV   
     874    if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > 0 )
     875    {
     876      WRITE_FLAG( pcSlice->getDiscardableFlag( ) ? 1 : 0 , "discardable_flag" );
     877    }
     878
     879    for (Int i = 1; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)   
     880#else
    843881    for (Int i = 0; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)
     882#endif
    844883    {
    845884      assert(!!"slice_reserved_undetermined_flag[]");
     
    9941033      }
    9951034    }
     1035#if H_MV
     1036    Int layerIdInVps       = pcSlice->getLayerIdInVps();
     1037    if( pcSlice->getLayerId() > 0 && vps->getNumDirectRefLayers( layerIdInVps ) > 0 )
     1038    {   
     1039      WRITE_FLAG( pcSlice->getInterLayerPredEnabledFlag( ) ? 1 : 0 , "inter_layer_pred_enabled_flag" );
     1040      if( pcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerIdInVps ) > 1 )
     1041      {           
     1042        if( !vps->getMaxOneActiveRefLayerFlag()) 
     1043        {
     1044          WRITE_CODE( pcSlice->getNumInterLayerRefPicsMinus1( ), pcSlice->getNumInterLayerRefPicsMinus1Len( ), "num_inter_layer_ref_pics_minus1" );
     1045        }
     1046        for( Int i = 0; i < pcSlice->getNumActiveRefLayerPics(); i++ )   
     1047        {
     1048          WRITE_CODE( pcSlice->getInterLayerPredLayerIdc( i ), pcSlice->getInterLayerPredLayerIdcLen( ), "inter_layer_pred_layer_idc" );
     1049        }
     1050      } 
     1051    }
     1052
     1053    pcSlice->setActiveMotionPredRefLayers( );
     1054
     1055    if( vps->getNumSamplePredRefLayers( layerIdInVps ) > 0  &&  pcSlice->getNumActiveRefLayerPics() > 0 )
     1056    {
     1057      WRITE_FLAG( pcSlice->getInterLayerSamplePredOnlyFlag( ) ? 1 : 0 , "inter_layer_sample_pred_only_flag" );
     1058    }
     1059
     1060#endif
    9961061    if(pcSlice->getSPS()->getUseSAO())
    9971062    {
     
    11011166    if ( pcSlice->getEnableTMVPFlag() )
    11021167    {
     1168#if H_MV
     1169      if( pcSlice->getLayerId() > 0 && pcSlice->getNumActiveMotionPredRefLayers() > 0 )
     1170      {
     1171        WRITE_FLAG( pcSlice->getAltCollocatedIndicationFlag( ) ? 1 : 0 , "alt_collocated_indication_flag" );
     1172
     1173        if( pcSlice->getAltCollocatedIndicationFlag() && pcSlice->getNumActiveMotionPredRefLayers() > 1 )
     1174        {         
     1175          WRITE_UVLC( pcSlice->getCollocatedRefLayerIdx( ), "collocated_ref_layer_idx" );
     1176        }
     1177      }
     1178      else
     1179      {
     1180#endif
     1181
    11031182      if ( pcSlice->getSliceType() == B_SLICE )
    11041183      {
     
    11131192      }
    11141193    }
     1194#if H_MV
     1195    }
     1196#endif
    11151197    if ( (pcSlice->getPPS()->getUseWP() && pcSlice->getSliceType()==P_SLICE) || (pcSlice->getPPS()->getWPBiPred() && pcSlice->getSliceType()==B_SLICE) )
    11161198    {
  • branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder/TEncTop.cpp

    r446 r490  
    512512{
    513513#if H_MV
    514   m_cSPS.setSPSId( getLayerIdInVps() );
     514  m_cSPS.setSPSId  ( getLayerIdInVps() );
     515  m_cSPS.setLayerId( getLayerId() );
    515516#endif
    516517  ProfileTierLevel& profileTierLevel = *m_cSPS.getPTL()->getGeneralPTL();
Note: See TracChangeset for help on using the changeset viewer.