Changeset 799 in 3DVCSoftware for branches/HTM-9.3-dev3-Hisilicon/source/Lib/TLibEncoder
- Timestamp:
- 26 Jan 2014, 15:40:44 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-9.3-dev3-Hisilicon/source/Lib/TLibEncoder/TEncSearch.cpp
r792 r799 1890 1890 UInt uiWidth = pcCU ->getWidth ( 0 ); 1891 1891 UInt uiHeight = pcCU ->getHeight ( 0 ); 1892 #if QC_PKU_SDC_SPLIT_G0123 1893 #if QC_GENERIC_SDC_G0122 1894 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1895 #endif 1896 #endif 1897 #if QC_PKU_SDC_SPLIT_G0123 1898 UInt numParts = 1; 1899 UInt i = 0; 1900 UInt sdcDepth = 0; 1901 UInt uiStride; 1902 Pel* piOrg; 1903 Pel* piPred; 1904 Pel* piReco; 1905 1906 UInt uiZOrder; 1907 Pel* piRecIPred; 1908 UInt uiRecIPredStride; 1909 1910 #if HS_TSINGHUA_SDC_SPLIT_G0111 1911 if ( ( uiWidth >> pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() ) > 1 ) 1912 { 1913 if ( getDimType( uiLumaPredMode ) == DMM4_IDX ) 1914 { 1915 dmm4Segmentation->destroy(); delete dmm4Segmentation; 1916 ruiDist = MAX_INT; 1917 return; 1918 } 1919 numParts = uiWidth * uiWidth >> ( 2 * pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() ); 1920 sdcDepth = g_aucConvertToBit[uiWidth] + 2 - pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize(); 1921 uiWidth = uiHeight = ( 1 << pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() ); 1922 } 1923 #else 1924 if (uiWidth == 64) 1925 { 1926 numParts = 4; 1927 sdcDepth = 1; 1928 uiWidth = uiHeight = 32; 1929 } 1930 #endif 1931 1932 for ( i = 0; i < numParts; i++ ) 1933 { 1934 uiStride = pcOrgYuv ->getStride (); 1935 piOrg = pcOrgYuv ->getLumaAddr( uiAbsPartIdx ); 1936 piPred = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 1937 piReco = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 1938 1939 uiZOrder = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 1940 piRecIPred = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder ); 1941 uiRecIPredStride = pcCU->getPic()->getPicYuvRec()->getStride (); 1942 1943 AOF( uiWidth == uiHeight ); 1944 #else 1892 1945 UInt uiStride = pcOrgYuv ->getStride (); 1893 1946 Pel* piOrg = pcOrgYuv ->getLumaAddr( uiAbsPartIdx ); … … 1898 1951 Pel* piRecIPred = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder ); 1899 1952 UInt uiRecIPredStride = pcCU->getPic()->getPicYuvRec()->getStride (); 1900 1953 1901 1954 AOF( uiWidth == uiHeight ); 1902 1955 AOF( uiAbsPartIdx == 0 ); 1903 1956 AOF( pcCU->getSDCAvailable(uiAbsPartIdx) ); 1904 1957 AOF( pcCU->getSDCFlag(uiAbsPartIdx) ); 1958 #endif 1905 1959 #if !QC_GENERIC_SDC_G0122 1906 1960 AOF( uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX || ( getDimType( uiLumaPredMode ) == DMM1_IDX && !isDimDeltaDC( uiLumaPredMode ) ) ); … … 1911 1965 Bool bAboveAvail = false; 1912 1966 Bool bLeftAvail = false; 1967 #if QC_PKU_SDC_SPLIT_G0123 1968 pcCU->getPattern()->initPattern ( pcCU, sdcDepth, uiAbsPartIdx ); 1969 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail ); 1970 #else 1913 1971 pcCU->getPattern()->initPattern ( pcCU, 0, uiAbsPartIdx ); 1914 1972 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail ); 1973 #endif 1974 #if !QC_PKU_SDC_SPLIT_G0123 1915 1975 #if QC_GENERIC_SDC_G0122 1916 1976 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1977 #endif 1917 1978 #endif 1918 1979 //===== get prediction signal ===== … … 1920 1981 if( isDimMode( uiLumaPredMode ) ) 1921 1982 { 1983 #if HS_TSINGHUA_SDC_SPLIT_G0111 1984 UInt dimType = getDimType ( uiLumaPredMode ); 1985 UInt patternID = pcCU->getDmmWedgeTabIdx(dimType, uiAbsPartIdx); 1986 if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiWidth]].size() && dimType == DMM1_IDX ) 1987 { 1988 if (g_aucConvertToBit[uiWidth] == 2) // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used. 1989 patternID = 1349; // Split 32x32 to 16x16. 1349: Maximum DMM1 pattern number when block size is 16x16 1990 else 1991 patternID = patternID >> 1; // Other cases 1992 pcCU->setDmmWedgeTabIdx(dimType, uiAbsPartIdx, patternID); 1993 } 1994 #endif 1922 1995 predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, true 1923 1996 #if QC_GENERIC_SDC_G0122 … … 1933 2006 } 1934 2007 #endif 1935 2008 #if QC_PKU_SDC_SPLIT_G0123 2009 if ( numParts > 1 ) 2010 { 2011 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) 2012 { 2013 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 2014 { 2015 piPred [ uiX ] = ClipY( piPred[ uiX ] ); 2016 piRecIPred [ uiX ] = piPred[ uiX ]; 2017 } 2018 piPred += uiStride; 2019 piRecIPred += uiRecIPredStride; 2020 } 2021 } 2022 uiAbsPartIdx += ( ( uiWidth * uiWidth ) >> 4 ); 2023 } 2024 uiAbsPartIdx = 0; 2025 uiStride = pcOrgYuv ->getStride (); 2026 piOrg = pcOrgYuv ->getLumaAddr( uiAbsPartIdx ); 2027 piPred = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 2028 piReco = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 2029 2030 uiZOrder = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 2031 piRecIPred = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder ); 2032 uiRecIPredStride = pcCU->getPic()->getPicYuvRec()->getStride (); 2033 2034 if (numParts > 1) 2035 { 2036 uiWidth = pcCU->getWidth( 0 ); 2037 uiHeight = pcCU->getHeight( 0 ); 2038 } 2039 #endif 1936 2040 // number of segments depends on prediction mode 1937 2041 UInt uiNumSegments = 1;
Note: See TracChangeset for help on using the changeset viewer.