Changeset 781 in 3DVCSoftware for branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSearch.cpp
- Timestamp:
- 20 Jan 2014, 04:34:18 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSearch.cpp
r773 r781 1862 1862 1863 1863 #if H_3D_DIM_SDC 1864 Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bResidual ) 1864 Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, 1865 #if QC_GENERIC_SDC_G0122 1866 Bool bZeroResidual, Int iSDCDeltaResi 1867 #else 1868 Bool bResidual 1869 #endif 1870 ) 1865 1871 { 1866 1872 UInt uiLumaPredMode = pcCU ->getLumaIntraDir( uiAbsPartIdx ); … … 1880 1886 AOF( pcCU->getSDCAvailable(uiAbsPartIdx) ); 1881 1887 AOF( pcCU->getSDCFlag(uiAbsPartIdx) ); 1888 #if !QC_GENERIC_SDC_G0122 1882 1889 AOF( uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX || ( getDimType( uiLumaPredMode ) == DMM1_IDX && !isDimDeltaDC( uiLumaPredMode ) ) ); 1883 1890 AOF( uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX || uiWidth < 64 ); 1891 #endif 1884 1892 1885 1893 //===== init availability pattern ===== … … 1888 1896 pcCU->getPattern()->initPattern ( pcCU, 0, uiAbsPartIdx ); 1889 1897 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail ); 1890 1898 #if QC_GENERIC_SDC_G0122 1899 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1900 #endif 1891 1901 //===== get prediction signal ===== 1892 1902 #if H_3D_DIM 1893 1903 if( isDimMode( uiLumaPredMode ) ) 1894 1904 { 1895 predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, true ); 1905 predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, true 1906 #if QC_GENERIC_SDC_G0122 1907 , dmm4Segmentation 1908 #endif 1909 ); 1896 1910 } 1897 1911 else … … 1919 1933 uiMaskStride = pcWedgelet->getStride(); 1920 1934 } 1921 1935 #if QC_GENERIC_SDC_G0122 1936 if( getDimType( uiLumaPredMode ) == DMM4_IDX ) 1937 { 1938 uiNumSegments = 2; 1939 pbMask = dmm4Segmentation->getPattern(); 1940 uiMaskStride = dmm4Segmentation->getStride(); 1941 } 1942 #endif 1943 1922 1944 // get DC prediction for each segment 1923 1945 Pel apDCPredValues[2]; … … 1931 1953 { 1932 1954 // remap reconstructed value to valid depth values 1955 #if QC_GENERIC_SDC_G0122 1956 Pel pDCRec = ( !bZeroResidual ) ? apDCOrigValues[uiSegment] : apDCPredValues[uiSegment]; 1957 #else 1933 1958 Pel pDCRec = bResidual?apDCOrigValues[uiSegment]:apDCPredValues[uiSegment]; 1934 1959 #endif 1935 1960 // get residual (idx) 1936 1961 #if H_3D_DIM_DLT … … 1939 1964 Pel pResidualIdx = pDCRec - apDCPredValues[uiSegment]; 1940 1965 #endif 1941 1966 #if QC_GENERIC_SDC_G0122 1967 if( !bZeroResidual ) 1968 { 1969 Pel pPredIdx = pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), apDCPredValues[uiSegment] ); 1970 Int pTestIdx = pPredIdx + pResidualIdx + iSDCDeltaResi; 1971 if( pTestIdx >= 0 && pTestIdx < pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) ) 1972 { 1973 pResidualIdx += iSDCDeltaResi; 1974 } 1975 } 1976 #endif 1942 1977 // save SDC DC offset 1943 1978 pcCU->setSDCSegmentDCOffset(pResidualIdx, uiSegment, uiAbsPartIdx); … … 2024 2059 #endif 2025 2060 dRDCost = m_pcRdCost->calcRdCost( uiBits, ruiDist ); 2061 #if QC_GENERIC_SDC_G0122 2062 dmm4Segmentation->destroy(); delete dmm4Segmentation; 2063 #endif 2026 2064 } 2027 2065 #endif … … 2901 2939 case( DMM4_IDX ): 2902 2940 { 2941 #if !QC_GENERIC_SDC_G0122 2903 2942 if( uiWidth > 4 ) 2943 #endif 2904 2944 { 2905 2945 biSegmentation = new TComWedgelet( uiWidth, uiHeight ); … … 2957 2997 { 2958 2998 pcCU->setSDCFlagSubParts( (uiSDC != 0), uiPartOffset, uiDepth + uiInitTrDepth ); 2999 #if QC_GENERIC_SDC_G0122 3000 for( Int iSDCDeltaResi = -2; iSDCDeltaResi <= 2; iSDCDeltaResi++ ) 3001 { 3002 if( ( uiSDC == 0 ) && iSDCDeltaResi != 0 ) 3003 { 3004 continue; 3005 } 3006 #endif 2959 3007 #endif 2960 3008 … … 2966 3014 #if H_3D_DIM_SDC 2967 3015 bTestZeroResi |= pcCU->getSDCFlag(uiPartOffset); 3016 #endif 3017 #if QC_GENERIC_SDC_G0122 3018 if( uiSDC != 0 && iSDCDeltaResi != 0 ) 3019 { 3020 bTestZeroResi = false; 3021 } 2968 3022 #endif 2969 3023 #endif … … 3000 3054 3001 3055 // start encoding with SDC 3056 #if QC_GENERIC_SDC_G0122 3057 xIntraCodingSDC(pcCU, uiPartOffset, pcOrgYuv, pcPredYuv, uiPUDistY, dPUCost, ( testZeroResi != 0 ), iSDCDeltaResi ); 3058 #else 3002 3059 xIntraCodingSDC(pcCU, uiPartOffset, pcOrgYuv, pcPredYuv, uiPUDistY, dPUCost, (testZeroResi!=0)); 3060 #endif 3003 3061 } 3004 3062 else … … 3073 3131 #if H_3D_DIM_ENC || H_3D_DIM_SDC 3074 3132 } 3133 #endif 3134 #if QC_GENERIC_SDC_G0122 3135 } // SDC residual loop 3075 3136 #endif 3076 3137 #if H_3D_DIM_SDC
Note: See TracChangeset for help on using the changeset viewer.