Changeset 1121 in SHVCSoftware
- Timestamp:
- 7 Jul 2015, 02:05:04 (9 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1118 r1121 155 155 vps->setVpsNumRepFormats ( maxRepFormatIdx + 1 ); 156 156 157 #if Q0195_REP_FORMAT_CLEANUP158 157 // When not present, the value of rep_format_idx_present_flag is inferred to be equal to 0 159 158 vps->setRepFormatIdxPresentFlag ( vps->getVpsNumRepFormats() > 1 ? true : false ); 160 #else161 vps->setRepFormatIdxPresentFlag ( true );162 #endif163 159 164 160 for(UInt idx=0; idx < vps->getVpsNumRepFormats(); idx++) -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r1120 r1121 1993 1993 , m_picRatePresentVpsFlag (false) 1994 1994 #if REPN_FORMAT_IN_VPS 1995 #if Q0195_REP_FORMAT_CLEANUP1996 1995 , m_repFormatIdxPresentFlag (false) 1997 #else1998 , m_repFormatIdxPresentFlag (true)1999 #endif2000 1996 , m_vpsNumRepFormats (1) 2001 1997 #endif -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1120 r1121 188 188 #define O0096_DEFAULT_DEPENDENCY_TYPE 1 ///< JCTVC-O0096: specify default dependency type for all direct reference layers 189 189 190 #define Q0195_REP_FORMAT_CLEANUP 1 ///< JCTVC-Q0195: restructureing of rep_format() signaling191 192 190 #define RESAMPLING_CONSTRAINT_BUG_FIX 1 193 191 #define O0098_SCALED_REF_LAYER_ID 1 ///< JCTVC-O0098: signal scaled reference id -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1119 r1121 1639 1639 { 1640 1640 format = pcSlice->getVPS()->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : pcSlice->getVPS()->getVpsRepFormatIdx( pcSlice->getVPS()->getLayerIdxInVps(sps->getLayerId()) ) )->getChromaFormatVpsIdc(); 1641 #if Q0195_REP_FORMAT_CLEANUP 1642 assert( (sps->getUpdateRepFormatFlag()==false && pcSlice->getVPS()->getVpsNumRepFormats()==1) || pcSlice->getVPS()->getVpsNumRepFormats() > 1 ); //conformance check1643 #endif 1641 1642 // conformance check 1643 assert( (sps->getUpdateRepFormatFlag()==false && pcSlice->getVPS()->getVpsNumRepFormats()==1) || pcSlice->getVPS()->getVpsNumRepFormats() > 1 ); 1644 1644 } 1645 1645 if (format != CHROMA_400) … … 3223 3223 3224 3224 #if REPN_FORMAT_IN_VPS 3225 #if Q0195_REP_FORMAT_CLEANUP3226 3225 READ_UVLC( uiCode, "vps_num_rep_formats_minus1" ); 3227 3226 vps->setVpsNumRepFormats( uiCode + 1 ); … … 3271 3270 } 3272 3271 } 3273 #else 3274 READ_FLAG( uiCode, "rep_format_idx_present_flag"); 3275 vps->setRepFormatIdxPresentFlag( uiCode ? true : false ); 3276 3277 if( vps->getRepFormatIdxPresentFlag() ) 3278 { 3279 #if !VPS_EXTN_UEV_CODING 3280 READ_CODE( 8, uiCode, "vps_num_rep_formats_minus1" ); 3281 #else 3282 READ_UVLC( uiCode, "vps_num_rep_formats_minus1" ); 3283 #endif 3284 3285 vps->setVpsNumRepFormats( uiCode + 1 ); 3286 } 3287 else 3288 { 3289 // default assignment 3290 assert (vps->getMaxLayers() <= 16); // If max_layers_is more than 15, num_rep_formats has to be signaled 3291 vps->setVpsNumRepFormats( vps->getMaxLayers() ); 3292 } 3293 3294 // The value of vps_num_rep_formats_minus1 shall be in the range of 0 to 255, inclusive. 3295 assert( vps->getVpsNumRepFormats() > 0 && vps->getVpsNumRepFormats() <= 256 ); 3296 3297 for(i = 0; i < vps->getVpsNumRepFormats(); i++) 3298 { 3299 // Read rep_format_structures 3300 parseRepFormat( vps->getVpsRepFormat(i), i > 0 ? vps->getVpsRepFormat(i-1) : 0 ); 3301 } 3302 3303 // Default assignment for layer 0 3304 vps->setVpsRepFormatIdx( 0, 0 ); 3305 if( vps->getRepFormatIdxPresentFlag() ) 3306 { 3307 for(i = 1; i < vps->getMaxLayers(); i++) 3308 { 3309 if( vps->getVpsNumRepFormats() > 1 ) 3310 { 3311 #if !VPS_EXTN_UEV_CODING 3312 READ_CODE( 8, uiCode, "vps_rep_format_idx[i]" ); 3313 #else 3314 Int numBits = 1; 3315 while ((1 << numBits) < (vps->getVpsNumRepFormats())) 3316 { 3317 numBits++; 3318 } 3319 READ_CODE( numBits, uiCode, "vps_rep_format_idx[i]" ); 3320 #endif 3321 3322 vps->setVpsRepFormatIdx( i, uiCode ); 3323 } 3324 else 3325 { 3326 // default assignment - only one rep_format() structure 3327 vps->setVpsRepFormatIdx( i, 0 ); 3328 } 3329 } 3330 } 3331 else 3332 { 3333 // default assignment - each layer assigned each rep_format() structure in the order signaled 3334 for(i = 1; i < vps->getMaxLayers(); i++) 3335 { 3336 vps->setVpsRepFormatIdx( i, i ); 3337 } 3338 } 3339 #endif 3340 #endif 3272 #endif 3273 3341 3274 READ_FLAG(uiCode, "max_one_active_ref_layer_flag" ); 3342 3275 vps->setMaxOneActiveRefLayerFlag(uiCode); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r1119 r1121 2279 2279 2280 2280 #if REPN_FORMAT_IN_VPS 2281 #if Q0195_REP_FORMAT_CLEANUP2282 2281 // The value of vps_num_rep_formats_minus1 shall be in the range of 0 to 255, inclusive. 2283 2282 assert( vps->getVpsNumRepFormats() > 0 && vps->getVpsNumRepFormats() <= 256 ); … … 2313 2312 } 2314 2313 } 2315 #else 2316 WRITE_FLAG( vps->getRepFormatIdxPresentFlag(), "rep_format_idx_present_flag"); 2317 2318 if( vps->getRepFormatIdxPresentFlag() ) 2319 { 2320 // The value of vps_num_rep_formats_minus1 shall be in the range of 0 to 255, inclusive. 2321 assert( vps->getVpsNumRepFormats() > 0 && vps->getVpsNumRepFormats() <= 256 ); 2322 2323 #if !VPS_EXTN_UEV_CODING 2324 WRITE_CODE( vps->getVpsNumRepFormats() - 1, 8, "vps_num_rep_formats_minus1" ); 2325 #else 2326 WRITE_UVLC( vps->getVpsNumRepFormats() - 1, "vps_num_rep_formats_minus1" ); 2327 #endif 2328 2329 } 2330 for(i = 0; i < vps->getVpsNumRepFormats(); i++) 2331 { 2332 // Read rep_format_structures 2333 codeRepFormat( vps->getVpsRepFormat(i) ); 2334 } 2335 2336 if( vps->getRepFormatIdxPresentFlag() ) 2337 { 2338 for(i = 1; i < vps->getMaxLayers(); i++) 2339 { 2340 if( vps->getVpsNumRepFormats() > 1 ) 2341 { 2342 #if !VPS_EXTN_UEV_CODING 2343 WRITE_CODE( vps->getVpsRepFormatIdx(i), 8, "vps_rep_format_idx[i]" ); 2344 #else 2345 Int numBits = 1; 2346 while ((1 << numBits) < (vps->getVpsNumRepFormats())) 2347 { 2348 numBits++; 2349 } 2350 WRITE_CODE( vps->getVpsRepFormatIdx(i), numBits, "vps_rep_format_idx[i]" ); 2351 #endif 2352 2353 } 2354 } 2355 } 2356 #endif 2357 #endif //REPN_FORMAT_IN_VPS 2314 #endif 2358 2315 2359 2316 WRITE_FLAG(vps->getMaxOneActiveRefLayerFlag(), "max_one_active_ref_layer_flag");
Note: See TracChangeset for help on using the changeset viewer.