Changeset 662 in SHVCSoftware for branches/SHM-6-dev
- Timestamp:
- 10 Apr 2014, 02:02:07 (11 years ago)
- Location:
- branches/SHM-6-dev/source/Lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.cpp
r657 r662 2183 2183 #endif 2184 2184 #if REPN_FORMAT_IN_VPS 2185 #if Q0195_REP_FORMAT_CLEANUP 2186 , m_repFormatIdxPresentFlag (false) 2187 #else 2185 2188 , m_repFormatIdxPresentFlag (true) 2189 #endif 2186 2190 , m_vpsNumRepFormats (1) 2187 2191 #endif -
branches/SHM-6-dev/source/Lib/TLibCommon/TypeDef.h
r652 r662 225 225 #define O0096_REP_FORMAT_INDEX 1 ///< JCTVC-O0096: identify SPS rep_format() with an index into the lists of formats in VPS extension. 226 226 #define O0096_DEFAULT_DEPENDENCY_TYPE 1 ///< JCTVC-O0096: specify default dependency type for all direct reference layers 227 228 #define Q0195_REP_FORMAT_CLEANUP 1 ///< JCTVC-Q0195: restructureing of rep_format() signaling 229 #define REP_FORMAT_FIX 1 ///< update_rep_format_flag should be inferred to be equal to 0 227 230 228 231 #define RESAMPLING_CONSTRAINT_BUG_FIX 1 -
branches/SHM-6-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r660 r662 599 599 else 600 600 { 601 #if REP_FORMAT_FIX 602 pcSPS->setUpdateRepFormatFlag( false ); 603 #else 601 604 pcSPS->setUpdateRepFormatFlag( true ); 605 #endif 602 606 } 603 607 #if O0096_REP_FORMAT_INDEX … … 1431 1435 1432 1436 #if REPN_FORMAT_IN_VPS 1437 #if Q0195_REP_FORMAT_CLEANUP 1438 READ_UVLC( uiCode, "vps_num_rep_formats_minus1" ); 1439 vps->setVpsNumRepFormats( uiCode + 1 ); 1440 for(i = 0; i < vps->getVpsNumRepFormats(); i++) 1441 { 1442 // Read rep_format_structures 1443 parseRepFormat( vps->getVpsRepFormat(i) ); 1444 } 1445 1446 // Default assignment for layer 0 1447 vps->setVpsRepFormatIdx( 0, 0 ); 1448 1449 if( vps->getVpsNumRepFormats() > 1 ) 1450 { 1451 READ_FLAG( uiCode, "rep_format_idx_present_flag"); 1452 vps->setRepFormatIdxPresentFlag( uiCode ? true : false ); 1453 } 1454 else 1455 { 1456 vps->setRepFormatIdxPresentFlag( false ); 1457 } 1458 if( vps->getRepFormatIdxPresentFlag() ) 1459 { 1460 for(i = 1; i < vps->getMaxLayers(); i++) 1461 { 1462 Int numBits = 1; 1463 while ((1 << numBits) < (vps->getVpsNumRepFormats())) 1464 { 1465 numBits++; 1466 } 1467 READ_CODE( numBits, uiCode, "vps_rep_format_idx[i]" ); 1468 vps->setVpsRepFormatIdx( i, uiCode ); 1469 } 1470 } 1471 else 1472 { 1473 // default assignment - each layer assigned each rep_format() structure in the order signaled 1474 for(i = 1; i < vps->getMaxLayers(); i++) 1475 { 1476 vps->setVpsRepFormatIdx( i, min( (Int)i, vps->getVpsNumRepFormats()-1 ) ); 1477 } 1478 } 1479 #else 1433 1480 READ_FLAG( uiCode, "rep_format_idx_present_flag"); 1434 1481 vps->setRepFormatIdxPresentFlag( uiCode ? true : false ); … … 1502 1549 } 1503 1550 } 1551 #endif 1504 1552 #endif 1505 1553 #if RESOLUTION_BASED_DPB … … 2565 2613 { 2566 2614 format = rpcSlice->getVPS()->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : rpcSlice->getVPS()->getVpsRepFormatIdx(sps->getLayerId()) )->getChromaFormatVpsIdc(); 2615 #if Q0195_REP_FORMAT_CLEANUP 2616 assert( (sps->getUpdateRepFormatFlag()==false && rpcSlice->getVPS()->getVpsNumRepFormats()==1) || rpcSlice->getVPS()->getVpsNumRepFormats() > 1 ); //conformance check 2617 #endif 2567 2618 } 2568 2619 #else -
branches/SHM-6-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r660 r662 1072 1072 1073 1073 #if REPN_FORMAT_IN_VPS 1074 #if Q0195_REP_FORMAT_CLEANUP 1075 WRITE_UVLC( vps->getVpsNumRepFormats() - 1, "vps_num_rep_formats_minus1" ); 1076 for(i = 0; i < vps->getVpsNumRepFormats(); i++) 1077 { 1078 // Write rep_format_structures 1079 codeRepFormat( vps->getVpsRepFormat(i) ); 1080 } 1081 1082 if ( vps->getVpsNumRepFormats() > 1 ) 1083 WRITE_FLAG( vps->getRepFormatIdxPresentFlag(), "rep_format_idx_present_flag"); 1084 1085 if( vps->getRepFormatIdxPresentFlag() ) 1086 { 1087 for(i = 1; i < vps->getMaxLayers(); i++) 1088 { 1089 Int numBits = 1; 1090 while ((1 << numBits) < (vps->getVpsNumRepFormats())) 1091 { 1092 numBits++; 1093 } 1094 WRITE_CODE( vps->getVpsRepFormatIdx(i), numBits, "vps_rep_format_idx[i]" ); 1095 } 1096 } 1097 #else 1074 1098 WRITE_FLAG( vps->getRepFormatIdxPresentFlag(), "rep_format_idx_present_flag"); 1075 1099 … … 1118 1142 } 1119 1143 } 1144 #endif 1120 1145 #endif 1121 1146
Note: See TracChangeset for help on using the changeset viewer.