Changeset 511 in 3DVCSoftware for branches/HTM-DEV-0.3-dev2


Ignore:
Timestamp:
3 Jul 2013, 14:03:18 (11 years ago)
Author:
mitsubishi-htm
Message:

-Bug fix in adding a vsp candidate, still intermediate version.

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

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComDataCU.cpp

    r510 r511  
    26542654  picDepth = getSlice()->getIvPic( true, refViewIdx );
    26552655
    2656   /*
     2656  //////////
    26572657  // Code if simply re-writing
    2658   if(ucVspMergePos == H_3D_VSPPOSITION && picDepth != NULL && 0 != m_pcSlice->getViewIndex() ) // VSP can be used only when depth is used as input
    2659   {
    2660     abCandIsInter[iCount] = true;
    2661     puhInterDirNeighbours[iCount] = 1;
    2662     vspFlag[iCount] = 1;
    2663     vspDirTrue[iCount] = 0; // TODO: Check if this is really useful!!!!
    2664 
    2665     Int iRefIdxList0 = getSlice()->getRefPic(REF_PIC_LIST_0, 0)->getPOC() == getSlice()->getPOC() ? 0 :
    2666                       (getSlice()->getAlterRefIdx(REF_PIC_LIST_0) == -1 ? NOT_VALID : getSlice()->getAlterRefIdx(REF_PIC_LIST_0));
    2667     pcMvFieldNeighbours[iCount<<1].setMvField( pDInfo->m_acDoNBDV, iRefIdxList0 );
    2668     if (getSlice()->isInterB())
    2669     {
    2670       puhInterDirNeighbours[iCount] = xGetVspDirection(uiPUIdx);
    2671       Int iRefIdxList1 = getSlice()->getRefPic(REF_PIC_LIST_1, 0)->getPOC() == getSlice()->getPOC() ? 0 :
    2672                         (getSlice()->getAlterRefIdx(REF_PIC_LIST_1) == -1 ? NOT_VALID : getSlice()->getAlterRefIdx(REF_PIC_LIST_1));
    2673       pcMvFieldNeighbours[(iCount<<1)+1].setMvField( pDInfo->m_acDoNBDV, iRefIdxList1 );
    2674     }
    2675 
    2676     if ( mrgCandIdx == iCount )
    2677       return true;
    2678 
    2679     iCount++;
    2680   }
    2681   */
     2658//  if(ucVspMergePos == H_3D_VSPPOSITION && picDepth != NULL && 0 != m_pcSlice->getViewIndex() ) // VSP can be used only when depth is used as input
     2659//  {
     2660//    abCandIsInter[iCount] = true;
     2661//    puhInterDirNeighbours[iCount] = 1;
     2662//    vspFlag[iCount] = 1;
     2663//    vspDirTrue[iCount] = 0; // TODO: Check if this is really useful!!!!
     2664//
     2665//    Int iRefIdxList0 = getSlice()->getRefPic(REF_PIC_LIST_0, 0)->getPOC() == getSlice()->getPOC() ? 0 :
     2666//                      (getSlice()->getAlterRefIdx(REF_PIC_LIST_0) == -1 ? NOT_VALID : getSlice()->getAlterRefIdx(REF_PIC_LIST_0));
     2667//    pcMvFieldNeighbours[iCount<<1].setMvField( pDInfo->m_acDoNBDV, iRefIdxList0 );
     2668//    if (getSlice()->isInterB())
     2669//    {
     2670//      puhInterDirNeighbours[iCount] = xGetVspDirection(uiPUIdx);
     2671//      Int iRefIdxList1 = getSlice()->getRefPic(REF_PIC_LIST_1, 0)->getPOC() == getSlice()->getPOC() ? 0 :
     2672//                        (getSlice()->getAlterRefIdx(REF_PIC_LIST_1) == -1 ? NOT_VALID : getSlice()->getAlterRefIdx(REF_PIC_LIST_1));
     2673//      pcMvFieldNeighbours[(iCount<<1)+1].setMvField( pDInfo->m_acDoNBDV, iRefIdxList1 );
     2674//    }
     2675//
     2676//    if ( mrgCandIdx == iCount )
     2677//      return true;
     2678//
     2679//    iCount++;
     2680//  }
     2681  /////////////
     2682 
    26822683  if(ucVspMergePos == H_3D_VSP_POSITION && picDepth != NULL && 0 != m_pcSlice->getViewIndex() ) // VSP can be used only when depth is used as input
    26832684  {
     
    26992700        if (refViewIdx == viewIdxRefInList)
    27002701        {
     2702          Int iRefIdxList0 = getSlice()->getRefPic(REF_PIC_LIST_0, 0)->getPOC() == getSlice()->getPOC() ? 0 :
     2703                            (getSlice()->getAlterRefIdx(REF_PIC_LIST_0) == -1 ? NOT_VALID : getSlice()->getAlterRefIdx(REF_PIC_LIST_0));
     2704
    27012705          refViewAvailFlag = true;
    27022706          predFlag[iRefListIdX] = 1;
    27032707          iRefListIdY = 1 - iRefListIdX;
    2704           pcMvFieldNeighbours[(iCount<<1)+iRefListIdX].setMvField( pDInfo->m_acDoNBDV, i );
     2708          pcMvFieldNeighbours[iCount<<1].setMvField( pDInfo->m_acDoNBDV, iRefIdxList0 );
     2709          // pcMvFieldNeighbours[(iCount<<1)+iRefListIdX].setMvField( pDInfo->m_acDoNBDV, i ); // Buggy code
    27052710        }
    27062711      }
     
    27162721        if (refViewIdx != viewIdxRefInList)
    27172722        {
     2723          Int iRefIdxList1 = getSlice()->getRefPic(REF_PIC_LIST_1, 0)->getPOC() == getSlice()->getPOC() ? 0 :
     2724                            (getSlice()->getAlterRefIdx(REF_PIC_LIST_1) == -1 ? NOT_VALID : getSlice()->getAlterRefIdx(REF_PIC_LIST_1));
     2725
    27182726          refViewAvailFlag = true;
    27192727          predFlag[iRefListIdY] = 1;
    2720           pcMvFieldNeighbours[(iCount<<1)+iRefListIdY].setMvField( pDInfo->m_acDoNBDV, i );
     2728          pcMvFieldNeighbours[(iCount<<1)+1].setMvField( pDInfo->m_acDoNBDV, iRefIdxList1 );
     2729          //pcMvFieldNeighbours[(iCount<<1)+iRefListIdY].setMvField( pDInfo->m_acDoNBDV, i );  // Buggy code
    27212730        }
    27222731      }
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComPrediction.cpp

    r510 r511  
    594594
    595595  // Step 4: Do compensation
    596   TComMv cMv  = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr );
     596  TComMv cMv  = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr ); // cMv is the disparity vector derived from the neighbors
    597597  pcCU->clipMv(cMv);
    598598  Int iBlkX = ( pcCU->getAddr() % pRefPicBaseDepth->getFrameWidthInCU() ) * g_uiMaxCUWidth  + g_auiRasterToPelX[ g_auiZscanToRaster[ uiAbsPartIdx ] ];
Note: See TracChangeset for help on using the changeset viewer.