Changeset 1394 in 3DVCSoftware for branches/HTM-16.0-dev1/source/Lib/TLibEncoder
- Timestamp:
- 4 Mar 2016, 09:42:34 (9 years ago)
- Location:
- branches/HTM-16.0-dev1/source/Lib/TLibEncoder
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-16.0-dev1/source/Lib/TLibEncoder/SyntaxElementWriter.cpp
r1386 r1394 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); -
branches/HTM-16.0-dev1/source/Lib/TLibEncoder/SyntaxElementWriter.h
r1386 r1394 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 -
branches/HTM-16.0-dev1/source/Lib/TLibEncoder/TEncCavlc.cpp
r1392 r1394 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 -
branches/HTM-16.0-dev1/source/Lib/TLibEncoder/TEncCfg.h
r1386 r1394 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; } -
branches/HTM-16.0-dev1/source/Lib/TLibEncoder/TEncCu.cpp
r1386 r1394 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() ); -
branches/HTM-16.0-dev1/source/Lib/TLibEncoder/TEncSearch.cpp
r1386 r1394 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++ ) … … 6316 6337 } 6317 6338 6318 Dist ruiDist; 6339 #if NH_3D_VSO 6340 Dist ruiDist; 6341 #else 6342 Distortion ruiDist; 6343 #endif 6319 6344 Double rdCost; 6320 6345 #if NH_3D_VSO // M13 … … 6787 6812 6788 6813 #if NH_3D_VSO // M NEW01 6789 if ( m_pcRdCost->getUse RenModel() )6814 if ( m_pcRdCost->getUseLambdaScaleVSO() ) 6790 6815 { 6791 6816 currCompCost = m_pcRdCost->calcRdCostVSO(currCompBits, currCompDist); … … 6955 6980 6956 6981 #if NH_3D_VSO 6957 if ( m_pcRdCost->getUse RenModel() )6982 if ( m_pcRdCost->getUseLambdaScaleVSO() ) 6958 6983 { 6959 6984 dSingleCost = m_pcRdCost->calcRdCostVSO( uiSingleBits, uiSingleDist ); … … 7898 7923 7899 7924 // coarse wedge search 7900 Dist uiBestDist = RDO_DIST_MAX; 7925 #if NH_3D_VSO 7926 Dist uiBestDist = RDO_DIST_MAX; 7927 #else 7928 Distortion uiBestDist = RDO_DIST_MAX; 7929 #endif 7901 7930 UInt uiBestNodeId = 0; 7902 7931 for( UInt uiNodeId = 0; uiNodeId < pacWedgeNodeList->size(); uiNodeId++ ) … … 7908 7937 assignBiSegDCs( piPred, uiPredStride, pbPattern, uiStride, refDC1, refDC2 ); 7909 7938 7939 #if !NH_3D_VSO 7940 Distortion uiActDist = RDO_DIST_MAX; 7941 #else 7910 7942 Dist uiActDist = RDO_DIST_MAX; 7911 #if NH_3D_VSO 7943 7912 7944 if( m_pcRdCost->getUseVSO() ) 7913 7945 { … … 7935 7967 7936 7968 // refinement 7969 #if NH_3D_VSO 7937 7970 Dist uiBestDistRef = uiBestDist; 7971 #else 7972 Distortion uiBestDistRef = uiBestDist; 7973 #endif 7938 7974 UInt uiBestTabIdxRef = pacWedgeNodeList->at(uiBestNodeId).getPatternIdx(); 7939 7975 for( UInt uiRefId = 0; uiRefId < DMM_NUM_WEDGE_REFINES; uiRefId++ ) … … 7946 7982 xCalcBiSegDCs ( piRef, uiRefStride, pbPattern, uiStride, refDC1, refDC2, (1<<(bitDepthY-1)) ); 7947 7983 assignBiSegDCs( piPred, uiPredStride, pbPattern, uiStride, refDC1, refDC2 ); 7984 7985 #if !NH_3D_VSO 7986 Distortion uiActDist = RDO_DIST_MAX; 7987 #else 7948 7988 Dist uiActDist = RDO_DIST_MAX; 7949 #if NH_3D_VSO7950 7989 if( m_pcRdCost->getUseVSO() ) 7951 7990 { -
branches/HTM-16.0-dev1/source/Lib/TLibEncoder/TEncSearch.h
r1386 r1394 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 -
branches/HTM-16.0-dev1/source/Lib/TLibEncoder/TEncSlice.cpp
r1386 r1394 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 -
branches/HTM-16.0-dev1/source/Lib/TLibEncoder/TEncTop.cpp
r1392 r1394 1666 1666 } 1667 1667 1668 rendererModel->setSingleModel( iModelNum, ppiShiftLUTLeft, ppiBaseShiftLUTLeft, ppiShiftLUTRight, ppiBaseShiftLUTRight, iDistToLeft, pcPicYuvOrgRef );1668 rendererModel->setSingleModel( iModelNum, ppiShiftLUTLeft, ppiBaseShiftLUTLeft, ppiShiftLUTRight, ppiBaseShiftLUTRight, iDistToLeft, pcPicYuvOrgRef, iEncViewSIdx ); 1669 1669 } 1670 1670 }
Note: See TracChangeset for help on using the changeset viewer.