- Timestamp:
- 14 Nov 2013, 00:54:41 (11 years ago)
- Location:
- branches/SHM-4.0-dev/source
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.0-dev/source/App/TAppDecoder/TAppDecTop.cpp
r466 r467 242 242 if (!m_outputBitDepthY) { m_outputBitDepthY = g_bitDepthY; } 243 243 if (!m_outputBitDepthC) { m_outputBitDepthC = g_bitDepthC; } 244 244 245 m_acTVideoIOYuvReconFile[curLayerId].open( m_pchReconFile[curLayerId], true, m_outputBitDepthY, m_outputBitDepthC, g_bitDepthY, g_bitDepthC ); // write mode 245 246 -
branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r466 r467 362 362 Int* cfg_IntraPeriod [MAX_LAYERS]; 363 363 Int* cfg_conformanceMode [MAX_LAYERS]; 364 #if LAYER_CTB 365 // coding unit (CU) definition 366 UInt* cfg_uiMaxCUWidth[MAX_LAYERS]; ///< max. CU width in pixel 367 UInt* cfg_uiMaxCUHeight[MAX_LAYERS]; ///< max. CU height in pixel 368 UInt* cfg_uiMaxCUDepth[MAX_LAYERS]; ///< max. CU depth 369 370 // transfom unit (TU) definition 371 UInt* cfg_uiQuadtreeTULog2MaxSize[MAX_LAYERS]; 372 UInt* cfg_uiQuadtreeTULog2MinSize[MAX_LAYERS]; 373 374 UInt* cfg_uiQuadtreeTUMaxDepthInter[MAX_LAYERS]; 375 UInt* cfg_uiQuadtreeTUMaxDepthIntra[MAX_LAYERS]; 376 #endif 364 377 #if VPS_EXTN_DIRECT_REF_LAYERS 365 378 #if M0457_PREDICTION_INDICATIONS … … 379 392 string* cfg_predLayerIdsPtr [MAX_LAYERS]; 380 393 #endif 381 #if SCALED_REF_LAYER_OFFSETS382 394 string cfg_scaledRefLayerLeftOffset [MAX_LAYERS]; 383 395 string cfg_scaledRefLayerTopOffset [MAX_LAYERS]; … … 390 402 string* cfg_scaledRefLayerRightOffsetPtr [MAX_LAYERS]; 391 403 string* cfg_scaledRefLayerBottomOffsetPtr [MAX_LAYERS]; 392 #endif393 404 #if RC_SHVC_HARMONIZATION 394 405 Bool* cfg_RCEnableRateControl [MAX_LAYERS]; … … 424 435 cfg_IntraPeriod[layer] = &m_acLayerCfg[layer].m_iIntraPeriod; 425 436 cfg_conformanceMode[layer] = &m_acLayerCfg[layer].m_conformanceMode; 437 #if LAYER_CTB 438 // coding unit (CU) definition 439 cfg_uiMaxCUWidth[layer] = &m_acLayerCfg[layer].m_uiMaxCUWidth; 440 cfg_uiMaxCUHeight[layer] = &m_acLayerCfg[layer].m_uiMaxCUHeight; 441 cfg_uiMaxCUDepth[layer] = &m_acLayerCfg[layer].m_uiMaxCUDepth; 442 443 // transfom unit (TU) definition. 444 cfg_uiQuadtreeTULog2MaxSize[layer] = &m_acLayerCfg[layer].m_uiQuadtreeTULog2MaxSize; 445 cfg_uiQuadtreeTULog2MinSize[layer] = &m_acLayerCfg[layer].m_uiQuadtreeTULog2MinSize; 446 447 cfg_uiQuadtreeTUMaxDepthInter[layer] = &m_acLayerCfg[layer].m_uiQuadtreeTUMaxDepthInter; 448 cfg_uiQuadtreeTUMaxDepthIntra[layer] = &m_acLayerCfg[layer].m_uiQuadtreeTUMaxDepthIntra; 449 #endif 426 450 #if VPS_EXTN_DIRECT_REF_LAYERS 427 451 #if M0457_PREDICTION_INDICATIONS … … 437 461 cfg_predLayerIdsPtr [layer] = &cfg_predLayerIds[layer]; 438 462 #endif 439 #if SCALED_REF_LAYER_OFFSETS440 463 cfg_numScaledRefLayerOffsets [layer] = &m_acLayerCfg[layer].m_numScaledRefLayerOffsets; 441 464 for(Int i = 0; i < MAX_LAYERS; i++) … … 446 469 cfg_scaledRefLayerBottomOffsetPtr[layer] = &cfg_scaledRefLayerBottomOffset[layer]; 447 470 } 448 #endif449 471 #if RC_SHVC_HARMONIZATION 450 472 cfg_RCEnableRateControl[layer] = &m_acLayerCfg[layer].m_RCEnableRateControl; … … 477 499 string cfg_tileSets; 478 500 #endif 479 #else 501 #else //SVC_EXTENSION 480 502 string cfg_InputFile; 481 503 string cfg_BitstreamFile; 482 504 string cfg_ReconFile; 483 505 string cfg_dQPFile; 484 #endif 506 #endif //SVC_EXTENSION 485 507 string cfg_ColumnWidth; 486 508 string cfg_RowHeight; … … 541 563 ("InternalBitDepthC", m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)") 542 564 #endif 543 #if SCALED_REF_LAYER_OFFSETS544 565 ("NumScaledRefLayerOffsets%d", cfg_numScaledRefLayerOffsets, 0, MAX_LAYERS, "Number of scaled offset layer sets ") 545 566 ("ScaledRefLayerLeftOffset%d", cfg_scaledRefLayerLeftOffsetPtr, string(""), MAX_LAYERS, "Horizontal offset of top-left luma sample of scaled base layer picture with respect to" … … 551 572 ("ScaledRefLayerBottomOffset%d", cfg_scaledRefLayerBottomOffsetPtr,string(""), MAX_LAYERS, "Vertical offset of bottom-right luma sample of scaled base layer picture with respect to" 552 573 " bottom-right luma sample of the EL picture, in units of two luma samples") 553 #endif554 574 #if O0194_DIFFERENT_BITDEPTH_EL_BL 555 575 ("InputBitDepth%d", cfg_InputBitDepthY, 8, MAX_LAYERS, "Bit-depth of input file for layer %d") … … 576 596 ("IlSampleOnlyPred%d", m_ilSampleOnlyPred, 0, MAX_LAYERS, "Set inter_layer_sample_pred_only_flag for all slices") 577 597 #endif 578 #else 598 #else //SVC_EXTENSION 579 599 ("InputFile,i", cfg_InputFile, string(""), "Original YUV input file name") 580 600 ("BitstreamFile,b", cfg_BitstreamFile, string(""), "Bitstream output file name") … … 597 617 ("ConfBottom", m_confBottom, 0, "Bottom offset for window conformance mode 3") 598 618 ("FrameRate,-fr", m_iFrameRate, 0, "Frame rate") 599 #endif 619 #endif //SVC_EXTENSION 600 620 601 621 //Field coding parameters … … 614 634 ("FrameOnly", m_frameOnlyConstraintFlag, false, "Indicate that the bitstream contains only frames") 615 635 636 #if LAYER_CTB 637 // Unit definition parameters 638 ("MaxCUWidth%d", cfg_uiMaxCUWidth, 64u, MAX_LAYERS, "Maximum CU width") 639 ("MaxCUHeight%d", cfg_uiMaxCUHeight, 64u, MAX_LAYERS, "Maximum CU height") 640 // todo: remove defaults from MaxCUSize 641 ("MaxCUSize%d,s%d", cfg_uiMaxCUWidth, 64u, MAX_LAYERS, "Maximum CU size") 642 ("MaxCUSize%d,s%d", cfg_uiMaxCUHeight, 64u, MAX_LAYERS, "Maximum CU size") 643 ("MaxPartitionDepth%d,h%d", cfg_uiMaxCUDepth, 4u, MAX_LAYERS, "CU depth") 644 645 ("QuadtreeTULog2MaxSize%d", cfg_uiQuadtreeTULog2MaxSize, 6u, MAX_LAYERS, "Maximum TU size in logarithm base 2") 646 ("QuadtreeTULog2MinSize%d", cfg_uiQuadtreeTULog2MinSize, 2u, MAX_LAYERS, "Minimum TU size in logarithm base 2") 647 648 ("QuadtreeTUMaxDepthIntra%d", cfg_uiQuadtreeTUMaxDepthIntra, 1u, MAX_LAYERS, "Depth of TU tree for intra CUs") 649 ("QuadtreeTUMaxDepthInter%d", cfg_uiQuadtreeTUMaxDepthInter, 2u, MAX_LAYERS, "Depth of TU tree for inter CUs") 650 651 652 // set the same CU realted settings across all the layers if config file parameters are not layer specific 653 ("MaxCUWidth", cfg_uiMaxCUWidth, 64u, MAX_LAYERS, "Maximum CU width") 654 ("MaxCUHeight", cfg_uiMaxCUHeight, 64u, MAX_LAYERS, "Maximum CU height") 655 // todo: remove defaults from MaxCUSize 656 ("MaxCUSize,s", cfg_uiMaxCUWidth, 64u, MAX_LAYERS, "Maximum CU size") 657 ("MaxCUSize,s", cfg_uiMaxCUHeight, 64u, MAX_LAYERS, "Maximum CU size") 658 ("MaxPartitionDepth,h", cfg_uiMaxCUDepth, 4u, MAX_LAYERS, "CU depth") 659 660 ("QuadtreeTULog2MaxSize", cfg_uiQuadtreeTULog2MaxSize, 6u, MAX_LAYERS, "Maximum TU size in logarithm base 2") 661 ("QuadtreeTULog2MinSize", cfg_uiQuadtreeTULog2MinSize, 2u, MAX_LAYERS, "Minimum TU size in logarithm base 2") 662 663 ("QuadtreeTUMaxDepthIntra", cfg_uiQuadtreeTUMaxDepthIntra, 1u, MAX_LAYERS, "Depth of TU tree for intra CUs") 664 ("QuadtreeTUMaxDepthInter", cfg_uiQuadtreeTUMaxDepthInter, 2u, MAX_LAYERS, "Depth of TU tree for inter CUs") 665 #else 616 666 // Unit definition parameters 617 667 ("MaxCUWidth", m_uiMaxCUWidth, 64u) … … 627 677 ("QuadtreeTUMaxDepthIntra", m_uiQuadtreeTUMaxDepthIntra, 1u, "Depth of TU tree for intra CUs") 628 678 ("QuadtreeTUMaxDepthInter", m_uiQuadtreeTUMaxDepthInter, 2u, "Depth of TU tree for inter CUs") 679 #endif 629 680 630 681 // Coding structure paramters … … 950 1001 m_BLSyntaxFile = cfg_BLSyntaxFile.empty() ? NULL : strdup(cfg_BLSyntaxFile.c_str()); 951 1002 #endif 952 #else 1003 #else //SVC_EXTENSION 953 1004 m_pchInputFile = cfg_InputFile.empty() ? NULL : strdup(cfg_InputFile.c_str()); 954 1005 m_pchBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str()); 955 1006 m_pchReconFile = cfg_ReconFile.empty() ? NULL : strdup(cfg_ReconFile.c_str()); 956 1007 m_pchdQPFile = cfg_dQPFile.empty() ? NULL : strdup(cfg_dQPFile.c_str()); 957 #endif 1008 #endif //SVC_EXTENSION 958 1009 959 1010 Char* pColumnWidth = cfg_ColumnWidth.empty() ? NULL: strdup(cfg_ColumnWidth.c_str()); … … 1014 1065 m_pRowHeight = NULL; 1015 1066 } 1016 #if S CALED_REF_LAYER_OFFSETS1067 #if SVC_EXTENSION 1017 1068 for(Int layer = 0; layer < MAX_LAYERS; layer++) 1018 1069 { … … 1084 1135 } 1085 1136 } 1086 #endif1087 1137 #if VPS_EXTN_DIRECT_REF_LAYERS 1088 1138 #if M0457_PREDICTION_INDICATIONS … … 1214 1264 } 1215 1265 #endif 1266 #endif //SVC_EXTENSION 1216 1267 m_scalingListFile = cfg_ScalingListFile.empty() ? NULL : strdup(cfg_ScalingListFile.c_str()); 1217 1268 … … 1443 1494 1444 1495 // set global varibles 1496 #if LAYER_CTB 1497 for(Int layer = 0; layer < MAX_LAYERS; layer++) 1498 { 1499 xSetGlobal(layer); 1500 } 1501 #else 1445 1502 xSetGlobal(); 1503 #endif 1446 1504 1447 1505 // print-out parameters … … 1510 1568 xConfirmPara( m_bipredSearchRange < 0 , "Search Range must be more than 0" ); 1511 1569 xConfirmPara( m_iMaxDeltaQP > 7, "Absolute Delta QP exceeds supported range (0 to 7)" ); 1570 #if LAYER_CTB 1571 for(UInt layer = 0; layer < MAX_LAYERS; layer++) 1572 { 1573 xConfirmPara( m_iMaxCuDQPDepth > m_acLayerCfg[layer].m_uiMaxCUDepth - 1, "Absolute depth for a minimum CuDQP exceeds maximum coding unit depth" ); 1574 } 1575 #else 1512 1576 xConfirmPara( m_iMaxCuDQPDepth > m_uiMaxCUDepth - 1, "Absolute depth for a minimum CuDQP exceeds maximum coding unit depth" ); 1577 #endif 1513 1578 1514 1579 xConfirmPara( m_cbQpOffset < -12, "Min. Chroma Cb QP Offset is -12" ); … … 1524 1589 } 1525 1590 #endif 1591 #if !LAYER_CTB 1526 1592 xConfirmPara( (m_uiMaxCUWidth >> m_uiMaxCUDepth) < 4, "Minimum partition width size should be larger than or equal to 8"); 1527 1593 xConfirmPara( (m_uiMaxCUHeight >> m_uiMaxCUDepth) < 4, "Minimum partition height size should be larger than or equal to 8"); 1528 1594 xConfirmPara( m_uiMaxCUWidth < 16, "Maximum partition width size should be larger than or equal to 16"); 1529 1595 xConfirmPara( m_uiMaxCUHeight < 16, "Maximum partition height size should be larger than or equal to 16"); 1596 #endif 1530 1597 #if !SVC_EXTENSION 1531 1598 xConfirmPara( (m_iSourceWidth % (m_uiMaxCUWidth >> (m_uiMaxCUDepth-1)))!=0, "Resulting coded frame width must be a multiple of the minimum CU size"); … … 1533 1600 #endif 1534 1601 1602 #if !LAYER_CTB 1535 1603 xConfirmPara( m_uiQuadtreeTULog2MinSize < 2, "QuadtreeTULog2MinSize must be 2 or greater."); 1536 1604 xConfirmPara( m_uiQuadtreeTULog2MaxSize > 5, "QuadtreeTULog2MaxSize must be 5 or smaller."); … … 1546 1614 xConfirmPara( m_uiQuadtreeTUMaxDepthIntra < 1, "QuadtreeTUMaxDepthIntra must be greater than or equal to 1" ); 1547 1615 xConfirmPara( m_uiMaxCUWidth < ( 1 << (m_uiQuadtreeTULog2MinSize + m_uiQuadtreeTUMaxDepthIntra - 1) ), "QuadtreeTUMaxDepthInter must be less than or equal to the difference between log2(maxCUSize) and QuadtreeTULog2MinSize plus 1" ); 1616 #endif 1548 1617 1549 1618 xConfirmPara( m_maxNumMergeCand < 1, "MaxNumMergeCand must be 1 or greater."); … … 1593 1662 #endif 1594 1663 1664 #if !LAYER_CTB 1595 1665 // max CU width and height should be power of 2 1596 1666 UInt ui = m_uiMaxCUWidth; … … 1608 1678 xConfirmPara( ui != 1 , "Height should be 2^n"); 1609 1679 } 1610 1680 #endif 1611 1681 1612 1682 /* if this is an intra-only sequence, ie IntraPeriod=1, don't verify the GOP structure … … 2005 2075 Int m_iSourceWidth = m_acLayerCfg[layer].m_iSourceWidth; 2006 2076 Int m_iSourceHeight = m_acLayerCfg[layer].m_iSourceHeight; 2077 #if LAYER_CTB 2078 Int m_uiMaxCUWidth = m_acLayerCfg[layer].m_uiMaxCUWidth; 2079 Int m_uiMaxCUHeight = m_acLayerCfg[layer].m_uiMaxCUHeight; 2080 #endif 2007 2081 #endif 2008 2082 if(m_vuiParametersPresentFlag && m_bitstreamRestrictionFlag) … … 2249 2323 /** \todo use of global variables should be removed later 2250 2324 */ 2325 #if LAYER_CTB 2326 Void TAppEncCfg::xSetGlobal(UInt layerId) 2327 { 2328 // set max CU width & height 2329 g_auiLayerMaxCUWidth[layerId] = m_acLayerCfg[layerId].m_uiMaxCUWidth; 2330 g_auiLayerMaxCUHeight[layerId] = m_acLayerCfg[layerId].m_uiMaxCUHeight; 2331 2332 // compute actual CU depth with respect to config depth and max transform size 2333 g_auiLayerAddCUDepth[layerId] = 0; 2334 while( (m_acLayerCfg[layerId].m_uiMaxCUWidth>>m_acLayerCfg[layerId].m_uiMaxCUDepth) > ( 1 << ( m_acLayerCfg[layerId].m_uiQuadtreeTULog2MinSize + g_auiLayerAddCUDepth[layerId] ) ) ) g_auiLayerAddCUDepth[layerId]++; 2335 2336 m_acLayerCfg[layerId].m_uiMaxCUDepth += g_auiLayerAddCUDepth[layerId]; 2337 g_auiLayerAddCUDepth[layerId]++; 2338 g_auiLayerMaxCUDepth[layerId] = m_acLayerCfg[layerId].m_uiMaxCUDepth; 2339 2340 #if O0194_DIFFERENT_BITDEPTH_EL_BL 2341 // set internal bit-depth to constant value to make sure to be updated later 2342 g_bitDepthY = -1; 2343 g_bitDepthC = -1; 2344 2345 g_uiPCMBitDepthLuma = -1; 2346 g_uiPCMBitDepthChroma = -1; 2347 #else 2348 // set internal bit-depth and constants 2349 g_bitDepthY = m_internalBitDepthY; 2350 g_bitDepthC = m_internalBitDepthC; 2351 2352 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_inputBitDepthY : m_internalBitDepthY; 2353 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_inputBitDepthC : m_internalBitDepthC; 2354 #endif 2355 } 2356 #else 2251 2357 Void TAppEncCfg::xSetGlobal() 2252 2358 { … … 2278 2384 #endif 2279 2385 } 2386 #endif 2280 2387 2281 2388 Void TAppEncCfg::xPrintParameter() … … 2331 2438 printf("Frame index : %u - %d (%d frames)\n", m_FrameSkip, m_FrameSkip+m_framesToBeEncoded-1, m_framesToBeEncoded ); 2332 2439 } 2440 #if !LAYER_CTB 2333 2441 printf("CU size / depth : %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth ); 2334 2442 printf("RQT trans. size (min / max) : %d / %d\n", 1 << m_uiQuadtreeTULog2MinSize, 1 << m_uiQuadtreeTULog2MaxSize ); 2335 2443 printf("Max RQT depth inter : %d\n", m_uiQuadtreeTUMaxDepthInter); 2336 2444 printf("Max RQT depth intra : %d\n", m_uiQuadtreeTUMaxDepthIntra); 2445 #endif 2337 2446 printf("Min PCM size : %d\n", 1 << m_uiPCMLog2MinSize); 2338 2447 printf("Motion search range : %d\n", m_iSearchRange ); … … 2422 2531 printf("CIP:%d ", m_bUseConstrainedIntraPred); 2423 2532 printf("SAO:%d ", (m_bUseSAO)?(1):(0)); 2533 #if !LAYER_CTB 2424 2534 printf("PCM:%d ", (m_usePCM && (1<<m_uiPCMLog2MinSize) <= m_uiMaxCUWidth)? 1 : 0); 2535 #endif 2425 2536 printf("SAOLcuBasedOptimization:%d ", (m_saoLcuBasedOptimization)?(1):(0)); 2426 2537 … … 2472 2583 } 2473 2584 2474 #if S CALED_REF_LAYER_OFFSETS2585 #if SVC_EXTENSION 2475 2586 Void TAppEncCfg::cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString) 2476 2587 { … … 2505 2616 } 2506 2617 } 2507 #endif2508 2618 2509 2619 #if FINAL_RPL_CHANGE_N0082 … … 2721 2831 } 2722 2832 #endif 2833 #endif //SVC_EXTENSION 2723 2834 //! \} -
branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncCfg.h
r466 r467 150 150 Int m_maxTempLayer; ///< Max temporal layer 151 151 152 #if !LAYER_CTB 152 153 // coding unit (CU) definition 153 154 UInt m_uiMaxCUWidth; ///< max. CU width in pixel … … 161 162 UInt m_uiQuadtreeTUMaxDepthInter; 162 163 UInt m_uiQuadtreeTUMaxDepthIntra; 164 #endif 163 165 164 166 // coding tools (bit-depth) … … 355 357 #endif 356 358 // internal member functions 359 #if LAYER_CTB 360 Void xSetGlobal (UInt layerId); ///< set global variables 361 #else 357 362 Void xSetGlobal (); ///< set global variables 363 #endif 358 364 Void xCheckParameter (); ///< check validity of configuration values 359 365 Void xPrintParameter (); ///< print configuration values … … 399 405 UInt getInternalBitDepthC() {return m_internalBitDepthC; } 400 406 #endif 407 #if !LAYER_CTB 401 408 UInt getMaxCUWidth() {return m_uiMaxCUWidth; } 402 409 UInt getMaxCUHeight() {return m_uiMaxCUHeight; } 403 410 UInt getMaxCUDepth() {return m_uiMaxCUDepth; } 411 #endif 404 412 Int getDecodingRefreshType() {return m_iDecodingRefreshType; } 405 413 Int getWaveFrontSynchro() { return m_iWaveFrontSynchro; } … … 408 416 Char* getBLSyntaxFile() { return m_BLSyntaxFile; } 409 417 #endif 410 #if SCALED_REF_LAYER_OFFSETS411 418 Void cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString); 412 #endif413 419 #if REPN_FORMAT_IN_VPS 414 420 RepFormatCfg* getRepFormatCfg(Int i) { return &m_repFormatCfg[i]; } 415 421 #endif 422 #if LAYER_CTB 423 Bool getUsePCM() { return m_usePCM; } 424 UInt getPCMLog2MinSize () { return m_uiPCMLog2MinSize; } 425 #endif 416 426 #endif 417 427 };// END CLASS DEFINITION TAppEncCfg -
branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r466 r467 38 38 m_confLeft = m_confRight = m_confTop = m_confBottom = 0; 39 39 m_aiPad[1] = m_aiPad[0] = 0; 40 #if SCALED_REF_LAYER_OFFSETS41 40 m_numScaledRefLayerOffsets = 0; 42 41 ::memset(m_scaledRefLayerLeftOffset, 0, sizeof(m_scaledRefLayerLeftOffset)); … … 44 43 ::memset(m_scaledRefLayerRightOffset, 0, sizeof(m_scaledRefLayerRightOffset)); 45 44 ::memset(m_scaledRefLayerBottomOffset, 0, sizeof(m_scaledRefLayerBottomOffset)); 46 #endif47 45 } 48 46 … … 142 140 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_confLeft - m_confRight, m_iSourceHeight - m_confTop - m_confBottom, m_iFrameRate ); 143 141 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); 142 #if LAYER_CTB 143 printf("CU size / depth : %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth ); 144 printf("RQT trans. size (min / max) : %d / %d\n", 1 << m_uiQuadtreeTULog2MinSize, 1 << m_uiQuadtreeTULog2MaxSize ); 145 printf("Max RQT depth inter : %d\n", m_uiQuadtreeTUMaxDepthInter); 146 printf("Max RQT depth intra : %d\n", m_uiQuadtreeTUMaxDepthIntra); 147 #endif 144 148 printf("QP : %5.2f\n", m_fQP ); 145 149 printf("Intra period : %d\n", m_iIntraPeriod ); … … 157 161 #endif 158 162 printf("WaveFrontSynchro:%d WaveFrontSubstreams:%d", m_cAppEncCfg->getWaveFrontSynchro(), m_iWaveFrontSubstreams); 163 #if LAYER_CTB 164 printf("PCM:%d ", (m_cAppEncCfg->getUsePCM() && (1<<m_cAppEncCfg->getPCMLog2MinSize()) <= m_uiMaxCUWidth)? 1 : 0); 165 #endif 159 166 } 160 167 … … 175 182 { 176 183 // automatic padding to minimum CU size 184 #if LAYER_CTB 185 Int minCuSize = m_uiMaxCUHeight >> (m_uiMaxCUDepth - 1); 186 #else 177 187 Int minCuSize = m_cAppEncCfg->getMaxCUHeight() >> (m_cAppEncCfg->getMaxCUDepth() - 1); 188 #endif 178 189 if (m_iSourceWidth % minCuSize) 179 190 { … … 240 251 } 241 252 253 #if LAYER_CTB 254 UInt maxCUWidth = m_uiMaxCUWidth; 255 UInt maxCUHeight = m_uiMaxCUHeight; 256 UInt maxCUDepth = m_uiMaxCUDepth; 257 #else 242 258 UInt maxCUWidth = m_cAppEncCfg->getMaxCUWidth(); 243 259 UInt maxCUHeight = m_cAppEncCfg->getMaxCUHeight(); 244 260 UInt maxCUDepth = m_cAppEncCfg->getMaxCUDepth(); 261 #endif 245 262 bool check_failed = false; /* abort if there is a fatal configuration problem */ 246 263 #define xConfirmPara(a,b) check_failed |= confirmPara(a,b) … … 264 281 265 282 266 m_iWaveFrontSubstreams = m_cAppEncCfg->getWaveFrontSynchro() ? (m_iSourceHeight + m _cAppEncCfg->getMaxCUHeight() - 1) / m_cAppEncCfg->getMaxCUHeight(): 1;283 m_iWaveFrontSubstreams = m_cAppEncCfg->getWaveFrontSynchro() ? (m_iSourceHeight + maxCUHeight - 1) / maxCUHeight : 1; 267 284 xConfirmPara( m_iWaveFrontSubstreams <= 0, "WaveFrontSubstreams must be positive" ); 268 285 xConfirmPara( m_iWaveFrontSubstreams > 1 && !m_cAppEncCfg->getWaveFrontSynchro(), "Must have WaveFrontSynchro > 0 in order to have WaveFrontSubstreams > 1" ); … … 279 296 xConfirmPara( m_confTop % TComSPS::getWinUnitY(CHROMA_420) != 0, "Top conformance window offset must be an integer multiple of the specified chroma subsampling"); 280 297 xConfirmPara( m_confBottom % TComSPS::getWinUnitY(CHROMA_420) != 0, "Bottom conformance window offset must be an integer multiple of the specified chroma subsampling"); 298 299 #if LAYER_CTB 300 xConfirmPara( (m_uiMaxCUWidth >> m_uiMaxCUDepth) < 4, "Minimum partition width size should be larger than or equal to 8"); 301 xConfirmPara( (m_uiMaxCUHeight >> m_uiMaxCUDepth) < 4, "Minimum partition height size should be larger than or equal to 8"); 302 xConfirmPara( m_uiMaxCUWidth < 16, "Maximum partition width size should be larger than or equal to 16"); 303 xConfirmPara( m_uiMaxCUHeight < 16, "Maximum partition height size should be larger than or equal to 16"); 304 xConfirmPara( m_uiQuadtreeTULog2MinSize < 2, "QuadtreeTULog2MinSize must be 2 or greater."); 305 xConfirmPara( m_uiQuadtreeTULog2MaxSize > 5, "QuadtreeTULog2MaxSize must be 5 or smaller."); 306 xConfirmPara( (1<<m_uiQuadtreeTULog2MaxSize) > m_uiMaxCUWidth, "QuadtreeTULog2MaxSize must be log2(maxCUSize) or smaller."); 307 xConfirmPara( m_uiQuadtreeTULog2MaxSize < m_uiQuadtreeTULog2MinSize, "QuadtreeTULog2MaxSize must be greater than or equal to m_uiQuadtreeTULog2MinSize."); 308 xConfirmPara( (1<<m_uiQuadtreeTULog2MinSize)>(m_uiMaxCUWidth >>(m_uiMaxCUDepth-1)), "QuadtreeTULog2MinSize must not be greater than minimum CU size" ); // HS 309 xConfirmPara( (1<<m_uiQuadtreeTULog2MinSize)>(m_uiMaxCUHeight>>(m_uiMaxCUDepth-1)), "QuadtreeTULog2MinSize must not be greater than minimum CU size" ); // HS 310 xConfirmPara( ( 1 << m_uiQuadtreeTULog2MinSize ) > ( m_uiMaxCUWidth >> m_uiMaxCUDepth ), "Minimum CU width must be greater than minimum transform size." ); 311 xConfirmPara( ( 1 << m_uiQuadtreeTULog2MinSize ) > ( m_uiMaxCUHeight >> m_uiMaxCUDepth ), "Minimum CU height must be greater than minimum transform size." ); 312 xConfirmPara( m_uiQuadtreeTUMaxDepthInter < 1, "QuadtreeTUMaxDepthInter must be greater than or equal to 1" ); 313 xConfirmPara( m_uiMaxCUWidth < ( 1 << (m_uiQuadtreeTULog2MinSize + m_uiQuadtreeTUMaxDepthInter - 1) ), "QuadtreeTUMaxDepthInter must be less than or equal to the difference between log2(maxCUSize) and QuadtreeTULog2MinSize plus 1" ); 314 xConfirmPara( m_uiQuadtreeTUMaxDepthIntra < 1, "QuadtreeTUMaxDepthIntra must be greater than or equal to 1" ); 315 xConfirmPara( m_uiMaxCUWidth < ( 1 << (m_uiQuadtreeTULog2MinSize + m_uiQuadtreeTUMaxDepthIntra - 1) ), "QuadtreeTUMaxDepthInter must be less than or equal to the difference between log2(maxCUSize) and QuadtreeTULog2MinSize plus 1" ); 316 317 // max CU width and height should be power of 2 318 UInt ui = m_uiMaxCUWidth; 319 while(ui) 320 { 321 ui >>= 1; 322 if( (ui & 1) == 1) 323 xConfirmPara( ui != 1 , "Width should be 2^n"); 324 } 325 ui = m_uiMaxCUHeight; 326 while(ui) 327 { 328 ui >>= 1; 329 if( (ui & 1) == 1) 330 xConfirmPara( ui != 1 , "Height should be 2^n"); 331 } 332 #endif 333 281 334 #undef xConfirmPara 282 335 return check_failed; 283 336 } 284 337 285 #endif 338 #endif //SVC_EXTENSION 286 339 287 340 -
branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
r466 r467 43 43 Int m_iIntraPeriod; ///< period of I-slice (random access period) 44 44 Double m_fQP; ///< QP value of key-picture (floating point) 45 #if SVC_EXTENSION 45 46 #if VPS_EXTN_DIRECT_REF_LAYERS 46 47 #if M0457_PREDICTION_INDICATIONS … … 55 56 Int *m_predLayerIds; 56 57 Int m_numActiveRefLayers; 58 #endif 59 60 #if LAYER_CTB 61 // coding unit (CU) definition 62 UInt m_uiMaxCUWidth; ///< max. CU width in pixel 63 UInt m_uiMaxCUHeight; ///< max. CU height in pixel 64 UInt m_uiMaxCUDepth; ///< max. CU depth 65 66 // transfom unit (TU) definition 67 UInt m_uiQuadtreeTULog2MaxSize; 68 UInt m_uiQuadtreeTULog2MinSize; 69 70 UInt m_uiQuadtreeTUMaxDepthInter; 71 UInt m_uiQuadtreeTUMaxDepthIntra; 57 72 #endif 58 73 … … 70 85 Int m_maxTidIlRefPicsPlus1; 71 86 #endif 72 #if SVC_EXTENSION73 87 Int m_iWaveFrontSubstreams; //< If iWaveFrontSynchro, this is the number of substreams per frame (dependent tiles) or per tile (independent tiles). 74 #endif 88 #endif //SVC_EXTENSION 75 89 76 90 Int m_iQP; ///< QP value of key-picture (integer) … … 78 92 Int* m_aidQP; ///< array of slice QP values 79 93 TAppEncCfg* m_cAppEncCfg; ///< pointer to app encoder config 80 #if S CALED_REF_LAYER_OFFSETS94 #if SVC_EXTENSION 81 95 Int m_numScaledRefLayerOffsets ; 82 96 Int m_scaledRefLayerLeftOffset [MAX_LAYERS]; … … 84 98 Int m_scaledRefLayerRightOffset [MAX_LAYERS]; 85 99 Int m_scaledRefLayerBottomOffset[MAX_LAYERS]; 86 #endif87 100 #if FINAL_RPL_CHANGE_N0082 88 101 GOPEntry m_GOPListLayer[MAX_GOP]; ///< for layer … … 99 112 Int m_repFormatIdx; 100 113 #endif 114 #endif //SVC_EXTENSION 101 115 public: 102 116 TAppEncLayerCfg(); … … 133 147 Int getIntQP() {return m_iQP; } 134 148 Int* getdQPs() {return m_aidQP; } 149 #if SVC_EXTENSION 135 150 #if VPS_EXTN_DIRECT_REF_LAYERS 136 151 #if M0457_PREDICTION_INDICATIONS … … 172 187 Int getMaxTidIlRefPicsPlus1() { return m_maxTidIlRefPicsPlus1; } 173 188 #endif 189 #if LAYER_CTB 190 UInt getMaxCUWidth() {return m_uiMaxCUWidth; } 191 UInt getMaxCUHeight() {return m_uiMaxCUHeight; } 192 UInt getMaxCUDepth() {return m_uiMaxCUDepth; } 193 #endif 194 #endif //SVC_EXTENSION 174 195 }; // END CLASS DEFINITION TAppEncLayerCfg 175 196 -
branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncTop.cpp
r466 r467 375 375 m_acTEncTop[layer].setUseRDOQTS ( m_useRDOQTS ); 376 376 m_acTEncTop[layer].setRDpenalty ( m_rdPenalty ); 377 #if LAYER_CTB 378 m_acTEncTop[layer].setQuadtreeTULog2MaxSize ( m_acLayerCfg[layer].m_uiQuadtreeTULog2MaxSize ); 379 m_acTEncTop[layer].setQuadtreeTULog2MinSize ( m_acLayerCfg[layer].m_uiQuadtreeTULog2MinSize ); 380 m_acTEncTop[layer].setQuadtreeTUMaxDepthInter ( m_acLayerCfg[layer].m_uiQuadtreeTUMaxDepthInter ); 381 m_acTEncTop[layer].setQuadtreeTUMaxDepthIntra ( m_acLayerCfg[layer].m_uiQuadtreeTUMaxDepthIntra ); 382 #else 377 383 m_acTEncTop[layer].setQuadtreeTULog2MaxSize ( m_uiQuadtreeTULog2MaxSize ); 378 384 m_acTEncTop[layer].setQuadtreeTULog2MinSize ( m_uiQuadtreeTULog2MinSize ); 379 385 m_acTEncTop[layer].setQuadtreeTUMaxDepthInter ( m_uiQuadtreeTUMaxDepthInter ); 380 386 m_acTEncTop[layer].setQuadtreeTUMaxDepthIntra ( m_uiQuadtreeTUMaxDepthIntra ); 387 #endif 381 388 m_acTEncTop[layer].setUseFastEnc ( m_bUseFastEnc ); 382 389 m_acTEncTop[layer].setUseEarlyCU ( m_bUseEarlyCU ); … … 417 424 m_acTEncTop[layer].setSliceSegmentMode ( m_sliceSegmentMode ); 418 425 m_acTEncTop[layer].setSliceSegmentArgument ( m_sliceSegmentArgument ); 426 #if LAYER_CTB 427 Int iNumPartInCU = 1<<(m_acLayerCfg[layer].m_uiMaxCUDepth<<1); 428 #else 419 429 Int iNumPartInCU = 1<<(m_uiMaxCUDepth<<1); 430 #endif 420 431 if(m_sliceSegmentMode==FIXED_NUMBER_OF_LCU) 421 432 { … … 574 585 m_acTEncTop[layer].setLog2MaxMvLengthVertical( m_log2MaxMvLengthVertical ); 575 586 m_acTEncTop[layer].setElRapSliceTypeB(layer == 0? 0 : m_elRapSliceBEnabled); 576 #if SCALED_REF_LAYER_OFFSETS577 587 if( layer > 0 ) 578 588 { … … 584 594 } 585 595 } 586 #endif587 596 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 588 597 m_acTEncTop[layer].setAdaptiveResolutionChange( m_adaptiveResolutionChange ); … … 590 599 } 591 600 } 592 #else 601 #else //SVC_EXTENSION 593 602 Void TAppEncTop::xInitLibCfg() 594 603 { … … 864 873 m_cTEncTop.setLog2MaxMvLengthVertical( m_log2MaxMvLengthVertical ); 865 874 } 866 #endif 875 #endif //SVC_EXTENSION 867 876 868 877 Void TAppEncTop::xCreateLib() … … 875 884 for(UInt layer=0; layer<m_numLayers; layer++) 876 885 { 886 #if LAYER_CTB 887 g_uiMaxCUWidth = g_auiLayerMaxCUWidth[layer]; 888 g_uiMaxCUHeight = g_auiLayerMaxCUHeight[layer]; 889 g_uiMaxCUDepth = g_auiLayerMaxCUDepth[layer]; 890 g_uiAddCUDepth = g_auiLayerAddCUDepth[layer]; 891 #endif 877 892 #if O0194_DIFFERENT_BITDEPTH_EL_BL 878 893 //2 … … 901 916 m_acTEncTop[layer].create(); 902 917 } 903 #else 918 #else //SVC_EXTENSION 904 919 m_cTVideoIOYuvInputFile.open( m_pchInputFile, false, m_inputBitDepthY, m_inputBitDepthC, m_internalBitDepthY, m_internalBitDepthC ); // read mode 905 920 m_cTVideoIOYuvInputFile.skipFrames(m_FrameSkip, m_iSourceWidth - m_aiPad[0], m_iSourceHeight - m_aiPad[1]); … … 910 925 // Neo Decoder 911 926 m_cTEncTop.create(); 912 #endif 927 #endif //SVC_EXTENSION 913 928 } 914 929 … … 922 937 for(UInt layer=0; layer<m_numLayers; layer++) 923 938 { 939 #if LAYER_CTB 940 g_uiMaxCUWidth = g_auiLayerMaxCUWidth[layer]; 941 g_uiMaxCUHeight = g_auiLayerMaxCUHeight[layer]; 942 g_uiMaxCUDepth = g_auiLayerMaxCUDepth[layer]; 943 g_uiAddCUDepth = g_auiLayerAddCUDepth[layer]; 944 #endif 945 924 946 m_acTVideoIOYuvInputFile[layer].close(); 925 947 m_acTVideoIOYuvReconFile[layer].close(); … … 927 949 m_acTEncTop[layer].destroy(); 928 950 } 929 #else 951 #else //SVC_EXTENSION 930 952 m_cTVideoIOYuvInputFile.close(); 931 953 m_cTVideoIOYuvReconFile.close(); … … 933 955 // Neo Decoder 934 956 m_cTEncTop.destroy(); 935 #endif 957 #endif //SVC_EXTENSION 936 958 } 937 959 … … 941 963 for(UInt layer=0; layer<m_numLayers; layer++) 942 964 { 965 #if LAYER_CTB 966 g_uiMaxCUWidth = g_auiLayerMaxCUWidth[layer]; 967 g_uiMaxCUHeight = g_auiLayerMaxCUHeight[layer]; 968 g_uiMaxCUDepth = g_auiLayerMaxCUDepth[layer]; 969 g_uiAddCUDepth = g_auiLayerAddCUDepth[layer]; 970 971 memcpy( g_auiZscanToRaster, g_auiLayerZscanToRaster[layer], sizeof( g_auiZscanToRaster ) ); 972 memcpy( g_auiRasterToZscan, g_auiLayerRasterToZscan[layer], sizeof( g_auiRasterToZscan ) ); 973 memcpy( g_auiRasterToPelX, g_auiLayerRasterToPelX[layer], sizeof( g_auiRasterToPelX ) ); 974 memcpy( g_auiRasterToPelY, g_auiLayerRasterToPelY[layer], sizeof( g_auiRasterToPelY ) ); 975 #endif 943 976 #if O0194_DIFFERENT_BITDEPTH_EL_BL 944 977 //3 … … 1058 1091 #endif 1059 1092 // Target output layer 1060 #if VPS_PROFILE_OUTPUT_LAYERS1061 1093 vps->setNumOutputLayerSets(vps->getNumLayerSets()); 1062 1094 vps->setNumProfileTierLevel(vps->getNumLayerSets()); … … 1067 1099 vps->setOutputLayerSetIdx(i, i); 1068 1100 } 1069 #else 1070 vps->setNumOutputLayerSets(1); 1071 Int lsIdx = 1; 1072 vps->setOutputLayerSetIdx(0, lsIdx); // Because only one layer set 1073 #endif 1101 1074 1102 for(Int lsIdx = 1; lsIdx < vps->getNumLayerSets(); lsIdx++) 1075 1103 { … … 1228 1256 { 1229 1257 #if SVC_UPSAMPLING 1258 #if LAYER_CTB 1259 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, NULL ); 1260 #else 1230 1261 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL ); 1262 #endif 1231 1263 #else 1232 1264 pcPicYuvOrg->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth ); … … 1236 1268 { 1237 1269 #if SVC_UPSAMPLING 1270 #if LAYER_CTB 1271 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, NULL ); 1272 #else 1238 1273 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL ); 1274 #endif 1239 1275 #else 1240 1276 pcPicYuvOrg->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth ); … … 1271 1307 for(UInt layer=0; layer<m_numLayers; layer++) 1272 1308 { 1309 #if LAYER_CTB 1310 g_uiMaxCUWidth = g_auiLayerMaxCUWidth[layer]; 1311 g_uiMaxCUHeight = g_auiLayerMaxCUHeight[layer]; 1312 g_uiMaxCUDepth = g_auiLayerMaxCUDepth[layer]; 1313 g_uiAddCUDepth = g_auiLayerAddCUDepth[layer]; 1314 #endif 1273 1315 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1274 1316 //6 … … 1346 1388 for(UInt layer=0; layer<m_numLayers; layer++) 1347 1389 { 1390 #if LAYER_CTB 1391 g_uiMaxCUWidth = g_auiLayerMaxCUWidth[layer]; 1392 g_uiMaxCUHeight = g_auiLayerMaxCUHeight[layer]; 1393 g_uiMaxCUDepth = g_auiLayerMaxCUDepth[layer]; 1394 g_uiAddCUDepth = g_auiLayerAddCUDepth[layer]; 1395 1396 memcpy( g_auiZscanToRaster, g_auiLayerZscanToRaster[layer], sizeof( g_auiZscanToRaster ) ); 1397 memcpy( g_auiRasterToZscan, g_auiLayerRasterToZscan[layer], sizeof( g_auiRasterToZscan ) ); 1398 memcpy( g_auiRasterToPelX, g_auiLayerRasterToPelX[layer], sizeof( g_auiRasterToPelX ) ); 1399 memcpy( g_auiRasterToPelY, g_auiLayerRasterToPelY[layer], sizeof( g_auiRasterToPelY ) ); 1400 #endif 1348 1401 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1349 1402 //7 … … 1627 1680 1628 1681 #if SVC_UPSAMPLING 1682 #if LAYER_CTB 1683 rpcPicYuvRec->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, NULL ); 1684 #else 1629 1685 rpcPicYuvRec->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL ); 1686 #endif 1630 1687 #else 1631 1688 rpcPicYuvRec->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth ); -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TComDataCU.cpp
r466 r467 4004 4004 uiPelY = (UInt)Clip3<UInt>(0, m_pcPic->getPicYuvRec()->getHeight() - 1, uiPelY); 4005 4005 4006 #if !LAYER_CTB 4006 4007 UInt uiMinUnitSize = m_pcPic->getMinCUWidth(); 4007 4008 #if SCALED_REF_LAYER_OFFSETS 4008 #endif 4009 4009 4010 Int leftStartL = this->getSlice()->getSPS()->getScaledRefLayerWindow(refLayerIdc).getWindowLeftOffset(); 4010 4011 Int topStartL = this->getSlice()->getSPS()->getScaledRefLayerWindow(refLayerIdc).getWindowTopOffset(); 4011 4012 Int iBX = ((uiPelX - leftStartL)*g_posScalingFactor[refLayerIdc][0] + (1<<15)) >> 16; 4012 4013 Int iBY = ((uiPelY - topStartL )*g_posScalingFactor[refLayerIdc][1] + (1<<15)) >> 16; 4013 #else4014 Int iBX = (uiPelX*g_posScalingFactor[refLayerIdc][0] + (1<<15)) >> 16;4015 Int iBY = (uiPelY*g_posScalingFactor[refLayerIdc][1] + (1<<15)) >> 16;4016 #endif4017 4014 4018 4015 #if N0139_POSITION_ROUNDING_OFFSET … … 4024 4021 #endif 4025 4022 4026 #if SCALED_REF_LAYER_OFFSETS4027 4023 if ( iBX >= cBaseColPic->getPicYuvRec()->getWidth() || iBY >= cBaseColPic->getPicYuvRec()->getHeight() || 4028 4024 iBX < 0 || iBY < 0 ) 4025 { 4026 return NULL; 4027 } 4028 4029 #if LAYER_CTB 4030 UInt baseMaxCUHeight = cBaseColPic->getPicSym()->getMaxCUHeight(); 4031 UInt baseMaxCUWidth = cBaseColPic->getPicSym()->getMaxCUWidth(); 4032 UInt baseMinUnitSize = cBaseColPic->getMinCUWidth(); 4033 4034 uiCUAddrBase = ( iBY / cBaseColPic->getPicSym()->getMaxCUHeight() ) * cBaseColPic->getFrameWidthInCU() + ( iBX / cBaseColPic->getPicSym()->getMaxCUWidth() ); 4029 4035 #else 4030 if ( iBX >= cBaseColPic->getPicYuvRec()->getWidth() || iBY >= cBaseColPic->getPicYuvRec()->getHeight())4036 uiCUAddrBase = (iBY/g_uiMaxCUHeight)*cBaseColPic->getFrameWidthInCU() + (iBX/g_uiMaxCUWidth); 4031 4037 #endif 4032 {4033 return NULL;4034 }4035 4036 uiCUAddrBase = (iBY/g_uiMaxCUHeight)*cBaseColPic->getFrameWidthInCU() + (iBX/g_uiMaxCUWidth);4037 4038 4038 4039 assert(uiCUAddrBase < cBaseColPic->getNumCUsInFrame()); 4039 4040 4041 #if LAYER_CTB 4042 UInt uiRasterAddrBase = ( iBY - (iBY/baseMaxCUHeight)*baseMaxCUHeight ) / baseMinUnitSize * cBaseColPic->getNumPartInWidth() + ( iBX - (iBX/baseMaxCUWidth)*baseMaxCUWidth ) / baseMinUnitSize; 4043 4044 uiAbsPartIdxBase = g_auiLayerRasterToZscan[cBaseColPic->getLayerId()][uiRasterAddrBase]; 4045 #else 4040 4046 UInt uiRasterAddrBase = (iBY - (iBY/g_uiMaxCUHeight)*g_uiMaxCUHeight)/uiMinUnitSize*cBaseColPic->getNumPartInWidth() 4041 4047 + (iBX - (iBX/g_uiMaxCUWidth)*g_uiMaxCUWidth)/uiMinUnitSize; 4042 4048 4043 4049 uiAbsPartIdxBase = g_auiRasterToZscan[uiRasterAddrBase]; 4050 #endif 4044 4051 4045 4052 return cBaseColPic->getCU(uiCUAddrBase); -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TComPicSym.h
r466 r467 126 126 TComDataCU*& getCU( UInt uiCUAddr ) { return m_apcTComDataCU[uiCUAddr]; } 127 127 128 #if LAYER_CTB 129 UInt getMaxCUWidth() { return m_uiMaxCUWidth; } 130 UInt getMaxCUHeight() { return m_uiMaxCUHeight; } 131 #endif 132 128 133 #if AVC_SYNTAX 129 134 UInt getMaxCUWidth() { return m_uiMaxCUWidth; } -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TComPicYuv.cpp
r466 r467 90 90 Int numCuInHeight = m_iPicHeight / m_iCuHeight + (m_iPicHeight % m_iCuHeight != 0); 91 91 92 #if LAYER_CTB 93 m_iLumaMarginX = uiMaxCUWidth + 16; // for 16-byte alignment 94 m_iLumaMarginY = uiMaxCUHeight + 16; // margin for 8-tap filter and infinite padding 95 #else 92 96 m_iLumaMarginX = g_uiMaxCUWidth + 16; // for 16-byte alignment 93 97 m_iLumaMarginY = g_uiMaxCUHeight + 16; // margin for 8-tap filter and infinite padding 98 #endif 94 99 95 100 m_iChromaMarginX = m_iLumaMarginX>>1; -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TComRom.cpp
r466 r467 86 86 // Data structure related table & variable 87 87 // ==================================================================================================================== 88 88 #if LAYER_CTB 89 UInt g_auiLayerMaxCUWidth[MAX_LAYERS]; 90 UInt g_auiLayerMaxCUHeight[MAX_LAYERS]; 91 UInt g_auiLayerMaxCUDepth[MAX_LAYERS]; 92 UInt g_auiLayerAddCUDepth[MAX_LAYERS]; 93 UInt g_auiLayerZscanToRaster[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ]; 94 UInt g_auiLayerRasterToZscan[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ]; 95 UInt g_auiLayerRasterToPelX[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ]; 96 UInt g_auiLayerRasterToPelY[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ]; 97 #endif 89 98 UInt g_uiMaxCUWidth = MAX_CU_SIZE; 90 99 UInt g_uiMaxCUHeight = MAX_CU_SIZE; -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TComRom.h
r466 r467 81 81 82 82 // global variable (LCU width/height, max. CU depth) 83 #if LAYER_CTB 84 extern UInt g_auiLayerMaxCUWidth[MAX_LAYERS]; 85 extern UInt g_auiLayerMaxCUHeight[MAX_LAYERS]; 86 extern UInt g_auiLayerMaxCUDepth[MAX_LAYERS]; 87 extern UInt g_auiLayerAddCUDepth[MAX_LAYERS]; 88 extern UInt g_auiLayerZscanToRaster[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ]; 89 extern UInt g_auiLayerRasterToZscan[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ]; 90 extern UInt g_auiLayerRasterToPelX[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ]; 91 extern UInt g_auiLayerRasterToPelY[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ]; 92 #endif 83 93 extern UInt g_uiMaxCUWidth; 84 94 extern UInt g_uiMaxCUHeight; -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp
r466 r467 109 109 110 110 //========== Y component upsampling =========== 111 #if SCALED_REF_LAYER_OFFSETS112 111 const Window &scalEL = window; 113 112 … … 119 118 Int heightEL = pcUsPic->getHeight() - scalEL.getWindowTopOffset() - scalEL.getWindowBottomOffset(); 120 119 Int strideEL = pcUsPic->getStride(); 121 #else 122 const Window &confBL = pcBasePic->getConformanceWindow(); 123 const Window &confEL = pcUsPic->getConformanceWindow(); 124 125 Int widthBL = pcBasePic->getWidth () - confBL.getWindowLeftOffset() - confBL.getWindowRightOffset(); 126 Int heightBL = pcBasePic->getHeight() - confBL.getWindowTopOffset() - confBL.getWindowBottomOffset(); 127 Int strideBL = pcBasePic->getStride(); 128 129 Int widthEL = pcUsPic->getWidth () - confEL.getWindowLeftOffset() - confEL.getWindowRightOffset(); 130 Int heightEL = pcUsPic->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset(); 131 Int strideEL = pcUsPic->getStride(); 132 #endif 120 133 121 Pel* piTempBufY = pcTempPic->getLumaAddr(); 134 122 Pel* piSrcBufY = pcBasePic->getLumaAddr(); … … 243 231 widthBL = pcBasePic->getWidth (); 244 232 heightBL = min<Int>( pcBasePic->getHeight(), heightEL ); 245 #if SCALED_REF_LAYER_OFFSETS 233 246 234 Int leftStartL = scalEL.getWindowLeftOffset(); 247 235 Int rightEndL = pcUsPic->getWidth() - scalEL.getWindowRightOffset(); 248 236 Int topStartL = scalEL.getWindowTopOffset(); 249 237 Int bottomEndL = pcUsPic->getHeight() - scalEL.getWindowBottomOffset(); 250 #if BUGFIX_RESAMPLE251 238 Int leftOffset = leftStartL > 0 ? leftStartL : 0; 252 #endif253 #endif254 239 255 240 #if N0214_INTERMEDIATE_BUFFER_16BITS … … 265 250 for( i = 0; i < widthEL; i++ ) 266 251 { 267 #if SCALED_REF_LAYER_OFFSETS268 252 Int x = Clip3( leftStartL, rightEndL - 1, i ); 269 253 refPos16 = (((x - leftStartL)*scaleX + addX) >> shiftXM4) - deltaX; 270 #else271 refPos16 = ((i*scaleX + addX) >> shiftXM4) - deltaX;272 #endif273 254 phase = refPos16 & 15; 274 255 refPos = refPos16 >> 4; … … 307 288 Int iOffset = 1 << (nShift - 1); 308 289 309 #if SCALED_REF_LAYER_OFFSETS310 290 for( j = 0; j < pcTempPic->getHeight(); j++ ) 311 #else 312 for( j = 0; j < heightEL; j++ ) 313 #endif 314 { 315 #if SCALED_REF_LAYER_OFFSETS 291 { 316 292 Int y = Clip3(topStartL, bottomEndL - 1, j); 317 293 refPos16 = ((( y - topStartL )*scaleY + addY) >> shiftYM4) - deltaY; 318 #else319 refPos16 = ((j*scaleY + addY) >> shiftYM4) - deltaY;320 #endif321 294 phase = refPos16 & 15; 322 295 refPos = refPos16 >> 4; … … 324 297 325 298 piSrcY = piTempBufY + (refPos -((NTAPS_US_LUMA>>1) - 1))*strideEL; 326 #if SCALED_REF_LAYER_OFFSETS327 #if BUGFIX_RESAMPLE328 299 Pel* piDstY0 = piDstBufY + j * strideEL; 329 300 piDstY = piDstY0 + leftOffset; … … 349 320 piDstY++; 350 321 } 351 #else 352 #if 1 // it should provide identical result 353 Pel* piDstY0 = piDstBufY + j * strideEL; 354 piDstY = piDstY0 + ( leftStartL > 0 ? leftStartL : 0 ); 355 356 for( i = min<Int>(rightEndL, pcTempPic->getWidth()) - max<Int>(0, leftStartL); i > 0; i-- ) 357 { 358 *piDstY = ClipY( (sumLumaVer(piSrcY, coeff, strideEL) + iOffset) >> (nShift)); 359 piSrcY++; 360 piDstY++; 361 } 362 363 for( i = rightEndL; i < pcTempPic->getWidth(); i++ ) 364 { 365 *piDstY = piDstY0[rightEndL-1]; 366 piDstY++; 367 } 368 369 piDstY = piDstY0; 370 for( i = 0; i < leftStartL; i++ ) 371 { 372 *piDstY = piDstY0[leftStartL]; 373 piDstY++; 374 } 375 #else 376 piDstY = piDstBufY + j * strideEL; 377 378 for( i = 0; i < pcTempPic->getWidth(); i++ ) 379 { 380 *piDstY = ClipY( (sumLumaVer(piSrcY, coeff, strideEL) + iOffset) >> (nShift)); 381 382 // Only increase the x position of reference upsample picture when within the window 383 // "-2" to ensure that pointer doesn't go beyond the boundary rightEndL-1 384 if( (i >= leftStartL) && (i <= rightEndL-2) ) 385 { 386 piSrcY++; 387 } 388 piDstY++; 389 } 390 #endif 391 #endif 392 #else 393 piDstY = piDstBufY + j * strideEL; 394 395 for( i = 0; i < widthEL; i++ ) 396 { 397 *piDstY = ClipY( (sumLumaVer(piSrcY, coeff, strideEL) + iOffset) >> (nShift)); 398 piSrcY++; 399 piDstY++; 400 } 401 #endif 402 } 403 404 #if SCALED_REF_LAYER_OFFSETS 322 323 } 324 405 325 widthBL = pcBasePic->getWidth (); 406 326 heightBL = pcBasePic->getHeight(); … … 408 328 widthEL = pcUsPic->getWidth () - scalEL.getWindowLeftOffset() - scalEL.getWindowRightOffset(); 409 329 heightEL = pcUsPic->getHeight() - scalEL.getWindowTopOffset() - scalEL.getWindowBottomOffset(); 410 #else411 widthBL = pcBasePic->getWidth () - confBL.getWindowLeftOffset() - confBL.getWindowRightOffset();412 heightBL = pcBasePic->getHeight() - confBL.getWindowTopOffset() - confBL.getWindowBottomOffset();413 414 widthEL = pcUsPic->getWidth () - confEL.getWindowLeftOffset() - confEL.getWindowRightOffset();415 heightEL = pcUsPic->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset();416 #endif417 330 418 331 //========== UV component upsampling =========== … … 426 339 strideBL = pcBasePic->getCStride(); 427 340 strideEL = pcUsPic->getCStride(); 428 #if SCALED_REF_LAYER_OFFSETS 341 429 342 Int leftStartC = scalEL.getWindowLeftOffset() >> 1; 430 343 Int rightEndC = (pcUsPic->getWidth() >> 1) - (scalEL.getWindowRightOffset() >> 1); 431 344 Int topStartC = scalEL.getWindowTopOffset() >> 1; 432 345 Int bottomEndC = (pcUsPic->getHeight() >> 1) - (scalEL.getWindowBottomOffset() >> 1); 433 #if BUGFIX_RESAMPLE434 346 leftOffset = leftStartC > 0 ? leftStartC : 0; 435 #endif436 #endif437 347 438 348 shiftX = 16; … … 490 400 for( i = 0; i < widthEL; i++ ) 491 401 { 492 #if SCALED_REF_LAYER_OFFSETS493 402 Int x = Clip3(leftStartC, rightEndC - 1, i); 494 403 refPos16 = (((x - leftStartC)*scaleX + addX) >> shiftXM4) - deltaX; 495 #else496 refPos16 = ((i*scaleX + addX) >> shiftXM4) - deltaX;497 #endif498 404 phase = refPos16 & 15; 499 405 refPos = refPos16 >> 4; … … 537 443 #endif 538 444 539 #if SCALED_REF_LAYER_OFFSETS540 445 for( j = 0; j < pcTempPic->getHeight() >> 1; j++ ) 541 #else 542 for( j = 0; j < heightEL; j++ ) 543 #endif 544 { 545 #if SCALED_REF_LAYER_OFFSETS 446 { 546 447 Int y = Clip3(topStartC, bottomEndC - 1, j); 547 448 refPos16 = (((y - topStartC)*scaleY + addY) >> shiftYM4) - deltaY; 548 #else549 refPos16 = ((j*scaleY + addY) >> shiftYM4) - deltaY;550 #endif551 449 phase = refPos16 & 15; 552 450 refPos = refPos16 >> 4; … … 555 453 piSrcU = piTempBufU + (refPos -((NTAPS_US_CHROMA>>1) - 1))*strideEL; 556 454 piSrcV = piTempBufV + (refPos -((NTAPS_US_CHROMA>>1) - 1))*strideEL; 557 #if SCALED_REF_LAYER_OFFSETS 558 #if BUGFIX_RESAMPLE 455 559 456 Pel* piDstU0 = piDstBufU + j*strideEL; 560 457 Pel* piDstV0 = piDstBufV + j*strideEL; … … 568 465 *piDstU = ClipC( (sumChromaVer(piSrcU, coeff, strideEL) + iOffset) >> (nShift)); 569 466 *piDstV = ClipC( (sumChromaVer(piSrcV, coeff, strideEL) + iOffset) >> (nShift)); 570 571 467 piSrcU++; 572 468 piSrcV++; … … 592 488 piDstV++; 593 489 } 594 #else 595 #if 1 // it should provide identical result 596 Pel* piDstU0 = piDstBufU + j*strideEL; 597 Pel* piDstV0 = piDstBufV + j*strideEL; 598 piDstU = piDstU0 + ( leftStartC > 0 ? leftStartC : 0 ); 599 piDstV = piDstV0 + ( leftStartC > 0 ? leftStartC : 0 ); 600 601 for( i = min<Int>(rightEndC, pcTempPic->getWidth() >> 1) - max<Int>(0, leftStartC); i > 0; i-- ) 602 { 603 *piDstU = ClipC( (sumChromaVer(piSrcU, coeff, strideEL) + iOffset) >> (nShift)); 604 *piDstV = ClipC( (sumChromaVer(piSrcV, coeff, strideEL) + iOffset) >> (nShift)); 605 piSrcU++; 606 piSrcV++; 607 piDstU++; 608 piDstV++; 609 } 610 611 for( i = rightEndC; i < pcTempPic->getWidth() >> 1; i++ ) 612 { 613 *piDstU = piDstU0[rightEndC-1]; 614 *piDstV = piDstV0[rightEndC-1]; 615 piDstU++; 616 piDstV++; 617 } 618 619 piDstU = piDstU0; 620 piDstV = piDstV0; 621 for( i = 0; i < leftStartC; i++ ) 622 { 623 *piDstU = piDstU0[leftStartC]; 624 *piDstV = piDstV0[leftStartC]; 625 piDstU++; 626 piDstV++; 627 } 628 #else 629 piDstU = piDstBufU + j*strideEL; 630 piDstV = piDstBufV + j*strideEL; 631 632 for( i = 0; i < pcTempPic->getWidth() >> 1; i++ ) 633 { 634 *piDstU = ClipC( (sumChromaVer(piSrcU, coeff, strideEL) + iOffset) >> (nShift)); 635 *piDstV = ClipC( (sumChromaVer(piSrcV, coeff, strideEL) + iOffset) >> (nShift)); 636 637 // Only increase the x position of reference upsample picture when within the window 638 // "-2" to ensure that pointer doesn't go beyond the boundary rightEndC-1 639 if( (i >= leftStartC) && (i <= rightEndC-2) ) 640 { 641 piSrcU++; 642 piSrcV++; 643 } 644 645 piDstU++; 646 piDstV++; 647 } 648 #endif 649 #endif 650 #else 651 piDstU = piDstBufU + j*strideEL; 652 piDstV = piDstBufV + j*strideEL; 653 654 for( i = 0; i < widthEL; i++ ) 655 { 656 *piDstU = ClipC( (sumChromaVer(piSrcU, coeff, strideEL) + iOffset) >> (nShift)); 657 *piDstV = ClipC( (sumChromaVer(piSrcV, coeff, strideEL) + iOffset) >> (nShift)); 658 piSrcU++; 659 piSrcV++; 660 piDstU++; 661 piDstV++; 662 } 663 #endif 490 664 491 } 665 492 } -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TypeDef.h
r466 r467 65 65 #endif 66 66 #define IL_SL_SIGNALLING_N0371 0 ///< JCTVC-N0371: inter-layer scaling list 67 #define M0464_TILE_BOUNDARY_ALIGNED_FLAG 0 ///< JCTVC-M0464: VUI flag to indicate tile boundary alignment68 67 #define M0463_VUI_EXT_ILP_REF 0 ///< JCTVC-M0463: VUI extension inter-layer dependency offset signalling 69 68 #define SPS_EXTENSION 1 ///< Define sps_extension() syntax structure 70 #define SCALED_REF_LAYER_OFFSETS 1 ///< JCTVC-M0309: Signal scaled reference layer offsets in SPS71 69 #define VERT_MV_CONSTRAINT 1 ///< Vertical MV component constraint flag 72 70 #define SCALABILITY_MASK_E0104 1 ///< JCT3V-E0104: scalability mask for depth 71 #define LAYER_CTB 0 ///< enable layer-specific CTB structure 73 72 74 73 #define ILP_SSH_SIG 1 ///< JCTVC-N0195 proposal 2, JCTVC-N0118: add presence flag in VPS ext to condition inter-layer prediction signaling in slice segment header … … 86 85 #define VPS_EXTN_PROFILE_INFO 1 ///< Include profile information for layer sets in VPS extension 87 86 #define VPS_EXTN_DIRECT_REF_LAYERS 1 ///< Include indication of direct dependency of layers in VPS extension 88 #define VPS_OUTPUT_LAYER_SET_IDX 1 ///< JCTVC-M0268: Signal output_layer_set_idx[i] as output_layer_set_idx_minus1[i]89 #define VPS_MOVE_DIR_DEPENDENCY_FLAG 1 ///< JCTVC-M0268: Move the syntax element direct_dependency_flag to follow the syntax element dimension_id90 #define VPS_PROFILE_OUTPUT_LAYERS 1 ///< JCTVC-M0268: Signal profile information and output layer information as in Sec. 3 of M0268v291 #define SPS_SUB_LAYER_INFO 1 ///< JCTVC-M0268: Do not signal sps_max_sub_layers_minus1 and sps_temporal_id_nesting_flag for nuh_layer_id greater than 092 #define VPS_SPLIT_FLAG 1 ///< JCTVC-M0163: Do not signal dimension_id and the last dimension_id_len_minus1, when splitting_flag is equal to 1.93 87 #define M0457_PREDICTION_INDICATIONS 1 94 88 #define M0040_ADAPTIVE_RESOLUTION_CHANGE 1 … … 99 93 #define N0160_VUI_EXT_ILP_REF 1 ///< VUI extension inter-layer dependency offset signalling 100 94 #define VPS_VUI_BITRATE_PICRATE 1 ///< JCTVC-N0085: Signal bit rate and picture in VPS VUI 101 #else102 #define M0464_TILE_BOUNDARY_ALIGNED_FLAG 0 ///< VUI flag to indicate tile boundary alignment103 95 #endif //VPS_VUI 104 96 … … 108 100 #define VPS_EXTN_OFFSET_CALC 1 ///< Calculation of VPS extension offset 109 101 #define SPS_PTL_FIX 1 ///< remove profile_tier_level from enhancement layer SPS 110 #define SH_DISCARDABLE_FLAG 1 ///< JCTVC-M0152: Use one reserved flag in the slice header for discardable flag111 102 112 103 #define DERIVE_LAYER_ID_LIST_VARIABLES 1 ///< Derived variables based on the variables in VPS - for use in syntax table parsing … … 116 107 #define N0214_INTERMEDIATE_BUFFER_16BITS 1 ///< JCTVC-N0214: support base layer input more than 8 bits 117 108 #define ARBITRARY_SPATIAL_RATIO 1 ///< JCTVC-N0219, JCTVC-N0273: Support arbitrary spatial ratio 118 #define BUGFIX_RESAMPLE 1 ///< JCTVC-N0055: resampling bug fix for positive left scalled offset119 109 120 110 #define JCTVC_M0259_LAMBDAREFINEMENT 1 ///< JCTVC-M0259: lambda refinement (encoder only optimization) … … 137 127 #define JCTVC_M0203_INTERLAYER_PRED_IDC 1 ///< JCTVC-M0203: implementation of Inter-layer Prediction Indication 138 128 #if JCTVC_M0203_INTERLAYER_PRED_IDC 139 #define ILR_RESTR 1 ///< JCTVC-M0209: Inter-layer RPS and RPL140 #define ILR_RESTR_FIX 1 ///< Fix encoder crash when temporal layers are used with scalable coding141 129 #define EARLY_REF_PIC_MARKING 1 ///< Decoded picture marking of sub-layer non-reference pictures 142 130 #define N0120_MAX_TID_REF_PRESENT_FLAG 1 ///< JCTVC-N0120: max_tid_ref_pics_plus1_present_flag -
branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r466 r467 450 450 { 451 451 READ_FLAG( uiCode, "tiles_fixed_structure_flag"); pcVUI->setTilesFixedStructureFlag(uiCode); 452 #if M0464_TILE_BOUNDARY_ALIGNED_FLAG453 if ( pcSPS->getLayerId() > 0 )454 {455 READ_FLAG( uiCode, "tile_boundaries_aligned_flag" ); pcVUI->setTileBoundariesAlignedFlag( uiCode == 1 );456 }457 #endif458 452 READ_FLAG( uiCode, "motion_vectors_over_pic_boundaries_flag"); pcVUI->setMotionVectorsOverPicBoundariesFlag(uiCode); 459 453 READ_FLAG( uiCode, "restricted_ref_pic_lists_flag"); pcVUI->setRestrictedRefPicListsFlag(uiCode); … … 542 536 } 543 537 544 #if S PS_SUB_LAYER_INFO538 #if SVC_EXTENSION 545 539 Void TDecCavlc::parseSPS(TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager) 546 540 #else … … 554 548 UInt uiCode; 555 549 READ_CODE( 4, uiCode, "sps_video_parameter_set_id"); pcSPS->setVPSId ( uiCode ); 556 #if S PS_SUB_LAYER_INFO550 #if SVC_EXTENSION 557 551 if(pcSPS->getLayerId() == 0) 558 552 { … … 562 556 563 557 READ_FLAG( uiCode, "sps_temporal_id_nesting_flag" ); pcSPS->setTemporalIdNestingFlag ( uiCode > 0 ? true : false ); 564 #if S PS_SUB_LAYER_INFO558 #if SVC_EXTENSION 565 559 } 566 560 else … … 569 563 pcSPS->setTemporalIdNestingFlag( parameterSetManager->getPrefetchedVPS(pcSPS->getVPSId())->getTemporalNestingFlag() ); 570 564 } 571 #endif572 565 #if IL_SL_SIGNALLING_N0371 573 566 pcSPS->setVPS( parameterSetManager->getPrefetchedVPS(pcSPS->getVPSId()) ); 574 567 pcSPS->setSPS( pcSPS->getLayerId(), pcSPS ); 575 568 #endif 569 #endif 576 570 if ( pcSPS->getMaxTLayers() == 1 ) 577 571 { 578 572 // sps_temporal_id_nesting_flag must be 1 when sps_max_sub_layers_minus1 is 0 579 #if S PS_SUB_LAYER_INFO573 #if SVC_EXTENSION 580 574 assert( pcSPS->getTemporalIdNestingFlag() == true ); 581 575 #else … … 841 835 assert( uiCode == 0 ); 842 836 #endif 843 #if SCALED_REF_LAYER_OFFSETS844 837 if( pcSPS->getLayerId() > 0 ) 845 838 { … … 855 848 } 856 849 } 857 #endif858 850 #if M0463_VUI_EXT_ILP_REF 859 851 //// sps_extension_vui_parameters( ) … … 1000 992 } 1001 993 994 #if SVC_EXTENSION 1002 995 #if VPS_EXTNS 1003 996 Void TDecCavlc::parseVPSExtension(TComVPS *vps) … … 1018 1011 vps->setNumScalabilityTypes(numScalabilityTypes); 1019 1012 1020 #if VPS_SPLIT_FLAG1021 1013 for(j = 0; j < numScalabilityTypes - vps->getSplittingFlag(); j++) 1022 #else1023 for(j = 0; j < numScalabilityTypes; j++)1024 #endif1025 1014 { 1026 1015 READ_CODE( 3, uiCode, "dimension_id_len_minus1[j]" ); vps->setDimensionIdLen(j, uiCode + 1); 1027 1016 } 1028 #if VPS_SPLIT_FLAG 1017 1029 1018 if(vps->getSplittingFlag()) 1030 1019 { … … 1038 1027 numBits = 6; 1039 1028 } 1040 #else1041 if(vps->getSplittingFlag())1042 {1043 UInt numBits = 0;1044 for(j = 0; j < numScalabilityTypes; j++)1045 {1046 numBits += vps->getDimensionIdLen(j);1047 }1048 assert( numBits <= 6 );1049 }1050 #endif1051 1029 1052 1030 READ_FLAG( uiCode, "vps_nuh_layer_id_present_flag" ); vps->setNuhLayerIdPresentFlag(uiCode ? true : false); … … 1066 1044 vps->setLayerIdInVps(vps->getLayerIdInNuh(i), i); 1067 1045 1068 #if VPS_SPLIT_FLAG 1069 if(!vps->getSplittingFlag()) 1070 #endif 1046 if( !vps->getSplittingFlag() ) 1047 { 1071 1048 for(j = 0; j < numScalabilityTypes; j++) 1072 1049 { … … 1074 1051 assert( uiCode <= vps->getMaxLayerId() ); 1075 1052 } 1053 } 1076 1054 } 1077 1055 #endif … … 1088 1066 } 1089 1067 #endif 1090 #if VPS_MOVE_DIR_DEPENDENCY_FLAG1091 1068 #if VPS_EXTN_DIRECT_REF_LAYERS 1092 1069 // For layer 0 … … 1108 1085 } 1109 1086 #endif 1110 #endif1111 1087 #if JCTVC_M0203_INTERLAYER_PRED_IDC 1112 1088 #if N0120_MAX_TID_REF_PRESENT_FLAG … … 1144 1120 #if VPS_EXTN_PROFILE_INFO 1145 1121 // Profile-tier-level signalling 1146 #if VPS_PROFILE_OUTPUT_LAYERS1147 1122 READ_CODE( 10, uiCode, "vps_number_layer_sets_minus1" ); assert( uiCode == (vps->getNumLayerSets() - 1) ); 1148 1123 READ_CODE( 6, uiCode, "vps_num_profile_tier_level_minus1"); vps->setNumProfileTierLevel( uiCode + 1 ); 1149 1124 vps->getPTLForExtnPtr()->resize(vps->getNumProfileTierLevel()); 1150 1125 for(Int idx = 1; idx <= vps->getNumProfileTierLevel() - 1; idx++) 1151 #else1152 vps->getPTLForExtnPtr()->resize(vps->getNumLayerSets());1153 for(Int idx = 1; idx <= vps->getNumLayerSets() - 1; idx++)1154 #endif1155 1126 { 1156 1127 READ_FLAG( uiCode, "vps_profile_present_flag[i]" ); vps->setProfilePresentFlag(idx, uiCode ? true : false); 1157 1128 if( !vps->getProfilePresentFlag(idx) ) 1158 1129 { 1159 #if VPS_PROFILE_OUTPUT_LAYERS1160 1130 READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); vps->setProfileLayerSetRef(idx, uiCode + 1); 1161 #else1162 READ_UVLC( uiCode, "vps_profile_layer_set_ref_minus1[i]" ); vps->setProfileLayerSetRef(idx, uiCode + 1);1163 #endif1164 1131 assert( vps->getProfileLayerSetRef(idx) < idx ); 1132 1165 1133 // Copy profile information as indicated 1166 1134 vps->getPTLForExtn(idx)->copyProfileInfo( vps->getPTLForExtn( vps->getProfileLayerSetRef(idx) ) ); … … 1170 1138 #endif 1171 1139 1172 #if VPS_PROFILE_OUTPUT_LAYERS1173 1140 READ_FLAG( uiCode, "more_output_layer_sets_than_default_flag" ); vps->setMoreOutputLayerSetsThanDefaultFlag( uiCode ? true : false ); 1174 1141 Int numOutputLayerSets = 0; … … 1231 1198 READ_CODE( numBits, uiCode, "profile_level_tier_idx[i]" ); vps->setProfileLevelTierIdx(i, uiCode); 1232 1199 } 1233 #else 1234 #if VPS_EXTN_OP_LAYER_SETS 1235 // Target output layer signalling 1236 READ_UVLC( uiCode, "vps_num_output_layer_sets"); vps->setNumOutputLayerSets(uiCode); 1237 for(i = 0; i < vps->getNumOutputLayerSets(); i++) 1238 { 1239 #if VPS_OUTPUT_LAYER_SET_IDX 1240 READ_UVLC( uiCode, "vps_output_layer_set_idx_minus1[i]"); vps->setOutputLayerSetIdx(i, uiCode + 1); 1241 #else 1242 READ_UVLC( uiCode, "vps_output_layer_set_idx[i]"); vps->setOutputLayerSetIdx(i, uiCode); 1243 #endif 1244 Int lsIdx = vps->getOutputLayerSetIdx(i); 1245 for(j = 0; j <= vps->getMaxLayerId(); j++) 1246 { 1247 if(vps->getLayerIdIncludedFlag(lsIdx, j)) 1248 { 1249 READ_FLAG( uiCode, "vps_output_layer_flag[lsIdx][j]"); vps->setOutputLayerFlag(lsIdx, j, uiCode); 1250 } 1251 } 1252 } 1253 #endif 1254 #endif 1200 1255 1201 #if REPN_FORMAT_IN_VPS 1256 1202 READ_FLAG( uiCode, "rep_format_idx_present_flag"); … … 1314 1260 #endif 1315 1261 1316 #if !VPS_MOVE_DIR_DEPENDENCY_FLAG1317 #if VPS_EXTN_DIRECT_REF_LAYERS1318 // For layer 01319 vps->setNumDirectRefLayers(0, 0);1320 // For other layers1321 for( Int layerCtr = 1; layerCtr <= vps->getMaxLayers() - 1; layerCtr++)1322 {1323 UInt numDirectRefLayers = 0;1324 for( Int refLayerCtr = 0; refLayerCtr < layerCtr; refLayerCtr++)1325 {1326 READ_FLAG(uiCode, "direct_dependency_flag[i][j]" ); vps->setDirectDependencyFlag(layerCtr, refLayerCtr, uiCode? true : false);1327 if(uiCode)1328 {1329 vps->setRefLayerId(layerCtr, numDirectRefLayers, refLayerCtr);1330 numDirectRefLayers++;1331 }1332 }1333 vps->setNumDirectRefLayers(layerCtr, numDirectRefLayers);1334 }1335 #endif1336 #endif1337 1262 #if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS 1338 1263 READ_UVLC( uiCode, "direct_dep_type_len_minus2"); vps->setDirectDepTypeLen(uiCode+2); … … 1483 1408 } 1484 1409 #endif 1410 #endif //SVC_EXTENSION 1411 1485 1412 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager) 1486 1413 { … … 1555 1482 if(!rpcSlice->getDependentSliceSegmentFlag()) 1556 1483 { 1484 #if SVC_EXTENSION 1557 1485 #if POC_RESET_FLAG 1558 1486 Int iBits = 0; … … 1572 1500 } 1573 1501 #else 1574 #if SH_DISCARDABLE_FLAG1575 1502 if(rpcSlice->getPPS()->getNumExtraSliceHeaderBits()>0) 1576 1503 { … … 1581 1508 READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored 1582 1509 } 1583 #else 1510 #endif 1511 #else //SVC_EXTENSION 1584 1512 for (Int i = 0; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++) 1585 1513 { 1586 1514 READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored 1587 1515 } 1588 #endif 1589 #endif 1516 #endif //SVC_EXTENSION 1590 1517 1591 1518 READ_UVLC ( uiCode, "slice_type" ); rpcSlice->setSliceType((SliceType)uiCode); -
branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecCAVLC.h
r466 r467 72 72 Void parseQtRootCbf ( UInt uiAbsPartIdx, UInt& uiQtRootCbf ); 73 73 Void parseVPS ( TComVPS* pcVPS ); 74 #if SPS_EXTENSION 74 75 #if VPS_EXTNS 75 76 Void parseVPSExtension ( TComVPS* pcVPS ); … … 82 83 Void parseRepFormat ( RepFormat *repFormat ); 83 84 #endif 84 #if SPS_SUB_LAYER_INFO85 85 Void parseSPS ( TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager ); 86 #else 86 Void parseSPSExtension ( TComSPS* pcSPS ); 87 #else //SVC_EXTENSION 87 88 Void parseSPS ( TComSPS* pcSPS ); 88 #endif 89 #if SPS_EXTENSION 90 Void parseSPSExtension ( TComSPS* pcSPS ); 91 #endif 89 #endif //SVC_EXTENSION 92 90 Void parsePPS ( TComPPS* pcPPS); 93 91 Void parseVUI ( TComVUI* pcVUI, TComSPS* pcSPS ); -
branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecEntropy.h
r466 r467 66 66 67 67 virtual Void parseVPS ( TComVPS* pcVPS ) = 0; 68 #if S PS_SUB_LAYER_INFO68 #if SVC_EXTENSION 69 69 virtual Void parseSPS ( TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager ) = 0; 70 70 #else … … 134 134 Void resetEntropy ( TComSlice* p) { m_pcEntropyDecoderIf->resetEntropy(p); } 135 135 Void decodeVPS ( TComVPS* pcVPS ) { m_pcEntropyDecoderIf->parseVPS(pcVPS); } 136 #if S PS_SUB_LAYER_INFO136 #if SVC_EXTENSION 137 137 Void decodeSPS ( TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager ) { m_pcEntropyDecoderIf->parseSPS(pcSPS, parameterSetManager); } 138 138 #else -
branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecSbac.h
r466 r467 76 76 Void setBitstream ( TComInputBitstream* p ) { m_pcBitstream = p; m_pcTDecBinIf->init( p ); } 77 77 Void parseVPS ( TComVPS* /*pcVPS*/ ) {} 78 #if S PS_SUB_LAYER_INFO78 #if SVC_EXTENSION 79 79 Void parseSPS ( TComSPS* /*pcSPS*/, ParameterSetManagerDecoder * /*parameterSetManager*/ ) {} 80 80 #else -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r466 r467 359 359 { 360 360 WRITE_FLAG(pcVUI->getTilesFixedStructureFlag(), "tiles_fixed_structure_flag"); 361 #if M0464_TILE_BOUNDARY_ALIGNED_FLAG362 if ( pcSPS->getLayerId() > 0 )363 {364 WRITE_FLAG( pcVUI->getTileBoundariesAlignedFlag( ) ? 1 : 0 , "tile_boundaries_aligned_flag" );365 }366 #endif367 361 WRITE_FLAG(pcVUI->getMotionVectorsOverPicBoundariesFlag(), "motion_vectors_over_pic_boundaries_flag"); 368 362 WRITE_FLAG(pcVUI->getRestrictedRefPicListsFlag(), "restricted_ref_pic_lists_flag"); … … 454 448 #endif 455 449 WRITE_CODE( pcSPS->getVPSId (), 4, "sps_video_parameter_set_id" ); 456 #if S PS_SUB_LAYER_INFO450 #if SVC_EXTENSION 457 451 if(pcSPS->getLayerId() == 0) 458 452 { … … 460 454 WRITE_CODE( pcSPS->getMaxTLayers() - 1, 3, "sps_max_sub_layers_minus1" ); 461 455 WRITE_FLAG( pcSPS->getTemporalIdNestingFlag() ? 1 : 0, "sps_temporal_id_nesting_flag" ); 462 #if S PS_SUB_LAYER_INFO456 #if SVC_EXTENSION 463 457 } 464 458 #endif … … 670 664 WRITE_FLAG( 0, "inter_view_mv_vert_constraint_flag" ); 671 665 #endif 672 #if SCALED_REF_LAYER_OFFSETS673 666 if( pcSPS->getLayerId() > 0 ) 674 667 { … … 683 676 } 684 677 } 685 #endif686 678 #if M0463_VUI_EXT_ILP_REF 687 679 //// sps_extension_vui_parameters( ) … … 828 820 } 829 821 822 #if SVC_EXTENSION 830 823 #if VPS_EXTNS 831 824 Void TEncCavlc::codeVPSExtension (TComVPS *vps) … … 843 836 } 844 837 845 #if VPS_SPLIT_FLAG846 838 for(j = 0; j < vps->getNumScalabilityTypes() - vps->getSplittingFlag(); j++) 847 #else848 for(j = 0; j < vps->getNumScalabilityTypes(); j++)849 #endif850 839 { 851 840 WRITE_CODE( vps->getDimensionIdLen(j) - 1, 3, "dimension_id_len_minus1[j]" ); … … 871 860 WRITE_CODE( vps->getLayerIdInNuh(i), 6, "layer_id_in_nuh[i]" ); 872 861 } 873 #if VPS_SPLIT_FLAG 874 if( !vps->getSplittingFlag())875 #endif 862 863 if( !vps->getSplittingFlag() ) 864 { 876 865 for(j = 0; j < vps->getNumScalabilityTypes(); j++) 877 866 { … … 879 868 WRITE_CODE( vps->getDimensionId(i, j), bits, "dimension_id[i][j]" ); 880 869 } 870 } 881 871 } 882 872 #endif … … 893 883 } 894 884 #endif 895 #if VPS_MOVE_DIR_DEPENDENCY_FLAG896 885 #if VPS_EXTN_DIRECT_REF_LAYERS 897 886 for( Int layerCtr = 1; layerCtr <= vps->getMaxLayers() - 1; layerCtr++) … … 902 891 } 903 892 } 904 #endif905 893 #endif 906 894 #if JCTVC_M0203_INTERLAYER_PRED_IDC … … 926 914 #if VPS_EXTN_PROFILE_INFO 927 915 // Profile-tier-level signalling 928 #if VPS_PROFILE_OUTPUT_LAYERS929 916 WRITE_CODE( vps->getNumLayerSets() - 1 , 10, "vps_number_layer_sets_minus1" ); 930 917 WRITE_CODE( vps->getNumProfileTierLevel() - 1, 6, "vps_num_profile_tier_level_minus1"); 931 918 for(Int idx = 1; idx <= vps->getNumProfileTierLevel() - 1; idx++) 932 #else933 for(Int idx = 1; idx <= vps->getNumLayerSets() - 1; idx++)934 #endif935 919 { 936 920 WRITE_FLAG( vps->getProfilePresentFlag(idx), "vps_profile_present_flag[i]" ); 937 921 if( !vps->getProfilePresentFlag(idx) ) 938 922 { 939 #if VPS_PROFILE_OUTPUT_LAYERS940 923 WRITE_CODE( vps->getProfileLayerSetRef(idx) - 1, 6, "profile_ref_minus1[i]" ); 941 #else942 WRITE_UVLC( vps->getProfileLayerSetRef(idx) - 1, "vps_profile_layer_set_ref_minus1[i]" );943 #endif944 924 } 945 925 codePTL( vps->getPTLForExtn(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 ); … … 947 927 #endif 948 928 949 #if VPS_PROFILE_OUTPUT_LAYERS950 929 Int numOutputLayerSets = vps->getNumOutputLayerSets() ; 951 930 WRITE_FLAG( (numOutputLayerSets > vps->getNumLayerSets()), "more_output_layer_sets_than_default_flag" ); … … 982 961 WRITE_CODE( vps->getProfileLevelTierIdx(i), numBits, "profile_level_tier_idx[i]" ); 983 962 } 984 #else985 #if VPS_EXTN_OP_LAYER_SETS986 // Target output layer signalling987 WRITE_UVLC( vps->getNumOutputLayerSets(), "vps_num_output_layer_sets");988 for(i = 0; i < vps->getNumOutputLayerSets(); i++)989 {990 #if VPS_OUTPUT_LAYER_SET_IDX991 assert(vps->getOutputLayerSetIdx(i) > 0);992 WRITE_UVLC( vps->getOutputLayerSetIdx(i) - 1, "vps_output_layer_set_idx_minus1[i]");993 #else994 WRITE_UVLC( vps->getOutputLayerSetIdx(i), "vps_output_layer_set_idx[i]");995 #endif996 Int lsIdx = vps->getOutputLayerSetIdx(i);997 for(j = 0; j <= vps->getMaxLayerId(); j++)998 {999 if(vps->getLayerIdIncludedFlag(lsIdx, j))1000 {1001 WRITE_FLAG( vps->getOutputLayerFlag(lsIdx, j), "vps_output_layer_flag[lsIdx][j]");1002 }1003 }1004 }1005 #endif1006 #endif1007 963 1008 964 #if REPN_FORMAT_IN_VPS … … 1040 996 WRITE_FLAG(vps->getCrossLayerIrapAlignFlag(), "cross_layer_irap_aligned_flag"); 1041 997 #endif 1042 #if !VPS_MOVE_DIR_DEPENDENCY_FLAG1043 #if VPS_EXTN_DIRECT_REF_LAYERS1044 for( Int layerCtr = 1; layerCtr <= vps->getMaxLayers() - 1; layerCtr++)1045 {1046 for( Int refLayerCtr = 0; refLayerCtr < layerCtr; refLayerCtr++)1047 {1048 WRITE_FLAG(vps->getDirectDependencyFlag(layerCtr, refLayerCtr), "direct_dependency_flag[i][j]" );1049 }1050 }1051 #endif1052 #endif1053 998 #if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS 1054 999 WRITE_UVLC( vps->getDirectDepTypeLen()-2, "direct_dep_type_len_minus2"); … … 1184 1129 } 1185 1130 #endif 1131 #endif //SVC_EXTENSION 1186 1132 1187 1133 Void TEncCavlc::codeSliceHeader ( TComSlice* pcSlice ) … … 1229 1175 if ( !pcSlice->getDependentSliceSegmentFlag() ) 1230 1176 { 1231 1177 #if SVC_EXTENSION 1232 1178 #if POC_RESET_FLAG 1233 1179 Int iBits = 0; … … 1249 1195 } 1250 1196 #else 1251 #if SH_DISCARDABLE_FLAG1252 1197 if (pcSlice->getPPS()->getNumExtraSliceHeaderBits()>0) 1253 1198 { … … 1260 1205 WRITE_FLAG(0, "slice_reserved_undetermined_flag[]"); 1261 1206 } 1262 #else 1207 #endif 1208 #else //SVC_EXTENSION 1263 1209 for (Int i = 0; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++) 1264 1210 { … … 1266 1212 WRITE_FLAG(0, "slice_reserved_undetermined_flag[]"); 1267 1213 } 1268 #endif 1269 #endif 1214 #endif //SVC_EXTENSION 1270 1215 1271 1216 WRITE_UVLC( pcSlice->getSliceType(), "slice_type" ); -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r466 r467 753 753 pcSlice->setNalUnitType(getNalUnitType(pocCurr, m_iLastIDR)); 754 754 #if SVC_EXTENSION 755 #if ILR_RESTR && ILR_RESTR_FIX 755 if (m_layerId > 0) 756 { 756 757 Int interLayerPredLayerIdcTmp[MAX_VPS_LAYER_ID_PLUS1]; 757 758 Int activeNumILRRefIdxTmp = 0; 758 #endif 759 if (m_layerId > 0) 760 { 759 761 760 for( Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ ) 762 761 { … … 769 768 pcSlice->setBaseColPic( *cListPic, refLayerIdc ); 770 769 771 #if ILR_RESTR && ILR_RESTR_FIX772 770 // Apply temporal layer restriction to inter-layer prediction 773 771 Int maxTidIlRefPicsPlus1 = m_pcEncTop->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getLayerId()); … … 780 778 continue; // ILP is not valid due to temporal layer restriction 781 779 } 782 #endif 783 784 #if SCALED_REF_LAYER_OFFSETS 780 785 781 const Window &scalEL = m_pcEncTop->getScaledRefLayerWindow(refLayerIdc); 786 782 … … 790 786 Int widthEL = pcPic->getPicYuvRec()->getWidth() - scalEL.getWindowLeftOffset() - scalEL.getWindowRightOffset(); 791 787 Int heightEL = pcPic->getPicYuvRec()->getHeight() - scalEL.getWindowTopOffset() - scalEL.getWindowBottomOffset(); 792 #else 793 const Window &confBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getConformanceWindow(); 794 const Window &confEL = pcPic->getPicYuvRec()->getConformanceWindow(); 795 796 Int widthBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth () - confBL.getWindowLeftOffset() - confBL.getWindowRightOffset(); 797 Int heightBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getHeight() - confBL.getWindowTopOffset() - confBL.getWindowBottomOffset(); 798 799 Int widthEL = pcPic->getPicYuvRec()->getWidth() - confEL.getWindowLeftOffset() - confEL.getWindowRightOffset(); 800 Int heightEL = pcPic->getPicYuvRec()->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset(); 801 #endif 788 802 789 g_mvScalingFactor[refLayerIdc][0] = widthEL == widthBL ? 4096 : Clip3(-4096, 4095, ((widthEL << 8) + (widthBL >> 1)) / widthBL); 803 790 g_mvScalingFactor[refLayerIdc][1] = heightEL == heightBL ? 4096 : Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL); … … 823 810 } 824 811 825 #if ILR_RESTR && ILR_RESTR_FIX826 812 // Update the list of active inter-layer pictures 827 813 for ( Int i = 0; i < activeNumILRRefIdxTmp; i++) … … 835 821 pcSlice->setInterLayerPredEnabledFlag(false); 836 822 } 837 #endif838 823 839 824 if( pocCurr % m_pcCfg->getIntraPeriod() == 0 ) … … 1616 1601 pcSlice->setSliceSegmentCurStartCUAddr ( startCUAddrSlice ); 1617 1602 pcSlice->setSliceBits(0); 1603 #if SVC_EXTENSION 1604 // copy reference list modification info from the first slice, assuming that this information is the same across all slices in the picture 1605 memcpy( pcSlice->getRefPicListModification(), pcPic->getSlice(0)->getRefPicListModification(), sizeof(TComRefPicListModification) ); 1606 #endif 1618 1607 uiNumSlices ++; 1619 1608 } -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncTop.cpp
r466 r467 88 88 m_bMFMEnabledFlag = false; 89 89 #endif 90 #if SCALED_REF_LAYER_OFFSETS91 90 m_numScaledRefLayerOffsets = 0; 92 #endif93 #endif94 91 #if POC_RESET_FLAG 95 92 m_pocAdjustmentValue = 0; 96 93 #endif 94 #endif //SVC_EXTENSION 97 95 } 98 96 … … 175 173 } 176 174 } 175 176 #if LAYER_CTB 177 memcpy(g_auiLayerZscanToRaster[m_layerId], g_auiZscanToRaster, sizeof( g_auiZscanToRaster ) ); 178 memcpy(g_auiLayerRasterToZscan[m_layerId], g_auiRasterToZscan, sizeof( g_auiRasterToZscan ) ); 179 memcpy(g_auiLayerRasterToPelX[m_layerId], g_auiRasterToPelX, sizeof( g_auiRasterToPelX ) ); 180 memcpy(g_auiLayerRasterToPelY[m_layerId], g_auiRasterToPelY, sizeof( g_auiRasterToPelY ) ); 181 #endif 177 182 } 178 183 … … 871 876 #if SVC_EXTENSION 872 877 m_cSPS.setLayerId(m_layerId); 873 #endif874 878 #if REF_IDX_MFM 875 879 #if !M0457_COL_PICTURE_SIGNALING … … 877 881 #endif 878 882 #endif 879 #if SCALED_REF_LAYER_OFFSETS880 883 m_cSPS.setNumScaledRefLayerOffsets(m_numScaledRefLayerOffsets); 881 884 for(Int i = 0; i < m_cSPS.getNumScaledRefLayerOffsets(); i++) … … 883 886 m_cSPS.getScaledRefLayerWindow(i) = m_scaledRefLayerWindow[i]; 884 887 } 885 #endif 888 #endif //SVC_EXTENSION 886 889 ProfileTierLevel& profileTierLevel = *m_cSPS.getPTL()->getGeneralPTL(); 887 890 profileTierLevel.setLevelIdc(m_level); -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncTop.h
r466 r467 140 140 Int m_ilSampleOnlyPred; 141 141 #endif 142 #if SCALED_REF_LAYER_OFFSETS143 142 UInt m_numScaledRefLayerOffsets; 144 143 Window m_scaledRefLayerWindow[MAX_LAYERS]; 145 #endif146 144 #if POC_RESET_FLAG 147 145 Int m_pocAdjustmentValue; 148 146 #endif 149 #endif 147 #endif //SVC_EXTENSION 150 148 protected: 151 149 Void xGetNewPicBuffer ( TComPic*& rpcPic ); ///< get picture buffer which will be processed … … 209 207 Int getNumPicRcvd () { return m_iNumPicRcvd; } 210 208 Void setNumPicRcvd ( Int num ) { m_iNumPicRcvd = num; } 211 #if SCALED_REF_LAYER_OFFSETS212 209 Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } 213 210 UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } 214 211 Window& getScaledRefLayerWindow(Int x) { return m_scaledRefLayerWindow[x]; } 215 #endif 216 #endif 212 #endif //SVC_EXTENSION 217 213 218 214 // ------------------------------------------------------------------------------------------------------------------- -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/WeightPredAnalysis.cpp
r466 r467 293 293 #if O0194_WEIGHTED_PREDICTION_CGS 294 294 // make sure the reference frames other than ILR are not using weighted prediction 295 if (!(slice->getRefPic(eRefPicList, refIdxTemp)->isILR(1))){ 295 if (!(slice->getRefPic(eRefPicList, refIdxTemp)->isILR(1))) 296 { 296 297 continue; 297 298 }
Note: See TracChangeset for help on using the changeset viewer.