Changeset 1502 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
- Timestamp:
- 11 Dec 2015, 00:05:48 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset for help on using the changeset viewer.