Changeset 1396 in 3DVCSoftware for trunk/source/Lib/TLibEncoder
- Timestamp:
- 11 Mar 2016, 16:54:51 (9 years ago)
- Location:
- trunk/source/Lib/TLibEncoder
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibEncoder/SyntaxElementWriter.cpp
r1386 r1396 128 128 129 129 #if NH_MV_ENC_DEC_TRAC 130 Void SyntaxElementWriter::xWriteStringTr( UChar* value, UInt length, const Char *pSymbolName)130 Void SyntaxElementWriter::xWriteStringTr( UChar* value, UInt length, const TChar *pSymbolName) 131 131 { 132 132 xWriteString(value, length); -
trunk/source/Lib/TLibEncoder/SyntaxElementWriter.h
r1386 r1396 96 96 Void xWriteFlagTr ( UInt value, const TChar *pSymbolName); 97 97 #if NH_MV 98 Void xWriteStringTr ( UChar* value, UInt length, const Char *pSymbolName);98 Void xWriteStringTr ( UChar* value, UInt length, const TChar *pSymbolName); 99 99 #endif 100 100 #endif -
trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
r1386 r1396 69 69 fprintf( g_hTrace, "=========== Slice ===========\n"); 70 70 } 71 #endif 71 72 72 73 Void xTraceAccessUnitDelimiter () … … 75 76 } 76 77 77 #endif78 78 #endif 79 79 … … 1428 1428 for( Int j = 0; j <= vps->getMaxSubLayersInLayerSetMinus1( currLsIdx ); j++ ) 1429 1429 { 1430 #if NH_3D_FIX_TICKET_114 1431 if( j > 0 && dpbSize->getSubLayerFlagInfoPresentFlag( i ) ) 1432 #else 1430 1433 if( j > 0 && dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) 1434 #endif 1431 1435 { 1432 1436 WRITE_FLAG( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ? 1 : 0 , "sub_layer_dpb_info_present_flag" ); -
trunk/source/Lib/TLibEncoder/TEncCfg.h
r1386 r1396 46 46 #include "TLibCommon/TComSlice.h" 47 47 #include <assert.h> 48 49 #if NH_3D 50 #include "TAppCommon/TAppComCamPara.h" 51 #endif 48 52 #if NH_3D_VSO 49 #include "TAppCommon/TAppComCamPara.h"50 53 #include "TLibRenderer/TRenModSetupStrParser.h" 51 54 #endif … … 458 461 #endif 459 462 460 #if NH_3D_VSO 463 #if NH_3D_VSO || NH_3D 461 464 Bool m_isDepth; 462 465 Bool m_isAuxDepth; … … 464 467 //====== Camera Parameters ====== 465 468 TAppComCamPara* m_cameraParameters; 469 #endif 466 470 471 #if NH_3D_VSO 467 472 //====== View Synthesis Optimization ====== 468 473 TRenModSetupStrParser* m_renderModelParameters; … … 504 509 , m_viewId(-1) 505 510 , m_viewIndex(-1) 506 #if NH_3D_VSO 511 #if NH_3D_VSO || NH_3D 507 512 , m_isDepth(false) 508 513 , m_isAuxDepth(false) 514 #endif 515 #if NH_3D_VSO 509 516 , m_bUseVSO(false) 510 517 #endif … … 555 562 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } 556 563 Int getViewIndex () { return m_viewIndex; } 557 #if NH_3D_VSO 564 #if NH_3D_VSO || NH_3D 558 565 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } 559 566 Bool getIsDepth () { return m_isDepth; } … … 1157 1164 UInt getSummaryVerboseness( ) const { return m_summaryVerboseness; } 1158 1165 1159 #if NH_3D_VSO 1166 #if NH_3D_VSO || NH_3D 1160 1167 // Only flags that are not in the SPS3dExtension should go here. 1161 1168 /// 3D Tools … … 1163 1170 //==== CAMERA PARAMETERS ========== 1164 1171 Void setCameraParameters ( TAppComCamPara* c) { m_cameraParameters = c; } 1165 //==== VSO ========== 1172 #endif 1173 #if NH_3D_VSO 1174 //==== VSO ========== 1166 1175 Void setRenderModelParameters ( TRenModSetupStrParser* c ) { m_renderModelParameters = c; } 1167 1176 Bool getUseVSO () { return m_bUseVSO; } -
trunk/source/Lib/TLibEncoder/TEncCu.cpp
r1386 r1396 1199 1199 rpcBestCU->getTotalBins() += ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded(); 1200 1200 #if NH_3D_VSO // M8 1201 if ( m_pcRdCost->getUse VSO() )1201 if ( m_pcRdCost->getUseLambdaScaleVSO() ) 1202 1202 { 1203 1203 rpcBestCU->getTotalCost() = m_pcRdCost->calcRdCostVSO( rpcBestCU->getTotalBits(), rpcBestCU->getTotalDistortion() ); … … 1340 1340 } 1341 1341 #if NH_3D_VSO // M10 1342 if ( m_pcRdCost->getUse VSO() )1342 if ( m_pcRdCost->getUseLambdaScaleVSO() ) 1343 1343 { 1344 1344 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCostVSO( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); … … 2974 2974 rpcTempCU->getTotalBins() = ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded(); 2975 2975 #if NH_3D_VSO // M44 2976 if ( m_pcRdCost->getUse VSO() )2976 if ( m_pcRdCost->getUseLambdaScaleVSO() ) 2977 2977 { 2978 2978 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCostVSO( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); … … 3047 3047 pcCU->getTotalBins() += ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded(); 3048 3048 #if NH_3D_VSO // M45 3049 if ( m_pcRdCost->getUse VSO() )3049 if ( m_pcRdCost->getUseLambdaScaleVSO() ) 3050 3050 { 3051 3051 pcCU->getTotalCost() = m_pcRdCost->calcRdCostVSO( pcCU->getTotalBits(), pcCU->getTotalDistortion() ); -
trunk/source/Lib/TLibEncoder/TEncSearch.cpp
r1386 r1396 1647 1647 UInt uiSingleBits = xGetIntraBitsQT( rTu, true, false, false ); 1648 1648 #if NH_3D_VSO // M NEW 1649 if ( m_pcRdCost->getUse RenModel() )1649 if ( m_pcRdCost->getUseLambdaScaleVSO() ) 1650 1650 { 1651 1651 singleCostTmp = m_pcRdCost->calcRdCostVSO( uiSingleBits, singleDistTmpLuma ); … … 1887 1887 1888 1888 #if NH_3D_DIS 1889 Void TEncSearch::xIntraCodingDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, UInt uiPredMode ) 1889 #if NH_3D_VSO 1890 Void TEncSearch::xIntraCodingDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, UInt uiPredMode ) 1891 #else 1892 Void TEncSearch::xIntraCodingDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Distortion& ruiDist, Double& dRDCost, UInt uiPredMode ) 1893 #endif 1890 1894 { 1891 1895 UInt uiWidth = pcCU ->getWidth ( 0 ); … … 1982 1986 #endif 1983 1987 #if NH_3D_SDC_INTRA 1984 Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi ) 1988 #if NH_3D_VSO 1989 Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi ) 1990 #else 1991 Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Distortion& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi ) 1992 #endif 1993 1994 1985 1995 { 1986 1996 UInt uiWidth = pcCU->getWidth ( 0 ); … … 2215 2225 #endif 2216 2226 { 2227 #if NH_3D_FIX_INTRA_SDC_VSO_OFF 2228 ruiDist = m_pcRdCost->getDistPart( bitDepthY, piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, COMPONENT_Y ); 2229 #else 2217 2230 ruiDist = m_pcRdCost->getDistPart( bitDepthY, piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, COMPONENT_Y, DF_SAD ); 2231 #endif 2218 2232 } 2219 2233 … … 2743 2757 Pel* piOrg = pcOrgYuv ->getAddr(COMPONENT_Y, 0, uiWidth ); 2744 2758 UInt uiStride = pcPredYuv->getStride(COMPONENT_Y); 2745 #endif 2759 2746 2760 Dist uiDist = 0; 2747 2761 Double dCost = 0.0; … … 2749 2763 Double dBestCost = MAX_DOUBLE; 2750 2764 UInt uiBestDISType = 0; 2765 #else 2766 Distortion uiDist = 0; 2767 Double dCost = 0.0; 2768 Distortion uiBestDist = 0; 2769 Double dBestCost = MAX_DOUBLE; 2770 UInt uiBestDISType = 0; 2771 #endif 2751 2772 2752 2773 for( UInt uiPredMode = 0; uiPredMode < 4 ; uiPredMode++ ) … … 5232 5253 { 5233 5254 rcMv = *pcMvPred; 5255 #if NH_MV_FIX_VERT_MV_REST 5256 if ( m_vertRestriction ) 5257 { 5258 if (rcMv.getVer() > cMvSrchRngRB.getVer()<<2) 5259 { 5260 rcMv.setVer(cMvSrchRngRB.getVer()<<2); 5261 } 5262 } 5263 #endif 5234 5264 const TComMv *pIntegerMv2Nx2NPred=0; 5235 5265 if (pcCU->getPartitionSize(0) != SIZE_2Nx2N || pcCU->getDepth(0) != 0) … … 6316 6346 } 6317 6347 6318 Dist ruiDist; 6348 #if NH_3D_VSO 6349 Dist ruiDist; 6350 #else 6351 Distortion ruiDist; 6352 #endif 6319 6353 Double rdCost; 6320 6354 #if NH_3D_VSO // M13 … … 6787 6821 6788 6822 #if NH_3D_VSO // M NEW01 6789 if ( m_pcRdCost->getUse RenModel() )6823 if ( m_pcRdCost->getUseLambdaScaleVSO() ) 6790 6824 { 6791 6825 currCompCost = m_pcRdCost->calcRdCostVSO(currCompBits, currCompDist); … … 6955 6989 6956 6990 #if NH_3D_VSO 6957 if ( m_pcRdCost->getUse RenModel() )6991 if ( m_pcRdCost->getUseLambdaScaleVSO() ) 6958 6992 { 6959 6993 dSingleCost = m_pcRdCost->calcRdCostVSO( uiSingleBits, uiSingleDist ); … … 7898 7932 7899 7933 // coarse wedge search 7900 Dist uiBestDist = RDO_DIST_MAX; 7934 #if NH_3D_VSO 7935 Dist uiBestDist = RDO_DIST_MAX; 7936 #else 7937 Distortion uiBestDist = RDO_DIST_MAX; 7938 #endif 7901 7939 UInt uiBestNodeId = 0; 7902 7940 for( UInt uiNodeId = 0; uiNodeId < pacWedgeNodeList->size(); uiNodeId++ ) … … 7908 7946 assignBiSegDCs( piPred, uiPredStride, pbPattern, uiStride, refDC1, refDC2 ); 7909 7947 7948 #if !NH_3D_VSO 7949 Distortion uiActDist = RDO_DIST_MAX; 7950 #else 7910 7951 Dist uiActDist = RDO_DIST_MAX; 7911 #if NH_3D_VSO 7952 7912 7953 if( m_pcRdCost->getUseVSO() ) 7913 7954 { … … 7935 7976 7936 7977 // refinement 7978 #if NH_3D_VSO 7937 7979 Dist uiBestDistRef = uiBestDist; 7980 #else 7981 Distortion uiBestDistRef = uiBestDist; 7982 #endif 7938 7983 UInt uiBestTabIdxRef = pacWedgeNodeList->at(uiBestNodeId).getPatternIdx(); 7939 7984 for( UInt uiRefId = 0; uiRefId < DMM_NUM_WEDGE_REFINES; uiRefId++ ) … … 7946 7991 xCalcBiSegDCs ( piRef, uiRefStride, pbPattern, uiStride, refDC1, refDC2, (1<<(bitDepthY-1)) ); 7947 7992 assignBiSegDCs( piPred, uiPredStride, pbPattern, uiStride, refDC1, refDC2 ); 7993 7994 #if !NH_3D_VSO 7995 Distortion uiActDist = RDO_DIST_MAX; 7996 #else 7948 7997 Dist uiActDist = RDO_DIST_MAX; 7949 #if NH_3D_VSO7950 7998 if( m_pcRdCost->getUseVSO() ) 7951 7999 { -
trunk/source/Lib/TLibEncoder/TEncSearch.h
r1386 r1396 343 343 Void xLoadIntraResultQT ( const ComponentID compID, TComTU &rTu); 344 344 #if NH_3D_DIS 345 Void xIntraCodingDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, UInt uiPredMode ); 345 #if NH_3D_VSO 346 Void xIntraCodingDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, UInt uiPredMode ); 347 #else 348 Void xIntraCodingDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Distortion& ruiDist, Double& dRDCost, UInt uiPredMode ); 349 #endif 346 350 #endif 347 351 … … 356 360 #endif 357 361 #if NH_3D_SDC_INTRA 358 Void xIntraCodingSDC ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi ); 362 #if NH_3D_VSO 363 Void xIntraCodingSDC ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist , Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi ); 364 #else 365 Void xIntraCodingSDC ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Distortion& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi ); 366 #endif 359 367 Void xCalcConstantSDC ( Pel* ptrSrc, UInt srcStride, UInt uiSize, Pel& valDC ); 360 368 #endif -
trunk/source/Lib/TLibEncoder/TEncSlice.cpp
r1386 r1396 461 461 462 462 #if NH_3D_VSO 463 m_pcRdCost->setUseLambdaScaleVSO ( (m_pcCfg->getUseVSO() || m_pcCfg->getForceLambdaScaleVSO()) && ( m_pcCfg->getIsDepth() 463 m_pcRdCost->setUseLambdaScaleVSO ( (m_pcCfg->getUseVSO() || m_pcCfg->getForceLambdaScaleVSO()) && ( m_pcCfg->getIsDepth() || m_pcCfg->getIsAuxDepth() ) ); 464 464 m_pcRdCost->setLambdaVSO ( dLambda * m_pcCfg->getLambdaScaleVSO() ); 465 465 -
trunk/source/Lib/TLibEncoder/TEncTop.cpp
r1386 r1396 91 91 TEncTop::~TEncTop() 92 92 { 93 #if NH_3D_FIX_LEAK 94 #if NH_3D_IC 95 if ( m_aICEnableCandidate != NULL ) 96 { 97 delete[] m_aICEnableCandidate; 98 } 99 100 if ( m_aICEnableNum != NULL ) 101 { 102 delete[] m_aICEnableNum; 103 } 104 #endif 105 106 #endif 93 107 #if ENC_DEC_TRACE 94 108 if (g_hTrace != stdout) … … 1652 1666 } 1653 1667 1654 rendererModel->setSingleModel( iModelNum, ppiShiftLUTLeft, ppiBaseShiftLUTLeft, ppiShiftLUTRight, ppiBaseShiftLUTRight, iDistToLeft, pcPicYuvOrgRef );1668 rendererModel->setSingleModel( iModelNum, ppiShiftLUTLeft, ppiBaseShiftLUTLeft, ppiShiftLUTRight, ppiBaseShiftLUTRight, iDistToLeft, pcPicYuvOrgRef, iEncViewSIdx ); 1655 1669 } 1656 1670 }
Note: See TracChangeset for help on using the changeset viewer.