Changeset 765 in 3DVCSoftware for branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComPrediction.cpp
- Timestamp:
- 12 Jan 2014, 02:46:46 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComPrediction.cpp
r764 r765 520 520 } 521 521 522 #if MTK_SPIVMP_F0110522 #if H_3D_SPIVMP 523 523 Void TComPrediction::xGetSubPUAddrAndMerge(TComDataCU* pcCU, UInt uiPartAddr, Int iSPWidth, Int iSPHeight, Int iNumSPInOneLine, Int iNumSP, UInt* uiMergedSPW, UInt* uiMergedSPH, UInt* uiSPAddr ) 524 524 { … … 631 631 else 632 632 { 633 #if MTK_SPIVMP_F0110633 #if H_3D_SPIVMP 634 634 if ( pcCU->getSPIVMPFlag(uiPartAddr)!=0) 635 635 { … … 671 671 xPredInterBi (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred ); 672 672 } 673 #if MTK_SPIVMP_F0110673 #if H_3D_SPIVMP 674 674 } 675 675 #endif … … 717 717 else 718 718 { 719 #if MTK_SPIVMP_F0110719 #if H_3D_SPIVMP 720 720 if (pcCU->getSPIVMPFlag(uiPartAddr)!=0) 721 721 { … … 756 756 xPredInterBi (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred ); 757 757 } 758 #if MTK_SPIVMP_F0110758 #if H_3D_SPIVMP 759 759 } 760 760 #endif … … 784 784 pcCU->clipMv(cMv); 785 785 #if H_3D_ARP 786 #if QC_MTK_INTERVIEW_ARP_F0123_F0108787 786 if(pcCU->getARPW( uiPartAddr ) > 0 && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC()) 788 787 { 789 788 xPredInterUniARPviewRef( pcCU , uiPartAddr , iWidth , iHeight , eRefPicList , rpcYuvPred , bi ); 790 789 } 791 790 else 792 #endif 793 if( pcCU->getARPW( uiPartAddr ) > 0794 && pcCU->getPartitionSize(uiPartAddr)==SIZE_2Nx2N795 && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()!= pcCU->getSlice()->getPOC()796 )797 {798 xPredInterUniARP( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, rpcYuvPred, bi );799 }800 else801 {791 { 792 if( pcCU->getARPW( uiPartAddr ) > 0 793 && pcCU->getPartitionSize(uiPartAddr)==SIZE_2Nx2N 794 && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()!= pcCU->getSlice()->getPOC() 795 ) 796 { 797 xPredInterUniARP( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, rpcYuvPred, bi ); 798 } 799 else 800 { 802 801 #endif 803 802 #if H_3D_IC 804 Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getViewIndex() != pcCU->getSlice()->getViewIndex() );805 xPredInterLumaBlk ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi803 Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getViewIndex() != pcCU->getSlice()->getViewIndex() ); 804 xPredInterLumaBlk ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi 806 805 #if H_3D_ARP 807 , false808 #endif 809 , bICFlag );810 bICFlag = bICFlag && (iWidth > 8);811 xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi806 , false 807 #endif 808 , bICFlag ); 809 bICFlag = bICFlag && (iWidth > 8); 810 xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi 812 811 #if H_3D_ARP 813 , false814 #endif 815 , bICFlag );812 , false 813 #endif 814 , bICFlag ); 816 815 #else 817 xPredInterLumaBlk ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi );818 xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi );816 xPredInterLumaBlk ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi ); 817 xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi ); 819 818 #endif 820 819 #if H_3D_ARP 820 } 821 821 } 822 822 #endif … … 872 872 pcBaseViewDepthPicYuv->extendPicBorder(); 873 873 874 #if MTK_F0109_LG_F0120_VSP_BLOCK875 874 Int vspSize=0; 876 875 xGetVirtualDepth( pcCU, pcBaseViewDepthPicYuv, &cDv, uiPartAddr, iWidth, iHeight, &m_cYuvDepthOnVsp,vspSize ); … … 878 877 xPredInterLumaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize); 879 878 xPredInterChromaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize); 880 #else881 xGetVirtualDepth( pcCU, pcBaseViewDepthPicYuv, &cDv, uiPartAddr, iWidth, iHeight, &m_cYuvDepthOnVsp );882 // sub-PU based compensation883 xPredInterLumaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );884 xPredInterChromaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );885 #endif886 879 } 887 880 #endif … … 913 906 if( cDistparity.bDV ) 914 907 { 915 #if SHARP_ARP_REF_CHECK_F0105916 908 Int arpRefIdx = pcCU->getSlice()->getFirstTRefIdx(eRefPicList); 917 909 if( dW > 0 && pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC()!= pcCU->getSlice()->getPOC() ) 918 #else919 if( dW > 0 && pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC()!= pcCU->getSlice()->getPOC() )920 #endif921 910 { 922 911 bTobeScaled = true; … … 925 914 pcPicYuvBaseCol = pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getPOC(), cDistparity.m_aVIdxCan ); 926 915 927 #if SHARP_ARP_REF_CHECK_F0105928 916 pcPicYuvBaseRef = pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC(), cDistparity.m_aVIdxCan ); 929 917 930 918 if (!pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, cDistparity.m_aVIdxCan)) 931 #else932 pcPicYuvBaseRef = pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC(), cDistparity.m_aVIdxCan );933 934 if( ( !pcPicYuvBaseCol || pcPicYuvBaseCol->getPOC() != pcCU->getSlice()->getPOC() ) || ( !pcPicYuvBaseRef || pcPicYuvBaseRef->getPOC() != pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC() ) )935 #endif936 919 { 937 920 dW = 0; … … 940 923 else 941 924 { 942 #if SHARP_ARP_REF_CHECK_F0105943 925 assert( pcPicYuvBaseCol->getPOC() == pcCU->getSlice()->getPOC() && pcPicYuvBaseRef->getPOC() == pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC() ); 944 #else945 assert( pcPicYuvBaseCol->getPOC() == pcCU->getSlice()->getPOC() && pcPicYuvBaseRef->getPOC() == pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC() );946 #endif947 926 } 948 927 … … 993 972 } 994 973 } 995 #if QC_MTK_INTERVIEW_ARP_F0123_F0108996 974 Void TComPrediction::xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled ) 997 975 { … … 1015 993 1016 994 assert(dW > 0); 1017 #if SHARP_ARP_REF_CHECK_F01051018 995 if (!pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, pcPicYuvBaseCol->getViewIndex())) 1019 996 { 1020 997 dW = 0; 1021 998 } 1022 #endif1023 999 Int uiLCUAddr,uiAbsPartAddr; 1024 1000 Int irefPUX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[uiPartAddr]] + iWidth/2 + ((cDMv.getHor() + 2)>>2); … … 1098 1074 } 1099 1075 } 1100 #endif1101 1076 1102 1077 #endif … … 1758 1733 #if H_3D_VSP 1759 1734 // not fully support iRatioTxtPerDepth* != 1 1760 #if MTK_F0109_LG_F0120_VSP_BLOCK1761 1735 Void TComPrediction::xGetVirtualDepth( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *mv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int &vspSize, Int ratioTxtPerDepthX, Int ratioTxtPerDepthY ) 1762 #else1763 Void TComPrediction::xGetVirtualDepth( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *mv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int ratioTxtPerDepthX, Int ratioTxtPerDepthY )1764 #endif1765 1736 { 1766 1737 Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE; … … 1790 1761 Pel *depth = yuvDepth->getLumaAddr(); 1791 1762 1792 #if !SHARP_VSP_BLOCK_IN_AMP_F01021793 if( width<8 || height<8 )1794 { // no split1795 Int rightOffset = width - 1;1796 Int depStrideBlock = depStride * nTxtPerDepthY;1797 Pel *refDepthTop = refDepth;1798 Pel *refDepthBot = refDepthTop + (height-1)*refDepStride;1799 1800 Pel maxDepth = refDepthTop[0] > refDepthBot[0] ? refDepthTop[0] : refDepthBot[0];1801 if( maxDepth < refDepthTop[rightOffset] ) { maxDepth = refDepthTop[rightOffset]; }1802 if( maxDepth < refDepthBot[rightOffset] ) { maxDepth = refDepthBot[rightOffset]; }1803 1804 for( Int sY=0; sY<height; sY+=nTxtPerDepthY )1805 {1806 for( Int sX=0; sX<width; sX+=nTxtPerDepthX )1807 {1808 depth[sX] = maxDepth;1809 }1810 depth += depStrideBlock;1811 }1812 #if MTK_F0109_LG_F0120_VSP_BLOCK1813 if(width==4)1814 vspSize=0;1815 else1816 vspSize=1;1817 #endif1818 }1819 else1820 { // split to 4x8, or 8x41821 Int blocksize = 8;1822 Int subblocksize = 4;1823 Int depStrideBlock = depStride * blocksize;1824 Pel *depthTmp = NULL;1825 Int depStrideTmp = depStride * nTxtPerDepthY;1826 Int offset[4] = { 0, subblocksize-1, subblocksize, blocksize-1 };1827 Pel *refDepthTmp[4] = { NULL, NULL, NULL, NULL };1828 Pel repDepth4x8[2] = {0, 0};1829 Pel repDepth8x4[2] = {0, 0};1830 #endif1831 1832 #if !MTK_F0109_LG_F0120_VSP_BLOCK1833 #if SHARP_VSP_BLOCK_IN_AMP_F01021834 Int blocksize = 8;1835 Int subblocksize = 4;1836 Int depStrideBlock = depStride * blocksize;1837 Pel *depthTmp = NULL;1838 Int depStrideTmp = depStride * nTxtPerDepthY;1839 Int offset[4] = { 0, subblocksize-1, subblocksize, blocksize-1 };1840 Pel *refDepthTmp[4] = { NULL, NULL, NULL, NULL };1841 #endif1842 Int refDepStrideBlock = refDepStride * blocksize;1843 Int refDepStrideSubBlock = refDepStride * subblocksize;1844 1845 refDepthTmp[0] = refDepth;1846 refDepthTmp[2] = refDepthTmp[0] + refDepStrideSubBlock;1847 refDepthTmp[1] = refDepthTmp[2] - refDepStride;1848 refDepthTmp[3] = refDepthTmp[1] + refDepStrideSubBlock;1849 1850 #if SHARP_VSP_BLOCK_IN_AMP_F01021851 Int subBlockW, subBlockH;1852 Int blockW, blockH;1853 subBlockW = subBlockH = 8;1854 if (height % 8)1855 {1856 subBlockW = 8;1857 subBlockH = 4;1858 blockW = width; // no further split1859 blockH = height; // no further split1860 }1861 else if (width % 8)1862 {1863 subBlockW = 4;1864 subBlockH = 8;1865 blockW = width; // no further split1866 blockH = height; // no further split1867 }1868 else1869 {1870 blockW = blockH = 8;1871 }1872 for( Int y=0; y<height; y+=blockH )1873 {1874 for( Int x=0; x<width; x+=blockW )1875 {1876 if (blockW == 8 && blockH == 8)1877 {1878 Bool ULvsBR = false, URvsBL = false;1879 ULvsBR = refDepthTmp[0][x+offset[0]] < refDepthTmp[3][x+offset[3]];1880 URvsBL = refDepthTmp[0][x+offset[3]] < refDepthTmp[3][x+offset[0]];1881 if( ULvsBR ^ URvsBL )1882 { // 4x81883 subBlockW = 4;1884 subBlockH = 8;1885 }1886 else1887 {1888 subBlockW = 8;1889 subBlockH = 4;1890 }1891 }1892 for( Int yy=0; yy<blockH; yy+=subBlockH )1893 {1894 for( Int xx=0; xx<blockW; xx+=subBlockW )1895 {1896 Pel maxDepthVal = 0;1897 Int xP0, xP1, yP0, yP1;1898 xP0 = x+xx;1899 xP1 = x+xx+subBlockW-1;1900 yP0 = yy;1901 yP1 = yy+subBlockH-1;1902 maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP0+yP0*refDepStride]);1903 maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP1+yP0*refDepStride]);1904 maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP0+yP1*refDepStride]);1905 maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP1+yP1*refDepStride]);1906 depthTmp = &depth[x+xx+yy*depStride];1907 for( Int sY=0; sY<subBlockH; sY+=nTxtPerDepthY )1908 {1909 for( Int sX=0; sX<subBlockW; sX+=nTxtPerDepthX )1910 {1911 depthTmp[sX] = maxDepthVal;1912 }1913 depthTmp += depStrideTmp;1914 }1915 }1916 }1917 }1918 refDepthTmp[0] += refDepStrideBlock;1919 depth += depStrideBlock;1920 }1921 #else // SHARP_VSP_BLOCK_IN_AMP_F01021922 for( Int y=0; y<height; y+=blocksize )1923 {1924 for( Int x=0; x<width; x+=blocksize )1925 {1926 Bool ULvsBR = false, URvsBL = false;1927 1928 ULvsBR = refDepthTmp[0][x+offset[0]] < refDepthTmp[3][x+offset[3]];1929 URvsBL = refDepthTmp[0][x+offset[3]] < refDepthTmp[3][x+offset[0]];1930 1931 if( ULvsBR ^ URvsBL )1932 { // 4x81933 repDepth4x8[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[1]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[1]];1934 if( repDepth4x8[0] < refDepthTmp[3][x+offset[0]] )1935 {1936 repDepth4x8[0] = refDepthTmp[3][x+offset[0]];1937 }1938 if( repDepth4x8[0] < refDepthTmp[3][x+offset[1]] )1939 {1940 repDepth4x8[0] = refDepthTmp[3][x+offset[1]];1941 }1942 repDepth4x8[1] = refDepthTmp[0][x+offset[2]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[2]] : refDepthTmp[0][x+offset[3]];1943 if( repDepth4x8[1] < refDepthTmp[3][x+offset[2]] )1944 {1945 repDepth4x8[1] = refDepthTmp[3][x+offset[2]];1946 }1947 if( repDepth4x8[1] < refDepthTmp[3][x+offset[3]] )1948 {1949 repDepth4x8[1] = refDepthTmp[3][x+offset[3]];1950 }1951 1952 depthTmp = &depth[x];1953 for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY )1954 {1955 for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX )1956 {1957 depthTmp[sX] = repDepth4x8[0];1958 }1959 depthTmp += depStrideTmp;1960 }1961 depthTmp = &depth[x+subblocksize];1962 for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY )1963 {1964 for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX )1965 {1966 depthTmp[sX] = repDepth4x8[1];1967 }1968 depthTmp += depStrideTmp;1969 }1970 }1971 else1972 { // 8x41973 repDepth8x4[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[3]];1974 if( repDepth8x4[0] < refDepthTmp[1][x+offset[0]] )1975 {1976 repDepth8x4[0] = refDepthTmp[1][x+offset[0]];1977 }1978 if( repDepth8x4[0] < refDepthTmp[1][x+offset[3]] )1979 {1980 repDepth8x4[0] = refDepthTmp[1][x+offset[3]];1981 }1982 repDepth8x4[1] = refDepthTmp[2][x+offset[0]] > refDepthTmp[2][x+offset[3]] ? refDepthTmp[2][x+offset[0]] : refDepthTmp[2][x+offset[3]];1983 if( repDepth8x4[1] < refDepthTmp[3][x+offset[0]] )1984 {1985 repDepth8x4[1] = refDepthTmp[3][x+offset[0]];1986 }1987 if( repDepth8x4[1] < refDepthTmp[3][x+offset[3]] )1988 {1989 repDepth8x4[1] = refDepthTmp[3][x+offset[3]];1990 }1991 1992 depthTmp = &depth[x];1993 for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY )1994 {1995 for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX )1996 {1997 depthTmp[sX] = repDepth8x4[0];1998 }1999 depthTmp += depStrideTmp;2000 }2001 for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY )2002 {2003 for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX )2004 {2005 depthTmp[sX] = repDepth8x4[1];2006 }2007 depthTmp += depStrideTmp;2008 }2009 }2010 }2011 refDepthTmp[0] += refDepStrideBlock;2012 refDepthTmp[1] += refDepStrideBlock;2013 refDepthTmp[2] += refDepStrideBlock;2014 refDepthTmp[3] += refDepStrideBlock;2015 depth += depStrideBlock;2016 }2017 #endif // SHARP_VSP_BLOCK_IN_AMP_F01022018 #else2019 #if SHARP_VSP_BLOCK_IN_AMP_F01022020 1763 if ((height % 8)) 2021 1764 { … … 2069 1812 } 2070 1813 } 2071 } 2072 #else // SHARP_VSP_BLOCK_IN_AMP_F0102 2073 Int refDepStrideBlock = refDepStride * height; 2074 Int refDepStrideSubBlock = refDepStride * height/2; 2075 refDepthTmp[0] = refDepth; 2076 refDepthTmp[2] = refDepthTmp[0] + refDepStrideSubBlock; 2077 refDepthTmp[1] = refDepthTmp[2] - refDepStride; 2078 refDepthTmp[3] = refDepthTmp[1] + refDepStrideSubBlock; 2079 offset[3] = width-1; 2080 Bool ULvsBR = false, URvsBL = false; 2081 ULvsBR = refDepthTmp[0][0+offset[0]] < refDepthTmp[3][0+offset[3]]; 2082 URvsBL = refDepthTmp[0][0+offset[3]] < refDepthTmp[3][0+offset[0]]; 2083 refDepStrideBlock = refDepStride * blocksize; 2084 refDepStrideSubBlock = refDepStride * subblocksize; 2085 refDepthTmp[0] = refDepth; 2086 refDepthTmp[2] = refDepthTmp[0] + refDepStrideSubBlock; 2087 refDepthTmp[1] = refDepthTmp[2] - refDepStride; 2088 refDepthTmp[3] = refDepthTmp[1] + refDepStrideSubBlock; 2089 offset[3] = blocksize-1; 2090 if( ULvsBR ^ URvsBL ) 2091 { 2092 vspSize = 0;//4x8 2093 for( Int y=0; y<height; y+=blocksize ) 2094 { 2095 for( Int x=0; x<width; x+=blocksize ) 2096 { 2097 { // 4x8 2098 repDepth4x8[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[1]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[1]]; 2099 if( repDepth4x8[0] < refDepthTmp[3][x+offset[0]] ) 2100 { 2101 repDepth4x8[0] = refDepthTmp[3][x+offset[0]]; 2102 } 2103 if( repDepth4x8[0] < refDepthTmp[3][x+offset[1]] ) 2104 { 2105 repDepth4x8[0] = refDepthTmp[3][x+offset[1]]; 2106 } 2107 repDepth4x8[1] = refDepthTmp[0][x+offset[2]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[2]] : refDepthTmp[0][x+offset[3]]; 2108 if( repDepth4x8[1] < refDepthTmp[3][x+offset[2]] ) 2109 { 2110 repDepth4x8[1] = refDepthTmp[3][x+offset[2]]; 2111 } 2112 if( repDepth4x8[1] < refDepthTmp[3][x+offset[3]] ) 2113 { 2114 repDepth4x8[1] = refDepthTmp[3][x+offset[3]]; 2115 } 2116 2117 depthTmp = &depth[x]; 2118 for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY ) 2119 { 2120 for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX ) 2121 { 2122 depthTmp[sX] = repDepth4x8[0]; 2123 } 2124 depthTmp += depStrideTmp; 2125 } 2126 depthTmp = &depth[x+subblocksize]; 2127 for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY ) 2128 { 2129 for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX ) 2130 { 2131 depthTmp[sX] = repDepth4x8[1]; 2132 } 2133 depthTmp += depStrideTmp; 2134 } 2135 } 2136 } 2137 refDepthTmp[0] += refDepStrideBlock; 2138 refDepthTmp[1] += refDepStrideBlock; 2139 refDepthTmp[2] += refDepStrideBlock; 2140 refDepthTmp[3] += refDepStrideBlock; 2141 depth += depStrideBlock; 2142 } 2143 } 2144 else 2145 { // 8x4 2146 vspSize = 1; 2147 for( Int y=0; y<height; y+=blocksize ) 2148 { 2149 for( Int x=0; x<width; x+=blocksize ) 2150 { 2151 repDepth8x4[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[3]]; 2152 if( repDepth8x4[0] < refDepthTmp[1][x+offset[0]] ) 2153 { 2154 repDepth8x4[0] = refDepthTmp[1][x+offset[0]]; 2155 } 2156 if( repDepth8x4[0] < refDepthTmp[1][x+offset[3]] ) 2157 { 2158 repDepth8x4[0] = refDepthTmp[1][x+offset[3]]; 2159 } 2160 repDepth8x4[1] = refDepthTmp[2][x+offset[0]] > refDepthTmp[2][x+offset[3]] ? refDepthTmp[2][x+offset[0]] : refDepthTmp[2][x+offset[3]]; 2161 if( repDepth8x4[1] < refDepthTmp[3][x+offset[0]] ) 2162 { 2163 repDepth8x4[1] = refDepthTmp[3][x+offset[0]]; 2164 } 2165 if( repDepth8x4[1] < refDepthTmp[3][x+offset[3]] ) 2166 { 2167 repDepth8x4[1] = refDepthTmp[3][x+offset[3]]; 2168 } 2169 2170 depthTmp = &depth[x]; 2171 for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY ) 2172 { 2173 for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX ) 2174 { 2175 depthTmp[sX] = repDepth8x4[0]; 2176 } 2177 depthTmp += depStrideTmp; 2178 } 2179 for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY ) 2180 { 2181 for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX ) 2182 { 2183 depthTmp[sX] = repDepth8x4[1]; 2184 } 2185 depthTmp += depStrideTmp; 2186 } 2187 } 2188 refDepthTmp[0] += refDepStrideBlock; 2189 refDepthTmp[1] += refDepStrideBlock; 2190 refDepthTmp[2] += refDepStrideBlock; 2191 refDepthTmp[3] += refDepStrideBlock; 2192 depth += depStrideBlock; 2193 } 2194 } 2195 #endif 2196 #endif 2197 #if !SHARP_VSP_BLOCK_IN_AMP_F0102 2198 } 2199 #endif 2200 2201 2202 } 2203 #if MTK_F0109_LG_F0120_VSP_BLOCK 1814 } 1815 } 1816 2204 1817 Void TComPrediction::xPredInterLumaBlkFromDM( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi, Int vspSize) 2205 #else2206 Void TComPrediction::xPredInterLumaBlkFromDM( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi )2207 #endif2208 1818 { 2209 1819 Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE; 2210 1820 Int nTxtPerDepthY = H_3D_VSP_BLOCKSIZE; 2211 1821 2212 #if MTK_F0109_LG_F0120_VSP_BLOCK2213 1822 nTxtPerDepthX = nTxtPerDepthX << vspSize; 2214 1823 nTxtPerDepthY = nTxtPerDepthY << (1-vspSize); 2215 #endif 1824 2216 1825 Int refStride = picRef->getStride(); 2217 1826 Int dstStride = yuvDst->getStride(); … … 2319 1928 } 2320 1929 2321 #if MTK_F0109_LG_F0120_VSP_BLOCK2322 1930 Void TComPrediction::xPredInterChromaBlkFromDM ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi, Int vspSize) 2323 #else2324 Void TComPrediction::xPredInterChromaBlkFromDM ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi )2325 #endif2326 1931 { 2327 1932 #if (H_3D_VSP_BLOCKSIZE==1) … … 2333 1938 #endif 2334 1939 2335 #if MTK_F0109_LG_F0120_VSP_BLOCK2336 1940 nTxtPerDepthX = nTxtPerDepthX << vspSize; 2337 1941 nTxtPerDepthY = nTxtPerDepthY << (1-vspSize); 2338 #endif 1942 2339 1943 Int refStride = picRef->getCStride(); 2340 1944 Int dstStride = yuvDst->getCStride();
Note: See TracChangeset for help on using the changeset viewer.