Changeset 1222 in 3DVCSoftware for branches/HTM-14.1-update-dev4-RWTH/source/Lib/TLibEncoder
- Timestamp:
- 21 May 2015, 15:43:58 (10 years ago)
- Location:
- branches/HTM-14.1-update-dev4-RWTH/source/Lib/TLibEncoder
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-14.1-update-dev4-RWTH/source/Lib/TLibEncoder/TEncCavlc.cpp
r1200 r1222 2901 2901 #endif 2902 2902 2903 #if H_3D_DBBP2903 #if NH_3D_DBBP 2904 2904 Void TEncCavlc::codeDBBPFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2905 2905 { -
branches/HTM-14.1-update-dev4-RWTH/source/Lib/TLibEncoder/TEncCavlc.h
r1200 r1222 136 136 Void codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 137 137 #endif 138 #if H_3D_DBBP138 #if NH_3D_DBBP 139 139 Void codeDBBPFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 140 140 #endif -
branches/HTM-14.1-update-dev4-RWTH/source/Lib/TLibEncoder/TEncCu.cpp
r1217 r1222 79 79 m_ppcRecoYuvTemp = new TComYuv*[m_uhTotalDepth-1]; 80 80 m_ppcOrigYuv = new TComYuv*[m_uhTotalDepth-1]; 81 #if H_3D_DBBP81 #if NH_3D_DBBP 82 82 m_ppcOrigYuvDBBP = new TComYuv*[m_uhTotalDepth-1]; 83 83 #endif … … 105 105 106 106 m_ppcOrigYuv [i] = new TComYuv; m_ppcOrigYuv [i]->create(uiWidth, uiHeight, chromaFormat); 107 #if H_3D_DBBP108 m_ppcOrigYuvDBBP[i] = new TComYuv; m_ppcOrigYuvDBBP[i]->create(uiWidth, uiHeight );107 #if NH_3D_DBBP 108 m_ppcOrigYuvDBBP[i] = new TComYuv; m_ppcOrigYuvDBBP[i]->create(uiWidth, uiHeight, chromaFormat); 109 109 #endif 110 110 … … 180 180 m_ppcOrigYuv[i]->destroy(); delete m_ppcOrigYuv[i]; m_ppcOrigYuv[i] = NULL; 181 181 } 182 #if H_3D_DBBP182 #if NH_3D_DBBP 183 183 if(m_ppcOrigYuvDBBP[i]) 184 184 { … … 240 240 m_ppcOrigYuv = NULL; 241 241 } 242 #if H_3D_DBBP242 #if NH_3D_DBBP 243 243 if(m_ppcOrigYuvDBBP) 244 244 { … … 693 693 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 694 694 #endif 695 #if H_3D_DBBP695 #if NH_3D_DBBP 696 696 if( rpcTempCU->getSlice()->getDepthBasedBlkPartFlag() && rpcTempCU->getSlice()->getDefaultRefViewIdxAvailableFlag() ) 697 697 { … … 1611 1611 // prediction Info ( Intra : direction mode, Inter : Mv, reference idx ) 1612 1612 m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx ); 1613 #if H_3D1613 #if NH_3D_DBBP 1614 1614 m_pcEntropyCoder->encodeDBBPFlag( pcCU, uiAbsPartIdx ); 1615 1615 #endif … … 2384 2384 } 2385 2385 2386 #if H_3D_DBBP2386 #if NH_3D_DBBP 2387 2387 Void TEncCu::xInvalidateOriginalSegments( TComYuv* pOrigYuv, TComYuv* pOrigYuvTemp, Bool* pMask, UInt uiValidSegment ) 2388 2388 { 2389 UInt uiWidth = pOrigYuv->getWidth ( 2390 UInt uiHeight = pOrigYuv->getHeight( 2391 Pel* piSrc = pOrigYuv->get LumaAddr();2392 UInt uiSrcStride = pOrigYuv->getStride( );2393 Pel* piDst = pOrigYuvTemp->get LumaAddr();2394 UInt uiDstStride = pOrigYuvTemp->getStride( );2389 UInt uiWidth = pOrigYuv->getWidth (COMPONENT_Y); 2390 UInt uiHeight = pOrigYuv->getHeight(COMPONENT_Y); 2391 Pel* piSrc = pOrigYuv->getAddr(COMPONENT_Y); 2392 UInt uiSrcStride = pOrigYuv->getStride(COMPONENT_Y); 2393 Pel* piDst = pOrigYuvTemp->getAddr(COMPONENT_Y); 2394 UInt uiDstStride = pOrigYuvTemp->getStride(COMPONENT_Y); 2395 2395 2396 2396 UInt uiMaskStride= MAX_CU_SIZE; … … 2417 2417 2418 2418 // now invalidate chroma 2419 Pel* piSrcU = pOrigYuv->get CbAddr();2420 Pel* piSrcV = pOrigYuv->get CrAddr();2421 UInt uiSrcStrideC = pOrigYuv->get CStride();2422 Pel* piDstU = pOrigYuvTemp->get CbAddr();2423 Pel* piDstV = pOrigYuvTemp->get CrAddr();2424 UInt uiDstStrideC = pOrigYuvTemp->get CStride();2419 Pel* piSrcU = pOrigYuv->getAddr(COMPONENT_Cb); 2420 Pel* piSrcV = pOrigYuv->getAddr(COMPONENT_Cr); 2421 UInt uiSrcStrideC = pOrigYuv->getStride(COMPONENT_Cb); 2422 Pel* piDstU = pOrigYuvTemp->getAddr(COMPONENT_Cb); 2423 Pel* piDstV = pOrigYuvTemp->getAddr(COMPONENT_Cr); 2424 UInt uiDstStrideC = pOrigYuvTemp->getStride(COMPONENT_Cb); 2425 2425 pMask = pMaskStart; 2426 2426 … … 2443 2443 } 2444 2444 } 2445 2445 #endif 2446 2447 #if H_3D_DIS 2446 2448 Void TEncCu::xCheckRDCostDIS( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize ) 2447 2449 { … … 2517 2519 xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth); 2518 2520 } 2519 2521 #endif 2522 2523 #if NH_3D_DBBP 2520 2524 Void TEncCu::xCheckRDCostInterDBBP( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bUseMRG ) 2521 2525 { … … 2539 2543 AOF( uiWidth == uiHeight ); 2540 2544 2541 #if H_3D_DBBP2545 #if NH_3D_DBBP 2542 2546 // Is this correct here, was under the macro SEC_DBBP_DISALLOW_8x8_I0078, however the function is related to Single Depth Mode 2543 2547 if(uiWidth <= 8) … … 2591 2595 rpcTempCU->getDBBPTmpData()->eVirtualPartSize = eVirtualPartSize; 2592 2596 rpcTempCU->getDBBPTmpData()->uiVirtualPartIndex = uiSegment; 2593 m_pcPredSearch->predInterSearch( rpcTempCU, m_ppcOrigYuvDBBP[uhDepth], apPredYuv[uiSegment], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], false, false, bUseMRG ); 2597 2598 m_pcPredSearch->predInterSearch( rpcTempCU, m_ppcOrigYuvDBBP[uhDepth], apPredYuv[uiSegment], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], false, bUseMRG ); 2594 2599 m_pcRdCost->setUseMask(false); 2595 2600 … … 2599 2604 pDBBPTmpData->abMergeFlag[uiSegment] = rpcTempCU->getMergeFlag(0); 2600 2605 pDBBPTmpData->auhMergeIndex[uiSegment] = rpcTempCU->getMergeIndex(0); 2601 2606 2607 #if NH_3D_VSP 2602 2608 AOF( rpcTempCU->getSPIVMPFlag(0) == false ); 2603 2609 AOF( rpcTempCU->getVSPFlag(0) == 0 ); 2610 #endif 2604 2611 2605 2612 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) … … 2620 2627 rpcTempCU->setPredModeSubParts ( MODE_INTER, 0, uhDepth ); 2621 2628 2622 UInt uiPUOffset = ( g_auiPUOffset[UInt( eVirtualPartSize )] << ( ( rpcTempCU->getSlice()->getSPS()->getMax CUDepth() - uhDepth ) << 1 ) ) >> 4;2629 UInt uiPUOffset = ( g_auiPUOffset[UInt( eVirtualPartSize )] << ( ( rpcTempCU->getSlice()->getSPS()->getMaxTotalCUDepth() - uhDepth ) << 1 ) ) >> 4; 2623 2630 for( UInt uiSegment = 0; uiSegment < 2; uiSegment++ ) 2624 2631 { … … 2646 2653 2647 2654 // reconstruct final prediction signal by combining both segments 2648 m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight, 0, eVirtualPartSize); 2655 Int bitDepthY = rpcTempCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA); 2656 m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight, 0, eVirtualPartSize, bitDepthY); 2649 2657 m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], false ); 2650 2658 -
branches/HTM-14.1-update-dev4-RWTH/source/Lib/TLibEncoder/TEncCu.h
r1200 r1222 82 82 TComYuv** m_ppcOrigYuv; ///< Original Yuv for each depth 83 83 84 #if H_3D_DBBP84 #if NH_3D_DBBP 85 85 TComYuv** m_ppcOrigYuvDBBP; 86 86 #endif … … 155 155 Void xCheckRDCostInter ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize ); 156 156 #endif 157 #if H_3D_DBBP157 #if NH_3D_DBBP 158 158 Void xInvalidateOriginalSegments( TComYuv* pOrigYuv, TComYuv* pOrigYuvTemp, Bool* pMask, UInt uiValidSegment ); 159 159 Void xCheckRDCostInterDBBP( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bUseMRG = false ); -
branches/HTM-14.1-update-dev4-RWTH/source/Lib/TLibEncoder/TEncEntropy.cpp
r1200 r1222 870 870 871 871 #endif 872 #if H_3D_DBBP872 #if NH_3D_DBBP 873 873 Void TEncEntropy::encodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 874 874 { 875 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && 875 if( bRD ) 876 { 877 uiAbsPartIdx = 0; 878 } 879 880 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && 876 881 ( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || 877 882 pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && … … 879 884 pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() ) 880 885 { 881 if( bRD )882 {883 uiAbsPartIdx = 0;884 }885 886 m_pcEntropyCoderIf->codeDBBPFlag( pcCU, uiAbsPartIdx ); 886 887 } -
branches/HTM-14.1-update-dev4-RWTH/source/Lib/TLibEncoder/TEncEntropy.h
r1200 r1222 94 94 virtual Void codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 95 95 #endif 96 #if H_3D_DBBP96 #if NH_3D_DBBP 97 97 virtual Void codeDBBPFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 98 98 #endif … … 183 183 Void encodeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 184 184 #endif 185 #if H_3D_DBBP185 #if NH_3D_DBBP 186 186 Void encodeDBBPFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 187 187 #endif -
branches/HTM-14.1-update-dev4-RWTH/source/Lib/TLibEncoder/TEncSbac.cpp
r1200 r1222 114 114 , m_cSDCFlagSCModel ( 1, 1, NUM_SDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 115 115 #endif 116 #if H_3D_DBBP116 #if NH_3D_DBBP 117 117 , m_cDBBPFlagSCModel ( 1, 1, DBBP_NUM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 118 118 #endif … … 194 194 m_cSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG ); 195 195 #endif 196 #if H_3D_DBBP196 #if NH_3D_DBBP 197 197 m_cDBBPFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DBBP_FLAG ); 198 198 #endif … … 244 244 curCost += m_cSDCFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_SDC_FLAG ); 245 245 #endif 246 #if H_3D_DBBP246 #if NH_3D_DBBP 247 247 curCost += m_cDBBPFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DBBP_FLAG ); 248 248 #endif … … 321 321 m_cSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG ); 322 322 #endif 323 #if H_3D_DBBP324 m_cDBBPFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DBBP_FLAG );325 #endif326 323 327 324 … … 2650 2647 #endif 2651 2648 2652 #if H_3D_DBBP2649 #if NH_3D_DBBP 2653 2650 Void TEncSbac::codeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2654 2651 { -
branches/HTM-14.1-update-dev4-RWTH/source/Lib/TLibEncoder/TEncSbac.h
r1200 r1222 150 150 Void codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 151 151 #endif 152 #if H_3D_DBBP152 #if NH_3D_DBBP 153 153 Void codeDBBPFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 154 154 #endif … … 262 262 ContextModel3DBuffer m_cSDCFlagSCModel; 263 263 #endif 264 #if H_3D_DBBP264 #if NH_3D_DBBP 265 265 ContextModel3DBuffer m_cDBBPFlagSCModel; 266 266 #endif -
branches/HTM-14.1-update-dev4-RWTH/source/Lib/TLibEncoder/TEncSearch.cpp
r1200 r1222 3884 3884 UInt uiDepth = pcCU->getDepth( uiAbsPartIdx ); 3885 3885 3886 #if H_3D_DBBP3886 #if NH_3D_DBBP 3887 3887 DbbpTmpData* pDBBPTmpData = pcCU->getDBBPTmpData(); 3888 3888 if( pcCU->getDBBPFlag(0) ) … … 3891 3891 AOF( iPUIdx == 0 ); 3892 3892 AOF( pcCU->getPartitionSize(0) == SIZE_2Nx2N ); 3893 AOF( pDBBPTmpData->eVirtualPartSize != SIZE_NONE);3893 AOF( pDBBPTmpData->eVirtualPartSize != NUMBER_OF_PART_SIZES ); 3894 3894 3895 3895 // temporary change of partition size for candidate derivation … … 3916 3916 3917 3917 PartSize partSize = pcCU->getPartitionSize( 0 ); 3918 #if H_3D_DBBP3918 #if NH_3D_DBBP 3919 3919 if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && partSize != SIZE_2Nx2N && pcCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(0) == false ) 3920 3920 #else … … 3978 3978 xRestrictBipredMergeCand( pcCU, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 3979 3979 3980 #if H_3D_DBBP3980 #if NH_3D_DBBP 3981 3981 if( pcCU->getDBBPFlag(0) ) 3982 3982 { … … 4025 4025 #endif 4026 4026 #if H_3D_VSP 4027 #if H_3D_DBBP4027 #if NH_3D_DBBP 4028 4028 if ( vspFlag[uiMergeCand] && !pcCU->getDBBPFlag(0) ) 4029 4029 #else … … 4550 4550 } // end if bTestNormalMC 4551 4551 #endif 4552 #if H_3D_DBBP4552 #if NH_3D_DBBP 4553 4553 // test merge mode for DBBP (2Nx2N) 4554 4554 if ( pcCU->getPartitionSize( uiPartAddr ) != SIZE_2Nx2N || pcCU->getDBBPFlag(0) ) … … 4649 4649 #endif 4650 4650 #if H_3D_VSP 4651 #if H_3D_DBBP4651 #if NH_3D_DBBP 4652 4652 if ( vspFlag[uiMRGIndex] && !pcCU->getDBBPFlag(uiPartAddr) ) 4653 4653 #else … … 4747 4747 { 4748 4748 4749 #if H_3D_DBBP4749 #if NH_3D_DBBP 4750 4750 DbbpTmpData* pDBBPTmpData = pcCU->getDBBPTmpData(); 4751 4751 if( pcCU->getDBBPFlag(0) ) … … 4754 4754 AOF( uiPartIdx == 0 ); 4755 4755 AOF( pcCU->getPartitionSize(0) == SIZE_2Nx2N ); 4756 AOF( pDBBPTmpData->eVirtualPartSize != SIZE_NONE);4756 AOF( pDBBPTmpData->eVirtualPartSize != NUMBER_OF_PART_SIZES ); 4757 4757 AOF( iRoiWidth == iRoiHeight ); 4758 4758 … … 4779 4779 4780 4780 pcCU->fillMvpCand( uiPartIdx, uiPartAddr, eRefPicList, iRefIdx, pcAMVPInfo ); 4781 #if H_3D_DBBP4781 #if NH_3D_DBBP 4782 4782 if( pcCU->getDBBPFlag(0) ) 4783 4783 { … … 7130 7130 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true ); 7131 7131 #endif 7132 #if H_3D7132 #if NH_3D_DBBP 7133 7133 m_pcEntropyCoder->encodeDBBPFlag( pcCU, 0, true ); 7134 7134 #endif
Note: See TracChangeset for help on using the changeset viewer.