- Timestamp:
- 21 Nov 2013, 11:01:25 (11 years ago)
- Location:
- branches/HTM-8.2-dev0/source/Lib
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-8.2-dev0/source/Lib/TLibCommon/ContextTables.h
r655 r710 371 371 INIT_ARPW[3][NUM_ARPW_CTX] = 372 372 { 373 #if LGE_ARP_CTX_F0161 374 { 162, 153, 154, 162 }, 375 { 162, 153, 154, 162 }, 376 { 162, 153, 154, 162 }, 377 #else 373 378 { 154, 154, 154, 154 }, 374 379 { 154, 154, 154, 154 }, 375 380 { 154, 154, 154, 154 }, 381 #endif 376 382 }; 377 383 #endif -
branches/HTM-8.2-dev0/source/Lib/TLibCommon/TComPrediction.cpp
r655 r710 664 664 pcCU->clipMv(cMv); 665 665 #if H_3D_ARP 666 #if QC_MTK_INTERVIEW_ARP_F0123_F0108 667 if(pcCU->getARPW( uiPartAddr ) > 0 && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC()) 668 { 669 xPredInterUniARPviewRef( pcCU , uiPartAddr , iWidth , iHeight , eRefPicList , rpcYuvPred , bi ); 670 } 671 else 672 #endif 666 673 if( pcCU->getARPW( uiPartAddr ) > 0 667 674 && pcCU->getPartitionSize(uiPartAddr)==SIZE_2Nx2N … … 744 751 // fetch virtual depth map 745 752 pcBaseViewDepthPicYuv->extendPicBorder(); 753 754 #if MTK_F0109_LG_F0120_VSP_BLOCK 755 Int vspSize=0; 756 xGetVirtualDepth( pcCU, pcBaseViewDepthPicYuv, &cDv, uiPartAddr, iWidth, iHeight, &m_cYuvDepthOnVsp,vspSize ); 757 // sub-PU based compensation 758 xPredInterLumaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize); 759 xPredInterChromaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize); 760 #else 746 761 xGetVirtualDepth( pcCU, pcBaseViewDepthPicYuv, &cDv, uiPartAddr, iWidth, iHeight, &m_cYuvDepthOnVsp ); 747 762 // sub-PU based compensation 748 763 xPredInterLumaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi ); 749 764 xPredInterChromaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi ); 765 #endif 750 766 } 751 767 #endif … … 777 793 if( cDistparity.bDV ) 778 794 { 795 #if SHARP_ARP_REF_CHECK_F0105 796 Int arpRefIdx = pcCU->getSlice()->getFirstTRefIdx(eRefPicList); 797 if( dW > 0 && pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC()!= pcCU->getSlice()->getPOC() ) 798 #else 779 799 if( dW > 0 && pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC()!= pcCU->getSlice()->getPOC() ) 800 #endif 780 801 { 781 802 bTobeScaled = true; … … 783 804 784 805 pcPicYuvBaseCol = pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getPOC(), cDistparity.m_aVIdxCan ); 806 807 #if SHARP_ARP_REF_CHECK_F0105 808 pcPicYuvBaseRef = pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC(), cDistparity.m_aVIdxCan ); 809 810 if (!pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, cDistparity.m_aVIdxCan)) 811 #else 785 812 pcPicYuvBaseRef = pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC(), cDistparity.m_aVIdxCan ); 786 813 787 814 if( ( !pcPicYuvBaseCol || pcPicYuvBaseCol->getPOC() != pcCU->getSlice()->getPOC() ) || ( !pcPicYuvBaseRef || pcPicYuvBaseRef->getPOC() != pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC() ) ) 815 #endif 788 816 { 789 817 dW = 0; … … 792 820 else 793 821 { 822 #if SHARP_ARP_REF_CHECK_F0105 823 assert( pcPicYuvBaseCol->getPOC() == pcCU->getSlice()->getPOC() && pcPicYuvBaseRef->getPOC() == pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC() ); 824 #else 794 825 assert( pcPicYuvBaseCol->getPOC() == pcCU->getSlice()->getPOC() && pcPicYuvBaseRef->getPOC() == pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC() ); 826 #endif 795 827 } 796 828 … … 841 873 } 842 874 } 875 #if QC_MTK_INTERVIEW_ARP_F0123_F0108 876 Void TComPrediction::xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled ) 877 { 878 Int iRefIdx = pcCU->getCUMvField( eRefPicList )->getRefIdx( uiPartAddr ); 879 TComMv cDMv = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr ); 880 TComMv cTempDMv = cDMv; 881 UChar dW = pcCU->getARPW ( uiPartAddr ); 882 883 TComPic* pcPicYuvBaseTRef = NULL; 884 TComPic* pcPicYuvCurrTRef = NULL; 885 TComPic* pcPicYuvBaseCol = pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx ); 886 TComPicYuv* pcYuvBaseCol = pcPicYuvBaseCol->getPicYuvRec(); 887 Bool bTMVAvai = false; 888 TComMv cBaseTMV; 889 if( pNewMvFiled ) 890 { 891 iRefIdx = pNewMvFiled->getRefIdx(); 892 cDMv = pNewMvFiled->getMv(); 893 } 894 pcCU->clipMv(cTempDMv); 895 896 assert(dW > 0); 897 #if SHARP_ARP_REF_CHECK_F0105 898 if (!pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, pcPicYuvBaseCol->getViewIndex())) 899 { 900 dW = 0; 901 } 902 #endif 903 Int uiLCUAddr,uiAbsPartAddr; 904 Int irefPUX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[uiPartAddr]] + iWidth/2 + ((cDMv.getHor() + 2)>>2); 905 Int irefPUY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[uiPartAddr]] + iHeight/2 + ((cDMv.getVer() + 2)>>2); 906 907 irefPUX = (Int)Clip3<Int>(0, pcCU->getSlice()->getSPS()-> getPicWidthInLumaSamples()-1, irefPUX); 908 irefPUY = (Int)Clip3<Int>(0, pcCU->getSlice()->getSPS()->getPicHeightInLumaSamples()-1, irefPUY); 909 pcYuvBaseCol->getCUAddrAndPartIdx( irefPUX, irefPUY, uiLCUAddr, uiAbsPartAddr); 910 TComDataCU *pColCU = pcPicYuvBaseCol->getCU( uiLCUAddr ); 911 912 if(!pColCU->isIntra(uiAbsPartAddr)) 913 { 914 TComMvField puMVField; 915 for(Int iList = 0; iList < (pColCU->getSlice()->isInterB() ? 2: 1) && !bTMVAvai; iList ++) 916 { 917 RefPicList eRefPicListCurr = RefPicList(iList); 918 Int iRef = pColCU->getCUMvField(eRefPicListCurr)->getRefIdx(uiAbsPartAddr); 919 if( iRef != -1) 920 { 921 pcPicYuvBaseTRef = pColCU->getSlice()->getRefPic(eRefPicListCurr, iRef); 922 Int iCurrPOC = pColCU->getSlice()->getPOC(); 923 Int iCurrRefPOC = pcPicYuvBaseTRef->getPOC(); 924 Int iCurrRef = pcCU->getSlice()->getFirstTRefIdx(eRefPicListCurr); 925 if( iCurrRef >= 0) 926 { 927 pcPicYuvCurrTRef = pcCU->getSlice()->getRefPic(eRefPicListCurr,iCurrRef); 928 Int iTargetPOC = pcPicYuvCurrTRef->getPOC(); 929 { 930 pcPicYuvBaseTRef = pcCU->getSlice()->getBaseViewRefPic(iTargetPOC, pcPicYuvBaseCol->getViewIndex() ); 931 if(pcPicYuvBaseTRef) 932 { 933 cBaseTMV = pColCU->getCUMvField(eRefPicListCurr)->getMv(uiAbsPartAddr); 934 Int iScale = pcCU-> xGetDistScaleFactor(iCurrPOC, iTargetPOC, iCurrPOC, iCurrRefPOC); 935 if ( iScale != 4096 ) 936 cBaseTMV = cBaseTMV.scaleMv( iScale ); 937 bTMVAvai = true; 938 break; 939 } 940 } 941 } 942 } 943 } 944 } 945 if (bTMVAvai == false) 946 { 947 bTMVAvai = true; 948 cBaseTMV.set(0, 0); 949 pcPicYuvBaseTRef = pColCU->getSlice()->getRefPic(eRefPicList, pcCU->getSlice()->getFirstTRefIdx(eRefPicList)); 950 pcPicYuvCurrTRef = pcCU->getSlice()->getRefPic (eRefPicList, pcCU->getSlice()->getFirstTRefIdx(eRefPicList)); 951 } 952 953 xPredInterLumaBlk ( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi, bTMVAvai); 954 xPredInterChromaBlk( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi, bTMVAvai); 955 956 if( dW > 0 && bTMVAvai ) 957 { 958 TComYuv* pYuvCurrTRef = &m_acYuvPredBase[0]; 959 TComYuv* pYuvBaseTRef = &m_acYuvPredBase[1]; 960 TComPicYuv* pcYuvCurrTref = pcPicYuvCurrTRef->getPicYuvRec(); 961 TComPicYuv* pcYuvBaseTref = pcPicYuvBaseTRef->getPicYuvRec(); 962 TComMv cTempMv = cDMv + cBaseTMV; 963 964 pcCU->clipMv(cBaseTMV); 965 pcCU->clipMv(cTempMv); 966 967 xPredInterLumaBlk ( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, bi, true); 968 xPredInterChromaBlk( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, bi, true); 969 xPredInterLumaBlk ( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv, iWidth, iHeight, pYuvBaseTRef, bi, true); 970 xPredInterChromaBlk( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv, iWidth, iHeight, pYuvBaseTRef, bi, true); 971 972 pYuvCurrTRef->subtractARP( pYuvCurrTRef , pYuvBaseTRef , uiPartAddr , iWidth , iHeight ); 973 if(dW == 2) 974 { 975 pYuvCurrTRef->multiplyARP( uiPartAddr , iWidth , iHeight , dW ); 976 } 977 rpcYuvPred->addARP( rpcYuvPred , pYuvCurrTRef , uiPartAddr , iWidth , iHeight , !bi ); 978 } 979 } 980 #endif 981 843 982 #endif 844 983 … … 1499 1638 #if H_3D_VSP 1500 1639 // not fully support iRatioTxtPerDepth* != 1 1640 #if MTK_F0109_LG_F0120_VSP_BLOCK 1641 Void TComPrediction::xGetVirtualDepth( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *mv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int &vspSize, Int ratioTxtPerDepthX, Int ratioTxtPerDepthY ) 1642 #else 1501 1643 Void TComPrediction::xGetVirtualDepth( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *mv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int ratioTxtPerDepthX, Int ratioTxtPerDepthY ) 1644 #endif 1502 1645 { 1503 1646 Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE; … … 1527 1670 Pel *depth = yuvDepth->getLumaAddr(); 1528 1671 1672 #if !SHARP_VSP_BLOCK_IN_AMP_F0102 1529 1673 if( width<8 || height<8 ) 1530 1674 { // no split … … 1546 1690 depth += depStrideBlock; 1547 1691 } 1692 #if MTK_F0109_LG_F0120_VSP_BLOCK 1693 if(width==4) 1694 vspSize=0; 1695 else 1696 vspSize=1; 1697 #endif 1548 1698 } 1549 1699 else … … 1558 1708 Pel repDepth4x8[2] = {0, 0}; 1559 1709 Pel repDepth8x4[2] = {0, 0}; 1560 1710 #endif 1711 1712 #if !MTK_F0109_LG_F0120_VSP_BLOCK 1713 #if SHARP_VSP_BLOCK_IN_AMP_F0102 1714 Int blocksize = 8; 1715 Int subblocksize = 4; 1716 Int depStrideBlock = depStride * blocksize; 1717 Pel *depthTmp = NULL; 1718 Int depStrideTmp = depStride * nTxtPerDepthY; 1719 Int offset[4] = { 0, subblocksize-1, subblocksize, blocksize-1 }; 1720 Pel *refDepthTmp[4] = { NULL, NULL, NULL, NULL }; 1721 #endif 1561 1722 Int refDepStrideBlock = refDepStride * blocksize; 1562 1723 Int refDepStrideSubBlock = refDepStride * subblocksize; … … 1567 1728 refDepthTmp[3] = refDepthTmp[1] + refDepStrideSubBlock; 1568 1729 1730 #if SHARP_VSP_BLOCK_IN_AMP_F0102 1731 Int subBlockW, subBlockH; 1732 Int blockW, blockH; 1733 subBlockW = subBlockH = 8; 1734 if (height % 8) 1735 { 1736 subBlockW = 8; 1737 subBlockH = 4; 1738 blockW = width; // no further split 1739 blockH = height; // no further split 1740 } 1741 else if (width % 8) 1742 { 1743 subBlockW = 4; 1744 subBlockH = 8; 1745 blockW = width; // no further split 1746 blockH = height; // no further split 1747 } 1748 else 1749 { 1750 blockW = blockH = 8; 1751 } 1752 for( Int y=0; y<height; y+=blockH ) 1753 { 1754 for( Int x=0; x<width; x+=blockW ) 1755 { 1756 if (blockW == 8 && blockH == 8) 1757 { 1758 Bool ULvsBR = false, URvsBL = false; 1759 ULvsBR = refDepthTmp[0][x+offset[0]] < refDepthTmp[3][x+offset[3]]; 1760 URvsBL = refDepthTmp[0][x+offset[3]] < refDepthTmp[3][x+offset[0]]; 1761 if( ULvsBR ^ URvsBL ) 1762 { // 4x8 1763 subBlockW = 4; 1764 subBlockH = 8; 1765 } 1766 else 1767 { 1768 subBlockW = 8; 1769 subBlockH = 4; 1770 } 1771 } 1772 for( Int yy=0; yy<blockH; yy+=subBlockH ) 1773 { 1774 for( Int xx=0; xx<blockW; xx+=subBlockW ) 1775 { 1776 Pel maxDepthVal = 0; 1777 Int xP0, xP1, yP0, yP1; 1778 xP0 = x+xx; 1779 xP1 = x+xx+subBlockW-1; 1780 yP0 = yy; 1781 yP1 = yy+subBlockH-1; 1782 maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP0+yP0*refDepStride]); 1783 maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP1+yP0*refDepStride]); 1784 maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP0+yP1*refDepStride]); 1785 maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP1+yP1*refDepStride]); 1786 depthTmp = &depth[x+xx+yy*depStride]; 1787 for( Int sY=0; sY<subBlockH; sY+=nTxtPerDepthY ) 1788 { 1789 for( Int sX=0; sX<subBlockW; sX+=nTxtPerDepthX ) 1790 { 1791 depthTmp[sX] = maxDepthVal; 1792 } 1793 depthTmp += depStrideTmp; 1794 } 1795 } 1796 } 1797 } 1798 refDepthTmp[0] += refDepStrideBlock; 1799 depth += depStrideBlock; 1800 } 1801 #else // SHARP_VSP_BLOCK_IN_AMP_F0102 1569 1802 for( Int y=0; y<height; y+=blocksize ) 1570 1803 { … … 1662 1895 depth += depStrideBlock; 1663 1896 } 1664 } 1665 1666 1667 } 1668 1897 #endif // SHARP_VSP_BLOCK_IN_AMP_F0102 1898 #else 1899 #if SHARP_VSP_BLOCK_IN_AMP_F0102 1900 if ((height % 8)) 1901 { 1902 vspSize = 1; // 8x4 1903 } 1904 else if ((width % 8)) 1905 { 1906 vspSize = 0; // 4x8 1907 } 1908 else 1909 { 1910 Bool ULvsBR, URvsBL; 1911 ULvsBR = refDepth[0] < refDepth[refDepStride * (height-1) + width-1]; 1912 URvsBL = refDepth[width-1] < refDepth[refDepStride * (height-1)]; 1913 vspSize = ( ULvsBR ^ URvsBL ) ? 0 : 1; 1914 } 1915 Int subBlockW, subBlockH; 1916 Int depStrideTmp = depStride * nTxtPerDepthY; 1917 if (vspSize) 1918 { 1919 subBlockW = 8; 1920 subBlockH = 4; 1921 } 1922 else 1923 { 1924 subBlockW = 4; 1925 subBlockH = 8; 1926 } 1927 for( Int y=0; y<height; y+=subBlockH ) 1928 { 1929 Pel *refDepthTmp[4]; 1930 refDepthTmp[0] = refDepth + refDepStride * y; 1931 refDepthTmp[1] = refDepthTmp[0] + subBlockW - 1; 1932 refDepthTmp[2] = refDepthTmp[0] + refDepStride * (subBlockH - 1); 1933 refDepthTmp[3] = refDepthTmp[2] + subBlockW - 1; 1934 for( Int x=0; x<width; x+=subBlockW ) 1935 { 1936 Pel maxDepthVal; 1937 maxDepthVal = refDepthTmp[0][x]; 1938 maxDepthVal = std::max( maxDepthVal, refDepthTmp[1][x]); 1939 maxDepthVal = std::max( maxDepthVal, refDepthTmp[2][x]); 1940 maxDepthVal = std::max( maxDepthVal, refDepthTmp[3][x]); 1941 Pel *depthTmp = &depth[x+y*depStride]; 1942 for( Int sY=0; sY<subBlockH; sY+=nTxtPerDepthY ) 1943 { 1944 for( Int sX=0; sX<subBlockW; sX+=nTxtPerDepthX ) 1945 { 1946 depthTmp[sX] = maxDepthVal; 1947 } 1948 depthTmp += depStrideTmp; 1949 } 1950 } 1951 } 1952 #else // SHARP_VSP_BLOCK_IN_AMP_F0102 1953 Int refDepStrideBlock = refDepStride * height; 1954 Int refDepStrideSubBlock = refDepStride * height/2; 1955 refDepthTmp[0] = refDepth; 1956 refDepthTmp[2] = refDepthTmp[0] + refDepStrideSubBlock; 1957 refDepthTmp[1] = refDepthTmp[2] - refDepStride; 1958 refDepthTmp[3] = refDepthTmp[1] + refDepStrideSubBlock; 1959 offset[3] = width-1; 1960 Bool ULvsBR = false, URvsBL = false; 1961 ULvsBR = refDepthTmp[0][0+offset[0]] < refDepthTmp[3][0+offset[3]]; 1962 URvsBL = refDepthTmp[0][0+offset[3]] < refDepthTmp[3][0+offset[0]]; 1963 refDepStrideBlock = refDepStride * blocksize; 1964 refDepStrideSubBlock = refDepStride * subblocksize; 1965 refDepthTmp[0] = refDepth; 1966 refDepthTmp[2] = refDepthTmp[0] + refDepStrideSubBlock; 1967 refDepthTmp[1] = refDepthTmp[2] - refDepStride; 1968 refDepthTmp[3] = refDepthTmp[1] + refDepStrideSubBlock; 1969 offset[3] = blocksize-1; 1970 if( ULvsBR ^ URvsBL ) 1971 { 1972 vspSize = 0;//4x8 1973 for( Int y=0; y<height; y+=blocksize ) 1974 { 1975 for( Int x=0; x<width; x+=blocksize ) 1976 { 1977 { // 4x8 1978 repDepth4x8[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[1]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[1]]; 1979 if( repDepth4x8[0] < refDepthTmp[3][x+offset[0]] ) 1980 { 1981 repDepth4x8[0] = refDepthTmp[3][x+offset[0]]; 1982 } 1983 if( repDepth4x8[0] < refDepthTmp[3][x+offset[1]] ) 1984 { 1985 repDepth4x8[0] = refDepthTmp[3][x+offset[1]]; 1986 } 1987 repDepth4x8[1] = refDepthTmp[0][x+offset[2]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[2]] : refDepthTmp[0][x+offset[3]]; 1988 if( repDepth4x8[1] < refDepthTmp[3][x+offset[2]] ) 1989 { 1990 repDepth4x8[1] = refDepthTmp[3][x+offset[2]]; 1991 } 1992 if( repDepth4x8[1] < refDepthTmp[3][x+offset[3]] ) 1993 { 1994 repDepth4x8[1] = refDepthTmp[3][x+offset[3]]; 1995 } 1996 1997 depthTmp = &depth[x]; 1998 for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY ) 1999 { 2000 for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX ) 2001 { 2002 depthTmp[sX] = repDepth4x8[0]; 2003 } 2004 depthTmp += depStrideTmp; 2005 } 2006 depthTmp = &depth[x+subblocksize]; 2007 for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY ) 2008 { 2009 for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX ) 2010 { 2011 depthTmp[sX] = repDepth4x8[1]; 2012 } 2013 depthTmp += depStrideTmp; 2014 } 2015 } 2016 } 2017 refDepthTmp[0] += refDepStrideBlock; 2018 refDepthTmp[1] += refDepStrideBlock; 2019 refDepthTmp[2] += refDepStrideBlock; 2020 refDepthTmp[3] += refDepStrideBlock; 2021 depth += depStrideBlock; 2022 } 2023 } 2024 else 2025 { // 8x4 2026 vspSize = 1; 2027 for( Int y=0; y<height; y+=blocksize ) 2028 { 2029 for( Int x=0; x<width; x+=blocksize ) 2030 { 2031 repDepth8x4[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[3]]; 2032 if( repDepth8x4[0] < refDepthTmp[1][x+offset[0]] ) 2033 { 2034 repDepth8x4[0] = refDepthTmp[1][x+offset[0]]; 2035 } 2036 if( repDepth8x4[0] < refDepthTmp[1][x+offset[3]] ) 2037 { 2038 repDepth8x4[0] = refDepthTmp[1][x+offset[3]]; 2039 } 2040 repDepth8x4[1] = refDepthTmp[2][x+offset[0]] > refDepthTmp[2][x+offset[3]] ? refDepthTmp[2][x+offset[0]] : refDepthTmp[2][x+offset[3]]; 2041 if( repDepth8x4[1] < refDepthTmp[3][x+offset[0]] ) 2042 { 2043 repDepth8x4[1] = refDepthTmp[3][x+offset[0]]; 2044 } 2045 if( repDepth8x4[1] < refDepthTmp[3][x+offset[3]] ) 2046 { 2047 repDepth8x4[1] = refDepthTmp[3][x+offset[3]]; 2048 } 2049 2050 depthTmp = &depth[x]; 2051 for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY ) 2052 { 2053 for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX ) 2054 { 2055 depthTmp[sX] = repDepth8x4[0]; 2056 } 2057 depthTmp += depStrideTmp; 2058 } 2059 for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY ) 2060 { 2061 for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX ) 2062 { 2063 depthTmp[sX] = repDepth8x4[1]; 2064 } 2065 depthTmp += depStrideTmp; 2066 } 2067 } 2068 refDepthTmp[0] += refDepStrideBlock; 2069 refDepthTmp[1] += refDepStrideBlock; 2070 refDepthTmp[2] += refDepStrideBlock; 2071 refDepthTmp[3] += refDepStrideBlock; 2072 depth += depStrideBlock; 2073 } 2074 } 2075 #endif 2076 #endif 2077 #if !SHARP_VSP_BLOCK_IN_AMP_F0102 2078 } 2079 #endif 2080 2081 2082 } 2083 #if MTK_F0109_LG_F0120_VSP_BLOCK 2084 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) 2085 #else 1669 2086 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 ) 2087 #endif 1670 2088 { 1671 2089 Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE; 1672 2090 Int nTxtPerDepthY = H_3D_VSP_BLOCKSIZE; 1673 2091 2092 #if MTK_F0109_LG_F0120_VSP_BLOCK 2093 nTxtPerDepthX = nTxtPerDepthX << vspSize; 2094 nTxtPerDepthY = nTxtPerDepthY << (1-vspSize); 2095 #endif 1674 2096 Int refStride = picRef->getStride(); 1675 2097 Int dstStride = yuvDst->getStride(); … … 1777 2199 } 1778 2200 2201 #if MTK_F0109_LG_F0120_VSP_BLOCK 2202 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) 2203 #else 1779 2204 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 ) 2205 #endif 1780 2206 { 1781 2207 #if (H_3D_VSP_BLOCKSIZE==1) … … 1787 2213 #endif 1788 2214 2215 #if MTK_F0109_LG_F0120_VSP_BLOCK 2216 nTxtPerDepthX = nTxtPerDepthX << vspSize; 2217 nTxtPerDepthY = nTxtPerDepthY << (1-vspSize); 2218 #endif 1789 2219 Int refStride = picRef->getCStride(); 1790 2220 Int dstStride = yuvDst->getCStride(); -
branches/HTM-8.2-dev0/source/Lib/TLibCommon/TComSlice.cpp
r696 r710 751 751 if ( this->getNumRefIdx( RefPicList( uiRefListIdx ) ) == 0) 752 752 continue; 753 753 #if !SHARP_ARP_REF_CHECK_F0105 754 // move the following to setARPStepNum() to define ARP related thing in ARP function. 755 #if QC_MTK_INTERVIEW_ARP_F0123_F0108 756 for(Int i = 0; i < this->getNumRefIdx(RefPicList(uiRefListIdx)); i++ ) 757 { 758 if ( this->getRefPic(RefPicList(uiRefListIdx), i)->getPOC() != getPOC() ) 759 { 760 this->setFirstTRefIdx (RefPicList(uiRefListIdx), i); 761 break; 762 } 763 } 764 #endif 765 #endif 754 766 Bool bZeroIdxLtFlag = this->getRefPic(RefPicList(uiRefListIdx), 0)->getIsLongTerm(); 755 767 for(Int i = 1; i < this->getNumRefIdx(RefPicList(uiRefListIdx)); i++ ) … … 2834 2846 2835 2847 #if H_3D_ARP 2848 #if SHARP_ARP_REF_CHECK_F0105 2849 Void TComSlice::setARPStepNum( TComPicLists*ivPicLists ) 2850 #else 2836 2851 Void TComSlice::setARPStepNum() 2837 { 2852 #endif 2853 { 2854 #if SHARP_ARP_REF_CHECK_F0105 2855 Bool tempRefPicInListsFlag = false; 2856 #else 2838 2857 Bool bAllIvRef = true; 2839 2858 #endif 2859 #if QC_MTK_INTERVIEW_ARP_F0123_F0108 2860 if(!getVPS()->getUseAdvRP(getLayerId()) || this->isIRAP()) 2861 #else 2840 2862 if(!getVPS()->getUseAdvRP(getLayerId())) 2863 #endif 2841 2864 { 2842 2865 m_nARPStepNum = 0; … … 2844 2867 else 2845 2868 { 2869 #if SHARP_ARP_REF_CHECK_F0105 2870 setFirstTRefIdx (REF_PIC_LIST_0, -1); 2871 setFirstTRefIdx (REF_PIC_LIST_1, -1); 2872 for ( Int refListIdx = 0; refListIdx < ((m_eSliceType==B_SLICE) ? 2 : 1); refListIdx++ ) 2873 { 2874 for(Int i = 0; i < getNumRefIdx(RefPicList(refListIdx)); i++ ) 2875 { 2876 if ( getRefPic(RefPicList(refListIdx), i)->getPOC() != getPOC() ) 2877 { 2878 setFirstTRefIdx (RefPicList(refListIdx), i); 2879 break; 2880 } 2881 } 2882 } 2883 tempRefPicInListsFlag = getFirstTRefIdx(REF_PIC_LIST_0) >= 0 || getFirstTRefIdx(REF_PIC_LIST_1) >= 0; 2884 m_nARPStepNum = tempRefPicInListsFlag ? getVPS()->getARPStepNum(getLayerId()) : 0; 2885 #else 2846 2886 for( Int iRefListId = 0; iRefListId < 2; iRefListId++ ) 2847 2887 { … … 2866 2906 } 2867 2907 m_nARPStepNum = !bAllIvRef ? getVPS()->getARPStepNum(getLayerId()) : 0; 2868 } 2908 #endif 2909 } 2910 #if SHARP_ARP_REF_CHECK_F0105 2911 if (tempRefPicInListsFlag) 2912 { 2913 for ( Int refListIdx = 0; refListIdx < ((m_eSliceType==B_SLICE) ? 2 : 1); refListIdx++ ) 2914 { 2915 RefPicList eRefPicList = RefPicList( refListIdx ); 2916 Int prevPOC = getRefPic(eRefPicList, getFirstTRefIdx(eRefPicList) )->getPOC(); 2917 for( Int i = 0; i < getNumActiveRefLayerPics(); i++ ) 2918 { 2919 Int layerIdInNuh = getRefPicLayerId( i ); 2920 Int viewIdx = getVPS()->getViewId( layerIdInNuh ); 2921 TComPic*pcPicPrev = ivPicLists->getPic(viewIdx, 0, prevPOC); 2922 if (getFirstTRefIdx(eRefPicList) >= 0 && pcPicPrev && pcPicPrev->getSlice( 0 )->isReferenced()) 2923 { 2924 m_arpRefPicAvailable[eRefPicList][layerIdInNuh] = true; 2925 } 2926 else 2927 { 2928 m_arpRefPicAvailable[eRefPicList][layerIdInNuh] = false; 2929 } 2930 } 2931 } 2932 } 2933 #endif 2869 2934 } 2870 2935 #endif -
branches/HTM-8.2-dev0/source/Lib/TLibCommon/TComSlice.h
r696 r710 1739 1739 #endif 1740 1740 #if H_3D_ARP 1741 #if SHARP_ARP_REF_CHECK_F0105 1742 Bool m_arpRefPicAvailable[2][MAX_NUM_LAYERS]; 1743 #endif 1741 1744 TComList<TComPic*> * m_pBaseViewRefPicList[MAX_NUM_LAYERS]; 1742 1745 UInt m_nARPStepNum; 1746 #if QC_MTK_INTERVIEW_ARP_F0123_F0108 1747 Int m_aiFirstTRefIdx [2]; 1748 #endif 1743 1749 #endif 1744 1750 #if H_3D_IC … … 1827 1833 #if H_3D_ARP 1828 1834 Void setBaseViewRefPicList( TComList<TComPic*> *pListPic, Int iViewIdx ) { m_pBaseViewRefPicList[iViewIdx] = pListPic; } 1835 #if SHARP_ARP_REF_CHECK_F0105 1836 Void setARPStepNum( TComPicLists*ivPicLists ); 1837 #else 1829 1838 Void setARPStepNum(); 1839 #endif 1830 1840 TComPic* getBaseViewRefPic ( UInt uiPOC , Int iViewIdx ) { return xGetRefPic( *m_pBaseViewRefPicList[iViewIdx], uiPOC ); } 1831 1841 UInt getARPStepNum( ) { return m_nARPStepNum; } … … 2028 2038 Int getAlterRefIdx ( RefPicList e ) { return m_aiAlterRefIdx[e]; } 2029 2039 #endif 2040 #if QC_MTK_INTERVIEW_ARP_F0123_F0108 2041 Int getFirstTRefIdx ( RefPicList e ) { return m_aiFirstTRefIdx[e]; } 2042 Void setFirstTRefIdx ( RefPicList e, Int i ) { m_aiFirstTRefIdx[e] = i; } 2043 #endif 2044 #if SHARP_ARP_REF_CHECK_F0105 2045 Bool getArpRefPicAvailable( RefPicList e, Int viewIdx) {return m_arpRefPicAvailable[e][getVPS()->getLayerIdInNuh(viewIdx, 0)]; } 2046 #endif 2030 2047 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } 2031 2048 Bool getIsDepth () { return m_isDepth; } -
branches/HTM-8.2-dev0/source/Lib/TLibCommon/TypeDef.h
r708 r710 212 212 #if H_3D_ARP 213 213 #define H_3D_ARP_WFNR 3 214 #define QC_MTK_INTERVIEW_ARP_F0123_F0108 1 //JCT3V-F0123; JCT3V-F0108 215 #define QC_MTK_INTERVIEW_ARP_F0123_F0108 1 //JCT3V-F0123; JCT3V-F0108 216 #define SHARP_ARP_REF_CHECK_F0105 1 // ARP reference picture selection and DPB check 217 #define LGE_ARP_CTX_F0161 1 //JCT3V-F0161 214 218 #endif 215 219 … … 231 235 ///// ***** VIEW SYNTHESIS PREDICTION ********* 232 236 #if H_3D_VSP 237 #define MTK_F0109_LG_F0120_VSP_BLOCK 1 // MTK_LG_SIMPLIFY_VSP_BLOCK_PARTITION_F0109_F0120 238 #define SHARP_VSP_BLOCK_IN_AMP_F0102 1 // VSP partitioning for AMP 233 239 #define H_3D_VSP_BLOCKSIZE 4 // Supported values: 1, 2, and 4 234 240 #if H_3D_VSP_BLOCKSIZE == 1 -
branches/HTM-8.2-dev0/source/Lib/TLibDecoder/TDecTop.cpp
r669 r710 966 966 pcSlice->setRefPicList ( tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true ); 967 967 #if H_3D_ARP 968 #if SHARP_ARP_REF_CHECK_F0105 969 pcSlice->setARPStepNum(m_ivPicLists); 970 #else 968 971 pcSlice->setARPStepNum(); 972 #endif 969 973 if( pcSlice->getARPStepNum() > 1 ) 970 974 { -
branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncCu.cpp
r708 r710 1905 1905 rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level 1906 1906 rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level 1907 #if H_3D_ARP 1907 #if H_3D_ARP && !QC_MTK_INTERVIEW_ARP_F0123_F0108 1908 1908 if( nARPW ) 1909 1909 { … … 2115 2115 m_pcPredSearch->motionCompensation( rpcTempCU , m_ppcPredYuvTemp[uhDepth] ); 2116 2116 2117 #if !QC_MTK_INTERVIEW_ARP_F0123_F0108 2117 2118 if(rpcTempCU->getPartitionSize(0)==SIZE_2Nx2N) 2118 2119 { … … 2132 2133 } 2133 2134 } 2135 #endif 2134 2136 } 2135 2137 else … … 2152 2154 m_ppcWeightedTempCU[uhDepth]->copyPartFrom( rpcTempCU , 0 , uhDepth ); 2153 2155 2156 #if !QC_MTK_INTERVIEW_ARP_F0123_F0108 2154 2157 Bool bSignalflag[2] = { true, true }; 2155 2158 for(UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx ++ ) … … 2166 2169 rpcTempCU->setARPWSubParts( 0 , 0 , uhDepth ); 2167 2170 } 2171 #endif 2168 2172 } 2169 2173 } -
branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncGOP.cpp
r655 r710 724 724 #if H_3D_ARP 725 725 //GT: This seems to be broken when layerId in vps is not equal to layerId in nuh 726 #if SHARP_ARP_REF_CHECK_F0105 727 pcSlice->setARPStepNum(m_ivPicLists); 728 #else 726 729 pcSlice->setARPStepNum(); 730 #endif 727 731 if(pcSlice->getARPStepNum() > 1) 728 732 {
Note: See TracChangeset for help on using the changeset viewer.