Changeset 1258 in 3DVCSoftware for branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncSearch.cpp
- Timestamp:
- 16 Jun 2015, 04:13:09 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncSearch.cpp
r1248 r1258 1007 1007 } 1008 1008 m_pcEntropyCoder->encodeSkipFlag( pcCU, 0, true ); 1009 #if H_3D1009 #if NH_3D_DIS 1010 1010 m_pcEntropyCoder->encodeDIS(pcCU, 0, true ); 1011 1011 if(!pcCU->getDISFlag(uiAbsPartIdx)) … … 1013 1013 m_pcEntropyCoder->encodePredMode( pcCU, 0, true ); 1014 1014 } 1015 #if H_3D1015 #if NH_3D_DIS 1016 1016 else 1017 1017 { … … 1019 1019 } 1020 1020 #endif 1021 #if H_3D1021 #if NH_3D_DIS 1022 1022 if(!pcCU->getDISFlag(uiAbsPartIdx)) 1023 1023 { … … 1037 1037 } 1038 1038 } 1039 #if H_3D1040 } 1041 #endif 1042 } 1043 #if H_3D1039 #if NH_3D_DIS 1040 } 1041 #endif 1042 } 1043 #if NH_3D_DIS 1044 1044 if(!pcCU->getDISFlag(uiAbsPartIdx)) 1045 1045 { … … 1080 1080 #endif 1081 1081 #endif 1082 #if H_3D1082 #if NH_3D_DIS 1083 1083 } 1084 1084 #endif … … 1875 1875 } 1876 1876 1877 #if H_3D1877 #if NH_3D_DIS 1878 1878 Void TEncSearch::xIntraCodingDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, UInt uiPredMode ) 1879 1879 { 1880 1880 UInt uiWidth = pcCU ->getWidth ( 0 ); 1881 1881 UInt uiHeight = pcCU ->getHeight ( 0 ); 1882 UInt uiStride = pcOrgYuv ->getStride ( );1883 Pel* piOrg = pcOrgYuv ->get LumaAddr(uiAbsPartIdx );1884 Pel* piPred = pcPredYuv->get LumaAddr(uiAbsPartIdx );1882 UInt uiStride = pcOrgYuv ->getStride (COMPONENT_Y); 1883 Pel* piOrg = pcOrgYuv ->getAddr(COMPONENT_Y, uiAbsPartIdx ); 1884 Pel* piPred = pcPredYuv->getAddr(COMPONENT_Y, uiAbsPartIdx ); 1885 1885 1886 1886 AOF( uiWidth == uiHeight ); 1887 1887 AOF( uiAbsPartIdx == 0 ); 1888 pcCU->setDISTypeSubParts( uiPredMode, uiAbsPartIdx, 0, pcCU->getDepth(0));1888 pcCU->setDISTypeSubParts((UChar)uiPredMode, uiAbsPartIdx, pcCU->getDepth(0)); 1889 1889 //===== reconstruction ===== 1890 1890 1891 1891 Bool bAboveAvail = false; 1892 1892 Bool bLeftAvail = false; 1893 pcCU->getPattern()->initPattern ( pcCU, 0, 0 ); 1894 pcCU->getPattern()->initAdiPattern( pcCU, 0, 0, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail ); 1893 1894 TComTURecurse rTu(pcCU, 0); 1895 const ChromaFormat chFmt = rTu.GetChromaFormat(); 1895 1896 1896 1897 if ( uiPredMode == 0 ) 1897 1898 { 1898 predIntraLumaAng( pcCU->getPattern(), VER_IDX, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 1899 const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, VER_IDX, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag()); 1900 initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, COMPONENT_Y, bUseFilteredPredictions DEBUG_STRING_PASS_INTO(sTemp) ); 1901 predIntraAng( COMPONENT_Y, VER_IDX, 0, uiStride, piPred, uiStride, rTu, bAboveAvail, bLeftAvail, bUseFilteredPredictions ); 1899 1902 } 1900 1903 else if ( uiPredMode == 1 ) 1901 1904 { 1902 predIntraLumaAng( pcCU->getPattern(), HOR_IDX, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 1905 const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, HOR_IDX, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag()); 1906 initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, COMPONENT_Y, bUseFilteredPredictions DEBUG_STRING_PASS_INTO(sTemp) ); 1907 predIntraAng( COMPONENT_Y, HOR_IDX, 0, uiStride, piPred, uiStride, rTu, bAboveAvail, bLeftAvail, bUseFilteredPredictions ); 1903 1908 } 1904 1909 else if ( uiPredMode == 2 ) 1905 1910 { 1906 Pel pSingleDepth = 1 << ( g_bitDepthY- 1 );1911 Pel pSingleDepth = 1 << ( pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 1 ); 1907 1912 pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 0 ); 1908 1913 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) … … 1917 1922 else if ( uiPredMode == 3 ) 1918 1923 { 1919 Pel pSingleDepth = 1 << ( g_bitDepthY- 1 );1924 Pel pSingleDepth = 1 << ( pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 1 ); 1920 1925 pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 1 ); 1921 1926 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) … … 1930 1935 1931 1936 // clear UV 1932 UInt uiStrideC = pcPredYuv->get CStride();1933 Pel *pRecCb = pcPredYuv->get CbAddr();1934 Pel *pRecCr = pcPredYuv->get CrAddr();1937 UInt uiStrideC = pcPredYuv->getStride(COMPONENT_Cb); 1938 Pel *pRecCb = pcPredYuv->getAddr(COMPONENT_Cb); 1939 Pel *pRecCr = pcPredYuv->getAddr(COMPONENT_Cr); 1935 1940 1936 1941 for (Int y=0; y<uiHeight/2; y++) … … 1938 1943 for (Int x=0; x<uiWidth/2; x++) 1939 1944 { 1940 pRecCb[x] = 1<<( g_bitDepthC-1);1941 pRecCr[x] = 1<<( g_bitDepthC-1);1945 pRecCb[x] = 1<<(pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA)-1); 1946 pRecCr[x] = 1<<(pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA)-1); 1942 1947 } 1943 1948 … … 1946 1951 } 1947 1952 1948 piPred = pcPredYuv->get LumaAddr(uiAbsPartIdx );1953 piPred = pcPredYuv->getAddr(COMPONENT_Y, uiAbsPartIdx ); 1949 1954 //===== determine distortion ===== 1950 #if H_3D_VSO1955 #if NH_3D_VSO 1951 1956 if ( m_pcRdCost->getUseVSO() ) 1952 ruiDist = m_pcRdCost->getDistPartVSO ( pcCU, uiAbsPartIdx, p iPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, false );1957 ruiDist = m_pcRdCost->getDistPartVSO ( pcCU, uiAbsPartIdx, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA), piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, false ); 1953 1958 else 1954 1959 #endif 1955 ruiDist = m_pcRdCost->getDistPart( g_bitDepthY, piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight);1960 ruiDist = m_pcRdCost->getDistPart(pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA), piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, COMPONENT_Y ); 1956 1961 1957 1962 //===== determine rate and r-d cost ===== … … 1960 1965 UInt uiBits = m_pcEntropyCoder->getNumberOfWrittenBits(); 1961 1966 1962 #if H_3D_VSO1967 #if NH_3D_VSO 1963 1968 if ( m_pcRdCost->getUseLambdaScaleVSO()) 1964 1969 dRDCost = m_pcRdCost->calcRdCostVSO( uiBits, ruiDist ); … … 2721 2726 } 2722 2727 2723 #if H_3D2728 #if NH_3D_DIS 2724 2729 Void TEncSearch::estIntraPredDIS( TComDataCU* pcCU, 2725 2730 TComYuv* pcOrgYuv, … … 2734 2739 UInt uiHeight = pcCU->getHeight(0); 2735 2740 2736 2737 Pel* piOrg = pcOrgYuv ->get LumaAddr(0, uiWidth );2738 UInt uiStride = pcPredYuv->getStride( );2739 2741 #if NH_3D_VSO // M36 2742 Pel* piOrg = pcOrgYuv ->getAddr(COMPONENT_Y, 0, uiWidth ); 2743 UInt uiStride = pcPredYuv->getStride(COMPONENT_Y); 2744 #endif 2740 2745 Dist uiDist = 0; 2741 2746 Double dCost = 0.0; … … 2752 2757 uiDist = 0; 2753 2758 dCost = 0.0; 2754 #if H_3D_VSO // M362759 #if NH_3D_VSO // M36 2755 2760 if( m_pcRdCost->getUseRenModel() ) 2756 2761 { … … 2771 2776 2772 2777 2773 pcCU->setDISTypeSubParts( uiBestDISType, 0, 0, uiDepth);2778 pcCU->setDISTypeSubParts((UChar)uiBestDISType, 0, uiDepth); 2774 2779 assert(uiBestDISType >= 0); 2775 2780 … … 7091 7096 7092 7097 m_pcEntropyCoder->encodeSkipFlag ( pcCU, 0, true ); 7093 #if H_3D7098 #if NH_3D_DIS 7094 7099 m_pcEntropyCoder->encodeDIS ( pcCU, 0, true ); 7095 7100 #endif
Note: See TracChangeset for help on using the changeset viewer.