Changeset 185 in 3DVCSoftware for branches/HTM-4.1-dev0


Ignore:
Timestamp:
14 Nov 2012, 20:45:12 (12 years ago)
Author:
tech
Message:

Reintegrated /branches/HTM-4.1-dev1-HHI rev. 176.

Location:
branches/HTM-4.1-dev0
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-4.1-dev0/cfg/encoder_mvd.cfg

    r183 r185  
    205205VSO                       : 1                                      # use of view synthesis optimization for depth coding
    206206QTLPC                     : 1                                      # use of quadtree limitation + predictive coding of the quadtree for depth coding
    207 SDC                                                                                             :       1                                                                                                                                                        # use simplified depth coding tree
    208 DLT                                                                                             :       1                                                                                                                                                        # use depth lookup table
     207SDC                       : 1                                      # use simplified depth coding tree
     208DLT                       : 1                                      # use depth lookup table
    209209
    210210#========== view synthesis optimization (VSO) ==========
  • branches/HTM-4.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp

    r183 r185  
    457457                                              "\t0: disable")
    458458
     459#if TMVP_DEPTH_SWITCH
     460  ("TMVP", m_enableTMVP, std::vector<Bool>(1,true), "Enable TMVP" )
     461#else
    459462  ("TMVP", m_enableTMVP, true, "Enable TMVP" )
     463#endif
    460464
    461465  ("FEN", m_bUseFastEnc, false, "fast encoder setting")
     
    690694#endif
    691695  xCleanUpVectors();
     696
     697
     698#if TMVP_DEPTH_SWITCH
     699  if ( m_enableTMVP.size() < 2)
     700  {
     701    m_enableTMVP.push_back( m_enableTMVP[0]  );
     702  }
     703#endif
     704 
    692705
    693706#if HHI_VSO
     
    17111724  printf(" ScalingList:%d ", m_useScalingListId );
    17121725
     1726#if !TMVP_DEPTH_SWITCH
    17131727  printf("TMVP:%d ", m_enableTMVP     );
     1728#endif
    17141729
    17151730#if ADAPTIVE_QP_SELECTION
     
    17251740  printf("SAO:%d ", (m_abUseSAO [0] ? 1 : 0));
    17261741  printf("RDQ:%d ", (m_abUseRDOQ[0] ? 1 : 0) );
     1742#if TMVP_DEPTH_SWITCH
     1743  printf("TMVP:%d ", (m_enableTMVP[0] ? 1 : 0) );
     1744#endif
    17271745#if LGE_ILLUCOMP_B0045
    17281746  printf("IlluCompEnable: %d ", m_bUseIC);
    17291747#endif
     1748
    17301749  printf("\n");
    17311750
     
    17341753  printf("SAO:%d ", (m_abUseSAO [1] ? 1 : 0));
    17351754  printf("RDQ:%d ", (m_abUseRDOQ[1] ? 1 : 0));
     1755#if TMVP_DEPTH_SWITCH
     1756  printf("TMVP:%d ", (m_enableTMVP[1] ? 1 : 0) );
     1757#endif
    17361758#if HHI_VSO
    17371759  printf("VSO:%d ", m_bUseVSO             );
  • branches/HTM-4.1-dev0/source/App/TAppEncoder/TAppEncCfg.h

    r181 r185  
    261261  UInt      m_uiBiPredIdc;                                    ///< Use of Bi-Directional Weighting Prediction (B_SLICE): explicit(1) or implicit(2)
    262262
     263#if TMVP_DEPTH_SWITCH
     264  vector<Bool> m_enableTMVP;                                  ///< Enable TMVP [0] video, [1] depth
     265#else
    263266  Bool      m_enableTMVP;
     267#endif
     268
    264269#if MULTIBITS_DATA_HIDING
    265270  Int       m_signHideFlag;
  • branches/HTM-4.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp

    r183 r185  
    345345    m_acTEncTopList[iViewIdx]->setWaveFrontFlush             ( m_iWaveFrontFlush );
    346346    m_acTEncTopList[iViewIdx]->setWaveFrontSubstreams        ( m_iWaveFrontSubstreams );
     347#if TMVP_DEPTH_SWITCH
     348    m_acTEncTopList[iViewIdx]->setEnableTMVP                 ( m_enableTMVP[0] );
     349#else
    347350    m_acTEncTopList[iViewIdx]->setEnableTMVP ( m_enableTMVP );
     351#endif
    348352    m_acTEncTopList[iViewIdx]->setUseScalingListId           ( m_useScalingListId  );
    349353    m_acTEncTopList[iViewIdx]->setScalingListFile            ( m_scalingListFile   );
     
    631635      m_acTEncDepthTopList[iViewIdx]->setWaveFrontFlush             ( m_iWaveFrontFlush );
    632636      m_acTEncDepthTopList[iViewIdx]->setWaveFrontSubstreams        ( m_iWaveFrontSubstreams );
     637#if TMVP_DEPTH_SWITCH
     638      m_acTEncDepthTopList[iViewIdx]->setEnableTMVP                 ( m_enableTMVP[1] );
     639#else
    633640      m_acTEncDepthTopList[iViewIdx]->setEnableTMVP ( m_enableTMVP );
     641#endif
    634642      m_acTEncDepthTopList[iViewIdx]->setUseScalingListId           ( m_useScalingListId  );
    635643      m_acTEncDepthTopList[iViewIdx]->setScalingListFile            ( m_scalingListFile   );
  • branches/HTM-4.1-dev0/source/App/TAppRenderer/TAppRendererCfg.cpp

    r100 r185  
    120120
    121121    /* File I/O */
    122     ("VideoInputFileBaseName",  m_pchVideoInputFileBaseName,  (Char*) 0, "Basename to generate video input file names")
    123     ("DepthInputFileBaseName",  m_pchDepthInputFileBaseName,  (Char*) 0, "Basename to generate depth input file names")
    124     ("SynthOutputFileBaseName", m_pchSynthOutputFileBaseName, (Char*) 0, "Basename to generate synthesized output file names")
     122    ("VideoInputFileBaseName,v",  m_pchVideoInputFileBaseName,  (Char*) 0, "Basename to generate video input file names")
     123    ("DepthInputFileBaseName,d",  m_pchDepthInputFileBaseName,  (Char*) 0, "Basename to generate depth input file names")
     124    ("SynthOutputFileBaseName,s", m_pchSynthOutputFileBaseName, (Char*) 0, "Basename to generate synthesized output file names")
    125125    ("ContOutputFileNumbering", m_bContOutputFileNumbering  ,  false   , "Continuous Output File Numbering")
    126126    ("Sweep"                  , m_bSweep                    ,  false   , "Store all views in first Output File")
     
    137137
    138138    /* Camera Specification */
    139     ("CameraParameterFile,cpf", m_pchCameraParameterFile,          (Char *) 0, "Camera Parameter File Name")
     139    ("CameraParameterFile,-cpf", m_pchCameraParameterFile,          (Char *) 0, "Camera Parameter File Name")
    140140    ("BaseViewCameraNumbers"  , m_pchBaseViewCameraNumbers,        (Char *) 0, "Numbers of base views")
    141141    ("SynthViewCameraNumbers" , m_pchSynthViewCameraNumbers,       (Char *) 0, "Numbers of views to synthesis")
  • branches/HTM-4.1-dev0/source/Lib/TLibCommon/CommonDef.h

    r127 r185  
    139139#define PDM_NO_INTER_UPDATE               1         // no update for inter (but not inter-view) predicted blocks
    140140#define PDM_MERGE_POS                     0         // position of pdm in merge list (0..4)
     141
     142#if QC_MRG_CANS_B0048
     143#if OL_DISMV_POS_B0069
     144#define DMV_MERGE_POS                     4
     145#else
     146#define DMV_MERGE_POS                     1
     147#endif
     148#endif
     149
    141150#if SAIT_IMPROV_MOTION_PRED_M24829&!QC_MULTI_DIS_CAN
    142151#define PDM_AMVP_POS                      0         // position of pdm in amvp list  (0..3)
  • branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp

    r181 r185  
    36643664
    36653665  //===== add merge with predicted depth maps =====
     3666#if QC_MRG_CANS_B0048
     3667  TComMv  acPdmMv       [4];
     3668  Int     aiPdmRefIdx   [4] = {-1, -1, -1, -1};
     3669  Bool    bLeftAvai         = false;
     3670#if OL_DISMV_POS_B0069
     3671  Int     iPosLeftAbove[2]  = {-1, -1};
     3672#endif
     3673#else
    36663674  TComMv  acPdmMv       [2];
    36673675  Int     aiPdmRefIdx   [2] = {-1, -1};
     3676#endif
    36683677
    36693678#if LGE_DVMCP
     3679#if QC_MRG_CANS_B0048
     3680  acPdmMv[0].m_bDvMcp = acPdmMv[1].m_bDvMcp = acPdmMv[2].m_bDvMcp = acPdmMv[3].m_bDvMcp = false;
     3681#else
    36703682  acPdmMv[0].m_bDvMcp = acPdmMv[1].m_bDvMcp = false;
     3683#endif
    36713684#endif
    36723685
     
    36773690  {
    36783691#if LGE_DVMCP
    3679     getDisMvpCand2(uiPUIdx, uiAbsPartIdx, &cDisInfo, true );
     3692#if LGE_IVMP_PARALLEL_MERGE_B0136 && !QC_SIMPLE_NBDV_B0047
     3693    getDisMvpCand2(uiPUIdx, uiAbsPartIdx, &cDisInfo, true, REF_PIC_LIST_X, -1, true );
     3694#else
     3695    getDisMvpCand2(uiPUIdx, uiAbsPartIdx, &cDisInfo
     3696#if LGE_IVMP_PARALLEL_MERGE_B0136==QC_SIMPLE_NBDV_B0047
     3697,
     3698true
     3699#endif
     3700);
     3701#endif
    36803702#else
    36813703    getDisMvpCand (uiPUIdx, uiAbsPartIdx, &cDisInfo );
     
    36893711    cDisInfo.m_aVIdxCan[0] = 0;
    36903712  }
    3691   Int     iPdmInterDir      = cDisInfo.iN==0? 0:getPdmMergeCandidateDisCan ( uiPUIdx, aiPdmRefIdx, acPdmMv, &cDisInfo  );
     3713#if QC_MRG_CANS_B0048
     3714  Int iPdmDir[2] = {0, 0};
     3715#endif
     3716  Int     iPdmInterDir      = cDisInfo.iN==0? 0:getPdmMergeCandidateDisCan ( uiPUIdx, aiPdmRefIdx, acPdmMv, &cDisInfo 
     3717#if QC_MRG_CANS_B0048
     3718    , iPdmDir
     3719#endif
     3720    );
    36923721#else
    36933722  Int     iPdmInterDir      = getPdmMergeCandidate( uiPUIdx, aiPdmRefIdx, acPdmMv );
    36943723#endif
    3695 
     3724#if QC_MRG_CANS_B0048
     3725  if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 0 )
     3726#else
    36963727  if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 0 )
     3728#endif
    36973729  {
    36983730    abCandIsInter        [ iCount ] = true;
     3731#if QC_MRG_CANS_B0048
     3732    puhInterDirNeighbours[ iCount ] = iPdmDir[0];
     3733    iPdmInterDir                    = iPdmDir[0];
     3734#else
    36993735    puhInterDirNeighbours[ iCount ] = iPdmInterDir;
     3736#endif
    37003737    if( ( iPdmInterDir & 1 ) == 1 )
    37013738    {
    37023739      pcMvFieldNeighbours[ iCount<<1    ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] );
    37033740    }
     3741#if FIX_CU_BASED_MRG_CAND_LIST_B0136
     3742    else
     3743    {
     3744      pcMvFieldNeighbours[ iCount<<1    ].setMvField( TComMv(0,0), NOT_VALID );
     3745    }
     3746#endif
    37043747    if( ( iPdmInterDir & 2 ) == 2 )
    37053748    {
    37063749      pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] );
    37073750    }
     3751#if FIX_CU_BASED_MRG_CAND_LIST_B0136
     3752    else
     3753    {
     3754      pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID );
     3755    }
     3756#endif
    37083757#if SIMP_MRG_PRUN
    37093758    if ( mrgCandIdx == iCount )
     
    37163765#endif
    37173766
     3767#if QC_MRG_CANS_B0048
     3768  if(extraMergeCand)
     3769  {
     3770    if(!bNoPdmMerge && iPdmDir[1] && DMV_MERGE_POS == 1)
     3771    {
     3772      assert(iCount < MRG_MAX_NUM_CANDS_MEM);
     3773      abCandIsInter        [ iCount ] = true;
     3774      puhInterDirNeighbours[ iCount ] = iPdmDir[1];
     3775      if( ( iPdmDir[1] & 1 ) == 1 )
     3776      {
     3777        pcMvFieldNeighbours[ iCount<<1    ].setMvField( acPdmMv[ 2 ], aiPdmRefIdx[ 2 ] );
     3778      }
     3779      if( ( iPdmDir[1] & 2 ) == 2 )
     3780      {
     3781        pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 3 ], aiPdmRefIdx[ 3 ] );
     3782      }
     3783#if LGE_DVMCP
     3784      pcMvFieldNeighbours[iCount<<1    ].getMv().m_bDvMcp = false;
     3785      pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false;
     3786#endif
     3787#if SIMP_MRG_PRUN
     3788      if ( mrgCandIdx == iCount )
     3789          return;
     3790#endif
     3791      iCount ++;
     3792    }   
     3793  }
     3794#endif
    37183795  //left
    37193796  UInt uiLeftPartIdx = 0;
     
    37473824      pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    37483825    }
     3826#if FIX_CU_BASED_MRG_CAND_LIST_B0136
     3827    else
     3828    {
     3829      pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID );
     3830    }
     3831#endif
     3832#if QC_MRG_CANS_B0048
     3833    Bool bRemoveSpa = false; //prunign to inter-view candidates
     3834    Int  iCnloop    = iCount - 1;
     3835    for(; iCnloop >= 0; iCnloop --)
     3836    {
     3837      if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])
     3838      {
     3839        bRemoveSpa                      = true;
     3840        abCandIsInter        [ iCount ] = false;
     3841      }
     3842    }
     3843    if(!bRemoveSpa)
     3844    {
     3845      bLeftAvai = true;
     3846#if OL_DISMV_POS_B0069
     3847      iPosLeftAbove[0] = iCount;
     3848#endif
     3849#endif
    37493850#if LGE_DVMCP
    37503851    pcMvFieldNeighbours[iCount<<1    ].getMv().m_bDvMcp = false;
     
    37583859#endif
    37593860    iCount ++;
     3861#if QC_MRG_CANS_B0048
     3862      }
     3863#endif
    37603864  }
    37613865  }
    37623866
    37633867#if HHI_INTER_VIEW_MOTION_PRED
     3868#if QC_MRG_CANS_B0048
     3869  if( iPdmDir[0]   && !bNoPdmMerge && PDM_MERGE_POS == 1 )
     3870#else
    37643871  if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 1 )
     3872#endif
    37653873  {
    37663874    abCandIsInter        [ iCount ] = true;
     
    37703878      pcMvFieldNeighbours[ iCount<<1    ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] );
    37713879    }
     3880#if FIX_CU_BASED_MRG_CAND_LIST_B0136
     3881    else
     3882    {
     3883      pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID );
     3884    }
     3885#endif
    37723886    if( ( iPdmInterDir & 2 ) == 2 )
    37733887    {
    37743888      pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] );
    37753889    }
     3890#if FIX_CU_BASED_MRG_CAND_LIST_B0136
     3891    else
     3892    {
     3893      pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID );
     3894    }
     3895#endif
    37763896#if SIMP_MRG_PRUN
    37773897    if ( mrgCandIdx == iCount )
     
    38233943      pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    38243944    }
     3945#if FIX_CU_BASED_MRG_CAND_LIST_B0136
     3946    else
     3947    {
     3948      pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID );
     3949    }
     3950#endif
     3951#if QC_MRG_CANS_B0048
     3952    Bool bRemoveSpa = false; //prunign to inter-view candidates
     3953    Int  iCnloop    = bLeftAvai? (iCount-2): (iCount-1);
     3954    for(; iCnloop >= 0; iCnloop --)
     3955    {
     3956      if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])
     3957      {
     3958        bRemoveSpa                      = true;
     3959        abCandIsInter        [ iCount ] = false;
     3960      }
     3961    }
     3962    if(!bRemoveSpa)
     3963    {
     3964#if OL_DISMV_POS_B0069
     3965      iPosLeftAbove[1] = iCount;
     3966#endif
     3967#endif
    38253968#if LGE_DVMCP
    38263969    pcMvFieldNeighbours[iCount<<1    ].getMv().m_bDvMcp = false;
     
    38343977#endif
    38353978    iCount ++;
     3979#if QC_MRG_CANS_B0048
     3980    }
     3981#endif
    38363982  }
    38373983#if !SIMP_MRG_PRUN
     
    38403986
    38413987#if HHI_INTER_VIEW_MOTION_PRED
     3988#if QC_MRG_CANS_B0048
     3989  if( iPdmDir[0]   && !bNoPdmMerge && PDM_MERGE_POS == 2 )
     3990#else
    38423991  if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 2 )
     3992#endif
    38433993  {
    38443994    abCandIsInter        [ iCount ] = true;
     
    38483998      pcMvFieldNeighbours[ iCount<<1    ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] );
    38493999    }
     4000#if FIX_CU_BASED_MRG_CAND_LIST_B0136
     4001    else
     4002    {
     4003      pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID );
     4004    }
     4005#endif
    38504006    if( ( iPdmInterDir & 2 ) == 2 )
    38514007    {
    38524008      pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] );
    38534009    }
     4010#if FIX_CU_BASED_MRG_CAND_LIST_B0136
     4011    else
     4012    {
     4013      pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID );
     4014    }
     4015#endif
    38544016#if SIMP_MRG_PRUN
    38554017    if ( mrgCandIdx == iCount )
     
    38944056      pcCUAboveRight->getMvField( pcCUAboveRight, uiAboveRightPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    38954057    }
     4058#if FIX_CU_BASED_MRG_CAND_LIST_B0136
     4059    else
     4060    {
     4061      pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID );
     4062    }
     4063#endif
    38964064#if LGE_DVMCP
    38974065    pcMvFieldNeighbours[iCount<<1    ].getMv().m_bDvMcp = false;
     
    39084076
    39094077#if HHI_INTER_VIEW_MOTION_PRED
     4078#if QC_MRG_CANS_B0048
     4079  if( iPdmDir[0]   && !bNoPdmMerge && PDM_MERGE_POS == 3 )
     4080#else
    39104081  if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 3 )
     4082#endif
    39114083  {
    39124084    abCandIsInter        [ iCount ] = true;
     
    39164088      pcMvFieldNeighbours[ iCount<<1    ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] );
    39174089    }
     4090#if FIX_CU_BASED_MRG_CAND_LIST_B0136
     4091    else
     4092    {
     4093      pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID );
     4094    }
     4095#endif
    39184096    if( ( iPdmInterDir & 2 ) == 2 )
    39194097    {
    39204098      pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] );
    39214099    }
     4100#if FIX_CU_BASED_MRG_CAND_LIST_B0136
     4101    else
     4102    {
     4103      pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID );
     4104    }
     4105#endif
    39224106#if SIMP_MRG_PRUN
    39234107    if ( mrgCandIdx == iCount )
     
    39304114#endif
    39314115
     4116#if OL_DISMV_POS_B0069
     4117  if(extraMergeCand)
     4118  {
     4119    if(!bNoPdmMerge && iPdmDir[1] && DMV_MERGE_POS == 4)
     4120    {
     4121      assert(iCount < MRG_MAX_NUM_CANDS_MEM);
     4122      Bool bRemoveSpa = false; //prunign to A1, B1
     4123      abCandIsInter        [ iCount ] = true;
     4124      puhInterDirNeighbours[ iCount ] = iPdmDir[1];
     4125      if( ( iPdmDir[1] & 1 ) == 1 )
     4126      {
     4127        pcMvFieldNeighbours[ iCount<<1    ].setMvField( acPdmMv[ 2 ], aiPdmRefIdx[ 2 ] );
     4128      }
     4129      if( ( iPdmDir[1] & 2 ) == 2 )
     4130      {
     4131        pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 3 ], aiPdmRefIdx[ 3 ] );
     4132      }
     4133      for(Int i = 0; i < 2; i ++)
     4134      {
     4135        Int iCnloop = iPosLeftAbove[i];
     4136        if(iCnloop == -1)
     4137          continue;
     4138        if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])
     4139        {
     4140          bRemoveSpa                      = true;
     4141          abCandIsInter        [ iCount ] = false;
     4142        }
     4143      }
     4144      if(!bRemoveSpa)
     4145      {
     4146#if LGE_DVMCP
     4147        pcMvFieldNeighbours[iCount<<1    ].getMv().m_bDvMcp = false;
     4148        pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false;
     4149#endif
     4150#if SIMP_MRG_PRUN
     4151        if ( mrgCandIdx == iCount )
     4152          return;
     4153#endif
     4154        iCount ++;
     4155      }
     4156    }   
     4157  }
     4158#endif
    39324159  //left bottom
    39334160  UInt uiLeftBottomPartIdx = 0;
     
    39624189      pcCULeftBottom->getMvField( pcCULeftBottom, uiLeftBottomPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    39634190    }
     4191#if FIX_CU_BASED_MRG_CAND_LIST_B0136
     4192    else
     4193    {
     4194      pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID );
     4195    }
     4196#endif
    39644197#if LGE_DVMCP
    39654198    pcMvFieldNeighbours[iCount<<1    ].getMv().m_bDvMcp = false;
     
    39764209
    39774210#if HHI_INTER_VIEW_MOTION_PRED
     4211#if QC_MRG_CANS_B0048
     4212  if( iPdmDir[0]   && !bNoPdmMerge && PDM_MERGE_POS == 4 )
     4213#else
    39784214  if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 4 )
     4215#endif
    39794216  {
    39804217    abCandIsInter        [ iCount ] = true;
     
    39844221      pcMvFieldNeighbours[ iCount<<1    ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] );
    39854222    }
     4223#if FIX_CU_BASED_MRG_CAND_LIST_B0136
     4224    else
     4225    {
     4226      pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID );
     4227    }
     4228#endif
    39864229    if( ( iPdmInterDir & 2 ) == 2 )
    39874230    {
    39884231      pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] );
    39894232    }
     4233#if FIX_CU_BASED_MRG_CAND_LIST_B0136
     4234    else
     4235    {
     4236      pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID );
     4237    }
     4238#endif
    39904239#if SIMP_MRG_PRUN
    39914240    if ( mrgCandIdx == iCount )
     
    40394288        pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    40404289      }
     4290#if FIX_CU_BASED_MRG_CAND_LIST_B0136
     4291      else
     4292      {
     4293        pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID );
     4294      }
     4295#endif
    40414296#if LGE_DVMCP
    40424297      pcMvFieldNeighbours[iCount<<1    ].getMv().m_bDvMcp = false;
     
    40534308  }
    40544309
    4055   if ( getSlice()->getPPS()->getEnableTMVPFlag() )
     4310  if ( getSlice()->getPPS()->getEnableTMVPFlag()
     4311#if QC_MRG_CANS_B0048
     4312       && iCount < (MRG_MAX_NUM_CANDS_SIGNALED + extraMergeCand)
     4313#endif
     4314  )
    40564315  {
    40574316    // col [2]
     
    41534412        {
    41544413          puhInterDirNeighbours[uiArrayAddr] = 1;
     4414#if FIX_CU_BASED_MRG_CAND_LIST_B0136
     4415          pcMvFieldNeighbours[ ( uiArrayAddr << 1 ) + 1 ].setMvField( TComMv(0,0), NOT_VALID );
     4416#endif
    41554417        }
    41564418      }
     
    41584420      {
    41594421        puhInterDirNeighbours[uiArrayAddr] = 1;
     4422#if FIX_CU_BASED_MRG_CAND_LIST_B0136
     4423        pcMvFieldNeighbours[ ( uiArrayAddr << 1 ) + 1 ].setMvField( TComMv(0,0), NOT_VALID );
     4424#endif
    41604425      }
    41614426#if LGE_DVMCP
     
    43954660      pcMvFieldNeighbours[(uiArrayAddr << 1) + 1].setMvField(TComMv(0, 0), r);
    43964661    }
     4662#if FIX_CU_BASED_MRG_CAND_LIST_B0136
     4663    else
     4664    {
     4665      pcMvFieldNeighbours[ ( uiArrayAddr << 1 ) + 1 ].setMvField( TComMv(0,0), NOT_VALID );
     4666    }
     4667#endif
    43974668    uiArrayAddr++;
    43984669  }
     
    49595230
    49605231#if LGE_DVMCP
    4961 Void TComDataCU::getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo, Bool bMerge, RefPicList eRefPicList0, Int iRefIdx0 )
     5232#if QC_SIMPLE_NBDV_B0047
     5233Void TComDataCU::getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo
     5234#if LGE_IVMP_PARALLEL_MERGE_B0136
     5235                                , Bool bParMerge
     5236#endif
     5237#else
     5238Void TComDataCU::getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo, Bool bMerge, RefPicList eRefPicList0, Int iRefIdx0
     5239#if LGE_IVMP_PARALLEL_MERGE_B0136
     5240                                , Bool bParMerge
     5241#endif
     5242#endif
     5243                                )
    49625244{
    49635245  PartSize eCUMode = getPartitionSize( uiPartAddr );
    49645246  TComDataCU* pcTmpCU = NULL;
     5247#if !QC_SIMPLE_NBDV_B0047
    49655248  TComDataCU* pcCULeft = NULL;
     5249#endif
    49665250  pDInfo->iN = 0;
    49675251
     
    49715255  UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth();
    49725256
    4973   Int   aiDvMcpDvCand[2][7] = {{0,},    {0,}}; // dummy, 5 spatial + 1 temporal, DV-MCP ÁÖº¯ ºí·°¿¡¼­ »ç¿ëµÈ DV¸¦ ÀúÀå
     5257#if QC_SIMPLE_NBDV_B0047
     5258  const Int iNumofDvMCP = 7;
     5259  Int   aiDvMcpDvCand[2][iNumofDvMCP] = {{0,},    {0,}}; // dummy, 5 spatial + 1 temporal
     5260  Bool  abDvMcpFlag  [2][iNumofDvMCP] = {{false,},{false,}};
     5261#else
     5262  Int   aiDvMcpDvCand[2][7] = {{0,},    {0,}}; // dummy, 5 spatial + 1 temporal
    49745263  Bool  abDvMcpFlag  [2][7] = {{false,},{false,}};
    49755264  //Int   aiRefPOC     [2][7] = {{-1,},{-1}}; // debug
     5265#endif
    49765266  TComMv cTmpMvPred, cMv;
    49775267  Bool  bTmpIsSkipped = false;
    49785268  Bool  bDvMcpIsFound = false;
     5269#if LGE_DVMCP_MEM_REDUCTION_B0135
     5270  Int iLCUAddrDiff = 0;
     5271#endif
     5272
     5273#if LGE_IVMP_PARALLEL_MERGE_B0136
     5274  Int xP, yP, nPSW, nPSH;
     5275  if( bParMerge)
     5276    this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH);
     5277#endif
    49795278
    49805279  deriveLeftRightTopIdxGeneral( eCUMode, uiPartAddr, uiPartIdx, uiPartIdxLT, uiPartIdxRT );
     
    49875286  pcTmpCU = getPULeft(uiIdx, uiPartIdxLB);
    49885287#endif
    4989 
     5288#if DV_DERIVATION_PARALLEL_B0096
     5289  if ( uiPartIdx == 1 && (eCUMode == SIZE_Nx2N || eCUMode == SIZE_nLx2N || eCUMode == SIZE_nRx2N) )
     5290  {
     5291    pcTmpCU = NULL;
     5292  }
     5293#endif
     5294#if LGE_IVMP_PARALLEL_MERGE_B0136
     5295  if (pcTmpCU && bParMerge)
     5296  {
     5297    if (!pcTmpCU->isDiffMER(xP -1, yP+nPSH-1, xP, yP))
     5298    {
     5299      pcTmpCU = NULL;
     5300    }
     5301  }
     5302#endif
     5303
     5304#if !QC_SIMPLE_NBDV_B0047
    49905305  pcCULeft = pcTmpCU;
    49915306  UInt uiLeftPartIdx = uiIdx;
     5307#endif
     5308
    49925309  if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) )
    49935310  {
     
    50275344  pcTmpCU = getPUAbove(uiIdx, uiPartIdxRT);
    50285345#endif
     5346#if DV_DERIVATION_PARALLEL_B0096
     5347  if ( uiPartIdx == 1 && (eCUMode == SIZE_2NxN || eCUMode == SIZE_2NxnU || eCUMode == SIZE_2NxnD) )
     5348  {
     5349    pcTmpCU = NULL;
     5350  }
     5351#endif
     5352#if LGE_IVMP_PARALLEL_MERGE_B0136
     5353  if (pcTmpCU && bParMerge)
     5354  {
     5355    if (!pcTmpCU->isDiffMER(xP+nPSW-1, yP-1, xP, yP))
     5356    {
     5357      pcTmpCU = NULL;
     5358    }
     5359  }
     5360#endif
    50295361
    50305362  if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ))
    50315363  {
     5364#if LGE_DVMCP_MEM_REDUCTION_B0135
     5365    iLCUAddrDiff = getAddr() - pcTmpCU->getAddr();
     5366#endif
    50325367    bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx );
    50335368    for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++)
     
    50465381          return;
    50475382        }
     5383#if LGE_DVMCP_MEM_REDUCTION_B0135
     5384        else if(iLCUAddrDiff == 0) //MCP, within same LCU
     5385#else
    50485386        else // MCP
     5387#endif
    50495388        {
    50505389          cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx);
     
    50655404  pcTmpCU = getPUAboveRight(uiIdx, uiPartIdxRT, true, true, true);
    50665405#endif
     5406#if LGE_IVMP_PARALLEL_MERGE_B0136
     5407  if (pcTmpCU && bParMerge)
     5408  {
     5409    if (!pcTmpCU->isDiffMER(xP+nPSW, yP-1, xP, yP))
     5410    {
     5411      pcTmpCU = NULL;
     5412    }
     5413  }
     5414#endif
     5415
    50675416  if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) )
    50685417  {
     5418#if LGE_DVMCP_MEM_REDUCTION_B0135
     5419    iLCUAddrDiff = getAddr() - pcTmpCU->getAddr();
     5420#endif
    50695421    bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx );
    50705422    for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++)
     
    50835435          return;
    50845436        }
     5437#if LGE_DVMCP_MEM_REDUCTION_B0135
     5438        else if(iLCUAddrDiff == 0)
     5439#else
    50855440        else  // MCP
     5441#endif
    50865442        {
    50875443          cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx);
     
    51015457#else
    51025458  pcTmpCU = getPUBelowLeft(uiIdx, uiPartIdxLB);
     5459#endif
     5460#if LGE_IVMP_PARALLEL_MERGE_B0136
     5461  if (pcTmpCU && bParMerge)
     5462  {
     5463    if (!pcTmpCU->isDiffMER(xP-1, yP+nPSH, xP, yP))
     5464    {
     5465      pcTmpCU = NULL;
     5466    }
     5467  }
    51035468#endif
    51045469  if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ))
     
    51415506  pcTmpCU = getPUAboveLeft(uiIdx, uiPartIdxLT, true, true, true);
    51425507#endif
     5508#if LGE_IVMP_PARALLEL_MERGE_B0136
     5509  if (pcTmpCU && bParMerge)
     5510  {
     5511    if (!pcTmpCU->isDiffMER(xP-1, yP-1, xP, yP))
     5512    {
     5513      pcTmpCU = NULL;
     5514    }
     5515  }
     5516#endif
     5517
    51435518  if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ))
    51445519  {
     5520#if LGE_DVMCP_MEM_REDUCTION_B0135
     5521    iLCUAddrDiff = getAddr() - pcTmpCU->getAddr();
     5522#endif
    51455523    bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx );
    51465524    for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++)
     
    51595537          return;
    51605538        }
     5539#if LGE_DVMCP_MEM_REDUCTION_B0135
     5540        else if(iLCUAddrDiff <= 1)
     5541#else
    51615542        else // MCP
     5543#endif
    51625544        {
    51635545          cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx);
     
    51765558  if ( getSlice()->getPPS()->getEnableTMVPFlag() )
    51775559  {
     5560#if !QC_SIMPLE_NBDV_B0047
    51785561    UInt uiPUIdx = uiPartIdx;
    51795562    UInt uiAbsPartAddr = uiPartAddr;
     
    53335716      }
    53345717    }
     5718#else
     5719    TComMv cColMv;
     5720    Int iTargetViewIdx = 0;
     5721    Int iTStartViewIdx = 0;
     5722    UInt uiPartIdxRB, uiBRIdx;
     5723    Int uiViewIdxCurr= getSlice()->getViewId();
     5724    UInt uiPartIdxCenter;
     5725    xDeriveCenterIdx( eCUMode, uiPartIdx, uiPartIdxCenter );
     5726
     5727    Int uiLCUIdx = getAddr();
     5728    Int uiLCUnew = uiLCUIdx;
     5729    eCUMode = getPartitionSize( 0 );
     5730    deriveRightBottomIdx( eCUMode, uiPartIdx, uiPartIdxRB ); 
     5731    uiBRIdx = uiPartIdxLT;
     5732    UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB];
     5733    if ( (( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() ) < m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) &&(( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) < m_pcSlice->getSPS()->getPicHeightInLumaSamples() ))  // image boundary check
     5734    {
     5735      if ( ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) &&           // is not at the last column of LCU
     5736      ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) ) // is not at the last row    of LCU
     5737      {
     5738        uiBRIdx = g_auiRasterToZscan[ uiAbsPartIdxTmp + uiNumPartInCUWidth + 1 ];
     5739      }
     5740      else if ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 )           // is not at the last column of LCU But is last row of LCU
     5741      {
     5742        uiBRIdx = g_auiRasterToZscan[ (uiAbsPartIdxTmp + uiNumPartInCUWidth + 1) % m_pcPic->getNumPartInCU() ];
     5743        uiLCUnew = uiLCUIdx + m_pcPic->getFrameWidthInCU();
     5744      }
     5745      else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU
     5746      {
     5747        uiBRIdx = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ];
     5748        uiLCUnew = uiLCUIdx + 1;
     5749      }
     5750      else //is the right bottom corner of LCU                       
     5751      {
     5752        uiBRIdx = 0;
     5753        uiLCUnew = uiLCUIdx + m_pcPic->getFrameWidthInCU() + 1;
     5754      }
     5755    }
     5756    const Int iNumofCandPic = 2;
     5757    for(Int i =0; i < iNumofCandPic; i++)
     5758    {
     5759      Int lpRef=0;
     5760      if(i == 0)
     5761      {   //check the col-located picture
     5762        eRefPicList = RefPicList(getSlice()->isInterB() ? getSlice()->getColDir() : 0);
     5763#if COLLOCATED_REF_IDX
     5764        lpRef = getSlice()->getColRefIdx();
     5765#else
     5766        Int lpRef = 0;
     5767#endif
     5768      }
     5769      else
     5770      {
     5771        if(!(getPic()->getRapbCheck()))
     5772          break;
     5773        eRefPicList=getPic()->getRapRefList();
     5774        lpRef=getPic()->getRapRefIdx();
     5775      }
     5776
     5777      if( m_pcSlice->getViewId() == getSlice()->getRefPic( eRefPicList, lpRef)->getViewId() )
     5778      {
     5779        if (uiViewIdxCurr > 1) 
     5780        {
     5781          if( (uiLCUnew >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUnew, uiBRIdx, cColMv, iTargetViewIdx, iTStartViewIdx)) )
     5782          {
     5783            clipMv(cColMv);
     5784            pDInfo->m_acMvCand[pDInfo->iN] = cColMv;
     5785            pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx;
     5786            return ;
     5787          }
     5788        }
     5789
     5790        if(xGetColDisMV( eRefPicList, lpRef, uiLCUIdx, uiPartIdxCenter,  cColMv, iTargetViewIdx, iTStartViewIdx ))
     5791        {
     5792          clipMv(cColMv);
     5793          pDInfo->m_acMvCand[pDInfo->iN] = cColMv;
     5794          pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx;
     5795          return ;
     5796        }
     5797        if(uiViewIdxCurr == 1) 
     5798        {
     5799          if( (uiLCUnew >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUnew, uiBRIdx, cColMv, iTargetViewIdx, iTStartViewIdx)) )
     5800          {
     5801            clipMv(cColMv);
     5802            pDInfo->m_acMvCand[pDInfo->iN] = cColMv;
     5803            pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx;
     5804            return ;
     5805          }
     5806        }
     5807      }
     5808    }
     5809#endif
    53355810  } // if TMVP Flag
    53365811
    53375812  if( bDvMcpIsFound ) // skip dvmcp
    53385813  {
     5814#if QC_SIMPLE_NBDV_B0047
     5815    for( Int i=1 ; i<iNumofDvMCP-1 ; i++ ) // 5 spatial
     5816#else
    53395817    for( Int i=1 ; i<7 ; i++ ) // 5 spatial + 1 temporal
     5818#endif
    53405819    {
    53415820      for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++)
     
    53535832    }
    53545833  }
    5355 
    53565834  return;
    5357 
    5358 }
    5359 #endif
    5360 
     5835}
     5836#endif
    53615837#endif
    53625838
     
    53685844 * \param pInfo
    53695845 */
     5846#if SHARP_INTERVIEW_DECOUPLE_B0111
     5847Void TComDataCU::fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo, Int iMVPIdx)
     5848{
     5849  if (!m_pcSlice->getSPS()->getViewId() || !m_pcSlice->getSPS()->getMultiviewMvPredMode())
     5850  {
     5851    // HEVC
     5852    fillMvpCandBase(uiPartIdx, uiPartAddr, eRefPicList, iRefIdx, pInfo);
     5853  }
     5854  else
     5855  {
     5856    if (iMVPIdx!=0)
     5857    {
     5858      // HEVC part
     5859      fillMvpCandBase(uiPartIdx, uiPartAddr, eRefPicList, iRefIdx, pInfo);
     5860      if (iRefIdx < 0)
     5861      {
     5862        return;
     5863      }
     5864      for (Int j = AMVP_MAX_NUM_CANDS - 1; j >= 0; j--)
     5865      {
     5866        pInfo->m_acMvCand[j+1] = pInfo->m_acMvCand[j];
     5867      }
     5868      pInfo->iN++;
     5869    }
     5870    if (iMVPIdx<=0)
     5871    {
     5872      // extention part
     5873      DisInfo cDisInfo;
     5874      cDisInfo.iN = 0;
     5875#if LGE_DVMCP
     5876#if QC_SIMPLE_NBDV_B0047
     5877#if FIX_LGE_IVMP_PARALLEL_MERGE_B0136
     5878      getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false);
     5879#else
     5880      getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo);
     5881#endif
     5882#else
     5883      getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false, eRefPicList, iRefIdx );
     5884#endif
     5885#else
     5886      getDisMvpCand (uiPartIdx, uiPartAddr, &cDisInfo );
     5887#endif
     5888      if(cDisInfo.iN==0)
     5889      {
     5890        cDisInfo.iN = 1;
     5891        cDisInfo.m_acMvCand[0].setHor(0);
     5892        cDisInfo.m_acMvCand[0].setVer(0);
     5893        cDisInfo.m_aVIdxCan[0] = 0;
     5894      }
     5895      TComMv  cPdmMvPred;
     5896#if QC_MULTI_DIS_CAN
     5897      if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) )
     5898#else
     5899      if( getPdmMvPred( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred ) )
     5900#endif
     5901      {
     5902        clipMv( cPdmMvPred );
     5903        pInfo->m_acMvCand[0] = cPdmMvPred;
     5904      }
     5905      else
     5906      {
     5907        pInfo->m_acMvCand[0].set(0,0);
     5908      }
     5909    }
     5910  }
     5911}
     5912
     5913
     5914Void TComDataCU::fillMvpCandBase( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo )
     5915#else
    53705916Void TComDataCU::fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo )
     5917#endif
    53715918{
    53725919  PartSize eCUMode = getPartitionSize( 0 );
     
    53815928  }
    53825929 
    5383 #if QC_MULTI_DIS_CAN
     5930#if QC_MULTI_DIS_CAN && !SHARP_INTERVIEW_DECOUPLE_B0111
    53845931  DisInfo cDisInfo;
    53855932  cDisInfo.iN = 0;
     
    53875934  {
    53885935#if LGE_DVMCP
     5936#if QC_SIMPLE_NBDV_B0047
     5937#if FIX_LGE_IVMP_PARALLEL_MERGE_B0136
     5938    getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false);
     5939#else
     5940    getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo);
     5941#endif
     5942#else
    53895943    getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false, eRefPicList, iRefIdx );
     5944#endif
    53905945#else
    53915946    getDisMvpCand (uiPartIdx, uiPartAddr, &cDisInfo );
     
    54005955  }
    54015956#endif
    5402 #if HHI_INTER_VIEW_MOTION_PRED
     5957#if HHI_INTER_VIEW_MOTION_PRED && !SHARP_INTERVIEW_DECOUPLE_B0111
    54035958#if ( PDM_AMVP_POS == 0 )
    54045959  // get inter-view mv predictor (at position 0)
     
    54596014  }
    54606015
    5461 #if HHI_INTER_VIEW_MOTION_PRED
     6016#if HHI_INTER_VIEW_MOTION_PRED && !SHARP_INTERVIEW_DECOUPLE_B0111
    54626017#if ( PDM_AMVP_POS == 1 )
    54636018  // get inter-view mv predictor (at position 1)
     
    55116066  }
    55126067
    5513 #if HHI_INTER_VIEW_MOTION_PRED
     6068#if HHI_INTER_VIEW_MOTION_PRED && !SHARP_INTERVIEW_DECOUPLE_B0111
    55146069#if ( PDM_AMVP_POS == 2 )
    55156070  // get inter-view mv predictor (at position 2)
     
    55356090    }
    55366091  }
    5537 #if  QC_MULTI_DIS_CAN
     6092#if QC_MULTI_DIS_CAN && !SHARP_INTERVIEW_DECOUPLE_B0111
    55386093  if ( getSlice()->getViewId()!=0 && pInfo->iN == 3 )
    55396094  {
     
    56096164    if ( uiLCUIdx >= 0 && xGetColMVP( eRefPicList, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx_Col ) )
    56106165    {
     6166#if FIX_LGE_DVMCP_B0133
     6167      cColMv.m_bDvMcp = false;
     6168#endif
    56116169      pInfo->m_acMvCand[pInfo->iN++] = cColMv;
    56126170    }
     
    56186176      if (xGetColMVP( eRefPicList, uiCurLCUIdx, uiPartIdxCenter,  cColMv, iRefIdx_Col ))
    56196177      {
     6178#if FIX_LGE_DVMCP_B0133
     6179        cColMv.m_bDvMcp = false;
     6180#endif
    56206181        pInfo->m_acMvCand[pInfo->iN++] = cColMv;
    56216182      }
     
    56246185  }
    56256186
    5626 #if HHI_INTER_VIEW_MOTION_PRED
     6187#if HHI_INTER_VIEW_MOTION_PRED && !SHARP_INTERVIEW_DECOUPLE_B0111
    56276188#if ( PDM_AMVP_POS == 3 )
    56286189  // get inter-view mv predictor (at position 3)
     
    56456206#endif
    56466207
    5647 #if HHI_INTER_VIEW_MOTION_PRED
     6208#if HHI_INTER_VIEW_MOTION_PRED && !SHARP_INTERVIEW_DECOUPLE_B0111
    56486209  const Int iNumAMVPCands = AMVP_MAX_NUM_CANDS + ( getSlice()->getSPS()->getMultiviewMvPredMode() ? 1 : 0 );
    56496210  if (pInfo->iN > iNumAMVPCands)
     
    60676628Bool TComDataCU::xGetColDisMV( RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv , Int & iTargetViewIdx, Int & iStartViewIdx )
    60686629{
    6069 #if LGE_DVMCP
     6630#if LGE_DVMCP && !QC_SIMPLE_NBDV_B0047
    60706631  Int  iDvMcpDispX[2] = {-1,};
    60716632  Bool bDvMcpFlag [2] = { false, };
     
    60866647    return false;
    60876648  }
    6088 #if LGE_DVMCP
     6649#if LGE_DVMCP && !QC_SIMPLE_NBDV_B0047
    60896650  Bool bColIsSkipped = pColCU->isSkipped( uiAbsPartAddr );
    60906651#endif
     
    61106671    if ( iColViewIdx    == iColRefViewIdx ) // temporal vector
    61116672    {
    6112 #if LGE_DVMCP
     6673#if LGE_DVMCP && !QC_SIMPLE_NBDV_B0047
    61136674      if( iColViewIdx >0 )
    61146675      {
     
    61376698  }
    61386699
    6139 #if LGE_DVMCP
     6700#if LGE_DVMCP && !QC_SIMPLE_NBDV_B0047
    61406701  for( Int ilist=0 ; ilist<2 ; ilist++ )
    61416702  {
     
    72287789#else
    72297790Int
    7230 TComDataCU::getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo )
     7791TComDataCU::getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo
     7792#if QC_MRG_CANS_B0048
     7793  , Int* iPdm
     7794#endif
     7795)
    72317796{
    72327797  TComDepthMapGenerator* pcDepthMapGenerator = m_pcSlice->getSPS()->getDepthMapGenerator();
    72337798  ROFRS( pcDepthMapGenerator, 0 );
    7234   return pcDepthMapGenerator->getPdmMergeCandidate( this, uiPartIdx, paiPdmRefIdx, pacPdmMv, pDInfo );
     7799  return pcDepthMapGenerator->getPdmMergeCandidate( this, uiPartIdx, paiPdmRefIdx, pacPdmMv, pDInfo
     7800#if QC_MRG_CANS_B0048
     7801    , iPdm
     7802#endif
     7803    );
    72357804}
    72367805Bool
     
    72717840  m_pePartSize[0] =  SIZE_2Nx2N;
    72727841#if LGE_DVMCP
     7842#if QC_SIMPLE_NBDV_B0047
     7843#if FIX_LGE_IVMP_PARALLEL_MERGE_B0136
     7844  getDisMvpCand2( 0, 0,  &cDisInfo, false);
     7845#else
     7846  getDisMvpCand2( 0, 0,  &cDisInfo);
     7847#endif
     7848#else
    72737849  getDisMvpCand2( 0, 0,  &cDisInfo, true );
     7850#endif
    72747851#else
    72757852  getDisMvpCand        ( 0, 0,  &cDisInfo );
  • branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComDataCU.h

    r181 r185  
    239239  Bool          m_bDecSubCu;          ///< indicates decoder-mode
    240240  Double        m_dTotalCost;         ///< sum of partition RD costs
     241#if FIX_RDO_NEGDIST
     242  Dist          m_uiTotalDistortion;  ///< sum of partition distortion
     243#else
    241244  UInt          m_uiTotalDistortion;  ///< sum of partition distortion
     245#endif
    242246  UInt          m_uiTotalBits;        ///< sum of partition bits
    243247  UInt          m_uiTotalBins;       ///< sum of partition bins
     
    543547#else
    544548  Bool          getPdmMvPredDisCan( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge = false );
    545   Int           getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo );
     549  Int           getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo
     550#if QC_MRG_CANS_B0048
     551    , Int* iPdm
     552#endif
     553  );
    546554  Void          getDisMvpCand        ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo );
    547555#if LGE_DVMCP
    548   Void          getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo, Bool bMerge=false, RefPicList eRefPicList=REF_PIC_LIST_X, Int iRefIdx=-1 );
     556#if QC_SIMPLE_NBDV_B0047
     557  Void          getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo
     558#if LGE_IVMP_PARALLEL_MERGE_B0136
     559    , Bool bParMerg = false
     560#endif
     561    );
     562#else
     563  Void          getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo, Bool bMerge=false, RefPicList eRefPicList=REF_PIC_LIST_X, Int iRefIdx=-1
     564#if LGE_IVMP_PARALLEL_MERGE_B0136
     565    , Bool bParMerg = false
     566#endif
     567    );
     568#endif
    549569#endif
    550570
     
    594614 
    595615  AMVP_MODE     getAMVPMode           ( UInt uiIdx );
     616#if SHARP_INTERVIEW_DECOUPLE_B0111
     617  Void          fillMvpCandBase       ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo );
     618  Void          fillMvpCand           ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo , Int iMVPIdx=-1);
     619#else
    596620  Void          fillMvpCand           ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo );
     621#endif
    597622#if PARALLEL_MERGE
    598623  Bool          isDiffMER             ( Int xN, Int yN, Int xP, Int yP);
     
    717742 
    718743  Double&       getTotalCost()                  { return m_dTotalCost;        }
     744#if FIX_RDO_NEGDIST
     745  Dist&         getTotalDistortion()            { return m_uiTotalDistortion; }
     746#else
    719747  UInt&         getTotalDistortion()            { return m_uiTotalDistortion; }
     748#endif
    720749  UInt&         getTotalBits()                  { return m_uiTotalBits;       }
    721750  UInt&         getTotalNumPart()               { return m_uiNumPartition;    }
  • branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComDepthMapGenerator.cpp

    r100 r185  
    607607#if QC_MULTI_DIS_CAN
    608608Int
    609 TComDepthMapGenerator::getPdmMergeCandidate( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo )
     609TComDepthMapGenerator::getPdmMergeCandidate( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo
     610#if QC_MRG_CANS_B0048
     611  , Int* iPdm
     612#endif
     613)
    610614#else
    611615Int
     
    626630  ROTRS( !bPdmMerge, 0 );
    627631
     632#if QC_MRG_CANS_B0048
     633  Bool abPdmAvailable[4] = {false, false, false, false};
     634#else
    628635  Bool abPdmAvailable[2] = {false,false};
     636#endif
    629637
    630638  Int iValid = 0;
     
    725733  }
    726734  Int iPdmInterDir = ( abPdmAvailable[0] ? 1 : 0 ) + ( abPdmAvailable[1] ? 2 : 0 );
    727 
     735#if QC_MRG_CANS_B0048
     736  iPdm[0] = iPdmInterDir;
     737#else
    728738  if (iPdmInterDir == 0)
    729739  {
     740#endif
    730741    for( Int iRefListId = 0; iRefListId < 2 ; iRefListId++ )
    731742    {
     
    736747        if( pcSlice->getRefPOC( eRefPicList, iPdmRefIdx ) == pcSlice->getPOC())
    737748        {
     749#if QC_MRG_CANS_B0048
     750          abPdmAvailable[ iRefListId+2 ] = true;
     751          paiPdmRefIdx  [ iRefListId+2 ] = iPdmRefIdx;
     752#else
    738753          abPdmAvailable[ iRefListId ] = true;
    739754          paiPdmRefIdx  [ iRefListId ] = iPdmRefIdx;
     755#endif
    740756#if QC_MULTI_DIS_CAN
    741757          TComMv cMv = pDInfo->m_acMvCand[0];
     
    745761#endif
    746762          pcCU->clipMv( cMv );
     763#if QC_MRG_CANS_B0048
     764          pacPdmMv      [ iRefListId + 2] = cMv;
     765#else
    747766          pacPdmMv      [ iRefListId ] = cMv;
     767#endif
    748768          break;
    749769        }
    750770      }
    751771    }
     772#if QC_MRG_CANS_B0048
     773    iPdmInterDir = ( abPdmAvailable[2] ? 1 : 0 ) + ( abPdmAvailable[3] ? 2 : 0 ) ;
     774    iPdm[1] = iPdmInterDir;
     775#else
    752776    iPdmInterDir = ( abPdmAvailable[0] ? 1 : 0 ) + ( abPdmAvailable[1] ? 2 : 0 ) ;
    753777  }
     778#endif
    754779
    755780  return iPdmInterDir;
  • branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComDepthMapGenerator.h

    r100 r185  
    152152#if HHI_INTER_VIEW_MOTION_PRED
    153153#if QC_MULTI_DIS_CAN
    154   Int   getPdmMergeCandidate ( TComDataCU*   pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo );
     154  Int   getPdmMergeCandidate ( TComDataCU*   pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo
     155#if QC_MRG_CANS_B0048
     156    , Int* iPdm
     157#endif
     158    );
     159
    155160  Bool  getPdmMvPredDisCan    ( TComDataCU*   pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge );
    156161  Bool  getDisCanPdmMvPred    ( TComDataCU*   pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge );
  • branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComMotionInfo.h

    r161 r185  
    9494  Int getHor   () const { return  m_acMv.getHor(); }
    9595  Int getVer   () const { return  m_acMv.getVer(); }
     96#if QC_MRG_CANS_B0048
     97  Bool operator== ( const TComMvField& rcMv ) const
     98  {
     99    return (m_acMv.getHor()==rcMv.getHor() && m_acMv.getVer()==rcMv.getVer() && m_iRefIdx == rcMv.getRefIdx());
     100  }
     101#endif
    96102};
    97103
  • branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComPic.cpp

    r181 r185  
    8484  m_bReduceBitsQTL    = 0;
    8585#endif
     86#if QC_SIMPLE_NBDV_B0047
     87  m_bRapCheck = false;
     88  m_eRapRefList = REF_PIC_LIST_0;
     89  m_uiRapRefIdx = 0;
     90#endif
     91
    8692}
    8793
     
    483489  }
    484490}
     491#if QC_SIMPLE_NBDV_B0047
     492Bool TComPic::getDisCandRefPictures(Int iColPOC)
     493{
     494  UInt uiTempLayerCurr=7;
     495  TComSlice* currSlice = getCurrSlice();
     496  UInt iPOCCurr=currSlice->getPOC();
     497  UInt iPOCDiff = 255;
     498  Bool  bRAP=false;
     499  Bool bCheck = false;
     500  Int MaxRef = currSlice->getNumRefIdx(RefPicList(0));
     501  RefPicList eRefPicList = REF_PIC_LIST_0 ;
     502  if(currSlice->isInterB())
     503  {
     504    if(currSlice->getNumRefIdx(RefPicList(0))< currSlice->getNumRefIdx(RefPicList(1)))
     505      MaxRef = currSlice->getNumRefIdx(RefPicList(1));
     506  }
     507  for(Int lpRef = 0; lpRef < MaxRef; lpRef++)
     508  {
     509    for(Int lpNr = 0; lpNr < (currSlice->isInterB() ? 2: 1); lpNr ++)
     510    {
     511      eRefPicList = RefPicList(0);
     512      if(currSlice->isInterB())
     513        eRefPicList = RefPicList(lpNr==0 ? (currSlice->getColDir()): (1-currSlice->getColDir()));
     514      if(iColPOC == currSlice->getRefPOC(eRefPicList, lpRef))
     515        continue;
     516      if(lpRef >= currSlice->getNumRefIdx(eRefPicList)||(currSlice->getViewId() != currSlice->getRefPic( eRefPicList, lpRef)->getViewId()))
     517        continue;
     518      Int iTempPoc = currSlice->getRefPic(eRefPicList, lpRef)->getPOC();
     519      UInt uiTempLayer = currSlice->getRefPic(eRefPicList, lpRef)->getCurrSlice()->getTLayer();
     520      Int iTempDiff = (iTempPoc > iPOCCurr) ? (iTempPoc - iPOCCurr): (iPOCCurr - iTempPoc);
     521      bRAP = (currSlice->getRefPic(eRefPicList, lpRef)->getCurrSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV? 1:0);
     522      if( bRAP)
     523      {
     524         bCheck = true;
     525         this->setRapRefIdx(lpRef);
     526         this->setRapRefList(eRefPicList);
     527         return bCheck;
     528      }
     529      if(uiTempLayerCurr > uiTempLayer)
     530      {
     531        bCheck = true;
     532        if(uiTempLayerCurr == uiTempLayer)
     533        {
     534          if(iPOCDiff > iTempDiff)
     535          {
     536            iPOCDiff=iTempDiff;
     537            if(iPOCDiff < 255)
     538            {
     539              this->setRapRefIdx(lpRef);
     540              this->setRapRefList(eRefPicList);
     541            }
     542          }
     543        }
     544        else
     545        {
     546          iPOCDiff=iTempDiff;
     547          uiTempLayerCurr = uiTempLayer;
     548          this->setRapRefIdx(lpRef);
     549          this->setRapRefList(eRefPicList);
     550        }
     551      }
     552    }
     553  }
     554  return bCheck;
     555}
     556#endif
    485557
    486558#if HHI_INTERVIEW_SKIP
  • branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComPic.h

    r181 r185  
    8282  Bool          m_checked;
    8383#endif
     84#if QC_SIMPLE_NBDV_B0047
     85  UInt        m_uiRapRefIdx;
     86  RefPicList  m_eRapRefList;
     87  Bool        m_bRapCheck;
     88#endif
    8489#endif
    8590#if HHI_INTER_VIEW_RESIDUAL_PRED
     
    172177#if HHI_INTER_VIEW_RESIDUAL_PRED
    173178  TComPicYuv*   getResidual()         { return  m_pcResidual; }
     179#endif
     180#if QC_SIMPLE_NBDV_B0047
     181  UInt          getRapRefIdx()                         {return m_uiRapRefIdx;}
     182  RefPicList    getRapRefList()                        {return m_eRapRefList;}
     183  Void          setRapRefIdx(UInt uiRapRefIdx)         {m_uiRapRefIdx = uiRapRefIdx;}
     184  Void          setRapRefList(RefPicList eRefPicList)  {m_eRapRefList = eRefPicList;}
     185  Bool          getRapbCheck()                         {return m_bRapCheck;}
     186  Void          setRapbCheck(Bool bCheck)              {m_bRapCheck = bCheck;}
     187  Bool          getDisCandRefPictures(Int iColPOC);
    174188#endif
    175189
  • branches/HTM-4.1-dev0/source/Lib/TLibCommon/TypeDef.h

    r183 r185  
    4646#define MTK_UNCONSTRAINED_MVI             1    //JCT3V-B0083
    4747
     48// A
    4849#define FIXES                             1
    4950#define POZNAN_CABAC_INIT_FLAG_FIX        1
     
    6061
    6162
     63// B
     64#define FIX_LGE_IVMP_PARALLEL_MERGE_B0136 1
     65#define TMVP_DEPTH_SWITCH                 1 // related to JCT3V-B0092
     66#define FIX_RDO_NEGDIST                   1
     67#define FIX_DMM_NEG_DIST                  1
     68
     69#define DV_DERIVATION_PARALLEL_B0096      1 //JCT3V-B0096, enable parallel derivation of disparity vector
     70
    6271#define LGE_EDGE_INTRA                    1   // JCT2-A0070
    6372#if LGE_EDGE_INTRA
     
    8089    #define DIS_CANS                      1
    8190#endif                                 
    82                                        
     91#define QC_SIMPLE_NBDV_B0047              1   //JCT2-B0047
     92#define QC_MRG_CANS_B0048                 1   //JCT2-B0048, B0086, B0069
     93#if     QC_MRG_CANS_B0048
     94#define OL_DISMV_POS_B0069                1   //different pos for dispairty MV candidate, B0069
     95#endif
    8396#define MTK_INTERVIEW_MERGE_A0049         1   //  JCT2-A0049 second part
     97#define SHARP_INTERVIEW_DECOUPLE_B0111    1   //  JCT3V-B0111 decoupling inter-view candidate
    8498                                       
    8599#define LGE_DVMCP                         1   //  JCT2-A0126     
     
    92106#define DVFROM_COL                        6
    93107#endif
     108#define FIX_LGE_DVMCP_B0133               1
     109#define LGE_DVMCP_MEM_REDUCTION_B0135     1
    94110
    95111
     
    134150
    135151#define HHI_MPI                           1   // motion parameter inheritance from texture picture for depth map coding
     152#if HHI_MPI
     153#define FIX_MPI_B0065                     1   //JCT3V-B0065, fix the MPI bug when RQT is off
     154#endif
    136155#define HHI_MPI_MERGE_POS                 0
    137156#define HHI_FULL_PEL_DEPTH_MAP_MV_ACC     1   // full-pel mv accuracy for depth maps
     
    162181
    163182#define PARALLEL_MERGE  1                   //< H0082 parallel merge/skip
     183#define LGE_IVMP_PARALLEL_MERGE_B0136     1 //< B0136 support of parallel merge/skip in disparity vector derivation
    164184#define LOG2_PARALLEL_MERGE_LEVEL_MINUS2  0 //< H0082 parallel merge level 0-> 4x4, 1-> 8x8, 2->16x16, 3->32x32, 4->64x64
    165185#if PARALLEL_MERGE && LOG2_PARALLEL_MERGE_LEVEL_MINUS2
    166186#define CU_BASED_MRG_CAND_LIST            1  //< H0240: single merge candidate list for all PUs inside a 8x8 CU conditioned on LOG2_PARALLEL_MERGE_LEVEL_MINUS2 > 0
     187#define FIX_CU_BASED_MRG_CAND_LIST_B0136  1  //< B0136 bug fix for CU_BASED_MRG_CAND_LIST
    167188#endif
    168189#define MVP_AT_ENTROPYSLICE_BOUNDARY      1  //< H0362 enable motion prediction accross entropy slice boundary
  • branches/HTM-4.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp

    r183 r185  
    637637{
    638638#if HHI_MPI
     639#if FIX_MPI_B0065
     640  if( pcCU->getTextureModeDepth( 0 ) != -1 )
     641  {
     642    TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() );
     643    if( uiDepth == pcTextureCU->getDepth(uiAbsPartIdx))
     644    {
     645      PartSize partSize = pcTextureCU->getPartitionSize(uiAbsPartIdx);
     646      pcCU->setPartSizeSubParts( partSize, 0, uiDepth );
     647    }
     648    else
     649    {
     650      pcCU->setPartSizeSubParts( SIZE_NxN, 0, uiDepth );
     651    }
     652  }
     653#else
    639654  if( pcCU->getTextureModeDepth( 0 ) != -1 )
    640655    pcCU->setPartSizeSubParts( SIZE_NxN, 0, uiDepth );
     656#endif
    641657#endif
    642658 
  • branches/HTM-4.1-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp

    r177 r185  
    492492#endif
    493493  }
     494#if SHARP_INTERVIEW_DECOUPLE_B0111
     495  pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo, iMVPIdx);
     496#else
    494497  pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo);
     498#endif
    495499  pcSubCU->setMVPNumSubParts(pAMVPInfo->iN, eRefList, uiPartAddr, uiPartIdx, uiDepth);
    496500  pcSubCU->setMVPIdxSubParts( iMVPIdx, eRefList, uiPartAddr, uiPartIdx, uiDepth );
     
    10091013#endif // !UNIFIED_TRANSFORM_TREE
    10101014  }
     1015
     1016#if FIX_MPI_B0065
     1017  if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER && pcCU->getMergeFlag( uiAbsPartIdx ) && pcCU->getMergeIndex( uiAbsPartIdx ) == 0 && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N &&  pcCU->getTextureModeDepth( uiAbsPartIdx ) != -1  )
     1018  {
     1019    TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() );
     1020    if( uiDepth == pcTextureCU->getDepth(uiAbsPartIdx))
     1021    {
     1022      PartSize partSize = pcTextureCU->getPartitionSize(uiAbsPartIdx);
     1023      pcCU->setPartSizeSubParts( partSize, uiAbsPartIdx, uiDepth );
     1024    }
     1025    else
     1026    {
     1027      pcCU->setPartSizeSubParts( SIZE_NxN, uiAbsPartIdx, uiDepth );
     1028    }
     1029  }
     1030#endif
     1031
    10111032#if UNIFIED_TRANSFORM_TREE
    10121033  xDecodeTransform( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, 0, temp, temp1, temp2, bCodeDQP );
     
    10141035  xDecodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, uiLumaTrMode, bCodeDQP );
    10151036#endif // UNIFIED_TRANSFORM_TREE
     1037
     1038#if FIX_MPI_B0065
     1039  if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER && pcCU->getMergeFlag( uiAbsPartIdx ) && pcCU->getMergeIndex( uiAbsPartIdx ) == 0 && pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N &&  pcCU->getTextureModeDepth( uiAbsPartIdx ) != -1 )
     1040  {
     1041    pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 
     1042  }
     1043#endif
    10161044}
    10171045
  • branches/HTM-4.1-dev0/source/Lib/TLibDecoder/TDecGop.cpp

    r100 r185  
    312312#endif
    313313
     314#if QC_SIMPLE_NBDV_B0047
     315    if(pcSlice->getViewId() && pcSlice->getSPS()->getMultiviewMvPredMode())
     316    {
     317      Int iColPoc = pcSlice->getRefPOC(RefPicList(pcSlice->getColDir()), pcSlice->getColRefIdx());
     318      rpcPic->setRapbCheck(rpcPic->getDisCandRefPictures(iColPoc));
     319    }
     320#endif
    314321
    315322    m_pcSbacDecoders[0].load(m_pcSbacDecoder);
  • branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp

    r181 r185  
    27802780    rpcTempCU->setTextureModeDepthSubParts( uhTextureModeDepth, 0, uhDepth );
    27812781    rpcTempCU->copyTextureMotionDataFrom( pcTextureCU, uhDepth, rpcTempCU->getZorderIdxInCU() );
     2782#if FIX_MPI_B0065
     2783    UInt uiAbsPartIdx = rpcTempCU->getZorderIdxInCU();
     2784    if( rpcTempCU->getDepth(0) > pcTextureCU->getDepth(uiAbsPartIdx))
     2785    {
     2786      rpcTempCU->setPartSizeSubParts( SIZE_NxN, 0, uhDepth );
     2787    }
     2788    else
     2789    {
     2790      PartSize partSize = pcTextureCU->getPartitionSize(uiAbsPartIdx);
     2791      rpcTempCU->setPartSizeSubParts( partSize, 0, uhDepth );
     2792    }
     2793#else
    27822794    rpcTempCU->setPartSizeSubParts( SIZE_NxN, 0, uhDepth );
     2795#endif
    27832796    for( UInt ui = 0; ui < rpcTempCU->getTotalNumPart(); ui++ )
    27842797    {
  • branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp

    r177 r185  
    17401740  }
    17411741 
     1742#if FIX_MPI_B0065
     1743  if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER && pcCU->getMergeFlag( uiAbsPartIdx ) && pcCU->getMergeIndex( uiAbsPartIdx ) == 0 && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N && pcCU->getTextureModeDepth( uiAbsPartIdx ) != -1 )
     1744  {
     1745    TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() );
     1746    if( uiDepth == pcTextureCU->getDepth(uiAbsPartIdx))
     1747    {
     1748      PartSize partSize = pcTextureCU->getPartitionSize(uiAbsPartIdx);
     1749      pcCU->setPartSizeSubParts( partSize, uiAbsPartIdx, uiDepth );
     1750    }
     1751    else
     1752    {
     1753      pcCU->setPartSizeSubParts( SIZE_NxN, uiAbsPartIdx, uiDepth );
     1754    }
     1755  }
     1756#endif
     1757
    17421758#if UNIFIED_TRANSFORM_TREE
    17431759  UInt temp = 0;
     
    17481764  xEncodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, uiLumaTrMode, bCodeDQP );
    17491765#endif // UNIFIED_TRANSFORM_TREE
     1766
     1767#if FIX_MPI_B0065
     1768  if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER && pcCU->getMergeFlag( uiAbsPartIdx ) && pcCU->getMergeIndex( uiAbsPartIdx ) == 0 && pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N &&  pcCU->getTextureModeDepth( uiAbsPartIdx ) != -1 )
     1769  {
     1770    pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 
     1771  }
     1772#endif
    17501773}
    17511774
  • branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp

    r181 r185  
    719719#endif
    720720
     721#if QC_SIMPLE_NBDV_B0047
     722      if(pcSlice->getViewId() && pcSlice->getSPS()->getMultiviewMvPredMode())
     723      {
     724        Int iColPoc = pcSlice->getRefPOC(RefPicList(pcSlice->getColDir()), pcSlice->getColRefIdx());
     725        pcPic->setRapbCheck(pcPic->getDisCandRefPictures(iColPoc));
     726      }
     727#endif
    721728      while(uiNextCUAddr<uiRealEndAddress) // determine slice boundaries
    722729      {
  • branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp

    r183 r185  
    20062006  UInt    uiQNumParts    = pcCU->getTotalNumPart() >> 2;
    20072007  UInt    uiWidthBit     = pcCU->getIntraSizeIdx(0);
     2008#if FIX_RDO_NEGDIST
     2009  Dist    uiOverallDistY = 0;
     2010  Dist    uiOverallDistC = 0;
     2011#else
    20082012  UInt    uiOverallDistY = 0;
    20092013  UInt    uiOverallDistC = 0;
     2014#endif
    20102015  UInt    CandNum;
    20112016  Double  CandCostList[ FAST_UDI_MAX_RDMODE_NUM ];
     
    21442149        CandNum += xUpdateCandList( uiMode, cost, numModesForFullRD, uiRdModeList, CandCostList );
    21452150
    2146 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     2151#if (HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX) && !FIX_DMM_NEG_DIST
    21472152        if( bTestDmm ) bTestDmm = uiSad ? true : false;
    21482153#endif
     
    22742279   
    22752280    UInt    uiBestPUMode  = 0;
     2281#if FIX_RDO_NEGDIST
     2282    Dist    uiBestPUDistY = 0;
     2283    Dist    uiBestPUDistC = 0;
     2284#else
    22762285    UInt    uiBestPUDistY = 0;
    22772286    UInt    uiBestPUDistC = 0;
     2287#endif
    22782288    Double  dBestPUCost   = MAX_DOUBLE;
    22792289#if RWTH_SDC_DLT_B0036
     
    29002910 */
    29012911#if CU_BASED_MRG_CAND_LIST
     2912#if LG_RESTRICTEDRESPRED_M24766
     2913Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* rpcResiPredYuv, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, TComMvField* cMvFieldNeighbours, UChar* uhInterDirNeighbours, Int& numValidMergeCand )
     2914#else
    29022915Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, TComMvField* cMvFieldNeighbours, UChar* uhInterDirNeighbours, Int& numValidMergeCand )
     2916#endif
    29032917#else
    29042918#if LG_RESTRICTEDRESPRED_M24766
     
    37973811      UInt uiMRGCost = MAX_UINT;
    37983812#if CU_BASED_MRG_CAND_LIST
     3813#if LG_RESTRICTEDRESPRED_M24766
     3814      xMergeEstimation( pcCU, pcOrgYuv, rpcResiPredYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
     3815#else
    37993816      xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
     3817#endif
    38003818#else
    38013819#if LG_RESTRICTEDRESPRED_M24766
     
    54845502    }
    54855503   
     5504#if FIX_RDO_NEGDIST
     5505    Dist uiDistU = 0;
     5506    Dist uiDistV = 0;
     5507#else
    54865508    UInt uiDistU = 0;
    54875509    UInt uiDistV = 0;
     5510#endif
    54885511    if( bCodeChroma )
    54895512    {
     
    55235546#endif       
    55245547       
     5548#if FIX_RDO_NEGDIST
     5549        const Dist uiNonzeroDistU = m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getCbAddr( absTUPartIdxC), m_pcQTTempTComYuv[uiQTTempAccessLayer].getCStride(),
     5550          pcResi->getCbAddr( absTUPartIdxC), pcResi->getCStride(), trWidthC, trHeightC
     5551
     5552#else
    55255553        const UInt uiNonzeroDistU = m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getCbAddr( absTUPartIdxC), m_pcQTTempTComYuv[uiQTTempAccessLayer].getCStride(),
    55265554          pcResi->getCbAddr( absTUPartIdxC), pcResi->getCStride(), trWidthC, trHeightC
     5555#endif
    55275556#if WEIGHTED_CHROMA_DISTORTION
    55285557          , true
     
    56095638        m_pcTrQuant->invtransformNxN( TEXT_CHROMA,REG_DCT, pcResiCurrV, m_pcQTTempTComYuv[uiQTTempAccessLayer].getCStride(), pcCoeffCurrV, trWidthC, trHeightC, scalingListType );
    56105639#endif
    5611        
     5640#if FIX_RDO_NEGDIST
     5641        const Dist uiNonzeroDistV = m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getCrAddr( absTUPartIdxC ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getCStride(),
     5642          pcResi->getCrAddr( absTUPartIdxC ), pcResi->getCStride(), trWidthC, trHeightC
     5643#else
    56125644        const UInt uiNonzeroDistV = m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getCrAddr( absTUPartIdxC ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getCStride(),
    56135645          pcResi->getCrAddr( absTUPartIdxC ), pcResi->getCStride(), trWidthC, trHeightC
     5646#endif
    56145647#if WEIGHTED_CHROMA_DISTORTION
    56155648                                                   , true
Note: See TracChangeset for help on using the changeset viewer.