Changeset 1001 in 3DVCSoftware for branches/HTM-11.2-dev3-Sharp/source/Lib/TLibEncoder
- Timestamp:
- 18 Jul 2014, 06:18:17 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-11.2-dev3-Sharp/source/Lib/TLibEncoder/TEncSearch.cpp
r994 r1001 1970 1970 UInt dimType = getDimType ( uiLumaPredMode ); 1971 1971 UInt patternID = pcCU->getDmmWedgeTabIdx(dimType, uiAbsPartIdx); 1972 #if SHARP_DMM1_I0110 1973 UInt uiBaseWidth = pcCU->isDMM1UpscaleMode(uiWidth) ? pcCU->getDMM1BasePatternWidth(uiWidth) : uiWidth; 1974 if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiBaseWidth]].size() && dimType == DMM1_IDX ) 1975 #else 1972 1976 if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiWidth]].size() && dimType == DMM1_IDX ) 1973 { 1977 #endif 1978 { 1979 #if SHARP_DMM1_I0110 1980 if (g_aucConvertToBit[uiBaseWidth] == 2) // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used. 1981 #else 1974 1982 if (g_aucConvertToBit[uiWidth] == 2) // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used. 1983 #endif 1975 1984 { 1976 1985 patternID = 1349; // Split 32x32 to 16x16. 1349: Maximum DMM1 pattern number when block size is 16x16 … … 2034 2043 Int uiTabIdx = pcCU->getDmmWedgeTabIdx(DMM1_IDX, uiAbsPartIdx); 2035 2044 2045 #if SHARP_DMM1_I0110 2046 WedgeList* pacWedgeList = pcCU->isDMM1UpscaleMode( uiWidth ) ? &g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] : &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])]; 2047 #else 2036 2048 WedgeList* pacWedgeList = &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])]; 2049 #endif 2037 2050 TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx )); 2038 2051 2039 2052 uiNumSegments = 2; 2053 #if SHARP_DMM1_I0110 2054 pbMask = pcCU->isDMM1UpscaleMode( uiWidth ) ? pcWedgelet->getScaledPattern( uiWidth ) : pcWedgelet->getPattern(); 2055 uiMaskStride = pcCU->isDMM1UpscaleMode( uiWidth ) ? uiWidth : pcWedgelet->getStride(); 2056 #else 2040 2057 pbMask = pcWedgelet->getPattern(); 2041 2058 uiMaskStride = pcWedgelet->getStride(); 2059 #endif 2042 2060 } 2043 2061 if( getDimType( uiLumaPredMode ) == DMM4_IDX ) … … 3138 3156 xSearchDmm1Wedge( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight, uiTabIdx ); 3139 3157 pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dmmType, uiPartOffset, uiDepth + uiInitTrDepth ); 3158 #if SHARP_DMM1_I0110 3159 biSegmentation = pcCU->isDMM1UpscaleMode( uiWidth ) ? 3160 &(g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])][uiTabIdx]) : &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiTabIdx]); 3161 #else 3140 3162 biSegmentation = &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiTabIdx]); 3163 #endif 3141 3164 } break; 3142 3165 … … 3153 3176 if( biSegmentation ) 3154 3177 { 3178 #if SHARP_DMM1_I0110 3179 if( dmmType == DMM1_IDX && pcCU->isDMM1UpscaleMode( uiWidth ) ){ 3180 xSearchDmmDeltaDCs( pcCU, uiPartOffset, piOrg, piPred, uiStride, biSegmentation->getScaledPattern(uiWidth), uiWidth, uiWidth, uiHeight, deltaDC1, deltaDC2 ); 3181 } 3182 else 3183 { 3184 xSearchDmmDeltaDCs( pcCU, uiPartOffset, piOrg, piPred, uiStride, biSegmentation->getPattern(), biSegmentation->getStride(), uiWidth, uiHeight, deltaDC1, deltaDC2 ); 3185 } 3186 #else 3155 3187 xSearchDmmDeltaDCs( pcCU, uiPartOffset, piOrg, piPred, uiStride, biSegmentation->getPattern(), biSegmentation->getStride(), uiWidth, uiHeight, deltaDC1, deltaDC2 ); 3188 #endif 3156 3189 pcCU->setDimDeltaDC( dmmType, 0, uiPartOffset, deltaDC1 ); 3157 3190 pcCU->setDimDeltaDC( dmmType, 1, uiPartOffset, deltaDC2 ); … … 7679 7712 7680 7713 Pel refDC1 = 0; Pel refDC2 = 0; 7714 #if SHARP_DMM1_I0110 7715 WedgeList* pacWedgeList = pcCU->isDMM1UpscaleMode( uiWidth ) ? &g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] : &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])]; 7716 WedgeNodeList* pacWedgeNodeList = pcCU->isDMM1UpscaleMode( uiWidth ) ? &g_dmmWedgeNodeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] : &g_dmmWedgeNodeLists[(g_aucConvertToBit[uiWidth])]; 7717 #else 7681 7718 WedgeList* pacWedgeList = &g_dmmWedgeLists [(g_aucConvertToBit[uiWidth])]; 7682 7719 WedgeNodeList* pacWedgeNodeList = &g_dmmWedgeNodeLists[(g_aucConvertToBit[uiWidth])]; 7720 #endif 7683 7721 7684 7722 // coarse wedge search … … 7688 7726 { 7689 7727 TComWedgelet* pcWedgelet = &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx())); 7728 #if SHARP_DMM1_I0110 7729 Bool *pbPattern = pcCU->isDMM1UpscaleMode(uiWidth) ? pcWedgelet->getScaledPattern(uiWidth) : pcWedgelet->getPattern(); 7730 UInt uiStride = pcCU->isDMM1UpscaleMode(uiWidth) ? uiWidth : pcWedgelet->getStride(); 7731 xCalcBiSegDCs ( piRef, uiRefStride, pbPattern, uiStride, refDC1, refDC2 ); 7732 xAssignBiSegDCs( piPred, uiPredStride, pbPattern, uiStride, refDC1, refDC2 ); 7733 #else 7690 7734 xCalcBiSegDCs ( piRef, uiRefStride, pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 ); 7691 7735 xAssignBiSegDCs( piPred, uiPredStride, pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 ); 7736 #endif 7692 7737 7693 7738 Dist uiActDist = RDO_DIST_MAX; … … 7725 7770 { 7726 7771 TComWedgelet* pcWedgelet = &(pacWedgeList->at(pacWedgeNodeList->at(uiBestNodeId).getRefineIdx( uiRefId ))); 7772 #if SHARP_DMM1_I0110 7773 Bool *pbPattern = pcCU->isDMM1UpscaleMode(uiWidth) ? pcWedgelet->getScaledPattern(uiWidth) : pcWedgelet->getPattern(); 7774 UInt uiStride = pcCU->isDMM1UpscaleMode(uiWidth) ? uiWidth : pcWedgelet->getStride(); 7775 xCalcBiSegDCs ( piRef, uiRefStride, pbPattern, uiStride, refDC1, refDC2 ); 7776 xAssignBiSegDCs( piPred, uiPredStride, pbPattern, uiStride, refDC1, refDC2 ); 7777 #else 7727 7778 xCalcBiSegDCs ( piRef, uiRefStride, pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 ); 7728 7779 xAssignBiSegDCs( piPred, uiPredStride, pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 ); 7729 7780 #endif 7730 7781 Dist uiActDist = RDO_DIST_MAX; 7731 7782 #if H_3D_VSO
Note: See TracChangeset for help on using the changeset viewer.