Changeset 1502 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibCommon
- Timestamp:
- 11 Dec 2015, 00:05:48 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib/TLibCommon
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp
r1483 r1502 411 411 const TComSPS &sps=*(getSlice()->getSPS()); 412 412 413 #if SVC_EXTENSION414 TComSlice * pcSlice = m_pcPic->getSlice(m_pcPic->getCurrSliceIdx());415 const UInt picWidth = pcSlice->getPicWidthInLumaSamples();416 const UInt picHeight = pcSlice->getPicHeightInLumaSamples();417 #else418 413 const UInt picWidth = sps.getPicWidthInLumaSamples(); 419 414 const UInt picHeight = sps.getPicHeightInLumaSamples(); 420 #endif421 415 const UInt granularityWidth = sps.getMaxCUWidth(); 422 416 … … 1154 1148 UInt uiAbsZorderCUIdxLB = g_auiZscanToRaster[ m_absZIdxInCtu ] + ((m_puhHeight[0] / m_pcPic->getMinCUHeight()) - 1)*numPartInCtuWidth; 1155 1149 1156 #if SVC_EXTENSION1157 if( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxLB] + (m_pcPic->getPicSym()->getMinCUHeight() * uiPartUnitOffset)) >= m_pcSlice->getPicHeightInLumaSamples())1158 #else1159 1150 if( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxLB] + (m_pcPic->getPicSym()->getMinCUHeight() * uiPartUnitOffset)) >= m_pcSlice->getSPS()->getPicHeightInLumaSamples()) 1160 #endif1161 1151 { 1162 1152 uiBLPartUnitIdx = MAX_UINT; … … 1202 1192 const UInt numPartInCtuWidth = m_pcPic->getNumPartInCtuWidth(); 1203 1193 1204 #if SVC_EXTENSION1205 if( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxRT] + (m_pcPic->getPicSym()->getMinCUHeight() * uiPartUnitOffset)) >= m_pcSlice->getPicWidthInLumaSamples() )1206 #else1207 1194 if( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxRT] + (m_pcPic->getPicSym()->getMinCUHeight() * uiPartUnitOffset)) >= m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) 1208 #endif1209 1195 { 1210 1196 uiARPartUnitIdx = MAX_UINT; … … 2394 2380 Int ctuRsAddr = -1; 2395 2381 2396 #if SVC_EXTENSION2397 if ( ( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth () ) < m_pcSlice->getPicWidthInLumaSamples() ) // image boundary check2398 && ( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) < m_pcSlice->getPicHeightInLumaSamples() ) )2399 #else2400 2382 if ( ( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth () ) < m_pcSlice->getSPS()->getPicWidthInLumaSamples () ) // image boundary check 2401 2383 && ( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) < m_pcSlice->getSPS()->getPicHeightInLumaSamples() ) ) 2402 #endif2403 2384 { 2404 2385 if ( ( uiAbsPartIdxTmp % numPartInCtuWidth < numPartInCtuWidth - 1 ) && // is not at the last column of CTU … … 2731 2712 Int ctuRsAddr = -1; 2732 2713 2733 #if SVC_EXTENSION2734 if ( ( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelX() + g_auiRasterToPelX[absPartIdx] + m_pcPic->getMinCUWidth () ) < m_pcSlice->getPicWidthInLumaSamples()) // image boundary check2735 && ( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelY() + g_auiRasterToPelY[absPartIdx] + m_pcPic->getMinCUHeight() ) < m_pcSlice->getPicHeightInLumaSamples() ) )2736 #else2737 2714 if ( ( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelX() + g_auiRasterToPelX[absPartIdx] + m_pcPic->getMinCUWidth () ) < m_pcSlice->getSPS()->getPicWidthInLumaSamples () ) // image boundary check 2738 2715 && ( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelY() + g_auiRasterToPelY[absPartIdx] + m_pcPic->getMinCUHeight() ) < m_pcSlice->getSPS()->getPicHeightInLumaSamples() ) ) 2739 #endif2740 2716 { 2741 2717 if ( ( absPartIdx % numPartInCtuWidth < numPartInCtuWidth - 1 ) && // is not at the last column of CTU … … 2804 2780 Int iMvShift = 2; 2805 2781 Int iOffset = 8; 2806 #if SVC_EXTENSION2807 Int iHorMax = ( m_pcSlice->getPicWidthInLumaSamples() + iOffset - (Int)m_uiCUPelX - 1 ) << iMvShift;2808 #else2809 2782 Int iHorMax = ( sps.getPicWidthInLumaSamples() + iOffset - (Int)m_uiCUPelX - 1 ) << iMvShift; 2810 #endif2811 2783 Int iHorMin = ( -(Int)sps.getMaxCUWidth() - iOffset - (Int)m_uiCUPelX + 1 ) << iMvShift; 2812 2784 2813 #if SVC_EXTENSION2814 Int iVerMax = ( m_pcSlice->getPicHeightInLumaSamples() + iOffset - (Int)m_uiCUPelY - 1 ) << iMvShift;2815 #else2816 2785 Int iVerMax = ( sps.getPicHeightInLumaSamples() + iOffset - (Int)m_uiCUPelY - 1 ) << iMvShift; 2817 #endif2818 2786 Int iVerMin = ( -(Int)sps.getMaxCUHeight() - iOffset - (Int)m_uiCUPelY + 1 ) << iMvShift; 2819 2787 -
branches/SHM-dev/source/Lib/TLibCommon/TComLoopFilter.cpp
r1465 r1502 185 185 UInt uiLPelX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsZorderIdx] ]; 186 186 UInt uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsZorderIdx] ]; 187 #if SVC_EXTENSION188 if( ( uiLPelX < pcCU->getSlice()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getPicHeightInLumaSamples() ) )189 #else190 187 if( ( uiLPelX < sps.getPicWidthInLumaSamples() ) && ( uiTPelY < sps.getPicHeightInLumaSamples() ) ) 191 #endif192 188 { 193 189 xDeblockCU( pcCU, uiAbsZorderIdx, uiDepth+1, edgeDir ); … … 566 562 const TComSPS &sps = *(pcCU->getSlice()->getSPS()); 567 563 const Bool ppsTransquantBypassEnableFlag = pcCU->getSlice()->getPPS()->getTransquantBypassEnableFlag(); 568 569 #if SVC_EXTENSION570 const Int bitDepthLuma = pcCU->getSlice()->getBitDepth(CHANNEL_TYPE_LUMA);571 #else572 564 const Int bitDepthLuma = sps.getBitDepth(CHANNEL_TYPE_LUMA); 573 #endif574 575 565 const Bool lfCrossSliceBoundaryFlag = pcCU->getSlice()->getLFCrossSliceBoundaryFlag(); 576 566 … … 691 681 Pel *piSrcCr = pcPicYuvRec->getAddr( COMPONENT_Cr, pcCU->getCtuRsAddr(), uiAbsZorderIdx ); 692 682 const TComSPS &sps = *(pcCU->getSlice()->getSPS()); 693 #if SVC_EXTENSION694 const Int bitDepthChroma = pcCU->getSlice()->getBitDepth(CHANNEL_TYPE_CHROMA);695 #else696 683 const Int bitDepthChroma = sps.getBitDepth(CHANNEL_TYPE_CHROMA); 697 #endif698 684 699 685 const UInt uiPelsInPartChromaH = sps.getMaxCUWidth() >> (sps.getMaxTotalCUDepth()+pcPicYuvRec->getComponentScaleX(COMPONENT_Cb)); … … 757 743 } 758 744 759 #if SVC_EXTENSION760 const Int iBitdepthScale = 1 << (pcCU->getSlice()->getBitDepth(CHANNEL_TYPE_CHROMA)-8);761 #else762 745 const Int iBitdepthScale = 1 << (pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA)-8); 763 #endif764 746 765 747 for ( UInt iIdx = 0; iIdx < uiNumParts; iIdx++ ) -
branches/SHM-dev/source/Lib/TLibCommon/TComPattern.cpp
r1465 r1502 132 132 const Int iAboveUnits = iTUWidthInUnits << 1; 133 133 const Int iLeftUnits = iTUHeightInUnits << 1; 134 #if SVC_EXTENSION135 const Int bitDepthForChannel = pcCU->getSlice()->getBitDepth(chType);136 #else137 134 const Int bitDepthForChannel = sps.getBitDepth(chType); 138 #endif139 135 140 136 assert(iTUHeightInUnits > 0 && iTUWidthInUnits > 0); -
branches/SHM-dev/source/Lib/TLibCommon/TComPic.cpp
r1487 r1502 79 79 Void TComPic::create( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, const Bool bIsVirtual, const UInt layerId ) 80 80 { 81 const ChromaFormat chromaFormatIDC = vps.getChromaFormatIdc(&sps, layerId);82 const Int iWidth = vps.getPicWidthInLumaSamples(&sps, layerId);83 const Int iHeight = vps.getPicHeightInLumaSamples(&sps, layerId);81 const ChromaFormat chromaFormatIDC = sps.getChromaFormatIdc(); 82 const Int iWidth = sps.getPicWidthInLumaSamples(); 83 const Int iHeight = sps.getPicHeightInLumaSamples(); 84 84 const UInt uiMaxCuWidth = sps.getMaxCUWidth(); 85 85 const UInt uiMaxCuHeight = sps.getMaxCUHeight(); 86 86 const UInt uiMaxDepth = sps.getMaxTotalCUDepth(); 87 88 const Window& conformanceWindow = vps.getConformanceWindow( &sps, layerId ); 87 const Window& conformanceWindow = sps.getConformanceWindow(); 89 88 90 89 m_layerId = layerId; -
branches/SHM-dev/source/Lib/TLibCommon/TComPic.h
r1465 r1502 161 161 Void clearSliceBuffer() {m_picSym.clearSliceBuffer(); } 162 162 163 #if SVC_EXTENSION164 const Window& getConformanceWindow() const { return m_picSym.getSlice(0)->getConformanceWindow(); }165 #else166 163 const Window& getConformanceWindow() const { return m_picSym.getSPS().getConformanceWindow(); } 167 #endif168 164 Window getDefDisplayWindow() const { return m_picSym.getSPS().getVuiParametersPresentFlag() ? m_picSym.getSPS().getVuiParameters()->getDefaultDisplayWindow() : Window(); } 169 165 -
branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.cpp
r1496 r1502 84 84 Void TComPicSym::create ( const TComVPS& vps, const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth, const UInt layerId ) 85 85 { 86 m_vps = vps; 87 #else 88 Void TComPicSym::create ( const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth ) 89 { 90 #endif 86 91 UInt i; 87 92 m_sps = sps; 88 93 m_pps = pps; 89 m_vps = vps;90 91 const ChromaFormat chromaFormatIDC = vps.getChromaFormatIdc(&sps, layerId);92 const Int iPicWidth = vps.getPicWidthInLumaSamples(&sps, layerId);93 const Int iPicHeight = vps.getPicHeightInLumaSamples(&sps, layerId);94 #else95 Void TComPicSym::create ( const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth )96 {97 UInt i;98 m_sps = sps;99 m_pps = pps;100 94 101 95 const ChromaFormat chromaFormatIDC = sps.getChromaFormatIdc(); 102 96 const Int iPicWidth = sps.getPicWidthInLumaSamples(); 103 97 const Int iPicHeight = sps.getPicHeightInLumaSamples(); 104 #endif105 98 106 99 const UInt uiMaxCuWidth = sps.getMaxCUWidth(); -
branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.h
r1497 r1502 198 198 Bool getSkippedTileSetFlag( Int i ) { return *(m_pbSkippedTileSetFlag + i); } 199 199 #endif 200 Void inferSpsForNonHEVCBL() { m_sps.inferSPS(0, &m_vps); } 200 201 #endif //SVC_EXTENSION 201 202 -
branches/SHM-dev/source/Lib/TLibCommon/TComPrediction.cpp
r1483 r1502 460 460 const Int channelsBitDepthForPrediction = rTu.getCU()->getSlice()->getSPS()->getStreamBitDepth(channelType); 461 461 #else 462 #if SVC_EXTENSION463 const Int channelsBitDepthForPrediction = rTu.getCU()->getSlice()->getBitDepth(channelType);464 #else465 462 const Int channelsBitDepthForPrediction = rTu.getCU()->getSlice()->getSPS()->getBitDepth(channelType); 466 #endif467 463 #endif 468 464 xPredIntraAng( channelsBitDepthForPrediction, ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight, channelType, uiDirMode, enableEdgeFilters ); … … 605 601 { 606 602 const ComponentID compID=ComponentID(comp); 607 #if SVC_EXTENSION608 xPredInterBlk (compID, pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, pcYuvPred, bi, pcCU->getSlice()->getBitDepth(toChannelType(compID)) );609 #else610 603 xPredInterBlk (compID, pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, pcYuvPred, bi, pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)) ); 611 #endif612 604 } 613 605 } … … 659 651 else 660 652 { 661 #if SVC_EXTENSION662 xWeightedAverage( &m_acYuvPred[REF_PIC_LIST_0], &m_acYuvPred[REF_PIC_LIST_1], iRefIdx[REF_PIC_LIST_0], iRefIdx[REF_PIC_LIST_1], uiPartAddr, iWidth, iHeight, pcYuvPred, pcCU->getSlice()->getBitDepths() );663 #else664 653 xWeightedAverage( &m_acYuvPred[REF_PIC_LIST_0], &m_acYuvPred[REF_PIC_LIST_1], iRefIdx[REF_PIC_LIST_0], iRefIdx[REF_PIC_LIST_1], uiPartAddr, iWidth, iHeight, pcYuvPred, pcCU->getSlice()->getSPS()->getBitDepths() ); 665 #endif666 654 } 667 655 } -
branches/SHM-dev/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp
r1442 r1502 599 599 Pel* resBlk = resYuv->getAddr(component) + blkYPos*resStride + blkXPos; 600 600 601 #if SVC_EXTENSION602 offsetBlock( pPic->getSlice(0)->getBitDepth(toChannelType(component)), ctbOffset.typeIdc, ctbOffset.offset603 #else604 601 offsetBlock( pPic->getPicSym()->getSPS().getBitDepth(toChannelType(component)), ctbOffset.typeIdc, ctbOffset.offset 605 #endif606 602 , srcBlk, resBlk, srcStride, resStride, blkWidth, blkHeight 607 603 , isLeftAvail, isRightAvail … … 688 684 UInt uiLPelX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsZorderIdx] ]; 689 685 UInt uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsZorderIdx] ]; 690 #if SVC_EXTENSION691 if( ( uiLPelX < pcCU->getSlice()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getPicHeightInLumaSamples() ) )692 #else693 686 if( ( uiLPelX < pcCU->getSlice()->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getSPS()->getPicHeightInLumaSamples() ) ) 694 #endif695 687 { 696 688 xPCMCURestoration( pcCU, uiAbsZorderIdx, uiDepth+1 ); … … 739 731 else 740 732 { 741 #if SVC_EXTENSION742 uiPcmLeftShiftBit = pcCU->getSlice()->getBitDepth(toChannelType(compID)) - pcCU->getSlice()->getSPS()->getPCMBitDepth(toChannelType(compID));743 #else744 733 uiPcmLeftShiftBit = sps.getBitDepth(toChannelType(compID)) - sps.getPCMBitDepth(toChannelType(compID)); 745 #endif746 734 } 747 735 -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r1497 r1502 506 506 ); 507 507 508 Bool sameBitDepths = ( getBitDepth(CHANNEL_TYPE_LUMA) == ilpPic[refLayerIdc]->getSlice(0)->getBitDepth(CHANNEL_TYPE_LUMA) ) && ( getBitDepth(CHANNEL_TYPE_CHROMA) == ilpPic[refLayerIdc]->getSlice(0)->getBitDepth(CHANNEL_TYPE_CHROMA) );508 Bool sameBitDepths = ( m_pcSPS->getBitDepth(CHANNEL_TYPE_LUMA) == ilpPic[refLayerIdc]->getSlice(0)->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) ) && ( m_pcSPS->getBitDepth(CHANNEL_TYPE_CHROMA) == ilpPic[refLayerIdc]->getSlice(0)->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA) ); 509 509 510 510 // motion resampling constraint … … 1824 1824 } 1825 1825 1826 #if SVC_EXTENSION1827 const Int offsetScalingFactor = bUseHighPrecisionPredictionWeighting ? 1 : (1 << (getBitDepth(toChannelType(ComponentID(yuv)))-8));1828 #else1829 1826 const Int offsetScalingFactor = bUseHighPrecisionPredictionWeighting ? 1 : (1 << (sps->getBitDepth(toChannelType(ComponentID(yuv)))-8)); 1830 #endif1831 1827 1832 1828 pwp->w = pwp->iWeight; … … 3280 3276 } 3281 3277 3282 UInt TComSlice::getPicWidthInLumaSamples()3283 {3284 UInt retVal, layerId = getLayerId();3285 3286 if ( layerId == 0 || m_pcSPS->getV1CompatibleSPSFlag() == 1 )3287 {3288 if( layerId == 0 && m_pcVPS->getNonHEVCBaseLayerFlag() )3289 {3290 retVal = m_pcVPS->getVpsRepFormat(layerId)->getPicWidthVpsInLumaSamples();3291 }3292 else3293 {3294 retVal = m_pcSPS->getPicWidthInLumaSamples();3295 }3296 }3297 else3298 {3299 retVal = m_pcVPS->getVpsRepFormat(m_pcSPS->getUpdateRepFormatFlag() ? m_pcSPS->getUpdateRepFormatIndex() : m_pcVPS->getVpsRepFormatIdx(m_pcVPS->getLayerIdxInVps(layerId)))->getPicWidthVpsInLumaSamples();3300 }3301 3302 return retVal;3303 }3304 3305 UInt TComVPS::getPicWidthInLumaSamples( const TComSPS* sps, const UInt layerId ) const3306 {3307 UInt retVal;3308 3309 if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )3310 {3311 if( layerId == 0 && m_nonHEVCBaseLayerFlag )3312 {3313 retVal = m_vpsRepFormat[layerId].getPicWidthVpsInLumaSamples();3314 }3315 else3316 {3317 retVal = sps->getPicWidthInLumaSamples();3318 }3319 }3320 else3321 {3322 retVal = m_vpsRepFormat[sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : m_vpsRepFormatIdx[m_layerIdxInVps[layerId]]].getPicWidthVpsInLumaSamples();3323 }3324 3325 return retVal;3326 }3327 3328 UInt TComSlice::getPicHeightInLumaSamples()3329 {3330 UInt retVal, layerId = getLayerId();3331 3332 if ( layerId == 0 || m_pcSPS->getV1CompatibleSPSFlag() == 1 )3333 {3334 if( layerId == 0 && m_pcVPS->getNonHEVCBaseLayerFlag() )3335 {3336 retVal = m_pcVPS->getVpsRepFormat(layerId)->getPicHeightVpsInLumaSamples();3337 }3338 else3339 {3340 retVal = m_pcSPS->getPicHeightInLumaSamples();3341 }3342 }3343 else3344 {3345 retVal = m_pcVPS->getVpsRepFormat(m_pcSPS->getUpdateRepFormatFlag() ? m_pcSPS->getUpdateRepFormatIndex() : m_pcVPS->getVpsRepFormatIdx(m_pcVPS->getLayerIdxInVps(layerId)))->getPicHeightVpsInLumaSamples();3346 }3347 3348 return retVal;3349 }3350 3351 UInt TComVPS::getPicHeightInLumaSamples( const TComSPS* sps, const UInt layerId ) const3352 {3353 UInt retVal;3354 3355 if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )3356 {3357 if( layerId == 0 && m_nonHEVCBaseLayerFlag )3358 {3359 retVal = m_vpsRepFormat[layerId].getPicHeightVpsInLumaSamples();3360 }3361 else3362 {3363 retVal = sps->getPicHeightInLumaSamples();3364 }3365 }3366 else3367 {3368 retVal = m_vpsRepFormat[sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : m_vpsRepFormatIdx[m_layerIdxInVps[layerId]]].getPicHeightVpsInLumaSamples();3369 }3370 3371 return retVal;3372 }3373 3374 ChromaFormat TComSlice::getChromaFormatIdc()3375 {3376 ChromaFormat retVal;3377 UInt layerId = getLayerId();3378 3379 if( layerId == 0 || m_pcSPS->getV1CompatibleSPSFlag() == 1 )3380 {3381 if( layerId == 0 && m_pcVPS->getNonHEVCBaseLayerFlag() )3382 {3383 retVal = m_pcVPS->getVpsRepFormat(layerId)->getChromaFormatVpsIdc();3384 }3385 else3386 {3387 retVal = m_pcSPS->getChromaFormatIdc();3388 }3389 }3390 else3391 {3392 retVal = m_pcVPS->getVpsRepFormat(m_pcSPS->getUpdateRepFormatFlag() ? m_pcSPS->getUpdateRepFormatIndex() : m_pcVPS->getVpsRepFormatIdx(m_pcVPS->getLayerIdxInVps(layerId)))->getChromaFormatVpsIdc();3393 }3394 3395 return retVal;3396 }3397 3398 ChromaFormat TComVPS::getChromaFormatIdc( const TComSPS* sps, const UInt layerId ) const3399 {3400 ChromaFormat retVal;3401 3402 if( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )3403 {3404 if( layerId == 0 && m_nonHEVCBaseLayerFlag )3405 {3406 retVal = m_vpsRepFormat[layerId].getChromaFormatVpsIdc();3407 }3408 else3409 {3410 retVal = sps->getChromaFormatIdc();3411 }3412 }3413 else3414 {3415 retVal = m_vpsRepFormat[sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : m_vpsRepFormatIdx[m_layerIdxInVps[layerId]]].getChromaFormatVpsIdc();3416 }3417 3418 return retVal;3419 }3420 3421 BitDepths& TComSlice::getBitDepths()3422 {3423 static BitDepths bitDepths;3424 3425 bitDepths.recon[CHANNEL_TYPE_LUMA] = getBitDepth(CHANNEL_TYPE_LUMA);3426 bitDepths.recon[CHANNEL_TYPE_CHROMA] = getBitDepth(CHANNEL_TYPE_CHROMA);3427 3428 return bitDepths;3429 }3430 3431 UInt TComSlice::getBitDepth(ChannelType type) const3432 {3433 UInt retVal, layerId = getLayerId();3434 3435 if( layerId == 0 || m_pcSPS->getV1CompatibleSPSFlag() == 1 )3436 {3437 if( layerId == 0 && m_pcVPS->getNonHEVCBaseLayerFlag() )3438 {3439 retVal = m_pcVPS->getVpsRepFormat(layerId)->getBitDepthVps(type);3440 }3441 else3442 {3443 retVal = m_pcSPS->getBitDepth(type);3444 }3445 }3446 else3447 {3448 retVal = m_pcVPS->getVpsRepFormat(m_pcSPS->getUpdateRepFormatFlag() ? m_pcSPS->getUpdateRepFormatIndex() : m_pcVPS->getVpsRepFormatIdx(m_pcVPS->getLayerIdxInVps(layerId)))->getBitDepthVps(type);3449 }3450 3451 return retVal;3452 }3453 3454 UInt TComVPS::getBitDepth( ChannelType type, const TComSPS* sps, const UInt layerId ) const3455 {3456 UInt retVal;3457 3458 if( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )3459 {3460 if( layerId == 0 && m_nonHEVCBaseLayerFlag )3461 {3462 retVal = m_vpsRepFormat[layerId].getBitDepthVps(type);3463 }3464 else3465 {3466 retVal = sps->getBitDepth(type);3467 }3468 }3469 else3470 {3471 retVal = m_vpsRepFormat[sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : m_vpsRepFormatIdx[m_layerIdxInVps[layerId]]].getBitDepthVps(type);3472 }3473 3474 return retVal;3475 }3476 3477 const BitDepths& TComVPS::getBitDepths( const TComSPS* sps, const UInt layerId ) const3478 {3479 static BitDepths bitDepths;3480 bitDepths.recon[CHANNEL_TYPE_LUMA] = getBitDepth(CHANNEL_TYPE_LUMA, sps, layerId);3481 bitDepths.recon[CHANNEL_TYPE_CHROMA] = getBitDepth(CHANNEL_TYPE_CHROMA, sps, layerId);3482 return bitDepths;3483 }3484 3485 const Window& TComSlice::getConformanceWindow() const3486 {3487 if ( m_layerId == 0 || m_pcSPS->getV1CompatibleSPSFlag() == 1 )3488 {3489 if( m_layerId == 0 && m_pcVPS->getNonHEVCBaseLayerFlag() )3490 {3491 return m_pcVPS->getVpsRepFormat(m_layerId)->getConformanceWindowVps();3492 }3493 else3494 {3495 return m_pcSPS->getConformanceWindow();3496 }3497 }3498 else3499 {3500 return m_pcVPS->getVpsRepFormat(m_pcSPS->getUpdateRepFormatFlag() ? m_pcSPS->getUpdateRepFormatIndex() : m_pcVPS->getVpsRepFormatIdx(m_pcVPS->getLayerIdxInVps(m_layerId)))->getConformanceWindowVps();3501 }3502 }3503 3504 const Window& TComVPS::getConformanceWindow( const TComSPS* sps, const UInt layerId ) const3505 {3506 if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )3507 {3508 if( layerId == 0 && m_nonHEVCBaseLayerFlag )3509 {3510 return m_vpsRepFormat[layerId].getConformanceWindowVps();3511 }3512 else3513 {3514 return sps->getConformanceWindow();3515 }3516 }3517 else3518 {3519 return m_vpsRepFormat[sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : m_vpsRepFormatIdx[m_layerIdxInVps[layerId]]].getConformanceWindowVps();3520 }3521 }3522 3523 3278 RepFormat::RepFormat() 3524 3279 #if AUXILIARY_PICTURES … … 3856 3611 return numPocBeforeCurr; 3857 3612 } 3613 3614 Void TComSPS::inferSPS( const UInt layerId, TComVPS* vps ) 3615 { 3616 RepFormat* repFormat = NULL; 3617 3618 if( layerId == 0 || m_bV1CompatibleSPSFlag == 1 ) 3619 { 3620 if( layerId == 0 && vps->getNonHEVCBaseLayerFlag() ) 3621 { 3622 repFormat = vps->getVpsRepFormat(layerId); 3623 } 3624 } 3625 else 3626 { 3627 repFormat = vps->getVpsRepFormat(m_updateRepFormatFlag ? m_updateRepFormatIndex : vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId))); 3628 } 3629 3630 if( repFormat ) 3631 { 3632 m_chromaFormatIdc = repFormat->getChromaFormatVpsIdc(); 3633 m_picWidthInLumaSamples = repFormat->getPicWidthVpsInLumaSamples(); 3634 m_picHeightInLumaSamples = repFormat->getPicHeightVpsInLumaSamples(); 3635 3636 m_bitDepths.recon[CHANNEL_TYPE_LUMA] = repFormat->getBitDepthVps(CHANNEL_TYPE_LUMA); 3637 m_bitDepths.recon[CHANNEL_TYPE_CHROMA] = repFormat->getBitDepthVps(CHANNEL_TYPE_CHROMA); 3638 3639 m_qpBDOffset[CHANNEL_TYPE_LUMA] = (m_bitDepths.recon[CHANNEL_TYPE_LUMA] - 8) * 6; 3640 m_qpBDOffset[CHANNEL_TYPE_CHROMA] = (m_bitDepths.recon[CHANNEL_TYPE_CHROMA] - 8) * 6; 3641 3642 m_conformanceWindow = repFormat->getConformanceWindowVps(); 3643 } 3644 } 3858 3645 #endif //SVC_EXTENSION 3859 3646 -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r1497 r1502 1130 1130 Void checkNecessaryLayerFlagCondition(); 1131 1131 Void calculateMaxSLInLayerSets(); 1132 1133 ChromaFormat getChromaFormatIdc( const TComSPS* sps, const UInt layerId ) const;1134 UInt getPicHeightInLumaSamples( const TComSPS* sps, const UInt layerId ) const;1135 UInt getPicWidthInLumaSamples( const TComSPS* sps, const UInt layerId ) const;1136 UInt getBitDepth( ChannelType type, const TComSPS* sps, const UInt layerId ) const;1137 const BitDepths& getBitDepths( const TComSPS* sps, const UInt layerId ) const;1138 const Window& getConformanceWindow( const TComSPS* sps, const UInt layerId ) const;1139 1132 #endif //SVC_EXTENSION 1140 1133 }; … … 1604 1597 Void setInferScalingListFlag( Bool flag ) { m_inferScalingListFlag = flag; } 1605 1598 Void setScalingListRefLayerId( UInt layerId ) { m_scalingListRefLayerId = layerId; } 1599 1600 Void inferSPS( const UInt layerId, TComVPS* vps ); 1606 1601 #endif //SVC_EXTENSION 1607 1602 }; … … 2399 2394 Bool getCrossLayerBLAFlag () { return m_bCrossLayerBLAFlag; } 2400 2395 Void setCrossLayerBLAFlag (Bool b) { m_bCrossLayerBLAFlag = b; } 2401 2402 2396 Int getNumNegativeRpsCurrTempList(); 2403 2404 UInt getPicWidthInLumaSamples();2405 UInt getPicHeightInLumaSamples();2406 ChromaFormat getChromaFormatIdc();2407 UInt getBitDepth(ChannelType type) const;2408 BitDepths& getBitDepths();2409 Int getQpBDOffset(ChannelType type) const { return (getBitDepth(type) - 8) * 6; }2410 2411 const Window& getConformanceWindow() const;2412 2413 2397 Void setILRPic(TComPic **pcIlpPic); 2414 2415 2398 Int getPocResetIdc() { return m_pocResetIdc; } 2416 2399 Void setPocResetIdc(Int b) { m_pocResetIdc = b; } -
branches/SHM-dev/source/Lib/TLibCommon/TComTU.cpp
r1499 r1502 47 47 48 48 TComTU::TComTU(TComDataCU *pcCU, const UInt absPartIdxCU, const UInt cuDepth, const UInt initTrDepthRelCU) 49 #if SCALABLE_REXT50 : mChromaFormat(pcCU->getSlice()->getChromaFormatIdc()),51 #else52 49 : mChromaFormat(pcCU->getSlice()->getSPS()->getChromaFormatIdc()), 53 #endif54 50 mbProcessLastOfLevel(true), // does not matter. the top level is not 4 quadrants. 55 51 mCuDepth(cuDepth), -
branches/SHM-dev/source/Lib/TLibCommon/TComTrQuant.cpp
r1335 r1502 114 114 *this = QpParam(cu.getQP( 0 ), 115 115 toChannelType(compID), 116 #if SVC_EXTENSION117 cu.getSlice()->getQpBDOffset(toChannelType(compID)),118 #else119 116 cu.getSlice()->getSPS()->getQpBDOffset(toChannelType(compID)), 120 #endif121 117 chromaQpOffset, 122 118 cu.getPic()->getChromaFormat()); … … 1143 1139 TComDataCU* pcCU = rTu.getCU(); 1144 1140 const UInt uiAbsPartIdx = rTu.GetAbsPartIdxTU(); 1145 #if SVC_EXTENSION1146 const Int channelBitDepth = pcCU->getSlice()->getBitDepth(toChannelType(compID));1147 #else1148 1141 const Int channelBitDepth = pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)); 1149 #endif1150 1142 1151 1143 TCoeff* piCoef = pSrc; … … 1345 1337 const Int channelBitDepth = pcCU->getSlice()->getSPS()->getStreamBitDepth(toChannelType(compID)); 1346 1338 #else 1347 #if SVC_EXTENSION1348 const Int channelBitDepth = pcCU->getSlice()->getBitDepth(toChannelType(compID));1349 #else1350 1339 const Int channelBitDepth = pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)); 1351 #endif1352 1340 #endif 1353 1341 … … 1529 1517 else 1530 1518 { 1531 #if SVC_EXTENSION1532 const Int channelBitDepth=pcCU->getSlice()->getBitDepth(toChannelType(compID));1533 #else1534 1519 const Int channelBitDepth=pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)); 1535 #endif1536 1520 xT( channelBitDepth, rTu.useDST(compID), pcResidual, uiStride, m_plTempCoeff, uiWidth, uiHeight, pcCU->getSlice()->getSPS()->getMaxLog2TrDynamicRange(toChannelType(compID)) ); 1537 1521 } … … 1667 1651 const Int channelBitDepth = pcCU->getSlice()->getSPS()->getStreamBitDepth(toChannelType(compID)); 1668 1652 #else 1669 #if SVC_EXTENSION1670 const Int channelBitDepth = pcCU->getSlice()->getBitDepth(toChannelType(compID));1671 #else1672 1653 const Int channelBitDepth = pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)); 1673 #endif1674 1654 #endif 1675 1655 xIT( channelBitDepth, rTu.useDST(compID), m_plTempCoeff, pcResidual, uiStride, uiWidth, uiHeight, pcCU->getSlice()->getSPS()->getMaxLog2TrDynamicRange(toChannelType(compID)) ); … … 2045 2025 const Int height = rect.height; 2046 2026 const Int maxLog2TrDynamicRange = rTu.getCU()->getSlice()->getSPS()->getMaxLog2TrDynamicRange(toChannelType(component)); 2047 #if SVC_EXTENSION2048 const Int channelBitDepth = rTu.getCU()->getSlice()->getBitDepth(toChannelType(component));2049 #else2050 2027 const Int channelBitDepth = rTu.getCU()->getSlice()->getSPS()->getBitDepth(toChannelType(component)); 2051 #endif2052 2028 2053 2029 Int iTransformShift = getTransformShift(channelBitDepth, rTu.GetEquivalentLog2TrSize(component), maxLog2TrDynamicRange); … … 2101 2077 const Int channelBitDepth = rTu.getCU()->getSlice()->getSPS()->getStreamBitDepth(toChannelType(component)); 2102 2078 #else 2103 #if SVC_EXTENSION2104 const Int channelBitDepth = rTu.getCU()->getSlice()->getBitDepth(toChannelType(component));2105 #else2106 2079 const Int channelBitDepth = rTu.getCU()->getSlice()->getSPS()->getBitDepth(toChannelType(component)); 2107 #endif2108 2080 #endif 2109 2081 … … 2175 2147 const Bool extendedPrecision = pcCU->getSlice()->getSPS()->getSpsRangeExtension().getExtendedPrecisionProcessingFlag(); 2176 2148 const Int maxLog2TrDynamicRange = pcCU->getSlice()->getSPS()->getMaxLog2TrDynamicRange(toChannelType(compID)); 2177 #if SVC_EXTENSION2178 const Int channelBitDepth = rTu.getCU()->getSlice()->getBitDepth(channelType);2179 #else2180 2149 const Int channelBitDepth = rTu.getCU()->getSlice()->getSPS()->getBitDepth(channelType); 2181 #endif2182 2150 2183 2151 /* for 422 chroma blocks, the effective scaling applied during transformation is not a power of 2, hence it cannot be … … 3364 3332 const UInt uiHeight = rect.height; 3365 3333 const Int maxLog2TrDynamicRange = pcCU->getSlice()->getSPS()->getMaxLog2TrDynamicRange(toChannelType(compID)); 3366 #if SVC_EXTENSION3367 const Int channelBitDepth = pcCU->getSlice()->getBitDepth(toChannelType(compID));3368 #else3369 3334 const Int channelBitDepth = pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)); 3370 #endif3371 3335 const Int iTransformShift = getTransformShift(channelBitDepth, rTu.GetEquivalentLog2TrSize(compID), maxLog2TrDynamicRange); 3372 3336 const Int scalingListType = getScalingListType(pcCU->getPredictionMode(uiAbsPartIdx), compID); … … 3431 3395 const Int channelBitDepth = pcCU->getSlice()->getSPS()->getStreamBitDepth(toChannelType(compID)); 3432 3396 #else 3433 #if SVC_EXTENSION3434 const Int channelBitDepth = pcCU->getSlice()->getBitDepth(toChannelType(compID));3435 #else3436 3397 const Int channelBitDepth = pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)); 3437 #endif3438 3398 #endif 3439 3399 const Int iTransformShift = getTransformShift(channelBitDepth, rTu.GetEquivalentLog2TrSize(compID), maxLog2TrDynamicRange); -
branches/SHM-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp
r1500 r1502 64 64 const Window &windowRL = currSlice->getPPS()->getRefLayerWindowForLayer(refLayerId); 65 65 66 Int bitDepthLuma = currSlice->get BitDepth(CHANNEL_TYPE_LUMA);67 Int bitDepthChroma = currSlice->get BitDepth(CHANNEL_TYPE_CHROMA);66 Int bitDepthLuma = currSlice->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA); 67 Int bitDepthChroma = currSlice->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA); 68 68 69 69 //========== Y component upsampling =========== … … 76 76 Int strideEL = pcUsPic->getStride(COMPONENT_Y); 77 77 78 ChromaFormat chromaFormatIdc = currSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getChromaFormatIdc(); 78 ChromaFormat chromaFormatIdc = currSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getSPS()->getChromaFormatIdc(); 79 #if SCALABLE_REXT 80 Int chromaHorScalingEL = TComSPS::getWinUnitX( currSlice->getSPS()->getChromaFormatIdc() ); 81 Int chromaVerScalingEL = TComSPS::getWinUnitY( currSlice->getSPS()->getChromaFormatIdc() ); 82 83 Int chromaHorScalingBL = TComSPS::getWinUnitX( chromaFormatIdc ); 84 Int chromaVerScalingBL = TComSPS::getWinUnitY( chromaFormatIdc ); 85 #else 79 86 Int xScal = TComSPS::getWinUnitX( chromaFormatIdc ); 80 87 Int yScal = TComSPS::getWinUnitY( chromaFormatIdc ); 88 #endif 81 89 82 90 const ResamplingPhase &resamplingPhase = currSlice->getPPS()->getResamplingPhase( refLayerId ); … … 151 159 152 160 #if SCALABLE_REXT 153 if( chromaFormatIdc != 0)161 if( chromaFormatIdc != CHROMA_400 ) 154 162 { 155 #endif 163 widthEL /= chromaHorScalingEL; 164 heightEL /= chromaVerScalingEL; 165 widthBL /= chromaHorScalingBL; 166 heightBL /= chromaVerScalingBL; 167 #else 156 168 widthEL >>= 1; 157 169 heightEL >>= 1; … … 159 171 widthBL >>= 1; 160 172 heightBL >>= 1; 173 #endif 161 174 162 175 strideBL = pcBasePic->getStride( COMPONENT_Cb ); … … 166 179 piSrcV = piSrcBufV; 167 180 181 #if SCALABLE_REXT 182 piDstU = piDstBufU + ( scalEL.getWindowLeftOffset() / chromaHorScalingEL ) + ( scalEL.getWindowTopOffset() / chromaVerScalingEL ) * strideEL; 183 piDstV = piDstBufV + ( scalEL.getWindowLeftOffset() / chromaHorScalingEL ) + ( scalEL.getWindowTopOffset() / chromaVerScalingEL ) * strideEL; 184 #else 168 185 piDstU = piDstBufU + ( scalEL.getWindowLeftOffset() >> 1 ) + ( scalEL.getWindowTopOffset() >> 1 ) * strideEL; 169 186 piDstV = piDstBufV + ( scalEL.getWindowLeftOffset() >> 1 ) + ( scalEL.getWindowTopOffset() >> 1 ) * strideEL; 187 #endif 170 188 171 189 shift = bitDepthChroma - refBitDepthChroma; … … 309 327 310 328 #if SCALABLE_REXT 311 if( chromaFormatIdc != 0)329 if( chromaFormatIdc != CHROMA_400 ) 312 330 { 313 #endif 331 widthEL /= chromaHorScalingEL; 332 heightEL /= chromaVerScalingEL; 333 widthBL /= chromaHorScalingBL; 334 heightBL /= chromaVerScalingBL; 335 #else 314 336 widthEL >>= 1; 315 337 heightEL >>= 1; 316 338 widthBL >>= 1; 317 339 heightBL >>= 1; 340 #endif 318 341 319 342 strideBL = pcBasePic->getStride( COMPONENT_Cb ); 320 343 strideEL = pcUsPic->getStride( COMPONENT_Cb ); 321 344 345 #if SCALABLE_REXT 346 Int srlLOffsetC = scalEL.getWindowLeftOffset() / chromaHorScalingEL; 347 Int srlTOffsetC = scalEL.getWindowTopOffset() / chromaVerScalingEL; 348 #else 322 349 Int srlLOffsetC = scalEL.getWindowLeftOffset() >> 1; 323 350 Int srlTOffsetC = scalEL.getWindowTopOffset() >> 1; 351 #endif 352 324 353 rlClipL = -(NTAPS_US_CHROMA>>1); 325 354 rlClipR = widthBL -1 + (NTAPS_US_CHROMA>>1); … … 331 360 addX = ( ( resamplingPhase.phaseHorChroma * scaleX + 8 ) >> 4 ) - (1 << ( shiftX - 5 )); 332 361 addY = ( ( phaseVerChroma * scaleY + 8 ) >> 4 ) - (1 << ( shiftX - 5 )); 362 363 #if SCALABLE_REXT 364 Int refOffsetXC = (windowRL.getWindowLeftOffset() / chromaHorScalingBL) << 4; 365 Int refOffsetYC = (windowRL.getWindowTopOffset() / chromaVerScalingBL) << 4; 366 #else 333 367 Int refOffsetXC = (windowRL.getWindowLeftOffset() / xScal) << 4; 334 368 Int refOffsetYC = (windowRL.getWindowTopOffset() / yScal) << 4; 369 #endif 335 370 336 371 shiftXM4 = shiftX - 4; 337 372 shiftYM4 = shiftY - 4; 338 373 374 #if SCALABLE_REXT 375 widthEL = pcUsPic->getWidth (COMPONENT_Y) / chromaHorScalingEL; 376 heightEL = pcUsPic->getHeight(COMPONENT_Y) / chromaVerScalingEL; 377 378 widthBL = pcBasePic->getWidth (COMPONENT_Y) / chromaHorScalingBL; 379 heightBL = min<Int>( pcBasePic->getHeight(COMPONENT_Y) / chromaVerScalingBL, heightEL ); 380 #else 339 381 widthEL = pcUsPic->getWidth (COMPONENT_Y) >> 1; 340 382 heightEL = pcUsPic->getHeight(COMPONENT_Y) >> 1; … … 342 384 widthBL = pcBasePic->getWidth (COMPONENT_Y) >> 1; 343 385 heightBL = min<Int>( pcBasePic->getHeight(COMPONENT_Y) >> 1, heightEL ); 386 #endif 344 387 345 388 // shift1 should be calculated using BL bit-depth … … 382 425 //========== vertical upsampling =========== 383 426 pcTempPic->setBorderExtension(false); 427 #if SCALABLE_REXT 428 pcTempPic->setHeight(heightBL * chromaVerScalingBL); 429 #else 384 430 pcTempPic->setHeight(heightBL << 1); 431 #endif 385 432 pcTempPic->extendPicBorder (); // extend the border. 433 #if SCALABLE_REXT 434 pcTempPic->setHeight(heightEL * chromaVerScalingEL); 435 #else 386 436 pcTempPic->setHeight(heightEL << 1); 437 #endif 387 438 388 439 nShift = 20 - bitDepthChroma; … … 390 441 iOffset = 1 << (nShift - 1); 391 442 443 #if SCALABLE_REXT 444 for( j = 0; j < pcTempPic->getHeight(COMPONENT_Y) / chromaVerScalingEL; j++ ) 445 #else 392 446 for( j = 0; j < pcTempPic->getHeight(COMPONENT_Y) >> 1; j++ ) 447 #endif 393 448 { 394 449 Int y = j; … … 408 463 piDstV = piDstV0; 409 464 465 #if SCALABLE_REXT 466 for( i = pcTempPic->getWidth(COMPONENT_Y) / chromaHorScalingEL; i > 0; i-- ) 467 #else 410 468 for( i = pcTempPic->getWidth(COMPONENT_Y) >> 1; i > 0; i-- ) 469 #endif 411 470 { 412 471 *piDstU = ClipBD( (sumChromaVer(piSrcU, coeff, strideEL) + iOffset) >> (nShift), bitDepthChroma ); -
branches/SHM-dev/source/Lib/TLibCommon/TComWeightPrediction.cpp
r1399 r1502 290 290 for ( Int yuv=0 ; yuv<numValidComponent ; yuv++ ) 291 291 { 292 #if SVC_EXTENSION293 const Int bitDepth = pcSlice->getBitDepth(toChannelType(ComponentID(yuv)));294 #else295 292 const Int bitDepth = pcSlice->getSPS()->getBitDepth(toChannelType(ComponentID(yuv))); 296 #endif297 293 const Int offsetScalingFactor = bUseHighPrecisionPredictionWeighting ? 1 : (1 << (bitDepth-8)); 298 294 … … 315 311 for ( Int yuv=0 ; yuv<numValidComponent ; yuv++ ) 316 312 { 317 #if SVC_EXTENSION318 const Int bitDepth = pcSlice->getBitDepth(toChannelType(ComponentID(yuv)));319 #else320 313 const Int bitDepth = pcSlice->getSPS()->getBitDepth(toChannelType(ComponentID(yuv))); 321 #endif322 314 const Int offsetScalingFactor = bUseHighPrecisionPredictionWeighting ? 1 : (1 << (bitDepth-8)); 323 315 … … 351 343 if( iRefIdx0 >= 0 && iRefIdx1 >= 0 ) 352 344 { 353 #if SVC_EXTENSION354 addWeightBi(pcYuvSrc0, pcYuvSrc1, pcCU->getSlice()->getBitDepths(), uiPartIdx, iWidth, iHeight, pwp0, pwp1, rpcYuvDst );355 #else356 345 addWeightBi(pcYuvSrc0, pcYuvSrc1, pcCU->getSlice()->getSPS()->getBitDepths(), uiPartIdx, iWidth, iHeight, pwp0, pwp1, rpcYuvDst ); 357 #endif358 346 } 359 347 else if ( iRefIdx0 >= 0 && iRefIdx1 < 0 ) 360 348 { 361 #if SVC_EXTENSION362 addWeightUni( pcYuvSrc0, pcCU->getSlice()->getBitDepths(), uiPartIdx, iWidth, iHeight, pwp0, rpcYuvDst );363 #else364 349 addWeightUni( pcYuvSrc0, pcCU->getSlice()->getSPS()->getBitDepths(), uiPartIdx, iWidth, iHeight, pwp0, rpcYuvDst ); 365 #endif366 350 } 367 351 else if ( iRefIdx0 < 0 && iRefIdx1 >= 0 ) 368 352 { 369 #if SVC_EXTENSION370 addWeightUni( pcYuvSrc1, pcCU->getSlice()->getBitDepths(), uiPartIdx, iWidth, iHeight, pwp1, rpcYuvDst );371 #else372 353 addWeightUni( pcYuvSrc1, pcCU->getSlice()->getSPS()->getBitDepths(), uiPartIdx, iWidth, iHeight, pwp1, rpcYuvDst ); 373 #endif374 354 } 375 355 else … … 407 387 getWpScaling(pcCU, -1, iRefIdx, pwpTmp, pwp); 408 388 } 409 #if SVC_EXTENSION410 addWeightUni( pcYuvSrc, pcCU->getSlice()->getBitDepths(), uiPartAddr, iWidth, iHeight, pwp, pcYuvPred );411 #else412 389 addWeightUni( pcYuvSrc, pcCU->getSlice()->getSPS()->getBitDepths(), uiPartAddr, iWidth, iHeight, pwp, pcYuvPred ); 413 #endif 414 } 390 }
Note: See TracChangeset for help on using the changeset viewer.