Changeset 563 in 3DVCSoftware for branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib


Ignore:
Timestamp:
12 Aug 2013, 06:32:43 (11 years ago)
Author:
mediatek-htm
Message:

Integration of JCT3V-E0168 for unifying clipping operations of uni-prediction and Bi-prediction of IC enabled PUs.
The MACRO is "MTK_CLIPPING_ALIGN_IC_E0168"

By Yi-Wen Chen (yiwen.chen@…)

Location:
branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TComPrediction.cpp

    r553 r563  
    953953  if ( yFrac == 0 )
    954954  {
     955#if MTK_CLIPPING_ALIGN_IC_E0168
     956    m_if.filterHorLuma( ref, refStride, dst, dstStride, width, height, xFrac,       !bi || bICFlag
     957#else
    955958    m_if.filterHorLuma( ref, refStride, dst, dstStride, width, height, xFrac,       !bi
     959#endif
    956960#if H_3D_ARP
    957961    , filterType
     
    961965  else if ( xFrac == 0 )
    962966  {
     967#if MTK_CLIPPING_ALIGN_IC_E0168
     968    m_if.filterVerLuma( ref, refStride, dst, dstStride, width, height, yFrac, true, !bi || bICFlag
     969#else
    963970    m_if.filterVerLuma( ref, refStride, dst, dstStride, width, height, yFrac, true, !bi
     971#endif
    964972#if H_3D_ARP
    965973    , filterType
     
    980988#endif
    981989      );
     990#if MTK_CLIPPING_ALIGN_IC_E0168
     991    m_if.filterVerLuma(tmp + (halfFilterSize-1)*tmpStride, tmpStride, dst, dstStride, width, height,              yFrac, false, !bi || bICFlag
     992#else
    982993    m_if.filterVerLuma(tmp + (halfFilterSize-1)*tmpStride, tmpStride, dst, dstStride, width, height,              yFrac, false, !bi
     994#endif
    983995#if H_3D_ARP
    984996    , filterType
     
    10061018      for ( j = 0; j < width; j++ )
    10071019      {
     1020#if !MTK_CLIPPING_ALIGN_IC_E0168
    10081021        if( bi )
    10091022        {
     
    10121025        }
    10131026        else
     1027#endif
    10141028          dst[j] = Clip3( 0, ( 1 << g_bitDepthY ) - 1, ( ( a*dst[j] ) >> iShift ) + b );
    10151029      }
    10161030      dst += dstStride;
    10171031    }
     1032#if MTK_CLIPPING_ALIGN_IC_E0168
     1033    if(bi)
     1034    {
     1035      Pel *dst2      = dstPic->getLumaAddr( partAddr );
     1036      Int shift = IF_INTERNAL_PREC - g_bitDepthY;
     1037      for (i = 0; i < height; i++)
     1038      {
     1039        for (j = 0; j < width; j++)
     1040        {
     1041          Short val = dst2[j] << shift;
     1042          dst2[j] = val - (Short)IF_INTERNAL_OFFS;
     1043        }
     1044        dst2 += dstStride;
     1045      }
     1046    }
     1047#endif
    10181048  }
    10191049#endif
     
    10661096  if ( yFrac == 0 )
    10671097  {
     1098#if MTK_CLIPPING_ALIGN_IC_E0168
     1099    m_if.filterHorChroma(refCb, refStride, dstCb,  dstStride, cxWidth, cxHeight, xFrac, !bi || bICFlag
     1100#else
    10681101    m_if.filterHorChroma(refCb, refStride, dstCb,  dstStride, cxWidth, cxHeight, xFrac, !bi
     1102#endif
    10691103#if H_3D_ARP
    10701104    , filterType
    10711105#endif
    10721106    );   
     1107#if MTK_CLIPPING_ALIGN_IC_E0168
     1108    m_if.filterHorChroma(refCr, refStride, dstCr,  dstStride, cxWidth, cxHeight, xFrac, !bi || bICFlag
     1109#else
    10731110    m_if.filterHorChroma(refCr, refStride, dstCr,  dstStride, cxWidth, cxHeight, xFrac, !bi
     1111#endif
    10741112#if H_3D_ARP
    10751113    , filterType
     
    10791117  else if ( xFrac == 0 )
    10801118  {
     1119#if MTK_CLIPPING_ALIGN_IC_E0168
     1120    m_if.filterVerChroma(refCb, refStride, dstCb, dstStride, cxWidth, cxHeight, yFrac, true, !bi || bICFlag
     1121#else
    10811122    m_if.filterVerChroma(refCb, refStride, dstCb, dstStride, cxWidth, cxHeight, yFrac, true, !bi
     1123#endif
    10821124#if H_3D_ARP
    10831125    , filterType
    10841126#endif
    10851127    );
     1128#if MTK_CLIPPING_ALIGN_IC_E0168
     1129    m_if.filterVerChroma(refCr, refStride, dstCr, dstStride, cxWidth, cxHeight, yFrac, true, !bi || bICFlag
     1130#else
    10861131    m_if.filterVerChroma(refCr, refStride, dstCr, dstStride, cxWidth, cxHeight, yFrac, true, !bi
     1132#endif
    10871133#if H_3D_ARP
    10881134    , filterType
     
    10971143#endif 
    10981144      );
     1145#if MTK_CLIPPING_ALIGN_IC_E0168
     1146    m_if.filterVerChroma(extY  + (halfFilterSize-1)*extStride, extStride, dstCb, dstStride, cxWidth, cxHeight  , yFrac, false, !bi || bICFlag
     1147#else
    10991148    m_if.filterVerChroma(extY  + (halfFilterSize-1)*extStride, extStride, dstCb, dstStride, cxWidth, cxHeight  , yFrac, false, !bi
     1149#endif
    11001150#if H_3D_ARP
    11011151    , filterType
     
    11081158#endif
    11091159      );
     1160#if MTK_CLIPPING_ALIGN_IC_E0168
     1161    m_if.filterVerChroma(extY  + (halfFilterSize-1)*extStride, extStride, dstCr, dstStride, cxWidth, cxHeight  , yFrac, false, !bi || bICFlag
     1162#else
    11101163    m_if.filterVerChroma(extY  + (halfFilterSize-1)*extStride, extStride, dstCr, dstStride, cxWidth, cxHeight  , yFrac, false, !bi
     1164#endif
    11111165#if H_3D_ARP
    11121166    , filterType
     
    11301184      for ( j = 0; j < cxWidth; j++ )
    11311185      {
     1186#if !MTK_CLIPPING_ALIGN_IC_E0168
    11321187        if( bi )
    11331188        {
     
    11361191        }
    11371192        else
     1193#endif
    11381194          dstCb[j] = Clip3(  0, ( 1 << g_bitDepthC ) - 1, ( ( a*dstCb[j] ) >> iShift ) + b );
    11391195      }
     
    11491205      for ( j = 0; j < cxWidth; j++ )
    11501206      {
     1207#if !MTK_CLIPPING_ALIGN_IC_E0168
    11511208        if( bi )
    11521209        {
     
    11551212        }
    11561213        else
     1214#endif
    11571215          dstCr[j] = Clip3( 0, ( 1 << g_bitDepthC ) - 1, ( ( a*dstCr[j] ) >> iShift ) + b );
    11581216      }
    11591217      dstCr += dstStride;
    11601218    }
     1219#if MTK_CLIPPING_ALIGN_IC_E0168
     1220    if(bi)
     1221    {
     1222      Pel* dstCb2 = dstPic->getCbAddr( partAddr );
     1223      Pel* dstCr2 = dstPic->getCrAddr( partAddr );
     1224      Int shift = IF_INTERNAL_PREC - g_bitDepthC;
     1225      for (i = 0; i < cxHeight; i++)
     1226      {
     1227        for (j = 0; j < cxWidth; j++)
     1228        {
     1229          Short val = dstCb2[j] << shift;
     1230          dstCb2[j] = val - (Short)IF_INTERNAL_OFFS;
     1231
     1232          val = dstCr2[j] << shift;
     1233          dstCr2[j] = val - (Short)IF_INTERNAL_OFFS;
     1234        }
     1235        dstCb2 += dstStride;
     1236        dstCr2 += dstStride;
     1237      }
     1238    }
     1239#endif
    11611240  }
    11621241#endif
  • branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TypeDef.h

    r559 r563  
    9898#define SHARP_ILLUCOMP_REFINE_E0046       1
    9999#define MTK_FAST_TEXTURE_ENCODING_E0173   1   // Fast merge mode decision and early CU determination for texture component of dependent view, JCT3V-E0173
     100#define MTK_CLIPPING_ALIGN_IC_E0168       1   // To support simplify bi-prediction PU with identical motion checking, JCT3V-E0168
    100101
    101102#if H_3D_NBDV
Note: See TracChangeset for help on using the changeset viewer.