Changeset 879 in 3DVCSoftware
- Timestamp:
- 27 Mar 2014, 22:31:12 (11 years ago)
- Location:
- branches/HTM-10.1-dev0/source/Lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComPrediction.cpp
r878 r879 2472 2472 if( bL == bT ) 2473 2473 { 2474 #if SCU_HS_DEPTH_DC_PRED_G01432475 2474 const Int iTRR = ( patternStride * 2 - 1 ) - srcStride; 2476 2475 const Int iLBB = ( patternStride * 2 - 1 ) * srcStride - 1; 2477 2476 refDC1 = bL ? ( ptrSrc[iTR] + ptrSrc[iLB] )>>1 : (abs(ptrSrc[iTRR] - ptrSrc[-(Int)srcStride]) > abs(ptrSrc[iLBB] - ptrSrc[ -1]) ? ptrSrc[iTRR] : ptrSrc[iLBB]); 2478 #else2479 refDC1 = bL ? ( ptrSrc[iTR] + ptrSrc[iLB] )>>1 : 1<<( g_bitDepthY - 1 );2480 #endif2481 2477 refDC2 = ( ptrSrc[ -1] + ptrSrc[-(Int)srcStride] )>>1; 2482 2478 } -
branches/HTM-10.1-dev0/source/Lib/TLibCommon/TypeDef.h
r878 r879 185 185 // Unify intra SDC and inter SDC 186 186 // QC_GENERIC_SDC_G0122 Generalize SDC to all depth intra modes 187 // SCU_HS_DEPTH_DC_PRED_G0143 188 // HS_TSINGHUA_SDC_SPLIT_G0111 189 // QC_PKU_SDC_SPLIT_G0123 Intra SDC Split 190 187 191 188 192 … … 195 199 // QC_SPIVMP_MPI_G0119 Sub-PU level MPI merge candidate 196 200 // Simplification on Sub-PU level temporal interview motion prediction 201 202 203 #define H_3D_DBBP 1 // DBBP: Depth-based Block Partitioning and Merging 204 205 197 206 #define H_3D_FCO 0 // Flexible coding order for 3D 198 207 … … 276 285 277 286 287 ///// ***** DEPTH BASED BLOCK PARTITIONING ********* 288 #if H_3D_DBBP 289 #define DBBP_INVALID_SHORT (-4) 290 #define RWTH_DBBP_PACK_MODE SIZE_2NxN 291 #endif 292 293 278 294 ///// ***** FCO ********* 279 295 #if H_3D_FCO … … 305 321 #endif 306 322 307 #define H_3D_DBBP 1 // DBBP: Depth-based Block Partitioning and Merging308 309 #if H_3D_DBBP310 #define DBBP_INVALID_SHORT (-4)311 #define RWTH_DBBP_PACK_MODE SIZE_2NxN312 #endif313 314 #if H_3D_DIM315 #define QC_PKU_SDC_SPLIT_G0123 1 // Intra SDC Split316 #if QC_PKU_SDC_SPLIT_G0123317 #define HS_TSINGHUA_SDC_SPLIT_G0111 1318 #endif319 #define SCU_HS_DEPTH_DC_PRED_G0143 1320 321 #endif322 323 323 324 -
branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp
r878 r879 1117 1117 UInt uiWidth = pcCU->getWidth ( 0 ); 1118 1118 UInt uiHeight = pcCU->getHeight ( 0 ); 1119 #if QC_PKU_SDC_SPLIT_G01231120 #if HS_TSINGHUA_SDC_SPLIT_G01111121 1119 TComWedgelet* dmm4SegmentationOrg = new TComWedgelet( uiWidth, uiHeight ); 1122 #else1123 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );1124 #endif1125 #endif1126 #if QC_PKU_SDC_SPLIT_G01231127 1120 UInt numParts = 1; 1128 UInt i = 0;1129 1121 UInt sdcDepth = 0; 1130 1122 TComYuv* pcRecoYuv = m_ppcYuvReco[uiDepth]; … … 1143 1135 UInt uiLumaPredMode = 0; 1144 1136 1145 #if HS_TSINGHUA_SDC_SPLIT_G01111146 1137 if ((uiWidth >> pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize()) > 1) 1147 1138 { … … 1150 1141 uiWidth = uiHeight = (1 << pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize()); 1151 1142 } 1152 #else 1153 if (uiWidth == 64) 1154 { 1155 numParts = 4; 1156 sdcDepth = 1; 1157 uiWidth = uiHeight = 32; 1158 } 1159 #endif 1160 1161 for ( i = 0; i < numParts; i++ ) 1143 1144 for ( Int i = 0; i < numParts; i++ ) 1162 1145 { 1163 1146 uiStride = pcRecoYuv->getStride (); … … 1165 1148 piPred = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 1166 1149 piResi = pcResiYuv->getLumaAddr( uiAbsPartIdx ); 1167 1150 1168 1151 uiZOrder = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 1169 1152 piRecIPred = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder ); … … 1173 1156 1174 1157 AOF( uiWidth == uiHeight ); 1175 #else 1176 TComYuv* pcRecoYuv = m_ppcYuvReco[uiDepth]; 1177 TComYuv* pcPredYuv = m_ppcYuvReco[uiDepth]; 1178 TComYuv* pcResiYuv = m_ppcYuvResi[uiDepth]; 1179 1180 UInt uiStride = pcRecoYuv->getStride (); 1181 Pel* piReco = pcRecoYuv->getLumaAddr( uiAbsPartIdx ); 1182 Pel* piPred = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 1183 Pel* piResi = pcResiYuv->getLumaAddr( uiAbsPartIdx ); 1184 1185 UInt uiZOrder = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 1186 Pel* piRecIPred = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder ); 1187 UInt uiRecIPredStride = pcCU->getPic()->getPicYuvRec()->getStride (); 1188 1189 UInt uiLumaPredMode = pcCU->getLumaIntraDir ( uiAbsPartIdx ); 1190 1191 AOF( uiWidth == uiHeight ); 1192 AOF( uiAbsPartIdx == 0 ); 1193 AOF( pcCU->getSDCAvailable(uiAbsPartIdx) ); 1194 AOF( pcCU->getSDCFlag(uiAbsPartIdx) ); 1195 #endif 1196 1197 //===== init availability pattern ===== 1198 Bool bAboveAvail = false; 1199 Bool bLeftAvail = false; 1200 #if QC_PKU_SDC_SPLIT_G0123 1201 pcCU->getPattern()->initPattern ( pcCU, sdcDepth, uiAbsPartIdx ); 1202 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail ); 1203 #else 1204 pcCU->getPattern()->initPattern ( pcCU, 0, uiAbsPartIdx ); 1205 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail ); 1206 #endif 1207 #if !QC_PKU_SDC_SPLIT_G0123 1208 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1209 #endif 1210 #if HS_TSINGHUA_SDC_SPLIT_G0111 1211 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1212 #endif 1213 //===== get prediction signal ===== 1214 #if H_3D_DIM 1215 if( isDimMode( uiLumaPredMode ) ) 1216 { 1217 m_pcPrediction->predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight 1218 , false, dmm4Segmentation 1219 ); 1220 #if HS_TSINGHUA_SDC_SPLIT_G0111 1221 Bool* dmm4PatternSplit = dmm4Segmentation->getPattern(); 1222 Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern(); 1223 for( UInt k = 0; k < (uiWidth*uiHeight); k++ ) 1224 { 1225 dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k]; 1226 } 1227 #endif 1228 } 1229 else 1230 { 1231 #endif 1232 m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 1233 #if H_3D_DIM 1234 } 1235 #endif 1236 #if QC_PKU_SDC_SPLIT_G0123 1158 1159 //===== init availability pattern ===== 1160 Bool bAboveAvail = false; 1161 Bool bLeftAvail = false; 1162 1163 pcCU->getPattern()->initPattern ( pcCU, sdcDepth, uiAbsPartIdx ); 1164 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail ); 1165 1166 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1167 //===== get prediction signal ===== 1168 if( isDimMode( uiLumaPredMode ) ) 1169 { 1170 m_pcPrediction->predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, false, dmm4Segmentation ); 1171 Bool* dmm4PatternSplit = dmm4Segmentation->getPattern(); 1172 Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern(); 1173 for( UInt k = 0; k < (uiWidth*uiHeight); k++ ) 1174 { 1175 dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k]; 1176 } 1177 } 1178 else 1179 { 1180 m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 1181 } 1182 1237 1183 if ( numParts > 1 ) 1238 1184 { … … 1250 1196 } 1251 1197 uiAbsPartIdx += ( (uiWidth * uiWidth) >> 4 ); 1252 #if HS_TSINGHUA_SDC_SPLIT_G01111253 1198 dmm4Segmentation->destroy(); delete dmm4Segmentation; 1254 #endif1255 1199 } 1256 1200 uiAbsPartIdx = 0; … … 1267 1211 piRecIPred = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder ); 1268 1212 uiRecIPredStride = pcCU->getPic()->getPicYuvRec()->getStride (); 1269 #endif1270 1213 // number of segments depends on prediction mode 1271 1214 UInt uiNumSegments = 1; … … 1287 1230 { 1288 1231 uiNumSegments = 2; 1289 #if HS_TSINGHUA_SDC_SPLIT_G01111290 1232 pbMask = dmm4SegmentationOrg->getPattern(); 1291 1233 uiMaskStride = dmm4SegmentationOrg->getStride(); 1292 #else1293 pbMask = dmm4Segmentation->getPattern();1294 uiMaskStride = dmm4Segmentation->getStride();1295 #endif1296 1234 } 1297 1235 // get DC prediction for each segment … … 1356 1294 pRecCr += uiStrideC; 1357 1295 } 1358 #if HS_TSINGHUA_SDC_SPLIT_G01111359 1296 dmm4SegmentationOrg->destroy(); delete dmm4SegmentationOrg; 1360 #else1361 dmm4Segmentation->destroy(); delete dmm4Segmentation;1362 #endif1363 1297 } 1364 1298 #endif -
branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
r878 r879 1861 1861 1862 1862 #if H_3D_DIM_SDC 1863 Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, 1864 Bool bZeroResidual, Int iSDCDeltaResi 1865 ) 1863 Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi ) 1866 1864 { 1867 1865 UInt uiLumaPredMode = pcCU ->getLumaIntraDir( uiAbsPartIdx ); 1868 1866 UInt uiWidth = pcCU ->getWidth ( 0 ); 1869 1867 UInt uiHeight = pcCU ->getHeight ( 0 ); 1870 #if QC_PKU_SDC_SPLIT_G01231871 #if HS_TSINGHUA_SDC_SPLIT_G01111872 1868 TComWedgelet* dmm4SegmentationOrg = new TComWedgelet( uiWidth, uiHeight ); 1873 #else1874 #endif1875 #endif1876 #if QC_PKU_SDC_SPLIT_G01231877 1869 UInt numParts = 1; 1878 UInt i = 0;1879 1870 UInt sdcDepth = 0; 1880 1871 UInt uiStride; … … 1887 1878 UInt uiRecIPredStride; 1888 1879 1889 #if HS_TSINGHUA_SDC_SPLIT_G01111890 1880 if ( ( uiWidth >> pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() ) > 1 ) 1891 1881 { … … 1894 1884 uiWidth = uiHeight = ( 1 << pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() ); 1895 1885 } 1896 #else 1897 if (uiWidth == 64) 1898 { 1899 numParts = 4; 1900 sdcDepth = 1; 1901 uiWidth = uiHeight = 32; 1902 } 1903 #endif 1904 1905 for ( i = 0; i < numParts; i++ ) 1886 1887 for ( Int i = 0; i < numParts; i++ ) 1906 1888 { 1907 1889 uiStride = pcOrgYuv ->getStride (); … … 1915 1897 1916 1898 AOF( uiWidth == uiHeight ); 1917 #else 1918 UInt uiStride = pcOrgYuv ->getStride (); 1919 Pel* piOrg = pcOrgYuv ->getLumaAddr( uiAbsPartIdx ); 1920 Pel* piPred = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 1921 Pel* piReco = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 1922 1923 UInt uiZOrder = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 1924 Pel* piRecIPred = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder ); 1925 UInt uiRecIPredStride = pcCU->getPic()->getPicYuvRec()->getStride (); 1926 1927 AOF( uiWidth == uiHeight ); 1928 AOF( uiAbsPartIdx == 0 ); 1929 AOF( pcCU->getSDCAvailable(uiAbsPartIdx) ); 1930 AOF( pcCU->getSDCFlag(uiAbsPartIdx) ); 1931 #endif 1932 1933 //===== init availability pattern ===== 1934 Bool bAboveAvail = false; 1935 Bool bLeftAvail = false; 1936 #if QC_PKU_SDC_SPLIT_G0123 1937 pcCU->getPattern()->initPattern ( pcCU, sdcDepth, uiAbsPartIdx ); 1938 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail ); 1939 #else 1940 pcCU->getPattern()->initPattern ( pcCU, 0, uiAbsPartIdx ); 1941 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail ); 1942 1943 #endif 1944 #if !QC_PKU_SDC_SPLIT_G0123 1945 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1946 #endif 1947 #if HS_TSINGHUA_SDC_SPLIT_G0111 1948 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1949 #endif 1950 //===== get prediction signal ===== 1951 #if H_3D_DIM 1952 if( isDimMode( uiLumaPredMode ) ) 1953 { 1954 #if HS_TSINGHUA_SDC_SPLIT_G0111 1955 UInt dimType = getDimType ( uiLumaPredMode ); 1956 UInt patternID = pcCU->getDmmWedgeTabIdx(dimType, uiAbsPartIdx); 1957 if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiWidth]].size() && dimType == DMM1_IDX ) 1958 { 1959 if (g_aucConvertToBit[uiWidth] == 2) // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used. 1960 patternID = 1349; // Split 32x32 to 16x16. 1349: Maximum DMM1 pattern number when block size is 16x16 1961 else 1962 patternID = patternID >> 1; // Other cases 1963 pcCU->setDmmWedgeTabIdx(dimType, uiAbsPartIdx, patternID); 1964 } 1965 #endif 1966 predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, true 1967 , dmm4Segmentation 1968 ); 1969 #if HS_TSINGHUA_SDC_SPLIT_G0111 1970 Bool* dmm4PatternSplit = dmm4Segmentation->getPattern(); 1971 Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern(); 1972 for( UInt k = 0; k < (uiWidth*uiHeight); k++ ) 1973 { 1974 dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k]; 1975 } 1976 #endif 1977 } 1978 else 1979 { 1980 #endif 1981 predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 1982 #if H_3D_DIM 1983 } 1984 #endif 1985 #if QC_PKU_SDC_SPLIT_G0123 1899 1900 //===== init availability pattern ===== 1901 Bool bAboveAvail = false; 1902 Bool bLeftAvail = false; 1903 pcCU->getPattern()->initPattern ( pcCU, sdcDepth, uiAbsPartIdx ); 1904 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail ); 1905 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1906 //===== get prediction signal ===== 1907 if( isDimMode( uiLumaPredMode ) ) 1908 { 1909 UInt dimType = getDimType ( uiLumaPredMode ); 1910 UInt patternID = pcCU->getDmmWedgeTabIdx(dimType, uiAbsPartIdx); 1911 if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiWidth]].size() && dimType == DMM1_IDX ) 1912 { 1913 if (g_aucConvertToBit[uiWidth] == 2) // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used. 1914 { 1915 patternID = 1349; // Split 32x32 to 16x16. 1349: Maximum DMM1 pattern number when block size is 16x16 1916 } 1917 else 1918 { 1919 patternID = patternID >> 1; // Other cases 1920 } 1921 pcCU->setDmmWedgeTabIdx(dimType, uiAbsPartIdx, patternID); 1922 } 1923 predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, true , dmm4Segmentation ); 1924 Bool* dmm4PatternSplit = dmm4Segmentation->getPattern(); 1925 Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern(); 1926 for( UInt k = 0; k < (uiWidth*uiHeight); k++ ) 1927 { 1928 dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k]; 1929 } 1930 } 1931 else 1932 { 1933 predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 1934 } 1986 1935 if ( numParts > 1 ) 1987 1936 { … … 1998 1947 } 1999 1948 uiAbsPartIdx += ( ( uiWidth * uiWidth ) >> 4 ); 2000 #if HS_TSINGHUA_SDC_SPLIT_G01112001 1949 dmm4Segmentation->destroy(); delete dmm4Segmentation; 2002 #endif2003 1950 } 2004 1951 uiAbsPartIdx = 0; … … 2007 1954 piPred = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 2008 1955 piReco = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 2009 1956 2010 1957 uiZOrder = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 2011 1958 piRecIPred = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder ); … … 2017 1964 uiHeight = pcCU->getHeight( 0 ); 2018 1965 } 2019 #endif2020 1966 // number of segments depends on prediction mode 2021 1967 UInt uiNumSegments = 1; 2022 1968 Bool* pbMask = NULL; 2023 1969 UInt uiMaskStride = 0; 2024 1970 2025 1971 if( getDimType( uiLumaPredMode ) == DMM1_IDX ) 2026 1972 { 2027 1973 Int uiTabIdx = pcCU->getDmmWedgeTabIdx(DMM1_IDX, uiAbsPartIdx); 2028 1974 2029 1975 WedgeList* pacWedgeList = &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])]; 2030 1976 TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx )); 2031 1977 2032 1978 uiNumSegments = 2; 2033 1979 pbMask = pcWedgelet->getPattern(); … … 2037 1983 { 2038 1984 uiNumSegments = 2; 2039 #if HS_TSINGHUA_SDC_SPLIT_G0111 2040 pbMask = dmm4SegmentationOrg->getPattern(); 1985 pbMask = dmm4SegmentationOrg->getPattern(); 2041 1986 uiMaskStride = dmm4SegmentationOrg->getStride(); 2042 #else 2043 pbMask = dmm4Segmentation->getPattern(); 2044 uiMaskStride = dmm4Segmentation->getStride(); 2045 #endif 2046 } 2047 1987 } 1988 2048 1989 // get DC prediction for each segment 2049 1990 Pel apDCPredValues[2]; 2050 1991 analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode ); 2051 1992 2052 1993 // get original DC for each segment 2053 1994 Pel apDCOrigValues[2]; 2054 1995 analyzeSegmentsSDC(piOrg, uiStride, uiWidth, apDCOrigValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode, true ); 2055 1996 2056 1997 for( UInt uiSegment = 0; uiSegment < uiNumSegments; uiSegment++ ) 2057 1998 { … … 2076 2017 pcCU->setSDCSegmentDCOffset(pResidualIdx, uiSegment, uiAbsPartIdx); 2077 2018 } 2078 2019 2079 2020 // reconstruct residual based on mask + DC residuals 2080 2021 Pel apDCResiValues[2]; … … 2091 2032 #endif 2092 2033 } 2093 2034 2094 2035 //===== reconstruction ===== 2095 2036 Bool* pMask = pbMask; … … 2097 2038 Pel* pReco = piReco; 2098 2039 Pel* pRecIPred = piRecIPred; 2099 2040 2100 2041 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) 2101 2042 { … … 2106 2047 2107 2048 Pel pResiDC = apDCResiValues[ucSegment]; 2108 2049 2109 2050 pReco [ uiX ] = ClipY( pPred[ uiX ] + pResiDC ); 2110 2051 pRecIPred[ uiX ] = pReco[ uiX ]; … … 2115 2056 pMask += uiMaskStride; 2116 2057 } 2117 2058 2118 2059 // clear UV 2119 2060 UInt uiStrideC = pcPredYuv->getCStride(); 2120 2061 Pel *pRecCb = pcPredYuv->getCbAddr(); 2121 2062 Pel *pRecCr = pcPredYuv->getCrAddr(); 2122 2063 2123 2064 for (Int y=0; y<uiHeight/2; y++) 2124 2065 { … … 2128 2069 pRecCr[x] = 128; 2129 2070 } 2130 2071 2131 2072 pRecCb += uiStrideC; 2132 2073 pRecCr += uiStrideC; 2133 2074 } 2134 2075 2135 2076 //===== determine distortion ===== 2136 2077 #if H_3D_VSO … … 2140 2081 #endif 2141 2082 ruiDist = m_pcRdCost->getDistPart(g_bitDepthY, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight ); 2142 2083 2143 2084 //===== determine rate and r-d cost ===== 2144 2085 m_pcEntropyCoder->resetBits(); 2145 2086 2146 2087 // encode reduced intra header 2147 #if H_3D_DIM_SDC2148 2088 if( !pcCU->getSlice()->isIntra() ) 2149 2089 { … … 2158 2098 m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth( 0 ), true ); 2159 2099 m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true ); 2160 #else 2161 m_pcEntropyCoder->encodePredMode( pcCU, 0, true ); 2162 #endif 2163 2100 2164 2101 // encode pred direction + DC residual data 2165 2102 m_pcEntropyCoder->encodePredInfo( pcCU, 0, true ); 2166 #if H_3D_DIM_SDC2167 2103 Bool bDummy = false; 2168 2104 m_pcEntropyCoder->encodeCoeff( pcCU, 0, pcCU->getDepth( 0 ), uiWidth, uiHeight, bDummy ); 2169 #endif2170 2105 UInt uiBits = m_pcEntropyCoder->getNumberOfWrittenBits(); 2171 2106 2172 2107 #if H_3D_VSO 2173 2108 if ( m_pcRdCost->getUseLambdaScaleVSO()) … … 2176 2111 #endif 2177 2112 dRDCost = m_pcRdCost->calcRdCost( uiBits, ruiDist ); 2178 #if HS_TSINGHUA_SDC_SPLIT_G01112179 2113 dmm4SegmentationOrg->destroy(); delete dmm4SegmentationOrg; 2180 #else2181 dmm4Segmentation->destroy(); delete dmm4Segmentation;2182 #endif2183 2114 } 2184 2115 #endif
Note: See TracChangeset for help on using the changeset viewer.