Changeset 467 in SHVCSoftware for branches/SHM-4.0-dev/source/Lib
- Timestamp:
- 14 Nov 2013, 00:54:41 (11 years ago)
- Location:
- branches/SHM-4.0-dev/source/Lib
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
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.