Changeset 952 in SHVCSoftware
- Timestamp:
- 5 Jan 2015, 09:03:13 (10 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.cpp
r932 r952 106 106 ("OutputBitDepthC,d", m_outputBitDepthC, 0, "bit depth of YUV output chroma component (default: use 0 for native depth)") 107 107 #if SVC_EXTENSION 108 #if FIX_CONF_MODE 109 ("LayerNum,-ls", nLayerNum, MAX_NUM_LAYER_IDS, "Number of layers to be decoded.") 110 #else 108 111 ("LayerNum,-ls", nLayerNum, 1, "Number of layers to be decoded.") 112 #endif 109 113 #if OUTPUT_LAYER_SET_INDEX 110 114 ("OutpuLayerSetIdx,-olsidx", olsIdx, -1, "Index of output layer set to be decoded.") -
branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp
r932 r952 191 191 read(nalu, nalUnit); 192 192 if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) || 193 #if FIX_CONF_MODE 194 (nalu.m_layerId > this->getCommonDecoderParams()->getTargetLayerId()) ) 195 #else 193 196 (nalu.m_layerId > m_tgtLayerId) ) 197 #endif 194 198 { 195 199 bNewPicture = false; … … 1127 1131 dpbStatus.m_numPicsInLayer[layerIdx]--; 1128 1132 #endif 1133 #if FIX_ALIGN_BUMPING 1134 dpbStatus.m_numPicsInSubDpb[dpbStatus.m_layerIdToSubDpbIdMap[layerIdx]]--; 1135 #else 1129 1136 dpbStatus.m_numPicsInSubDpb[layerIdx]--; 1137 #endif 1130 1138 } 1131 1139 } … … 1139 1147 { 1140 1148 std::vector<Int> listOfPocs; 1149 #if FIX_ALIGN_BUMPING 1150 std::vector<Int> listOfPocsInEachLayer[MAX_VPS_LAYER_ID_PLUS1]; 1151 std::vector<Int> listOfPocsPositionInEachLayer[MAX_VPS_LAYER_ID_PLUS1]; 1152 #else 1141 1153 std::vector<Int> listOfPocsInEachLayer[MAX_LAYERS]; 1142 1154 std::vector<Int> listOfPocsPositionInEachLayer[MAX_LAYERS]; 1155 #endif 1143 1156 DpbStatus dpbStatus; 1144 1157 … … 1166 1179 { 1167 1180 std::vector<Int> listOfPocs; 1181 #if FIX_ALIGN_BUMPING 1182 std::vector<Int> listOfPocsInEachLayer[MAX_VPS_LAYER_ID_PLUS1]; 1183 std::vector<Int> listOfPocsPositionInEachLayer[MAX_VPS_LAYER_ID_PLUS1]; 1184 #else 1168 1185 std::vector<Int> listOfPocsInEachLayer[MAX_LAYERS]; 1169 1186 std::vector<Int> listOfPocsPositionInEachLayer[MAX_LAYERS]; 1187 #endif 1170 1188 DpbStatus dpbStatus; 1171 1189 … … 1189 1207 Void TAppDecTop::markAllPicturesAsErased() 1190 1208 { 1209 #if FIX_ALIGN_BUMPING 1210 for(Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1; i++) 1211 #else 1191 1212 for(Int i = 0; i < MAX_LAYERS; i++) 1213 #endif 1192 1214 { 1193 1215 markAllPicturesAsErased(i); … … 1228 1250 1229 1251 std::vector<Int> listOfPocs; 1252 #if FIX_ALIGN_BUMPING 1253 std::vector<Int> listOfPocsInEachLayer[MAX_VPS_LAYER_ID_PLUS1]; 1254 std::vector<Int> listOfPocsPositionInEachLayer[MAX_VPS_LAYER_ID_PLUS1]; 1255 #else 1230 1256 std::vector<Int> listOfPocsInEachLayer[MAX_LAYERS]; 1231 1257 std::vector<Int> listOfPocsPositionInEachLayer[MAX_LAYERS]; 1258 #endif 1232 1259 DpbStatus dpbStatus; 1233 1260 … … 1261 1288 } 1262 1289 #else 1290 #if FIX_ALIGN_BUMPING 1291 Int subDpbIdx = getCommonDecoderParams()->getTargetOutputLayerSetIdx() == 0 1292 ? dpbStatus.m_layerIdToSubDpbIdMap[0] 1293 : dpbStatus.m_layerIdToSubDpbIdMap[layerIdx]; 1294 #else 1263 1295 Int subDpbIdx = getCommonDecoderParams()->getTargetOutputLayerSetIdx() == 0 ? 0 : layerIdx; 1296 #endif 1264 1297 findDpbParametersFromVps(listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, maxDpbLimit); 1265 1298 #endif … … 1274 1307 { 1275 1308 std::vector<Int> listOfPocs; 1309 #if FIX_ALIGN_BUMPING 1310 std::vector<Int> listOfPocsInEachLayer[MAX_VPS_LAYER_ID_PLUS1]; 1311 std::vector<Int> listOfPocsPositionInEachLayer[MAX_VPS_LAYER_ID_PLUS1]; 1312 #else 1276 1313 std::vector<Int> listOfPocsInEachLayer[MAX_LAYERS]; 1277 1314 std::vector<Int> listOfPocsPositionInEachLayer[MAX_LAYERS]; 1315 #endif 1278 1316 DpbStatus dpbStatus; 1279 1317 … … 1307 1345 std::vector<int>::iterator it; 1308 1346 TComList<TComPic*>::iterator iterPic; 1347 #if FIX_ALIGN_BUMPING 1348 for( Int dpbLayerCtr = 0; dpbLayerCtr < dpbStatus.m_numLayers; dpbLayerCtr++) 1349 { 1350 Int layerIdx = dpbStatus.m_targetDecLayerIdList[dpbLayerCtr]; 1351 #else 1309 1352 for( Int layerIdx = 0; layerIdx < dpbStatus.m_numLayers; layerIdx++) 1310 1353 { 1354 #endif 1311 1355 // Check if picture with pocValue is present. 1312 1356 it = find( listOfPocsInEachLayer[layerIdx].begin(), listOfPocsInEachLayer[layerIdx].end(), pocValue ); … … 1390 1434 listOfPocsInEachLayer[layerIdx].erase( it ); 1391 1435 listOfPocsPositionInEachLayer[layerIdx].erase( listOfPocsPositionInEachLayer[layerIdx].begin() + picPosition ); 1392 } 1393 } 1394 // Update sub-DPB status 1436 #if FIX_ALIGN_BUMPING 1437 dpbStatus.m_numPicsInSubDpb[dpbStatus.m_layerIdToSubDpbIdMap[layerIdx]]--; 1438 #endif 1439 } 1440 } 1441 #if !FIX_ALIGN_BUMPING 1442 # // Update sub-DPB status 1395 1443 for( Int subDpbIdx = 0; subDpbIdx < dpbStatus.m_numSubDpbs; subDpbIdx++) 1396 1444 { 1397 1445 dpbStatus.m_numPicsInSubDpb[subDpbIdx]--; 1398 1446 } 1447 #endif 1399 1448 dpbStatus.m_numAUsNotDisplayed--; 1400 1449 … … 1439 1488 // Find the VPS used for the pictures 1440 1489 // ------------------------------------- 1490 #if FIX_ALIGN_BUMPING 1491 for(Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1; i++) 1492 #else 1441 1493 for(Int i = 0; i < MAX_LAYERS; i++) 1494 #endif 1442 1495 { 1443 1496 if( m_acTDecTop[i].getListPic()->empty() ) … … 1487 1540 Void TAppDecTop::emptyUnusedPicturesNotNeededForOutput() 1488 1541 { 1542 #if FIX_ALIGN_BUMPING 1543 for(Int layerIdx = 0; layerIdx < MAX_VPS_LAYER_ID_PLUS1; layerIdx++) 1544 #else 1489 1545 for(Int layerIdx = 0; layerIdx < MAX_LAYERS; layerIdx++) 1546 #endif 1490 1547 { 1491 1548 TComList <TComPic*> *pcListPic = m_acTDecTop[layerIdx].getListPic(); … … 1542 1599 TComVPS *vps = NULL; 1543 1600 dpbStatus.init(); 1601 #if FIX_ALIGN_BUMPING 1602 for( Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1; i++ ) 1603 #else 1544 1604 for( Int i = 0; i < MAX_LAYERS; i++ ) 1605 #endif 1545 1606 { 1546 1607 if( m_acTDecTop[i].getListPic()->empty() ) … … 1600 1661 dpbStatus.m_numAUsNotDisplayed = listOfPocs.size(); // Number of AUs not displayed 1601 1662 dpbStatus.m_numLayers = vps->getNumLayersInIdList( targetLsIdx ); 1663 #if FIX_ALIGN_BUMPING 1664 for(Int i = 0; i < dpbStatus.m_numLayers; i++) 1665 { 1666 dpbStatus.m_layerIdToSubDpbIdMap[vps->getLayerSetLayerIdList(targetLsIdx, i)] = i; 1667 dpbStatus.m_targetDecLayerIdList[i] = vps->getLayerSetLayerIdList(targetLsIdx, i); // Layer Id stored in a particular sub-DPB 1668 } 1669 dpbStatus.m_numSubDpbs = vps->getNumSubDpbs( targetLsIdx ); 1670 #else 1602 1671 dpbStatus.m_numSubDpbs = vps->getNumSubDpbs( vps->getOutputLayerSetIdx( 1603 1672 this->getCommonDecoderParams()->getTargetOutputLayerSetIdx() ) ); 1604 1673 #endif 1674 1675 #if FIX_ALIGN_BUMPING 1676 for(Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1; i++) 1677 #else 1605 1678 for(Int i = 0; i < dpbStatus.m_numLayers; i++) 1679 #endif 1606 1680 { 1607 1681 dpbStatus.m_numPicsNotDisplayedInLayer[i] = listOfPocsInEachLayer[i].size(); … … 1619 1693 { // All pictures in the DPB in that layer are to be output; this means other pictures would also be output 1620 1694 std::vector<Int> listOfPocs; 1695 #if FIX_ALIGN_BUMPING 1696 std::vector<Int> listOfPocsInEachLayer[MAX_VPS_LAYER_ID_PLUS1]; 1697 std::vector<Int> listOfPocsPositionInEachLayer[MAX_VPS_LAYER_ID_PLUS1]; 1698 #else 1621 1699 std::vector<Int> listOfPocsInEachLayer[MAX_LAYERS]; 1622 1700 std::vector<Int> listOfPocsPositionInEachLayer[MAX_LAYERS]; 1701 #endif 1623 1702 DpbStatus dpbStatus; 1624 1703 -
branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.h
r924 r952 141 141 #endif 142 142 Int m_numPicsInSubDpb[MAX_LAYERS]; // Pictures marked as used_for_reference or needed for output in the sub-DPB 143 #if FIX_ALIGN_BUMPING 144 Int m_layerIdToSubDpbIdMap[MAX_VPS_LAYER_ID_PLUS1]; 145 Int m_targetDecLayerIdList[MAX_LAYERS]; 146 #endif 143 147 Bool m_maxLatencyIncrease; 144 148 Int m_maxLatencyPictures; … … 163 167 m_numSubDpbs = -1; 164 168 m_numLayers = -1; 169 #if FIX_ALIGN_BUMPING 170 ::memset( m_targetDecLayerIdList, 0, sizeof(m_targetDecLayerIdList) ); 171 for(Int i = 0; i < MAX_LAYERS; i++) 172 { 173 m_layerIdToSubDpbIdMap[i] = -1; 174 } 175 #endif 165 176 } 166 177 }; -
branches/SHM-dev/source/Lib/TLibCommon/CommonDef.h
r905 r952 291 291 public: 292 292 CommonDecoderParams(): 293 #if FIX_CONF_MODE 294 m_targetLayerId(MAX_VPS_LAYER_ID_PLUS1) 295 #else 293 296 m_targetLayerId(0) 297 #endif 294 298 , m_targetOutputLayerSetIdx(-1) 295 299 , m_targetDecLayerIdSet(NULL) -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r951 r952 45 45 #define O0215_PHASE_ALIGNMENT_REMOVAL 1 46 46 #define CONFORMANCE_BITSTREAM_MODE 1 ///< In order to generate the metadata related to conformance bitstreams 47 #define FIX_CONF_MODE 1 47 48 #define SIGNALLING_BITRATE_PICRATE_FIX 1 ///< Fix for signalling of bitrate and picture rate info in VPS VUI to be more aligned to JCTVC-R1008 48 49 #define INFERENCE_POC_MSB_VAL_PRESENT 1 ///< JCTVC-Q0146 -- poc_msb_val_present_flag shall be equal to 0 when slice_header_extension_length is (inferred to be ) equal to 0 … … 98 99 ///< JCTVC-P0192: Assign layers to sub-DPBs based on the rep_format() signaled in the VPS 99 100 #define ALIGNED_BUMPING 1 ///< JCTVC-P0192: Align bumping of pictures in an AU 101 #define FIX_ALIGN_BUMPING 1 100 102 #define O0109_O0199_FLAGS_TO_VUI 1 ///< JCTVC-O0109, O0199: move single_layer_for_non_irap_flag and higher_layer_flag to vps_vui 101 103 #define O0109_VIEW_ID_LEN 1 ///< JCTVC-O0109: view_id_len_minus1 to view_id_len, and add constraint (1<<view_id_len) is greater than or equal to NumViews -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r944 r952 3011 3011 3012 3012 } 3013 #if FIX_CONF_MODE 3014 // Set correct value of targetLayerId 3015 Int targetOlsIdx = params->getTargetOutputLayerSetIdx(); 3016 Int targetLsIdx = vps->getOutputLayerSetIdx( targetOlsIdx ); 3017 params->setTargetLayerId( vps->getLayerSetLayerIdList( targetLsIdx, vps->getNumLayersInIdList(targetLsIdx)-1 ) ); 3018 #endif 3013 3019 } 3014 3020 #endif
Note: See TracChangeset for help on using the changeset viewer.