Changeset 390 in 3DVCSoftware


Ignore:
Timestamp:
10 May 2013, 10:17:06 (11 years ago)
Author:
mediatek-htm
Message:

ARP Warning Fix, the related MACRO is "QC_ARP_WARNING_FIX"

by Yu-Lin Chang (yulin.chang@…)

Location:
branches/HTM-6.2-dev2-Mediatek
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-6.2-dev2-Mediatek/source/App/TAppEncoder/TAppEncCfg.cpp

    r373 r390  
    922922#if H3D_IVRP
    923923#if QC_ARP_D0177
    924   xConfirmPara     ( m_nUseAdvResPred < 0 || m_nUseAdvResPred > 1 , "0<=ARP<=1" );
     924#if QC_ARP_WARNING_FIX
     925  xConfirmPara    ( m_nUseAdvResPred > 1 , "0<=ARP<=1" );
     926#else
     927  xConfirmPara    ( m_nUseAdvResPred < 0 || m_nUseAdvResPred > 1 , "0<=ARP<=1" );
     928#endif
    925929#else
    926930  xConfirmPara    ( m_uiMultiviewResPredMode > 1,                                     "MultiviewResPred must be less than or equal to 1" );
  • branches/HTM-6.2-dev2-Mediatek/source/Lib/TLibCommon/TComDataCU.cpp

    r373 r390  
    6969    if (vspIdx < 4)
    7070    {
     71#if MTK_VSP_USING_NBDV_D0105
     72      pcMvFieldNeighbours[ iCount<<1].setMvField ( pDInfo->m_acMvCandNoRef[0],  NOT_VALID );
     73#else
    7174      pcMvFieldNeighbours[ iCount<<1].setMvField ( pDInfo->m_acMvCand[0],  NOT_VALID );
     75#endif
    7276      if ( pcCURef->getSlice()->isInterB() )
    7377      {
     78#if MTK_VSP_USING_NBDV_D0105
     79        pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField ( pDInfo->m_acMvCandNoRef[0],  NOT_VALID );
     80#else
    7481         pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField ( pDInfo->m_acMvCand[0],  NOT_VALID );
     82#endif
    7583      }
    7684    }
     
    8189                                          UChar* puhInterDirNeighbours, TComMvField* pcMvFieldNeighbours, Int* iVSPIndexTrue, Int mrgCandIdx, DisInfo* pDInfo )
    8290{
     91#if MTK_LGE_VSP_DEPTH_OFF_D0105_D0139
     92  if (getSlice()->getSPS()->isDepth())
     93  {
     94    return true;
     95  }
     96#endif
     97
    8398#if MERL_VSP_C0152_BugFix_ForNoDepthCase
    8499  TComPic* pRefPicBaseDepth = NULL;
     
    105120          if (vspIdx < 4) // spatial
    106121          {
     122#if MTK_VSP_USING_NBDV_D0105
     123            pcMvFieldNeighbours[iCount<<1].setMvField(pDInfo->m_acMvCandNoRef[0], NOT_VALID );
     124#else
    107125            pcMvFieldNeighbours[iCount<<1].setMvField(pDInfo->m_acMvCand[0], NOT_VALID );
     126#endif
    108127            if ( getSlice()->isInterB() )
    109128            {
     129#if MTK_VSP_USING_NBDV_D0105
     130              pcMvFieldNeighbours[(iCount<<1)+1].setMvField( pDInfo->m_acMvCandNoRef[0], NOT_VALID );
     131#else
    110132              pcMvFieldNeighbours[(iCount<<1)+1].setMvField( pDInfo->m_acMvCand[0], NOT_VALID );
     133#endif
    111134            }
    112135          }
     
    37153738      cDisInfo.m_acMvCand[0] = getDvInfo(uiAbsPartIdx).m_acMvCand[0];
    37163739      cDisInfo.m_aVIdxCan[0] = getDvInfo(uiAbsPartIdx).m_aVIdxCan[0];
     3740#if MTK_VSP_USING_NBDV_D0105
     3741      cDisInfo.m_acMvCandNoRef[0] = getDvInfo(uiAbsPartIdx).m_acMvCandNoRef[0];
     3742#endif
    37173743    }
    37183744#else
     
    37803806        clipMv(cMvPred);
    37813807        pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,pcMvFieldNeighbours[iCount<<1].getRefIdx());
     3808#if MTK_LGE_VSP_DEPTH_OFF_D0105_D0139
     3809        if (pcMvFieldNeighbours[iCount<<1].getRefIdx()<0)
     3810        {
     3811          assert(pcTextureCU->getVSPIndex(uiPartIdxCenter)!=0); 
     3812          for (Int i=0; i<getSlice()->getNumRefIdx(REF_PIC_LIST_0); i++)
     3813          {
     3814            if (getSlice()->getRefPOC(REF_PIC_LIST_0, i) == getSlice()->getPOC())
     3815            {
     3816              pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,i);
     3817              break;
     3818            }
     3819          }
     3820        }
     3821#endif
    37823822      }
    37833823      if ( getSlice()->isInterB() )
     
    37923832          clipMv(cMvPred);
    37933833          pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx());
     3834#if MTK_LGE_VSP_DEPTH_OFF_D0105_D0139
     3835          if (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()<0)
     3836          {
     3837            assert(pcTextureCU->getVSPIndex(uiPartIdxCenter)!=0); 
     3838            for (Int i=0; i<getSlice()->getNumRefIdx(REF_PIC_LIST_1); i++)
     3839            {
     3840              if (getSlice()->getRefPOC(REF_PIC_LIST_1, i) == getSlice()->getPOC())
     3841              {
     3842                pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,i);
     3843                break;
     3844              }
     3845            }
     3846          }
     3847#endif
    37943848        }
    37953849      }
    37963850#if MERL_VSP_C0152
     3851#if !MTK_LGE_VSP_DEPTH_OFF_D0105_D0139
    37973852      xInheritVspMode( pcTextureCU, uiPartIdxCenter, bVspMvZeroDone, iCount, iVSPIndexTrue, pcMvFieldNeighbours, &cDisInfo ) ;
    37983853#endif
    3799       if ( mrgCandIdx == iCount )
    3800       {
    3801         return;
    3802       }
    3803       iCount ++;
     3854#endif
     3855#if MTK_LGE_VSP_DEPTH_OFF_D0105_D0139
     3856      if (!((pcMvFieldNeighbours[iCount<<1].getRefIdx()<0 && !getSlice()->isInterB())
     3857        || (pcMvFieldNeighbours[iCount<<1].getRefIdx()<0 && pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()<0 && getSlice()->isInterB())))
     3858      {
     3859#endif
     3860        if ( mrgCandIdx == iCount )
     3861        {
     3862          return;
     3863        }
     3864        iCount ++;
     3865#if MTK_LGE_VSP_DEPTH_OFF_D0105_D0139
     3866      }
     3867      else
     3868      {
     3869        assert(0);
     3870      }
     3871#endif
    38043872    }
    38053873  }
     
    50435111    Int depthEndPosX   = Clip3(0,   iPictureWidth - 1,  iBlkX + iBlkWidth - 1 + (mv->getHor()>>2));
    50445112    Int depthEndPosY   = Clip3(0,   iPictureHeight - 1,  iBlkY + iBlkHeight - 1 + (mv->getVer()>>2));
     5113#if !MTK_DEPTH_TO_DISP_D0138
    50455114    Int iCenterX = (depthStartPosX + depthEndPosX) >> 1;
    50465115    Int iCenterY = (depthStartPosY + depthEndPosY) >> 1;
     5116#endif
    50475117
    50485118    Pel *depthTL  = pcBaseViewDepthPicYuv->getLumaAddr();
     
    50525122    aiDepth[2] = depthTL[ (depthStartPosY) * depStride + depthEndPosX   ];      // Right Top
    50535123    aiDepth[3] = depthTL[ (depthEndPosY)   * depStride + depthEndPosX   ];      // Right Bottom
     5124#if MTK_DEPTH_TO_DISP_D0138
     5125    for (Int i = 0; i < 4; i++)
     5126#else
    50545127    aiDepth[4] = depthTL[ (iCenterY)       * depStride + iCenterX       ];      // Center
    50555128    for (Int i = 0; i < 5; i++)
     5129#endif
    50565130    {
    50575131      if (maxDepthVal < aiDepth[i])
  • branches/HTM-6.2-dev2-Mediatek/source/Lib/TLibCommon/TComPrediction.cpp

    r373 r390  
    15631563#endif
    15641564        Int maxV = 0;
     1565#if MTK_DEPTH_TO_DISP_D0138
     1566        for (Int blockj = 0; blockj < MERL_VSP_BLOCKSIZE_C0152; blockj+=(MERL_VSP_BLOCKSIZE_C0152-1))
     1567#else
    15651568        for (Int blockj = 0; blockj < MERL_VSP_BLOCKSIZE_C0152; blockj++)
     1569#endif
    15661570        {
    15671571          Int iX = 0;
     1572#if MTK_DEPTH_TO_DISP_D0138
     1573          for (Int blocki = 0; blocki < MERL_VSP_BLOCKSIZE_C0152; blocki+=(MERL_VSP_BLOCKSIZE_C0152-1))
     1574#else
    15681575          for (Int blocki = 0; blocki < MERL_VSP_BLOCKSIZE_C0152; blocki++)
     1576#endif
    15691577          {
    15701578            if (maxV < depthTmp[iX])
  • branches/HTM-6.2-dev2-Mediatek/source/Lib/TLibCommon/TypeDef.h

    r373 r390  
    9595                                              // FIX_LG_RESTRICTEDRESPRED_M24766   1
    9696
    97 #define QC_ARP_D0177            1      ////< advanced residual prediction
     97#define QC_ARP_D0177            1             ////< advanced residual prediction
    9898#if QC_ARP_D0177
    99 #define QC_ARP_WFNR       3
     99#define QC_ARP_WFNR                       3
     100#define QC_ARP_WARNING_FIX                1   // Fix warning message for ARP
    100101#endif
    101102///// ***** DISPARITY VECTOR DERIVATION *********
     
    205206#define VSP_MERGE_POS                        5 // JCT3V-C0152: fixed position of VSP candidate in merge list, supported values: 5.
    206207                                               //MTK_DVPREFINE_BVSP_BUG_FIX               1
     208#define MTK_DEPTH_TO_DISP_D0138              0 // JCT3V-D0138: Use max among four corners for DoNBDV and BVSP
    207209
    208210#else // !MERL_VSP_C0152
     
    211213#endif
    212214
     215#define MTK_LGE_VSP_DEPTH_OFF_D0105_D0139             0  // JCT3V-D0105/JCT3V-D0139: disable VSP for depth map
     216#define MTK_VSP_USING_NBDV_D0105                      0  // JCT3V-D0105: use NBDV instead of DoNBDV for BVSP
    213217
    214218///// ***** DERIVED PARAMETERS *********
  • branches/HTM-6.2-dev2-Mediatek/source/Lib/TLibDecoder/TDecSbac.cpp

    r373 r390  
    22482248{
    22492249  UInt nMaxW = pcCU->getSlice()->getARPStepNum() - 1;
     2250#if !QC_ARP_WARNING_FIX
    22502251  assert (nMaxW >= 0);
     2252#endif
    22512253  UInt nW = 0;
    22522254  if( nMaxW > 0 )
    22532255  {
    22542256    UInt nOffset = pcCU->getCTXARPWFlag(uiAbsPartIdx);
     2257#if !QC_ARP_WARNING_FIX
    22552258    assert( 0 <= nOffset && nOffset <= 2 );
     2259#endif
    22562260    UInt uiCode = 0;
    22572261    m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPW.get( 0, 0, 0 + nOffset ) );
Note: See TracChangeset for help on using the changeset viewer.