Changeset 367 in 3DVCSoftware for branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
- Timestamp:
- 3 May 2013, 17:09:57 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r362 r367 680 680 if (uiCode) 681 681 { 682 #if H_MV683 READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" ); pcSPS->setInterViewMvVertConstraintFlag(uiCode == 1 ? true : false);684 #else685 682 while ( xMoreRbspData() ) 686 683 { 687 684 READ_FLAG( uiCode, "sps_extension_data_flag"); 688 685 } 689 #endif690 686 } 691 687 } … … 697 693 READ_CODE( 4, uiCode, "vps_video_parameter_set_id" ); pcVPS->setVPSId( uiCode ); 698 694 READ_CODE( 2, uiCode, "vps_reserved_three_2bits" ); assert(uiCode == 3); 699 #if H_MV700 READ_CODE( 6, uiCode, "vps_max_layers_minus1" ); pcVPS->setMaxLayers( uiCode + 1 );701 #else702 695 READ_CODE( 6, uiCode, "vps_reserved_zero_6bits" ); assert(uiCode == 0); 703 #endif704 696 READ_CODE( 3, uiCode, "vps_max_sub_layers_minus1" ); pcVPS->setMaxTLayers( uiCode + 1 ); 705 697 READ_FLAG( uiCode, "vps_temporal_id_nesting_flag" ); pcVPS->setTemporalNestingFlag( uiCode ? true:false ); 706 698 assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag()); 707 #if H_MV708 READ_CODE( 16, uiCode, "vps_extension_offset" );709 #else710 699 READ_CODE( 16, uiCode, "vps_reserved_ffff_16bits" ); assert(uiCode == 0xffff); 711 #endif712 700 parsePTL ( pcVPS->getPTL(), true, pcVPS->getMaxTLayers()-1); 713 701 #if SIGNAL_BITRATE_PICRATE_IN_VPS … … 739 727 740 728 assert( pcVPS->getNumHrdParameters() < MAX_VPS_OP_SETS_PLUS1 ); 741 #if H_MV742 assert( pcVPS->getMaxNuhLayerId() < MAX_VPS_NUH_LAYER_ID_PLUS1 );743 READ_CODE( 6, uiCode, "vps_max_nuh_layer_id" ); pcVPS->setMaxNuhLayerId( uiCode );744 #else745 729 assert( pcVPS->getMaxNuhReservedZeroLayerId() < MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1 ); 746 730 READ_CODE( 6, uiCode, "vps_max_nuh_reserved_zero_layer_id" ); pcVPS->setMaxNuhReservedZeroLayerId( uiCode ); 747 #endif748 731 READ_UVLC( uiCode, "vps_max_op_sets_minus1" ); pcVPS->setMaxOpSets( uiCode + 1 ); 749 732 for( UInt opsIdx = 1; opsIdx <= ( pcVPS->getMaxOpSets() - 1 ); opsIdx ++ ) 750 733 { 751 734 // Operation point set 752 #if H_MV753 for( UInt i = 0; i <= pcVPS->getMaxNuhLayerId(); i ++ )754 #else755 735 for( UInt i = 0; i <= pcVPS->getMaxNuhReservedZeroLayerId(); i ++ ) 756 #endif757 736 { 758 737 READ_FLAG( uiCode, "layer_id_included_flag[opsIdx][i]" ); pcVPS->setLayerIdIncludedFlag( uiCode == 1 ? true : false, opsIdx, i ); … … 793 772 if (uiCode) 794 773 { 795 #if H_MV796 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_flag816 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 LayerIdInVps819 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 else829 {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 #else896 774 while ( xMoreRbspData() ) 897 775 { 898 776 READ_FLAG( uiCode, "vps_extension_data_flag"); 899 777 } 900 #endif901 778 } 902 779 … … 914 791 TComPPS* pps = NULL; 915 792 TComSPS* sps = NULL; 916 #if H_MV917 TComVPS* vps = NULL;918 #endif919 793 920 794 UInt firstSliceSegmentInPic; … … 931 805 //!KS: need to add error handling code here, if SPS is not available 932 806 assert(sps!=0); 933 #if H_MV934 vps = parameterSetManager->getPrefetchedVPS(sps->getVPSId());935 assert(vps!=0);936 rpcSlice->setVPS(vps);937 #endif938 807 rpcSlice->setSPS(sps); 939 808 rpcSlice->setPPS(pps); … … 1523 1392 for (Int i = 0; i < maxNumSubLayersMinus1; i++) 1524 1393 { 1525 #if !H_MV1526 1394 if(profilePresentFlag) 1527 1395 { 1528 #endif1529 1396 READ_FLAG( uiCode, "sub_layer_profile_present_flag[i]" ); rpcPTL->setSubLayerProfilePresentFlag(i, uiCode); 1530 #if H_MV 1531 rpcPTL->setSubLayerProfilePresentFlag( i, profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) ); 1532 #else 1533 } 1534 #endif 1397 } 1535 1398 READ_FLAG( uiCode, "sub_layer_level_present_flag[i]" ); rpcPTL->setSubLayerLevelPresentFlag (i, uiCode); 1536 1399 }
Note: See TracChangeset for help on using the changeset viewer.