Changeset 713 in SHVCSoftware for trunk/source/App/TAppEncoder
- Timestamp:
- 21 Apr 2014, 04:44:16 (11 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/SHM-6-dev (added) merged: 651-712
- Property svn:mergeinfo changed
-
trunk/source
- Property svn:mergeinfo changed
/branches/SHM-6-dev/source (added) merged: 652-678,680,683-684,686-691,693-700,702-705,707-711
- Property svn:mergeinfo changed
-
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r649 r713 339 339 string* cfg_ReconFile [MAX_LAYERS]; 340 340 Double* cfg_fQP [MAX_LAYERS]; 341 #if Q0074_SEI_COLOR_MAPPING 342 string* cfg_seiColorMappingFile[MAX_LAYERS]; 343 #endif 341 344 342 345 #if REPN_FORMAT_IN_VPS … … 433 436 cfg_IntraPeriod[layer] = &m_acLayerCfg[layer].m_iIntraPeriod; 434 437 cfg_conformanceMode[layer] = &m_acLayerCfg[layer].m_conformanceMode; 438 #if Q0074_SEI_COLOR_MAPPING 439 cfg_seiColorMappingFile[layer] = &m_acLayerCfg[layer].m_cSeiColorMappingFile; 440 #endif 435 441 #if LAYER_CTB 436 442 // coding unit (CU) definition … … 616 622 #endif 617 623 ("EnableElRapB,-use-rap-b", m_elRapSliceBEnabled, 0, "Set ILP over base-layer I picture to B picture (default is P picture)") 624 #if Q0074_SEI_COLOR_MAPPING 625 ("SEIColorMappingFile%d", cfg_seiColorMappingFile, string(""), MAX_LAYERS, "File Containing SEI Color Mapping data") 626 #endif 618 627 #else //SVC_EXTENSION 619 628 ("InputFile,i", cfg_InputFile, string(""), "Original YUV input file name") … … 710 719 ("IntraPeriod,-ip", m_iIntraPeriod, -1, "Intra period in frames, (-1: only first frame)") 711 720 #endif 721 #if ALLOW_RECOVERY_POINT_AS_RAP 722 ("DecodingRefreshType,-dr", m_iDecodingRefreshType, 0, "Intra refresh type (0:none 1:CRA 2:IDR 3:RecPointSEI)") 723 #else 712 724 ("DecodingRefreshType,-dr", m_iDecodingRefreshType, 0, "Intra refresh type (0:none 1:CRA 2:IDR)") 725 #endif 713 726 ("GOPSize,g", m_iGOPSize, 1, "GOP size of temporal structure") 714 727 // motion options … … 905 918 ("SEIToneMapCameraIsoSpeedIdc", m_cameraIsoSpeedIdc, 0, "Indicates the camera ISO speed for daylight illumination") 906 919 ("SEIToneMapCameraIsoSpeedValue", m_cameraIsoSpeedValue, 400, "Specifies the camera ISO speed for daylight illumination of Extended_ISO") 920 ("SEIToneMapExposureIndexIdc", m_exposureIndexIdc, 0, "Indicates the exposure index setting of the camera") 921 ("SEIToneMapExposureIndexValue", m_exposureIndexValue, 400, "Specifies the exposure index setting of the cameran of Extended_ISO") 907 922 ("SEIToneMapExposureCompensationValueSignFlag", m_exposureCompensationValueSignFlag, 0, "Specifies the sign of ExposureCompensationValue") 908 923 ("SEIToneMapExposureCompensationValueNumerator", m_exposureCompensationValueNumerator, 0, "Specifies the numerator of ExposureCompensationValue") … … 955 970 ("CrossLayerBLAFlag", m_crossLayerBLAFlag, false, "Specifies the value of cross_layer_bla_flag in VPS") 956 971 #endif 972 #if Q0048_CGS_3D_ASYMLUT 973 ("CGS", m_nCGSFlag , 0, "whether CGS is enabled") 974 ("CGSMaxOctantDepth", m_nCGSMaxOctantDepth , 1, "max octant depth") 975 ("CGSMaxYPartNumLog", m_nCGSMaxYPartNumLog2 , 2, "max Y part number ") 976 ("CGSLUTBit", m_nCGSLUTBit , 12, "bit depth of CGS LUT") 977 #endif 957 978 ; 958 979 … … 1202 1223 if( i >= m_acLayerCfg[layer].m_numSamplePredRefLayers ) 1203 1224 { 1204 printf( "NumSamplePredRefLayers : The number of columns whose width are defined is larger than the allowed number of columns.\n");1225 printf( "NumSamplePredRefLayers%d: The number of columns whose width are defined is larger than the allowed number of columns.\n", layer ); 1205 1226 exit( EXIT_FAILURE ); 1206 1227 } … … 1211 1232 if( i < m_acLayerCfg[layer].m_numSamplePredRefLayers ) 1212 1233 { 1213 printf( "NumSamplePredRefLayers : The width of some columns is not defined.\n");1234 printf( "NumSamplePredRefLayers%d: The width of some columns is not defined.\n", layer ); 1214 1235 exit( EXIT_FAILURE ); 1215 1236 } … … 1233 1254 if( i >= m_acLayerCfg[layer].m_numMotionPredRefLayers ) 1234 1255 { 1235 printf( "NumMotionPredRefLayers : The number of columns whose width are defined is larger than the allowed number of columns.\n");1256 printf( "NumMotionPredRefLayers%d: The number of columns whose width are defined is larger than the allowed number of columns.\n", layer ); 1236 1257 exit( EXIT_FAILURE ); 1237 1258 } … … 1242 1263 if( i < m_acLayerCfg[layer].m_numMotionPredRefLayers ) 1243 1264 { 1244 printf( "NumMotionPredRefLayers : The width of some columns is not defined.\n");1265 printf( "NumMotionPredRefLayers%d: The width of some columns is not defined.\n", layer ); 1245 1266 exit( EXIT_FAILURE ); 1246 1267 } … … 1272 1293 if( i >= m_acLayerCfg[layer].m_numActiveRefLayers ) 1273 1294 { 1274 printf( "NumActiveRefLayers : The number of columns whose width are defined is larger than the allowed number of columns.\n");1295 printf( "NumActiveRefLayers%d: The number of columns whose width are defined is larger than the allowed number of columns.\n", layer ); 1275 1296 exit( EXIT_FAILURE ); 1276 1297 } … … 1281 1302 if( i < m_acLayerCfg[layer].m_numActiveRefLayers ) 1282 1303 { 1283 printf( "NumActiveRefLayers : The width of some columns is not defined.\n");1304 printf( "NumActiveRefLayers%d: The width of some columns is not defined.\n", layer ); 1284 1305 exit( EXIT_FAILURE ); 1285 1306 } … … 1474 1495 } 1475 1496 } 1497 1476 1498 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 1477 1499 if (m_interLayerConstrainedTileSetsSEIEnabled) … … 1587 1609 xConfirmPara( (m_iIntraPeriod > 0 && m_iIntraPeriod < m_iGOPSize) || m_iIntraPeriod == 0, "Intra period must be more than GOP size, or -1 , not 0" ); 1588 1610 #endif 1611 #if ALLOW_RECOVERY_POINT_AS_RAP 1612 xConfirmPara( m_iDecodingRefreshType < 0 || m_iDecodingRefreshType > 3, "Decoding Refresh Type must be comprised between 0 and 3 included" ); 1613 if(m_iDecodingRefreshType == 3) 1614 { 1615 xConfirmPara( !m_recoveryPointSEIEnabled, "When using RecoveryPointSEI messages as RA points, recoveryPointSEI must be enabled" ); 1616 } 1617 #else 1589 1618 xConfirmPara( m_iDecodingRefreshType < 0 || m_iDecodingRefreshType > 2, "Decoding Refresh Type must be equal to 0, 1 or 2" ); 1619 #endif 1590 1620 #if !SVC_EXTENSION 1591 1621 xConfirmPara( m_iQP < -6 * (m_internalBitDepthY - 8) || m_iQP > 51, "QP exceeds supported range (-QpBDOffsety to 51)" ); … … 2160 2190 xConfirmPara( m_toneMapModelId < 0 || m_toneMapModelId > 4 , "SEIToneMapModelId must be in rage 0 to 4"); 2161 2191 xConfirmPara( m_cameraIsoSpeedValue == 0, "SEIToneMapCameraIsoSpeedValue shall not be equal to 0"); 2192 xConfirmPara( m_exposureIndexValue == 0, "SEIToneMapExposureIndexValue shall not be equal to 0"); 2162 2193 xConfirmPara( m_extendedRangeWhiteLevel < 100, "SEIToneMapExtendedRangeWhiteLevel should be greater than or equal to 100"); 2163 2194 xConfirmPara( m_nominalBlackLevelLumaCodeValue >= m_nominalWhiteLevelLumaCodeValue, "SEIToneMapNominalWhiteLevelLumaCodeValue shall be greater than SEIToneMapNominalBlackLevelLumaCodeValue"); … … 2286 2317 } 2287 2318 #endif 2319 #if Q0048_CGS_3D_ASYMLUT 2320 xConfirmPara( m_nCGSFlag < 0 || m_nCGSFlag > 1 , "0<=CGS<=1" ); 2321 #endif 2288 2322 #undef xConfirmPara 2289 2323 if (check_failed) … … 2545 2579 printf("RecalQP:%d", m_recalculateQPAccordingToLambda ? 1 : 0 ); 2546 2580 #endif 2581 #if Q0048_CGS_3D_ASYMLUT 2582 printf("CGS: %d CGSMaxOctantDepth: %d CGSMaxYPartNumLog2: %d CGSLUTBit:%d " , m_nCGSFlag , m_nCGSMaxOctantDepth , m_nCGSMaxYPartNumLog2 , m_nCGSLUTBit ); 2583 #endif 2547 2584 printf("\n\n"); 2548 2585 -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r644 r713 255 255 Int m_cameraIsoSpeedIdc; 256 256 Int m_cameraIsoSpeedValue; 257 Int m_exposureIndexIdc; 258 Int m_exposureIndexValue; 257 259 Int m_exposureCompensationValueSignFlag; 258 260 Int m_exposureCompensationValueNumerator; … … 266 268 Int* m_codedPivotValue; 267 269 Int* m_targetPivotValue; 270 #if Q0074_SEI_COLOR_MAPPING 271 Char* m_pchSEIColorMappingFile; ///< SEI Color Mapping File (initialized from external file) 272 #endif 268 273 Int m_framePackingSEIEnabled; 269 274 Int m_framePackingSEIType; … … 393 398 Bool m_useInterLayerWeightedPred; 394 399 #endif 400 #if Q0048_CGS_3D_ASYMLUT 401 Int m_nCGSFlag; 402 Int m_nCGSMaxOctantDepth; 403 Int m_nCGSMaxYPartNumLog2; 404 Int m_nCGSLUTBit; 405 #endif 395 406 public: 396 407 TAppEncCfg(); -
trunk/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r644 r713 171 171 } 172 172 #endif 173 #if REPN_FORMAT_IN_VPS 174 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - ( m_confLeft + m_confRight ) * TComSPS::getWinUnitX( m_chromaFormatIDC ), m_iSourceHeight - ( m_confTop + m_confBottom ) * TComSPS::getWinUnitY( m_chromaFormatIDC ), m_iFrameRate ); 175 #else 173 176 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_confLeft - m_confRight, m_iSourceHeight - m_confTop - m_confBottom, m_iFrameRate ); 177 #endif 174 178 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); 175 179 #if O0194_DIFFERENT_BITDEPTH_EL_BL … … 229 233 m_aiPad[0] = m_confRight = ((m_iSourceWidth / minCuSize) + 1) * minCuSize - m_iSourceWidth; 230 234 m_iSourceWidth += m_confRight; 235 #if REPN_FORMAT_IN_VPS 236 m_confRight /= TComSPS::getWinUnitX( m_chromaFormatIDC ); 237 #endif 231 238 } 232 239 if (m_iSourceHeight % minCuSize) … … 239 246 m_aiPad[1] = m_confBottom << 1; 240 247 } 248 #if REPN_FORMAT_IN_VPS 249 m_confBottom /= TComSPS::getWinUnitY( m_chromaFormatIDC ); 250 #endif 241 251 } 242 252 break; … … 249 259 m_confRight = m_aiPad[0]; 250 260 m_confBottom = m_aiPad[1]; 261 #if REPN_FORMAT_IN_VPS 262 m_confRight /= TComSPS::getWinUnitX( m_chromaFormatIDC ); 263 m_confBottom /= TComSPS::getWinUnitY( m_chromaFormatIDC ); 264 #endif 251 265 break; 252 266 } … … 331 345 xConfirmPara( m_aiPad[1] % TComSPS::getWinUnitY(CHROMA_420) != 0, "Vertical padding must be an integer multiple of the specified chroma subsampling"); 332 346 347 #if !REPN_FORMAT_IN_VPS 333 348 xConfirmPara( m_confLeft % TComSPS::getWinUnitX(CHROMA_420) != 0, "Left conformance window offset must be an integer multiple of the specified chroma subsampling"); 334 349 xConfirmPara( m_confRight % TComSPS::getWinUnitX(CHROMA_420) != 0, "Right conformance window offset must be an integer multiple of the specified chroma subsampling"); 335 350 xConfirmPara( m_confTop % TComSPS::getWinUnitY(CHROMA_420) != 0, "Top conformance window offset must be an integer multiple of the specified chroma subsampling"); 336 351 xConfirmPara( m_confBottom % TComSPS::getWinUnitY(CHROMA_420) != 0, "Bottom conformance window offset must be an integer multiple of the specified chroma subsampling"); 352 #endif 337 353 338 354 #if LAYER_CTB -
trunk/source/App/TAppEncoder/TAppEncLayerCfg.h
r644 r713 54 54 Int *m_predLayerIds; 55 55 Int m_numActiveRefLayers; 56 #endif 57 #if Q0074_SEI_COLOR_MAPPING 58 string m_cSeiColorMappingFile; 56 59 #endif 57 60 -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r649 r713 91 91 } 92 92 93 #if REPN_FORMAT_IN_VPS 94 vps->setRepFormatIdxPresentFlag( true ); // Could be disabled to optimize in some cases. 93 #if REPN_FORMAT_IN_VPS 95 94 Int maxRepFormatIdx = -1; 96 95 Int formatIdx = -1; … … 125 124 126 125 assert( m_acLayerCfg[layer].getRepFormatIdx() != -1 && "RepFormatIdx not assigned for a layer" ); 126 127 127 vps->setVpsRepFormatIdx( layer, m_acLayerCfg[layer].getRepFormatIdx() ); 128 128 129 maxRepFormatIdx = std::max( m_acLayerCfg[layer].getRepFormatIdx(), maxRepFormatIdx ); 129 130 } 131 130 132 assert( vps->getVpsRepFormatIdx( 0 ) == 0 ); // Base layer should point to the first one. 133 131 134 Int* mapIdxToLayer = new Int[maxRepFormatIdx + 1]; 135 132 136 // Check that all the indices from 0 to maxRepFormatIdx are used in the VPS 133 137 for(Int i = 0; i <= maxRepFormatIdx; i++) … … 145 149 assert( layer != m_numLayers ); // One of the VPS Rep format indices not set 146 150 } 151 147 152 vps->setVpsNumRepFormats( maxRepFormatIdx + 1 ); 153 154 #if Q0195_REP_FORMAT_CLEANUP 155 // When not present, the value of rep_format_idx_present_flag is inferred to be equal to 0 156 vps->setRepFormatIdxPresentFlag( vps->getVpsNumRepFormats() > 1 ? true : false ); 157 #else 158 vps->setRepFormatIdxPresentFlag( true ); 159 #endif 160 148 161 for(UInt idx=0; idx < vps->getVpsNumRepFormats(); idx++) 149 162 { … … 467 480 m_acTEncTop[layer].setTMISEINominalWhiteLevelLumaCodeValue ( m_nominalWhiteLevelLumaCodeValue ); 468 481 m_acTEncTop[layer].setTMISEIExtendedWhiteLevelLumaCodeValue ( m_extendedWhiteLevelLumaCodeValue ); 482 #if Q0074_SEI_COLOR_MAPPING 483 m_acTEncTop[layer].setColorMappingInfoSEIFile ( m_acLayerCfg[layer].m_cSeiColorMappingFile.empty() ? NULL : const_cast<Char *>(m_acLayerCfg[layer].m_cSeiColorMappingFile.c_str()) ); 484 #endif 469 485 m_acTEncTop[layer].setFramePackingArrangementSEIEnabled( m_framePackingSEIEnabled ); 470 486 m_acTEncTop[layer].setFramePackingArrangementSEIType( m_framePackingSEIType ); … … 592 608 m_acTEncTop[layer].setCrossLayerBLAFlag( m_crossLayerBLAFlag ); 593 609 #endif 610 #if Q0048_CGS_3D_ASYMLUT 611 m_acTEncTop[layer].setCGSFlag( layer == 0 ? 0 : m_nCGSFlag ); 612 m_acTEncTop[layer].setCGSMaxOctantDepth( m_nCGSMaxOctantDepth ); 613 m_acTEncTop[layer].setCGSMaxYPartNumLog2( m_nCGSMaxYPartNumLog2 ); 614 m_acTEncTop[layer].setCGSLUTBit( m_nCGSLUTBit ); 615 #endif 594 616 } 595 617 } … … 767 789 m_cTEncTop.setTMISEICameraIsoSpeedIdc ( m_cameraIsoSpeedIdc ); 768 790 m_cTEncTop.setTMISEICameraIsoSpeedValue ( m_cameraIsoSpeedValue ); 791 m_cTEncTop.setTMISEIExposureIndexIdc ( m_exposureIndexIdc ); 792 m_cTEncTop.setTMISEIExposureIndexValue ( m_exposureIndexValue ); 769 793 m_cTEncTop.setTMISEIExposureCompensationValueSignFlag ( m_exposureCompensationValueSignFlag ); 770 794 m_cTEncTop.setTMISEIExposureCompensationValueNumerator ( m_exposureCompensationValueNumerator ); … … 775 799 m_cTEncTop.setTMISEINominalWhiteLevelLumaCodeValue ( m_nominalWhiteLevelLumaCodeValue ); 776 800 m_cTEncTop.setTMISEIExtendedWhiteLevelLumaCodeValue ( m_extendedWhiteLevelLumaCodeValue ); 801 #if Q0074_SEI_COLOR_MAPPING 802 m_cTEncTop.setColorMappingInfoSEIFile ( m_pchSEIColorMappingFile ); 803 #endif 777 804 m_cTEncTop.setFramePackingArrangementSEIEnabled( m_framePackingSEIEnabled ); 778 805 m_cTEncTop.setFramePackingArrangementSEIType( m_framePackingSEIType ); … … 974 1001 vps->setMaxLayerId(m_numLayers - 1); // Set max-layer ID 975 1002 1003 vps->setVpsExtensionFlag( m_numLayers > 1 ? true : false ); 1004 976 1005 vps->setNumLayerSets(m_numLayers); 977 1006 for(Int setId = 1; setId < vps->getNumLayerSets(); setId++) … … 1068 1097 #if VPS_TSLAYERS 1069 1098 vps->setMaxTSLayersPresentFlag(true); 1070 for( i = 0; i < MAX_VPS_LAYER_ID_PLUS1 - 1; i++ )1071 { 1072 1099 for( i = 0; i < vps->getMaxLayers(); i++ ) 1100 { 1101 vps->setMaxTSLayersMinus1(i, vps->getMaxTLayers()-1); 1073 1102 } 1074 1103 #endif … … 1081 1110 if (vps->getMaxTidRefPresentFlag()) 1082 1111 { 1083 for( i = 0; i < MAX_VPS_LAYER_ID_PLUS1- 1; i++ )1112 for( i = 0; i < vps->getMaxLayers() - 1; i++ ) 1084 1113 { 1085 1114 #if N0120_MAX_TID_REF_CFG 1086 1115 #if O0225_MAX_TID_FOR_REF_LAYERS 1087 for( Int j = i+1; j < = MAX_VPS_LAYER_ID_PLUS1 - 1; j++)1116 for( Int j = i+1; j < vps->getMaxLayers(); j++) 1088 1117 { 1089 1118 vps->setMaxTidIlRefPicsPlus1(i, j, m_acTEncTop[i].getMaxTidIlRefPicsPlus1()); … … 1094 1123 #else 1095 1124 #if O0225_MAX_TID_FOR_REF_LAYERS 1096 for( Int j = i+1; j < = MAX_VPS_LAYER_ID_PLUS1 - 1; j++)1125 for( Int j = i+1; j < vps->getMaxLayers(); j++) 1097 1126 { 1098 1127 vps->setMaxTidIlRefPicsPlus1(i, j, vps->getMaxTLayers()+1); … … 1106 1135 else 1107 1136 { 1108 for( i = 0; i < MAX_VPS_LAYER_ID_PLUS1- 1; i++ )1137 for( i = 0; i < vps->getMaxLayers() - 1; i++ ) 1109 1138 { 1110 1139 #if O0225_MAX_TID_FOR_REF_LAYERS 1111 for( Int j = i+1; j < = MAX_VPS_LAYER_ID_PLUS1 - 1; j++)1140 for( Int j = i+1; j < vps->getMaxLayers(); j++) 1112 1141 { 1113 1142 vps->setMaxTidIlRefPicsPlus1(i, j, 7); … … 1297 1326 if(vps->getMaxLayers() > MAX_REF_LAYERS) 1298 1327 { 1299 for(UInt layerCtr = 1; layerCtr <= vps->getMaxLayers() - 1; layerCtr++)1328 for(UInt layerCtr = 1; layerCtr <= vps->getMaxLayers() - 1; layerCtr++) 1300 1329 { 1301 1330 assert( vps->getNumRefLayers(vps->getLayerIdInNuh(layerCtr)) <= MAX_REF_LAYERS); … … 1400 1429 Int iPicWidth = pcCfgLayer->getSourceWidth(); 1401 1430 Int iPicHeight = pcCfgLayer->getSourceHeight(); 1431 #if LAYER_CTB 1432 UInt uiWidthInCU = ( iPicWidth % m_acLayerCfg[layerId].m_uiMaxCUWidth ) ? iPicWidth / m_acLayerCfg[layerId].m_uiMaxCUWidth + 1 : iPicWidth / m_acLayerCfg[layerId].m_uiMaxCUWidth; 1433 UInt uiHeightInCU = ( iPicHeight % m_acLayerCfg[layerId].m_uiMaxCUHeight ) ? iPicHeight / m_acLayerCfg[layerId].m_uiMaxCUHeight + 1 : iPicHeight / m_acLayerCfg[layerId].m_uiMaxCUHeight; 1434 #else 1402 1435 UInt uiWidthInCU = ( iPicWidth %m_uiMaxCUWidth ) ? iPicWidth /m_uiMaxCUWidth + 1 : iPicWidth /m_uiMaxCUWidth; 1403 1436 UInt uiHeightInCU = ( iPicHeight%m_uiMaxCUHeight ) ? iPicHeight/m_uiMaxCUHeight + 1 : iPicHeight/m_uiMaxCUHeight; 1437 #endif 1404 1438 UInt uiNumCUsInFrame = uiWidthInCU * uiHeightInCU; 1405 1439 1440 #if LAYER_CTB 1441 UInt maxCU = pcCfgLayer->getSliceArgument() >> ( m_acLayerCfg[layerId].m_uiMaxCUDepth << 1); 1442 #else 1406 1443 UInt maxCU = pcCfgLayer->getSliceArgument() >> ( m_uiMaxCUDepth << 1); 1444 #endif 1407 1445 UInt numDU = ( pcCfgLayer->getSliceMode() == 1 ) ? ( uiNumCUsInFrame / maxCU ) : ( 0 ); 1408 1446 if( uiNumCUsInFrame % maxCU != 0 || numDU == 0 )
Note: See TracChangeset for help on using the changeset viewer.