Changeset 490 in 3DVCSoftware for branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder
- Timestamp:
- 23 Jun 2013, 05:16:22 (13 years ago)
- Location:
- branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder
- Files:
-
- 2 edited
-
TEncCavlc.cpp (modified) (10 diffs)
-
TEncTop.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
r488 r490 329 329 { 330 330 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 331 337 WRITE_FLAG(pcVUI->getMotionVectorsOverPicBoundariesFlag(), "motion_vectors_over_pic_boundaries_flag"); 332 338 WRITE_FLAG(pcVUI->getRestrictedRefPicListsFlag(), "restricted_ref_pic_lists_flag"); … … 556 562 WRITE_FLAG( 1, "sps_extension_flag" ); 557 563 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" ); 558 583 #if !H_3D 559 584 WRITE_FLAG( 0, "sps_extension2_flag" ); … … 700 725 701 726 for( Int i = 0; i <= pcVPS->getMaxLayers() - 1; i++ ) 702 { 727 { 703 728 if ( pcVPS->getVpsNuhLayerIdPresentFlag() && ( i > 0 ) ) 704 729 { 705 730 WRITE_CODE( pcVPS->getLayerIdInNuh( i ), 6, "layer_id_in_nuh[i]"); 706 731 } 707 732 else 733 { 734 assert( pcVPS->getLayerIdInNuh( i ) == i ); 735 } 736 737 assert( pcVPS->getLayerIdInVps( pcVPS->getLayerIdInNuh( i ) ) == i ); 738 708 739 if ( !pcVPS->getSplittingFlag() ) 709 740 { … … 738 769 WRITE_CODE( pcVPS->getProfileRefMinus1( i ), 6, "profile_ref_minus1[i]" ); 739 770 } 740 741 771 codePTL( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 ); 742 772 } 743 773 744 Int numOutputLayerSets = pcVPS->get NumOutputLayerSets();745 746 WRITE_FLAG( pcVPS->get VpsMoreOutputLayerSetsThanDefaultFlag( ) ? 1 : 0, "more_output_layer_sets_than_default_flag" );747 748 if ( pcVPS->get VpsMoreOutputLayerSetsThanDefaultFlag( ) )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( ) ) 749 779 { 750 780 WRITE_CODE( pcVPS->getNumAddOutputLayerSetsMinus1( ) , 10, "num_add_output_layer_sets_minus1" ); … … 760 790 { 761 791 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]" ); 766 794 for( Int j = 0; j <= pcVPS->getNumLayersInIdList( j ); j++ ) 767 795 { 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 } 771 798 WRITE_CODE( pcVPS->getProfileLevelTierIdx( i ), pcVPS->getProfileLevelTierIdxLen() ,"profile_level_tier_idx[ i ]" ); 772 799 } … … 799 826 Void TEncCavlc::codeSliceHeader ( TComSlice* pcSlice ) 800 827 { 828 #if H_MV 829 TComVPS* vps = pcSlice->getVPS(); 830 #endif 801 831 #if ENC_DEC_TRACE 802 832 xTraceSliceHeader (pcSlice); … … 841 871 if ( !pcSlice->getDependentSliceSegmentFlag() ) 842 872 { 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 843 881 for (Int i = 0; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++) 882 #endif 844 883 { 845 884 assert(!!"slice_reserved_undetermined_flag[]"); … … 994 1033 } 995 1034 } 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 996 1061 if(pcSlice->getSPS()->getUseSAO()) 997 1062 { … … 1101 1166 if ( pcSlice->getEnableTMVPFlag() ) 1102 1167 { 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 1103 1182 if ( pcSlice->getSliceType() == B_SLICE ) 1104 1183 { … … 1113 1192 } 1114 1193 } 1194 #if H_MV 1195 } 1196 #endif 1115 1197 if ( (pcSlice->getPPS()->getUseWP() && pcSlice->getSliceType()==P_SLICE) || (pcSlice->getPPS()->getWPBiPred() && pcSlice->getSliceType()==B_SLICE) ) 1116 1198 { -
branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder/TEncTop.cpp
r446 r490 512 512 { 513 513 #if H_MV 514 m_cSPS.setSPSId( getLayerIdInVps() ); 514 m_cSPS.setSPSId ( getLayerIdInVps() ); 515 m_cSPS.setLayerId( getLayerId() ); 515 516 #endif 516 517 ProfileTierLevel& profileTierLevel = *m_cSPS.getPTL()->getGeneralPTL();
Note: See TracChangeset for help on using the changeset viewer.