Ignore:
Timestamp:
28 Aug 2013, 04:55:26 (12 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/TLibEncoder
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • 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.