Changeset 1502 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibEncoder
- Timestamp:
- 11 Dec 2015, 00:05:48 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib/TLibEncoder
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
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.