Changeset 704 in 3DVCSoftware


Ignore:
Timestamp:
16 Nov 2013, 03:51:33 (10 years ago)
Author:
mediatek-htm
Message:

Xianguo Zhang from MediaTek integrated the changes in F0109 and F0120 in the software, also including the crosscheck result of F0105 and new software performance.

Location:
branches/HTM-8.2-dev1-MTK-LG/source/Lib/TLibCommon
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-8.2-dev1-MTK-LG/source/Lib/TLibCommon/TComPrediction.cpp

    r693 r704  
    751751  // fetch virtual depth map
    752752  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
    753761  xGetVirtualDepth( pcCU, pcBaseViewDepthPicYuv, &cDv, uiPartAddr, iWidth, iHeight, &m_cYuvDepthOnVsp );
    754762  // sub-PU based compensation
    755763  xPredInterLumaBlkFromDM   ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );
    756764  xPredInterChromaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );
     765#endif
    757766}
    758767#endif
     
    16291638#if H_3D_VSP
    16301639// not fully support iRatioTxtPerDepth* != 1
     1640#if MTK_F0109_LG_F0120_VSP_BLOCK
     1641Void TComPrediction::xGetVirtualDepth( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *mv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int &vspSize, Int ratioTxtPerDepthX, Int ratioTxtPerDepthY )
     1642#else
    16311643Void TComPrediction::xGetVirtualDepth( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *mv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int ratioTxtPerDepthX, Int ratioTxtPerDepthY )
     1644#endif
    16321645{
    16331646  Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE;
     
    16761689      depth += depStrideBlock;
    16771690    }
     1691#if MTK_F0109_LG_F0120_VSP_BLOCK
     1692  if(width==4)
     1693    vspSize=0;
     1694  else
     1695    vspSize=1;
     1696#endif
    16781697  }
    16791698  else
     
    16891708    Pel repDepth8x4[2] = {0, 0};
    16901709
     1710#if !MTK_F0109_LG_F0120_VSP_BLOCK
    16911711    Int refDepStrideBlock    = refDepStride * blocksize;
    16921712    Int refDepStrideSubBlock = refDepStride * subblocksize;
     
    17921812      depth       += depStrideBlock;
    17931813    }
    1794   }
    1795 
    1796 
    1797 }
    1798 
     1814#else
     1815    Int refDepStrideBlock    = refDepStride * height;
     1816    Int refDepStrideSubBlock = refDepStride * height/2;
     1817    refDepthTmp[0] = refDepth;
     1818    refDepthTmp[2] = refDepthTmp[0] + refDepStrideSubBlock;
     1819    refDepthTmp[1] = refDepthTmp[2] - refDepStride;
     1820    refDepthTmp[3] = refDepthTmp[1] + refDepStrideSubBlock;
     1821    offset[3] = width-1;
     1822    Bool ULvsBR = false, URvsBL = false;
     1823    ULvsBR = refDepthTmp[0][0+offset[0]] < refDepthTmp[3][0+offset[3]];
     1824    URvsBL = refDepthTmp[0][0+offset[3]] < refDepthTmp[3][0+offset[0]];
     1825    refDepStrideBlock    = refDepStride * blocksize;
     1826    refDepStrideSubBlock = refDepStride * subblocksize;
     1827    refDepthTmp[0] = refDepth;
     1828    refDepthTmp[2] = refDepthTmp[0] + refDepStrideSubBlock;
     1829    refDepthTmp[1] = refDepthTmp[2] - refDepStride;
     1830    refDepthTmp[3] = refDepthTmp[1] + refDepStrideSubBlock;
     1831    offset[3] = blocksize-1;
     1832    if( ULvsBR ^ URvsBL )
     1833    {
     1834    vspSize = 0;//4x8
     1835    for( Int y=0; y<height; y+=blocksize )
     1836    {
     1837      for( Int x=0; x<width; x+=blocksize )
     1838      {
     1839        { // 4x8
     1840          repDepth4x8[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[1]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[1]];
     1841          if( repDepth4x8[0] < refDepthTmp[3][x+offset[0]] )
     1842          {
     1843            repDepth4x8[0] = refDepthTmp[3][x+offset[0]];
     1844          }
     1845          if( repDepth4x8[0] < refDepthTmp[3][x+offset[1]] )
     1846          {
     1847            repDepth4x8[0] = refDepthTmp[3][x+offset[1]];
     1848          }
     1849          repDepth4x8[1] = refDepthTmp[0][x+offset[2]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[2]] : refDepthTmp[0][x+offset[3]];
     1850          if( repDepth4x8[1] < refDepthTmp[3][x+offset[2]] )
     1851          {
     1852            repDepth4x8[1] = refDepthTmp[3][x+offset[2]];
     1853          }
     1854          if( repDepth4x8[1] < refDepthTmp[3][x+offset[3]] )
     1855          {
     1856            repDepth4x8[1] = refDepthTmp[3][x+offset[3]];
     1857          }
     1858
     1859          depthTmp = &depth[x];
     1860          for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY )
     1861          {
     1862            for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX )
     1863            {
     1864              depthTmp[sX] = repDepth4x8[0];
     1865            }
     1866            depthTmp += depStrideTmp;
     1867          }
     1868          depthTmp = &depth[x+subblocksize];
     1869          for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY )
     1870          {
     1871            for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX )
     1872            {
     1873              depthTmp[sX] = repDepth4x8[1];
     1874            }
     1875            depthTmp += depStrideTmp;
     1876          }
     1877        }
     1878      }
     1879      refDepthTmp[0] += refDepStrideBlock;
     1880      refDepthTmp[1] += refDepStrideBlock;
     1881      refDepthTmp[2] += refDepStrideBlock;
     1882      refDepthTmp[3] += refDepStrideBlock;
     1883      depth       += depStrideBlock;
     1884    }
     1885  }
     1886  else
     1887  { // 8x4
     1888    vspSize = 1;
     1889    for( Int y=0; y<height; y+=blocksize )
     1890    {
     1891      for( Int x=0; x<width; x+=blocksize )
     1892      {
     1893        repDepth8x4[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[3]];
     1894        if( repDepth8x4[0] < refDepthTmp[1][x+offset[0]] )
     1895        {
     1896          repDepth8x4[0] = refDepthTmp[1][x+offset[0]];
     1897        }
     1898        if( repDepth8x4[0] < refDepthTmp[1][x+offset[3]] )
     1899        {
     1900          repDepth8x4[0] = refDepthTmp[1][x+offset[3]];
     1901        }
     1902        repDepth8x4[1] = refDepthTmp[2][x+offset[0]] > refDepthTmp[2][x+offset[3]] ? refDepthTmp[2][x+offset[0]] : refDepthTmp[2][x+offset[3]];
     1903        if( repDepth8x4[1] < refDepthTmp[3][x+offset[0]] )
     1904        {
     1905          repDepth8x4[1] = refDepthTmp[3][x+offset[0]];
     1906        }
     1907        if( repDepth8x4[1] < refDepthTmp[3][x+offset[3]] )
     1908        {
     1909          repDepth8x4[1] = refDepthTmp[3][x+offset[3]];
     1910        }
     1911
     1912        depthTmp = &depth[x];
     1913        for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY )
     1914        {
     1915          for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX )
     1916          {
     1917            depthTmp[sX] = repDepth8x4[0];
     1918          }
     1919          depthTmp += depStrideTmp;
     1920        }
     1921        for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY )
     1922        {
     1923          for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX )
     1924          {
     1925            depthTmp[sX] = repDepth8x4[1];
     1926          }
     1927          depthTmp += depStrideTmp;
     1928        }
     1929      }
     1930      refDepthTmp[0] += refDepStrideBlock;
     1931      refDepthTmp[1] += refDepStrideBlock;
     1932      refDepthTmp[2] += refDepStrideBlock;
     1933      refDepthTmp[3] += refDepStrideBlock;
     1934      depth       += depStrideBlock;
     1935    }
     1936  }
     1937#endif
     1938  }
     1939
     1940
     1941}
     1942#if MTK_F0109_LG_F0120_VSP_BLOCK
     1943Void 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)
     1944#else
    17991945Void TComPrediction::xPredInterLumaBlkFromDM( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi )
     1946#endif
    18001947{
    18011948  Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE;
    18021949  Int nTxtPerDepthY = H_3D_VSP_BLOCKSIZE;
    1803  
     1950
     1951#if MTK_F0109_LG_F0120_VSP_BLOCK
     1952  nTxtPerDepthX = nTxtPerDepthX << vspSize;
     1953  nTxtPerDepthY = nTxtPerDepthY << (1-vspSize);
     1954#endif
    18041955  Int refStride = picRef->getStride();
    18051956  Int dstStride = yuvDst->getStride();
     
    19062057
    19072058}
    1908 
     2059#if MTK_F0109_LG_F0120_VSP_BLOCK
     2060Void 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)
     2061#else
    19092062Void TComPrediction::xPredInterChromaBlkFromDM  ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi )
     2063#endif
    19102064{
    19112065#if (H_3D_VSP_BLOCKSIZE==1)
     
    19172071#endif
    19182072
     2073#if MTK_F0109_LG_F0120_VSP_BLOCK
     2074  nTxtPerDepthX = nTxtPerDepthX << vspSize;
     2075  nTxtPerDepthY = nTxtPerDepthY << (1-vspSize);
     2076#endif
    19192077  Int refStride = picRef->getCStride();
    19202078  Int dstStride = yuvDst->getCStride();
  • branches/HTM-8.2-dev1-MTK-LG/source/Lib/TLibCommon/TComPrediction.h

    r666 r704  
    123123
    124124#if H_3D_VSP
     125#if MTK_F0109_LG_F0120_VSP_BLOCK
     126  Void xGetVirtualDepth           ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int &vspSize, Int txtPerDepthX=1, Int txtPerDepthY=1 );
     127  Void xPredInterLumaBlkFromDM    ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi, Int vspSize);
     128  Void xPredInterChromaBlkFromDM  ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi, Int vspSize);
     129#else
    125130  Void xGetVirtualDepth           ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int txtPerDepthX=1, Int txtPerDepthY=1 );
    126131  Void xPredInterLumaBlkFromDM    ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi );
    127132  Void xPredInterChromaBlkFromDM  ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi );
     133#endif
    128134#endif
    129135
  • branches/HTM-8.2-dev1-MTK-LG/source/Lib/TLibCommon/TypeDef.h

    r693 r704  
    225225///// ***** VIEW SYNTHESIS PREDICTION *********
    226226#if H_3D_VSP
     227#define MTK_F0109_LG_F0120_VSP_BLOCK      1   // MTK_LG_SIMPLIFY_VSP_BLOCK_PARTITION_F0109_F0120 
    227228#define H_3D_VSP_BLOCKSIZE                4   // Supported values: 1, 2, and 4
    228229#if H_3D_VSP_BLOCKSIZE == 1
Note: See TracChangeset for help on using the changeset viewer.