Changeset 799 in 3DVCSoftware for branches/HTM-9.3-dev3-Hisilicon
- Timestamp:
- 26 Jan 2014, 15:40:44 (11 years ago)
- Location:
- branches/HTM-9.3-dev3-Hisilicon
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-9.3-dev3-Hisilicon/source/Lib/TLibCommon/TypeDef.h
r792 r799 243 243 // HHI_DEPTH_INTRA_SEARCH_RAU_C0160 244 244 // LG_ZEROINTRADEPTHRESI_A0087 245 #endif 246 #define QC_PKU_SDC_SPLIT_G0123 1 // Intra SDC Split 247 #if QC_PKU_SDC_SPLIT_G0123 248 #define HS_TSINGHUA_SDC_SPLIT_G0111 1 245 249 #endif 246 250 ///// ***** VIEW SYNTHESIS PREDICTION ********* -
branches/HTM-9.3-dev3-Hisilicon/source/Lib/TLibDecoder/TDecCu.cpp
r792 r799 921 921 UInt uiWidth = pcCU->getWidth ( 0 ); 922 922 UInt uiHeight = pcCU->getHeight ( 0 ); 923 923 #if QC_PKU_SDC_SPLIT_G0123 924 #if QC_GENERIC_SDC_G0122 925 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 926 #endif 927 #endif 928 #if QC_PKU_SDC_SPLIT_G0123 929 UInt numParts = 1; 930 UInt i = 0; 931 UInt sdcDepth = 0; 932 TComYuv* pcRecoYuv = m_ppcYuvReco[uiDepth]; 933 TComYuv* pcPredYuv = m_ppcYuvReco[uiDepth]; 934 TComYuv* pcResiYuv = m_ppcYuvResi[uiDepth]; 935 936 UInt uiStride = 0; 937 Pel* piReco; 938 Pel* piPred; 939 Pel* piResi; 940 941 UInt uiZOrder; 942 Pel* piRecIPred; 943 UInt uiRecIPredStride; 944 945 UInt uiLumaPredMode = 0; 946 947 #if HS_TSINGHUA_SDC_SPLIT_G0111 948 if ((uiWidth >> pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize()) > 1) 949 { 950 numParts = uiWidth * uiWidth >> (2 * pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize()); 951 sdcDepth = g_aucConvertToBit[uiWidth] + 2 - pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize(); 952 uiWidth = uiHeight = (1 << pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize()); 953 } 954 #else 955 if (uiWidth == 64) 956 { 957 numParts = 4; 958 sdcDepth = 1; 959 uiWidth = uiHeight = 32; 960 } 961 #endif 962 963 for ( i = 0; i < numParts; i++ ) 964 { 965 uiStride = pcRecoYuv->getStride (); 966 piReco = pcRecoYuv->getLumaAddr( uiAbsPartIdx ); 967 piPred = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 968 piResi = pcResiYuv->getLumaAddr( uiAbsPartIdx ); 969 970 uiZOrder = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 971 piRecIPred = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder ); 972 uiRecIPredStride = pcCU->getPic()->getPicYuvRec()->getStride (); 973 974 uiLumaPredMode = pcCU->getLumaIntraDir ( uiAbsPartIdx ); 975 976 AOF( uiWidth == uiHeight ); 977 #else 924 978 TComYuv* pcRecoYuv = m_ppcYuvReco[uiDepth]; 925 979 TComYuv* pcPredYuv = m_ppcYuvReco[uiDepth]; … … 936 990 937 991 UInt uiLumaPredMode = pcCU->getLumaIntraDir ( uiAbsPartIdx ); 938 992 939 993 AOF( uiWidth == uiHeight ); 940 994 AOF( uiAbsPartIdx == 0 ); 941 995 AOF( pcCU->getSDCAvailable(uiAbsPartIdx) ); 942 996 AOF( pcCU->getSDCFlag(uiAbsPartIdx) ); 997 #endif 943 998 944 999 //===== init availability pattern ===== 945 1000 Bool bAboveAvail = false; 946 1001 Bool bLeftAvail = false; 1002 #if QC_PKU_SDC_SPLIT_G0123 1003 pcCU->getPattern()->initPattern ( pcCU, sdcDepth, uiAbsPartIdx ); 1004 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail ); 1005 #else 947 1006 pcCU->getPattern()->initPattern ( pcCU, 0, uiAbsPartIdx ); 948 1007 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail ); 1008 #endif 1009 #if !QC_PKU_SDC_SPLIT_G0123 949 1010 #if QC_GENERIC_SDC_G0122 950 1011 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1012 #endif 951 1013 #endif 952 1014 //===== get prediction signal ===== … … 967 1029 } 968 1030 #endif 969 1031 #if QC_PKU_SDC_SPLIT_G0123 1032 if ( numParts > 1 ) 1033 { 1034 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) 1035 { 1036 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 1037 { 1038 piReco [ uiX ] = ClipY( piPred[ uiX ] ); 1039 piRecIPred [ uiX ] = piReco[ uiX ]; 1040 } 1041 piPred += uiStride; 1042 piReco += uiStride; 1043 piRecIPred += uiRecIPredStride; 1044 } 1045 } 1046 uiAbsPartIdx += ( (uiWidth * uiWidth) >> 4 ); 1047 } 1048 uiAbsPartIdx = 0; 1049 1050 if ( numParts > 1 ) 1051 { 1052 uiWidth = pcCU->getWidth( 0 ); 1053 uiHeight = pcCU->getHeight( 0 ); 1054 } 1055 piReco = pcRecoYuv->getLumaAddr( uiAbsPartIdx ); 1056 piPred = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 1057 piResi = pcResiYuv->getLumaAddr( uiAbsPartIdx ); 1058 uiZOrder = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 1059 piRecIPred = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder ); 1060 uiRecIPredStride = pcCU->getPic()->getPicYuvRec()->getStride (); 1061 #endif 970 1062 // number of segments depends on prediction mode 971 1063 UInt uiNumSegments = 1; -
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.