Changeset 663 in SHVCSoftware for branches/SHM-6-dev
- Timestamp:
- 10 Apr 2014, 02:39:09 (11 years ago)
- Location:
- branches/SHM-6-dev/source
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-6-dev/source/App/TAppEncoder/TAppEncTop.cpp
r658 r663 91 91 } 92 92 93 #if REPN_FORMAT_IN_VPS 94 vps->setRepFormatIdxPresentFlag( true ); // Could be disabled to optimize in some cases. 93 #if REPN_FORMAT_IN_VPS 95 94 Int maxRepFormatIdx = -1; 96 95 Int formatIdx = -1; … … 125 124 126 125 assert( m_acLayerCfg[layer].getRepFormatIdx() != -1 && "RepFormatIdx not assigned for a layer" ); 126 127 127 vps->setVpsRepFormatIdx( layer, m_acLayerCfg[layer].getRepFormatIdx() ); 128 128 129 maxRepFormatIdx = std::max( m_acLayerCfg[layer].getRepFormatIdx(), maxRepFormatIdx ); 129 130 } 131 130 132 assert( vps->getVpsRepFormatIdx( 0 ) == 0 ); // Base layer should point to the first one. 133 131 134 Int* mapIdxToLayer = new Int[maxRepFormatIdx + 1]; 135 132 136 // Check that all the indices from 0 to maxRepFormatIdx are used in the VPS 133 137 for(Int i = 0; i <= maxRepFormatIdx; i++) … … 145 149 assert( layer != m_numLayers ); // One of the VPS Rep format indices not set 146 150 } 151 147 152 vps->setVpsNumRepFormats( maxRepFormatIdx + 1 ); 153 154 #if Q0195_REP_FORMAT_CLEANUP 155 // When not present, the value of rep_format_idx_present_flag is inferred to be equal to 0 156 vps->setRepFormatIdxPresentFlag( vps->getVpsNumRepFormats() > 1 ? true : false ); 157 #else 158 vps->setRepFormatIdxPresentFlag( true ); 159 #endif 160 148 161 for(UInt idx=0; idx < vps->getVpsNumRepFormats(); idx++) 149 162 { -
branches/SHM-6-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r662 r663 1438 1438 READ_UVLC( uiCode, "vps_num_rep_formats_minus1" ); 1439 1439 vps->setVpsNumRepFormats( uiCode + 1 ); 1440 1441 // The value of vps_num_rep_formats_minus1 shall be in the range of 0 to 255, inclusive. 1442 assert( vps->getVpsNumRepFormats() > 0 && vps->getVpsNumRepFormats() <= 256 ); 1443 1440 1444 for(i = 0; i < vps->getVpsNumRepFormats(); i++) 1441 1445 { … … 1454 1458 else 1455 1459 { 1460 // When not present, the value of rep_format_idx_present_flag is inferred to be equal to 0 1456 1461 vps->setRepFormatIdxPresentFlag( false ); 1457 1462 } 1463 1458 1464 if( vps->getRepFormatIdxPresentFlag() ) 1459 1465 { -
branches/SHM-6-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r662 r663 1072 1072 1073 1073 #if REPN_FORMAT_IN_VPS 1074 #if Q0195_REP_FORMAT_CLEANUP 1074 #if Q0195_REP_FORMAT_CLEANUP 1075 // The value of vps_num_rep_formats_minus1 shall be in the range of 0 to 255, inclusive. 1076 assert( vps->getVpsNumRepFormats() > 0 && vps->getVpsNumRepFormats() <= 256 ); 1077 1075 1078 WRITE_UVLC( vps->getVpsNumRepFormats() - 1, "vps_num_rep_formats_minus1" ); 1079 1076 1080 for(i = 0; i < vps->getVpsNumRepFormats(); i++) 1077 1081 { … … 1080 1084 } 1081 1085 1082 if ( vps->getVpsNumRepFormats() > 1 ) 1086 if( vps->getVpsNumRepFormats() > 1 ) 1087 { 1083 1088 WRITE_FLAG( vps->getRepFormatIdxPresentFlag(), "rep_format_idx_present_flag"); 1089 } 1090 else 1091 { 1092 // When not present, the value of rep_format_idx_present_flag is inferred to be equal to 0 1093 assert( !vps->getRepFormatIdxPresentFlag() ); 1094 } 1084 1095 1085 1096 if( vps->getRepFormatIdxPresentFlag() )
Note: See TracChangeset for help on using the changeset viewer.