Changeset 1029 in 3DVCSoftware


Ignore:
Timestamp:
30 Jul 2014, 18:43:21 (10 years ago)
Author:
tech
Message:

Merged 11.2-dev1-MediaTek@1004.

Location:
branches/HTM-11.2-dev0/source/Lib
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-11.2-dev0/source/Lib/TLibCommon/ContextTables.h

    r983 r1029  
    450450static const UChar INIT_DBBP_FLAG[3][DBBP_NUM_FLAG_CTX] =
    451451{
     452#if SEC_DBBP_EXPLICIT_SIG_I0077
     453  { CNU },
     454  { CNU },
     455  { CNU },
     456#else
    452457  { 161 },
    453458  { 161 },
    454459  { 161 },
    455 };
    456 #endif
    457 
    458 #endif
     460#endif
     461};
     462#endif
     463
     464#endif
  • branches/HTM-11.2-dev0/source/Lib/TLibCommon/TComDataCU.cpp

    r994 r1029  
    33733373  for(Int iLoop = 0; iLoop < 2; iLoop ++ )
    33743374  {
     3375#if !SEC_SIMP_SHIFTED_DV_I0086
    33753376    // IvDcShift (Derived from spatial Iv neighboring blocks)
    33763377    if( iLoop == 1 )
     
    34063407      }
    34073408    }
     3409#endif
    34083410
    34093411    /// iLoop = 0 --> IvMCShift
     
    34533455}
    34543456
     3457#if !SEC_SIMP_SHIFTED_DV_I0086
    34553458inline Bool TComDataCU::xGetPosFirstAvailDmvCand(Int iCount, Int& posFirstAvailDmvCand )
    34563459{
     
    34693472  return false; 
    34703473}
     3474#endif
    34713475                                     
    34723476#endif
     
    61466150
    61476151  TComMv cMv;
     6152#if MTK_I0093
     6153  Int iDisp     = getSlice()->getDepthToDisparityB( 0 )[ 1 << ( getSlice()->getSPS()->getBitDepthY() - 1 ) ];
     6154#else
    61486155  Int iDisp     = getSlice()->getDepthToDisparityB( 0 )[ 128 ];
     6156#endif
    61496157  cMv.setHor(iDisp);
    61506158  cMv.setVer(0);
  • branches/HTM-11.2-dev0/source/Lib/TLibCommon/TComDataCU.h

    r1001 r1029  
    250250#if H_3D_IV_MERGE
    251251  Bool          xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int*   ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx );
     252#if! SEC_SIMP_SHIFTED_DV_I0086
    252253  Bool          xGetPosFirstAvailDmvCand( Int iCount, Int& iFirDispCand );
     254#endif
    253255#endif
    254256
  • branches/HTM-11.2-dev0/source/Lib/TLibCommon/TComPrediction.cpp

    r1013 r1029  
    836836}
    837837
     838#if SHARP_DBBP_SIMPLE_FLTER_I0109
     839Void TComPrediction::combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize )
     840#else
    838841Void TComPrediction::combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr )
     842#endif
    839843{
    840844  Pel*  piSrc[2]    = {pInYuv[0]->getLumaAddr(uiPartAddr), pInYuv[1]->getLumaAddr(uiPartAddr)};
     
    844848 
    845849  UInt  uiMaskStride= MAX_CU_SIZE;
     850#if !SHARP_DBBP_SIMPLE_FLTER_I0109
    846851  Pel  filSrc = 0;
     852#endif
    847853  Pel* tmpTar = 0;
    848854  tmpTar = (Pel *)xMalloc(Pel, uiWidth*uiHeight);
     
    868874  }
    869875 
     876#if SHARP_DBBP_SIMPLE_FLTER_I0109
     877  if (partSize == SIZE_Nx2N)
     878  {
     879    for (Int y=0; y<uiHeight; y++)
     880    {
     881      for (Int x=0; x<uiWidth; x++)
     882      {
     883        Bool l = (x==0)?pMaskStart[y*uiMaskStride+x]:pMaskStart[y*uiMaskStride+x-1];
     884        Bool r = (x==uiWidth-1)?pMaskStart[y*uiMaskStride+x]:pMaskStart[y*uiMaskStride+x+1];
     885       
     886        Pel left, right;
     887        left   = (x==0)          ? tmpTar[y*uiWidth+x] : tmpTar[y*uiWidth+x-1];
     888        right  = (x==uiWidth-1)  ? tmpTar[y*uiWidth+x] : tmpTar[y*uiWidth+x+1];
     889       
     890        piDst[x] = (l!=r) ? ClipY( Pel(( left + (tmpTar[y*uiWidth+x] << 1) + right ) >> 2 )) : tmpTar[y*uiWidth+x];
     891      }
     892      piDst     += uiDstStride;
     893    }
     894  }
     895  else // SIZE_2NxN
     896  {
     897    for (Int y=0; y<uiHeight; y++)
     898    {
     899      for (Int x=0; x<uiWidth; x++)
     900      {
     901        Bool t = (y==0)?pMaskStart[y*uiMaskStride+x]:pMaskStart[(y-1)*uiMaskStride+x];
     902        Bool b = (y==uiHeight-1)?pMaskStart[y*uiMaskStride+x]:pMaskStart[(y+1)*uiMaskStride+x];
     903       
     904        Pel top, bottom;
     905        top    = (y==0)          ? tmpTar[y*uiWidth+x] : tmpTar[(y-1)*uiWidth+x];
     906        bottom = (y==uiHeight-1) ? tmpTar[y*uiWidth+x] : tmpTar[(y+1)*uiWidth+x];
     907       
     908        piDst[x] = (t!=b) ? ClipY( Pel(( top + (tmpTar[y*uiWidth+x] << 1) + bottom ) >> 2 )) : tmpTar[y*uiWidth+x];
     909      }
     910      piDst     += uiDstStride;
     911    }
     912  }
     913#else
    870914  for (Int y=0; y<uiHeight; y++)
    871915  {
     
    901945    piDst     += uiDstStride;
    902946  }
     947#endif
     948
    903949  if ( tmpTar    ) { xFree(tmpTar);             tmpTar        = NULL; }
    904950 
     
    937983  }
    938984
     985#if SHARP_DBBP_SIMPLE_FLTER_I0109
     986  if (partSize == SIZE_Nx2N)
     987  {
     988    for (Int y=0; y<uiHeightC; y++)
     989    {
     990      for (Int x=0; x<uiWidthC; x++)
     991      {
     992        Bool l = (x==0)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[y*2*uiMaskStride+(x-1)*2];
     993        Bool r = (x==uiWidthC-1)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[y*2*uiMaskStride+(x+1)*2];
     994
     995        Pel leftU, rightU;
     996        leftU   = (x==0)           ? tmpTarU[y*uiWidthC+x] : tmpTarU[y*uiWidthC+x-1];
     997        rightU  = (x==uiWidthC-1)  ? tmpTarU[y*uiWidthC+x] : tmpTarU[y*uiWidthC+x+1];
     998        Pel leftV, rightV;
     999        leftV   = (x==0)           ? tmpTarV[y*uiWidthC+x] : tmpTarV[y*uiWidthC+x-1];
     1000        rightV  = (x==uiWidthC-1)  ? tmpTarV[y*uiWidthC+x] : tmpTarV[y*uiWidthC+x+1];
     1001
     1002        if (l!=r)
     1003        {
     1004          filSrcU = ClipC( Pel(( leftU + (tmpTarU[y*uiWidthC+x] << 1) + rightU ) >> 2 ));
     1005          filSrcV = ClipC( Pel(( leftV + (tmpTarV[y*uiWidthC+x] << 1) + rightV ) >> 2 ));
     1006        }
     1007        else
     1008        {
     1009          filSrcU = tmpTarU[y*uiWidthC+x];
     1010          filSrcV = tmpTarV[y*uiWidthC+x];
     1011        }
     1012        piDstU[x] = filSrcU;
     1013        piDstV[x] = filSrcV;
     1014      }
     1015      piDstU      += uiDstStrideC;
     1016      piDstV      += uiDstStrideC;
     1017    }
     1018  }
     1019  else
     1020  {
     1021    for (Int y=0; y<uiHeightC; y++)
     1022    {
     1023      for (Int x=0; x<uiWidthC; x++)
     1024      {
     1025        Bool t = (y==0)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[(y-1)*2*uiMaskStride+x*2];
     1026        Bool b = (y==uiHeightC-1)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[(y+1)*2*uiMaskStride+x*2];
     1027
     1028        Pel topU, bottomU;
     1029        topU    = (y==0)           ? tmpTarU[y*uiWidthC+x] : tmpTarU[(y-1)*uiWidthC+x];
     1030        bottomU = (y==uiHeightC-1) ? tmpTarU[y*uiWidthC+x] : tmpTarU[(y+1)*uiWidthC+x];
     1031        Pel topV, bottomV;
     1032        topV    = (y==0)           ? tmpTarV[y*uiWidthC+x] : tmpTarV[(y-1)*uiWidthC+x];
     1033        bottomV = (y==uiHeightC-1) ? tmpTarV[y*uiWidthC+x] : tmpTarV[(y+1)*uiWidthC+x];
     1034
     1035        if (t!=b)
     1036        {
     1037          filSrcU = ClipC( Pel(( topU + (tmpTarU[y*uiWidthC+x] << 1) + bottomU ) >> 2 ));
     1038          filSrcV = ClipC( Pel(( topV + (tmpTarV[y*uiWidthC+x] << 1) + bottomV ) >> 2 ));
     1039        }
     1040        else
     1041        {
     1042          filSrcU = tmpTarU[y*uiWidthC+x];
     1043          filSrcV = tmpTarV[y*uiWidthC+x];
     1044        }
     1045        piDstU[x] = filSrcU;
     1046        piDstV[x] = filSrcV;
     1047      }
     1048      piDstU      += uiDstStrideC;
     1049      piDstV      += uiDstStrideC;
     1050    }
     1051  }
     1052#else
    9391053  for (Int y=0; y<uiHeightC; y++)
    9401054  {
     
    9821096    piDstV      += uiDstStrideC;
    9831097  }
     1098#endif
    9841099  if ( tmpTarU    ) { xFree(tmpTarU);             tmpTarU        = NULL; }
    9851100  if ( tmpTarV    ) { xFree(tmpTarV);             tmpTarV        = NULL; }
  • branches/HTM-11.2-dev0/source/Lib/TLibCommon/TComPrediction.h

    r884 r1029  
    176176  PartSize      getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize);
    177177  Bool          getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask );
     178#if SHARP_DBBP_SIMPLE_FLTER_I0109
     179  Void          combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize );
     180#else
    178181  Void          combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr = 0 );
     182#endif
    179183#endif
    180184
  • branches/HTM-11.2-dev0/source/Lib/TLibCommon/TypeDef.h

    r1023 r1029  
    6868#define BUG_FIX_TK65        1
    6969
     70#define MTK_I0093           1
    7071/////////////////////////////////////////////////////////////////////////////////////////
    7172///////////////////////////////////   MAJOR DEFINES   /////////////////////////////////// 
     
    172173                                              // MTK_DIS_SPBIP8X4_H0205        Disable bi-prediction for 8x4 and 4x8 sub PU and remove the SPIVMP 2Nx2N restriction
    173174                                              // SEC_ADAPT_DISABLE_IVMP        Disalbing IVMP merge candidates when IC is enabled, JCT3V-H0070
     175
     176#define SEC_SIMP_SHIFTED_DV_I0086         1   // Simplification of Shifted DV candidate, JCT3V-I0086
    174177
    175178#define H_3D_TMVP                         1   // QC_TMVP_C0047
     
    237240                                              // H_3D_FIX_DBBP_IVMP        Fix . Enable IVMP is always disabled, when DBBP is enabled. The original intention is to disable Sub-PU IVMP when DBBP is enabled, not to disable IVMP itself.
    238241
     242#define SEC_DBBP_EXPLICIT_SIG_I0077       1   // Remove the partition derivation and signal dbbp_flag only when the partion mode is 2NxN/Nx2N, JCT3V-I0077
     243#define SEC_DBBP_DISALLOW_8x8_I0078       1   // Disallow DBBP in 8x8 CU, JCT3V-I0078
     244#define SHARP_DBBP_SIMPLE_FLTER_I0109     1   // Simple condition and one dimensional dilter for DBBP
    239245#define SEC_DBBP_DMM4_THRESHOLD_I0076     1   // Simplification of threshold derivation for DBBP and DMM4, JCT3V-I0076
    240246
  • branches/HTM-11.2-dev0/source/Lib/TLibDecoder/TDecCu.cpp

    r1001 r1029  
    924924 
    925925  // reconstruct final prediction signal by combining both segments
     926#if SHARP_DBBP_SIMPLE_FLTER_I0109
     927  m_pcPrediction->combineSegmentsWithMask(apSegPredYuv, m_ppcYuvReco[uiDepth], pMask, pcCU->getWidth(0), pcCU->getHeight(0), 0, ePartSize);
     928#else
    926929  m_pcPrediction->combineSegmentsWithMask(apSegPredYuv, m_ppcYuvReco[uiDepth], pMask, pcCU->getWidth(0), pcCU->getHeight(0));
     930#endif
    927931 
    928932  // inter recon
  • branches/HTM-11.2-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp

    r983 r1029  
    153153#if H_3D_DBBP
    154154
     155#if SEC_DBBP_EXPLICIT_SIG_I0077
     156#if SEC_DBBP_DISALLOW_8x8_I0078
     157  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 )
     158#else
     159  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) )
     160#endif
     161#else
     162#if SEC_DBBP_DISALLOW_8x8_I0078
     163  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && pcCU->getWidth(uiAbsPartIdx) > 8 )
     164#else
    155165  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) )
     166#endif
     167#endif
    156168  {
    157169    decodeDBBPFlag(pcCU, uiAbsPartIdx, uiDepth);
    158    
     170#if !SEC_DBBP_EXPLICIT_SIG_I0077   
    159171    if( pcCU->getDBBPFlag(uiAbsPartIdx) )
    160172    {
     
    180192      pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx+uiPUOffset, 1, uiDepth);
    181193    }
     194#endif
    182195  }
    183196#endif
  • branches/HTM-11.2-dev0/source/Lib/TLibDecoder/TDecSbac.cpp

    r1015 r1029  
    22622262  m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) );
    22632263 
     2264#if SEC_DBBP_EXPLICIT_SIG_I0077
     2265  PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );
     2266  AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N );
     2267  UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxCUDepth() - uiDepth ) << 1 ) ) >> 4;
     2268  pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx, 0, uiDepth);
     2269  pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx+uiPUOffset, 1, uiDepth);
     2270#else
    22642271  if( uiSymbol )
    22652272  {
     
    22682275    pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx + 2*uiCurrPartNumQ, 1, uiDepth);
    22692276  }
     2277#endif
    22702278}
    22712279#endif
  • branches/HTM-11.2-dev0/source/Lib/TLibEncoder/TEncCu.cpp

    r1019 r1029  
    25452545  AOF( uiWidth == uiHeight );
    25462546 
     2547#if SEC_DBBP_DISALLOW_8x8_I0078
     2548  if(uiWidth <= 8)
     2549  {
     2550    return;
     2551  }
     2552#endif
     2553 
    25472554  rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N,  0, uhDepth );
    25482555 
     
    26412648 
    26422649  // reconstruct final prediction signal by combining both segments
     2650#if SHARP_DBBP_SIMPLE_FLTER_I0109
     2651  m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight, 0, eVirtualPartSize);
     2652#else
    26432653  m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight);
     2654#endif
    26442655 
    26452656  m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], false );
  • branches/HTM-11.2-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp

    r983 r1029  
    262262 
    263263#if H_3D_DBBP
     264#if! SEC_DBBP_EXPLICIT_SIG_I0077
    264265  PartSize eVirtualPartSize = pcCU->getPartitionSize(uiAbsPartIdx);
    265266  if( pcCU->getDBBPFlag(uiAbsPartIdx) )
     
    271272  }
    272273#endif
     274#endif
    273275 
    274276  m_pcEntropyCoderIf->codePartSize( pcCU, uiAbsPartIdx, uiDepth );
    275277 
    276278#if H_3D_DBBP
     279#if SEC_DBBP_EXPLICIT_SIG_I0077
     280#if SEC_DBBP_DISALLOW_8x8_I0078
     281  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 )
     282#else
     283  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) )
     284#endif
     285#else
     286#if SEC_DBBP_DISALLOW_8x8_I0078
     287  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && pcCU->getWidth(uiAbsPartIdx) > 8 )
     288#else
    277289  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) )
     290#endif
     291#endif
    278292  {
    279293    encodeDBBPFlag(pcCU, uiAbsPartIdx, bRD);
    280    
     294#if !SEC_DBBP_EXPLICIT_SIG_I0077
    281295    if( pcCU->getDBBPFlag(uiAbsPartIdx) )
    282296    {
     
    284298      pcCU->setPartSizeSubParts(eVirtualPartSize, uiAbsPartIdx, uiDepth);
    285299    }
     300#endif
    286301  }
    287302#endif
  • branches/HTM-11.2-dev0/source/Lib/TLibEncoder/TEncSbac.cpp

    r1015 r1029  
    24182418Void TEncSbac::codeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
    24192419{
     2420#if SEC_DBBP_EXPLICIT_SIG_I0077
     2421  PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );
     2422  AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N );
     2423#endif
    24202424  AOF( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) );
    24212425  AOF( !pcCU->getSlice()->getIsDepth() );
Note: See TracChangeset for help on using the changeset viewer.