Changeset 596 in 3DVCSoftware


Ignore:
Timestamp:
28 Aug 2013, 04:55:26 (11 years ago)
Author:
mediatek-htm
Message:

Modify the software implementation related to "MTK_VSP_FIX_E0172" to be aligned with the draft text.
The MACRO is "MTK_VSP_FIX_ALIGN_WD_E0172"

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

Location:
branches/HTM-DEV-2.0-dev1-Fix/source/Lib
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-2.0-dev1-Fix/source/Lib/TLibCommon/TComDataCU.cpp

    r593 r596  
    943943#if H_3D_VSP
    944944      m_piVSPFlag[ui]=pcCU->m_piVSPFlag[uiPartOffset+ui];
     945#if MTK_VSP_FIX_ALIGN_WD_E0172
     946      m_pDvInfo[ ui ] = pcCU->m_pDvInfo[uiPartOffset+ui];
     947#endif
    945948#if MTK_VSP_FIX_E0172
    946949      m_piVSPDir[ui]=pcCU->m_piVSPDir[uiPartOffset+ui];
     
    12381241#if H_3D_VSP
    12391242  m_piVSPFlag          = pcCU->getVSPFlag()               + uiAbsPartIdx;
     1243#if MTK_VSP_FIX_ALIGN_WD_E0172
     1244  m_pDvInfo            = pcCU->getDvInfo()                + uiAbsPartIdx;
     1245#endif
    12401246#if MTK_VSP_FIX_E0172
    12411247  m_piVSPDir           = pcCU->getVSPDir  ()              + uiAbsPartIdx;
     
    12881294#if H_3D_VSP
    12891295  memcpy( m_piVSPFlag           + uiOffset, pcCU->getVSPFlag(),           sizeof( Char ) * uiNumPartition );
     1296#if MTK_VSP_FIX_ALIGN_WD_E0172
     1297  memcpy( m_pDvInfo             + uiOffset, pcCU->getDvInfo(),            sizeof( *m_pDvInfo ) * uiNumPartition );
     1298#endif
    12901299#if MTK_VSP_FIX_E0172
    12911300  memcpy( m_piVSPDir            + uiOffset, pcCU->getVSPDir  (),          sizeInChar );
     
    14111420#if H_3D_VSP
    14121421  memcpy( rpcCU->getVSPFlag()           + m_uiAbsIdxInLCU, m_piVSPFlag,           sizeof( Char ) * m_uiNumPartition );
     1422#if MTK_VSP_FIX_ALIGN_WD_E0172
     1423  memcpy( rpcCU->getDvInfo()            + m_uiAbsIdxInLCU, m_pDvInfo,             sizeof( *m_pDvInfo ) * m_uiNumPartition );
     1424#endif
    14131425#if MTK_VSP_FIX_E0172
    14141426  memcpy( rpcCU->getVSPDir  ()          + m_uiAbsIdxInLCU, m_piVSPDir  ,          sizeInChar );
     
    25282540  setSubPart<Char>( iVSPFlag, m_piVSPFlag, uiAbsPartIdx, uiDepth, uiPartIdx );
    25292541}
     2542#if MTK_VSP_FIX_ALIGN_WD_E0172
     2543template<typename T>
     2544Void TComDataCU::setSubPartT( T uiParameter, T* puhBaseLCU, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx )
     2545{
     2546  UInt uiCurrPartNumQ = (m_pcPic->getNumPartInCU() >> (2 * uiCUDepth)) >> 2;
     2547  switch ( m_pePartSize[ uiCUAddr ] )
     2548  {
     2549  case SIZE_2Nx2N:
     2550    for (UInt ui = 0; ui < 4 * uiCurrPartNumQ; ui++)
     2551      puhBaseLCU[uiCUAddr + ui] = uiParameter;
     2552
     2553    break;
     2554  case SIZE_2NxN:
     2555    for (UInt ui = 0; ui < 2 * uiCurrPartNumQ; ui++)
     2556      puhBaseLCU[uiCUAddr + ui] = uiParameter;
     2557    break;
     2558  case SIZE_Nx2N:
     2559    for (UInt ui = 0; ui < uiCurrPartNumQ; ui++)
     2560      puhBaseLCU[uiCUAddr + ui] = uiParameter;
     2561    for (UInt ui = 0; ui < uiCurrPartNumQ; ui++)
     2562      puhBaseLCU[uiCUAddr + 2 * uiCurrPartNumQ + ui] = uiParameter;
     2563    break;
     2564  case SIZE_NxN:
     2565    for (UInt ui = 0; ui < uiCurrPartNumQ; ui++)
     2566      puhBaseLCU[uiCUAddr + ui] = uiParameter;
     2567    break;
     2568  case SIZE_2NxnU:
     2569    if ( uiPUIdx == 0 )
     2570    {
     2571      for (UInt ui = 0; ui < (uiCurrPartNumQ >> 1); ui++)
     2572        puhBaseLCU[uiCUAddr + ui] = uiParameter;
     2573      for (UInt ui = 0; ui < (uiCurrPartNumQ >> 1); ui++)
     2574        puhBaseLCU[uiCUAddr + uiCurrPartNumQ + ui] = uiParameter;
     2575
     2576    }
     2577    else if ( uiPUIdx == 1 )
     2578    {
     2579      for (UInt ui = 0; ui < (uiCurrPartNumQ >> 1); ui++)
     2580        puhBaseLCU[uiCUAddr + ui] = uiParameter;
     2581      for (UInt ui = 0; ui < (uiCurrPartNumQ >> 1) + (uiCurrPartNumQ << 1); ui++)
     2582        puhBaseLCU[uiCUAddr + uiCurrPartNumQ + ui] = uiParameter;
     2583
     2584    }
     2585    else
     2586    {
     2587      assert(0);
     2588    }
     2589    break;
     2590  case SIZE_2NxnD:
     2591    if ( uiPUIdx == 0 )
     2592    {
     2593      for (UInt ui = 0; ui < ((uiCurrPartNumQ << 1) + (uiCurrPartNumQ >> 1)); ui++)
     2594        puhBaseLCU[uiCUAddr + ui] = uiParameter;
     2595      for (UInt ui = 0; ui < (uiCurrPartNumQ >> 1); ui++)
     2596        puhBaseLCU[uiCUAddr + (uiCurrPartNumQ << 1) + uiCurrPartNumQ + ui] = uiParameter;
     2597
     2598    }
     2599    else if ( uiPUIdx == 1 )
     2600    {
     2601      for (UInt ui = 0; ui < (uiCurrPartNumQ >> 1); ui++)
     2602        puhBaseLCU[uiCUAddr + ui] = uiParameter;
     2603      for (UInt ui = 0; ui < (uiCurrPartNumQ >> 1); ui++)
     2604        puhBaseLCU[uiCUAddr + uiCurrPartNumQ + ui] = uiParameter;
     2605
     2606    }
     2607    else
     2608    {
     2609      assert(0);
     2610    }
     2611    break;
     2612  case SIZE_nLx2N:
     2613    if ( uiPUIdx == 0 )
     2614    {
     2615      for (UInt ui = 0; ui < (uiCurrPartNumQ >> 2); ui++)
     2616        puhBaseLCU[uiCUAddr + ui] = uiParameter;
     2617      for (UInt ui = 0; ui < (uiCurrPartNumQ >> 2); ui++)
     2618        puhBaseLCU[uiCUAddr + (uiCurrPartNumQ >> 1) + ui] = uiParameter;
     2619      for (UInt ui = 0; ui < (uiCurrPartNumQ >> 2); ui++)
     2620        puhBaseLCU[uiCUAddr + (uiCurrPartNumQ << 1) + ui] = uiParameter;
     2621      for (UInt ui = 0; ui < (uiCurrPartNumQ >> 2); ui++)
     2622        puhBaseLCU[uiCUAddr + (uiCurrPartNumQ << 1) + (uiCurrPartNumQ >> 1) + ui] = uiParameter;
     2623
     2624    }
     2625    else if ( uiPUIdx == 1 )
     2626    {
     2627      for (UInt ui = 0; ui < (uiCurrPartNumQ >> 2); ui++)
     2628        puhBaseLCU[uiCUAddr + ui] = uiParameter;
     2629      for (UInt ui = 0; ui < (uiCurrPartNumQ + (uiCurrPartNumQ >> 2)); ui++)
     2630        puhBaseLCU[uiCUAddr + (uiCurrPartNumQ >> 1) + ui] = uiParameter;
     2631      for (UInt ui = 0; ui < (uiCurrPartNumQ >> 2); ui++)
     2632        puhBaseLCU[uiCUAddr + (uiCurrPartNumQ << 1) + ui] = uiParameter;
     2633      for (UInt ui = 0; ui < (uiCurrPartNumQ + (uiCurrPartNumQ >> 2)); ui++)
     2634        puhBaseLCU[uiCUAddr + (uiCurrPartNumQ << 1) + (uiCurrPartNumQ >> 1) + ui] = uiParameter;
     2635
     2636    }
     2637    else
     2638    {
     2639      assert(0);
     2640    }
     2641    break;
     2642  case SIZE_nRx2N:
     2643    if ( uiPUIdx == 0 )
     2644    {
     2645      for (UInt ui = 0; ui < (uiCurrPartNumQ + (uiCurrPartNumQ >> 2)); ui++)
     2646        puhBaseLCU[uiCUAddr + ui] = uiParameter;
     2647      for (UInt ui = 0; ui < (uiCurrPartNumQ >> 2); ui++)
     2648        puhBaseLCU[uiCUAddr + uiCurrPartNumQ + (uiCurrPartNumQ >> 1) + ui] = uiParameter;
     2649      for (UInt ui = 0; ui < (uiCurrPartNumQ + (uiCurrPartNumQ >> 2)); ui++)
     2650        puhBaseLCU[uiCUAddr + (uiCurrPartNumQ << 1) + ui] = uiParameter;
     2651      for (UInt ui = 0; ui < (uiCurrPartNumQ >> 2); ui++)
     2652        puhBaseLCU[uiCUAddr + (uiCurrPartNumQ << 1) + uiCurrPartNumQ + (uiCurrPartNumQ >> 1) + ui] = uiParameter;
     2653
     2654    }
     2655    else if ( uiPUIdx == 1 )
     2656    {
     2657      for (UInt ui = 0; ui < (uiCurrPartNumQ >> 2); ui++)
     2658        puhBaseLCU[uiCUAddr + ui] = uiParameter;
     2659      for (UInt ui = 0; ui < (uiCurrPartNumQ >> 2); ui++)
     2660        puhBaseLCU[uiCUAddr + (uiCurrPartNumQ >> 1) + ui] = uiParameter;
     2661      for (UInt ui = 0; ui < (uiCurrPartNumQ >> 2); ui++)
     2662        puhBaseLCU[uiCUAddr + (uiCurrPartNumQ << 1) + ui] = uiParameter;
     2663      for (UInt ui = 0; ui < (uiCurrPartNumQ >> 2); ui++)
     2664        puhBaseLCU[uiCUAddr + (uiCurrPartNumQ << 1) + (uiCurrPartNumQ >> 1) + ui] = uiParameter;
     2665
     2666    }
     2667    else
     2668    {
     2669      assert(0);
     2670    }
     2671    break;
     2672  default:
     2673    assert( 0 );
     2674  }
     2675
     2676}
     2677#endif
    25302678#if MTK_VSP_FIX_E0172
    25312679Void TComDataCU::setVSPDirSubParts ( Char iVSPDir, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
     
    30073155  Int  iRefListIdY = 0;
    30083156  Int  i;
     3157#if MTK_VSP_FIX_ALIGN_WD_E0172
     3158  Int currViewId = m_pcSlice->getViewId();
     3159  Int derivedViewId = -1;
     3160  Int otherViewId = -1;
     3161#endif
    30093162#if MTK_VSP_FIX_E0172
    30103163  Int currViewId = m_pcSlice->getViewId();
     
    30223175        refViewAvailFlag = true;
    30233176        predFlag[iRefListIdX] = 1;
     3177#if MTK_VSP_FIX_ALIGN_WD_E0172
     3178        derivedViewId = m_pcSlice->getRefPic(eRefPicList, i)->getViewId();
     3179#endif
    30243180#if MTK_VSP_FIX_E0172
    30253181        vspDir[iCount] = iRefListIdX;
     
    30503206        refViewAvailFlag = true;
    30513207        predFlag[iRefListIdY] = 1;
    3052 #if MTK_VSP_FIX_E0172
     3208#if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E0172
    30533209#if H_3D_BVSP_FIX
    30543210        TComMv  cMv = pDInfo->m_acNBDV;
     
    32053361#if H_3D_VSP
    32063362      , Int* vspFlag
     3363#if MTK_VSP_FIX_ALIGN_WD_E0172
     3364      , InheritedVSPDisInfo*  inheritedVSPDisInfo
     3365#endif
    32073366#if MTK_VSP_FIX_E0172
    32083367      , Int* vspDir
     
    32653424  cDisInfo.m_acNBDV = getDvInfo(uiAbsPartIdx).m_acNBDV;
    32663425  cDisInfo.m_aVIdxCan = getDvInfo(uiAbsPartIdx).m_aVIdxCan;
    3267 
     3426#if MTK_VSP_FIX_ALIGN_WD_E0172
     3427  for(Int i = 0; i < MRG_MAX_NUM_CANDS_MEM; i++)
     3428  {
     3429    inheritedVSPDisInfo[i].m_acDvInfo = cDisInfo;
     3430  }
     3431#endif
    32683432  if( m_pcSlice->getIsDepth())
    32693433  {
     
    34493613#if H_3D_VSP
    34503614      if (pcCULeft->getVSPFlag(uiLeftPartIdx) == 1)
    3451 #if MTK_VSP_FIX_E0172
     3615#if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E0172
    34523616      {
    34533617#endif
    34543618        vspFlag[iCount] = 1;
     3619#if MTK_VSP_FIX_ALIGN_WD_E0172
     3620        xInheritVSPDisInfo(pcCULeft,uiLeftPartIdx,iCount,inheritedVSPDisInfo);
     3621      }
     3622#endif
    34553623#if MTK_VSP_FIX_E0172
    34563624        vspDir[iCount] = pcCULeft->getVSPDir( uiLeftPartIdx );
     
    35243692#if H_3D_VSP
    35253693      if (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1)
    3526 #if MTK_VSP_FIX_E0172
     3694#if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E0172
    35273695      {
    35283696#endif
    35293697        vspFlag[iCount] = 1;
     3698#if MTK_VSP_FIX_ALIGN_WD_E0172
     3699        xInheritVSPDisInfo(pcCUAbove,uiAbovePartIdx,iCount,inheritedVSPDisInfo);
     3700      }
     3701#endif
    35303702#if MTK_VSP_FIX_E0172
    35313703        vspDir[iCount] = pcCUAbove->getVSPDir( uiAbovePartIdx );
     
    35773749#if H_3D_VSP
    35783750    if (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 1)
    3579 #if MTK_VSP_FIX_E0172
     3751#if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E0172
    35803752    {
    35813753#endif
    35823754      vspFlag[iCount] = 1;
     3755#if MTK_VSP_FIX_ALIGN_WD_E0172
     3756      xInheritVSPDisInfo(pcCUAboveRight,uiAboveRightPartIdx,iCount,inheritedVSPDisInfo);
     3757    }
     3758#endif
    35833759#if MTK_VSP_FIX_E0172
    35843760      vspDir[iCount] = pcCUAboveRight->getVSPDir( uiAboveRightPartIdx);
     
    36883864#if H_3D_VSP
    36893865    if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) == 1)
    3690 #if MTK_VSP_FIX_E0172
     3866#if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E0172
    36913867    {
    36923868#endif
    36933869      vspFlag[iCount] = 1;
     3870#if MTK_VSP_FIX_ALIGN_WD_E0172
     3871      xInheritVSPDisInfo(pcCULeftBottom,uiLeftBottomPartIdx,iCount,inheritedVSPDisInfo);
     3872    }
     3873#endif
    36943874#if MTK_VSP_FIX_E0172
    36953875      vspDir[iCount] = pcCULeftBottom->getVSPDir( uiLeftBottomPartIdx);
     
    37353915#if H_3D_VSP
    37363916      if (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 1)
    3737 #if MTK_VSP_FIX_E0172
     3917#if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E0172
    37383918      {
    37393919#endif
    37403920        vspFlag[iCount] = 1;
     3921#if MTK_VSP_FIX_ALIGN_WD_E0172
     3922        xInheritVSPDisInfo(pcCUAboveLeft,uiAboveLeftPartIdx,iCount,inheritedVSPDisInfo);
     3923      }
     3924#endif
    37413925#if MTK_VSP_FIX_E0172
    37423926        vspDir[iCount] = pcCUAboveLeft->getVSPDir( uiAboveLeftPartIdx);
     
    39514135  numValidMergeCand = uiArrayAddr;
    39524136}
    3953 
     4137#if MTK_VSP_FIX_ALIGN_WD_E0172
     4138inline Void TComDataCU::xInheritVSPDisInfo(TComDataCU* pcCURef, UInt uiAbsPartIdx, Int iCount, InheritedVSPDisInfo*  inheritedVSPDisInfo)
     4139{
     4140  inheritedVSPDisInfo[iCount].m_acDvInfo.m_acNBDV   = pcCURef->getDvInfo(uiAbsPartIdx).m_acNBDV;
     4141  inheritedVSPDisInfo[iCount].m_acDvInfo.m_aVIdxCan = pcCURef->getDvInfo(uiAbsPartIdx).m_aVIdxCan;
     4142}
     4143#endif
    39544144/** Check whether the current PU and a spatial neighboring PU are in a same ME region.
    39554145 * \param xN, xN   location of the upper-left corner pixel of a neighboring PU
     
    55755765  }
    55765766}
     5767#if MTK_VSP_FIX_ALIGN_WD_E0172
     5768Void TComDataCU::setDvInfoSubParts( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth )
     5769{
     5770  setSubPartT<DisInfo>( cDvInfo, m_pDvInfo, uiAbsPartIdx, uiDepth, uiPUIdx );
     5771}
     5772#endif
    55775773#if MTK_NBDV_TN_FIX_E0172
    55785774Bool TComDataCU::xGetColDisMV( Int currCandPic, RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv , Int & iTargetViewIdx, Int & iStartViewIdx )
  • branches/HTM-DEV-2.0-dev1-Fix/source/Lib/TLibCommon/TComDataCU.h

    r587 r596  
    435435  template <typename T>
    436436  Void          setSubPart            ( T bParameter, T* pbBaseLCU, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx );
    437 
     437#if MTK_VSP_FIX_ALIGN_WD_E0172
     438  template<typename T>
     439  Void          setSubPartT           ( T uiParameter, T* puhBaseLCU, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx );
     440#endif
    438441#if AMP_MRG
    439442  Void          setMergeAMP( Bool b )      { m_bIsMergeAMP = b; }
     
    461464#if H_3D_NBDV
    462465  Void          setDvInfoSubParts     ( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiDepth );
     466#if MTK_VSP_FIX_ALIGN_WD_E0172
     467  Void          setDvInfoSubParts     ( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth);
     468#endif
    463469  DisInfo*      getDvInfo             ()                        { return m_pDvInfo;                 }
    464470  DisInfo       getDvInfo             (UInt uiIdx)              { return m_pDvInfo[uiIdx];          }
     
    649655#if H_3D_VSP
    650656                                            , Int* vspFlag
     657#if MTK_VSP_FIX_ALIGN_WD_E0172
     658                                            , InheritedVSPDisInfo*  inheritedVSPDisInfo
     659#endif
    651660#if MTK_VSP_FIX_E0172
    652661                                            , Int* vspDir
     
    654663#endif
    655664                                            , Int& numValidMergeCand, Int mrgCandIdx = -1 );
     665#if MTK_VSP_FIX_ALIGN_WD_E0172
     666  inline Void xInheritVSPDisInfo(TComDataCU* pcCURef, UInt uiAbsPartIdx, Int iCount,  InheritedVSPDisInfo*  inheritedVSPDisInfo);
     667#endif
    656668#if H_3D_VSP
    657669  Char*         getVSPFlag        ()                        { return m_piVSPFlag;          }
  • branches/HTM-DEV-2.0-dev1-Fix/source/Lib/TLibCommon/TComMotionInfo.h

    r478 r596  
    7676  Bool   m_bFound;                               
    7777} IDVInfo;
     78#endif
     79#if MTK_VSP_FIX_ALIGN_WD_E0172
     80typedef struct _InheritedVSPDisCand
     81{
     82  DisInfo m_acDvInfo;
     83} InheritedVSPDisInfo;
    7884#endif
    7985// ====================================================================================================================
  • branches/HTM-DEV-2.0-dev1-Fix/source/Lib/TLibCommon/TComPrediction.cpp

    r578 r596  
    729729
    730730  // Do compensation
    731 #if MTK_VSP_FIX_E0172
     731#if MTK_VSP_FIX_ALIGN_WD_E0172
     732  TComMv cDv  = pcCU->getDvInfo(uiPartAddr).m_acNBDV;
     733#else
     734#if MTK_VSP_FIX_E0172
    732735  TComMv cDv  = pcCU->getCUMvField( privateRefPicList )->getMv( uiPartAddr );
    733736#else
    734737  TComMv cDv  = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr ); // cDv is the disparity vector derived from the neighbors
    735738#endif
     739#endif // end of MTK_VSP_FIX_ALIGN_WD_E0172
    736740  pcCU->clipMv(cDv);
    737741
  • branches/HTM-DEV-2.0-dev1-Fix/source/Lib/TLibCommon/TypeDef.h

    r593 r596  
    106106#if MTK_RVS_BUGFIX_E0172
    107107#define MTK_DVMCP_FIX_E0172                  1 // fix the mismatch between software and WD for DV derivation from DVMCP blocks, issue 2 in JCT3V-E0172
     108#define MTK_VSP_FIX_ALIGN_WD_E0172           1 // fix the issues related to VSP merge candidate, issue 3, 4 in JCT3V-E0172, using an implementation aligned with WD
     109#if !MTK_VSP_FIX_ALIGN_WD_E0172
    108110#define MTK_VSP_FIX_E0172                    1 // fix the issues related to VSP merge candidate, issue 3, 4 in JCT3V-E0172
     111#endif
    109112#define MTK_DIVMC_FIX_E0172                  1 // fix the issue of derivation of disparity inter-view merge candidate, issue 5 in JCT3V-E0172
    110113#define MTK_NBDV_TN_FIX_E0172                1 // fix the issue of DV derivation from the temporal neighboring blocks, issue 7 in JCT3V-E0172
  • branches/HTM-DEV-2.0-dev1-Fix/source/Lib/TLibDecoder/TDecCu.cpp

    r566 r596  
    366366    Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    367367    memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     368#if MTK_VSP_FIX_ALIGN_WD_E0172
     369    InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
     370    m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, numValidMergeCand, uiMergeIndex );
     371#else
    368372#if MTK_VSP_FIX_E0172
    369373    Int vspDir[MRG_MAX_NUM_CANDS_MEM];
     
    374378    m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, numValidMergeCand, uiMergeIndex );
    375379#endif
     380#endif// end of MTK_VSP_FIX_ALIGN_WD_E0172
    376381    pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiAbsPartIdx, 0, uiDepth );
    377382#else
    378383    m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    379384#endif
    380 
     385#if MTK_VSP_FIX_ALIGN_WD_E0172
     386    if(vspFlag[uiMergeIndex])
     387    {
     388      pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeIndex].m_acDvInfo, uiAbsPartIdx, 0, uiDepth);
     389    }
     390#endif
    381391    pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, 0, uiDepth );
    382392
  • branches/HTM-DEV-2.0-dev1-Fix/source/Lib/TLibDecoder/TDecEntropy.cpp

    r566 r596  
    243243          Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    244244          memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     245#if MTK_VSP_FIX_ALIGN_WD_E0172
     246          InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
     247          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, numValidMergeCand );
     248#else
    245249#if MTK_VSP_FIX_E0172
    246250          Int vspDir[MRG_MAX_NUM_CANDS_MEM];
     
    251255          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, numValidMergeCand );
    252256#endif
     257#endif//end of MTK_VSP_FIX_ALIGN_WD_E0172
    253258          pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
     259#if MTK_VSP_FIX_ALIGN_WD_E0172
     260          if(vspFlag[uiMergeIndex])
     261          {
     262            pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeIndex].m_acDvInfo, uiSubPartIdx, uiPartIdx, uiDepth);
     263          }
     264#endif
    254265#else
    255266          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
     
    265276        Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    266277        memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     278#if MTK_VSP_FIX_ALIGN_WD_E0172
     279        InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
     280        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo,numValidMergeCand, uiMergeIndex );
     281#else
    267282#if MTK_VSP_FIX_E0172
    268283        Int vspDir[MRG_MAX_NUM_CANDS_MEM];
     
    273288        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, numValidMergeCand, uiMergeIndex );
    274289#endif
     290#endif//end of MTK_VSP_FIX_ALIGN_WD_E0172
    275291        pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
     292#if MTK_VSP_FIX_ALIGN_WD_E0172
     293        if(vspFlag[uiMergeIndex])
     294        {
     295          pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeIndex].m_acDvInfo, uiSubPartIdx, uiPartIdx, uiDepth);
     296        }
     297#endif
    276298#else
    277299        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
     
    305327      }
    306328    }
    307 #if MTK_VSP_FIX_E0172
     329#if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E0172
    308330    if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) && (pcCU->getVSPFlag(uiSubPartIdx) == false))
    309331#else
  • branches/HTM-DEV-2.0-dev1-Fix/source/Lib/TLibEncoder/TEncCu.cpp

    r566 r596  
    416416
    417417  Bool    bTrySplitDQP  = true;
    418 
     418#if MTK_VSP_FIX_ALIGN_WD_E0172
     419  DisInfo DvInfo;
     420  DvInfo.bDV = false;
     421  DvInfo.m_acNBDV.setZero();
     422  DvInfo.m_aVIdxCan = 0;
     423#if H_3D_NBDV_REF
     424  DvInfo.m_acDoNBDV.setZero();
     425#endif
     426#endif
    419427  static  Double  afCost[ MAX_CU_DEPTH ];
    420428  static  Int      aiNum [ MAX_CU_DEPTH ];
     
    517525
    518526#if H_3D_NBDV
     527#if !MTK_VSP_FIX_ALIGN_WD_E0172
    519528      DisInfo DvInfo;
    520529      DvInfo.bDV = false;
     
    524533      DvInfo.m_acDoNBDV.setZero();
    525534#endif
    526 
     535#endif
    527536      if( rpcTempCU->getSlice()->getSliceType() != I_SLICE )
    528537      {
     
    571580#endif
    572581          xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N );  rpcTempCU->initEstData( uiDepth, iQP );//by Competition for inter_2Nx2N
     582#if MTK_VSP_FIX_ALIGN_WD_E0172
     583          rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     584#endif
    573585        }
    574586        // SKIP
     
    578590        xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU, &earlyDetectionSkipMode );//by Merge for inter_2Nx2N
    579591        rpcTempCU->initEstData( uiDepth, iQP );
    580 
     592#if MTK_VSP_FIX_ALIGN_WD_E0172
     593        rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     594#endif
    581595        // fast encoder decision for early skip
    582596        if ( m_pcEncCfg->getUseFastEnc() )
     
    599613#endif
    600614            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N );  rpcTempCU->initEstData( uiDepth, iQP );
     615#if MTK_VSP_FIX_ALIGN_WD_E0172
     616            rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     617#endif
    601618            if(m_pcEncCfg->getUseCbfFastMode())
    602619            {
     
    679696                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN   );
    680697                rpcTempCU->initEstData( uiDepth, iQP );
     698#if MTK_VSP_FIX_ALIGN_WD_E0172
     699                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     700#endif
    681701              }
    682702            }
     
    692712            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N  );
    693713            rpcTempCU->initEstData( uiDepth, iQP );
     714#if MTK_VSP_FIX_ALIGN_WD_E0172
     715            rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     716#endif
    694717            if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_Nx2N )
    695718            {
     
    705728            xCheckRDCostInter      ( rpcBestCU, rpcTempCU, SIZE_2NxN  );
    706729            rpcTempCU->initEstData( uiDepth, iQP );
     730#if MTK_VSP_FIX_ALIGN_WD_E0172
     731            rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     732#endif
    707733            if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxN)
    708734            {
     
    737763                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU );
    738764                rpcTempCU->initEstData( uiDepth, iQP );
     765#if MTK_VSP_FIX_ALIGN_WD_E0172
     766                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     767#endif
    739768                if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU )
    740769                {
     
    750779                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD );
    751780                rpcTempCU->initEstData( uiDepth, iQP );
     781#if MTK_VSP_FIX_ALIGN_WD_E0172
     782                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     783#endif
    752784                if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD )
    753785                {
     
    767799                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, true );
    768800                rpcTempCU->initEstData( uiDepth, iQP );
     801#if MTK_VSP_FIX_ALIGN_WD_E0172
     802                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     803#endif
    769804                if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU )
    770805                {
     
    780815                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, true );
    781816                rpcTempCU->initEstData( uiDepth, iQP );
     817#if MTK_VSP_FIX_ALIGN_WD_E0172
     818                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     819#endif
    782820                if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD )
    783821                {
     
    799837                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N );
    800838                rpcTempCU->initEstData( uiDepth, iQP );
     839#if MTK_VSP_FIX_ALIGN_WD_E0172
     840                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     841#endif
    801842                if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N )
    802843                {
     
    812853                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N );
    813854                rpcTempCU->initEstData( uiDepth, iQP );
     855#if MTK_VSP_FIX_ALIGN_WD_E0172
     856                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     857#endif
    814858              }
    815859            }
     
    825869                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, true );
    826870                rpcTempCU->initEstData( uiDepth, iQP );
     871#if MTK_VSP_FIX_ALIGN_WD_E0172
     872                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     873#endif
    827874                if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N )
    828875                {
     
    838885                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, true );
    839886                rpcTempCU->initEstData( uiDepth, iQP );
     887#if MTK_VSP_FIX_ALIGN_WD_E0172
     888                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     889#endif
    840890              }
    841891            }
     
    849899              xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU );
    850900              rpcTempCU->initEstData( uiDepth, iQP );
     901#if MTK_VSP_FIX_ALIGN_WD_E0172
     902              rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     903#endif
    851904              xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD );
    852905              rpcTempCU->initEstData( uiDepth, iQP );
     906#if MTK_VSP_FIX_ALIGN_WD_E0172
     907              rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     908#endif
    853909#if H_3D_QTLPC
    854910            }
     
    858914              xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N );
    859915              rpcTempCU->initEstData( uiDepth, iQP );
     916#if MTK_VSP_FIX_ALIGN_WD_E0172
     917              rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     918#endif
    860919              xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N );
    861920              rpcTempCU->initEstData( uiDepth, iQP );
     921#if MTK_VSP_FIX_ALIGN_WD_E0172
     922              rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     923#endif
    862924#if H_3D_QTLPC
    863925            }
     
    16151677  Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    16161678  memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     1679#if MTK_VSP_FIX_ALIGN_WD_E0172
     1680  InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
     1681  rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag,inheritedVSPDisInfo, numValidMergeCand );
     1682#else
    16171683#if MTK_VSP_FIX_E0172
    16181684  Int vspDir[MRG_MAX_NUM_CANDS_MEM];
     
    16221688  rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag, numValidMergeCand );
    16231689#endif
     1690#endif//end of MTK_VSP_FIX_ALIGN_WD_E0172
    16241691#else
    16251692  rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand );
     
    16891756#if H_3D_VSP
    16901757          rpcTempCU->setVSPFlagSubParts( vspFlag[uiMergeCand], 0, 0, uhDepth );
     1758#if MTK_VSP_FIX_ALIGN_WD_E0172
     1759          rpcTempCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, 0, 0, uhDepth );
     1760#endif
    16911761#if MTK_VSP_FIX_E0172
    16921762          rpcTempCU->setVSPDirSubParts( vspDir[uiMergeCand], 0, 0, uhDepth );
  • branches/HTM-DEV-2.0-dev1-Fix/source/Lib/TLibEncoder/TEncSearch.cpp

    r566 r596  
    35503550#if H_3D_VSP
    35513551                                 , Int* vspFlag
     3552#if MTK_VSP_FIX_ALIGN_WD_E0172
     3553                                 , InheritedVSPDisInfo*  inheritedVSPDisInfo
     3554#endif
    35523555#if MTK_VSP_FIX_E0172
    35533556                                 , Int* vspDir
     
    35723575#if H_3D_VSP
    35733576                                   , vspFlag
     3577#if MTK_VSP_FIX_ALIGN_WD_E0172
     3578                                   , inheritedVSPDisInfo
     3579#endif
    35743580#if MTK_VSP_FIX_E0172
    35753581                                   , vspDir
     
    35863592#if H_3D_VSP
    35873593                                 , vspFlag
     3594#if MTK_VSP_FIX_ALIGN_WD_E0172
     3595                                 , inheritedVSPDisInfo
     3596#endif
    35883597#if MTK_VSP_FIX_E0172
    35893598                                 , vspDir
     
    35933602                                 );
    35943603  }
    3595 #if MTK_VSP_FIX_E0172
     3604#if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E0172
    35963605  xRestrictBipredMergeCand( pcCU, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours,vspFlag, numValidMergeCand );
    35973606#else
     
    36133622#if H_3D_VSP
    36143623      pcCU->setVSPFlagSubParts( vspFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
     3624#if MTK_VSP_FIX_ALIGN_WD_E0172
     3625      pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
     3626#endif
    36153627#if MTK_VSP_FIX_E0172
    36163628      pcCU->setVSPDirSubParts( vspDir[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
     
    36453657 * \returns Void
    36463658 */
    3647 #if MTK_VSP_FIX_E0172
     3659#if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E0172
    36483660Void TEncSearch::xRestrictBipredMergeCand( TComDataCU* pcCU, UInt puIdx, TComMvField* mvFieldNeighbours, UChar* interDirNeighbours, Int* vspFlag, Int numValidMergeCand )
    36493661#else
     
    36553667    for( UInt mergeCand = 0; mergeCand < numValidMergeCand; ++mergeCand )
    36563668    {
    3657 #if MTK_VSP_FIX_E0172
     3669#if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E0172
    36583670      if ( (interDirNeighbours[mergeCand] == 3) && (vspFlag[mergeCand] == false) )
    36593671#else
     
    42774289      Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    42784290      memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     4291#if MTK_VSP_FIX_ALIGN_WD_E0172
     4292      InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
     4293      UInt uiAbsPartIdx = 0;
     4294      Int iWidth = 0;
     4295      Int iHeight = 0;
     4296      pcCU->getPartIndexAndSize( iPartIdx, uiAbsPartIdx, iWidth, iHeight );
     4297      DisInfo OriginalDvInfo = pcCU->getDvInfo(uiAbsPartIdx);
     4298#endif
    42794299#if MTK_VSP_FIX_E0172
    42804300      Int vspDir[MRG_MAX_NUM_CANDS_MEM];
     
    42864306#if H_3D_VSP
    42874307                      , vspFlag
     4308#if MTK_VSP_FIX_ALIGN_WD_E0172
     4309                      , inheritedVSPDisInfo
     4310#endif
    42884311#if MTK_VSP_FIX_E0172
    42894312                      , vspDir
     
    42994322#if H_3D_VSP
    43004323        pcCU->setVSPFlagSubParts( vspFlag[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
     4324#if MTK_VSP_FIX_ALIGN_WD_E0172
     4325        pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMRGIndex].m_acDvInfo, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
     4326#endif
    43014327#if MTK_VSP_FIX_E0172
    43024328        pcCU->setVSPDirSubParts( vspDir[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
     
    43244350#if H_3D_VSP
    43254351        pcCU->setVSPFlagSubParts ( 0,             uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
     4352#if MTK_VSP_FIX_ALIGN_WD_E0172
     4353        pcCU->setDvInfoSubParts(OriginalDvInfo, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
     4354#endif
    43264355#if MTK_VSP_FIX_E0172
    43274356        pcCU->setVSPDirSubParts ( 0,             uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
  • branches/HTM-DEV-2.0-dev1-Fix/source/Lib/TLibEncoder/TEncSearch.h

    r566 r596  
    415415#if H_3D_VSP
    416416                                  , Int* vspFlag
     417#if MTK_VSP_FIX_ALIGN_WD_E0172
     418                                  , InheritedVSPDisInfo*  inheritedVSPDisInfo
     419#endif
    417420#if MTK_VSP_FIX_E0172
    418421                                  , Int* vspDir
     
    426429                                    TComMvField*    mvFieldNeighbours,
    427430                                    UChar*          interDirNeighbours,
    428 #if MTK_VSP_FIX_E0172
     431#if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E0172
    429432                                    Int* vspFlag,
    430433#endif
Note: See TracChangeset for help on using the changeset viewer.