Changeset 442 in 3DVCSoftware


Ignore:
Timestamp:
25 May 2013, 12:59:47 (11 years ago)
Author:
tech
Message:

Merged fix related to VSP.

Location:
branches/HTM-6.2-dev0/source/Lib
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-6.2-dev0/source/Lib/TLibCommon/TComDataCU.cpp

    r433 r442  
    209209#endif
    210210#if LGE_VSP_INHERIT_D0092
     211#if MERL_VSP_NBDV_RefVId_Fix_D0166
     212         assert(pDInfo->m_aRefIdx[0] < 0);
     213         iVspDirTrue[0] = pDInfo->m_aListIdx[0];
     214         Int iRefIdxList0 = NOT_VALID;
     215         Int iRefIdxList1 = NOT_VALID;
     216         iRefIdxList0 = getSlice()->getRefPic(REF_PIC_LIST_0, 0)->getPOC()==getSlice()->getPOC() ? 0 : (getSlice()->getNewRefIdx(REF_PIC_LIST_0)==-1 ? NOT_VALID : getSlice()->getNewRefIdx(REF_PIC_LIST_0));
     217         if ( getSlice()->isInterB() )
     218         {
     219            iRefIdxList1 = getSlice()->getRefPic(REF_PIC_LIST_1, 0)->getPOC()==getSlice()->getPOC() ? 0 : (getSlice()->getNewRefIdx(REF_PIC_LIST_1)==-1 ? NOT_VALID : getSlice()->getNewRefIdx(REF_PIC_LIST_1));
     220         }
     221
     222#if MTK_VSP_USING_NBDV_D0105
     223        //pcMvFieldNeighbours[iCount<<1].setMvField(pDInfo->m_acMvCandNoRef[0], pDInfo->m_aListIdx[0]==REF_PIC_LIST_0 ? iRefIdxList0 :NOT_VALID  );
     224        pcMvFieldNeighbours[iCount<<1].setMvField(pDInfo->m_acMvCandNoRef[0],  iRefIdxList0 );
     225#else
     226        pcMvFieldNeighbours[iCount<<1].setMvField(pDInfo->m_acMvCand[0],  iRefIdxList0 );
     227#endif
     228         if ( getSlice()->isInterB() )
     229         {
     230#if MTK_VSP_USING_NBDV_D0105
     231          pcMvFieldNeighbours[(iCount<<1)+1].setMvField( pDInfo->m_acMvCandNoRef[0], iRefIdxList1 );
     232          //pcMvFieldNeighbours[(iCount<<1)+1].setMvField( pDInfo->m_acMvCandNoRef[0],  iRefIdxList1);
     233#else
     234          pcMvFieldNeighbours[(iCount<<1)+1].setMvField( pDInfo->m_acMvCand[0], iRefIdxList1);
     235#endif
     236         }
     237         iVSPIndexTrue[iCount] = 1;
     238#else
     239
     240#if !MERL_General_Fix
     241         Int iRefIdxList0 = NOT_VALID;
     242         Int iRefIdxList1 = NOT_VALID;
     243         iRefIdxList0 = getSlice()->getRefPic(REF_PIC_LIST_0, 0)->getPOC()==getSlice()->getPOC() ? 0 : (getSlice()->getNewRefIdx(REF_PIC_LIST_0)==-1 ? NOT_VALID : getSlice()->getNewRefIdx(REF_PIC_LIST_0));
     244         if ( getSlice()->isInterB() )
     245         {
     246           iRefIdxList1 = getSlice()->getRefPic(REF_PIC_LIST_1, 0)->getPOC()==getSlice()->getPOC() ? 0 : (getSlice()->getNewRefIdx(REF_PIC_LIST_1)==-1 ? NOT_VALID : getSlice()->getNewRefIdx(REF_PIC_LIST_1));
     247         }
     248#if MTK_VSP_USING_NBDV_D0105
     249         pcMvFieldNeighbours[iCount<<1].setMvField(pDInfo->m_acMvCandNoRef[0],  iRefIdxList0 );
     250#else
     251         pcMvFieldNeighbours[iCount<<1].setMvField(pDInfo->m_acMvCand[0],  iRefIdxList0 );
     252#endif
     253         if ( getSlice()->isInterB() )
     254         {
     255#if MTK_VSP_USING_NBDV_D0105
     256           pcMvFieldNeighbours[(iCount<<1)+1].setMvField( pDInfo->m_acMvCandNoRef[0], iRefIdxList1 );
     257#else
     258           pcMvFieldNeighbours[(iCount<<1)+1].setMvField( pDInfo->m_acMvCand[0], iRefIdxList1);
     259#endif
     260         }
     261         iVSPIndexTrue[iCount] = 1;
     262#else
    211263         Int iRefIdx = NOT_VALID;
     264
    212265#if QC_BVSP_CleanUP_D0191
    213266         iRefIdx = getSlice()->getRefPic(REF_PIC_LIST_0, 0)->getPOC()==getSlice()->getPOC() ? 0: getSlice()->getNewRefIdx(REF_PIC_LIST_0);
    214267#endif
     268#if MTK_VSP_USING_NBDV_D0105
     269         pcMvFieldNeighbours[iCount<<1].setMvField(pDInfo->m_acMvCandNoRef[0], iRefIdx );
     270#else
    215271         pcMvFieldNeighbours[iCount<<1].setMvField(pDInfo->m_acMvCand[0], iRefIdx );
     272#endif
    216273         if ( getSlice()->isInterB() )
    217274         {
     275#if MTK_VSP_USING_NBDV_D0105
     276           pcMvFieldNeighbours[(iCount<<1)+1].setMvField( pDInfo->m_acMvCandNoRef[0], iRefIdx );
     277#else
    218278             pcMvFieldNeighbours[(iCount<<1)+1].setMvField( pDInfo->m_acMvCand[0], iRefIdx );
     279#endif
    219280         }
    220281         iVSPIndexTrue[iCount] = 1;
     282#endif
     283#endif
    221284#else
    222285          // get Mv using checked disparity vector
     
    44804543  //===== vsp 3 =====
    44814544#if LGE_VSP_INHERIT_D0092
    4482     if ( !xAddVspMergeCand(3, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, iVSPIndexTrue, mrgCandIdx, &cDisInfo) )
     4545    if ( !xAddVspMergeCand(3, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, iVSPIndexTrue, mrgCandIdx, &cDisInfo
     4546#if MERL_VSP_NBDV_RefVId_Fix_D0166
     4547      , iVSPDirTrue
     4548#endif
     4549      ) )
    44834550#else
    44844551    if( iCount < 4 + extraMergeCand )
    4485         if ( !xAddVspMergeCand(3, 1, bVspMvZeroDone, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, iVSPIndexTrue, mrgCandIdx, &cDisInfo) )
     4552        if ( !xAddVspMergeCand(3, 1, bVspMvZeroDone, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, iVSPIndexTrue, mrgCandIdx, &cDisInfo
     4553#if MERL_VSP_NBDV_RefVId_Fix_D0166
     4554          , iVSPDirTrue
     4555#endif   
     4556          ) )
    44864557#endif
    44874558            return;
     
    46384709  if( iCount < 4 + extraMergeCand )
    46394710#if LGE_VSP_INHERIT_D0092
    4640     if ( !xAddVspMergeCand(5, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, iVSPIndexTrue, mrgCandIdx, &cDisInfo)
     4711    if ( !xAddVspMergeCand(5, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, iVSPIndexTrue, mrgCandIdx, &cDisInfo
    46414712#if MERL_VSP_NBDV_RefVId_Fix_D0166
    46424713         , iVSPDirTrue
    46434714#endif
    4644 )
     4715))
    46454716#else
    46464717    if ( !xAddVspMergeCand(5, 1, bVspMvZeroDone, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, iVSPIndexTrue, mrgCandIdx, &cDisInfo
     
    46484719         , iVSPDirTrue
    46494720#endif
    4650             )
     4721            ))
    46514722#endif
    46524723      return;
     
    56085679#endif
    56095680#endif
     5681#else
     5682          picDepth = getSlice()->getRefPicBaseDepth();
    56105683#endif
    56115684
  • branches/HTM-6.2-dev0/source/Lib/TLibCommon/TComPrediction.cpp

    r433 r442  
    831831
    832832#else // MERL_VSP_NBDV_RefVId_Fix_D0166
    833 
     833   // Step 1: get depth reference
     834#if QC_BVSP_CleanUP_D0191
     835  RefPicList privateRefPicList = REF_PIC_LIST_0;
     836  Int refIdxList0 = pcCU->getCUMvField( REF_PIC_LIST_0 )->getRefIdx( uiPartAddr );
     837  Int refIdxList1 = pcCU->getCUMvField( REF_PIC_LIST_1 )->getRefIdx( uiPartAddr );
     838  privateRefPicList = refIdxList0 != NOT_VALID ? REF_PIC_LIST_0 : REF_PIC_LIST_1;
     839  if(privateRefPicList == REF_PIC_LIST_1 && refIdxList1== NOT_VALID )
     840  {
     841    assert(0);
     842  }
     843  Int privateRefIdx = privateRefPicList == REF_PIC_LIST_0 ? refIdxList0 : refIdxList1;
     844  Int viewId = pcCU->getSlice()->getRefViewId(privateRefPicList, privateRefIdx);
     845  Int refPoc = pcCU->getSlice()->getRefPOC(privateRefPicList, privateRefIdx);
     846#else
    834847  //recover VSP reference frame according to negative refIdx number
    835848  RefPicList privateRefPicList = (RefPicList) pcCU->getVSPDir( uiPartAddr );
    836849  assert(privateRefPicList == REF_PIC_LIST_0 || privateRefPicList == REF_PIC_LIST_1);
    837 
    838   // Step 1: get depth reference
    839850  Int  refIdx = -1-pcCU->getCUMvField( privateRefPicList )->getRefIdx( uiPartAddr ); // texture ref index, a trick when storing refIdx
    840851  Int  viewId = pcCU->getSlice()->getRefViewId(privateRefPicList, refIdx);  // texture view id
    841852  Int  refPoc = pcCU->getSlice()->getRefPOC(privateRefPicList, refIdx);     // texture POC
     853#endif
    842854  TComPic* pRefPicBaseDepth = pcCU->getSlice()->getDepthRefPic(viewId, refPoc);
    843855
     
    883895TComPic*  TComPrediction::xGetVspRefTxt(TComDataCU* pcCU, UInt uiPartAddr, RefPicList eRefPicList)
    884896{
     897#if QC_BVSP_CleanUP_D0191
     898  RefPicList privateRefPicList = REF_PIC_LIST_0;
     899  Int refIdxList0 = pcCU->getCUMvField( REF_PIC_LIST_0 )->getRefIdx( uiPartAddr );
     900  Int refIdxList1 = pcCU->getCUMvField( REF_PIC_LIST_1 )->getRefIdx( uiPartAddr );
     901  privateRefPicList = refIdxList0 != NOT_VALID ? REF_PIC_LIST_0 : REF_PIC_LIST_1;
     902  if(privateRefPicList == REF_PIC_LIST_1 && refIdxList1==NOT_VALID )
     903  {
     904    assert(0);
     905  }
     906  Int privateRefIdx = privateRefPicList == REF_PIC_LIST_0 ? refIdxList0 : refIdxList1;
     907  Int viewId = pcCU->getSlice()->getRefViewId(privateRefPicList, privateRefIdx);
     908#else
    885909  RefPicList  privateRefPicList = (RefPicList) pcCU->getVSPDir( uiPartAddr );
    886910  Int         refIdx = -1-pcCU->getCUMvField( privateRefPicList )->getRefIdx( uiPartAddr ); // texture ref index, a trick when storing refIdx
    887911  Int         viewId = pcCU->getSlice()->getRefViewId(privateRefPicList, refIdx);  // texture view id
     912#endif
    888913  TComPic*    refPic = NULL;
    889914
     
    892917  if (privateRefPicList == eRefPicList)
    893918  {
     919#if QC_BVSP_CleanUP_D0191
     920    Int  refIdxt = pcCU->getCUMvField( eRefPicList )->getRefIdx( uiPartAddr );
     921#else
    894922    Int  refIdxt = -1-pcCU->getCUMvField( eRefPicList )->getRefIdx( uiPartAddr );
     923#endif
    895924    assert(refIdxt>= 0);
    896925    refPic = pcCU->getSlice()->getRefPic(eRefPicList, refIdxt);
     
    914943    if (isFound == false)
    915944    {
     945#if QC_BVSP_CleanUP_D0191
     946      Int  refIdxTxt = pcCU->getCUMvField( privateRefPicList )->getRefIdx( uiPartAddr );
     947#else
    916948      Int  refIdxTxt = -1-pcCU->getCUMvField( privateRefPicList )->getRefIdx( uiPartAddr );
     949#endif
    917950      assert(refIdxTxt >= 0);
    918951      refPic = pcCU->getSlice()->getRefPic(privateRefPicList, refIdxTxt);
     
    12371270  Bool biDecision = 0;
    12381271  Int  predDirVSP = 0;
     1272#if QC_BVSP_CleanUP_D0191
     1273  RefPicList privateRefPicList = REF_PIC_LIST_0;
     1274#endif
    12391275  if (pcCU->getVSPIndex(uiPartAddr) != 0) // is VSP
    12401276  {
     
    12421278    //test whether VSP is Bi or Uni
    12431279    //Step1. Get derived DV view id
     1280#if QC_BVSP_CleanUP_D0191
     1281    RefPicList otherRefPicList = REF_PIC_LIST_1;
     1282    Int refIdxList0 = pcCU->getCUMvField( REF_PIC_LIST_0 )->getRefIdx( uiPartAddr );
     1283    Int refIdxList1 = pcCU->getCUMvField( REF_PIC_LIST_1 )->getRefIdx( uiPartAddr );
     1284    privateRefPicList = refIdxList0 != NOT_VALID ? REF_PIC_LIST_0 : REF_PIC_LIST_1;
     1285    if(privateRefPicList == REF_PIC_LIST_1 && refIdxList1==NOT_VALID )
     1286    {
     1287      assert(0);
     1288    }
     1289    Int privateRefIdx = privateRefPicList == REF_PIC_LIST_0 ? refIdxList0 : refIdxList1;
     1290    Int viewId = pcCU->getSlice()->getRefViewId(privateRefPicList, privateRefIdx);
     1291    Int refPoc = pcCU->getSlice()->getRefPOC(privateRefPicList, privateRefIdx);
     1292#else
     1293    Int  refIdx = pcCU->getCUMvField( privateRefPicList )->getRefIdx( uiPartAddr );
    12441294    RefPicList privateRefPicList = (RefPicList) pcCU->getVSPDir( uiPartAddr );
    12451295    RefPicList otherRefPicList = privateRefPicList == REF_PIC_LIST_0 ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
     
    12491299    Int  viewId = pcCU->getSlice()->getRefViewId(privateRefPicList, refIdx);
    12501300    Int  refPoc = pcCU->getSlice()->getRefPOC(privateRefPicList, refIdx);
    1251 
     1301#endif
    12521302    assert(refPoc == pcCU->getSlice()->getPOC());
    12531303//    if(refPoc != pcCU->getSlice()->getPOC() )
     
    13181368#else
    13191369      //Reference list loop termination
     1370#if QC_BVSP_CleanUP_D0191
     1371      RefPicList privateVSPRefPicList = privateRefPicList;
     1372#else
    13201373      RefPicList privateVSPRefPicList = (RefPicList) pcCU->getVSPDir( uiPartAddr );
     1374#endif
    13211375      if( (pcCU->getVSPIndex(uiPartAddr)!=0) &&  iRefList != privateVSPRefPicList && !biDecision  )
    13221376      {//when VSP mode, if it is uni prediction, the other reference list should skip
  • branches/HTM-6.2-dev0/source/Lib/TLibCommon/TypeDef.h

    r433 r442  
    221221
    222222
    223 #define MERL_General_Fix                     0 // General fix by MERL
     223#define MERL_General_Fix                     1// General fix by MERL
    224224#define MERL_VSP_C0152_BugFix_ForNoDepthCase 1 // MERL bugfix for test condition of no depth
    225225#define QC_BVSP_CleanUP_D0191                    1
  • branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecCu.cpp

    r433 r442  
    458458      pcCU->setVSPIndexSubParts( iVSPIdx, uiAbsPartIdx, 0, uiDepth );  // Initialize
    459459#if MERL_VSP_NBDV_RefVId_Fix_D0166
    460       pcCU->setVSPDirSubParts( iVSPDirTrue[iVSPIdx-1], uiAbsPartIdx, 0, uiDepth );
     460      pcCU->setVSPDirSubParts( 0, uiAbsPartIdx, 0, uiDepth );
    461461#endif
    462462#if QC_BVSP_CleanUP_D0191 && !LGE_VSP_INHERIT_D0092
  • branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp

    r434 r442  
    394394        pcCU->setVSPIndexSubParts( iVSPIdx, uiSubPartIdx, uiPartIdx, uiDepth );               // Initialize
    395395#if MERL_VSP_NBDV_RefVId_Fix_D0166
    396         pcCU->setVSPDirSubParts( iVSPDirTrue[iVSPIdx-1], uiSubPartIdx, uiPartIdx, uiDepth );  // Initialize
     396        pcCU->setVSPDirSubParts( 0, uiSubPartIdx, uiPartIdx, uiDepth );  // Initialize
    397397#endif
    398398#if QC_BVSP_CleanUP_D0191 && !LGE_VSP_INHERIT_D0092
  • branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncCu.cpp

    r427 r442  
    20542054            rpcTempCU->setVSPIndexSubParts( iVSPIdx, 0, 0, uhDepth );
    20552055#if MERL_VSP_NBDV_RefVId_Fix_D0166
    2056             rpcTempCU->setVSPDirSubParts( iVSPDirTrue[iVSPIdx-1], 0, 0, uhDepth ); // interprets depth relative to LCU level
     2056            rpcTempCU->setVSPDirSubParts(0, 0, 0, uhDepth ); // interprets depth relative to LCU level
    20572057#endif
    20582058#if QC_BVSP_CleanUP_D0191 && !LGE_VSP_INHERIT_D0092
  • branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncSearch.cpp

    r433 r442  
    30533053        pcCU->setVSPIndexSubParts( iVSPIdx, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
    30543054#if MERL_VSP_NBDV_RefVId_Fix_D0166
    3055         pcCU->setVSPDirSubParts( iVSPDirTrue[iVSPIdx-1], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
     3055        pcCU->setVSPDirSubParts(0, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
    30563056#endif
    30573057#if QC_BVSP_CleanUP_D0191 && !LGE_VSP_INHERIT_D0092
     
    38173817          pcCU->setVSPIndexSubParts( iVSPIdx, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    38183818#if MERL_VSP_NBDV_RefVId_Fix_D0166
    3819           pcCU->setVSPDirSubParts( iVSPDirTrue[iVSPIdx-1], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
     3819          pcCU->setVSPDirSubParts( 0, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    38203820#endif
    38213821#if QC_BVSP_CleanUP_D0191 && !LGE_VSP_INHERIT_D0092
Note: See TracChangeset for help on using the changeset viewer.