Ignore:
Timestamp:
28 Nov 2013, 10:04:37 (10 years ago)
Author:
mediatek-htm
Message:

Bug fix for F0093, addded macro is

#define BUGFIX_F0093 1 bug fix for F0093 for depth IvMC pruning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-8.2-dev0-MediaTek/source/Lib/TLibDecoder/TDecEntropy.cpp

    r712 r716  
    213213  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS];
    214214#endif
    215 
     215#if MTK_SPIVMP_F0110
     216  Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
     217  TComMvField*  pcMvFieldSP;
     218  UChar* puhInterDirSP;
     219  pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2];
     220  puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()];
     221#endif
    216222  for ( UInt ui = 0; ui < pcCU->getSlice()->getMaxNumMergeCand(); ui++ )
    217223  {
     
    256262          memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    257263          InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
     264#if MTK_SPIVMP_F0110
     265          memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
     266#endif
    258267#if ETRIKHU_MERGE_REUSE_F0093
    259268          pcSubCU->initAvailableFlags();
    260269          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
    261           pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, numValidMergeCand );
     270          pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo
     271#if MTK_SPIVMP_F0110
     272            , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP
     273#endif
     274            , numValidMergeCand );
    262275#else
    263276          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, numValidMergeCand );
     
    290303        memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    291304        InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
     305#if MTK_SPIVMP_F0110
     306        memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
     307#endif
    292308#if ETRIKHU_MERGE_REUSE_F0093
    293309        pcSubCU->initAvailableFlags();
    294310        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    295         pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo,numValidMergeCand, uiMergeIndex );
     311        pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo
     312#if MTK_SPIVMP_F0110
     313          , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP
     314#endif
     315          ,numValidMergeCand, uiMergeIndex );
    296316#else
    297317        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo,numValidMergeCand, uiMergeIndex );
     
    325345        }
    326346      }
     347#if MTK_SPIVMP_F0110
     348      pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 
     349      if (bSPIVMPFlag[uiMergeIndex] != 0)
     350      {
     351        Int iWidth, iHeight;
     352        UInt uiIdx;
     353        pcCU->getPartIndexAndSize( uiPartIdx, uiIdx, iWidth, iHeight, uiSubPartIdx, true );
     354
     355        UInt uiSPAddr;
     356
     357        Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight;
     358
     359        pcCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight);
     360
     361        for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++)
     362        {
     363          pcCU->getSPAbsPartIdx(uiSubPartIdx, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr);
     364          pcCU->setInterDirSP(puhInterDirSP[iPartitionIdx], uiSPAddr, iSPWidth, iSPHeight);
     365          pcCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight);
     366          pcCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight);
     367        }
     368      }
     369#endif
    327370    }
    328371    else
     
    358401    }
    359402  }
     403#if MTK_SPIVMP_F0110
     404  delete pcMvFieldSP;
     405  delete puhInterDirSP;
     406#endif
    360407  return;
    361408}
Note: See TracChangeset for help on using the changeset viewer.