Ignore:
Timestamp:
12 Jan 2014, 02:46:46 (10 years ago)
Author:
tech
Message:

Cleanup part 2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComPrediction.cpp

    r764 r765  
    520520}
    521521
    522 #if MTK_SPIVMP_F0110
     522#if H_3D_SPIVMP
    523523Void TComPrediction::xGetSubPUAddrAndMerge(TComDataCU* pcCU, UInt uiPartAddr, Int iSPWidth, Int iSPHeight, Int iNumSPInOneLine, Int iNumSP, UInt* uiMergedSPW, UInt* uiMergedSPH, UInt* uiSPAddr )
    524524{
     
    631631      else
    632632      {
    633 #if MTK_SPIVMP_F0110
     633#if H_3D_SPIVMP
    634634        if ( pcCU->getSPIVMPFlag(uiPartAddr)!=0) 
    635635        {
     
    671671            xPredInterBi  (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );
    672672          }
    673 #if MTK_SPIVMP_F0110
     673#if H_3D_SPIVMP
    674674        }
    675675#endif
     
    717717      else
    718718      {
    719 #if MTK_SPIVMP_F0110
     719#if H_3D_SPIVMP
    720720       if (pcCU->getSPIVMPFlag(uiPartAddr)!=0) 
    721721      {
     
    756756          xPredInterBi  (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );
    757757        }
    758 #if MTK_SPIVMP_F0110
     758#if H_3D_SPIVMP
    759759       }
    760760#endif
     
    784784  pcCU->clipMv(cMv);
    785785#if H_3D_ARP
    786 #if QC_MTK_INTERVIEW_ARP_F0123_F0108
    787786  if(pcCU->getARPW( uiPartAddr ) > 0  && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC())
    788787  {
    789       xPredInterUniARPviewRef( pcCU , uiPartAddr , iWidth , iHeight , eRefPicList , rpcYuvPred , bi );
     788    xPredInterUniARPviewRef( pcCU , uiPartAddr , iWidth , iHeight , eRefPicList , rpcYuvPred , bi );
    790789  }
    791790  else
    792 #endif
    793   if(  pcCU->getARPW( uiPartAddr ) > 0
    794     && pcCU->getPartitionSize(uiPartAddr)==SIZE_2Nx2N
    795     && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()!= pcCU->getSlice()->getPOC()
    796     )
    797   {
    798     xPredInterUniARP( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, rpcYuvPred, bi );
    799   }
    800   else
    801   {
     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    {
    802801#endif
    803802#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, bi
     803      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
    806805#if H_3D_ARP
    807       , false
    808 #endif
    809       , bICFlag );
    810     bICFlag = bICFlag && (iWidth > 8);
    811     xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi
     806        , 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
    812811#if H_3D_ARP
    813       , false
    814 #endif
    815       , bICFlag );
     812        , false
     813#endif
     814        , bICFlag );
    816815#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 );
    819818#endif
    820819#if H_3D_ARP
     820    }
    821821  }
    822822#endif
     
    872872  pcBaseViewDepthPicYuv->extendPicBorder();
    873873
    874 #if MTK_F0109_LG_F0120_VSP_BLOCK
    875874  Int vspSize=0;
    876875  xGetVirtualDepth( pcCU, pcBaseViewDepthPicYuv, &cDv, uiPartAddr, iWidth, iHeight, &m_cYuvDepthOnVsp,vspSize );
     
    878877  xPredInterLumaBlkFromDM   ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize);
    879878  xPredInterChromaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize);
    880 #else
    881   xGetVirtualDepth( pcCU, pcBaseViewDepthPicYuv, &cDv, uiPartAddr, iWidth, iHeight, &m_cYuvDepthOnVsp );
    882   // sub-PU based compensation
    883   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 #endif
    886879}
    887880#endif
     
    913906  if( cDistparity.bDV )
    914907  {
    915 #if SHARP_ARP_REF_CHECK_F0105
    916908    Int arpRefIdx = pcCU->getSlice()->getFirstTRefIdx(eRefPicList);
    917909    if( dW > 0 && pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC()!= pcCU->getSlice()->getPOC() )
    918 #else
    919     if( dW > 0 && pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC()!= pcCU->getSlice()->getPOC() )
    920 #endif
    921910    {
    922911      bTobeScaled = true;
     
    925914    pcPicYuvBaseCol =  pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getPOC(),                              cDistparity.m_aVIdxCan );
    926915
    927 #if SHARP_ARP_REF_CHECK_F0105
    928916    pcPicYuvBaseRef =  pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC(), cDistparity.m_aVIdxCan );
    929917
    930918    if (!pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, cDistparity.m_aVIdxCan))
    931 #else
    932     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 #endif
    936919    {
    937920      dW = 0;
     
    940923    else
    941924    {
    942 #if SHARP_ARP_REF_CHECK_F0105
    943925      assert( pcPicYuvBaseCol->getPOC() == pcCU->getSlice()->getPOC() && pcPicYuvBaseRef->getPOC() == pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC() );
    944 #else
    945       assert( pcPicYuvBaseCol->getPOC() == pcCU->getSlice()->getPOC() && pcPicYuvBaseRef->getPOC() == pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC() );
    946 #endif
    947926    }
    948927
     
    993972  }
    994973}
    995 #if QC_MTK_INTERVIEW_ARP_F0123_F0108
    996974Void TComPrediction::xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled )
    997975{
     
    1015993
    1016994  assert(dW > 0);
    1017 #if SHARP_ARP_REF_CHECK_F0105
    1018995  if (!pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, pcPicYuvBaseCol->getViewIndex()))
    1019996  {
    1020997    dW = 0;
    1021998  }
    1022 #endif
    1023999  Int uiLCUAddr,uiAbsPartAddr;
    10241000  Int irefPUX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[uiPartAddr]] + iWidth/2  + ((cDMv.getHor() + 2)>>2);
     
    10981074  }
    10991075}
    1100 #endif
    11011076
    11021077#endif
     
    17581733#if H_3D_VSP
    17591734// not fully support iRatioTxtPerDepth* != 1
    1760 #if MTK_F0109_LG_F0120_VSP_BLOCK
    17611735Void TComPrediction::xGetVirtualDepth( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *mv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int &vspSize, Int ratioTxtPerDepthX, Int ratioTxtPerDepthY )
    1762 #else
    1763 Void TComPrediction::xGetVirtualDepth( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *mv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int ratioTxtPerDepthX, Int ratioTxtPerDepthY )
    1764 #endif
    17651736{
    17661737  Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE;
     
    17901761  Pel *depth = yuvDepth->getLumaAddr();
    17911762
    1792 #if !SHARP_VSP_BLOCK_IN_AMP_F0102
    1793   if( width<8 || height<8 )
    1794   { // no split
    1795     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_BLOCK
    1813   if(width==4)
    1814     vspSize=0;
    1815   else
    1816     vspSize=1;
    1817 #endif
    1818   }
    1819   else
    1820   { // split to 4x8, or 8x4
    1821     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 #endif
    1831 
    1832 #if !MTK_F0109_LG_F0120_VSP_BLOCK
    1833 #if SHARP_VSP_BLOCK_IN_AMP_F0102
    1834     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 #endif
    1842     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_F0102
    1851     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 split
    1859       blockH = height; // no further split
    1860     }
    1861     else if (width % 8)
    1862     {
    1863       subBlockW = 4;
    1864       subBlockH = 8;
    1865       blockW = width;  // no further split
    1866       blockH = height; // no further split
    1867     }
    1868     else
    1869     {
    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           { // 4x8
    1883             subBlockW = 4;
    1884             subBlockH = 8;
    1885           }
    1886           else
    1887           {
    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_F0102
    1922     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         { // 4x8
    1933           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         else
    1972         { // 8x4
    1973           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_F0102
    2018 #else
    2019 #if SHARP_VSP_BLOCK_IN_AMP_F0102
    20201763  if ((height % 8))
    20211764  {
     
    20691812      }
    20701813    }
    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
    22041817Void 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 #else
    2206 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 #endif
    22081818{
    22091819  Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE;
    22101820  Int nTxtPerDepthY = H_3D_VSP_BLOCKSIZE;
    22111821 
    2212 #if MTK_F0109_LG_F0120_VSP_BLOCK
    22131822  nTxtPerDepthX = nTxtPerDepthX << vspSize;
    22141823  nTxtPerDepthY = nTxtPerDepthY << (1-vspSize);
    2215 #endif
     1824
    22161825  Int refStride = picRef->getStride();
    22171826  Int dstStride = yuvDst->getStride();
     
    23191928}
    23201929
    2321 #if MTK_F0109_LG_F0120_VSP_BLOCK
    23221930Void 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 #else
    2324 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 #endif
    23261931{
    23271932#if (H_3D_VSP_BLOCKSIZE==1)
     
    23331938#endif
    23341939
    2335 #if MTK_F0109_LG_F0120_VSP_BLOCK
    23361940  nTxtPerDepthX = nTxtPerDepthX << vspSize;
    23371941  nTxtPerDepthY = nTxtPerDepthY << (1-vspSize);
    2338 #endif
     1942
    23391943  Int refStride = picRef->getCStride();
    23401944  Int dstStride = yuvDst->getCStride();
Note: See TracChangeset for help on using the changeset viewer.