Changeset 1235 in SHVCSoftware for branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
- Timestamp:
- 13 Jul 2015, 20:38:11 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r1203 r1235 184 184 #endif 185 185 #if Q0074_COLOUR_REMAPPING_SEI 186 m_colourRemapSEIFileRoot = cfg_colourRemapSEIFileRoot.empty() ? NULL : strdup(cfg_colourRemapSEIFileRoot.c_str()); 186 if( !cfg_colourRemapSEIFileRoot.empty() ) 187 { 188 m_colourRemapSEIFileRoot = strdup(cfg_colourRemapSEIFileRoot.c_str()); 189 } 187 190 #endif 188 191 … … 212 215 printf("Input File : %s\n", m_cInputFile.c_str() ); 213 216 printf("Reconstruction File : %s\n", m_cReconFile.c_str() ); 214 #if SVC_EXTENSION215 217 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - ( m_confWinLeft + m_confWinRight ) * TComSPS::getWinUnitX( m_chromaFormatIDC ), m_iSourceHeight - ( m_confWinTop + m_confWinBottom ) * TComSPS::getWinUnitY( m_chromaFormatIDC ), m_iFrameRate ); 216 #else217 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, m_iFrameRate );218 #endif219 218 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); 220 219 printf("PTL index : %d\n", m_layerPTLIdx ); 221 #if SVC_EXTENSION222 220 printf("Input bit depth : (Y:%d, C:%d)\n", m_inputBitDepth[CHANNEL_TYPE_LUMA], m_inputBitDepth[CHANNEL_TYPE_CHROMA] ); 223 221 printf("Internal bit depth : (Y:%d, C:%d)\n", m_internalBitDepth[CHANNEL_TYPE_LUMA], m_internalBitDepth[CHANNEL_TYPE_CHROMA] ); 224 222 printf("PCM sample bit depth : (Y:%d, C:%d)\n", m_cAppEncCfg->getPCMInputBitDepthFlag() ? m_inputBitDepth[CHANNEL_TYPE_LUMA] : m_internalBitDepth[CHANNEL_TYPE_LUMA], m_cAppEncCfg->getPCMInputBitDepthFlag() ? m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_internalBitDepth[CHANNEL_TYPE_CHROMA] ); 225 #endif226 223 std::cout << "Input ChromaFormatIDC :"; 227 224 … … 250 247 } 251 248 printf("\n"); 252 #if LAYER_CTB253 249 printf("CU size / depth : %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth ); 254 250 printf("RQT trans. size (min / max) : %d / %d\n", 1 << m_uiQuadtreeTULog2MinSize, 1 << m_uiQuadtreeTULog2MaxSize ); 255 251 printf("Max RQT depth inter : %d\n", m_uiQuadtreeTUMaxDepthInter); 256 252 printf("Max RQT depth intra : %d\n", m_uiQuadtreeTUMaxDepthIntra); 257 #endif258 253 printf("QP : %5.2f\n", m_fQP ); 254 printf("Max dQP signaling depth : %d\n", m_iMaxCuDQPDepth); 259 255 printf("Intra period : %d\n", m_iIntraPeriod ); 260 256 #if RC_SHVC_HARMONIZATION … … 271 267 #endif 272 268 printf("WaveFrontSynchro : %d\n", m_waveFrontSynchro); 273 printf("WaveFrontSubstreams : %d\n", m_iWaveFrontSubstreams); 274 #if LAYER_CTB 269 270 const Int iWaveFrontSubstreams = m_waveFrontSynchro ? (m_iSourceHeight + m_uiMaxCUHeight - 1) / m_uiMaxCUHeight : 1; 271 printf("WaveFrontSubstreams : %d\n", iWaveFrontSubstreams); 275 272 printf("PCM : %d ", (m_cAppEncCfg->getUsePCM() && (1<<m_cAppEncCfg->getPCMLog2MinSize()) <= m_uiMaxCUWidth)? 1 : 0); 276 #endif277 273 } 278 274 … … 303 299 304 300 // automatic padding to minimum CU size 305 #if LAYER_CTB306 301 Int minCuSize = m_uiMaxCUHeight >> (m_uiMaxCUDepth - 1); 307 #else 308 Int minCuSize = m_cAppEncCfg->getMaxCUHeight() >> (m_cAppEncCfg->getMaxCUDepth() - 1); 309 #endif 302 310 303 if (m_iSourceWidth % minCuSize) 311 304 { 312 305 m_aiPad[0] = m_confWinRight = ((m_iSourceWidth / minCuSize) + 1) * minCuSize - m_iSourceWidth; 313 306 m_iSourceWidth += m_confWinRight; 314 #if SVC_EXTENSION315 307 m_confWinRight /= TComSPS::getWinUnitX( m_chromaFormatIDC ); 316 #endif317 308 } 318 309 if (m_iSourceHeight % minCuSize) … … 325 316 m_aiPad[1] = m_confWinBottom << 1; 326 317 } 327 #if SVC_EXTENSION328 318 m_confWinBottom /= TComSPS::getWinUnitY( m_chromaFormatIDC ); 329 #endif330 319 } 331 320 break; … … 344 333 m_confWinRight = m_aiPad[0]; 345 334 m_confWinBottom = m_aiPad[1]; 346 #if SVC_EXTENSION347 335 m_confWinRight /= TComSPS::getWinUnitX( m_chromaFormatIDC ); 348 336 m_confWinBottom /= TComSPS::getWinUnitY( m_chromaFormatIDC ); 349 #endif350 337 break; 351 338 } … … 388 375 } 389 376 390 #if LAYER_CTB391 377 UInt maxCUWidth = m_uiMaxCUWidth; 392 378 UInt maxCUHeight = m_uiMaxCUHeight; 393 379 UInt maxCUDepth = m_uiMaxCUDepth; 394 #else395 UInt maxCUWidth = m_cAppEncCfg->getMaxCUWidth();396 UInt maxCUHeight = m_cAppEncCfg->getMaxCUHeight();397 UInt maxCUDepth = m_cAppEncCfg->getMaxCUDepth();398 #endif399 380 bool check_failed = false; /* abort if there is a fatal configuration problem */ 400 381 #define xConfirmPara(a,b) check_failed |= confirmPara(a,b) … … 409 390 } 410 391 411 #if SVC_EXTENSION412 392 xConfirmPara( m_iQP < -6 * (m_internalBitDepth[CHANNEL_TYPE_LUMA] - 8) || m_iQP > 51, "QP exceeds supported range (-QpBDOffsety to 51)" ); 413 #else 414 xConfirmPara( m_iQP < -6 * ((Int)m_cAppEncCfg->getInternalBitDepthY() - 8) || m_iQP > 51, "QP exceeds supported range (-QpBDOffsety to 51)" ); 415 #endif 416 417 m_iWaveFrontSubstreams = m_waveFrontSynchro ? (m_iSourceHeight + maxCUHeight - 1) / maxCUHeight : 1; 393 418 394 xConfirmPara( m_waveFrontSynchro < 0, "WaveFrontSynchro cannot be negative" ); 419 xConfirmPara( m_iWaveFrontSubstreams <= 0, "WaveFrontSubstreams must be positive" );420 xConfirmPara( m_iWaveFrontSubstreams > 1 && !m_waveFrontSynchro, "Must have WaveFrontSynchro > 0 in order to have WaveFrontSubstreams > 1" );421 395 422 396 //chekc parameters … … 427 401 xConfirmPara( m_aiPad[1] % TComSPS::getWinUnitY(CHROMA_420) != 0, "Vertical padding must be an integer multiple of the specified chroma subsampling"); 428 402 429 #if !SVC_EXTENSION 430 xConfirmPara( m_confLeft % TComSPS::getWinUnitX(CHROMA_420) != 0, "Left conformance window offset must be an integer multiple of the specified chroma subsampling"); 431 xConfirmPara( m_confRight % TComSPS::getWinUnitX(CHROMA_420) != 0, "Right conformance window offset must be an integer multiple of the specified chroma subsampling"); 432 xConfirmPara( m_confTop % TComSPS::getWinUnitY(CHROMA_420) != 0, "Top conformance window offset must be an integer multiple of the specified chroma subsampling"); 433 xConfirmPara( m_confBottom % TComSPS::getWinUnitY(CHROMA_420) != 0, "Bottom conformance window offset must be an integer multiple of the specified chroma subsampling"); 434 #endif 435 436 #if LAYER_CTB 403 xConfirmPara( m_iMaxCuDQPDepth > m_uiMaxCUDepth - 1, "Absolute depth for a minimum CuDQP exceeds maximum coding unit depth" ); 404 437 405 xConfirmPara( (m_uiMaxCUWidth >> m_uiMaxCUDepth) < 4, "Minimum partition width size should be larger than or equal to 8"); 438 406 xConfirmPara( (m_uiMaxCUHeight >> m_uiMaxCUDepth) < 4, "Minimum partition height size should be larger than or equal to 8"); … … 467 435 xConfirmPara( ui != 1 , "Height should be 2^n"); 468 436 } 469 #endif470 437 471 438 #undef xConfirmPara
Note: See TracChangeset for help on using the changeset viewer.