Changeset 528 in SHVCSoftware for branches/SHM-4.1-dev/source/Lib/TLibEncoder
- Timestamp:
- 24 Dec 2013, 18:24:19 (12 years ago)
- Location:
- branches/SHM-4.1-dev/source/Lib/TLibEncoder
- Files:
-
- 3 edited
-
TEncCavlc.cpp (modified) (4 diffs)
-
TEncGOP.cpp (modified) (4 diffs)
-
TEncTop.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r525 r528 220 220 } 221 221 } 222 223 #if SCALINGLIST_INFERRING 224 if( pcPPS->getLayerId() > 0 ) 225 { 226 WRITE_FLAG( pcPPS->getInferScalingListFlag() ? 1 : 0, "pps_infer_scaling_list_flag" ); 227 } 228 229 if( pcPPS->getInferScalingListFlag() ) 230 { 231 // The value of pps_scaling_list_ref_layer_id shall be in the range of 0 to 62, inclusive 232 assert( pcPPS->getScalingListRefLayerId() <= 62 ); 233 234 WRITE_UVLC( pcPPS->getScalingListRefLayerId(), "pps_scaling_list_ref_layer_id" ); 235 } 236 else 237 { 238 #endif 239 222 240 WRITE_FLAG( pcPPS->getScalingListPresentFlag() ? 1 : 0, "pps_scaling_list_data_present_flag" ); 223 241 … … 275 293 codeScalingList( m_pcSlice->getScalingList() ); 276 294 #endif 277 278 } 295 } 296 297 #if SCALINGLIST_INFERRING 298 } 299 #endif 300 279 301 WRITE_FLAG( pcPPS->getListsModificationPresentFlag(), "lists_modification_present_flag"); 280 302 WRITE_UVLC( pcPPS->getLog2ParallelMergeLevelMinus2(), "log2_parallel_merge_level_minus2"); … … 553 575 if(pcSPS->getScalingListFlag()) 554 576 { 577 #if SCALINGLIST_INFERRING 578 if( pcSPS->getLayerId() > 0 ) 579 { 580 WRITE_FLAG( pcSPS->getInferScalingListFlag() ? 1 : 0, "sps_infer_scaling_list_flag" ); 581 } 582 583 if( pcSPS->getInferScalingListFlag() ) 584 { 585 // The value of pps_scaling_list_ref_layer_id shall be in the range of 0 to 62, inclusive 586 assert( pcSPS->getScalingListRefLayerId() <= 62 ); 587 588 WRITE_UVLC( pcSPS->getScalingListRefLayerId(), "sps_scaling_list_ref_layer_id" ); 589 } 590 else 591 { 592 #endif 555 593 WRITE_FLAG( pcSPS->getScalingListPresentFlag() ? 1 : 0, "sps_scaling_list_data_present_flag" ); 556 594 if(pcSPS->getScalingListPresentFlag()) … … 606 644 607 645 } 646 #if SCALINGLIST_INFERRING 647 } 648 #endif 608 649 } 609 650 WRITE_FLAG( pcSPS->getUseAMP() ? 1 : 0, "amp_enabled_flag" ); -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r524 r528 683 683 else if(m_pcEncTop->getUseScalingListId() == SCALING_LIST_DEFAULT) 684 684 { 685 #if SCALINGLIST_INFERRING 686 // inferring of the scaling list can be moved to the config file 687 UInt refLayerId = 0; 688 if( m_layerId > 0 && !m_pcEncTop->getVPS()->getAvcBaseLayerFlag() && m_pcEncTop->getVPS()->getRecursiveRefLayerFlag( m_layerId, refLayerId ) ) 689 { 690 m_pcEncTop->getSPS()->setInferScalingListFlag( true ); 691 m_pcEncTop->getSPS()->setScalingListRefLayerId( refLayerId ); 692 m_pcEncTop->getSPS()->setScalingListPresentFlag( false ); 693 m_pcEncTop->getPPS()->setInferScalingListFlag( false ); 694 m_pcEncTop->getPPS()->setScalingListPresentFlag( false ); 695 696 // infer the scaling list from the reference layer 697 pcSlice->setScalingList ( m_ppcTEncTop[refLayerId]->getScalingList() ); 698 } 699 else 700 { 701 #endif 685 702 #if IL_SL_SIGNALLING_N0371 686 703 pcSlice->getScalingList()->setLayerId( m_layerId ); … … 695 712 m_pcEncTop->getSPS()->setScalingListPresentFlag(false); 696 713 m_pcEncTop->getPPS()->setScalingListPresentFlag(false); 714 715 #if SCALINGLIST_INFERRING 716 } 717 #endif 718 697 719 m_pcEncTop->getTrQuant()->setScalingList(pcSlice->getScalingList()); 698 720 m_pcEncTop->getTrQuant()->setUseScalingList(true); … … 704 726 #endif 705 727 728 #if SCALINGLIST_INFERRING 729 // inferring of the scaling list can be moved to the config file 730 UInt refLayerId = 0; 731 if( m_layerId > 0 && !m_pcEncTop->getVPS()->getAvcBaseLayerFlag() && m_pcEncTop->getVPS()->getRecursiveRefLayerFlag( m_layerId, refLayerId ) ) 732 { 733 m_pcEncTop->getSPS()->setInferScalingListFlag( true ); 734 m_pcEncTop->getSPS()->setScalingListRefLayerId( refLayerId ); 735 m_pcEncTop->getSPS()->setScalingListPresentFlag( false ); 736 m_pcEncTop->getPPS()->setInferScalingListFlag( false ); 737 m_pcEncTop->getPPS()->setScalingListPresentFlag( false ); 738 739 // infer the scaling list from the reference layer 740 pcSlice->setScalingList ( m_ppcTEncTop[refLayerId]->getScalingList() ); 741 } 742 else 743 { 744 #endif 745 706 746 if(pcSlice->getScalingList()->xParseScalingList(m_pcCfg->getScalingListFile())) 707 747 { … … 735 775 m_pcEncTop->getPPS()->setScalingListRefLayerId( 0 ); 736 776 } 777 #endif 778 779 #if SCALINGLIST_INFERRING 780 } 737 781 #endif 738 782 -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncTop.cpp
r507 r528 1074 1074 Void TEncTop::xInitPPS() 1075 1075 { 1076 #if IL_SL_SIGNALLING_N03711077 m_cPPS.setLayerId( m_layerId);1076 #if SCALINGLIST_INFERRING || IL_SL_SIGNALLING_N0371 1077 m_cPPS.setLayerId( m_layerId ); 1078 1078 #endif 1079 1079
Note: See TracChangeset for help on using the changeset viewer.