Changeset 287 in 3DVCSoftware for branches/HTM-5.1-dev0/source/Lib/TLibEncoder
- Timestamp:
- 17 Feb 2013, 01:49:33 (12 years ago)
- Location:
- branches/HTM-5.1-dev0/source/Lib/TLibEncoder
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
r280 r287 869 869 if (address==0) 870 870 { 871 if( pcSlice->getSPS()->getViewId() && !pcSlice->getIsDepth() ) 871 if( pcSlice->getSPS()->getViewId() 872 #if !LGE_ILLUCOMP_DEPTH_C0046 873 && !pcSlice->getIsDepth() 874 #endif 875 ) 872 876 { 873 877 WRITE_FLAG( pcSlice->getApplyIC() ? 1 : 0, "applying IC flag" ); -
branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp
r280 r287 458 458 Bool bIntraSliceDetect = (rpcBestCU->getSlice()->getSliceType() == I_SLICE); 459 459 460 #if HHI_QTLPC_RAU_OFF_C0160 461 Bool rapPic = (rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 462 #endif 463 460 464 Bool bTry2NxN = true; 461 465 Bool bTryNx2N = true; … … 494 498 495 499 #if LGE_ILLUCOMP_B0045 496 Bool bICEnabled = (!rpcTempCU->getSlice()->getIsDepth() && rpcTempCU->getSlice()->getViewId()); 500 Bool bICEnabled = ( 501 #if !LGE_ILLUCOMP_DEPTH_C0046 502 !rpcTempCU->getSlice()->getIsDepth() && 503 #endif 504 rpcTempCU->getSlice()->getViewId()); 497 505 498 506 bICEnabled = bICEnabled && rpcTempCU->getSlice()->getApplyIC(); … … 612 620 #if OL_QTLIMIT_PREDCODING_B0068 613 621 //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU 622 623 #if HHI_QTLPC_RAU_OFF_C0160 624 if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC()) 625 #else 614 626 if(depthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC()) 627 #endif 615 628 { 616 629 TComDataCU* pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() ); //Corresponding texture LCU … … 699 712 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 700 713 #endif 714 #if FIX_LGE_ILLUCOMP_B0045 715 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 716 #endif 701 717 #if HHI_INTERVIEW_SKIP 702 718 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec ); … … 724 740 725 741 #if OL_QTLIMIT_PREDCODING_B0068 742 743 #if HHI_QTLPC_RAU_OFF_C0160 744 if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC()) 745 #else 726 746 if(depthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC()) 747 #endif 727 748 { 728 749 bTrySplitDQP = bTrySplit; … … 836 857 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 837 858 #endif 859 #if FIX_LGE_ILLUCOMP_B0045 860 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 861 #endif 838 862 #if HHI_INTERVIEW_SKIP 839 863 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N, bFullyRenderedSec ); … … 860 884 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 861 885 #endif 886 #if FIX_LGE_ILLUCOMP_B0045 887 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 888 #endif 862 889 #if HHI_INTERVIEW_SKIP 863 890 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxN, bFullyRenderedSec ); … … 903 930 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 904 931 #endif 932 #if FIX_LGE_ILLUCOMP_B0045 933 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 934 #endif 905 935 #if HHI_INTERVIEW_SKIP 906 936 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec ); … … 919 949 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 920 950 #endif 951 #if FIX_LGE_ILLUCOMP_B0045 952 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 953 #endif 921 954 #if HHI_INTERVIEW_SKIP 922 955 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec ); … … 946 979 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 947 980 #endif 981 #if FIX_LGE_ILLUCOMP_B0045 982 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 983 #endif 948 984 #if HHI_INTERVIEW_SKIP 949 985 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec, true ); … … 962 998 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 963 999 #endif 1000 #if FIX_LGE_ILLUCOMP_B0045 1001 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 1002 #endif 964 1003 #if HHI_INTERVIEW_SKIP 965 1004 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec, true ); … … 991 1030 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 992 1031 #endif 1032 #if FIX_LGE_ILLUCOMP_B0045 1033 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 1034 #endif 993 1035 #if HHI_INTERVIEW_SKIP 994 1036 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec ); … … 1007 1049 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1008 1050 #endif 1051 #if FIX_LGE_ILLUCOMP_B0045 1052 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 1053 #endif 1009 1054 #if HHI_INTERVIEW_SKIP 1010 1055 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec ); … … 1029 1074 #if HHI_INTER_VIEW_RESIDUAL_PRED 1030 1075 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1076 #endif 1077 #if FIX_LGE_ILLUCOMP_B0045 1078 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 1031 1079 #endif 1032 1080 #if HHI_INTERVIEW_SKIP … … 1046 1094 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1047 1095 #endif 1096 #if FIX_LGE_ILLUCOMP_B0045 1097 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 1098 #endif 1048 1099 #if HHI_INTERVIEW_SKIP 1049 1100 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec, true ); … … 1113 1164 1114 1165 // do normal intra modes 1115 if ( !bEarlySkip ) 1166 if ( !bEarlySkip 1167 #if HHI_DEPTH_INTRA_SEARCH_RAU_C0160 1168 || ((rpcBestCU->getSlice()->getIsDepth() == true) && (rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA)) 1169 #endif 1170 ) 1116 1171 { 1117 1172 // speedup for inter frames … … 1120 1175 rpcBestCU->getCbf( 0, TEXT_LUMA ) != 0 || 1121 1176 rpcBestCU->getCbf( 0, TEXT_CHROMA_U ) != 0 || 1122 rpcBestCU->getCbf( 0, TEXT_CHROMA_V ) != 0 ) && !bFullyRenderedSec ) // avoid very complex intra if it is unlikely 1177 rpcBestCU->getCbf( 0, TEXT_CHROMA_V ) != 0 1178 #if HHI_DEPTH_INTRA_SEARCH_RAU_C0160 1179 || ((rpcBestCU->getSlice()->getIsDepth() == true) && (rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA)) 1180 #endif 1181 ) && !bFullyRenderedSec ) // avoid very complex intra if it is unlikely 1123 1182 #else 1124 1183 if( rpcBestCU->getSlice()->getSliceType() == I_SLICE || 1125 1184 rpcBestCU->getCbf( 0, TEXT_LUMA ) != 0 || 1126 1185 rpcBestCU->getCbf( 0, TEXT_CHROMA_U ) != 0 || 1127 rpcBestCU->getCbf( 0, TEXT_CHROMA_V ) != 0 ) // avoid very complex intra if it is unlikely 1186 rpcBestCU->getCbf( 0, TEXT_CHROMA_V ) != 0 1187 #if HHI_DEPTH_INTRA_SEARCH_RAU_C0160 1188 || ((rpcBestCU->getSlice()->getIsDepth() == true) && (rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA)) 1189 #endif 1190 ) // avoid very complex intra if it is unlikely 1128 1191 #endif 1129 1192 { … … 1178 1241 if( rpcBestCU->getSlice()->getSPS()->getUseMVI() && rpcBestCU->getSlice()->getSliceType() != I_SLICE ) 1179 1242 { 1243 #if LGE_ILLUCOMP_DEPTH_C0046 1244 for(UInt uiICId = 0; uiICId < (bICEnabled ? 2 : 1); uiICId++) 1245 { 1246 Bool bICFlag = (uiICId ? true : false); 1247 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 1248 #endif 1180 1249 xCheckRDCostMvInheritance( rpcBestCU, rpcTempCU, uiDepth, false, false ); 1181 1250 rpcTempCU->initEstData( uiDepth, iQP ); 1251 #if FIX_ILLUCOMP_DEPTH 1252 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 1253 #endif 1182 1254 xCheckRDCostMvInheritance( rpcBestCU, rpcTempCU, uiDepth, true, false ); 1183 1255 rpcTempCU->initEstData( uiDepth, iQP ); 1256 #if LGE_ILLUCOMP_DEPTH_C0046 1257 } 1258 #endif 1184 1259 } 1185 1260 #endif … … 1738 1813 { 1739 1814 m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 ); 1815 #if LGE_ILLUCOMP_DEPTH_C0046 1816 m_pcEntropyCoder->encodeICFlag ( pcCU, uiAbsPartIdx, false, uiDepth ); 1817 #endif 1740 1818 finishCU(pcCU,uiAbsPartIdx,uiDepth); 1741 1819 xRestoreDepthWidthHeight( pcCU ); … … 1749 1827 // prediction Info ( Intra : direction mode, Inter : Mv, reference idx ) 1750 1828 m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx ); 1829 #if LGE_ILLUCOMP_DEPTH_C0046 1830 m_pcEntropyCoder->encodeICFlag ( pcCU, uiAbsPartIdx, false, uiDepth ); 1831 #endif 1751 1832 xRestoreDepthWidthHeight( pcCU ); 1752 1833 } … … 1797 1878 m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 ); 1798 1879 #if LGE_ILLUCOMP_B0045 1799 m_pcEntropyCoder->encodeICFlag ( pcCU, uiAbsPartIdx ); 1880 m_pcEntropyCoder->encodeICFlag ( pcCU, uiAbsPartIdx 1881 #if LGE_ILLUCOMP_DEPTH_C0046 1882 , false, uiDepth 1883 #endif 1884 ); 1800 1885 #endif 1801 1886 #if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138 … … 1828 1913 m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx ); 1829 1914 #if LGE_ILLUCOMP_B0045 1830 m_pcEntropyCoder->encodeICFlag ( pcCU, uiAbsPartIdx ); 1915 m_pcEntropyCoder->encodeICFlag ( pcCU, uiAbsPartIdx 1916 #if LGE_ILLUCOMP_DEPTH_C0046 1917 ,false, uiDepth 1918 #endif 1919 ); 1831 1920 #endif 1832 1921 #if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138 … … 2943 3032 m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, 0, true ); 2944 3033 #if LGE_ILLUCOMP_B0045 2945 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true ); 3034 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true 3035 #if LGE_ILLUCOMP_DEPTH_C0046 3036 , uhDepth 3037 #endif 3038 ); 2946 3039 #endif 2947 3040 } … … 2953 3046 m_pcEntropyCoder->encodePredInfo( pcCU, 0, true ); 2954 3047 #if LGE_ILLUCOMP_B0045 2955 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true ); 3048 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true 3049 #if LGE_ILLUCOMP_DEPTH_C0046 3050 , uhDepth 3051 #endif 3052 ); 2956 3053 #endif 2957 3054 } -
branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp
r280 r287 170 170 171 171 #if LGE_ILLUCOMP_B0045 172 Void TEncEntropy::encodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 173 { 174 if (pcCU->isIntra(uiAbsPartIdx) || (pcCU->getSlice()->getViewId() == 0) || pcCU->getSlice()->getSPS()->isDepth()) 172 Void TEncEntropy::encodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD 173 #if LGE_ILLUCOMP_DEPTH_C0046 174 , UInt uiDepth 175 #endif 176 ) 177 { 178 if (pcCU->isIntra(uiAbsPartIdx) || (pcCU->getSlice()->getViewId() == 0) 179 #if !LGE_ILLUCOMP_DEPTH_C0046 180 || pcCU->getSlice()->getSPS()->isDepth() 181 #endif 182 ) 175 183 { 176 184 return; … … 185 193 } 186 194 187 if(pcCU->isICFlagRequired(uiAbsPartIdx)) 195 if(pcCU->isICFlagRequired(uiAbsPartIdx 196 #if LGE_ILLUCOMP_DEPTH_C0046 197 , uiDepth //This modification is not needed after integrating JCT3V-C0137 198 #endif 199 )) 188 200 m_pcEntropyCoderIf->codeICFlag( pcCU, uiAbsPartIdx ); 189 201 } -
branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncEntropy.h
r280 r287 260 260 Void encodeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool bRD = false ); 261 261 #if LGE_ILLUCOMP_B0045 262 Void encodeICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 262 Void encodeICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false 263 #if LGE_ILLUCOMP_DEPTH_C0046 264 , UInt uiDepth = 0 265 #endif 266 ); 263 267 #endif 264 268 Void encodeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); -
branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSbac.cpp
r280 r287 625 625 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 626 626 627 #if HHI_QTLPC_RAU_OFF_C0160 628 Bool rapPic = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 629 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag()) 630 #else 627 631 if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag()) 632 #endif 628 633 { 629 634 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); … … 924 929 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 925 930 931 #if HHI_QTLPC_RAU_OFF_C0160 932 Bool rapPic = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 933 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag()) 934 #else 926 935 if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag()) 936 #endif 927 937 { 928 938 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); … … 1086 1096 1087 1097 if( uiDir == DMM_WEDGE_PREDTEX_D_IDX ) { xCodeWedgePredTexDeltaInfo ( pcCU, uiAbsPartIdx ); } 1098 #if LGE_DMM3_SIMP_C0044 1099 if( uiDir == DMM_WEDGE_PREDTEX_IDX ) { xCodeWedgePredTexInfo ( pcCU, uiAbsPartIdx ); } 1100 #endif 1088 1101 if( uiDir == DMM_CONTOUR_PREDTEX_D_IDX ) { xCodeContourPredTexDeltaInfo( pcCU, uiAbsPartIdx ); } 1089 1102 #endif … … 2673 2686 #endif 2674 2687 #if HHI_DMM_PRED_TEX 2688 #if LGE_DMM3_SIMP_C0044 2689 Void TEncSbac::xCodeWedgePredTexInfo( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2690 { 2691 Int iIntraIdx = pcCU->getIntraSizeIdx(uiAbsPartIdx); 2692 Int iBits = g_aucWedgeTexPredBitsListIdx[iIntraIdx]; 2693 2694 UInt uiTabIdx = pcCU->getWedgePredTexIntraTabIdx( uiAbsPartIdx ); 2695 2696 for ( Int i = 0; i < iBits; i++ ) 2697 { 2698 m_pcBinIf->encodeBin( ( uiTabIdx >> i ) & 1, m_cDmmDataSCModel.get(0, 0, 3) ); 2699 } 2700 } 2701 #endif 2702 2675 2703 Void TEncSbac::xCodeWedgePredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2676 2704 { 2705 #if LGE_DMM3_SIMP_C0044 2706 xCodeWedgePredTexInfo( pcCU, uiAbsPartIdx ); 2707 #endif 2677 2708 Int iDeltaDC1 = pcCU->getWedgePredTexDeltaDC1( uiAbsPartIdx ); 2678 2709 Int iDeltaDC2 = pcCU->getWedgePredTexDeltaDC2( uiAbsPartIdx ); -
branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSbac.h
r280 r287 178 178 #endif 179 179 #if HHI_DMM_PRED_TEX 180 #if LGE_DMM3_SIMP_C0044 181 Void xCodeWedgePredTexInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 182 #endif 180 183 Void xCodeWedgePredTexDeltaInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 181 184 Void xCodeContourPredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx ); -
branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
r280 r287 2253 2253 Int iTexDeltaDC1 = 0; 2254 2254 Int iTexDeltaDC2 = 0; 2255 #if LGE_DMM3_SIMP_C0044 2256 UInt uiTexIntraIdx = 0; 2257 findWedgeTexMinDist( pcCU, uiPartOffset, piOrg, piPred, uiStride, uiWidth, uiHeight, uiTexTabIdx, iTexDeltaDC1, iTexDeltaDC2, bAboveAvail, bLeftAvail, uiTexIntraIdx); 2258 pcCU->setWedgePredTexIntraTabIdxSubParts( uiTexIntraIdx, uiPartOffset, uiDepth + uiInitTrDepth ); 2259 #else 2255 2260 findWedgeTexMinDist( pcCU, uiPartOffset, piOrg, piPred, uiStride, uiWidth, uiHeight, uiTexTabIdx, iTexDeltaDC1, iTexDeltaDC2, bAboveAvail, bLeftAvail ); 2261 #endif 2256 2262 pcCU->setWedgePredTexTabIdxSubParts ( uiTexTabIdx, uiPartOffset, uiDepth + uiInitTrDepth ); 2257 2263 pcCU->setWedgePredTexDeltaDC1SubParts( iTexDeltaDC1, uiPartOffset, uiDepth + uiInitTrDepth ); … … 2345 2351 for( UInt uiSDC=0; uiSDC<=uiUseSDC; uiSDC++ ) 2346 2352 { 2353 #if FIX_SDC_ENC_C0143 2354 for( UInt uiRes = 0; uiRes<=uiSDC; uiRes++ ) 2355 #else 2347 2356 for( UInt uiRes = 0; uiRes<=uiUseSDC; uiRes++ ) 2357 #endif 2348 2358 { 2349 2359 #endif … … 4926 4936 m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, 0, true ); 4927 4937 #if LGE_ILLUCOMP_B0045 4928 m_pcEntropyCoder->encodeICFlag(pcCU, 0, true); 4938 m_pcEntropyCoder->encodeICFlag(pcCU, 0, true 4939 #if FIX_ILLUCOMP_DEPTH 4940 , pcCU->getDepth( 0 ) 4941 #endif 4942 ); 4929 4943 #endif 4930 4944 #if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138 … … 6309 6323 m_pcEntropyCoder->encodeMergeIndex(pcCU, 0, 0, true); 6310 6324 #if LGE_ILLUCOMP_B0045 6311 m_pcEntropyCoder->encodeICFlag(pcCU, 0, true); 6325 m_pcEntropyCoder->encodeICFlag(pcCU, 0, true 6326 #if FIX_ILLUCOMP_DEPTH 6327 , pcCU->getDepth( 0 ) 6328 #endif 6329 ); 6312 6330 #endif 6313 6331 #if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138 … … 6332 6350 m_pcEntropyCoder->encodePredInfo( pcCU, 0, true ); 6333 6351 #if LGE_ILLUCOMP_B0045 6334 m_pcEntropyCoder->encodeICFlag(pcCU, 0, true); 6352 m_pcEntropyCoder->encodeICFlag(pcCU, 0, true 6353 #if FIX_ILLUCOMP_DEPTH 6354 , pcCU->getDepth( 0 ) 6355 #endif 6356 ); 6335 6357 #endif 6336 6358 #if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138 … … 6671 6693 Int iFullDeltaDC2 = riDeltaDC2; 6672 6694 6695 #if HHI_DMM_DELTADC_Q1_C0034 6696 #else 6673 6697 xDeltaDCQuantScaleDown( pcCU, iFullDeltaDC1 ); 6674 6698 xDeltaDCQuantScaleDown( pcCU, iFullDeltaDC2 ); 6699 #endif 6675 6700 6676 6701 Dist uiBestDist = RDO_DIST_MAX; … … 6685 6710 uiDeltaDC2Max += (uiDeltaDC2Max>>1); 6686 6711 6712 #if HHI_DMM_DELTADC_Q1_C0034 6713 // limit search range to [0, IBDI_MAX] 6714 if( iFullDeltaDC1 < 0 && uiDeltaDC1Max > abs(iPredDC1) ) { uiDeltaDC1Max = abs(iPredDC1); } 6715 if( iFullDeltaDC1 >= 0 && uiDeltaDC1Max > g_uiIBDI_MAX - abs(iPredDC1) ) { uiDeltaDC1Max = g_uiIBDI_MAX - abs(iPredDC1); } 6716 6717 if( iFullDeltaDC2 < 0 && uiDeltaDC2Max > abs(iPredDC2) ) { uiDeltaDC2Max = abs(iPredDC2); } 6718 if( iFullDeltaDC2 >= 0 && uiDeltaDC2Max > g_uiIBDI_MAX - abs(iPredDC2) ) { uiDeltaDC2Max = g_uiIBDI_MAX - abs(iPredDC2); } 6719 6720 // init dist with original DCs 6721 assignWedgeDCs2Pred( pcWedgelet, piPredic, uiStride, iDC1, iDC2 ); 6722 6723 Dist uiOrgDist = RDO_DIST_MAX; 6724 #if SAIT_VSO_EST_A0033 6725 if ( m_pcRdCost->getUseEstimatedVSD() ) 6726 { 6727 TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv(); 6728 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6729 uiOrgDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight ); 6730 #if LGE_WVSO_A0119 6731 if ( m_pcRdCost->getUseWVSO() ) 6732 { 6733 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6734 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 6735 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6736 uiOrgDist = (iDWeight * iD + iVSDWeight * (Dist) uiOrgDist) / ( iDWeight + iVSDWeight); 6737 } 6738 #endif // LGE_WVSO_A0119 6739 } 6740 else 6741 #endif // SAIT_VSO_EST_A0033 6742 { 6743 uiOrgDist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, 0 ); 6744 #if LGE_WVSO_A0119 6745 if ( m_pcRdCost->getUseWVSO() ) 6746 { 6747 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6748 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 6749 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6750 uiOrgDist = (iDWeight * iD + iVSOWeight * (Dist) uiOrgDist) / ( iDWeight + iVSOWeight); 6751 } 6752 #endif // LGE_WVSO_A0119 6753 } 6754 uiBestDist = uiOrgDist; 6755 uiBestQStepDC1 = abs(iFullDeltaDC1); 6756 uiBestQStepDC2 = abs(iFullDeltaDC2); 6757 6758 // coarse search with step size 4 6759 for( UInt uiQStepDC1 = 0; uiQStepDC1 < uiDeltaDC1Max; uiQStepDC1 += 4 ) 6760 { 6761 Int iTestDC1 = Clip( iPredDC1 + ((Int)(uiQStepDC1) * (Int)(( iFullDeltaDC1 < 0 ) ? -1 : 1)) ); 6762 for( UInt uiQStepDC2 = 0; uiQStepDC2 < uiDeltaDC2Max; uiQStepDC2 += 4 ) 6763 { 6764 Int iTestDC2 = Clip( iPredDC2 + ((Int)(uiQStepDC2) * (Int)(( iFullDeltaDC2 < 0 ) ? -1 : 1)) ); 6765 6766 assignWedgeDCs2Pred( pcWedgelet, piPredic, uiStride, iTestDC1, iTestDC2 ); 6767 6768 Dist uiAct4Dist = RDO_DIST_MAX; 6769 #if SAIT_VSO_EST_A0033 6770 if ( m_pcRdCost->getUseEstimatedVSD() ) 6771 { 6772 TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv(); 6773 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6774 uiAct4Dist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight ); 6775 #if LGE_WVSO_A0119 6776 if ( m_pcRdCost->getUseWVSO() ) 6777 { 6778 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6779 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 6780 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6781 uiAct4Dist = (iDWeight * iD + iVSDWeight * (Dist) uiAct4Dist) / ( iDWeight + iVSDWeight); 6782 } 6783 #endif // LGE_WVSO_A0119 6784 } 6785 else 6786 #endif // SAIT_VSO_EST_A0033 6787 { 6788 uiAct4Dist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, 0 ); 6789 #if LGE_WVSO_A0119 6790 if ( m_pcRdCost->getUseWVSO() ) 6791 { 6792 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6793 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 6794 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6795 uiAct4Dist = (iDWeight * iD + iVSOWeight * (Dist) uiAct4Dist) / ( iDWeight + iVSOWeight); 6796 } 6797 #endif // LGE_WVSO_A0119 6798 } 6799 6800 if( uiAct4Dist < uiBestDist || uiBestDist == RDO_DIST_MAX ) 6801 { 6802 uiBestDist = uiAct4Dist; 6803 uiBestQStepDC1 = uiQStepDC1; 6804 uiBestQStepDC2 = uiQStepDC2; 6805 } 6806 } 6807 } 6808 6809 // refinement +-3 6810 for( UInt uiQStepDC1 = (UInt)max(0, ((Int)uiBestQStepDC1-3)); uiQStepDC1 <= (uiBestQStepDC1+3); uiQStepDC1++ ) 6811 { 6812 Int iTestDC1 = Clip( iPredDC1 + ((Int)(uiQStepDC1) * (Int)(( iFullDeltaDC1 < 0 ) ? -1 : 1)) ); 6813 for( UInt uiQStepDC2 = (UInt)max(0, ((Int)uiBestQStepDC2-3)); uiQStepDC2 <= (uiBestQStepDC2+3); uiQStepDC2++ ) 6814 { 6815 Int iTestDC2 = Clip( iPredDC2 + ((Int)(uiQStepDC2) * (Int)(( iFullDeltaDC2 < 0 ) ? -1 : 1)) ); 6816 6817 assignWedgeDCs2Pred( pcWedgelet, piPredic, uiStride, iTestDC1, iTestDC2 ); 6818 6819 Dist uiActDist = RDO_DIST_MAX; 6820 #if SAIT_VSO_EST_A0033 6821 if ( m_pcRdCost->getUseEstimatedVSD() ) 6822 { 6823 TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv(); 6824 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6825 uiActDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight ); 6826 #if LGE_WVSO_A0119 6827 if ( m_pcRdCost->getUseWVSO() ) 6828 { 6829 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6830 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 6831 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6832 uiActDist = (iDWeight * iD + iVSDWeight * (Dist) uiActDist) / ( iDWeight + iVSDWeight); 6833 } 6834 #endif // LGE_WVSO_A0119 6835 } 6836 else 6837 #endif // SAIT_VSO_EST_A0033 6838 { 6839 uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, 0 ); 6840 #if LGE_WVSO_A0119 6841 if ( m_pcRdCost->getUseWVSO() ) 6842 { 6843 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6844 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 6845 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6846 uiActDist = (iDWeight * iD + iVSOWeight * (Dist) uiActDist) / ( iDWeight + iVSOWeight); 6847 } 6848 #endif // LGE_WVSO_A0119 6849 } 6850 6851 if( uiActDist < uiBestDist || uiBestDist == RDO_DIST_MAX ) 6852 { 6853 uiBestDist = uiActDist; 6854 uiBestQStepDC1 = uiQStepDC1; 6855 uiBestQStepDC2 = uiQStepDC2; 6856 } 6857 } 6858 } 6859 #else 6687 6860 for( UInt uiQStepDC1 = 1; uiQStepDC1 <= uiDeltaDC1Max; uiQStepDC1++ ) 6688 6861 { … … 6740 6913 } 6741 6914 } 6742 6915 #endif 6743 6916 iFullDeltaDC1 = (Int)(uiBestQStepDC1) * (Int)(( iFullDeltaDC1 < 0 ) ? -1 : 1); 6744 6917 iFullDeltaDC2 = (Int)(uiBestQStepDC2) * (Int)(( iFullDeltaDC2 < 0 ) ? -1 : 1); 6918 #if HHI_DMM_DELTADC_Q1_C0034 6919 #else 6745 6920 xDeltaDCQuantScaleUp( pcCU, iFullDeltaDC1 ); 6746 6921 xDeltaDCQuantScaleUp( pcCU, iFullDeltaDC2 ); 6922 #endif 6747 6923 riDeltaDC1 = iFullDeltaDC1; 6748 6924 riDeltaDC2 = iFullDeltaDC2; … … 6750 6926 #endif 6751 6927 6928 #if HHI_DMM_DELTADC_Q1_C0034 6929 #else 6752 6930 xDeltaDCQuantScaleDown( pcCU, riDeltaDC1 ); 6753 6931 xDeltaDCQuantScaleDown( pcCU, riDeltaDC2 ); 6932 #endif 6754 6933 } 6755 6934 #endif … … 7111 7290 Int& riDeltaDC2, 7112 7291 Bool bAboveAvail, 7113 Bool bLeftAvail ) 7292 Bool bLeftAvail 7293 #if LGE_DMM3_SIMP_C0044 7294 ,UInt& ruiIntraTabIdx 7295 #endif 7296 ) 7114 7297 { 7115 7298 assert( uiWidth >= DMM_WEDGEMODEL_MIN_SIZE && uiWidth <= DMM_WEDGEMODEL_MAX_SIZE ); 7116 7299 WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])]; 7117 7300 7301 #if LGE_DMM3_SIMP_C0044 7302 ruiTabIdx = getBestWedgeFromTex( pcCU, uiAbsPtIdx, uiWidth, uiHeight, piOrig, uiStride, ruiIntraTabIdx ); 7303 #else 7118 7304 ruiTabIdx = getBestWedgeFromTex( pcCU, uiAbsPtIdx, uiWidth, uiHeight ); 7305 #endif 7119 7306 7120 7307 TComWedgelet* pcBestWedgelet = &(pacWedgeList->at(ruiTabIdx)); … … 8261 8448 Int iSumPix[2]; 8262 8449 memset(iSumPix, 0, sizeof(Int)*2); 8263 8450 #if HS_REFERENCE_SUBSAMPLE_C0154 8451 Int subSamplePix; 8452 if ( uiSize == 64 || uiSize == 32 ) 8453 { 8454 subSamplePix = 2; 8455 } 8456 else 8457 { 8458 subSamplePix = 1; 8459 } 8460 for (Int y=0; y<uiSize; y+=subSamplePix) 8461 { 8462 for (Int x=0; x<uiSize; x+=subSamplePix) 8463 { 8464 UChar ucSegment = pMask?(UChar)pMask[x]:0; 8465 assert( ucSegment < uiNumSegments ); 8466 8467 iSumDepth[ucSegment] += pOrig[x]; 8468 iSumPix[ucSegment] += 1; 8469 } 8470 8471 pOrig += uiStride*subSamplePix; 8472 pMask += uiMaskStride*subSamplePix; 8473 } 8474 #else 8264 8475 for (Int y=0; y<uiSize; y++) 8265 8476 { … … 8276 8487 pMask += uiMaskStride; 8277 8488 } 8278 8489 #endif 8279 8490 // compute mean for each segment 8280 8491 for( UChar ucSeg = 0; ucSeg < uiNumSegments; ucSeg++ ) -
branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSearch.h
r280 r287 435 435 Int& riDeltaDC2, 436 436 Bool bAboveAvail, 437 Bool bLeftAvail ); 437 Bool bLeftAvail 438 #if LGE_DMM3_SIMP_C0044 439 ,UInt& ruiIntraTabIdx 440 #endif 441 ); 438 442 Void findContourPredTex ( TComDataCU* pcCU, 439 443 UInt uiAbsPtIdx, -
branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSlice.cpp
r280 r287 776 776 777 777 #if LGE_ILLUCOMP_B0045 778 if (pcEncTop->getViewId() != 0 && !pcEncTop->isDepthCoder() && pcEncTop->getUseIC()) // DCP of ViewID 0 is not available 778 if (pcEncTop->getViewId() != 0 779 #if !LGE_ILLUCOMP_DEPTH_C0046 780 && !pcEncTop->isDepthCoder() 781 #endif 782 && pcEncTop->getUseIC()) // DCP of ViewID 0 is not available 779 783 { 780 784 pcSlice ->xSetApplyIC();
Note: See TracChangeset for help on using the changeset viewer.