Changeset 492 in 3DVCSoftware for branches/HTMDEV0.3dev0/source/App/TAppEncoder/TAppEncCfg.cpp
 Timestamp:
 24 Jun 2013, 16:01:58 (11 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/HTMDEV0.3dev0/source/App/TAppEncoder/TAppEncCfg.cpp
r491 r492 392 392 ("LayerIdInNuh", m_layerIdInNuh , std::vector<Int>(1,0), "LayerId in Nuh") 393 393 ("SplittingFlag", m_splittingFlag , false , "Splitting Flag") 394 395 // Layer Sets + Output Layer Sets + Profile Tier Level 396 ("VpsNumLayerSets", m_vpsNumLayerSets , 1 , "Number of layer sets") 397 ("LayerIdsInSet_%d", m_layerIdsInSets , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set") 398 ("DefaultOneTargetOutputLayerFlag", m_defaultOneTargetOutputLayerFlag, false , "Output highest layer of layer sets by default") 399 ("OutputLayerSetIdx", m_outputLayerSetIdx , std::vector<Int>(1,0), "Indices of layer sets used as additional output layer sets") 400 ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet , std::vector<Int>(1,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "LayerIds of additional output layers") 401 ("ProfileLevelTierIdx", m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier") 394 402 #endif 395 403 ("SourceWidth,wdt", m_iSourceWidth, 0, "Source picture width") … … 1283 1291 xConfirmPara( m_layerIdInNuh[0] != 0 , "LayerIdInNuh must be 0 for the first layer. "); 1284 1292 xConfirmPara( (m_layerIdInNuh.size()!=1) && (m_layerIdInNuh.size() < m_numberOfLayers) , "LayerIdInNuh must be given for all layers. "); 1285 1293 1286 1294 #if H_3D 1287 1295 xConfirmPara( m_scalabilityMask != 1 && m_scalabilityMask != 3, "Scalability Mask must be equal to 1 or 3. "); … … 1289 1297 xConfirmPara( m_scalabilityMask != 1 , "Scalability Mask must be equal to 1. "); 1290 1298 #endif 1291 1299 1292 1300 m_dimIds.push_back( m_viewId ); 1293 1301 const Int viewDimPosition = 0; … … 1299 1307 xConfirmPara( m_dimensionIdLen.size() < m_dimIds.size(), "DimensionIdLen must be given for all dimensions. " ); 1300 1308 1301 for( Int dim = 0; dim < m_dimIds.size(); dim++ ) 1302 { 1303 xConfirmPara( m_dimIds[dim].size() < m_numberOfLayers, "DimensionId must be given for all layers and all dimensions. "); 1304 xConfirmPara( ( dim != viewDimPosition ) && (m_dimIds[dim][0] != 0), "DimensionId of layer 0 must be 0. " ); 1305 xConfirmPara( m_dimensionIdLen[dim] < 1  m_dimensionIdLen[dim] > 8, "DimensionIdLen must be greater than 0 and less than 9 in all dimensions. " ); 1306 for( Int i = 1; i < m_numberOfLayers; i++ ) 1307 { 1308 xConfirmPara( ( m_dimIds[dim][i] < 0 )  ( m_dimIds[dim][i] > ( ( 1 << m_dimensionIdLen[dim] )  1 ) ) , "DimensionId shall be in the range of 0 to 2^DimensionIdLen  1. " ); 1309 } 1310 } 1311 1312 for( Int i = 0; i < m_numberOfLayers; i++ ) 1313 { 1314 for( Int j = 0; j < i; j++ ) 1315 { 1316 Int numDiff = 0; 1317 Int lastDiff = 1; 1318 for( Int dim = 0; dim < m_dimIds.size(); dim++ ) 1319 { 1320 if ( m_dimIds[dim][i] != m_dimIds[dim][j] ) 1321 { 1322 numDiff ++; 1323 lastDiff = dim; 1324 } 1325 } 1326 1327 Bool allEqual = ( numDiff == 0 ); 1328 1329 if ( allEqual ) 1330 { 1331 printf( "\nError: Positions of Layers %d and %d are identical in scalability space\n", i, j); 1332 } 1333 1334 xConfirmPara( allEqual , "Each layer shall have a different position in scalability space." ); 1335 1336 if ( numDiff == 1 ) 1337 { 1338 Bool inc = m_dimIds[ lastDiff ][ i ] > m_dimIds[ lastDiff ][ j ]; 1339 Bool shallBeButIsNotIncreasing = ( !inc && ( lastDiff != viewDimPosition ) ) ; 1340 if ( shallBeButIsNotIncreasing ) 1341 { 1342 printf( "\nError: Positions of Layers %d and %d is not increasing in dimension %d \n", i, j, lastDiff); 1343 } 1344 xConfirmPara( shallBeButIsNotIncreasing && ( lastDiff != viewDimPosition ), "DimensionIds shall be increasing within one dimension. " ); 1345 } 1346 } 1347 } 1348 1309 for( Int dim = 0; dim < m_dimIds.size(); dim++ ) 1310 { 1311 xConfirmPara( m_dimIds[dim].size() < m_numberOfLayers, "DimensionId must be given for all layers and all dimensions. "); 1312 xConfirmPara( ( dim != viewDimPosition ) && (m_dimIds[dim][0] != 0), "DimensionId of layer 0 must be 0. " ); 1313 xConfirmPara( m_dimensionIdLen[dim] < 1  m_dimensionIdLen[dim] > 8, "DimensionIdLen must be greater than 0 and less than 9 in all dimensions. " ); 1314 for( Int i = 1; i < m_numberOfLayers; i++ ) 1315 { 1316 xConfirmPara( ( m_dimIds[dim][i] < 0 )  ( m_dimIds[dim][i] > ( ( 1 << m_dimensionIdLen[dim] )  1 ) ) , "DimensionId shall be in the range of 0 to 2^DimensionIdLen  1. " ); 1317 } 1318 } 1319 1320 for( Int i = 0; i < m_numberOfLayers; i++ ) 1321 { 1322 for( Int j = 0; j < i; j++ ) 1323 { 1324 Int numDiff = 0; 1325 Int lastDiff = 1; 1326 for( Int dim = 0; dim < m_dimIds.size(); dim++ ) 1327 { 1328 if ( m_dimIds[dim][i] != m_dimIds[dim][j] ) 1329 { 1330 numDiff ++; 1331 lastDiff = dim; 1332 } 1333 } 1334 1335 Bool allEqual = ( numDiff == 0 ); 1336 1337 if ( allEqual ) 1338 { 1339 printf( "\nError: Positions of Layers %d and %d are identical in scalability space\n", i, j); 1340 } 1341 1342 xConfirmPara( allEqual , "Each layer shall have a different position in scalability space." ); 1343 1344 if ( numDiff == 1 ) 1345 { 1346 Bool inc = m_dimIds[ lastDiff ][ i ] > m_dimIds[ lastDiff ][ j ]; 1347 Bool shallBeButIsNotIncreasing = ( !inc && ( lastDiff != viewDimPosition ) ) ; 1348 if ( shallBeButIsNotIncreasing ) 1349 { 1350 printf( "\nError: Positions of Layers %d and %d is not increasing in dimension %d \n", i, j, lastDiff); 1351 } 1352 xConfirmPara( shallBeButIsNotIncreasing && ( lastDiff != viewDimPosition ), "DimensionIds shall be increasing within one dimension. " ); 1353 } 1354 } 1355 } 1356 1357 /// Layer sets 1358 xConfirmPara( m_vpsNumLayerSets < 0  m_vpsNumLayerSets > 1024, "VpsNumLayerSets must be greater than 0 and less than 1025") ; 1359 for( Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++ ) 1360 { 1361 if (lsIdx == 0) 1362 { 1363 xConfirmPara( m_layerIdsInSets[lsIdx].size() != 1  m_layerIdsInSets[lsIdx][0] != 0 , "0th layer shall only include layer 0. "); 1364 } 1365 for ( Int i = 0; i < m_layerIdsInSets[lsIdx].size(); i++ ) 1366 { 1367 xConfirmPara( m_layerIdsInSets[lsIdx][i] < 0  m_layerIdsInSets[lsIdx].size() >= MAX_NUM_LAYER_IDS, "LayerIdsInSet must be greater than and less than 64" ); 1368 } 1369 } 1370 1371 // Output layer sets 1372 xConfirmPara( m_outputLayerSetIdx.size() < 0  m_outputLayerSetIdx.size() > 1024, "The number of output layer set indices must be less than 1025") ; 1373 for (Int lsIdx = 0; lsIdx < m_outputLayerSetIdx.size(); lsIdx++) 1374 { 1375 Int refLayerSetIdx = m_outputLayerSetIdx[ lsIdx ]; 1376 xConfirmPara( refLayerSetIdx < 0  refLayerSetIdx >= m_vpsNumLayerSets, "Output layer set idx must be greater or equal to 0 and less than the VpsNumLayerSets" ); 1377 1378 for (Int i = 0; i < m_layerIdsInAddOutputLayerSet[ lsIdx ].size(); i++) 1379 { 1380 Bool isAlsoInLayerSet = false; 1381 for (Int j = 0; j < m_layerIdsInSets[ refLayerSetIdx ].size(); j++ ) 1382 { 1383 if ( m_layerIdsInSets[ refLayerSetIdx ][ j ] == m_layerIdsInAddOutputLayerSet[ lsIdx ][ i ] ) 1384 { 1385 isAlsoInLayerSet = true; 1386 break; 1387 } 1388 xConfirmPara( !isAlsoInLayerSet, "All output layers must of a output layer set be included in corresponding layer set"); 1389 } 1390 } 1391 } 1392 xConfirmPara( m_profileLevelTierIdx.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" ); 1349 1393 #endif 1350 1394 xConfirmPara( m_iGOPSize < 1 , "GOP Size must be greater or equal to 1" );
Note: See TracChangeset for help on using the changeset viewer.