Changeset 534 in 3DVCSoftware for branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder
- Timestamp:
- 13 Jul 2013, 10:26:41 (11 years ago)
- Location:
- branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncCavlc.cpp
r533 r534 338 338 { 339 339 WRITE_FLAG(pcVUI->getTilesFixedStructureFlag(), "tiles_fixed_structure_flag"); 340 #if H_MV 341 if ( pcSPS->getLayerId() > 0 ) 342 { 343 WRITE_FLAG( pcVUI->getTileBoundariesAlignedFlag( ) ? 1 : 0 , "tile_boundaries_aligned_flag" ); 344 } 345 #endif 340 346 WRITE_FLAG(pcVUI->getMotionVectorsOverPicBoundariesFlag(), "motion_vectors_over_pic_boundaries_flag"); 341 347 WRITE_FLAG(pcVUI->getRestrictedRefPicListsFlag(), "restricted_ref_pic_lists_flag"); … … 452 458 #endif 453 459 WRITE_CODE( pcSPS->getVPSId (), 4, "sps_video_parameter_set_id" ); 460 #if H_MV 461 if ( pcSPS->getLayerId() == 0 ) 462 { 463 #endif 454 464 WRITE_CODE( pcSPS->getMaxTLayers() - 1, 3, "sps_max_sub_layers_minus1" ); 455 465 WRITE_FLAG( pcSPS->getTemporalIdNestingFlag() ? 1 : 0, "sps_temporal_id_nesting_flag" ); 456 466 codePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1); 467 #if H_MV 468 } 469 #endif 457 470 WRITE_UVLC( pcSPS->getSPSId (), "sps_seq_parameter_set_id" ); 458 471 WRITE_UVLC( pcSPS->getChromaFormatIdc (), "chroma_format_idc" ); … … 565 578 WRITE_FLAG( 1, "sps_extension_flag" ); 566 579 WRITE_FLAG( pcSPS->getInterViewMvVertConstraintFlag() ? 1 : 0, "inter_view_mv_vert_constraint_flag" ); 580 //// sps_extension_vui_parameters( ) 581 if( pcSPS->getVuiParameters()->getBitstreamRestrictionFlag() ) 582 { 583 WRITE_UVLC( pcSPS->getNumIlpRestrictedRefLayers( ), "num_ilp_restricted_ref_layers" ); 584 for( Int i = 0; i < pcSPS->getNumIlpRestrictedRefLayers( ); i++ ) 585 { 586 WRITE_UVLC( pcSPS->getMinSpatialSegmentOffsetPlus1( i ), "min_spatial_segment_offset_plus1" ); 587 if( pcSPS->getMinSpatialSegmentOffsetPlus1( i ) > 0 ) 588 { 589 WRITE_FLAG( pcSPS->getCtuBasedOffsetEnabledFlag( i ), "ctu_based_offset_enabled_flag[ i ]"); 590 if( pcSPS->getCtuBasedOffsetEnabledFlag( i ) ) 591 { 592 WRITE_UVLC( pcSPS->getMinHorizontalCtuOffsetPlus1( i ), "min_horizontal_ctu_offset_plus1[ i ]"); 593 } 594 } 595 } 596 } 597 //// sps_extension_vui_parameters( ) END 598 WRITE_UVLC( 0, "sps_shvc_reserved_zero_idc" ); 567 599 #if !H_3D 568 600 WRITE_FLAG( 0, "sps_extension2_flag" ); … … 632 664 assert( pcVPS->getNumHrdParameters() <= MAX_VPS_NUM_HRD_PARAMETERS ); 633 665 #if H_MV 634 assert( pcVPS->getMaxNuhLayerId() < MAX_VPS_NUH_LAYER_ID_PLUS1 ); 635 WRITE_CODE( pcVPS->getMaxNuhLayerId(), 6, "vps_max_nuh_layer_id" ); 666 assert( pcVPS->getVpsMaxLayerId() < MAX_VPS_NUH_LAYER_ID_PLUS1 ); 667 WRITE_CODE( pcVPS->getVpsMaxLayerId(), 6, "vps_max_layer_id" ); 668 669 WRITE_UVLC( pcVPS->getVpsNumLayerSetsMinus1(), "vps_max_num_layer_sets_minus1" ); 670 for( UInt opsIdx = 1; opsIdx <= pcVPS->getVpsNumLayerSetsMinus1(); opsIdx ++ ) 671 { 672 // Operation point set 673 for( UInt i = 0; i <= pcVPS->getVpsMaxLayerId(); i ++ ) 674 { 636 675 #else 637 676 assert( pcVPS->getMaxNuhReservedZeroLayerId() < MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1 ); 638 677 WRITE_CODE( pcVPS->getMaxNuhReservedZeroLayerId(), 6, "vps_max_nuh_reserved_zero_layer_id" ); 639 #endif 678 640 679 pcVPS->setMaxOpSets(1); 641 680 WRITE_UVLC( pcVPS->getMaxOpSets() - 1, "vps_max_op_sets_minus1" ); … … 643 682 { 644 683 // Operation point set 645 #if H_MV646 for( UInt i = 0; i <= pcVPS->getMaxNuhLayerId(); i ++ )647 #else648 684 for( UInt i = 0; i <= pcVPS->getMaxNuhReservedZeroLayerId(); i ++ ) 649 #endif650 685 { 651 686 // Only applicable for version 1 652 687 pcVPS->setLayerIdIncludedFlag( true, opsIdx, i ); 688 #endif 653 689 WRITE_FLAG( pcVPS->getLayerIdIncludedFlag( opsIdx, i ) ? 1 : 0, "layer_id_included_flag[opsIdx][i]" ); 654 690 } … … 701 737 } 702 738 703 for( Int sIdx = 0; sIdx < pcVPS->getNumScalabilityTypes( ) ; sIdx++ )739 for( Int sIdx = 0; sIdx < pcVPS->getNumScalabilityTypes( ) - ( pcVPS->getSplittingFlag() ? 1 : 0 ); sIdx++ ) 704 740 { 705 741 WRITE_CODE( pcVPS->getDimensionIdLen( sIdx ) - 1 , 3, "dimension_id_len_minus1[j]"); 706 742 } 707 743 744 if ( pcVPS->getSplittingFlag() ) 745 { // Ignore old dimension id length 746 pcVPS->setDimensionIdLen( pcVPS->getNumScalabilityTypes( ) - 1 ,pcVPS->inferLastDimsionIdLenMinus1() + 1 ); 747 } 748 749 708 750 WRITE_FLAG( pcVPS->getVpsNuhLayerIdPresentFlag() ? 1 : 0, "vps_nuh_layer_id_present_flag"); 709 751 710 // already updated to JCT3V-D0220 711 for( Int layer = 0; layer <= pcVPS->getMaxLayers() - 1; layer++ ) 712 { 713 if ( ( layer != 0 ) && pcVPS->getVpsNuhLayerIdPresentFlag() ) 714 WRITE_CODE( pcVPS->getLayerIdInNuh( layer ), 6, "layer_id_in_nuh[i]"); 715 for( Int sIdx = 0; sIdx < pcVPS->getNumScalabilityTypes() ; sIdx++ ) 752 for( Int i = 0; i <= pcVPS->getMaxLayers() - 1; i++ ) 753 { 754 if ( pcVPS->getVpsNuhLayerIdPresentFlag() && ( i > 0 ) ) 716 755 { 717 WRITE_CODE( pcVPS->getDimensionId( layer, sIdx ), pcVPS->getDimensionIdLen( sIdx ), "dimension_id[i][j]"); 718 } 719 } 720 721 for( Int layerSet = 1; layerSet <= pcVPS->getMaxOpSets() - 1; layerSet++ ) 722 { 723 WRITE_FLAG( pcVPS->getVpsProfilePresentFlag( layerSet ) ? 1 : 0, "vps_profile_present_flag[lsIdx]" ); 724 if( pcVPS->getVpsProfilePresentFlag( layerSet ) == false ) 725 { 726 WRITE_UVLC( pcVPS->getProfileLayerSetRefMinus1( layerSet ), "profile_layer_set_ref_minus1[lsIdx]" ); 727 } 728 codePTL( pcVPS->getPTL( layerSet ), pcVPS->getVpsProfilePresentFlag( layerSet ), pcVPS->getMaxTLayers() - 1 ); 729 } 730 731 WRITE_UVLC( pcVPS->getNumOutputLayerSets(), "num_output_layer_sets" ); 732 733 for( Int layerSet = 0; layerSet < pcVPS->getNumOutputLayerSets(); layerSet++ ) 734 { 735 WRITE_UVLC( pcVPS->getOutputLayerSetIdx( layerSet ), "output_layer_set_idx[i]" ); 736 for( Int layer = 0; layer <= pcVPS->getMaxNuhLayerId(); layer++ ) 737 { 738 if( pcVPS->getLayerIdIncludedFlag( pcVPS->getOutputLayerSetIdx( layerSet ), layer ) == true ) 739 { 740 WRITE_FLAG( pcVPS->getOutputLayerFlag( layerSet, layer ) ? 1 : 0, "output_layer_flag" ); 756 WRITE_CODE( pcVPS->getLayerIdInNuh( i ), 6, "layer_id_in_nuh[i]"); 757 } 758 else 759 { 760 assert( pcVPS->getLayerIdInNuh( i ) == i ); 761 } 762 763 assert( pcVPS->getLayerIdInVps( pcVPS->getLayerIdInNuh( i ) ) == i ); 764 765 for( Int j = 0; j < pcVPS->getNumScalabilityTypes() ; j++ ) 766 { 767 if ( !pcVPS->getSplittingFlag() ) 768 { 769 WRITE_CODE( pcVPS->getDimensionId( i, j ), pcVPS->getDimensionIdLen( j ), "dimension_id[i][j]"); 770 } 771 else 772 { 773 assert( pcVPS->getDimensionId( i, j ) == pcVPS->inferDimensionId( i, j ) ); 741 774 } 742 775 } … … 750 783 } 751 784 } 785 786 for( Int i = 0; i < pcVPS->getMaxLayers() - 1; i++ ) 787 { 788 WRITE_CODE( pcVPS->getMaxTidIlRefPicPlus1( i ), 3, "max_tid_il_ref_pics_plus1[i]" ); 789 } 790 791 WRITE_CODE( pcVPS->getVpsNumberLayerSetsMinus1( ) , 10, "vps_number_layer_sets_minus1" ); 792 WRITE_CODE( pcVPS->getVpsNumProfileTierLevelMinus1( ), 6, "vps_num_profile_tier_level_minus1" ); 793 794 for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) 795 { 796 WRITE_FLAG( pcVPS->getVpsProfilePresentFlag( i ) ? 1 : 0, "vps_profile_present_flag[i]" ); 797 if( !pcVPS->getVpsProfilePresentFlag( i ) ) 798 { 799 WRITE_CODE( pcVPS->getProfileRefMinus1( i ), 6, "profile_ref_minus1[i]" ); 800 } 801 codePTL( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 ); 802 } 803 804 Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1; 805 806 WRITE_FLAG( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) ? 1 : 0, "more_output_layer_sets_than_default_flag" ); 807 808 if ( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) ) 809 { 810 WRITE_CODE( pcVPS->getNumAddOutputLayerSetsMinus1( ) , 10, "num_add_output_layer_sets_minus1" ); 811 numOutputLayerSets += ( pcVPS->getNumAddOutputLayerSetsMinus1( ) + 1 ); 812 } 813 814 if( numOutputLayerSets > 1) 815 { 816 WRITE_FLAG( pcVPS->getDefaultOneTargetOutputLayerFlag( ) ? 1 : 0, "default_one_target_output_layer_flag" ); 817 } 818 819 for( Int i = 1; i < numOutputLayerSets; i++ ) 820 { 821 if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) ) 822 { 823 WRITE_UVLC( pcVPS->getOutputLayerSetIdxMinus1( i ), "output_layer_set_idx_minus1[i]" ); 824 for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1 ; j++ ) 825 { 826 WRITE_FLAG( pcVPS->getOutputLayerFlag( i, j) ? 1 : 0, "output_layer_flag" ); 827 } 828 } 829 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) 830 { 831 WRITE_CODE( pcVPS->getProfileLevelTierIdx( i ), pcVPS->getProfileLevelTierIdxLen() ,"profile_level_tier_idx[ i ]" ); 832 } 833 } 834 835 WRITE_FLAG( pcVPS->getMaxOneActiveRefLayerFlag( ) ? 1 : 0, "max_one_active_ref_layer_flag" ); 836 WRITE_UVLC( pcVPS->getDirectDepTypeLenMinus2 ( ), "direct_dep_type_len_minus2"); 837 838 for( Int i = 1; i <= pcVPS->getMaxLayers() - 1; i++ ) 839 { 840 for( Int j = 0; j < i; j++ ) 841 { 842 if (pcVPS->getDirectDependencyFlag( i, j) ) 843 { 844 assert ( pcVPS->getDirectDependencyType( i, j ) != -1 ); 845 WRITE_CODE( pcVPS->getDirectDependencyType( i, j ),pcVPS->getDirectDepTypeLenMinus2( ) + 2, "direct_dependency_type[i][j]" ); 846 } 847 } 848 } 849 850 WRITE_FLAG ( 0, "vps_shvc_reserved_zero_flag" ); 851 752 852 #if H_3D_GEN 753 853 WRITE_FLAG( 1, "vps_extension2_flag" ); … … 811 911 Void TEncCavlc::codeSliceHeader ( TComSlice* pcSlice ) 812 912 { 913 #if H_MV 914 TComVPS* vps = pcSlice->getVPS(); 915 #endif 813 916 #if ENC_DEC_TRACE 814 917 xTraceSliceHeader (pcSlice); … … 853 956 if ( !pcSlice->getDependentSliceSegmentFlag() ) 854 957 { 958 #if H_MV 959 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > 0 ) 960 { 961 WRITE_FLAG( pcSlice->getDiscardableFlag( ) ? 1 : 0 , "discardable_flag" ); 962 } 963 964 for (Int i = 1; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++) 965 #else 855 966 for (Int i = 0; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++) 967 #endif 856 968 { 857 969 assert(!!"slice_reserved_undetermined_flag[]"); … … 1016 1128 } 1017 1129 } 1130 #if H_MV 1131 Int layerIdInVps = pcSlice->getLayerIdInVps(); 1132 if( pcSlice->getLayerId() > 0 && vps->getNumDirectRefLayers( layerIdInVps ) > 0 ) 1133 { 1134 WRITE_FLAG( pcSlice->getInterLayerPredEnabledFlag( ) ? 1 : 0 , "inter_layer_pred_enabled_flag" ); 1135 if( pcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerIdInVps ) > 1 ) 1136 { 1137 if( !vps->getMaxOneActiveRefLayerFlag()) 1138 { 1139 WRITE_CODE( pcSlice->getNumInterLayerRefPicsMinus1( ), pcSlice->getNumInterLayerRefPicsMinus1Len( ), "num_inter_layer_ref_pics_minus1" ); 1140 } 1141 for( Int i = 0; i < pcSlice->getNumActiveRefLayerPics(); i++ ) 1142 { 1143 WRITE_CODE( pcSlice->getInterLayerPredLayerIdc( i ), pcSlice->getInterLayerPredLayerIdcLen( ), "inter_layer_pred_layer_idc" ); 1144 } 1145 } 1146 } 1147 1148 if( vps->getNumSamplePredRefLayers( layerIdInVps ) > 0 && pcSlice->getNumActiveRefLayerPics() > 0 ) 1149 { 1150 WRITE_FLAG( pcSlice->getInterLayerSamplePredOnlyFlag( ) ? 1 : 0 , "inter_layer_sample_pred_only_flag" ); 1151 } 1152 1153 #endif 1018 1154 if(pcSlice->getSPS()->getUseSAO()) 1019 1155 { … … 1123 1259 if ( pcSlice->getEnableTMVPFlag() ) 1124 1260 { 1261 #if H_MV 1262 if( pcSlice->getLayerId() > 0 && pcSlice->getNumActiveMotionPredRefLayers() > 0 ) 1263 { 1264 WRITE_FLAG( pcSlice->getAltCollocatedIndicationFlag( ) ? 1 : 0 , "alt_collocated_indication_flag" ); 1265 } 1266 if( pcSlice->getAltCollocatedIndicationFlag() && pcSlice->getNumActiveMotionPredRefLayers() > 1 ) 1267 { 1268 WRITE_UVLC( pcSlice->getCollocatedRefLayerIdx( ), "collocated_ref_layer_idx" ); 1269 } 1270 else 1271 { 1272 #endif 1125 1273 if ( pcSlice->getSliceType() == B_SLICE ) 1126 1274 { … … 1135 1283 } 1136 1284 } 1285 #if H_MV 1286 } 1287 #endif 1137 1288 if ( (pcSlice->getPPS()->getUseWP() && pcSlice->getSliceType()==P_SLICE) || (pcSlice->getPPS()->getWPBiPred() && pcSlice->getSliceType()==B_SLICE) ) 1138 1289 { -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncCfg.h
r532 r534 74 74 Int m_refIdc[MAX_NUM_REF_PICS+1]; 75 75 #if H_MV 76 Int m_num InterViewRefPics;77 Int m_inter ViewRefs[MAX_NUM_REF_PICS];76 Int m_numActiveRefLayerPics; 77 Int m_interLayerPredLayerIdc [MAX_NUM_REF_PICS]; 78 78 Int m_interViewRefPosL[2][MAX_NUM_REF_PICS]; 79 Int m_collocatedRefLayerIdx; 79 80 #endif 80 81 GOPEntry() … … 93 94 , m_numRefIdc(0) 94 95 #if H_MV 95 , m_numInterViewRefPics(0) 96 , m_numActiveRefLayerPics(0) 97 , m_collocatedRefLayerIdx(-1) 96 98 #endif 97 99 { … … 100 102 ::memset( m_refIdc, 0, sizeof(m_refIdc) ); 101 103 #if H_MV 102 ::memset( m_inter ViewRefs, 0, sizeof(m_interViewRefs) );104 ::memset( m_interLayerPredLayerIdc, 0, sizeof(m_interLayerPredLayerIdc) ); 103 105 ::memset( m_interViewRefPosL[0], -1, sizeof(m_interViewRefPosL[0]) ); 104 106 ::memset( m_interViewRefPosL[1], -1, sizeof(m_interViewRefPosL[1]) ); … … 429 431 , m_viewIndex(-1) 430 432 , m_isDepth(false) 433 , m_bUseVSO(false) 431 434 #endif 432 435 #endif -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncGOP.cpp
r532 r534 502 502 pcSlice->setSliceIdx(0); 503 503 #if H_MV 504 pcSlice->setRefPicSetInterLayer ( &m_refPicSetInterLayer ); 504 505 pcPic ->setLayerId ( getLayerId() ); 505 506 pcPic ->setViewId ( getViewId() ); … … 669 670 refPicListModification->setRefPicListModificationFlagL1(0); 670 671 #if H_MV 672 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > 0 ) 673 { 674 pcSlice->setDiscardableFlag ( false ); 675 } 676 677 TComVPS* vps = pcSlice->getVPS(); 678 Int layerIdInVps = vps ->getLayerIdInVps( getLayerId()); 679 Int numDirectRefLayers = vps ->getNumDirectRefLayers( layerIdInVps ); 680 GOPEntry gopEntry = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid ); 681 682 if ( getLayerId() > 0 && numDirectRefLayers > 0 ) 683 { 684 pcSlice->setInterLayerPredEnabledFlag ( gopEntry.m_numActiveRefLayerPics > 0 ); 685 if ( pcSlice->getInterLayerPredEnabledFlag() && numDirectRefLayers > 1 ) 686 { 687 if ( !vps->getMaxOneActiveRefLayerFlag() ) 688 { 689 pcSlice->setNumInterLayerRefPicsMinus1( gopEntry.m_numActiveRefLayerPics - 1 ); 690 } 691 for (Int i = 0; i < gopEntry.m_numActiveRefLayerPics; i++ ) 692 { 693 pcSlice->setInterLayerPredLayerIdc( i, gopEntry.m_interLayerPredLayerIdc[ i ] ); 694 } 695 } 696 } 697 assert( pcSlice->getNumActiveRefLayerPics() == gopEntry.m_numActiveRefLayerPics ); 698 699 if ( vps->getNumSamplePredRefLayers( layerIdInVps ) > 0 && pcSlice->getNumActiveRefLayerPics() > 0) 700 { 701 pcSlice->setInterLayerSamplePredOnlyFlag( gopEntry.m_numRefPics == 0 ); 702 } 703 671 704 pcSlice->createAndApplyIvReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer ); 672 pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid ).m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer.size() ) ) ); 673 pcSlice->setNumRefIdx(REF_PIC_LIST_1,min(m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid ).m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer.size() ) ) ); 674 xSetRefPicListModificationsMvc( pcSlice, pocCurr, iGOPid ); 705 pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(gopEntry.m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer.size() ) ) ); 706 pcSlice->setNumRefIdx(REF_PIC_LIST_1,min(gopEntry.m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer.size() ) ) ); 707 708 xSetRefPicListModificationsMv( pcSlice, iGOPid ); 709 710 pcSlice->setActiveMotionPredRefLayers( ); 711 712 if ( getLayerId() > 0 && pcSlice->getNumActiveMotionPredRefLayers() > 0 && pcSlice->getEnableTMVPFlag() && 713 ( pcSlice->getSliceType() == B_SLICE || pcSlice->getSliceType() == P_SLICE )) 714 { 715 pcSlice->setAltCollocatedIndicationFlag( gopEntry.m_collocatedRefLayerIdx >= 0 ); 716 if ( pcSlice->getNumActiveRefLayerPics() && pcSlice->getNumActiveMotionPredRefLayers() > 0 ) 717 { 718 pcSlice->setCollocatedRefLayerIdx( gopEntry.m_collocatedRefLayerIdx ); 719 } 720 } 721 675 722 #else 676 723 pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive,pcSlice->getRPS()->getNumberOfPictures())); … … 827 874 pcSlice->setEnableTMVPFlag(0); 828 875 } 829 830 876 #if H_MV 831 877 if( pcSlice->getIdrPicFlag() ) … … 2120 2166 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer ); 2121 2167 std::vector<Int> temp; 2168 TComSlice::markCurrPic( pcPic ); 2122 2169 TComSlice::markIvRefPicsAsUnused ( m_ivPicLists, temp, pcPic->getSlice(0)->getVPS(), m_layerId, pcPic->getPOC() ); 2123 2170 #endif … … 2950 2997 #endif 2951 2998 #if H_MV 2952 Void TEncGOP::xSetRefPicListModificationsMv c( TComSlice* pcSlice, UInt uiPOCCurr, UInt iGOPid )2999 Void TEncGOP::xSetRefPicListModificationsMv( TComSlice* pcSlice, UInt iGOPid ) 2953 3000 { 2954 TComVPS* vps = pcSlice->getVPS();2955 3001 Int layer = pcSlice->getLayerIdInVps( ); 2956 3002 2957 if( pcSlice->getSliceType() == I_SLICE || !(pcSlice->getPPS()->getListsModificationPresentFlag()) || vps->getNumDirectRefLayers( layer) == 0 )3003 if( pcSlice->getSliceType() == I_SLICE || !(pcSlice->getPPS()->getListsModificationPresentFlag()) || pcSlice->getNumActiveRefLayerPics() == 0 ) 2958 3004 { 2959 3005 return; … … 2962 3008 // analyze inter-view modifications 2963 3009 GOPEntry ge = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && ( layer > 0) ) ? MAX_GOP : iGOPid ); 2964 2965 TComRefPicListModification* refPicListModification = pcSlice->getRefPicListModification(); 3010 assert( ge.m_numActiveRefLayerPics == pcSlice->getNumActiveRefLayerPics() ); 2966 3011 2967 3012 Int maxRefListSize = pcSlice->getNumRpsCurrTempList(); 2968 Int numTemporalRefs = maxRefListSize - vps->getNumDirectRefLayers( layer ); 2969 3013 Int numTemporalRefs = maxRefListSize - pcSlice->getNumActiveRefLayerPics(); 2970 3014 2971 3015 for (Int li = 0; li < 2; li ++) // Loop over lists L0 and L1 2972 3016 { 2973 Int numModifications = 0; 2974 2975 for( Int k = 0; k < ge.m_numInterViewRefPics; k++ ) 2976 { 2977 numModifications += ( ge.m_interViewRefPosL[li][k] >= 0 ) ? 1 : 0; 2978 } 2979 2980 // set inter-view modifications 3017 // set inter-view modifications 3018 Int tempList[16]; 3019 for( Int k = 0; k < 16; k++ ) 3020 { 3021 tempList[ k ] = -1; 3022 } 3023 2981 3024 Bool isModified = false; 2982 Int tempList[16]; 2983 for( Int k = 0; k < 16; k++ ) { tempList[k] = -1; } 2984 2985 if( (maxRefListSize > 1) && (numModifications > 0) ) 2986 { 2987 for( Int k = 0; k < ge.m_numInterViewRefPics; k++ ) 2988 { 2989 if( ge.m_interViewRefPosL[li][k] >= 0 ) 2990 { 2991 Int orgIdx = numTemporalRefs; 3025 if ( maxRefListSize > 1 ) 3026 { 3027 for( Int k = 0, orgIdx = numTemporalRefs; k < ge.m_numActiveRefLayerPics; k++, orgIdx++ ) 3028 { 2992 3029 Int targetIdx = ge.m_interViewRefPosL[ li ][ k ]; 2993 for( Int idx = 0; idx < vps->getNumDirectRefLayers( layer ); idx++ ) 2994 { 2995 Int refLayer = vps->getLayerIdInVps( vps->getRefLayerId( layer, idx ) ); 2996 if( ( layer + ge.m_interViewRefs[ k ]) == refLayer ) 3030 3031 isModified = ( targetIdx != orgIdx ) && ( targetIdx >= 0 ); 3032 if ( isModified ) 2997 3033 { 3034 assert( tempList[ targetIdx ] == -1 ); // Assert when two inter layer reference pictures are sorted to the same position 2998 3035 tempList[ targetIdx ] = orgIdx; 2999 isModified = ( targetIdx != orgIdx ); 3000 } 3001 orgIdx++; 3002 } 3003 } 3004 } 3005 } 3006 3036 } 3037 } 3038 } 3039 3040 TComRefPicListModification* refPicListModification = pcSlice->getRefPicListModification(); 3007 3041 refPicListModification->setRefPicListModificationFlagL( li, isModified ); 3008 3042 -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncGOP.h
r479 r534 221 221 #endif 222 222 #if H_MV 223 Void xSetRefPicListModificationsMv c( TComSlice* pcSlice, UInt uiPOCCurr, UInt iGOPid );223 Void xSetRefPicListModificationsMv( TComSlice* pcSlice, UInt iGOPid ); 224 224 #endif 225 225 #if L0386_DB_METRIC -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncTop.cpp
r532 r534 525 525 #if H_MV 526 526 m_cSPS.setSPSId( getLayerIdInVps() ); 527 m_cSPS.setLayerId( getLayerId() ); 527 528 #endif 528 529 ProfileTierLevel& profileTierLevel = *m_cSPS.getPTL()->getGeneralPTL(); … … 746 747 m_cPPS.setWPBiPred( m_useWeightedBiPred ); 747 748 m_cPPS.setOutputFlagPresentFlag( false ); 749 #if H_MV 750 m_cPPS.setNumExtraSliceHeaderBits( 1 ); 751 #endif 748 752 m_cPPS.setSignHideFlag(getSignHideFlag()); 749 753 #if L0386_DB_METRIC
Note: See TracChangeset for help on using the changeset viewer.