Changeset 778 in SHVCSoftware for branches/SHM-6-dev/source/App
- Timestamp:
- 28 May 2014, 13:26:07 (11 years ago)
- Location:
- branches/SHM-6-dev/source/App
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-6-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r776 r778 492 492 #endif 493 493 } 494 #if Q0078_ADD_LAYER_SETS 495 Int* cfg_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1]; 496 string cfg_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1]; 497 string* cfg_layerSetLayerIdListPtr[MAX_VPS_LAYER_SETS_PLUS1]; 498 Int* cfg_numHighestLayerIdx[MAX_VPS_LAYER_SETS_PLUS1]; 499 string cfg_highestLayerIdx[MAX_VPS_LAYER_SETS_PLUS1]; 500 string* cfg_highestLayerIdxPtr[MAX_VPS_LAYER_SETS_PLUS1]; 501 for (UInt i = 0; i < MAX_VPS_LAYER_SETS_PLUS1; i++) 502 { 503 cfg_numLayerInIdList[i] = &m_numLayerInIdList[i]; 504 cfg_layerSetLayerIdListPtr[i] = &cfg_layerSetLayerIdList[i]; 505 cfg_highestLayerIdxPtr[i] = &cfg_highestLayerIdx[i]; 506 cfg_numHighestLayerIdx[i] = &m_numHighestLayerIdx[i]; 507 } 508 #endif 494 509 #if AVC_BASE 495 510 string cfg_BLInputFile; … … 546 561 #endif 547 562 ("NumLayers", m_numLayers, 1, "Number of layers to code") 563 #if Q0078_ADD_LAYER_SETS 564 ("NumLayerSets", m_numLayerSets, 0, "Number of layer sets") 565 ("NumLayerInIdList%d", cfg_numLayerInIdList, 0, MAX_VPS_LAYER_ID_PLUS1, "Number of layers in the set") 566 ("LayerSetLayerIdList%d", cfg_layerSetLayerIdListPtr, string(""), MAX_VPS_LAYER_ID_PLUS1, "Layer IDs for the set") 567 ("NumAddLayerSets", m_numAddLayerSets, 0, "Number of additional layer sets") 568 ("NumHighestLayerIdx%d", cfg_numHighestLayerIdx, 0, MAX_VPS_LAYER_ID_PLUS1, "Number of highest layer idx") 569 ("HighestLayerIdx%d", cfg_highestLayerIdxPtr, string(""), MAX_VPS_LAYER_ID_PLUS1, "Highest layer idx for an additional layer set") 570 #endif 548 571 #if AUXILIARY_PICTURES 549 572 ("InputChromaFormat%d", cfg_tmpInputChromaFormat, 420, MAX_LAYERS, "InputChromaFormatIDC for layer %d") … … 1321 1344 } 1322 1345 #endif 1346 #if Q0078_ADD_LAYER_SETS 1347 for (Int layerSet = 0; layerSet < m_numLayerSets; layerSet++) 1348 { 1349 if (m_numLayerInIdList[layerSet] > 0) 1350 { 1351 Char* layerSetLayerIdListDup = cfg_layerSetLayerIdList[layerSet].empty() ? NULL : strdup(cfg_layerSetLayerIdList[layerSet].c_str()); 1352 Int i = 0; 1353 char *layerId = strtok(layerSetLayerIdListDup, " ,-"); 1354 while (layerId != NULL) 1355 { 1356 if (i >= m_numLayerInIdList[layerSet]) 1357 { 1358 printf("NumLayerInIdList%d: The number of layers in the set is larger than the allowed number of layers.\n", layerSet); 1359 exit(EXIT_FAILURE); 1360 } 1361 m_layerSetLayerIdList[layerSet][i] = atoi(layerId); 1362 layerId = strtok(NULL, " ,-"); 1363 i++; 1364 } 1365 } 1366 } 1367 for (Int addLayerSet = 0; addLayerSet < m_numAddLayerSets; addLayerSet++) 1368 { 1369 if (m_numHighestLayerIdx[addLayerSet] > 0) 1370 { 1371 Char* highestLayrIdxListDup = cfg_highestLayerIdx[addLayerSet].empty() ? NULL : strdup(cfg_highestLayerIdx[addLayerSet].c_str()); 1372 Int i = 0; 1373 char *layerIdx = strtok(highestLayrIdxListDup, " ,-"); 1374 while (layerIdx != NULL) 1375 { 1376 if (i >= m_numLayerInIdList[addLayerSet]) 1377 { 1378 printf("NumLayerInIdList%d: The number of layer idx's in the highest layer idx list is larger than the allowed number of idx's.\n", addLayerSet); 1379 exit(EXIT_FAILURE); 1380 } 1381 m_highestLayerIdx[addLayerSet][i] = atoi(layerIdx); 1382 layerIdx = strtok(NULL, " ,-"); 1383 i++; 1384 } 1385 } 1386 } 1387 #endif 1323 1388 #endif //SVC_EXTENSION 1324 1389 m_scalingListFile = cfg_ScalingListFile.empty() ? NULL : strdup(cfg_ScalingListFile.c_str()); -
branches/SHM-6-dev/source/App/TAppEncoder/TAppEncCfg.h
r776 r778 74 74 #endif 75 75 Bool m_maxTidRefPresentFlag; 76 #if Q0078_ADD_LAYER_SETS 77 Int m_numLayerSets; 78 Int m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1]; 79 Int m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; 80 Int m_numAddLayerSets; 81 Int m_numHighestLayerIdx[MAX_VPS_LAYER_SETS_PLUS1]; 82 Int m_highestLayerIdx[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; 83 #endif 76 84 #else 77 85 Char* m_pchInputFile; ///< source file name -
branches/SHM-6-dev/source/App/TAppEncoder/TAppEncTop.cpp
r776 r778 632 632 m_acTEncTop[layer].setCGSMaxYPartNumLog2( m_nCGSMaxYPartNumLog2 ); 633 633 m_acTEncTop[layer].setCGSLUTBit( m_nCGSLUTBit ); 634 #endif 635 #if Q0078_ADD_LAYER_SETS 636 m_acTEncTop[layer].setNumAddLayerSets( m_numAddLayerSets ); 634 637 #endif 635 638 } … … 1036 1039 vps->setVpsExtensionFlag( m_numLayers > 1 ? true : false ); 1037 1040 1038 vps->setNumLayerSets(m_numLayers); 1039 for(Int setId = 1; setId < vps->getNumLayerSets(); setId++) 1040 { 1041 for(Int layerId = 0; layerId <= vps->getMaxLayerId(); layerId++) 1042 { 1041 #if Q0078_ADD_LAYER_SETS 1042 if (m_numLayerSets > 0) 1043 { 1044 vps->setNumLayerSets(m_numLayerSets+1); 1045 for (Int setId = 1; setId < vps->getNumLayerSets(); setId++) 1046 { 1047 for (Int layerId = 0; layerId <= vps->getMaxLayerId(); layerId++) 1048 { 1049 vps->setLayerIdIncludedFlag(false, setId, layerId); 1050 } 1051 } 1052 for (Int setId = 1; setId < vps->getNumLayerSets(); setId++) 1053 { 1054 for (Int i = 0; i < m_numLayerInIdList[setId-1]; i++) 1055 { 1056 Int layerId = m_layerSetLayerIdList[setId-1][i]; 1057 1043 1058 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1044 //4 1045 g_bitDepthY = m_acLayerCfg[layerId].m_internalBitDepthY; 1046 g_bitDepthC = m_acLayerCfg[layerId].m_internalBitDepthC; 1047 1048 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerId].m_inputBitDepthY : m_acLayerCfg[layerId].m_internalBitDepthY; 1049 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerId].m_inputBitDepthC : m_acLayerCfg[layerId].m_internalBitDepthC; 1050 #endif 1051 if( layerId <= setId ) 1052 { 1059 //4 1060 g_bitDepthY = m_acLayerCfg[layerId].m_internalBitDepthY; 1061 g_bitDepthC = m_acLayerCfg[layerId].m_internalBitDepthC; 1062 1063 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerId].m_inputBitDepthY : m_acLayerCfg[layerId].m_internalBitDepthY; 1064 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerId].m_inputBitDepthC : m_acLayerCfg[layerId].m_internalBitDepthC; 1065 #endif 1066 1053 1067 vps->setLayerIdIncludedFlag(true, setId, layerId); 1054 1068 } 1055 else 1056 { 1057 vps->setLayerIdIncludedFlag(false, setId, layerId); 1058 } 1059 } 1060 } 1069 } 1070 } 1071 else 1072 { 1073 // Default layer sets 1074 #endif 1075 vps->setNumLayerSets(m_numLayers); 1076 for (Int setId = 1; setId < vps->getNumLayerSets(); setId++) 1077 { 1078 for (Int layerId = 0; layerId <= vps->getMaxLayerId(); layerId++) 1079 { 1080 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1081 //4 1082 g_bitDepthY = m_acLayerCfg[layerId].m_internalBitDepthY; 1083 g_bitDepthC = m_acLayerCfg[layerId].m_internalBitDepthC; 1084 1085 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerId].m_inputBitDepthY : m_acLayerCfg[layerId].m_internalBitDepthY; 1086 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerId].m_inputBitDepthC : m_acLayerCfg[layerId].m_internalBitDepthC; 1087 #endif 1088 if (layerId <= setId) 1089 { 1090 vps->setLayerIdIncludedFlag(true, setId, layerId); 1091 } 1092 else 1093 { 1094 vps->setLayerIdIncludedFlag(false, setId, layerId); 1095 } 1096 } 1097 } 1098 #if Q0078_ADD_LAYER_SETS 1099 } 1100 #endif 1101 #if Q0078_ADD_LAYER_SETS 1102 vps->setNumAddLayerSets(m_numAddLayerSets); 1103 if (m_numAddLayerSets > 0) 1104 { 1105 for (Int setId = 0; setId < m_numAddLayerSets; setId++) 1106 { 1107 for (Int j = 0; j < m_numHighestLayerIdx[setId]; j++) 1108 { 1109 vps->setHighestLayerIdxPlus1(setId, j + 1, m_highestLayerIdx[setId][j] + 1); 1110 } 1111 } 1112 } 1113 #endif 1061 1114 #if VPS_EXTN_MASK_AND_DIM_INFO 1062 1115 UInt i = 0, dimIdLen = 0; … … 1347 1400 } 1348 1401 #endif 1402 #if Q0078_ADD_LAYER_SETS 1403 vps->setPredictedLayerIds(); 1404 vps->setTreePartitionLayerIdList(); 1405 #endif 1349 1406 #endif 1350 1407 vps->setMaxOneActiveRefLayerFlag(maxDirectRefLayers > 1 ? false : true); … … 1354 1411 if( vps->getNumDirectRefLayers( vps->getLayerIdInNuh(i) ) == 0 ) 1355 1412 { 1413 #if Q0078_ADD_LAYER_SETS 1414 vps->setPocLsbNotPresentFlag(i, true); // make independedent layers base-layer compliant 1415 #else 1356 1416 vps->setPocLsbNotPresentFlag(i, false); 1417 #endif 1357 1418 } 1358 1419 }
Note: See TracChangeset for help on using the changeset viewer.