Changeset 253 in 3DVCSoftware for branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon
- Timestamp:
- 4 Feb 2013, 02:57:15 (12 years ago)
- Location:
- branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComDataCU.cpp
r251 r253 3096 3096 } 3097 3097 3098 #if LGE_ILLUCOMP_DEPTH_C0046 3099 //This modification is not needed after integrating JCT3V-C0137 3100 Bool TComDataCU::isICFlagRequired(UInt uiAbsPartIdx, UInt uiDepth) 3101 { 3102 UInt uiPartAddr; 3103 UInt iNumbPart; 3104 3105 if(!getSlice()->getIsDepth()) 3106 { 3107 Int iWidth, iHeight; 3108 3109 iNumbPart = ( getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ? 1 : (getPartitionSize(uiAbsPartIdx) == SIZE_NxN ? 4 : 2) ); 3110 3111 for(UInt i = 0; i < iNumbPart; i++) 3112 { 3113 getPartIndexAndSize(i, uiPartAddr, iWidth, iHeight, uiAbsPartIdx, true); 3114 uiPartAddr += uiAbsPartIdx; 3115 3116 for(UInt uiRefIdx = 0; uiRefIdx < 2; uiRefIdx++) 3117 { 3118 RefPicList eRefList = uiRefIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0; 3119 Int iBestRefIdx = getCUMvField(eRefList)->getRefIdx(uiPartAddr); 3120 3121 if((getInterDir(uiPartAddr) & (uiRefIdx+1)) && iBestRefIdx >= 0 && getSlice()->getViewId() != getSlice()->getRefViewId(eRefList, iBestRefIdx)) 3122 { 3123 return true; 3124 } 3125 } 3126 } 3127 } 3128 else 3129 { 3130 iNumbPart = getPic()->getNumPartInCU() >> (uiDepth << 1); 3131 3132 for(UInt i = 0; i < iNumbPart; i++) 3133 { 3134 uiPartAddr = uiAbsPartIdx + i; 3135 3136 for(UInt uiRefIdx = 0; uiRefIdx < 2; uiRefIdx++) 3137 { 3138 RefPicList eRefList = uiRefIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0; 3139 Int iBestRefIdx = getCUMvField(eRefList)->getRefIdx(uiPartAddr); 3140 3141 if((getInterDir(uiPartAddr) & (uiRefIdx+1)) && iBestRefIdx >= 0 && getSlice()->getViewId() != getSlice()->getRefViewId(eRefList, iBestRefIdx)) 3142 { 3143 return true; 3144 } 3145 } 3146 } 3147 } 3148 3149 return false; 3150 } 3151 #else 3098 3152 Bool TComDataCU::isICFlagRequired(UInt uiAbsPartIdx) 3099 3153 { … … 3124 3178 return false; 3125 3179 } 3180 #endif 3126 3181 #endif 3127 3182 -
branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComDataCU.h
r251 r253 482 482 Void setICFlag ( UInt uiIdx, Bool uh ) { m_pbICFlag[uiIdx] = uh; } 483 483 Void setICFlagSubParts ( Bool bICFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 484 #if LGE_ILLUCOMP_DEPTH_C0046 485 Bool isICFlagRequired (UInt uiAbsPartIdx, UInt uiDepth); //This modification is not needed after integrating JCT3V-C0137 486 #else 484 487 Bool isICFlagRequired (UInt uiAbsPartIdx); 488 #endif 485 489 #endif 486 490 -
branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComPrediction.cpp
r251 r253 786 786 UInt uiRShift = ( bi ? 14-g_uiBitDepth-g_uiBitIncrement : 0 ); 787 787 UInt uiOffset = bi ? IF_INTERNAL_OFFS : 0; 788 #if LGE_ILLUCOMP_DEPTH_C0046 789 Bool bICFlag = pcCU->getICFlag(uiPartAddr) && (pcCU->getSlice()->getRefViewId( eRefPicList, iRefIdx ) != pcCU->getSlice()->getViewId()); 790 #endif 788 791 #if DEPTH_MAP_GENERATION 789 xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, 0, 0, rpcYuvPred, uiRShift, uiOffset ); 792 xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, 0, 0, rpcYuvPred, uiRShift, uiOffset 793 #if LGE_ILLUCOMP_DEPTH_C0046 794 , bICFlag 795 #endif 796 ); 790 797 #else 791 798 xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, uiRShift, uiOffset ); … … 889 896 Void 890 897 #if DEPTH_MAP_GENERATION 891 TComPrediction::xPredInterPrdDepthMap( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset ) 898 TComPrediction::xPredInterPrdDepthMap( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset 899 #if LGE_ILLUCOMP_DEPTH_C0046 900 , Bool bICFlag 901 #endif 902 ) 892 903 #else 893 904 TComPrediction::xPredInterPrdDepthMap( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset ) … … 941 952 } 942 953 } 954 955 #if LGE_ILLUCOMP_DEPTH_C0046 956 if(bICFlag) 957 { 958 Int a, b, iShift; 959 TComMv tTmpMV(pcMv->getHor()<<2, pcMv->getVer()<<2); 960 961 piRefY = pcPicYuvRef->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr ) + iRefOffset; 962 piDstY = rpcYuv->getLumaAddr( uiPartAddr ); 963 964 xGetLLSICPrediction(pcCU, &tTmpMV, pcPicYuvRef, a, b, iShift); 965 966 for( Int y = 0; y < iHeight; y++, piDstY += iDstStride, piRefY += iRefStride ) 967 { 968 for( Int x = 0; x < iWidth; x++ ) 969 { 970 if(uiOffset) 971 { 972 Int iIFshift = IF_INTERNAL_PREC - ( g_uiBitDepth + g_uiBitIncrement ); 973 piDstY[ x ] = ( (a*piDstY[ x ]+a*IF_INTERNAL_OFFS) >> iShift ) + b*(1<<iIFshift) - IF_INTERNAL_OFFS; 974 } 975 else 976 piDstY[ x ] = Clip( ( (a*piDstY[ x ]) >> iShift ) + b ); 977 } 978 } 979 } 980 #endif 943 981 } 944 982 … … 1704 1742 iCUPelX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]]; 1705 1743 iCUPelY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]]; 1744 #if FIX_LGE_ILLUCOMP_B0045 1745 iRefX = iCUPelX + (pMv->getHor() >> 2); 1746 iRefY = iCUPelY + (pMv->getVer() >> 2); 1747 #else 1706 1748 iRefX = iCUPelX + (pMv->getHor() >> 3); 1707 1749 iRefY = iCUPelY + (pMv->getVer() >> 3); 1750 #endif 1708 1751 uiWidth = pcCU->getWidth(0) >> 1; 1709 1752 uiHeight = pcCU->getHeight(0) >> 1; -
branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComPrediction.h
r251 r253 90 90 #if DEPTH_MAP_GENERATION 91 91 Void xPredInterBi ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap ); 92 Void xPredInterPrdDepthMap ( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset ); 92 Void xPredInterPrdDepthMap ( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset 93 #if LGE_ILLUCOMP_DEPTH_C0046 94 , Bool bICFlag = false 95 #endif 96 ); 93 97 #else 94 98 Void xPredInterBi ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvPred, Int iPartIdx ); -
branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComSlice.cpp
r210 r253 1382 1382 Int iRefStride = pcRefPicYuvOrg->getStride(); 1383 1383 Int iSumOrgSAD = 0; 1384 #if LGE_ILLUCOMP_DEPTH_C0046 1385 Double dThresholdOrgSAD = getIsDepth() ? 0.1 : 0.05; 1386 #else 1384 1387 double dThresholdOrgSAD = 0.05; 1388 #endif 1385 1389 // Histogram building - luminance 1386 1390 for ( Int y = 0; y < iHeight; y++) -
branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TypeDef.h
r251 r253 140 140 #if LGE_ILLUCOMP_B0045 141 141 #define LGE_ILLUCOMP_B0045_ENCSIMP 1 142 #define FIX_LGE_ILLUCOMP_B0045 1 143 #define LGE_ILLUCOMP_DEPTH_C0046 1 // JCT2-C0046 Apply illumination compensation to depth 142 144 #endif 143 145
Note: See TracChangeset for help on using the changeset viewer.