- Timestamp:
- 11 Dec 2015, 00:05:48 (9 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 34 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp
r1490 r1502 328 328 if ( !m_reconFileName[curLayerId].empty() && !openedReconFile[curLayerId] ) 329 329 { 330 const BitDepths& bitDepths = m_apcTDecTop[curLayerId]->getParameterSetManager()->getActive VPS()->getBitDepths( m_apcTDecTop[curLayerId]->getParameterSetManager()->getActiveSPS(), curLayerId);330 const BitDepths& bitDepths = m_apcTDecTop[curLayerId]->getParameterSetManager()->getActiveSPS()->getBitDepths(); 331 331 332 332 for( UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++) … … 786 786 if (display) 787 787 { 788 UInt chromaFormatIdc = pcPic->getSlice(0)->get ChromaFormatIdc();788 UInt chromaFormatIdc = pcPic->getSlice(0)->getSPS()->getChromaFormatIdc(); 789 789 Int xScal = TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc ); 790 790 … … 881 881 const Window defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window(); 882 882 883 UInt chromaFormatIdc = pcPic->getSlice(0)->get ChromaFormatIdc();883 UInt chromaFormatIdc = pcPic->getSlice(0)->getSPS()->getChromaFormatIdc(); 884 884 Int xScal = TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc ); 885 885 … … 972 972 const Bool isTff = pcPicTop->isTopField(); 973 973 974 UInt chromaFormatIdc = pcPic->getSlice(0)->get ChromaFormatIdc();974 UInt chromaFormatIdc = pcPic->getSlice(0)->getSPS()->getChromaFormatIdc(); 975 975 Int xScal = TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc ); 976 976 … … 1050 1050 const Window defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window(); 1051 1051 1052 UInt chromaFormatIdc = pcPic->getSlice(0)->get ChromaFormatIdc();1052 UInt chromaFormatIdc = pcPic->getSlice(0)->getSPS()->getChromaFormatIdc(); 1053 1053 Int xScal = TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc ); 1054 1054 … … 1472 1472 Int xScal = 1, yScal = 1; 1473 1473 1474 UInt chromaFormatIdc = pic->getSlice(0)->get ChromaFormatIdc();1474 UInt chromaFormatIdc = pic->getSlice(0)->getSPS()->getChromaFormatIdc(); 1475 1475 xScal = TComSPS::getWinUnitX( chromaFormatIdc ); 1476 1476 yScal = TComSPS::getWinUnitY( chromaFormatIdc ); … … 1701 1701 1702 1702 TComPictureHash recon_digest; 1703 Int numChar = calcMD5(*pic->getPicYuvRec(), recon_digest, pic->getSlice(0)->get BitDepths());1703 Int numChar = calcMD5(*pic->getPicYuvRec(), recon_digest, pic->getSlice(0)->getSPS()->getBitDepths()); 1704 1704 fprintf(fptr, "%8d%9d MD5:%s\n", pic->getLayerId(), pic->getSlice(0)->getPOC(), hashToString(recon_digest, numChar).c_str()); 1705 1705 fclose(fptr); … … 1729 1729 strcpy(tempFileName, this->getDecodedYuvLayerFileName( layerId ).c_str()); 1730 1730 1731 const TComVPS *vps = m_apcTDecTop[layerId]->getParameterSetManager()->getActiveVPS();1732 1731 const TComSPS *sps = m_apcTDecTop[layerId]->getParameterSetManager()->getActiveSPS(); 1733 const BitDepths &bitDpeths = vps->getBitDepths(sps, layerId);1732 const BitDepths &bitDpeths = sps->getBitDepths(); 1734 1733 Int bitDepth[] = {bitDpeths.recon[CHANNEL_TYPE_LUMA], bitDpeths.recon[CHANNEL_TYPE_CHROMA]}; 1735 1734 … … 1746 1745 Int xScal = 1, yScal = 1; 1747 1746 1748 UInt chromaFormatIdc = checkPic.getSlice(0)->get ChromaFormatIdc();1747 UInt chromaFormatIdc = checkPic.getSlice(0)->getSPS()->getChromaFormatIdc(); 1749 1748 xScal = TComSPS::getWinUnitX( chromaFormatIdc ); 1750 1749 yScal = TComSPS::getWinUnitY( chromaFormatIdc ); -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1501 r1502 140 140 141 141 #if FORMATIDX_CHECK 142 for( 142 for(Int compareLayer = 0; compareLayer < layer; compareLayer++ ) 143 143 { 144 144 if(m_apcLayerCfg[layer]->m_repFormatIdx == m_apcLayerCfg[compareLayer]->m_repFormatIdx && ( -
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 } -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1500 r1502 1225 1225 #endif 1226 1226 1227 #if SCALABLE_REXT1228 const ChromaFormat chFmt = pcSlice->getChromaFormatIdc();1229 #else1230 1227 const ChromaFormat chFmt = sps->getChromaFormatIdc(); 1231 #endif1232 1228 const UInt numValidComp=getNumberValidComponents(chFmt); 1233 1229 const Bool bChroma=(chFmt!=CHROMA_400); … … 1241 1237 pcSlice->setDependentSliceSegmentFlag(false); 1242 1238 } 1243 #if SVC_EXTENSION1244 Int numCTUs = ((pcSlice->getPicWidthInLumaSamples()+sps->getMaxCUWidth()-1)/sps->getMaxCUWidth())*((pcSlice->getPicHeightInLumaSamples()+sps->getMaxCUHeight()-1)/sps->getMaxCUHeight());1245 #else1246 1239 Int numCTUs = ((sps->getPicWidthInLumaSamples()+sps->getMaxCUWidth()-1)/sps->getMaxCUWidth())*((sps->getPicHeightInLumaSamples()+sps->getMaxCUHeight()-1)/sps->getMaxCUHeight()); 1247 #endif1248 1240 UInt sliceSegmentAddress = 0; 1249 1241 Int bitsSliceSegmentAddress = 0; … … 1832 1824 pcSlice->setSliceQp (26 + pps->getPicInitQPMinus26() + iCode); 1833 1825 1834 #if SVC_EXTENSION1835 assert( pcSlice->getSliceQp() >= -pcSlice->getQpBDOffset(CHANNEL_TYPE_LUMA) );1836 #else1837 1826 assert( pcSlice->getSliceQp() >= -sps->getQpBDOffset(CHANNEL_TYPE_LUMA) ); 1838 #endif1839 1827 assert( pcSlice->getSliceQp() <= 51 ); 1840 1828 … … 2365 2353 #endif 2366 2354 2367 #if SVC_EXTENSION2368 Int qpBdOffsetY = pcCU->getSlice()->getQpBDOffset(CHANNEL_TYPE_LUMA);2369 #else2370 2355 Int qpBdOffsetY = pcCU->getSlice()->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA); 2371 #endif2372 2356 const Int qp = (((Int) pcCU->getRefQP( uiAbsPartIdx ) + iDQp + 52 + 2*qpBdOffsetY )%(52+ qpBdOffsetY)) - qpBdOffsetY; 2373 2357 … … 2429 2413 { 2430 2414 WPScalingParam *wp; 2431 #if SCALABLE_REXT2432 const ChromaFormat chFmt = pcSlice->getChromaFormatIdc();2433 #else2434 2415 const ChromaFormat chFmt = sps->getChromaFormatIdc(); 2435 #endif2436 2416 const Int numValidComp = Int(getNumberValidComponents(chFmt)); 2437 2417 const Bool bChroma = (chFmt!=CHROMA_400); … … 2496 2476 wp[COMPONENT_Y].iWeight = (iDeltaWeight + (1<<wp[COMPONENT_Y].uiLog2WeightDenom)); 2497 2477 READ_SVLC( wp[COMPONENT_Y].iOffset, iNumRef==0?"luma_offset_l0[i]":"luma_offset_l1[i]" ); 2498 #if SVC_EXTENSION2499 Int range=sps->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag() ? (1<<pcSlice->getBitDepth(CHANNEL_TYPE_LUMA))/2 : 128;2500 #else2501 2478 Int range=sps->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag() ? (1<<sps->getBitDepth(CHANNEL_TYPE_LUMA))/2 : 128; 2502 #endif2503 2479 assert( wp[0].iOffset >= -range ); 2504 2480 assert( wp[0].iOffset < range ); … … 2513 2489 if ( wp[COMPONENT_Cb].bPresentFlag ) 2514 2490 { 2515 #if SVC_EXTENSION2516 Int range=sps->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag() ? (1<<pcSlice->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128;2517 #else2518 2491 Int range=sps->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag() ? (1<<sps->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128; 2519 #endif2520 2492 for ( Int j=1 ; j<numValidComp ; j++ ) 2521 2493 { -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCu.cpp
r1483 r1502 219 219 UInt uiBPelY = uiTPelY + (maxCuHeight>>uiDepth) - 1; 220 220 221 #if SVC_EXTENSION222 TComSlice * pcSlice = pcPic->getSlice(pcPic->getCurrSliceIdx());223 224 if( ( uiRPelX < pcSlice->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getPicHeightInLumaSamples() ) )225 #else226 221 if( ( uiRPelX < sps.getPicWidthInLumaSamples() ) && ( uiBPelY < sps.getPicHeightInLumaSamples() ) ) 227 #endif228 222 { 229 223 m_pcEntropyDecoder->decodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth ); … … 252 246 uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiIdx] ]; 253 247 254 #if SVC_EXTENSION255 if ( !isLastCtuOfSliceSegment && ( uiLPelX < pcCU->getSlice()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getPicHeightInLumaSamples() ) )256 #else257 248 if ( !isLastCtuOfSliceSegment && ( uiLPelX < sps.getPicWidthInLumaSamples() ) && ( uiTPelY < sps.getPicHeightInLumaSamples() ) ) 258 #endif259 249 { 260 250 xDecodeCU( pcCU, uiIdx, uiDepth+1, isLastCtuOfSliceSegment ); … … 404 394 UInt uiBPelY = uiTPelY + (sps.getMaxCUHeight()>>uiDepth) - 1; 405 395 406 #if SVC_EXTENSION407 if( ( uiRPelX >= pcSlice->getPicWidthInLumaSamples() ) || ( uiBPelY >= pcSlice->getPicHeightInLumaSamples() ) )408 #else409 396 if( ( uiRPelX >= sps.getPicWidthInLumaSamples() ) || ( uiBPelY >= sps.getPicHeightInLumaSamples() ) ) 410 #endif411 397 { 412 398 bBoundary = true; … … 423 409 uiTPelY = pCtu->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiIdx] ]; 424 410 425 #if SVC_EXTENSION426 if( ( uiLPelX < pcSlice->getPicWidthInLumaSamples() ) && ( uiTPelY < pcSlice->getPicHeightInLumaSamples() ) )427 #else428 411 if( ( uiLPelX < sps.getPicWidthInLumaSamples() ) && ( uiTPelY < sps.getPicHeightInLumaSamples() ) ) 429 #endif430 412 { 431 413 xDecompressCU(pCtu, uiIdx, uiNextDepth ); … … 501 483 if ( pcCU->getQtRootCbf( 0) ) 502 484 { 503 #if SVC_EXTENSION504 m_ppcYuvReco[uiDepth]->addClip( m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth], 0, pcCU->getWidth( 0 ), pcCU->getSlice()->getBitDepths() );505 #else506 485 m_ppcYuvReco[uiDepth]->addClip( m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth], 0, pcCU->getWidth( 0 ), pcCU->getSlice()->getSPS()->getBitDepths() ); 507 #endif508 486 } 509 487 else … … 647 625 #endif 648 626 649 #if SVC_EXTENSION650 const Int clipbd = pcCU->getSlice()->getBitDepth(toChannelType(compID));651 #else652 627 const Int clipbd = sps.getBitDepth(toChannelType(compID)); 653 #endif654 628 #if O0043_BEST_EFFORT_DECODING 655 629 const Int bitDepthDelta = sps.getStreamBitDepth(toChannelType(compID)) - clipbd; … … 834 808 Pel* piPicReco = pcCU->getPic()->getPicYuvRec()->getAddr(compID, pcCU->getCtuRsAddr(), pcCU->getZorderIdxInCtu()+uiPartIdx); 835 809 const UInt uiPicStride = pcCU->getPic()->getPicYuvRec()->getStride(compID); 836 #if SVC_EXTENSION837 const UInt uiPcmLeftShiftBit = pcCU->getSlice()->getBitDepth(toChannelType(compID)) - pcCU->getSlice()->getSPS()->getPCMBitDepth(toChannelType(compID));838 #else839 810 const TComSPS &sps = *(pcCU->getSlice()->getSPS()); 840 811 const UInt uiPcmLeftShiftBit = sps.getBitDepth(toChannelType(compID)) - sps.getPCMBitDepth(toChannelType(compID)); 841 #endif842 812 843 813 for(UInt uiY = 0; uiY < uiHeight; uiY++ ) -
branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp
r1482 r1502 239 239 printf ("Warning: Got multiple decoded picture hash SEI messages. Using first."); 240 240 } 241 #if SVC_EXTENSION242 calcAndPrintHashStatus(*(pcPic->getPicYuvRec()), hash, pcSlice->getBitDepths(), m_numberOfChecksumErrorsDetected);243 #else244 241 calcAndPrintHashStatus(*(pcPic->getPicYuvRec()), hash, pcSlice->getSPS()->getBitDepths(), m_numberOfChecksumErrorsDetected); 245 #endif246 242 } 247 243 #if CONFORMANCE_BITSTREAM_MODE -
branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.cpp
r1442 r1502 951 951 { 952 952 UInt uiSign; 953 #if SVC_EXTENSION954 Int qpBdOffsetY = pcCU->getSlice()->getQpBDOffset(CHANNEL_TYPE_LUMA);955 #else956 953 Int qpBdOffsetY = pcCU->getSlice()->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA); 957 #endif958 954 m_pcTDecBinIf->decodeBinEP(uiSign RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__DELTA_QP_EP)); 959 955 iDQp = uiDQp; -
branches/SHM-dev/source/Lib/TLibDecoder/TDecSlice.cpp
r1287 r1502 201 201 aboveMergeAvail = pcPic->getSAOMergeAvailability(ctuRsAddr, ctuRsAddr-frameWidthInCtus); 202 202 } 203 #if SVC_EXTENSION204 pcSbacDecoder->parseSAOBlkParam( saoblkParam, sliceEnabled, leftMergeAvail, aboveMergeAvail, pcSlice->getBitDepths());205 #else206 203 pcSbacDecoder->parseSAOBlkParam( saoblkParam, sliceEnabled, leftMergeAvail, aboveMergeAvail, pcSlice->getSPS()->getBitDepths()); 207 #endif208 204 } 209 205 } -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1499 r1502 524 524 // it is needed where the VPS is accessed through the slice 525 525 pBLPic->getSlice(0)->setVPS( vps ); 526 pBLPic->getPicSym()->inferSpsForNonHEVCBL(); 527 pBLPic->getSlice(0)->setSPS( &pBLPic->getPicSym()->getSPS() ); 526 528 } 527 529 } … … 596 598 assert( vps->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerIdx))->getBitDepthVpsChroma() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerIdx))->getBitDepthVpsChroma()); 597 599 } 600 601 updateSPS->inferSPS( m_layerId, vps ); 598 602 #endif //SVC_EXTENSION 599 603 … … 627 631 628 632 // Initialise the various objects for the new set of settings 629 #if SVC_EXTENSION630 m_cSAO.create( pSlice->getPicWidthInLumaSamples(), pSlice->getPicHeightInLumaSamples(), pSlice->getChromaFormatIdc(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxTotalCUDepth(), pps->getPpsRangeExtension().getLog2SaoOffsetScale(CHANNEL_TYPE_LUMA), pps->getPpsRangeExtension().getLog2SaoOffsetScale(CHANNEL_TYPE_CHROMA) );631 #else632 633 m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), sps->getChromaFormatIdc(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxTotalCUDepth(), pps->getPpsRangeExtension().getLog2SaoOffsetScale(CHANNEL_TYPE_LUMA), pps->getPpsRangeExtension().getLog2SaoOffsetScale(CHANNEL_TYPE_CHROMA) ); 633 #endif634 634 m_cLoopFilter.create( sps->getMaxTotalCUDepth() ); 635 #if SCALABLE_REXT636 m_cPrediction.initTempBuff(pSlice->getChromaFormatIdc());637 #else638 635 m_cPrediction.initTempBuff(sps->getChromaFormatIdc()); 639 #endif640 636 641 637 … … 692 688 693 689 // Recursive structure 694 #if SVC_EXTENSION 695 m_cCuDecoder.create ( sps->getMaxTotalCUDepth(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), pSlice->getChromaFormatIdc() ); 690 m_cCuDecoder.create ( sps->getMaxTotalCUDepth(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getChromaFormatIdc() ); 691 #if SVC_EXTENSION 696 692 m_cCuDecoder.init ( m_ppcTDecTop, &m_cEntropyDecoder, &m_cTrQuant, &m_cPrediction, m_layerId ); 697 693 #else 698 m_cCuDecoder.create ( sps->getMaxTotalCUDepth(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getChromaFormatIdc() );699 694 m_cCuDecoder.init ( &m_cEntropyDecoder, &m_cTrQuant, &m_cPrediction ); 700 695 #endif … … 1399 1394 if( pFile->good() ) 1400 1395 { 1401 Bool is16bit = pBLPic->getSlice(0)->get BitDepth(CHANNEL_TYPE_LUMA) > 8 || pBLPic->getSlice(0)->getBitDepth(CHANNEL_TYPE_CHROMA) > 8;1396 Bool is16bit = pBLPic->getSlice(0)->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) > 8 || pBLPic->getSlice(0)->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA) > 8; 1402 1397 UInt uiWidth = pBLPic->getPicYuvRec()->getWidth(COMPONENT_Y); 1403 1398 UInt uiHeight = pBLPic->getPicYuvRec()->getHeight(COMPONENT_Y); … … 1701 1696 if( pcSlice->getPPS()->getCGSFlag() && m_c3DAsymLUTPPS.isRefLayer( pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc) ) ) 1702 1697 { 1703 assert( pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->get BitDepth(CHANNEL_TYPE_LUMA) == m_c3DAsymLUTPPS.getInputBitDepthY() );1704 assert( pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->get BitDepth(CHANNEL_TYPE_CHROMA) == m_c3DAsymLUTPPS.getInputBitDepthC() );1705 assert( pcSlice->get BitDepth(CHANNEL_TYPE_LUMA) >= m_c3DAsymLUTPPS.getOutputBitDepthY() );1706 assert( pcSlice->get BitDepth(CHANNEL_TYPE_LUMA) >= m_c3DAsymLUTPPS.getOutputBitDepthC() );1698 assert( pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) == m_c3DAsymLUTPPS.getInputBitDepthY() ); 1699 assert( pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA) == m_c3DAsymLUTPPS.getInputBitDepthC() ); 1700 assert( pcSlice->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) >= m_c3DAsymLUTPPS.getOutputBitDepthY() ); 1701 assert( pcSlice->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) >= m_c3DAsymLUTPPS.getOutputBitDepthC() ); 1707 1702 1708 1703 if( !m_pColorMappedPic ) … … 1721 1716 if( pcSlice->getVPS()->isSamplePredictionType( pcSlice->getVPS()->getLayerIdxInVps(m_layerId), pcSlice->getVPS()->getLayerIdxInVps(refLayerId) ) ) 1722 1717 { 1723 m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, m_pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, m_pcPic->getPicYuvRec(), pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->get BitDepth(CHANNEL_TYPE_LUMA), pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0)->getBitDepth(CHANNEL_TYPE_CHROMA));1718 m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, m_pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, m_pcPic->getPicYuvRec(), pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA), pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA)); 1724 1719 } 1725 1720 } … … 1896 1891 pcSlice->getSPS()->getMaxLog2TrDynamicRange(CHANNEL_TYPE_CHROMA) 1897 1892 }; 1898 #if SVC_EXTENSION1899 m_cTrQuant.setFlatScalingList(maxLog2TrDynamicRange, pcSlice->getBitDepths());1900 #else1901 1893 m_cTrQuant.setFlatScalingList(maxLog2TrDynamicRange, pcSlice->getSPS()->getBitDepths()); 1902 #endif1903 1894 m_cTrQuant.setUseScalingList(false); 1904 1895 } … … 2459 2450 { 2460 2451 m_pColorMappedPic = new TComPicYuv; 2461 m_pColorMappedPic->create( pcSlice->get PicWidthInLumaSamples(), pcSlice->getPicHeightInLumaSamples(), pcSlice->getChromaFormatIdc()/*CHROMA_420*/, pcSlice->getSPS()->getMaxCUWidth(), pcSlice->getSPS()->getMaxCUHeight(), pcSlice->getSPS()->getMaxTotalCUDepth(), true, NULL );2452 m_pColorMappedPic->create( pcSlice->getSPS()->getPicWidthInLumaSamples(), pcSlice->getSPS()->getPicHeightInLumaSamples(), pcSlice->getSPS()->getChromaFormatIdc(), pcSlice->getSPS()->getMaxCUWidth(), pcSlice->getSPS()->getMaxCUHeight(), pcSlice->getSPS()->getMaxTotalCUDepth(), true, NULL ); 2462 2453 } 2463 2454 } … … 2614 2605 TComPicYuv* pcPicYuvRecBase = (*(pcTDecTopBase->getListPic()->begin()))->getPicYuvRec(); 2615 2606 2616 const Int bitDepthLuma = vps.getBitDepth(CHANNEL_TYPE_LUMA, &sps, m_layerId);2617 const Int bitDepthChroma = vps.getBitDepth(CHANNEL_TYPE_CHROMA, &sps, m_layerId);2618 const Int refBitDepthLuma = (*(pcTDecTopBase->getListPic()->begin()))->getSlice(0)->get BitDepth(CHANNEL_TYPE_LUMA);2619 const Int refBitDepthChroma = (*(pcTDecTopBase->getListPic()->begin()))->getSlice(0)->get BitDepth(CHANNEL_TYPE_CHROMA);2607 const Int bitDepthLuma = sps.getBitDepth(CHANNEL_TYPE_LUMA); 2608 const Int bitDepthChroma = sps.getBitDepth(CHANNEL_TYPE_CHROMA); 2609 const Int refBitDepthLuma = (*(pcTDecTopBase->getListPic()->begin()))->getSlice(0)->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA); 2610 const Int refBitDepthChroma = (*(pcTDecTopBase->getListPic()->begin()))->getSlice(0)->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA); 2620 2611 2621 2612 Bool sameBitDepths = ( bitDepthLuma == refBitDepthLuma ) && ( bitDepthChroma == refBitDepthChroma ); 2622 2613 2623 if( pcPicYuvRecBase->getWidth(COMPONENT_Y) == vps.getPicWidthInLumaSamples(&sps, m_layerId) && pcPicYuvRecBase->getHeight(COMPONENT_Y) == vps.getPicHeightInLumaSamples(&sps, m_layerId) && equalOffsets && zeroPhase )2614 if( pcPicYuvRecBase->getWidth(COMPONENT_Y) == sps.getPicWidthInLumaSamples() && pcPicYuvRecBase->getHeight(COMPONENT_Y) == sps.getPicHeightInLumaSamples() && equalOffsets && zeroPhase ) 2624 2615 { 2625 2616 pic->setEqualPictureSizeAndOffsetFlag( i, true ); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r1497 r1502 1632 1632 Int iDQp = pcCU->getQP( uiAbsPartIdx ) - pcCU->getRefQP( uiAbsPartIdx ); 1633 1633 1634 #if SVC_EXTENSION1635 Int qpBdOffsetY = pcCU->getSlice()->getQpBDOffset(CHANNEL_TYPE_LUMA);1636 #else1637 1634 Int qpBdOffsetY = pcCU->getSlice()->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA); 1638 #endif1639 1635 iDQp = (iDQp + 78 + qpBdOffsetY + (qpBdOffsetY/2)) % (52 + qpBdOffsetY) - 26 - (qpBdOffsetY/2); 1640 1636 … … 1733 1729 WRITE_SVLC( iDeltaWeight, iNumRef==0?"delta_chroma_weight_l0[i]":"delta_chroma_weight_l1[i]" ); 1734 1730 1735 #if SVC_EXTENSION1736 Int range=pcSlice->getSPS()->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag() ? (1<<pcSlice->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128;1737 #else1738 1731 Int range=pcSlice->getSPS()->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag() ? (1<<pcSlice->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128; 1739 #endif1740 1732 Int pred = ( range - ( ( range*wp[j].iWeight)>>(wp[j].uiLog2WeightDenom) ) ); 1741 1733 Int iDeltaChroma = (wp[j].iOffset - pred); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCu.cpp
r1483 r1502 397 397 { 398 398 Int idQP = m_pcEncCfg->getMaxDeltaQP(); 399 #if SVC_EXTENSION400 iMinQP = Clip3( -rpcTempCU->getSlice()->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP-idQP );401 iMaxQP = Clip3( -rpcTempCU->getSlice()->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP+idQP );402 #else403 399 iMinQP = Clip3( -sps.getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP-idQP ); 404 400 iMaxQP = Clip3( -sps.getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP+idQP ); 405 #endif406 401 } 407 402 else … … 432 427 433 428 TComSlice * pcSlice = rpcTempCU->getPic()->getSlice(rpcTempCU->getPic()->getCurrSliceIdx()); 434 #if SVC_EXTENSION435 const Bool bBoundary = !( uiRPelX < rpcBestCU->getSlice()->getPicWidthInLumaSamples() && uiBPelY < rpcBestCU->getSlice()->getPicHeightInLumaSamples() );436 #else437 429 const Bool bBoundary = !( uiRPelX < sps.getPicWidthInLumaSamples() && uiBPelY < sps.getPicHeightInLumaSamples() ); 438 #endif439 430 440 431 if ( !bBoundary ) … … 735 726 && rpcTempCU->getWidth(0) >= (1<<sps.getPCMLog2MinSize()) ) 736 727 { 737 #if SVC_EXTENSION738 UInt uiRawBits = getTotalBits(rpcBestCU->getWidth(0), rpcBestCU->getHeight(0), rpcBestCU->getPic()->getChromaFormat(), pcPic->getSlice(0)->getBitDepths().recon);739 #else740 728 UInt uiRawBits = getTotalBits(rpcBestCU->getWidth(0), rpcBestCU->getHeight(0), rpcBestCU->getPic()->getChromaFormat(), sps.getBitDepths().recon); 741 #endif742 729 UInt uiBestBits = rpcBestCU->getTotalBits(); 743 730 if((uiBestBits > uiRawBits) || (rpcBestCU->getTotalCost() > m_pcRdCost->calcRdCost(uiRawBits, 0))) … … 794 781 { 795 782 Int idQP = m_pcEncCfg->getMaxDeltaQP(); 796 #if SVC_EXTENSION797 iMinQP = Clip3( -rpcTempCU->getSlice()->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP-idQP );798 iMaxQP = Clip3( -rpcTempCU->getSlice()->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP+idQP );799 #else800 783 iMinQP = Clip3( -sps.getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP-idQP ); 801 784 iMaxQP = Clip3( -sps.getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP+idQP ); 802 #endif803 785 } 804 786 else if( uiDepth < pps.getMaxCuDQPDepth() ) … … 846 828 pcSubTempPartCU->initSubCU( rpcTempCU, uiPartUnitIdx, uhNextDepth, iQP ); // clear sub partition datas or init. 847 829 848 #if SVC_EXTENSION849 if( ( pcSubBestPartCU->getCUPelX() < pcSlice->getPicWidthInLumaSamples() ) && ( pcSubBestPartCU->getCUPelY() < pcSlice->getPicHeightInLumaSamples() ) )850 #else851 830 if( ( pcSubBestPartCU->getCUPelX() < sps.getPicWidthInLumaSamples() ) && ( pcSubBestPartCU->getCUPelY() < sps.getPicHeightInLumaSamples() ) ) 852 #endif853 831 { 854 832 if ( 0 == uiPartUnitIdx) //initialize RD with previous depth buffer … … 1026 1004 iQpOffset = Int(floor( dQpOffset + 0.49999 )); 1027 1005 } 1028 #if SVC_EXTENSION1029 return Clip3(-pcCU->getSlice()->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQp+iQpOffset );1030 #else1031 1006 return Clip3(-pcCU->getSlice()->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQp+iQpOffset ); 1032 #endif1033 1007 } 1034 1008 … … 1062 1036 #endif 1063 1037 1064 #if SVC_EXTENSION1065 if( ( uiRPelX < pcSlice->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getPicHeightInLumaSamples() ) )1066 #else1067 1038 if( ( uiRPelX < sps.getPicWidthInLumaSamples() ) && ( uiBPelY < sps.getPicHeightInLumaSamples() ) ) 1068 #endif1069 1039 { 1070 1040 m_pcEntropyCoder->encodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth ); … … 1093 1063 uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ]; 1094 1064 1095 #if SVC_EXTENSION1096 if( ( uiLPelX < pcSlice->getPicWidthInLumaSamples() ) && ( uiTPelY < pcSlice->getPicHeightInLumaSamples() ) )1097 #else1098 1065 if( ( uiLPelX < sps.getPicWidthInLumaSamples() ) && ( uiTPelY < sps.getPicHeightInLumaSamples() ) ) 1099 #endif1100 1066 { 1101 1067 xEncodeCU( pcCU, uiAbsPartIdx, uiDepth+1 ); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r1475 r1502 184 184 { 185 185 UInt prevLayerIdx = 0; 186 UInt prevLayerId = 0; 187 188 if (pcTEncTop->getNumActiveRefLayers() > 0) 186 187 if( pcTEncTop->getNumActiveRefLayers() > 0 ) 189 188 { 190 189 prevLayerIdx = pcTEncTop->getPredLayerIdx( pcTEncTop->getNumActiveRefLayers() - 1); 191 prevLayerId = pcTEncTop->getRefLayerId(prevLayerIdx); 192 } 193 194 const TComVPS *vps = pcTEncTop->getVPS(); 190 } 191 195 192 const TComSPS *sps = pcTEncTop->getSPS(); 196 193 197 const Int bitDepthLuma = vps->getBitDepth(CHANNEL_TYPE_LUMA, sps, pcTEncTop->getLayerId());198 const Int bitDepthChroma = vps->getBitDepth(CHANNEL_TYPE_CHROMA, sps, pcTEncTop->getLayerId());199 const Int prevBitDepthLuma = vps->getBitDepth(CHANNEL_TYPE_LUMA, m_ppcTEncTop[prevLayerIdx]->getSPS(), prevLayerId);200 const Int prevBitDepthChroma = vps->getBitDepth(CHANNEL_TYPE_CHROMA, m_ppcTEncTop[prevLayerIdx]->getSPS(), prevLayerId);194 const Int bitDepthLuma = sps->getBitDepth(CHANNEL_TYPE_LUMA); 195 const Int bitDepthChroma = sps->getBitDepth(CHANNEL_TYPE_CHROMA); 196 const Int prevBitDepthLuma = m_ppcTEncTop[prevLayerIdx]->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA); 197 const Int prevBitDepthChroma = m_ppcTEncTop[prevLayerIdx]->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA); 201 198 202 199 m_Enc3DAsymLUTPicUpdate.create( m_pcCfg->getCGSMaxOctantDepth() , prevBitDepthLuma, prevBitDepthChroma, bitDepthLuma, bitDepthChroma , m_pcCfg->getCGSMaxYPartNumLog2() ); 203 m_Enc3DAsymLUTPPS.create( m_pcCfg->getCGSMaxOctantDepth(), prevBitDepthLuma, prevBitDepthChroma, bitDepthLuma, bitDepthChroma 200 m_Enc3DAsymLUTPPS.create( m_pcCfg->getCGSMaxOctantDepth(), prevBitDepthLuma, prevBitDepthChroma, bitDepthLuma, bitDepthChroma, m_pcCfg->getCGSMaxYPartNumLog2() ); 204 201 205 202 if(!m_pColorMappedPic) … … 1071 1068 cabac_zero_word_padding(TComSlice *const pcSlice, TComPic *const pcPic, const std::size_t binCountsInNalUnits, const std::size_t numBytesInVclNalUnits, std::ostringstream &nalUnitData, const Bool cabacZeroWordPaddingEnabled) 1072 1069 { 1073 #if !SVC_EXTENSION1074 1070 const TComSPS &sps=*(pcSlice->getSPS()); 1075 #endif1076 1071 const Int log2subWidthCxsubHeightC = (pcPic->getComponentScaleX(COMPONENT_Cb)+pcPic->getComponentScaleY(COMPONENT_Cb)); 1077 1072 const Int minCuWidth = pcPic->getMinCUWidth(); 1078 1073 const Int minCuHeight = pcPic->getMinCUHeight(); 1079 #if SVC_EXTENSION1080 const Int paddedWidth = ((pcSlice->getPicWidthInLumaSamples() + minCuWidth - 1) / minCuWidth) * minCuWidth;1081 const Int paddedHeight= ((pcSlice->getPicHeightInLumaSamples() + minCuHeight - 1) / minCuHeight) * minCuHeight;1082 const Int rawBits = paddedWidth * paddedHeight *1083 (pcSlice->getBitDepth(CHANNEL_TYPE_LUMA) + 2*(pcSlice->getBitDepth(CHANNEL_TYPE_CHROMA)>>log2subWidthCxsubHeightC));1084 #else1085 1074 const Int paddedWidth = ((sps.getPicWidthInLumaSamples() + minCuWidth - 1) / minCuWidth) * minCuWidth; 1086 1075 const Int paddedHeight= ((sps.getPicHeightInLumaSamples() + minCuHeight - 1) / minCuHeight) * minCuHeight; 1087 1076 const Int rawBits = paddedWidth * paddedHeight * 1088 1077 (sps.getBitDepth(CHANNEL_TYPE_LUMA) + 2*(sps.getBitDepth(CHANNEL_TYPE_CHROMA)>>log2subWidthCxsubHeightC)); 1089 #endif1090 1078 const std::size_t threshold = (32/3)*numBytesInVclNalUnits + (rawBits/32); 1091 1079 if (binCountsInNalUnits >= threshold) … … 1667 1655 { 1668 1656 //downsampling 1669 xDownScalePic(pcPic->getPicYuvOrg(), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg(), pcSlice->get BitDepths(), pcPic->getPosScalingFactor(refLayerIdc, 0));1657 xDownScalePic(pcPic->getPicYuvOrg(), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg(), pcSlice->getSPS()->getBitDepths(), pcPic->getPosScalingFactor(refLayerIdc, 0)); 1670 1658 1671 1659 m_Enc3DAsymLUTPPS.setDsOrigPic(pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg()); … … 1698 1686 if( pcSlice->getVPS()->isSamplePredictionType( pcSlice->getVPS()->getLayerIdxInVps(m_layerId), pcSlice->getVPS()->getLayerIdxInVps(refLayerId) ) ) 1699 1687 { 1700 m_pcPredSearch->upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, pcPic->getPicYuvRec(), pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->get BitDepth(CHANNEL_TYPE_LUMA), pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getBitDepth(CHANNEL_TYPE_CHROMA) );1688 m_pcPredSearch->upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, pcPic->getPicYuvRec(), pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA), pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA) ); 1701 1689 } 1702 1690 } … … 2383 2371 } 2384 2372 2385 #if SVC_EXTENSION2386 sliceQP = Clip3( -pcSlice->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, sliceQP );2387 #else2388 2373 sliceQP = Clip3( -pcSlice->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, sliceQP ); 2389 #endif2390 2374 m_pcRateCtrl->getRCPic()->setPicEstQP( sliceQP ); 2391 2375 … … 2700 2684 { 2701 2685 SEIDecodedPictureHash *decodedPictureHashSei = new SEIDecodedPictureHash(); 2702 #if SVC_EXTENSION2703 m_seiEncoder.initDecodedPictureHashSEI(decodedPictureHashSei, pcPic, digestStr, pcSlice->getBitDepths());2704 #else2705 2686 m_seiEncoder.initDecodedPictureHashSEI(decodedPictureHashSei, pcPic, digestStr, pcSlice->getSPS()->getBitDepths()); 2706 #endif2707 2687 trailingSeiMessages.push_back(decodedPictureHashSei); 2708 2688 } … … 2882 2862 if (!bCalcDist) 2883 2863 { 2884 #if SVC_EXTENSION2885 ruiDist = xFindDistortionFrame(pcPic->getPicYuvOrg(), pcPic->getPicYuvRec(), pcPic->getSlice(0)->getBitDepths());2886 #else2887 2864 ruiDist = xFindDistortionFrame(pcPic->getPicYuvOrg(), pcPic->getPicYuvRec(), pcPic->getPicSym()->getSPS().getBitDepths()); 2888 #endif2889 2865 } 2890 2866 } … … 3098 3074 pRec += iRecStride; 3099 3075 } 3100 #if SVC_EXTENSION3101 const Int maxval = 255 << (pcPic->getSlice(0)->getBitDepth(toChannelType(ch)) - 8);3102 #else3103 3076 const Int maxval = 255 << (pcPic->getPicSym()->getSPS().getBitDepth(toChannelType(ch)) - 8); 3104 #endif3105 3077 const Double fRefValue = (Double) maxval * maxval * iSize; 3106 3078 dPSNR[ch] = ( uiSSDtemp ? 10.0 * log10( fRefValue / (Double)uiSSDtemp ) : 999.99 ); … … 3254 3226 const InputColourSpaceConversion conversion, const Bool printFrameMSE ) 3255 3227 { 3256 #if !SVC_EXTENSION3257 3228 const TComSPS &sps=pcPicOrgFirstField->getPicSym()->getSPS(); 3258 #endif3259 3229 Double dPSNR[MAX_NUM_COMPONENT]; 3260 3230 TComPic *apcPicOrgFields[2]={pcPicOrgFirstField, pcPicOrgSecondField}; … … 3317 3287 } 3318 3288 } 3319 #if SVC_EXTENSION3320 const Int maxval = 255 << (pcPicOrgFirstField->getSlice(0)->getBitDepth(toChannelType(ch)) - 8);3321 #else3322 3289 const Int maxval = 255 << (sps.getBitDepth(toChannelType(ch)) - 8); 3323 #endif3324 3290 const Double fRefValue = (Double) maxval * maxval * iSize*2; 3325 3291 dPSNR[ch] = ( uiSSDtemp ? 10.0 * log10( fRefValue / (Double)uiSSDtemp ) : 999.99 ); … … 3601 3567 3602 3568 Int qp = pcPic->getSlice(0)->getSliceQp(); 3603 #if SVC_EXTENSION3604 const Int bitDepthLuma=pcPic->getSlice(0)->getBitDepth(CHANNEL_TYPE_LUMA);3605 #else3606 3569 const Int bitDepthLuma=pcPic->getSlice(0)->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA); 3607 #endif3608 3570 Int bitdepthScale = 1 << (bitDepthLuma-8); 3609 3571 Int beta = TComLoopFilter::getBeta( qp ) * bitdepthScale; … … 4096 4058 } 4097 4059 4098 Void TEncGOP::xDownScalePic( TComPicYuv* pcYuvSrc, TComPicYuv* pcYuvDest, BitDepths& bitDepth, const Int posScalingFactorX)4060 Void TEncGOP::xDownScalePic( TComPicYuv* pcYuvSrc, TComPicYuv* pcYuvDest, const BitDepths& bitDepth, const Int posScalingFactorX) 4099 4061 { 4100 4062 pcYuvSrc->setBorderExtension(false); … … 4158 4120 #endif 4159 4121 #endif 4160 Void TEncGOP::xFilterImg( Pel *src, Int iSrcStride, Pel *dst, Int iDstStride, Int height, Int width, BitDepths& bitDepth, ComponentID comp )4122 Void TEncGOP::xFilterImg( Pel *src, Int iSrcStride, Pel *dst, Int iDstStride, Int height, Int width, const BitDepths& bitDepth, ComponentID comp ) 4161 4123 { 4162 4124 Int height2, width2; -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.h
r1460 r1502 277 277 #if CGS_3D_ASYMLUT 278 278 Void xDetermine3DAsymLUT( TComSlice * pSlice , TComPic * pCurPic , UInt refLayerIdc , TEncCfg * pCfg , Bool bSignalPPS ); 279 Void xDownScalePic( TComPicYuv* pcYuvSrc, TComPicYuv* pcYuvDest, BitDepths& bitDepth, const Int posScalingFactorX);279 Void xDownScalePic( TComPicYuv* pcYuvSrc, TComPicYuv* pcYuvDest, const BitDepths& bitDepth, const Int posScalingFactorX); 280 280 Void xDownScaleComponent2x2( const Pel* pSrc, Pel* pDest, const Int iSrcStride, const Int iDestStride, const Int iSrcWidth, const Int iSrcHeight, const Int inputBitDepth, const Int outputBitDepth ); 281 281 inline Short xClip( Short x, Int bitdepth ); 282 282 Void xInitDs( const Int iWidth, const Int iHeight, const Bool allIntra, const Int posScalingFactorX); 283 Void xFilterImg( Pel *src, Int iSrcStride, Pel *dst, Int iDstStride, Int height, Int width, BitDepths& bitDepth, ComponentID comp );283 Void xFilterImg( Pel *src, Int iSrcStride, Pel *dst, Int iDstStride, Int height, Int width, const BitDepths& bitDepth, ComponentID comp ); 284 284 285 285 Int xCreate2DArray(Int ***array2D, Int dim0, Int dim1, Int iPadY, Int iPadX); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncPic.cpp
r1290 r1502 128 128 { 129 129 TComPic::create( vps, sps, pps, bIsVirtual, layerId ); 130 131 const Int iWidth = vps.getPicWidthInLumaSamples(&sps, layerId);132 const Int iHeight = vps.getPicHeightInLumaSamples(&sps, layerId);133 130 #else 134 131 Void TEncPic::create( const TComSPS &sps, const TComPPS &pps, UInt uiMaxAdaptiveQPDepth, Bool bIsVirtual ) 135 132 { 136 133 TComPic::create( sps, pps, bIsVirtual ); 134 #endif 137 135 const Int iWidth = sps.getPicWidthInLumaSamples(); 138 136 const Int iHeight = sps.getPicHeightInLumaSamples(); 139 #endif140 141 137 const UInt uiMaxWidth = sps.getMaxCUWidth(); 142 138 const UInt uiMaxHeight = sps.getMaxCUHeight(); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp
r1442 r1502 320 320 Pel* orgBlk = orgYuv->getAddr(component) + ((yPos >> componentScaleY) * orgStride) + (xPos >> componentScaleX); 321 321 322 #if SVC_EXTENSION323 getBlkStats(component, pPic->getSlice(0)->getBitDepth(toChannelType(component)), blkStats[ctuRsAddr][component]324 #else325 322 getBlkStats(component, pPic->getPicSym()->getSPS().getBitDepth(toChannelType(component)), blkStats[ctuRsAddr][component] 326 #endif327 323 , srcBlk, orgBlk, srcStride, orgStride, (width >> componentScaleX), (height >> componentScaleY) 328 324 , isLeftAvail, isRightAvail, isAboveAvail, isBelowAvail, isAboveLeftAvail, isAboveRightAvail … … 813 809 case SAO_MODE_NEW: 814 810 { 815 #if SVC_EXTENSION816 deriveModeNewRDO(pic->getSlice(0)->getBitDepths(), ctuRsAddr, mergeList, sliceEnabled, blkStats, modeParam, modeCost, m_pppcRDSbacCoder, SAO_CABACSTATE_BLK_CUR);817 #else818 811 deriveModeNewRDO(pic->getPicSym()->getSPS().getBitDepths(), ctuRsAddr, mergeList, sliceEnabled, blkStats, modeParam, modeCost, m_pppcRDSbacCoder, SAO_CABACSTATE_BLK_CUR); 819 #endif820 821 812 } 822 813 break; 823 814 case SAO_MODE_MERGE: 824 815 { 825 #if SVC_EXTENSION826 deriveModeMergeRDO(pic->getSlice(0)->getBitDepths(), ctuRsAddr, mergeList, sliceEnabled, blkStats , modeParam, modeCost, m_pppcRDSbacCoder, SAO_CABACSTATE_BLK_CUR);827 #else828 816 deriveModeMergeRDO(pic->getPicSym()->getSPS().getBitDepths(), ctuRsAddr, mergeList, sliceEnabled, blkStats , modeParam, modeCost, m_pppcRDSbacCoder, SAO_CABACSTATE_BLK_CUR); 829 #endif830 817 } 831 818 break; -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSbac.cpp
r1316 r1502 883 883 Void TEncSbac::codeDeltaQP( TComDataCU* pcCU, UInt uiAbsPartIdx ) 884 884 { 885 Int iDQp = pcCU->getQP( uiAbsPartIdx ) - pcCU->getRefQP( uiAbsPartIdx ); 886 887 #if SVC_EXTENSION 888 Int qpBdOffsetY = pcCU->getSlice()->getQpBDOffset(CHANNEL_TYPE_LUMA); 889 #else 885 Int iDQp = pcCU->getQP( uiAbsPartIdx ) - pcCU->getRefQP( uiAbsPartIdx ); 890 886 Int qpBdOffsetY = pcCU->getSlice()->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA); 891 #endif892 887 iDQp = (iDQp + 78 + qpBdOffsetY + (qpBdOffsetY/2)) % (52 + qpBdOffsetY) - 26 - (qpBdOffsetY/2); 893 888 -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r1487 r1502 1129 1129 const ChromaFormat chFmt = pcOrgYuv->getChromaFormat(); 1130 1130 const ChannelType chType = toChannelType(compID); 1131 #if SVC_EXTENSION1132 const Int bitDepth = pcCU->getSlice()->getBitDepth(chType);1133 #else1134 1131 const Int bitDepth = sps.getBitDepth(chType); 1135 #endif1136 1137 1132 const UInt uiWidth = rect.width; 1138 1133 const UInt uiHeight = rect.height; … … 2294 2289 DistParam distParam; 2295 2290 const Bool bUseHadamard=pcCU->getCUTransquantBypass(0) == 0; 2296 #if SVC_EXTENSION2297 m_pcRdCost->setDistParam(distParam, pcCU->getSlice()->getBitDepth(CHANNEL_TYPE_LUMA), piOrg, uiStride, piPred, uiStride, puRect.width, puRect.height, bUseHadamard);2298 #else2299 2291 m_pcRdCost->setDistParam(distParam, sps.getBitDepth(CHANNEL_TYPE_LUMA), piOrg, uiStride, piPred, uiStride, puRect.width, puRect.height, bUseHadamard); 2300 #endif2301 2292 distParam.bApplyWeight = false; 2302 2293 for( Int modeIdx = 0; modeIdx < numModesAvailable; modeIdx++ ) … … 2774 2765 const UInt uiReconStride = pcCU->getPic()->getPicYuvRec()->getStride(compID); 2775 2766 const UInt uiPCMBitDepth = pcCU->getSlice()->getSPS()->getPCMBitDepth(toChannelType(compID)); 2776 #if SVC_EXTENSION2777 const Int channelBitDepth = pcCU->getSlice()->getBitDepth(toChannelType(compID));2778 #else2779 2767 const Int channelBitDepth = pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)); 2780 #endif2781 2768 Pel* pRecoPic = pcCU->getPic()->getPicYuvRec()->getAddr(compID, pcCU->getCtuRsAddr(), pcCU->getZorderIdxInCtu()+uiAbsPartIdx); 2782 2769 … … 2866 2853 2867 2854 2868 #if SVC_EXTENSION2869 m_pcRdCost->setDistParam( cDistParam, pcCU->getSlice()->getBitDepth(CHANNEL_TYPE_LUMA),2870 #else2871 2855 m_pcRdCost->setDistParam( cDistParam, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA), 2872 #endif2873 2856 pcYuvOrg->getAddr( COMPONENT_Y, uiAbsPartIdx ), pcYuvOrg->getStride(COMPONENT_Y), 2874 2857 m_tmpYuvPred .getAddr( COMPONENT_Y, uiAbsPartIdx ), m_tmpYuvPred.getStride(COMPONENT_Y), … … 3813 3796 #endif 3814 3797 { 3815 #if SVC_EXTENSION3816 xPredInterBlk( COMPONENT_Y, pcCU, pcPicYuvRef, uiPartAddr, &cMvCand, iSizeX, iSizeY, pcTemplateCand, true, pcCU->getSlice()->getBitDepth(CHANNEL_TYPE_LUMA) );3817 #else3818 3798 xPredInterBlk( COMPONENT_Y, pcCU, pcPicYuvRef, uiPartAddr, &cMvCand, iSizeX, iSizeY, pcTemplateCand, true, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) ); 3819 #endif3820 3799 } 3821 3800 else 3822 3801 { 3823 #if SVC_EXTENSION3824 xPredInterBlk( COMPONENT_Y, pcCU, pcPicYuvRef, uiPartAddr, &cMvCand, iSizeX, iSizeY, pcTemplateCand, false, pcCU->getSlice()->getBitDepth(CHANNEL_TYPE_LUMA) );3825 #else3826 3802 xPredInterBlk( COMPONENT_Y, pcCU, pcPicYuvRef, uiPartAddr, &cMvCand, iSizeX, iSizeY, pcTemplateCand, false, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) ); 3827 #endif3828 3803 } 3829 3804 … … 3840 3815 // calc distortion 3841 3816 3842 #if SVC_EXTENSION3843 uiCost = m_pcRdCost->getDistPart( pcCU->getSlice()->getBitDepth(CHANNEL_TYPE_LUMA), pcTemplateCand->getAddr(COMPONENT_Y, uiPartAddr), pcTemplateCand->getStride(COMPONENT_Y), pcOrgYuv->getAddr(COMPONENT_Y, uiPartAddr), pcOrgYuv->getStride(COMPONENT_Y), iSizeX, iSizeY, COMPONENT_Y, DF_SAD );3844 #else3845 3817 uiCost = m_pcRdCost->getDistPart( pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA), pcTemplateCand->getAddr(COMPONENT_Y, uiPartAddr), pcTemplateCand->getStride(COMPONENT_Y), pcOrgYuv->getAddr(COMPONENT_Y, uiPartAddr), pcOrgYuv->getStride(COMPONENT_Y), iSizeX, iSizeY, COMPONENT_Y, DF_SAD ); 3846 #endif3847 3818 uiCost = (UInt) m_pcRdCost->calcRdCost( m_auiMVPIdxCost[iMVPIdx][iMVPNum], uiCost, DF_SAD ); 3848 3819 return uiCost; … … 3891 3862 iRoiHeight, 3892 3863 pcYuv->getStride(COMPONENT_Y), 3893 #if SVC_EXTENSION3894 pcCU->getSlice()->getBitDepth(CHANNEL_TYPE_LUMA) );3895 #else3896 3864 pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) ); 3897 #endif3898 3865 3899 3866 Pel* piRefY = pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->getPicYuvRec()->getAddr( COMPONENT_Y, pcCU->getCtuRsAddr(), pcCU->getZorderIdxInCtu() + uiPartAddr ); … … 4633 4600 const UInt cuHeightPixels = pcCU->getHeight( 0 ); 4634 4601 const Int numValidComponents = pcCU->getPic()->getNumberValidComponents(); 4635 #if !SVC_EXTENSION4636 4602 const TComSPS &sps=*(pcCU->getSlice()->getSPS()); 4637 #endif4638 4603 4639 4604 // The pcCU is not marked as skip-mode at this point, and its m_pcTrCoeff, m_pcArlCoeff, m_puhCbf, m_puhTrIdx will all be 0. … … 4654 4619 const UInt csx=pcYuvOrg->getComponentScaleX(compID); 4655 4620 const UInt csy=pcYuvOrg->getComponentScaleY(compID); 4656 #if SVC_EXTENSION4657 distortion += m_pcRdCost->getDistPart( pcCU->getSlice()->getBitDepth(toChannelType(compID)), pcYuvRec->getAddr(compID), pcYuvRec->getStride(compID), pcYuvOrg->getAddr(compID),4658 #else4659 4621 distortion += m_pcRdCost->getDistPart( sps.getBitDepth(toChannelType(compID)), pcYuvRec->getAddr(compID), pcYuvRec->getStride(compID), pcYuvOrg->getAddr(compID), 4660 #endif4661 4622 pcYuvOrg->getStride(compID), cuWidthPixels >> csx, cuHeightPixels >> csy, compID); 4662 4623 } … … 4758 4719 m_pcRDGoOnSbacCoder->store( m_pppcRDSbacCoder[ pcCU->getDepth( 0 ) ][ CI_TEMP_BEST ] ); 4759 4720 4760 #if SVC_EXTENSION4761 pcYuvRec->addClip ( pcYuvPred, pcYuvResiBest, 0, cuWidthPixels, pcCU->getSlice()->getBitDepths() );4762 #else4763 4721 pcYuvRec->addClip ( pcYuvPred, pcYuvResiBest, 0, cuWidthPixels, sps.getBitDepths() ); 4764 #endif4765 4722 4766 4723 // update with clipped distortion and cost (previously unclipped reconstruction values were used) … … 4770 4727 { 4771 4728 const ComponentID compID=ComponentID(comp); 4772 #if SVC_EXTENSION4773 finalDistortion += m_pcRdCost->getDistPart( pcCU->getSlice()->getBitDepth(toChannelType(compID)), pcYuvRec->getAddr(compID ), pcYuvRec->getStride(compID ), pcYuvOrg->getAddr(compID ), pcYuvOrg->getStride(compID), cuWidthPixels >> pcYuvOrg->getComponentScaleX(compID), cuHeightPixels >> pcYuvOrg->getComponentScaleY(compID), compID);4774 #else4775 4729 finalDistortion += m_pcRdCost->getDistPart( sps.getBitDepth(toChannelType(compID)), pcYuvRec->getAddr(compID ), pcYuvRec->getStride(compID ), pcYuvOrg->getAddr(compID ), pcYuvOrg->getStride(compID), cuWidthPixels >> pcYuvOrg->getComponentScaleX(compID), cuHeightPixels >> pcYuvOrg->getComponentScaleY(compID), compID); 4776 #endif4777 4730 } 4778 4731 … … 4864 4817 checkTransformSkip[i]=false; 4865 4818 const ComponentID compID=ComponentID(i); 4866 #if SVC_EXTENSION4867 const Int channelBitDepth=pcCU->getSlice()->getBitDepth(toChannelType(compID));4868 #else4869 4819 const Int channelBitDepth=pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)); 4870 #endif4871 4820 pcCoeffCurr[compID] = m_ppcQTTempCoeff[compID][uiQTTempAccessLayer] + rTu.getCoefficientOffset(compID); 4872 4821 #if ADAPTIVE_QP_SELECTION -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.cpp
r1474 r1502 173 173 174 174 // store lambda 175 #if SVC_EXTENSION176 m_pcRdCost ->setLambda( dLambda, slice->getBitDepths() );177 #else178 175 m_pcRdCost ->setLambda( dLambda, slice->getSPS()->getBitDepths() ); 179 #endif180 176 181 177 // for RDO … … 193 189 { 194 190 dLambdas[0] = dLambda * 1.1; 195 m_pcRdCost->setLambda( dLambdas[0], slice->get BitDepths() );191 m_pcRdCost->setLambda( dLambdas[0], slice->getSPS()->getBitDepths() ); 196 192 197 193 m_pcRdCost->setDistortionWeight(compID, tmpWeight * 1.15); … … 337 333 if(eSliceType!=I_SLICE) 338 334 { 339 #if SVC_EXTENSION340 if (!(( m_pcCfg->getMaxDeltaQP() == 0 ) && (dQP == -rpcSlice->getQpBDOffset(CHANNEL_TYPE_LUMA) ) && (rpcSlice->getPPS()->getTransquantBypassEnableFlag())))341 #else342 335 if (!(( m_pcCfg->getMaxDeltaQP() == 0 ) && (dQP == -rpcSlice->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA) ) && (rpcSlice->getPPS()->getTransquantBypassEnableFlag()))) 343 #endif344 336 { 345 337 dQP += m_pcCfg->getGOPEntry(iGOPid).m_QPOffset; … … 378 370 379 371 #if FULL_NBIT 380 #if SVC_EXTENSION381 Int bitdepth_luma_qp_scale = 6 * (rpcSlice->getBitDepth(CHANNEL_TYPE_LUMA) - 8);382 #else383 372 Int bitdepth_luma_qp_scale = 6 * (rpcSlice->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 8); 384 #endif385 373 #else 386 374 Int bitdepth_luma_qp_scale = 0; … … 423 411 } 424 412 425 #if SVC_EXTENSION426 iQP = max( -rpcSlice->getQpBDOffset(CHANNEL_TYPE_LUMA), min( MAX_QP, (Int) floor( dQP + 0.5 ) ) );427 #else428 413 iQP = max( -rpcSlice->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA), min( MAX_QP, (Int) floor( dQP + 0.5 ) ) ); 429 #endif430 414 431 415 m_pdRdPicLambda[iDQpIdx] = dLambda; … … 489 473 { 490 474 dQP = xGetQPValueAccordingToLambda( dLambda ); 491 #if SVC_EXTENSION492 iQP = max( -rpcSlice->getQpBDOffset(CHANNEL_TYPE_LUMA), min( MAX_QP, (Int) floor( dQP + 0.5 ) ) );493 #else494 475 iQP = max( -rpcSlice->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA), min( MAX_QP, (Int) floor( dQP + 0.5 ) ) ); 495 #endif496 476 } 497 477 … … 669 649 Double dFrameLambda; 670 650 #if FULL_NBIT 671 #if SVC_EXTENSION672 Int SHIFT_QP = 12 + 6 * (pcSlice->getBitDepth(CHANNEL_TYPE_LUMA) - 8);673 #else674 651 Int SHIFT_QP = 12 + 6 * (pcSlice->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 8); 675 #endif676 652 #else 677 653 Int SHIFT_QP = 12; … … 732 708 TComSlice * const pcSlice = pcPic->getSlice(getSliceIdx()); 733 709 const TComSPS &sps = *(pcSlice->getSPS()); 734 #if SVC_EXTENSION735 const Int shift = pcSlice->getBitDepth(CHANNEL_TYPE_LUMA)-8;736 #else737 710 const Int shift = sps.getBitDepth(CHANNEL_TYPE_LUMA)-8; 738 #endif739 711 const Int offset = (shift>0)?(1<<(shift-1)):0; 740 712 … … 752 724 pCtu->initCtu( pcPic, ctuRsAddr ); 753 725 754 #if SVC_EXTENSION755 Int height = min( sps.getMaxCUHeight(),pcSlice->getPicHeightInLumaSamples() - ctuRsAddr / pcPic->getFrameWidthInCtus() * sps.getMaxCUHeight() );756 Int width = min( sps.getMaxCUWidth(),pcSlice->getPicWidthInLumaSamples() - ctuRsAddr % pcPic->getFrameWidthInCtus() * sps.getMaxCUWidth() );757 #else758 726 Int height = min( sps.getMaxCUHeight(),sps.getPicHeightInLumaSamples() - ctuRsAddr / pcPic->getFrameWidthInCtus() * sps.getMaxCUHeight() ); 759 727 Int width = min( sps.getMaxCUWidth(), sps.getPicWidthInLumaSamples() - ctuRsAddr % pcPic->getFrameWidthInCtus() * sps.getMaxCUWidth() ); 760 #endif761 728 762 729 Int iSumHad = m_pcCuEncoder->updateCtuDataISlice(pCtu, width, height); … … 938 905 } 939 906 940 #if SVC_EXTENSION941 estQP = Clip3( -pcSlice->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, estQP );942 943 m_pcRdCost->setLambda(estLambda, pcSlice->getBitDepths());944 #else945 907 estQP = Clip3( -pcSlice->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, estQP ); 946 908 947 909 m_pcRdCost->setLambda(estLambda, pcSlice->getSPS()->getBitDepths()); 948 #endif949 910 950 911 #if RDOQ_CHROMA_LAMBDA … … 1040 1001 actualQP = pCtu->getQP( 0 ); 1041 1002 } 1042 #if SVC_EXTENSION1043 m_pcRdCost->setLambda(oldLambda, pcSlice->getBitDepths());1044 #else1045 1003 m_pcRdCost->setLambda(oldLambda, pcSlice->getSPS()->getBitDepths()); 1046 #endif1047 1004 m_pcRateCtrl->getRCPic()->updateAfterCTU( m_pcRateCtrl->getRCPic()->getLCUCoded(), actualBits, actualQP, actualLambda, 1048 1005 pCtu->getSlice()->getSliceType() == I_SLICE ? 0 : m_pcCfg->getLCULevelRC() ); … … 1201 1158 } 1202 1159 1203 #if SVC_EXTENSION1204 m_pcEntropyCoder->encodeSAOBlkParam(saoblkParam, pcPic->getPicSym()->getSlice(0)->getBitDepths(), sliceEnabled, leftMergeAvail, aboveMergeAvail);1205 #else1206 1160 m_pcEntropyCoder->encodeSAOBlkParam(saoblkParam, pcPic->getPicSym()->getSPS().getBitDepths(), sliceEnabled, leftMergeAvail, aboveMergeAvail); 1207 #endif1208 1161 } 1209 1162 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
r1459 r1502 288 288 if(getUseScalingListId() == SCALING_LIST_OFF) 289 289 { 290 #if SVC_EXTENSION291 getTrQuant()->setFlatScalingList( maxLog2TrDynamicRange, m_cVPS.getBitDepths(&m_cSPS, m_layerId) );292 #else293 290 getTrQuant()->setFlatScalingList(maxLog2TrDynamicRange, m_cSPS.getBitDepths()); 294 #endif295 291 getTrQuant()->setUseScalingList(false); 296 292 m_cSPS.setScalingListPresentFlag(false); … … 311 307 312 308 // infer the scaling list from the reference layer 313 getTrQuant()->setScalingList( &m_ppcTEncTop[m_cVPS.getLayerIdxInVps(refLayerId)]->getSPS()->getScalingList(), maxLog2TrDynamicRange, m_ cVPS.getBitDepths(&m_cSPS, m_layerId) );309 getTrQuant()->setScalingList( &m_ppcTEncTop[m_cVPS.getLayerIdxInVps(refLayerId)]->getSPS()->getScalingList(), maxLog2TrDynamicRange, m_ppcTEncTop[m_cVPS.getLayerIdxInVps(refLayerId)]->getSPS()->getBitDepths() ); 314 310 } 315 311 else … … 320 316 m_cPPS.setScalingListPresentFlag(false); 321 317 322 #if SVC_EXTENSION323 getTrQuant()->setScalingList(&(m_cSPS.getScalingList()), maxLog2TrDynamicRange, m_cVPS.getBitDepths(&m_cSPS, m_layerId));324 #else325 318 getTrQuant()->setScalingList(&(m_cSPS.getScalingList()), maxLog2TrDynamicRange, m_cSPS.getBitDepths()); 326 #endif327 319 #if SVC_EXTENSION 328 320 } … … 344 336 345 337 // infer the scaling list from the reference layer 346 getTrQuant()->setScalingList( &m_ppcTEncTop[m_cVPS.getLayerIdxInVps(refLayerId)]->getSPS()->getScalingList(), maxLog2TrDynamicRange, m_ cVPS.getBitDepths(&m_cSPS, m_layerId) );338 getTrQuant()->setScalingList( &m_ppcTEncTop[m_cVPS.getLayerIdxInVps(refLayerId)]->getSPS()->getScalingList(), maxLog2TrDynamicRange, m_ppcTEncTop[m_cVPS.getLayerIdxInVps(refLayerId)]->getSPS()->getBitDepths() ); 347 339 } 348 340 else … … 731 723 TEncTop *pcEncTopBase = (TEncTop *)getRefLayerEnc( i ); 732 724 733 UInt refLayerId = m_cVPS.getRefLayerId(m_layerId, i); 734 735 const Int bitDepthLuma = m_cVPS.getBitDepth(CHANNEL_TYPE_LUMA, &m_cSPS, m_layerId); 736 const Int bitDepthChroma = m_cVPS.getBitDepth(CHANNEL_TYPE_CHROMA, &m_cSPS, m_layerId); 737 const Int refBitDepthLuma = m_cVPS.getBitDepth(CHANNEL_TYPE_LUMA, pcEncTopBase->getSPS(), refLayerId); 738 const Int refBitDepthChroma = m_cVPS.getBitDepth(CHANNEL_TYPE_CHROMA, pcEncTopBase->getSPS(), refLayerId); 725 const Int bitDepthLuma = m_cSPS.getBitDepth(CHANNEL_TYPE_LUMA); 726 const Int bitDepthChroma = m_cSPS.getBitDepth(CHANNEL_TYPE_CHROMA); 727 const Int refBitDepthLuma = pcEncTopBase->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA); 728 const Int refBitDepthChroma = pcEncTopBase->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA); 739 729 740 730 Bool sameBitDepths = ( bitDepthLuma == refBitDepthLuma ) && ( bitDepthChroma == refBitDepthChroma ); … … 781 771 TEncTop *pcEncTopBase = (TEncTop *)getRefLayerEnc( i ); 782 772 783 UInt refLayerId = m_cVPS.getRefLayerId(m_layerId, i); 784 785 const Int bitDepthLuma = m_cVPS.getBitDepth(CHANNEL_TYPE_LUMA, &m_cSPS, m_layerId); 786 const Int bitDepthChroma = m_cVPS.getBitDepth(CHANNEL_TYPE_CHROMA, &m_cSPS, m_layerId); 787 const Int refBitDepthLuma = m_cVPS.getBitDepth(CHANNEL_TYPE_LUMA, pcEncTopBase->getSPS(), refLayerId); 788 const Int refBitDepthChroma = m_cVPS.getBitDepth(CHANNEL_TYPE_CHROMA, pcEncTopBase->getSPS(), refLayerId); 773 const Int bitDepthLuma = m_cSPS.getBitDepth(CHANNEL_TYPE_LUMA); 774 const Int bitDepthChroma = m_cSPS.getBitDepth(CHANNEL_TYPE_CHROMA); 775 const Int refBitDepthLuma = m_cSPS.getBitDepth(CHANNEL_TYPE_LUMA); 776 const Int refBitDepthChroma = m_cSPS.getBitDepth(CHANNEL_TYPE_CHROMA); 789 777 790 778 Bool sameBitDepths = ( bitDepthLuma == refBitDepthLuma ) && ( bitDepthChroma == refBitDepthChroma ); … … 1034 1022 m_cSPS.getSpsRangeExtension().setPersistentRiceAdaptationEnabledFlag(m_persistentRiceAdaptationEnabledFlag); 1035 1023 m_cSPS.getSpsRangeExtension().setCabacBypassAlignmentEnabledFlag(m_cabacBypassAlignmentEnabledFlag); 1024 1025 #if SVC_EXTENSION 1026 m_cSPS.inferSPS( m_layerId, &m_cVPS ); 1027 #endif 1036 1028 } 1037 1029 -
branches/SHM-dev/source/Lib/TLibEncoder/WeightPredAnalysis.cpp
r1411 r1502 432 432 { 433 433 const ComponentID compID = ComponentID(comp); 434 #if SVC_EXTENSION435 const Int bitDepth = slice->getBitDepth(toChannelType(compID));436 #else437 434 const Int bitDepth = slice->getSPS()->getBitDepth(toChannelType(compID)); 438 #endif439 435 const Int range = bUseHighPrecisionWeighting ? (1<<bitDepth)/2 : 128; 440 436 const Int realLog2Denom = log2Denom + (bUseHighPrecisionWeighting ? RExt__PREDICTION_WEIGHTING_ANALYSIS_DC_PRECISION : (bitDepth - 8)); … … 453 449 refAC = ( refAC * currWeightACDCParam[comp].numSamples ) / refWeightACDCParam[comp].numSamples; 454 450 455 const Int bitDepthLuma = slice->get BitDepth(CHANNEL_TYPE_LUMA);456 const Int refBitDepthLuma = slice->getRefPic(eRefPicList, refIdxTemp)->getSlice(0)->get BitDepth(CHANNEL_TYPE_LUMA);451 const Int bitDepthLuma = slice->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA); 452 const Int refBitDepthLuma = slice->getRefPic(eRefPicList, refIdxTemp)->getSlice(0)->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA); 457 453 const Int delta = bitDepthLuma - refBitDepthLuma; 458 454 … … 557 553 const Int width = pPic->getWidth(compID); 558 554 const Int height = pPic->getHeight(compID); 559 #if SVC_EXTENSION560 const Int bitDepth = slice->getBitDepth(toChannelType(compID));561 #else562 555 const Int bitDepth = slice->getSPS()->getBitDepth(toChannelType(compID)); 563 #endif564 556 WPScalingParam &wp = m_wp[refList][refIdxTemp][compID]; 565 557 Int weight = wp.iWeight; … … 679 671 const Int width = pPic->getWidth(compID); 680 672 const Int height = pPic->getHeight(compID); 681 #if SVC_EXTENSION682 const Int bitDepth = slice->getBitDepth(toChannelType(compID));683 #else684 673 const Int bitDepth = slice->getSPS()->getBitDepth(toChannelType(compID)); 685 #endif686 674 687 675 // calculate SAD costs with/without wp for luma
Note: See TracChangeset for help on using the changeset viewer.