Changeset 210 in 3DVCSoftware


Ignore:
Timestamp:
11 Dec 2012, 18:52:43 (12 years ago)
Author:
tech
Message:

Reintegrated /branches/HTM-5.0-dev0 rev. 207.

Location:
trunk
Files:
59 edited

Legend:

Unmodified
Added
Removed
  • trunk/CommonTestConditionsCfgs/baseCfg_2view+depth.cfg

    r189 r210  
    195195InterViewSkip             : 0                                      # interview SKIP mode
    196196InterViewSkipLambdaScale  : 8                                      # lambda scale for inter-view skip mode
     197DisparitySearchRangeRestriction : 0                                # 0: No disparity restriction 1: Use disparity restriction
     198VerticalDisparitySearchRange    : 56                               # vertical disparity search range (in luma samples)
     199FCO                        : 0                                     # Flexible coding order flag in 3DV
     200FCOCodingOrder             : T0D0D1T1                              # Coding order for Flexible coding order in 3DV
    197201
    198202
     
    207211#========== view synthesis optimization (VSO) ==========
    208212VSOConfig                 : [cx0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) I(s0.25 s0.5 s0.75)]  # VSO configuration string
     213#VSOConfig                 : [ox0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) I(s0.25 s0.5 s0.75)]  # VSO configuration string
    209214WVSO                      : 1                                    # use of WVSO (Depth distortion metric with a weighted depth fidelity term)
    210215VSOWeight                 : 10                                   # weight of VSO ( in SAD case, cf. squared in SSE case )
  • trunk/CommonTestConditionsCfgs/baseCfg_2view.cfg

    r189 r210  
    189189InterViewSkip             : 0                                      # interview SKIP mode
    190190InterViewSkipLambdaScale  : 8                                      # lambda scale for inter-view skip mode
    191 
     191DisparitySearchRangeRestriction : 0                                # 0: No disparity restriction 1: Use disparity restriction
     192VerticalDisparitySearchRange    : 56                               # vertical disparity search range (in luma samples)
    192193
    193194#========== depth coding tools ==========
  • trunk/CommonTestConditionsCfgs/baseCfg_3view+depth.cfg

    r189 r210  
    199199InterViewSkip             : 0                                      # interview SKIP mode
    200200InterViewSkipLambdaScale  : 8                                      # lambda scale for inter-view skip mode
     201DisparitySearchRangeRestriction : 0                                # 0: No disparity restriction 1: Use disparity restriction
     202VerticalDisparitySearchRange    : 56                               # vertical disparity search range (in luma samples)
     203FCO                        : 0                                      # Flexible coding order flag in 3DV
     204FCOCodingOrder             : T0D0D1D2T1T2                           # Coding order for Flexible coding order in 3DV
    201205
    202206
     
    211215#========== view synthesis optimization (VSO) ==========
    212216VSOConfig                 : [cx0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) B(oo2) I(s0.25 s0.5 s0.75 s1.25 s1.5 s1.75)][cx2 B(cc1) I(s1.25 s1.5 s1.75)] # VSO configuration string
     217#VSOConfig                 : [ox0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) B(oo2) I(s0.25 s0.5 s0.75 s1.25 s1.5 s1.75)][ox2 B(cc1) I(s1.25 s1.5 s1.75)] # VSO configuration string for FCO = 1
    213218WVSO                       : 1                                     # use of WVSO (Depth distortion metric with a weighted depth fidelity term)
    214219VSOWeight                  : 10                                    # weight of VSO ( in SAD case, cf. squared in SSE case )
  • trunk/CommonTestConditionsCfgs/baseCfg_3view.cfg

    r189 r210  
    191191InterViewSkip             : 0                                      # interview SKIP mode
    192192InterViewSkipLambdaScale  : 8                                      # lambda scale for inter-view skip mode
     193DisparitySearchRangeRestriction : 0                                # 0: No disparity restriction 1: Use disparity restriction
     194VerticalDisparitySearchRange    : 56                               # vertical disparity search range (in luma samples)
    193195
    194196
  • trunk/cfg/encoder_mvd.cfg

    r189 r210  
    198198InterViewSkip             : 0                                      # interview SKIP mode
    199199InterViewSkipLambdaScale  : 8                                      # lambda scale for inter-view skip mode
     200DisparitySearchRangeRestriction : 0                                # 0: No disparity restriction 1: Use disparity restriction
     201VerticalDisparitySearchRange    : 56                               # vertical disparity search range (in luma samples)
     202FCO                        : 0                                     # Flexible coding order flag in 3DV
     203FCOCodingOrder             : T0D0D1T1D2T2                              # Coding order for Flexible coding order in 3DV
    200204
    201205
     
    211215VSOConfig                 : [cx0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) B(oo2) I(s0.25 s0.5 s0.75 s1.25 s1.5 s1.75)][cx2 B(cc1) I(s1.25 s1.5 s1.75)] # VSO configuration string (3 view)
    212216VSOConfig                 : [cx0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0)        I(s0.25 s0.5 s0.75)]                                                   # VSO configuration string (2 view)
     217#VSOConfig                 : [ox0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) B(oo2) I(s0.25 s0.5 s0.75 s1.25 s1.5 s1.75)][ox2 B(cc1) I(s1.25 s1.5 s1.75)] # VSO configuration string
     218#VSOConfig                 : [ox0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) I(s0.25 s0.5 s0.75)]  # VSO configuration string
    213219WVSO                      : 1                                    # use of WVSO (Depth distortion metric with a weighted depth fidelity term)
    214220VSOWeight                 : 10                                   # weight of VSO ( in SAD case, cf. squared in SSE case )
  • trunk/source/App/TAppDecoder/TAppDecTop.cpp

    r189 r210  
    8282Void TAppDecTop::decode()
    8383{
    84 #if VIDYO_VPS_INTEGRATION
     84#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    8585  increaseNumberOfViews( 0, 0, 0 );
    8686#else
     
    8888#endif
    8989 
     90#if FLEX_CODING_ORDER_M23723
     91  Int iDepthViewIdx = 0;
     92  Int iTextureViewIdx=0;
     93  Bool firstFrame=1;
     94  Bool viewIdZero=true;
     95  Int fcoIndex=0;  //when the current frame is not first frame,use FCO_index stand for viewDepth.
     96#endif
     97
    9098#if SONY_COLPIC_AVAILABILITY
    9199  m_tDecTop[0]->setViewOrderIdx(0);
     
    102110    pcListPic[i] = NULL;
    103111    newPicture[i] = false;
     112#if FLEX_CODING_ORDER_M23723
     113#if  FIX_FCO_COMP_WARNING
     114    m_fcoOrder[i] = ' ';
     115#else
     116    m_fcoOrder[i]=NULL;
     117#endif
     118#endif
     119
    104120  }
    105121
     
    145161    {
    146162      read(nalu, nalUnit);
     163#if QC_MVHEVC_B0046
     164    viewDepthId = nalu.m_layerId;
     165    Int depth = 0;
     166    Int viewId = viewDepthId;
     167#else
    147168#if VIDYO_VPS_INTEGRATION
    148169      Int viewId = 0;
     
    156177        depth = getVPSAccess()->getActiveVPS()->getDepthFlag(nalu.m_layerId);
    157178      }
     179#if FLEX_CODING_ORDER_M23723
     180      if (viewId>0)
     181      {
     182        viewIdZero=false;
     183      }
     184      if (viewIdZero==false&&viewId==0)
     185      {
     186        firstFrame=0; //if viewId has been more than zero and now it set to zero again, we can see that it is not the first view
     187      }
     188      if (firstFrame)
     189      { // if the current view is first frame, we set the viewDepthId as texture plus depth and get the FCO order
     190        viewDepthId = iDepthViewIdx+iTextureViewIdx;
     191        m_fcoViewDepthId=viewDepthId;
     192      }
     193      else
     194      {//if current view is not first frame, we set the viewDepthId depended on the FCO order
     195        viewDepthId=0;
     196        if (depth)
     197        {
     198          for (fcoIndex=0;fcoIndex<2*MAX_VIEW_NUM;fcoIndex++ )
     199          {
     200            if (m_fcoOrder[fcoIndex]=='D')
     201            {
     202              if (viewId==viewDepthId)
     203                break;
     204              else
     205                viewDepthId++;
     206            }
     207          }
     208        }
     209        else
     210        {
     211          for (fcoIndex=0;fcoIndex<2*MAX_VIEW_NUM;fcoIndex++ )
     212          {
     213            if (m_fcoOrder[fcoIndex]=='T')
     214            {
     215              if (viewId==viewDepthId)
     216                break;
     217              else
     218                viewDepthId++;
     219            }
     220          }
     221        }
     222
     223        viewDepthId=fcoIndex;
     224
     225      }
     226
     227
     228#else
    158229      viewDepthId = nalu.m_layerId;   // coding order T0D0T1D1T2D2
     230#endif
     231   
    159232#else
    160233      Int viewId = nalu.m_viewId;
    161234      Int depth = nalu.m_isDepth ? 1 : 0;
     235#if FLEX_CODING_ORDER_M23723
     236      if (viewId>0)
     237      {
     238        viewIdZero=false;
     239      }
     240      if (viewIdZero==false&&viewId==0)
     241      {
     242        firstFrame=0;
     243      }
     244      if (firstFrame)
     245      {
     246        viewDepthId = iDepthViewIdx+iTextureViewIdx;
     247        m_fcoViewDepthId=viewDepthId;
     248      }
     249      else
     250      {
     251        viewDepthId=0;
     252        if (depth)
     253        {
     254          for (fcoIndex=0;fcoIndex<2*MAX_VIEW_NUM;fcoIndex++ )
     255          {
     256            if (m_fcoOrder[fcoIndex]=='D')
     257            {
     258              if (viewId==viewDepthId)
     259                break;
     260              else
     261                viewDepthId++;
     262            }
     263          }
     264        }
     265        else
     266        {
     267          for (fcoIndex=0;fcoIndex<2*MAX_VIEW_NUM;fcoIndex++ )
     268          {
     269            if (m_fcoOrder[fcoIndex]=='T')
     270            {
     271              if (viewId==viewDepthId)
     272                break;
     273              else
     274                viewDepthId++;
     275            }
     276          }
     277        }
     278        viewDepthId=fcoIndex;
     279      }
     280#else
    162281      viewDepthId = viewId * 2 + depth;   // coding order T0D0T1D1T2D2
    163282#endif
    164      
     283#endif
     284#endif     
    165285      newPicture[viewDepthId] = false;
    166286      if( viewDepthId >= m_tDecTop.size() )     
    167287      {
    168 #if VIDYO_VPS_INTEGRATION
     288#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    169289        increaseNumberOfViews( viewDepthId, viewId, depth );
    170290#else
     
    195315      if( !(m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) )
    196316      {
     317#if QC_MVHEVC_B0046
     318        if(viewDepthId && m_tDecTop[viewDepthId]->m_bFirstNal== false)
     319        {
     320          m_tDecTop[viewDepthId]->m_bFirstNal = true;
     321          ParameterSetManagerDecoder* pDecV0 = m_tDecTop[0]->xGetParaSetDec();
     322          m_tDecTop[viewDepthId]->xCopyVPS(pDecV0->getPrefetchedVPS(0));
     323          m_tDecTop[viewDepthId]->xCopySPS(pDecV0->getPrefetchedSPS(0));
     324          m_tDecTop[viewDepthId]->xCopyPPS(pDecV0->getPrefetchedPPS(0));
     325        }
     326#endif
    197327        newPicture[viewDepthId] = m_tDecTop[viewDepthId]->decode(nalu, m_iSkipFrame, m_pocLastDisplay[viewDepthId]);
    198328        if (newPicture[viewDepthId])
     
    209339        {
    210340          previousPictureDecoded = true;
     341#if FLEX_CODING_ORDER_M23723
     342        if (firstFrame)
     343        {
     344            if (depth)
     345            {
     346                iDepthViewIdx++;
     347                m_fcoOrder[viewDepthId]='D';
     348            }
     349            else
     350           {
     351                iTextureViewIdx++;
     352                m_fcoOrder[viewDepthId]='T';
     353           }
     354          }
     355
     356#endif
    211357        }
    212358      }
     
    218364    if( pcListPic[viewDepthId] )
    219365    {
     366#if QC_REM_IDV_B0046
     367      Int iviewId = m_tDecTop[viewDepthId]->getViewId();
     368      if( newPicture[viewDepthId] && (nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR || ((nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR && iviewId) && m_tDecTop[viewDepthId]->getNalUnitTypeBaseView() == NAL_UNIT_CODED_SLICE_IDR)) )
     369#else
    220370      if( newPicture[viewDepthId] && (nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR || (nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDV && m_tDecTop[viewDepthId]->getNalUnitTypeBaseView() == NAL_UNIT_CODED_SLICE_IDR)) )
     371#endif
    221372      {
    222373        xFlushOutput( pcListPic[viewDepthId], viewDepthId );
     
    275426        m_tDecTop[viewDepthIdx]->destroy() ;
    276427      }
     428#if QC_MVHEVC_B0046
     429      if(viewDepthIdx)
     430      {
     431         //Call clear function to remove the record, which has been freed during viewDepthIdx = 0 case.
     432        m_tDecTop[viewDepthIdx]->xGetParaSetDec()->clearSPS();
     433        m_tDecTop[viewDepthIdx]->xGetParaSetDec()->clearVPS();
     434        m_tDecTop[viewDepthIdx]->xGetParaSetDec()->clearPPS();
     435      }
     436#endif
    277437      delete m_tDecTop[viewDepthIdx] ;
    278438      m_tDecTop[viewDepthIdx] = NULL ;
     
    416576  m_pocLastDisplay[viewDepthId] = -MAX_INT;
    417577}
    418 #if VIDYO_VPS_INTEGRATION
     578#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    419579Void  TAppDecTop::increaseNumberOfViews  ( UInt layerId, UInt viewId, UInt isDepth )
    420580#else
     
    422582#endif
    423583{
    424 #if VIDYO_VPS_INTEGRATION
     584#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    425585  Int newNumberOfViewDepth = layerId + 1;
    426586#endif
     
    429589    m_outputBitDepth = g_uiBitDepth + g_uiBitIncrement;
    430590  }
    431 #if !VIDYO_VPS_INTEGRATION
     591#if !VIDYO_VPS_INTEGRATION&!QC_MVHEVC_B0046
    432592  Int viewId = (newNumberOfViewDepth-1)>>1;   // coding order T0D0T1D1T2D2
    433593  Bool isDepth = ((newNumberOfViewDepth % 2) == 0);  // coding order T0D0T1D1T2D2
     
    442602      m_tVideoIOYuvReconFile.push_back(new TVideoIOYuv);
    443603      Char buffer[4];
    444 #if VIDYO_VPS_INTEGRATION
     604#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    445605      sprintf(buffer,"_%i", viewId );
    446606#else
     
    448608#endif
    449609      Char* nextFilename = NULL;
    450 #if VIDYO_VPS_INTEGRATION
     610#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    451611      if( isDepth)
    452612#else
     
    463623        xAppendToFileNameEnd( m_pchReconFile, buffer, nextFilename);
    464624      }
    465 #if !VIDYO_VPS_INTEGRATION
     625#if !VIDYO_VPS_INTEGRATION&!QC_MVHEVC_B0046
    466626      if( isDepth || ( !isDepth && (m_tVideoIOYuvReconFile.size() % 2) == 1 ) )
    467627#endif
     
    480640  {
    481641    m_tDecTop.push_back(new TDecTop);
    482 #if !VIDYO_VPS_INTEGRATION
     642#if !VIDYO_VPS_INTEGRATION&!QC_MVHEVC_B0046
    483643    if( isDepth || ( !isDepth && (m_tVideoIOYuvReconFile.size() % 2) == 1 ) )
    484644    {
     
    490650      m_tDecTop.back()->setPictureDigestEnabled(m_pictureDigestEnabled);
    491651      m_tDecTop.back()->setCamParsCollector( &m_cCamParsCollector );
    492 #if !VIDYO_VPS_INTEGRATION
     652#if !VIDYO_VPS_INTEGRATION&!QC_MVHEVC_B0046
    493653    }
    494654#endif
     
    498658TDecTop* TAppDecTop::getTDecTop( Int viewId, Bool isDepth )
    499659{
     660#if FLEX_CODING_ORDER_M23723
     661  Int viewnumber=0;
     662  Int i=0;
     663  Bool fcoFlag=0;
     664  if (viewId>m_fcoViewDepthId)
     665  {
     666    return NULL;
     667  }
     668  else
     669  {
     670    if (isDepth)
     671   {
     672      for ( i=0; i<=m_fcoViewDepthId;i++)
     673      {
     674         if (m_fcoOrder[i]=='D')
     675         {
     676           if (viewnumber==viewId)
     677           {
     678             fcoFlag=1;
     679             break;
     680           }
     681           else
     682             viewnumber++;
     683         }
     684      }
     685    }
     686    else
     687    {
     688      for ( i=0; i<=m_fcoViewDepthId;i++)
     689      {
     690        if (m_fcoOrder[i]=='T')
     691        {
     692          if (viewnumber==viewId)
     693          {
     694            fcoFlag=1;
     695            break;
     696          }
     697          else
     698            viewnumber++;
     699        }
     700      }
     701    }
     702    if (fcoFlag)
     703    {
     704      return m_tDecTop[i];
     705    }
     706    else
     707      return NULL;
     708   
     709  }
     710
     711    // coding order T0D0T1D1T2D2
     712#else
    500713  return m_tDecTop[(isDepth ? 1 : 0) + viewId * 2];  // coding order T0D0T1D1T2D2
     714#endif
     715 
    501716}
    502717
     
    517732  assert( ( viewId >= 0 ) );
    518733
     734#if FLEX_CODING_ORDER_M23723
     735if (getTDecTop(viewId,isDepth))
     736{
    519737  TComList<TComPic*>* apcListPic = getTDecTop( viewId, isDepth )->getListPic();
    520738  TComPic* pcPic = NULL;
     
    529747  return pcPic;
    530748}
     749else
     750  return NULL;
     751#else
     752
     753  TComList<TComPic*>* apcListPic = getTDecTop( viewId, isDepth )->getListPic();
     754  TComPic* pcPic = NULL;
     755  for( TComList<TComPic*>::iterator it=apcListPic->begin(); it!=apcListPic->end(); it++ )
     756  {
     757    if( (*it)->getPOC() == poc )
     758    {
     759      pcPic = *it;
     760      break;
     761    }
     762  }
     763  return pcPic;
     764#endif
     765}
    531766//! \}
  • trunk/source/App/TAppDecoder/TAppDecTop.h

    r100 r210  
    7171  Bool                            m_useDepth;
    7272
     73#if FLEX_CODING_ORDER_M23723
     74  Int  m_fcoViewDepthId;
     75  Char m_fcoOrder[MAX_VIEW_NUM*2];
     76#endif
     77
    7378  FILE*                           m_pScaleOffsetFile;
    7479  CamParsCollector                m_cCamParsCollector;
    7580#if DEPTH_MAP_GENERATION
    76 #if VIDYO_VPS_INTEGRATION
     81#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    7782  TComVPSAccess                   m_cVPSAccess;
    7883#endif
     
    8893  Void  destroy           (); ///< destroy internal members
    8994  Void  decode            (); ///< main decoding function
    90 #if VIDYO_VPS_INTEGRATION
     95#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    9196  Void  increaseNumberOfViews  (UInt layerId, UInt viewId, UInt isDepth);
    9297#else
  • trunk/source/App/TAppEncoder/TAppEncCfg.cpp

    r189 r210  
    111111  if (m_pchBitstreamFile != NULL)
    112112    free (m_pchBitstreamFile) ;
     113#if FLEX_CODING_ORDER_M23723
     114  if (m_pchMVCJointCodingOrder != NULL)
     115  {
     116    free(m_pchMVCJointCodingOrder) ;
     117  }
     118#endif
    113119#if HHI_VSO
    114120  if (  m_pchVSOConfig != NULL)
     
    203209  string cfg_RowHeight;
    204210  string cfg_ScalingListFile;
     211
     212 #if FLEX_CODING_ORDER_M23723
     213  string cfg_JointCodingOrdering;
     214#endif
     215
    205216  po::Options opts;
    206217  opts.addOptions()
     
    246257 
    247258  ("NumberOfViews",         m_iNumberOfViews,    0, "Number of views")
     259#if FLEX_CODING_ORDER_M23723
     260  ("FCO",               m_b3DVFlexOrder,   false, "flexible coding order flag" )
     261  ("FCOCodingOrder",   cfg_JointCodingOrdering,  string(""), "The coding order for joint texture-depth coding")
     262#endif
    248263  /* Unit definition parameters */
    249264  ("MaxCUWidth",          m_uiMaxCUWidth,  64u)
     
    276291  ("FastSearch", m_iFastSearch, 1, "0:Full search  1:Diamond  2:PMVFAST")
    277292  ("SearchRange,-sr",m_iSearchRange, 96, "motion search range")
     293#if DV_V_RESTRICTION_B0037
     294  ("DisparitySearchRangeRestriction",m_bUseDisparitySearchRangeRestriction, false, "restrict disparity search range")
     295  ("VerticalDisparitySearchRange",m_iVerticalDisparitySearchRange, 56, "vertical disparity search range")
     296#endif
    278297  ("BipredSearchRange", m_bipredSearchRange, 4, "motion search range for bipred refinement")
    279298  ("HadamardME", m_bUseHADME, true, "hadamard ME for fractional-pel")
     
    329348  /* Camera Paremetes */
    330349  ("CameraParameterFile,cpf", m_pchCameraParameterFile,    (Char *) 0, "Camera Parameter File Name")
     350#if QC_MVHEVC_B0046
     351  ("BaseViewCameraNumbers" ,  m_aiVId,     std::vector<Int>(1, MAX_VIEW_NUM), "Numbers of base views")
     352#endif
    331353  ("BaseViewCameraNumbers" ,  m_pchBaseViewCameraNumbers,  (Char *) 0, "Numbers of base views")
    332354
     
    526548  m_pchBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str());
    527549  m_pchdQPFile = cfg_dQPFile.empty() ? NULL : strdup(cfg_dQPFile.c_str());
    528  
     550#if FLEX_CODING_ORDER_M23723
     551  m_pchMVCJointCodingOrder= cfg_JointCodingOrdering.empty()?NULL:strdup(cfg_JointCodingOrdering.c_str());
     552  // If flexible order is enabled and if depth comes before the texture for a view, disable VSO
     553#if HHI_VSO && DISABLE_FCO_FOR_VSO
     554  Bool depthComesFirst = false;
     555  int iter = 0;
     556  if ( m_b3DVFlexOrder )
     557  {
     558    for(Int iViewIdx=0; iViewIdx<m_iNumberOfViews; iViewIdx++)
     559    {
     560      iter = 0;
     561      for ( Int ii=1; ii<12; ii+=2 )
     562      {
     563        Int iViewIdxCfg = (Int)(m_pchMVCJointCodingOrder[ii]-'0');
     564        if ( iViewIdxCfg == iViewIdx )
     565        {
     566          iter ++;
     567          if ( m_pchMVCJointCodingOrder[ii-1]=='D' ) // depth comes first for this view
     568          {
     569            if(iter == 1)
     570           {
     571            depthComesFirst = true;
     572            break;
     573           }
     574          }
     575          else
     576          {
     577            assert(m_pchMVCJointCodingOrder[ii-1]=='T');
     578          }
     579        }
     580      }
     581    }
     582  }
     583  if (depthComesFirst)
     584  {
     585    m_bUseVSO = false;
     586  }
     587#endif
     588#endif
    529589  m_pchColumnWidth = cfg_ColumnWidth.empty() ? NULL: strdup(cfg_ColumnWidth.c_str());
    530590  m_pchRowHeight = cfg_RowHeight.empty() ? NULL : strdup(cfg_RowHeight.c_str());
     
    786846}
    787847#else
     848#if !QC_MVHEVC_B0046
    788849  m_cCameraData     .init     ( (UInt)m_iNumberOfViews,
    789850    m_uiInputBitDepth,
     
    797858    LOG2_DISP_PREC_LUT );
    798859#endif
     860#endif
    799861
    800862
    801863  // check validity of input parameters
    802864  xCheckParameter();
     865#if !QC_MVHEVC_B0046
    803866  m_cCameraData.check( false, true );
    804  
     867#endif
    805868  // print-out parameters
    806869  xPrintParameter();
     
    850913  xConfirmPara( m_iFastSearch < 0 || m_iFastSearch > 2,                                     "Fast Search Mode is not supported value (0:Full search  1:Diamond  2:PMVFAST)" );
    851914  xConfirmPara( m_iSearchRange < 0 ,                                                        "Search Range must be more than 0" );
     915#if DV_V_RESTRICTION_B0037
     916  xConfirmPara( m_iVerticalDisparitySearchRange <= 0 ,                                      "Vertical Disparity Search Range must be more than 0" );
     917#endif
    852918  xConfirmPara( m_bipredSearchRange < 0 ,                                                   "Search Range must be more than 0" );
    853919  xConfirmPara( m_iMaxDeltaQP > 7,                                                          "Absolute Delta QP exceeds supported range (0 to 7)" );
     
    15951661  printf("Min PCM size                 : %d\n", 1 << m_uiPCMLog2MinSize);
    15961662  printf("Motion search range          : %d\n", m_iSearchRange );
     1663#if DV_V_RESTRICTION_B0037
     1664  printf("Disp search range restriction: %d\n", m_bUseDisparitySearchRangeRestriction );
     1665  printf("Vertical disp search range   : %d\n", m_iVerticalDisparitySearchRange );
     1666#endif
    15971667  printf("Intra period                 : %d\n", m_iIntraPeriod );
    15981668  printf("Decoding refresh type        : %d\n", m_iDecodingRefreshType );
     
    17451815#if TMVP_DEPTH_SWITCH
    17461816  printf("TMVP:%d ", (m_enableTMVP[1] ? 1 : 0) );
     1817#endif
     1818#if FLEX_CODING_ORDER_M23723
     1819  printf("FCO:%d ",   (m_b3DVFlexOrder ? 1: 0));
     1820
     1821  if(m_b3DVFlexOrder)
     1822  {
     1823    printf("CodingOrder: %s ", m_pchMVCJointCodingOrder);
     1824  }
    17471825#endif
    17481826#if HHI_VSO
  • trunk/source/App/TAppEncoder/TAppEncCfg.h

    r189 r210  
    8888  Int       m_iNumberOfViews;                                 ///< number Views to Encode
    8989  Bool      m_bUsingDepthMaps;
     90 
     91#if FLEX_CODING_ORDER_M23723
     92  Char*  m_pchMVCJointCodingOrder;      ///<  texture-depth coding order
     93  Bool    m_b3DVFlexOrder;    ///<  flexible coding order flag
     94#endif
     95
    9096  // coding structure
    9197  Int       m_iIntraPeriod;                                   ///< period of I-slice (random access period)
     
    109115  std::vector<Double>  m_adQP;                                ///< QP value of key-picture (floating point) [0] video, [1] depth
    110116  std::vector<Int>     m_aiQP;                                ///< QP value of key-picture (integer) [0] video, [1] depth
     117#if QC_MVHEVC_B0046
     118  std::vector<Int>     m_aiVId;                                ///< view id
     119#endif
    111120  Int       m_aiTLayerQPOffset[MAX_TLAYER];                   ///< QP offset corresponding to temporal layer depth
    112121  char*     m_pchdQPFile;                                     ///< QP offset for each slice (initialized from external file)
     
    200209  Int       m_iFastSearch;                                    ///< ME mode, 0 = full, 1 = diamond, 2 = PMVFAST
    201210  Int       m_iSearchRange;                                   ///< ME search range
     211#if DV_V_RESTRICTION_B0037
     212  Bool      m_bUseDisparitySearchRangeRestriction;            ///< restrict vertical search range for inter-view prediction
     213  Int       m_iVerticalDisparitySearchRange;                  ///< ME vertical search range for inter-view prediction
     214#endif
    202215  Int       m_bipredSearchRange;                              ///< ME search range for bipred refinement
    203216  Bool      m_bUseFastEnc;                                    ///< flag for using fast encoder setting
     
    285298  Char*     m_pchCameraParameterFile;                         ///< camera parameter file
    286299  Char*     m_pchBaseViewCameraNumbers;
     300#if !QC_MVHEVC_B0046
    287301  TAppComCamPara m_cCameraData;
    288 
     302#endif
    289303  Int       m_iCodedCamParPrecision;                          ///< precision for coding of camera parameters
    290304
  • trunk/source/App/TAppEncoder/TAppEncTop.cpp

    r189 r210  
    6767Void TAppEncTop::xInitLibCfg()
    6868{
    69 #if VIDYO_VPS_INTEGRATION
     69#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
     70#if !QC_MVHEVC_B0046
    7071  UInt layerId = 0;
     72#endif
    7173  // TODO: fix the assumption here that the temporal structures are all equal across all layers???
    7274  m_cVPS.setMaxTLayers( m_maxTempLayer[0] );
     75#if QC_MVHEVC_B0046
     76  m_cVPS.setMaxLayers( m_iNumberOfViews );
     77#else
    7378  m_cVPS.setMaxLayers( m_iNumberOfViews * (m_bUsingDepthMaps ? 2:1) );
     79#endif
    7480  for(Int i = 0; i < MAX_TLAYER; i++)
    7581  {
     
    101107    m_acTEncTopList[iViewIdx]->setViewId                       ( iViewIdx );
    102108    m_acTEncTopList[iViewIdx]->setIsDepth                      ( false );
     109#if QC_MVHEVC_B0046
     110    m_acTEncTopList[iViewIdx]->setLayerId                      ( iViewIdx );
     111    m_cVPS.setViewId                                           ( m_aiVId[ iViewIdx ], iViewIdx );
     112#else
    103113    m_acTEncTopList[iViewIdx]->setViewOrderIdx                 ( m_cCameraData.getViewOrderIndex()[ iViewIdx ] );
    104114#if VIDYO_VPS_INTEGRATION
     
    117127    m_acTEncTopList[iViewIdx]->setCodedScale                   ( m_cCameraData.getCodedScale             () );
    118128    m_acTEncTopList[iViewIdx]->setCodedOffset                  ( m_cCameraData.getCodedOffset            () );
     129#endif   
    119130
    120131  //====== Coding Structure ========
     
    170181    m_acTEncTopList[iViewIdx]->setSearchRange                  ( m_iSearchRange );
    171182    m_acTEncTopList[iViewIdx]->setBipredSearchRange            ( m_bipredSearchRange );
    172 
     183#if DV_V_RESTRICTION_B0037
     184    m_acTEncTopList[iViewIdx]->setUseDisparitySearchRangeRestriction ( m_bUseDisparitySearchRangeRestriction );
     185    m_acTEncTopList[iViewIdx]->setVerticalDisparitySearchRange( m_iVerticalDisparitySearchRange );
     186#endif
    173187  //====== Quality control ========
    174188    m_acTEncTopList[iViewIdx]->setMaxDeltaQP                   ( m_iMaxDeltaQP  );
     
    386400    for(Int iViewIdx=0; iViewIdx<m_iNumberOfViews; iViewIdx++)
    387401    {
     402
     403#if FLEX_CODING_ORDER_M23723
     404      // Detect whether depth comes before than texture for this view
     405      Bool isDepthFirst = false;
     406      if ( m_b3DVFlexOrder )
     407      {
     408        for ( Int ii=1; ii<12; ii+=2 )
     409        {
     410          Int iViewIdxCfg = (Int)(m_pchMVCJointCodingOrder[ii]-'0');
     411          if ( iViewIdxCfg == iViewIdx )
     412          {
     413            if ( m_pchMVCJointCodingOrder[ii-1]=='D' ) // depth comes first for this view
     414            {
     415              isDepthFirst = true;
     416            }
     417            else
     418            {
     419              assert(m_pchMVCJointCodingOrder[ii-1]=='T');
     420            }
     421            break;
     422          }
     423        }
     424      }
     425#endif
     426
    388427      m_depthFrameRcvd.push_back(0);
    389428      m_acTEncDepthTopList.push_back(new TEncTop);
     
    406445      m_acTEncDepthTopList[iViewIdx]->setViewId                       ( iViewIdx );
    407446      m_acTEncDepthTopList[iViewIdx]->setIsDepth                      ( true );
     447#if QC_MVHEVC_B0046
     448      m_acTEncDepthTopList[iViewIdx]->setLayerId                      ( iViewIdx );
     449#else
    408450      m_acTEncDepthTopList[iViewIdx]->setViewOrderIdx                 ( m_cCameraData.getViewOrderIndex()[ iViewIdx ] );
     451#endif
    409452#if VIDYO_VPS_INTEGRATION
    410453      layerId = iViewIdx * 2 + 1;
     
    473516      m_acTEncDepthTopList[iViewIdx]->setSearchRange                  ( m_iSearchRange );
    474517      m_acTEncDepthTopList[iViewIdx]->setBipredSearchRange            ( m_bipredSearchRange );
    475 
     518#if DV_V_RESTRICTION_B0037
     519      m_acTEncDepthTopList[iViewIdx]->setUseDisparitySearchRangeRestriction ( m_bUseDisparitySearchRangeRestriction );
     520      m_acTEncDepthTopList[iViewIdx]->setVerticalDisparitySearchRange( m_iVerticalDisparitySearchRange );
     521#endif
    476522      //====== Quality control ========
    477523      m_acTEncDepthTopList[iViewIdx]->setMaxDeltaQP                   ( m_iMaxDeltaQP  );
     
    661707    m_acTEncDepthTopList[iViewIdx]->setUseDMM                     ( m_bUseDMM );
    662708#endif
     709#if FLEX_CODING_ORDER_M23723 && HHI_DMM_PRED_TEX
     710    m_acTEncDepthTopList[iViewIdx]->setUseDMM34( (m_b3DVFlexOrder && isDepthFirst) ? false : m_bUseDMM );
     711#endif
     712
    663713#if OL_QTLIMIT_PREDCODING_B0068
    664714    m_acTEncDepthTopList[iViewIdx]->setUseQTLPC                   (m_bUseQTLPC);
    665715#endif
    666716#if HHI_MPI
     717#if FLEX_CODING_ORDER_M23723
     718    m_acTEncDepthTopList[iViewIdx]->setUseMVI( (m_b3DVFlexOrder && isDepthFirst) ? false : m_bUseMVI );
     719#else
    667720     m_acTEncDepthTopList[iViewIdx]->setUseMVI( m_bUseMVI );
     721#endif
    668722#endif
    669723#if RWTH_SDC_DLT_B0036
     
    821875  {
    822876    m_acTEncTopList[iViewIdx]->init( this );
     877#if QC_MVHEVC_B0046
     878  //set setNumDirectRefLayer
     879  Int iNumDirectRef = m_acTEncTopList[iViewIdx]->getSPS()->getNumberOfUsableInterViewRefs();
     880  m_acTEncTopList[iViewIdx]->getEncTop()->getVPS()->setNumDirectRefLayer(iNumDirectRef, iViewIdx);
     881  for(Int iNumIvRef = 0; iNumIvRef < iNumDirectRef; iNumIvRef ++)
     882  {
     883    Int iLayerId = m_acTEncTopList[iViewIdx]->getSPS()->getUsableInterViewRef(iNumIvRef);
     884    m_acTEncTopList[iViewIdx]->getEncTop()->getVPS()->setDirectRefLayerId( iLayerId + iViewIdx, iViewIdx, iNumIvRef);
     885  }
     886#endif
    823887  }
    824888  for(Int iViewIdx=0; iViewIdx<m_iNumberOfViews; iViewIdx++)
     
    862926  TComPicYuv*       pcPicYuvOrg = new TComPicYuv;
    863927  TComPicYuv*       pcDepthPicYuvOrg = new TComPicYuv;
     928#if !QC_MVHEVC_B0046
    864929  TComPicYuv*       pcPdmDepthOrg    = new TComPicYuv;
     930#endif
    865931  TComPicYuv*       pcPicYuvRec = NULL;
    866932  TComPicYuv*       pcDepthPicYuvRec = NULL;
     
    9631029    {
    9641030      Int  iNumEncoded = 0;
     1031#if !QC_MVHEVC_B0046
    9651032      UInt iNextPoc = m_acTEncTopList[0] -> getFrameId( gopId );
    9661033      if ( iNextPoc < m_iFrameToBeEncoded )
     
    9681035      m_cCameraData.update( iNextPoc );
    9691036      }
     1037#endif
     1038
     1039#if FLEX_CODING_ORDER_M23723
     1040      if (m_b3DVFlexOrder)
     1041      {
     1042        Int  iNumDepthEncoded = 0;
     1043        iNumEncoded = 0;
     1044        Int i=0;
     1045        Int iViewIdx=0;
     1046        Int iNumberofDepthViews = m_bUsingDepthMaps?m_iNumberOfViews:0;
     1047        for (Int j=0; j < (m_iNumberOfViews+ iNumberofDepthViews); j++ )
     1048        {
     1049          if (m_pchMVCJointCodingOrder[i]=='T')
     1050          {
     1051
     1052            i++;
     1053            assert(isdigit(m_pchMVCJointCodingOrder[i]));
     1054            iViewIdx = (Int)(m_pchMVCJointCodingOrder[i]-'0');
     1055
     1056            m_acTEncTopList[iViewIdx]->encode( eos[iViewIdx], pcPicYuvOrg, *m_picYuvRec[iViewIdx], outputAccessUnits, iNumEncoded, gopId );
     1057            xWriteOutput(bitstreamFile, iNumEncoded, outputAccessUnits, iViewIdx, false);
     1058            outputAccessUnits.clear();
     1059            i++;
     1060          }
     1061          else if ( m_pchMVCJointCodingOrder[i] == 'D')
     1062          {
     1063
     1064            i++;
     1065            if( m_bUsingDepthMaps )
     1066            {
     1067              assert(isdigit(m_pchMVCJointCodingOrder[i]));
     1068              iViewIdx = (Int)(m_pchMVCJointCodingOrder[i]-'0');
     1069#if SAIT_VSO_EST_A0033
     1070              if( m_bUseVSO && iNextPoc < m_iFrameToBeEncoded )
     1071              {
     1072                m_cCameraData.xSetDispCoeff( iNextPoc, iViewIdx );
     1073                m_acTEncDepthTopList[iViewIdx]->setDispCoeff( m_cCameraData.getDispCoeff() );
     1074              }
     1075#endif
     1076              m_acTEncDepthTopList[iViewIdx]->encode( depthEos[iViewIdx], pcDepthPicYuvOrg, *m_picYuvDepthRec[iViewIdx], outputAccessUnits, iNumDepthEncoded, gopId );
     1077              xWriteOutput(bitstreamFile, iNumDepthEncoded, outputAccessUnits, iViewIdx, true);
     1078              outputAccessUnits.clear();
     1079              i++;
     1080            }
     1081          }
     1082        }
     1083      }
     1084      else
     1085      {
     1086
     1087#endif
    9701088      for(Int iViewIdx=0; iViewIdx < m_iNumberOfViews; iViewIdx++ )
    9711089      {
     
    9911109        }
    9921110      }
     1111 
     1112#if FLEX_CODING_ORDER_M23723
     1113      }
     1114#endif
     1115
    9931116#if HHI_INTERVIEW_SKIP || HHI_INTER_VIEW_MOTION_PRED || HHI_INTER_VIEW_RESIDUAL_PRED
    9941117      for( Int iViewIdx = 0; iViewIdx < m_iNumberOfViews; iViewIdx++ )
     
    10231146  pcDepthPicYuvOrg = NULL;
    10241147 
     1148#if !QC_MVHEVC_B0046
     1149#if FIX_DEL_NULLPTR
     1150  if ( pcPdmDepthOrg != NULL && m_uiMultiviewMvRegMode )
     1151#else
    10251152  if ( pcPdmDepthOrg != NULL )
     1153#endif
    10261154  {
    10271155    pcPdmDepthOrg->destroy();
     
    10291157    pcPdmDepthOrg = NULL;
    10301158  };
    1031 
     1159#endif
    10321160 
    10331161  for(Int iViewIdx=0; iViewIdx < m_iNumberOfViews; iViewIdx++ )
     
    12331361    case NAL_UNIT_CODED_SLICE:
    12341362#if H0566_TLA
     1363#if !QC_REM_IDV_B0046
    12351364    case NAL_UNIT_CODED_SLICE_IDV:
     1365#endif
    12361366    case NAL_UNIT_CODED_SLICE_TLA:
    12371367    case NAL_UNIT_CODED_SLICE_CRA:
  • trunk/source/App/TAppEncoder/TAppEncTop.h

    r189 r210  
    8787#endif
    8888
    89 #if VIDYO_VPS_INTEGRATION
     89#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    9090  TComVPS                     m_cVPS;
    9191#endif
     
    139139#endif
    140140 
     141#if QC_MVHEVC_B0046
     142  TComVPS*          getVPS()  { return &m_cVPS; }
     143#endif
    141144#if VIDYO_VPS_INTEGRATION
    142145  TComVPS*          getVPS()  { return &m_cVPS; }
  • trunk/source/App/TAppRenderer/RendererMain.cpp

    r100 r210  
    4343int main(int argc, char* argv[])
    4444  {
     45#if !QC_MVHEVC_B0046
    4546  TAppRendererTop  cTAppRendererTop;
    4647
     
    7879
    7980  return 0;
     81#endif
    8082}
    8183
  • trunk/source/App/TAppRenderer/TAppRendererCfg.cpp

    r189 r210  
    5959// Constructor / destructor / initialization / destroy
    6060// ====================================================================================================================
    61 
     61#if !QC_MVHEVC_B0046
    6262TAppRendererCfg::TAppRendererCfg()
    6363{
     
    516516  g_uiIBDI_MAX     = ((1<<(g_uiBitDepth+g_uiBitIncrement))-1);
    517517}
     518#endif
  • trunk/source/App/TAppRenderer/TAppRendererCfg.h

    r100 r210  
    5050#include <string>
    5151#include <vector>
    52 
     52#if !QC_MVHEVC_B0046
    5353// ====================================================================================================================
    5454// Class definition
     
    134134
    135135
    136 
     136#endif
    137137#endif // __TAppRENDERERCFG__
    138138
  • trunk/source/App/TAppRenderer/TAppRendererTop.cpp

    r189 r210  
    4545// Constructor / destructor / initialization / destroy
    4646// ====================================================================================================================
    47 
     47#if !QC_MVHEVC_B0046
    4848TAppRendererTop::TAppRendererTop()
    4949{
     
    10341034
    10351035}
     1036#endif
  • trunk/source/App/TAppRenderer/TAppRendererTop.h

    r100 r210  
    5050#include "../../Lib/TLibRenderer/TRenModel.h"
    5151
    52 
     52#if !QC_MVHEVC_B0046
    5353// ====================================================================================================================
    5454// Class definition
     
    8787};// END CLASS DEFINITION TAppRendererTop
    8888
    89 #endif // __TAppRendererTOP__
     89#endif
    9090
     91#endif
  • trunk/source/Lib/TLibCommon/CommonDef.h

    r208 r210  
    5858
    5959#define HM_VERSION        "6.1"
    60 #define NV_VERSION        "5.0.1"                  ///< Current software version
     60#define NV_VERSION        "5.0"                  ///< Current software version
    6161
    6262// ====================================================================================================================
     
    185185// VPS constants
    186186// ====================================================================================================================
     187#if QC_MVHEVC_B0046
     188#define MAX_LAYER_NUM                     MAX_VIEW_NUM
     189#endif
    187190#if VIDYO_VPS_INTEGRATION
    188191#define MAX_LAYER_NUM                     MAX_VIEW_NUM
     
    480483  NAL_UNIT_CODED_SLICE,
    481484#if H0566_TLA
     485#if QC_REM_IDV_B0046
     486  NAL_UNIT_RESERVED,
     487#else
    482488  NAL_UNIT_CODED_SLICE_IDV,
     489#endif
    483490  NAL_UNIT_CODED_SLICE_TLA,
    484491  NAL_UNIT_CODED_SLICE_CRA,
     
    508515  NAL_UNIT_RESERVED_23,
    509516  NAL_UNIT_UNSPECIFIED_24,
    510 #if VIDYO_VPS_INTEGRATION
     517#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    511518  NAL_UNIT_VPS,
    512519#else
  • trunk/source/Lib/TLibCommon/NAL.h

    r100 r210  
    5151  NalRefIdc   m_nalRefIDC;   ///< nal_ref_idc
    5252#endif
    53 #if VIDYO_VPS_INTEGRATION
     53#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    5454  unsigned    m_layerId;
    5555  unsigned    m_temporalId;  ///< temporal_id
     
    6969    NalUnitType nalUnitType,
    7070    Bool        nalRefFlag,
    71 #if !VIDYO_VPS_INTEGRATION    
     71#if !VIDYO_VPS_INTEGRATION & !QC_MVHEVC_B0046    
    7272    Int         viewId,
    7373    Bool        isDepth,
     
    7878    :m_nalUnitType (nalUnitType)
    7979    ,m_nalRefFlag  (nalRefFlag)
    80 #if !VIDYO_VPS_INTEGRATION
     80#if !VIDYO_VPS_INTEGRATION & !QC_MVHEVC_B0046
    8181    ,m_viewId      (viewId)
    8282    ,m_isDepth     (isDepth)
     
    139139    return m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR
    140140#if H0566_TLA
     141#if !QC_REM_IDV_B0046   
    141142        || m_nalUnitType == NAL_UNIT_CODED_SLICE_IDV
     143#endif
    142144        || m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA
    143145        || m_nalUnitType == NAL_UNIT_CODED_SLICE_TLA
  • trunk/source/Lib/TLibCommon/TComDataCU.cpp

    r205 r210  
    43314331  {
    43324332    // col [2]
     4333#if !QC_TMVP_IDX_MOD_B0046
    43334334    Int iRefIdxSkip[2] = {-1, -1};
    43344335    for (Int i=0; i<2; i++)
     
    43504351      iRefIdxSkip[i] = (iRefIdxTmp != -1) ? iRefIdxTmp : 0;
    43514352    }
     4353#endif
    43524354    //>> MTK colocated-RightBottom
    43534355    UInt uiPartIdxRB;
     
    43614363
    43624364    TComMv cColMv;
     4365#if QC_TMVP_IDX_MOD_B0046
     4366    Int iRefIdx = 0;
     4367#else
    43634368    Int iRefIdx;
    4364 
     4369#endif
    43654370    if      ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getSPS()->getPicWidthInLumaSamples() )  // image boundary check
    43664371    {
     
    43954400      }
    43964401    }
     4402#if !QC_TMVP_IDX_MOD_B0046
    43974403    iRefIdx = iRefIdxSkip[0];
    4398 
     4404#else
     4405    iRefIdx = 0;
     4406#endif
    43994407    Bool bExistMV = false;
    44004408    UInt uiPartIdxCenter;
     
    44144422      if ( getSlice()->isInterB() )
    44154423      {       
     4424#if !QC_TMVP_IDX_MOD_B0046
    44164425        iRefIdx = iRefIdxSkip[1];
     4426#else
     4427        iRefIdx = 0;
     4428#endif
    44174429        bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_1, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx);
    44184430        if( bExistMV == false )
     
    64276439  if( pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) >= 0 )
    64286440  {
     6441#if QC_IV_AS_LT_B0046
     6442    Bool bIsCurrRefLongTerm = m_pcSlice->getRefPic( eRefPicList, iRefIdx)->getIsLongTerm();
     6443    Bool bIsNeibRefLongTerm = m_pcSlice->getRefPic( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx))->getIsLongTerm();
     6444    iNeibRefPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) );
     6445    if ( (bIsCurrRefLongTerm == bIsNeibRefLongTerm) && (iNeibRefPOC == iCurrRefPOC) )
     6446#else
    64296447    if( pcTmpCU->getSlice()->getRefViewId( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) )
    64306448    {
     
    64336451    iNeibRefPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) );
    64346452    if( iNeibRefPOC == iCurrRefPOC ) // Same Reference Frame But Diff List//
     6453#endif
    64356454    {
    64366455      TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList2nd)->getMv(uiIdx);
     
    65696588  Int iNeibRefPOC;
    65706589
     6590#if QC_IV_AS_LT_B0046
     6591  Bool bIsCurrRefLongTerm = m_pcSlice->getRefPic( eRefPicList, iRefIdx)->getIsLongTerm();
     6592  Bool bIsNeibRefLongTerm = false;
     6593#endif
    65716594  if( pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) >= 0 )
    65726595  {
    65736596    iNeibRefPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) );
     6597#if QC_IV_AS_LT_B0046
     6598    bIsNeibRefLongTerm = m_pcSlice->getRefPic( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx))->getIsLongTerm() ;
     6599    if ( (bIsCurrRefLongTerm == bIsNeibRefLongTerm) && (iNeibRefPOC == iCurrRefPOC) )
     6600#else
    65746601    if( pcTmpCU->getSlice()->getRefViewId( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) )
    65756602      return false;
    65766603    if( iNeibRefPOC == iCurrRefPOC ) // Same Reference Frame But Diff List//
     6604#endif
    65776605    {
    65786606      TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList2nd)->getMv(uiIdx);
     
    65926620    TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx);
    65936621    TComMv rcMv;
    6594 
     6622#if QC_IV_AS_LT_B0046
     6623    bIsNeibRefLongTerm = m_pcSlice->getRefPic( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx))->getIsLongTerm();
     6624    if ( bIsCurrRefLongTerm == bIsNeibRefLongTerm )
     6625    {
     6626#else
    65956627    if( pcTmpCU->getSlice()->getRefViewId( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) )
    65966628    {
    65976629      return false;
    65986630    }
    6599 
     6631#endif
    66006632    Int iScale = xGetDistScaleFactor( iCurrPOC, iCurrRefPOC, iNeibPOC, iNeibRefPOC );
    66016633    if ( iScale == 4096 )
     
    66126644    pInfo->m_acMvCand[ pInfo->iN++] = rcMv;
    66136645    return true;
     6646#if QC_IV_AS_LT_B0046
     6647    }
     6648#endif
    66146649  }
    66156650  //---------------------- V2(END) --------------------//
     
    66196654    TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList2nd)->getMv(uiIdx);
    66206655    TComMv rcMv;
    6621 
     6656#if QC_IV_AS_LT_B0046
     6657    bIsNeibRefLongTerm = m_pcSlice->getRefPic( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx))->getIsLongTerm(); ;
     6658    if ( bIsCurrRefLongTerm == bIsNeibRefLongTerm )
     6659    {
     6660#else
    66226661    if( pcTmpCU->getSlice()->getRefViewId( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) )
    66236662    {
    66246663      return false;
    66256664    }
    6626 
     6665#endif
    66276666    Int iScale = xGetDistScaleFactor( iCurrPOC, iCurrRefPOC, iNeibPOC, iNeibRefPOC );
    66286667    if ( iScale == 4096 )
     
    66396678    pInfo->m_acMvCand[ pInfo->iN++] = rcMv;
    66406679    return true;
     6680#if QC_IV_AS_LT_B0046
     6681  }
     6682#endif
    66416683  }
    66426684  //---------------------- V3(END) --------------------//
     
    67496791  Int iColPOC, iColRefPOC, iCurrPOC, iCurrRefPOC, iScale;
    67506792#if SONY_COLPIC_AVAILABILITY
     6793#if QC_IV_AS_LT_B0046
     6794  Int iColViewOrderIdx, iCurrViewOrderIdx, iCurrRefViewOrderIdx;
     6795#else
    67516796  Int iColViewOrderIdx, iColRefViewOrderIdx, iCurrViewOrderIdx, iCurrRefViewOrderIdx;
     6797#endif
    67526798#endif
    67536799  TComMv cColMv;
     
    67806826  }
    67816827
    6782 #if !SONY_COLPIC_AVAILABILITY
     6828#if !SONY_COLPIC_AVAILABILITY&!QC_IV_AS_LT_B0046
    67836829  if( m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewId() != m_pcSlice->getViewId() )
    67846830    return false;
     
    68086854  iColRefPOC = pColCU->getSlice()->getRefPOC(eColRefPicList, iColRefIdx);
    68096855
     6856#if !QC_IV_AS_LT_B0046
    68106857#if SONY_COLPIC_AVAILABILITY
    68116858  iColRefViewOrderIdx = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewOrderIdx();
     
    68166863  }
    68176864#endif
    6818 
     6865#else
     6866  Bool bIsCurrRefLongTerm = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getIsLongTerm();
     6867  Bool bIsColRefLongTerm = pColCU->getSlice()->getWasLongTerm(eColRefPicList, iColRefIdx);
     6868  if(bIsCurrRefLongTerm != bIsColRefLongTerm)
     6869  {
     6870    assert( ((iColPOC == iColRefPOC)&&(iCurrPOC != iCurrRefPOC))||((iColPOC != iColRefPOC)&&(iCurrPOC == iCurrRefPOC)));
     6871    return false;
     6872  }
     6873#endif
    68196874  cColMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiAbsPartAddr);
    68206875
    68216876  iCurrRefPOC = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC();
     6877#if QC_IV_AS_LT_B0046
     6878  {
     6879    assert( ((iColPOC != iColRefPOC)&&(iCurrPOC != iCurrRefPOC))||((iColPOC == iColRefPOC)&&(iCurrPOC == iCurrRefPOC)));
     6880    if(!bIsCurrRefLongTerm)  //short-term
     6881    {
     6882      iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC);
     6883      if ( iScale == 4096 )
     6884      {
     6885        rcMv = cColMv;
     6886      }
     6887      else
     6888      {
     6889        rcMv = cColMv.scaleMv( iScale );
     6890      }
     6891    }else
     6892#if QC_MVHEVC_B0046
     6893      rcMv = cColMv; //inter-view
     6894#else
     6895    {
     6896#if SONY_COLPIC_AVAILABILITY
     6897      Int iColRefViewOrderIdx = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewOrderIdx();
     6898      iScale = xGetDistScaleFactor(iCurrViewOrderIdx, iCurrRefViewOrderIdx, iColViewOrderIdx, iColRefViewOrderIdx);
     6899      if ( iScale == 4096 )
     6900      {
     6901        rcMv = cColMv;
     6902      }
     6903      else
     6904      {
     6905        rcMv = cColMv.scaleMv( iScale );
     6906      }
     6907#else
     6908      return false;
     6909#endif
     6910    }
     6911#endif
     6912  }
     6913#else
    68226914#if SONY_COLPIC_AVAILABILITY
    68236915  iScale = 0;
     
    68416933    rcMv = cColMv.scaleMv( iScale );
    68426934  }
    6843 
     6935#endif
    68446936  return true;
    68456937}
  • trunk/source/Lib/TLibCommon/TComDepthMapGenerator.h

    r189 r210  
    239239  Bool              m_bDecoder;
    240240  TComPrediction*   m_pcPrediction;
    241 #if VIDYO_VPS_INTEGRATION
     241#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    242242  TComVPSAccess*    m_pcVPSAccess;
    243243#endif
  • trunk/source/Lib/TLibCommon/TComPic.cpp

    r189 r210  
    519519      UInt uiTempLayer = currSlice->getRefPic(eRefPicList, lpRef)->getCurrSlice()->getTLayer();
    520520      Int iTempDiff = (iTempPoc > iPOCCurr) ? (iTempPoc - iPOCCurr): (iPOCCurr - iTempPoc);
     521#if QC_REM_IDV_B0046
     522      TComSlice* refSlice = currSlice->getRefPic(eRefPicList, lpRef)->getCurrSlice();
     523      bRAP = (refSlice->getSPS()->getViewId() && (refSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || refSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA))? 1: 0;     
     524#else
    521525      bRAP = (currSlice->getRefPic(eRefPicList, lpRef)->getCurrSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV? 1:0);
     526#endif
    522527      if( bRAP)
    523528      {
  • trunk/source/Lib/TLibCommon/TComPic.h

    r189 r210  
    140140  TComSlice*    getSlice(Int i)       { return  m_apcPicSym->getSlice(i);  }
    141141  TComSlice*    getCurrSlice()        { return  m_apcPicSym->getSlice(m_uiCurrSliceIdx);  }
    142 #if VIDYO_VPS_INTEGRATION
     142#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    143143  TComVPS*      getVPS()              { return  m_apcPicSym->getSlice(m_uiCurrSliceIdx)->getVPS();  }
    144144#endif
  • trunk/source/Lib/TLibCommon/TComPrediction.cpp

    r189 r210  
    924924}
    925925#endif
     926#if !QC_MVHEVC_B0046
    926927  Int     ixFrac      = iHor & 0x3;
    927928  Int     iyFrac      = iVer & 0x3;
     929#endif
    928930  Int     iRefOffset  = ( iHor >> 2 ) + ( iVer >> 2 ) * iRefStride;
    929931#endif
  • trunk/source/Lib/TLibCommon/TComPrediction.h

    r189 r210  
    105105#else
    106106  Void xPredInterLumaBlk  ( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi );
     107  Void xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi );
    107108#endif
    108   Void xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi );
    109109  Void xWeightedAverage         ( TComDataCU* pcCU, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, Int iRefIdx0, Int iRefIdx1, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvDst );
    110110 
  • trunk/source/Lib/TLibCommon/TComSlice.cpp

    r189 r210  
    4444
    4545TComSlice::TComSlice()
     46#if QC_MVHEVC_B0046
     47: m_iPPSId                        ( 0  )
     48#else
    4649: m_iPPSId                        ( -1 )
     50#endif
    4751, m_iPOC                          ( 0 )
    4852, m_iLastIDR                      ( 0 )
     
    142146  resetWpScalingLC(m_weightPredTableLC);
    143147  initWpAcDcParam();
     148#if QC_IV_AS_LT_B0046
     149  for(Int iNumCount = 0; iNumCount < MAX_NUM_REF+1; iNumCount++)
     150  {
     151     m_bWasLongTerm[0][iNumCount] = false;
     152     m_bWasLongTerm[1][iNumCount] = false;
     153  }
     154#endif
    144155}
    145156
     
    472483  {
    473484    pcRefPic = xGetInterViewRefPic( rapcInterViewRefPics, getViewId() + m_pcSPS->getUsableInterViewRef(i) );
     485#if QC_IV_AS_LT_B0046
     486    pcRefPic->setIsLongTerm( 1 );
     487#else
    474488    pcRefPic->setIsLongTerm( 0 );
     489#endif
    475490    pcRefPic->getPicYuvRec()->extendPicBorder();
    476491    RefPicSetIvCurr[NumPocIvCurr] = pcRefPic;
     
    513528  {
    514529    m_apcRefPicList[0][cIdx] = m_RefPicListModification.getRefPicListModificationFlagL0() ? refPicListTemp0[ m_RefPicListModification.getRefPicSetIdxL0(cIdx) ] : refPicListTemp0[cIdx];
     530#if QC_IV_AS_LT_B0046
     531    setWasLongTerm(m_apcRefPicList[0][cIdx]->getIsLongTerm(), REF_PIC_LIST_0, cIdx);
     532#endif
    515533  }
    516534  if( m_eSliceType == P_SLICE )
     
    524542    {
    525543      m_apcRefPicList[1][cIdx] = m_RefPicListModification.getRefPicListModificationFlagL1() ? refPicListTemp1[ m_RefPicListModification.getRefPicSetIdxL1(cIdx) ] : refPicListTemp1[cIdx];
     544#if QC_IV_AS_LT_B0046
     545      setWasLongTerm(m_apcRefPicList[1][cIdx]->getIsLongTerm(), REF_PIC_LIST_1, cIdx);
     546#endif
    526547    }
    527548  }
     
    876897    for(i=0;i<pReferencePictureSet->getNumberOfPositivePictures()+pReferencePictureSet->getNumberOfNegativePictures();i++)
    877898    {
     899#if QC_IV_AS_LT_B0046
     900       if( rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getPOC() + pReferencePictureSet->getDeltaPOC(i))
     901#else
    878902      if(!rpcPic->getIsLongTerm() && rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getPOC() + pReferencePictureSet->getDeltaPOC(i))
     903#endif
    879904      {
    880905        isReference = 1;
     
    886911    for(;i<pReferencePictureSet->getNumberOfPictures();i++)
    887912    {
     913#if QC_IV_AS_LT_B0046
     914     if( (rpcPic->getPicSym()->getSlice(0)->getPOC()%(1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC())) == pReferencePictureSet->getPOC(i)%(1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC()))
     915#else
    888916      if(rpcPic->getIsLongTerm() && (rpcPic->getPicSym()->getSlice(0)->getPOC()%(1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC())) == pReferencePictureSet->getPOC(i)%(1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC()))
     917#endif
    889918      {
    890919        isReference = 1;
     
    13901419// Video parameter set (VPS)
    13911420// ------------------------------------------------------------------------------------------------
     1421#if QC_MVHEVC_B0046
     1422TComVPS::TComVPS()
     1423: m_VPSId                     (  0)
     1424, m_uiMaxTLayers              (  1)
     1425, m_uiMaxLayers               (  1)
     1426, m_bTemporalIdNestingFlag    (false)
     1427, m_uiNumHRDParameter         (  0)
     1428, m_numAddiLayerOperationPoints (2)
     1429, m_numAddiProLevelSets       (  1)
     1430{
     1431  for( Int i = 0; i < MAX_LAYER_NUM; i++)
     1432  {
     1433  m_numOpLayerIdMinus1[i] = 0;
     1434  if(i)
     1435      m_numDirectRefLayer[i] = 1;
     1436  else
     1437    m_numDirectRefLayer[i] = 0;
     1438  for( Int j = 0; j < MAX_LAYER_NUM; j++)
     1439  {
     1440    m_numDirectRefID[i][j] = 0;
     1441    m_numOpLayerId[i][j]   = 0;
     1442  }
     1443    m_uiViewId[i] = 0;
     1444    m_iViewOrderIdx[i] = 0;
     1445  }
     1446 
     1447  for( Int i = 0; i < MAX_TLAYER; i++)
     1448  {
     1449    m_numReorderPics[i] = 0;
     1450    m_uiMaxDecPicBuffering[i] = 0;
     1451    m_uiMaxLatencyIncrease[i] = 0;
     1452  }
     1453}
     1454
     1455TComVPS::~TComVPS()
     1456{
     1457}
     1458#else
    13921459#if VIDYO_VPS_INTEGRATION
    13931460TComVPS::TComVPS()
     
    14221489
    14231490#endif
    1424 
     1491#endif
    14251492
    14261493// ------------------------------------------------------------------------------------------------
     
    14291496
    14301497TComSPS::TComSPS()
    1431 #if VIDYO_VPS_INTEGRATION
     1498#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    14321499: m_VPSId                     (  0)
    14331500, m_SPSId                     (  0)
     
    14811548, m_bLCMod                    (false)
    14821549#if H0412_REF_PIC_LIST_RESTRICTION
     1550#if QC_MVHEVC_B0046
     1551, m_restrictedRefPicListsFlag   (  0)
     1552#else
    14831553, m_restrictedRefPicListsFlag   (  1)
     1554#endif
    14841555, m_listsModificationPresentFlag(  0)
    14851556#endif
     
    15221593#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    15231594, m_bUseDMM                   (false)
     1595#endif
     1596#if FLEX_CODING_ORDER_M23723 && HHI_DMM_PRED_TEX
     1597, m_bUseDMM34                   (false)
    15241598#endif
    15251599#if OL_QTLIMIT_PREDCODING_B0068
     
    17341808TComSPS::initMultiviewSPS( UInt uiViewId, Int iViewOrderIdx, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset )
    17351809{
     1810#if !QC_MVHEVC_B0046
    17361811  AOT( uiViewId == 0 && iViewOrderIdx != 0 );
    17371812  AOT( uiViewId != 0 && iViewOrderIdx == 0 );
    17381813  AOT( uiViewId != 0 && !bCamParSlice && ( aaiScale == 0 || aaiOffset == 0 ) );
    1739 
     1814#endif
    17401815  m_uiViewId              = uiViewId;
    17411816  m_iViewOrderIdx         = iViewOrderIdx;
     
    17451820  ::memset( m_aaiCodedScale,  0x00, sizeof( m_aaiCodedScale  ) );
    17461821  ::memset( m_aaiCodedOffset, 0x00, sizeof( m_aaiCodedOffset ) );
     1822#if !QC_MVHEVC_B0046
    17471823  if( !m_bCamParInSliceHeader )
    17481824  {
     
    17551831    }
    17561832  }
     1833#endif
    17571834}
    17581835
     
    23742451, m_ppsMap(MAX_NUM_PPS)
    23752452, m_apsMap(MAX_NUM_APS)
    2376 #if VIDYO_VPS_INTEGRATION
     2453#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    23772454, m_vpsMap(MAX_NUM_VPS)
    23782455#endif
  • trunk/source/Lib/TLibCommon/TComSlice.h

    r189 r210  
    144144#endif
    145145
    146 #if VIDYO_VPS_INTEGRATION
     146#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    147147/// VPS class
    148148
     
    156156
    157157  UInt        m_uiExtensionType;
    158  
     158#if !QC_MVHEVC_B0046 
    159159  Bool        m_bDependentFlag[MAX_LAYER_NUM];
     160#else
     161  UInt        m_uiNumHRDParameter;
     162  UInt        m_numAddiLayerOperationPoints;
     163  UInt        m_numAddiProLevelSets;
     164  UInt        m_numDirectRefLayer[MAX_LAYER_NUM];
     165  UInt        m_numDirectRefID[MAX_LAYER_NUM][MAX_LAYER_NUM];
     166  UInt        m_numOpLayerIdMinus1[MAX_LAYER_NUM];
     167  UInt        m_numOpLayerId[MAX_LAYER_NUM][MAX_LAYER_NUM];
     168#endif
    160169  UInt        m_uiViewId[MAX_LAYER_NUM];
     170#if !QC_MVHEVC_B0046 
    161171  Bool        m_bDepthFlag[MAX_LAYER_NUM];
     172#endif
    162173  Int         m_iViewOrderIdx[MAX_LAYER_NUM];
     174#if !QC_MVHEVC_B0046 
    163175  UInt        m_uiDependentLayer[MAX_LAYER_NUM];
     176#endif
    164177
    165178  UInt        m_numReorderPics[MAX_TLAYER];
     
    182195  Bool    getTemporalNestingFlag   ()         { return m_uiMaxLayers;   }
    183196  Void    setTemporalNestingFlag   (UInt t)   { m_bTemporalIdNestingFlag = t; }
    184  
     197#if !QC_MVHEVC_B0046
    185198  Void    setExtensionType(UInt v)                     { m_uiExtensionType = v;    }
    186199  UInt    getExtensionType()                             { return m_uiExtensionType; }
     
    188201  Void    setDependentFlag(Bool d, UInt layer)              { m_bDependentFlag[layer] = d;    }
    189202  Bool    getDependentFlag(UInt layer)                      { return m_bDependentFlag[layer]; }
    190 
     203#endif
    191204  Void    setViewId(UInt v, UInt layer)                     { m_uiViewId[layer] = v;    }
    192205  UInt    getViewId(UInt layer)                             { return m_uiViewId[layer]; }
    193  
     206#if !QC_MVHEVC_B0046
    194207  Void    setDepthFlag(Bool d, UInt layer)                  { m_bDepthFlag[layer] = d;    }
    195208  Bool    getDepthFlag(UInt layer)                          { return m_bDepthFlag[layer]; }
    196 
     209#endif
    197210  Void    setViewOrderIdx(Int v, UInt layer)                { m_iViewOrderIdx[layer] = v;    }
    198211  Int     getViewOrderIdx(UInt layer)                       { return m_iViewOrderIdx[layer]; }
    199  
     212#if !QC_MVHEVC_B0046  
    200213  Void    setDependentLayer(UInt v, UInt layer)                     { m_uiDependentLayer[layer] = v;    }
    201214  UInt    getDependentLayer(UInt layer)                             { return m_uiDependentLayer[layer]; }
    202  
     215#endif
    203216  Void    setNumReorderPics(UInt v, UInt tLayer)                { m_numReorderPics[tLayer] = v;    }
    204217  UInt    getNumReorderPics(UInt tLayer)                        { return m_numReorderPics[tLayer]; }
     
    209222  Void    setMaxLatencyIncrease(UInt v, UInt tLayer)                { m_uiMaxLatencyIncrease[tLayer] = v;    }
    210223  UInt    getMaxLatencyIncrease(UInt tLayer)                        { return m_uiMaxLatencyIncrease[tLayer]; }
    211  
     224#if QC_MVHEVC_B0046
     225  Void    setNumHRDParameters(UInt n)                                { m_uiNumHRDParameter = n;    }
     226  UInt    getNumHRDParameters()                                      { return m_uiNumHRDParameter; }
     227  Void    setNumDirectRefLayer(UInt n, UInt layer)                   { m_numDirectRefLayer[layer] = n;        };
     228  UInt    getNumDirectRefLayer(UInt layer)                           { return m_numDirectRefLayer[layer];     };
     229  Void    setDirectRefLayerId (UInt n, UInt layer, UInt refId)       { m_numDirectRefID[layer][refId] = n;   assert(refId < MAX_NUM_REF ); };
     230  UInt    getDirectRefLayerId (        UInt layer, UInt refId)       { return m_numDirectRefID[layer][refId]; };
     231  UInt    getNumAddiLayerOperationPoints(      )               { return m_numAddiLayerOperationPoints;  };
     232  Void    setNumAddiLayerOperationPoints(UInt n)                {  m_numAddiLayerOperationPoints = n;  };
     233  Void    setNumAddiProLevelSets        (UInt n)                     {  m_numAddiProLevelSets = n;}
     234  UInt    getNumAddiProLevelSets        (      )                     { return m_numAddiProLevelSets;}
     235
     236  Void    setNumOpLayerIdMinus1         (UInt n, UInt layer)                     {  m_numOpLayerIdMinus1[layer] = n;}
     237  UInt    getNumOpLayerIdMinus1         (UInt layer      )                       { return m_numOpLayerIdMinus1[layer];}
     238
     239  Void    setNumOpLayerId               (UInt n, UInt layer, UInt OpId)                     {  m_numOpLayerId[layer][OpId] = n;}
     240  UInt    getNumOpLayerId               (UInt layer, UInt OpId        )                     { return m_numOpLayerId[layer][OpId];}
     241 
     242#endif
    212243};
    213244
     
    218249{
    219250private:
    220 #if VIDYO_VPS_INTEGRATION
     251#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    221252  Int          m_VPSId;
    222253#endif
     
    363394#endif
    364395
     396#if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER_M23723
     397  Bool  m_bUseDMM34;
     398#endif
     399
    365400#if OL_QTLIMIT_PREDCODING_B0068
    366401  Bool m_bUseQTLPC;
     
    391426  TComSPS();
    392427  virtual ~TComSPS();
    393 #if VIDYO_VPS_INTEGRATION
     428#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    394429  Int  getVPSId       ()         { return m_VPSId;          }
    395430  Void setVPSId       (Int i)    { m_VPSId = i;             }
     
    643678#endif
    644679
     680#if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER_M23723
     681  Bool getUseDMM34()         { return m_bUseDMM34; }
     682  Void setUseDMM34( Bool b ) { m_bUseDMM34 = b;    }
     683#endif
     684
    645685#if OL_QTLIMIT_PREDCODING_B0068
    646686  Void setUseQTLPC( Bool b ) { m_bUseQTLPC = b;    }
     
    12211261 
    12221262  // access channel
    1223 #if VIDYO_VPS_INTEGRATION
     1263#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    12241264  TComVPS*    m_pcVPS;
     1265#endif
     1266#if QC_IV_AS_LT_B0046
     1267  Bool                  m_bWasLongTerm[2][MAX_NUM_REF+1]; //was long-term picture
    12251268#endif
    12261269  TComSPS*    m_pcSPS;
     
    12971340  Int        m_aaiCodedOffset[2][MAX_VIEW_NUM];
    12981341
    1299 #if SONY_COLPIC_AVAILABILITY
     1342#if SONY_COLPIC_AVAILABILITY|QC_MVHEVC_B0046
    13001343  Int         m_iViewOrderIdx;
    13011344#endif
     
    13111354  Void      initTiles();
    13121355
    1313 #if VIDYO_VPS_INTEGRATION
     1356#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    13141357  Void      setVPS          ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; }
    13151358  TComVPS*  getVPS          () { return m_pcVPS; }
    13161359#endif
     1360#if QC_IV_AS_LT_B0046
     1361  Void          setWasLongTerm( Bool lt,  RefPicList e, Int iRefIdx ) { m_bWasLongTerm[e][iRefIdx] = lt; }
     1362  Bool          getWasLongTerm( RefPicList e, Int iRefIdx           ) { return m_bWasLongTerm[e][iRefIdx] ; }
     1363#endif
     1364
    13171365  Void      setSPS          ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; }
    13181366  TComSPS*  getSPS          () { return m_pcSPS; }
     
    15871635  Void setViewId( Int viewId )       { m_viewId = viewId;   }
    15881636  Int  getViewId()                   { return m_viewId;     }
     1637#if QC_MVHEVC_B0046
     1638  Void    setViewOrderIdx(Int v, UInt layer)                { m_iViewOrderIdx = v;    }
     1639  Int     getViewOrderIdx()                                 { return m_iViewOrderIdx; }
     1640#endif
    15891641  Void setIsDepth( Bool isDepth )    { m_isDepth = isDepth; }
    15901642  Bool getIsDepth()                  { return m_isDepth;    }
     
    16551707  }
    16561708
     1709#if QC_MVHEVC_B0046
     1710  Void clearPSList()
     1711  {
     1712    m_paramsetMap.clear();
     1713  }
     1714#endif
    16571715private:
    16581716  std::map<Int,T *> m_paramsetMap;
     
    16651723  ParameterSetManager();
    16661724  virtual ~ParameterSetManager();
    1667 #if VIDYO_VPS_INTEGRATION
     1725#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    16681726  //! store video parameter set and take ownership of it
    16691727  Void storeVPS(TComVPS *vps) { m_vpsMap.storePS( vps->getVPSId(), vps); };
     
    16711729  TComVPS* getVPS(Int vpsId)  { return m_vpsMap.getPS(vpsId); };
    16721730  TComVPS* getFirstVPS()      { return m_vpsMap.getFirstPS(); };
     1731#if QC_MVHEVC_B0046
     1732  Void     clearVPS()         { m_vpsMap.clearPSList(); };
     1733  Void     clearSPS()         { m_spsMap.clearPSList(); };
     1734  Void     clearPPS()         { m_ppsMap.clearPSList(); };
     1735#endif
    16731736#endif
    16741737  //! store sequence parameter set and take ownership of it
     
    16931756  ParameterSetMap<TComPPS> m_ppsMap;
    16941757  ParameterSetMap<TComAPS> m_apsMap;
    1695 #if VIDYO_VPS_INTEGRATION
     1758#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    16961759  ParameterSetMap<TComVPS> m_vpsMap;
    16971760#endif
  • trunk/source/Lib/TLibCommon/TypeDef.h

    r205 r210  
    4141//! \ingroup TLibCommon
    4242//! \{
    43 
     43#define QC_MVHEVC_B0046                   0   //JCT3V-B0046: disable 3DHEVC tools
     44#define QC_IV_AS_LT_B0046                 1   //JCT3V-B0046: inter-view reference pictures are treated as long-term pictures, scaling of motion vectors for DCP based on ViewId/ViewOrderIdx is disabled 
     45#define QC_TMVP_IDX_MOD_B0046             1   //JCT3V-B0046: the reference index for temporal merging candidate is set to 0, as defined in HEVC
     46#define QC_REM_IDV_B0046                  1   //JCT3V-B0046: removal of IDV NAL unit type
     47#define FIX_DEL_NULLPTR                   1
     48#define FIX_MISUSE_REFINDEX               1
     49#define FIX_FCO_COMP_WARNING              1
     50#define DV_V_RESTRICTION_B0037            1   // JCT3V-B0037 disparity vector vertical range restriction
     51
     52#if !QC_MVHEVC_B0046
    4453///// ***** FIXES *********
    4554// A
     
    5261#define FIX_DMM_NEG_DIST                  1
    5362#define FIX_LGE_DVMCP_B0133               1
    54 #define FIX_MISUSE_REFINDEX               1
    55 
     63
     64
     65// FCO
     66#define FLEX_CODING_ORDER_M23723          1
     67#if FLEX_CODING_ORDER_M23723
     68  #define DISABLE_FCO_FOR_VSO             0 // Optional compile settings to disable VSO with FCO.
     69#endif
    5670
    5771///// ***** PATCHES *********
     
    178192
    179193#define HHI_MPI_MERGE_POS                 0
    180 
     194#endif
    181195///// ***** HM 6.1 *********
    182196#define SKIPFRAME_BUGFIX                  1 ///< bug fix to enable skipFrame at decoder
     
    478492// VPS INTEGRATION
    479493// ====================================================================================================================
    480 
     494#if !QC_MVHEVC_B0046
    481495#if VIDYO_VPS_INTEGRATION
    482496#define MAX_NUM_VPS 10
    483497#endif
     498#else
     499#define MAX_NUM_VPS 1
     500#endif
     501
    484502
    485503// ====================================================================================================================
  • trunk/source/Lib/TLibDecoder/NALread.cpp

    r77 r210  
    132132#endif
    133133
     134#if QC_MVHEVC_B0046
     135  //nalu.m_layerId    = bs.read(6);
     136  nalu.m_layerId    = bs.read(5);
     137  nalu.m_temporalId = bs.read(3) - 1;
     138#else
    134139#if H0388
    135140  nalu.m_temporalId = bs.read(3);
     
    145150  if ( nalu.m_temporalId )
    146151  {
     152#if QC_REM_IDV_B0046
     153    assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_CRA && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR);
     154#else
    147155    assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_CRA && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDV );
     156#endif
    148157  }
    149158#endif
     
    154163  case NAL_UNIT_CODED_SLICE_IDR:
    155164#if H0566_TLA
     165#if !QC_REM_IDV_B0046
    156166  case NAL_UNIT_CODED_SLICE_IDV:
     167#endif
    157168  case NAL_UNIT_CODED_SLICE_CRA:
    158169  case NAL_UNIT_CODED_SLICE_TLA:
     
    175186      if (nalu.m_temporalId == 0)
    176187      {
     188#if QC_REM_IDV_B0046
     189        assert(nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR);
     190#else
    177191        assert(nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDV );
     192#endif
    178193      }
    179194      else
     
    190205  }
    191206#endif
     207#endif
    192208}
    193209//! \}
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r189 r210  
    13381338  }
    13391339}
    1340 
     1340#if QC_MVHEVC_B0046
     1341Void TDecCavlc::parseVPS(TComVPS* pcVPS)
     1342{
     1343  UInt  uiCode;
     1344  READ_CODE( 4, uiCode,  "video_parameter_set_id"   );       pcVPS->setVPSId( uiCode );
     1345  READ_FLAG( uiCode,     "temporal_id_nesting_flag" );       pcVPS->setTemporalNestingFlag( uiCode ? true:false );
     1346  READ_CODE( 2, uiCode,  "vps_reserved_zero_2bits" );         assert( !uiCode );
     1347  READ_CODE( 6, uiCode,  "vps_max_layers_minus1" );               pcVPS->setMaxLayers( uiCode + 1 );
     1348  READ_CODE( 3, uiCode,  "vps_max_sub_layers_minus1" );      pcVPS->setMaxTLayers( uiCode + 1 );
     1349  READ_CODE( 12, uiCode, "vps_extension_offset"      );      assert( !uiCode );
     1350  for(UInt i = 0; i <= pcVPS->getMaxTLayers()-1; i++)
     1351  {
     1352    READ_UVLC( uiCode,  "max_dec_pic_buffering[i]" );     pcVPS->setMaxDecPicBuffering( uiCode, i );
     1353    READ_UVLC( uiCode,  "num_reorder_pics[i]" );          pcVPS->setNumReorderPics( uiCode, i );
     1354    READ_UVLC( uiCode,  "max_latency_increase[i]" );      pcVPS->setMaxLatencyIncrease( uiCode, i );
     1355  }
     1356  READ_UVLC( uiCode,                 "vps_num_hrd_parameters"   ); pcVPS->setNumHRDParameters(uiCode);
     1357  assert(pcVPS->getNumHRDParameters()==0);
     1358  for ( UInt i = 0; i < pcVPS->getNumHRDParameters(); i ++)
     1359  {
     1360   //   if( i > 0 ) 
     1361    //{
     1362    //  READ_UVLC (0, "op_num_layer_id_values_minus1[ opIdx ]");
     1363    //  for( i = 0; i <= op_num_layer_id_values_minus1[ opIdx ]; i++ ) 
     1364    //    READ_UVLC(0, 6, "op_layer_id[ opIdx ][ i ]");
     1365    //} 
     1366    //hrd_parameters( i  = =  0, vps_max_sub_layers_minus1 ); 
     1367  }
     1368 
     1369  READ_CODE( 1, uiCode, "bit_equal_to_one" );             assert( uiCode );
     1370  //vps_extension_byte_alignment_reserved_one_bit
     1371  xReadVPSAlignOne();
     1372  READ_CODE( 8, uiCode, "num_additional_layer_operation_points" );     pcVPS->setNumAddiLayerOperationPoints( uiCode );
     1373  READ_CODE( 8, uiCode, "num_additional_profile_level_sets"     );     pcVPS->setNumAddiProLevelSets( uiCode);
     1374
     1375
     1376  for(UInt i=0; i <= pcVPS->getMaxLayers()-1; i++)
     1377  {
     1378    READ_CODE( 4,  uiCode,             "num_types_zero_4bits[i]" );   assert( !uiCode );
     1379    READ_CODE( 4,  uiCode,             "type_zero_4bits[i]"      );   assert( !uiCode );
     1380    READ_CODE( 8,  uiCode,             "view_id[i]" );                pcVPS->setViewId(uiCode, i);
     1381    // WRITE_SVLC( pcVPS->getViewOrderIdx(i),                  "view_order_idx[i]" );
     1382    if(i)
     1383    {
     1384      READ_CODE( 6, uiCode,  "num_direct_ref_layers[ i ]" );    pcVPS->setNumDirectRefLayer(uiCode, i);
     1385      for (UInt j = 0; j< pcVPS->getNumDirectRefLayer(i); j++)
     1386      {
     1387        READ_CODE( 6, uiCode, "ref_layer_id[i][j]" );         pcVPS->setDirectRefLayerId (uiCode, i, j);
     1388      }
     1389    }
     1390  }
     1391  for( UInt i=1; i<=pcVPS->getNumAddiProLevelSets(); i++)
     1392  {
     1393    //profile_tier_level
     1394  }
     1395  for( UInt i=1; i<= pcVPS->getNumAddiLayerOperationPoints(); i++)
     1396  {   
     1397    if(pcVPS->getMaxLayers() == 3)
     1398    {
     1399      pcVPS->setNumOpLayerIdMinus1((i < pcVPS->getNumAddiLayerOperationPoints() ? 1: 2), (i-1));
     1400    }
     1401    else if( i==1 )
     1402    {
     1403      assert(pcVPS->getNumAddiLayerOperationPoints()==1);
     1404      pcVPS->setNumOpLayerIdMinus1(pcVPS->getMaxLayers()-1, (i-1));
     1405    }
     1406    READ_UVLC( uiCode,           "op_num_layer_id_values_minus1[ opIdx ]" ); pcVPS->setNumOpLayerIdMinus1(uiCode, i-1);
     1407    for(UInt j = 0; j <= pcVPS->getNumOpLayerIdMinus1(i-1); j++ )
     1408    {
     1409      READ_UVLC( uiCode,           "op_layer_id[ opIdx ][ i ]" ); pcVPS->setNumOpLayerId(uiCode, i-1, j);
     1410    }
     1411    if (pcVPS->getNumAddiProLevelSets())
     1412    {
     1413      //profile_level_idx[ i ]
     1414    }
     1415  }
     1416  return;
     1417}
     1418#else
    13411419#if VIDYO_VPS_INTEGRATION
    13421420Void TDecCavlc::parseVPS(TComVPS* pcVPS)
     
    13891467
    13901468#endif
    1391 
     1469#endif
    13921470#if HHI_MPI
    13931471Void TDecCavlc::parseSPS(TComSPS* pcSPS, Bool bIsDepth)
     
    14011479 
    14021480  UInt  uiCode;
     1481#if !QC_MVHEVC_B0046
    14031482  Int   iCode;
    1404 
     1483#endif
    14051484  READ_CODE( 8,  uiCode, "profile_idc" );                        pcSPS->setProfileIdc( uiCode );
    14061485  READ_CODE( 8,  uiCode, "reserved_zero_8bits" );
     
    16451724#endif
    16461725  READ_FLAG( uiCode, "sps_extension_flag");
     1726#if !QC_MVHEVC_B0046
    16471727  if(uiCode)
    16481728  {
     
    18031883    }
    18041884  }
     1885#endif
    18051886}
    18061887
     
    19071988    }
    19081989#endif
     1990#if QC_REM_IDV_B0046
     1991#if !QC_MVHEVC_B0046
     1992  if(rpcSlice->getNalUnitType()==NAL_UNIT_CODED_SLICE_IDR && rpcSlice->getSPS()->getViewId() == 0)
     1993#else
     1994  if(rpcSlice->getNalUnitType()==NAL_UNIT_CODED_SLICE_IDR && rpcSlice->getViewId() == 0)
     1995#endif
     1996#else
    19091997    if(rpcSlice->getNalUnitType()==NAL_UNIT_CODED_SLICE_IDR)
     1998#endif
    19101999    {
    19112000      READ_UVLC( uiCode, "idr_pic_id" );  //ignored
     
    19412030      }
    19422031      rpcSlice->setPOC( iPOCmsb+iPOClsb );
    1943 
     2032#if QC_REM_IDV_B0046
     2033#if !QC_MVHEVC_B0046
     2034      if( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR &&  rpcSlice->getSPS()->getViewId() && rpcSlice->getPOC() == 0 )
     2035#else
     2036      if( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR &&  rpcSlice->getViewId() && rpcSlice->getPOC() == 0 )
     2037#endif
     2038#else
    19442039      if( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV && rpcSlice->getPOC() == 0 )
     2040#endif
    19452041      {
    19462042        TComReferencePictureSet* rps = rpcSlice->getLocalRPS();
     
    20822178    {
    20832179#if H0412_REF_PIC_LIST_RESTRICTION
     2180#if QC_MVHEVC_B0046
     2181    if( !rpcSlice->getViewId() || !rpcSlice->getSPS()->getListsModificationPresentFlag() )
     2182#else
    20842183      if( !rpcSlice->getSPS()->getListsModificationPresentFlag() )
     2184#endif
    20852185      {
    20862186        refPicListModification->setRefPicListModificationFlagL0( 0 );
     
    21532253    {
    21542254#if H0412_REF_PIC_LIST_RESTRICTION
     2255#if QC_MVHEVC_B0046
     2256    if( !rpcSlice->getViewId() || !rpcSlice->getSPS()->getListsModificationPresentFlag() )
     2257#else
    21552258      if( !rpcSlice->getSPS()->getListsModificationPresentFlag() )
     2259#endif
    21562260      {
    21572261        refPicListModification->setRefPicListModificationFlagL1( 0 );
     
    22372341     
    22382342#if H0412_REF_PIC_LIST_RESTRICTION
    2239       if(rpcSlice->getSPS()->getListsModificationPresentFlag() )
     2343#if QC_MVHEVC_B0046
     2344    if( rpcSlice->getViewId() && rpcSlice->getSPS()->getListsModificationPresentFlag() )
     2345#else
     2346    if(rpcSlice->getSPS()->getListsModificationPresentFlag() )
     2347#endif
    22402348      {
    22412349#endif
     
    29443052}
    29453053
     3054#if QC_MVHEVC_B0046
     3055/** Parse VPS alignment one bits.
     3056 * \returns Void
     3057 */
     3058Void TDecCavlc::xReadVPSAlignOne( )
     3059{
     3060  UInt uiNumberOfBits = m_pcBitstream->getNumBitsUntilByteAligned();
     3061
     3062  if(uiNumberOfBits)
     3063  {
     3064    UInt uiBits;
     3065    UInt uiSymbol;
     3066
     3067    for(uiBits = 0; uiBits < uiNumberOfBits; uiBits++)
     3068    {
     3069      xReadFlag( uiSymbol );
     3070
     3071      if(!uiSymbol)
     3072      {
     3073        printf("\nWarning! vps_extension_byte_alignment_reserved_one_bit include a non-zero value.\n");
     3074      }
     3075    }
     3076  }
     3077}
     3078#endif
    29463079/** Parse PCM alignment zero bits.
    29473080 * \returns Void
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.h

    r189 r210  
    7575  Void  xReadFlagTr           (              UInt& rValue, const Char *pSymbolName);
    7676#endif
    77  
     77#if QC_MVHEVC_B0046
     78  Void  xReadVPSAlignOne      ();
     79#endif
    7880  Void  xReadPCMAlignZero     ();
    7981
     
    113115  Void  parseQtRootCbf      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt& uiQtRootCbf );
    114116
    115 #if VIDYO_VPS_INTEGRATION
     117#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    116118  Void  parseVPS            ( TComVPS* pcVPS );
    117119#endif
  • trunk/source/Lib/TLibDecoder/TDecEntropy.h

    r189 r210  
    7171#endif
    7272
    73 #if VIDYO_VPS_INTEGRATION
     73#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    7474  virtual Void  parseVPS                  ( TComVPS* pcVPS )                       = 0;
    7575#endif
     
    175175  Void    resetEntropy                ( TComSlice* p)           { m_pcEntropyDecoderIf->resetEntropy(p);                    }
    176176
    177 #if VIDYO_VPS_INTEGRATION
     177#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    178178  Void    decodeVPS                   ( TComVPS* pcVPS ) { m_pcEntropyDecoderIf->parseVPS(pcVPS); }
    179179#endif
  • trunk/source/Lib/TLibDecoder/TDecSbac.h

    r189 r210  
    8787  Void  setBitstream              ( TComInputBitstream* p  ) { m_pcBitstream = p; m_pcTDecBinIf->init( p ); }
    8888 
    89 #if VIDYO_VPS_INTEGRATION
     89#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    9090  Void  parseVPS                  ( TComVPS* pcVPS )  {}
    9191#endif
  • trunk/source/Lib/TLibDecoder/TDecSlice.cpp

    r77 r210  
    446446, m_ppsBuffer(16)
    447447, m_apsBuffer(64)
    448 #if VIDYO_VPS_INTEGRATION
     448#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    449449, m_vpsBuffer(16)
    450450#endif
     
    458458}
    459459
    460 #if VIDYO_VPS_INTEGRATION
     460#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    461461TComVPS* ParameterSetManagerDecoder::getPrefetchedVPS  (Int vpsId)
    462462{
     
    513513  m_ppsMap.mergePSList(m_ppsBuffer);
    514514  m_spsMap.mergePSList(m_spsBuffer);
    515 #if VIDYO_VPS_INTEGRATION
     515#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    516516  m_vpsMap.mergePSList(m_vpsBuffer);
    517517#endif
  • trunk/source/Lib/TLibDecoder/TDecSlice.h

    r100 r210  
    9696  Void     storePrefetchedAPS(TComAPS *aps)  { m_apsBuffer.storePS( aps->getAPSID(), aps); };
    9797  TComAPS* getPrefetchedAPS  (Int apsId);
    98 #if VIDYO_VPS_INTEGRATION
     98#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    9999  Void     storePrefetchedVPS(TComVPS *vps)  { m_vpsBuffer.storePS( vps->getVPSId(), vps); };
    100100  TComVPS* getPrefetchedVPS  (Int vpsId);
     
    106106  ParameterSetMap<TComPPS> m_ppsBuffer;
    107107  ParameterSetMap<TComAPS> m_apsBuffer;
    108 #if VIDYO_VPS_INTEGRATION
     108#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    109109  ParameterSetMap<TComVPS> m_vpsBuffer;
    110110#endif
  • trunk/source/Lib/TLibDecoder/TDecTop.cpp

    r77 r210  
    5050  m_aaiCodedScale          = new Int* [ MAX_VIEW_NUM ];
    5151  m_aiViewOrderIndex       = new Int  [ MAX_VIEW_NUM ];
     52#if QC_MVHEVC_B0046
     53  m_aiViewId               = new Int  [ MAX_VIEW_NUM ];
     54#endif
    5255  m_aiViewReceived         = new Int  [ MAX_VIEW_NUM ];
    5356  for( UInt uiId = 0; uiId < MAX_VIEW_NUM; uiId++ )
     
    266269  m_bFirstSliceInSequence   = true;
    267270  m_pcCamParsCollector = 0;
     271#if QC_MVHEVC_B0046
     272  m_bFirstNal                  = false;
     273#endif
    268274}
    269275
     
    578584  TComVPS *vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId());
    579585  assert (vps != 0);
     586#if !QC_REM_IDV_B0046
    580587  if( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA )
     588#else
     589  if( (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA) && !sps->getViewId() )
     590#endif
    581591    // VPS can only be activated on IDR or CRA...
    582592    getTAppDecTop()->getVPSAccess()->setActiveVPSId( sps->getVPSId() );
     
    584594  m_apcSlicePilot->setPPS(pps);
    585595  m_apcSlicePilot->setSPS(sps);
    586 #if VIDYO_VPS_INTEGRATION
     596#if QC_MVHEVC_B0046
     597  TComVPS *vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId());
     598#endif
     599#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    587600  m_apcSlicePilot->setVPS(vps);
    588601#endif
     
    626639  m_apcSlicePilot->setPPS(m_parameterSetManagerDecoder.getPrefetchedPPS(0));
    627640  m_apcSlicePilot->setSPS(m_parameterSetManagerDecoder.getPrefetchedSPS(0));
    628 #if VIDYO_VPS_INTEGRATION
     641#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
     642#if QC_MVHEVC_B0046
     643  m_apcSlicePilot->setIsDepth(false);
     644#endif
    629645  m_apcSlicePilot->setVPS(m_parameterSetManagerDecoder.getPrefetchedVPS(0));
    630646#endif
    631647  m_apcSlicePilot->initTiles();
    632 
     648#if QC_MVHEVC_B0046
     649  m_apcSlicePilot->setViewId( nalu.m_layerId );
     650  m_apcSlicePilot->setViewId( nalu.m_layerId );
     651  m_apcSlicePilot->setViewOrderIdx(m_apcSlicePilot->getVPS()->getViewId(nalu.m_layerId), nalu.m_layerId);
     652  Int iNumDirectRef = m_apcSlicePilot->getVPS()->getNumDirectRefLayer(nalu.m_layerId);
     653  m_apcSlicePilot->getSPS()->setNumberOfUsableInterViewRefs(iNumDirectRef);
     654  for(Int iNumIvRef = 0; iNumIvRef < iNumDirectRef; iNumIvRef ++)
     655  {
     656    Int iDeltaLayerId = m_apcSlicePilot->getVPS()->getDirectRefLayerId( nalu.m_layerId, iNumIvRef);
     657    m_apcSlicePilot->getSPS()->setUsableInterViewRef(iNumIvRef, (iDeltaLayerId-nalu.m_layerId));
     658  }
     659#endif
    633660  if (m_bFirstSliceInPicture)
    634661  {
     
    645672  if( m_bFirstSliceInPicture )
    646673  {
     674#if QC_MVHEVC_B0046
     675    if( nalu.m_layerId == 0 ) { m_nalUnitTypeBaseView = nalu.m_nalUnitType; }
     676    else                     { m_nalUnitTypeBaseView = m_tAppDecTop->getTDecTop( 0, 0 )->getNalUnitTypeBaseView(); }
     677#else
    647678#if VIDYO_VPS_INTEGRATION
    648679    if( m_apcSlicePilot->getVPS()->getViewId(nalu.m_layerId) == 0 ) { m_nalUnitTypeBaseView = nalu.m_nalUnitType; }
     
    652683    else                     { m_nalUnitTypeBaseView = m_tAppDecTop->getTDecTop( 0, nalu.m_isDepth )->getNalUnitTypeBaseView(); }
    653684#endif
    654    
     685#endif
    655686    m_apcSlicePilot->setNalUnitTypeBaseViewMvc( m_nalUnitTypeBaseView );
    656687  }
     
    951982
    952983    // Set reference list
     984#if !QC_MVHEVC_B0046
    953985#if VIDYO_VPS_INTEGRATION
    954986    pcSlice->setViewId( pcSlice->getVPS()->getViewId(nalu.m_layerId) );
     
    958990    pcSlice->setIsDepth(m_isDepth);
    959991#endif
     992#endif
    960993
    961994#if SONY_COLPIC_AVAILABILITY
     
    9691002    assert( m_tAppDecTop != NULL );
    9701003    TComPic * const pcTexturePic = m_isDepth ? m_tAppDecTop->getPicFromView(  m_viewId, pcSlice->getPOC(), false ) : NULL;
     1004
     1005#if FLEX_CODING_ORDER_M23723
     1006    if (pcTexturePic != NULL)
     1007    {
     1008      assert( !m_isDepth || pcTexturePic != NULL );
     1009      pcSlice->setTexturePic( pcTexturePic );
     1010    }
     1011#else
    9711012    assert( !m_isDepth || pcTexturePic != NULL );
    9721013    pcSlice->setTexturePic( pcTexturePic );
     1014#endif
     1015
    9731016
    9741017    std::vector<TComPic*> apcInterViewRefPics = m_tAppDecTop->getInterViewRefPics( m_viewId, pcSlice->getPOC(), m_isDepth, pcSlice->getSPS() );
     
    10711114  m_cGopDecoder.decompressGop(nalu.m_Bitstream, pcPic, false);
    10721115
     1116#if QC_IV_AS_LT_B0046
     1117  std::vector<TComPic*> apcInterViewRefPics = m_tAppDecTop->getInterViewRefPics( m_viewId, pcSlice->getPOC(), m_isDepth, pcSlice->getSPS() );
     1118  for( Int k = 0; k < apcInterViewRefPics.size(); k++ )
     1119  {
     1120    TComPic*  pcPicIv = apcInterViewRefPics[k];
     1121    pcPicIv->setIsLongTerm( 0 );
     1122  }
     1123#endif
    10731124  if( m_pcCamParsCollector )
    10741125  {
     
    10821133}
    10831134
    1084 #if VIDYO_VPS_INTEGRATION
     1135#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    10851136Void TDecTop::xDecodeVPS()
    10861137{
     
    10891140  m_cEntropyDecoder.decodeVPS( vps );
    10901141  m_parameterSetManagerDecoder.storePrefetchedVPS(vps); 
     1142#if !QC_MVHEVC_B0046
    10911143  getTAppDecTop()->getVPSAccess()->addVPS( vps );
     1144#endif
    10921145}
    10931146#endif
     
    11551208  switch (nalu.m_nalUnitType)
    11561209  {
    1157 #if VIDYO_VPS_INTEGRATION
     1210#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    11581211    case NAL_UNIT_VPS:
    11591212      xDecodeVPS();
     
    11781231    case NAL_UNIT_CODED_SLICE_IDR:
    11791232#if H0566_TLA
     1233#if !QC_REM_IDV_B0046
    11801234    case NAL_UNIT_CODED_SLICE_IDV:
     1235#endif
    11811236    case NAL_UNIT_CODED_SLICE_CRA:
    11821237    case NAL_UNIT_CODED_SLICE_TLA:
     
    11931248}
    11941249
     1250#if QC_MVHEVC_B0046
     1251Void TDecTop::xCopyVPS( TComVPS* pVPSV0 )
     1252{
     1253  m_parameterSetManagerDecoder.storePrefetchedVPS(pVPSV0); 
     1254}
     1255
     1256Void TDecTop::xCopySPS( TComSPS* pSPSV0 )
     1257{
     1258  TComSPS* sps = new TComSPS();
     1259  sps = pSPSV0;
     1260  m_parameterSetManagerDecoder.storePrefetchedSPS(sps);
     1261#if LCU_SYNTAX_ALF
     1262  m_cAdaptiveLoopFilter.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
     1263#endif
     1264}
     1265
     1266Void TDecTop::xCopyPPS(TComPPS* pPPSV0 )
     1267{
     1268  m_parameterSetManagerDecoder.storePrefetchedPPS( pPPSV0 );
     1269
     1270  //!!!KS: Activate parameter sets for parsing APS (unless dependency is resolved)
     1271  m_apcSlicePilot->setPPSId(pPPSV0->getPPSId());
     1272  xActivateParameterSets();
     1273  m_apcSlicePilot->initTiles();
     1274}
     1275#endif
    11951276/** Function for checking if picture should be skipped because of random access
    11961277 * \param iSkipFrame skip frame counter
  • trunk/source/Lib/TLibDecoder/TDecTop.h

    r100 r210  
    8888  Int**   m_aaiCodedScale;
    8989  Int*    m_aiViewOrderIndex;
     90#if QC_MVHEVC_B0046
     91  Int*    m_aiViewId;
     92#endif
    9093  Int*    m_aiViewReceived;
    9194  UInt    m_uiCamParsCodedPrecision;
     
    168171 
    169172  Void  deletePicBuffer();
    170 
     173#if QC_MVHEVC_B0046
     174  Void      xCopySPS( TComSPS* pSPSV0);
     175  Void      xCopyPPS( TComPPS* pPPSV0);
     176  Void      xCopyVPS( TComVPS* pVPSV0);
     177#endif
    171178#if HHI_INTER_VIEW_RESIDUAL_PRED
    172179  Void      deleteExtraPicBuffers   ( Int iPoc );
     
    195202  TAppDecTop*         getTAppDecTop()                           { return  m_tAppDecTop; }
    196203  NalUnitType         getNalUnitTypeBaseView()                  { return m_nalUnitTypeBaseView; }
    197 
     204#if QC_MVHEVC_B0046
     205  bool                m_bFirstNal; //used to copy SPS, PPS, VPS
     206  ParameterSetManagerDecoder* xGetParaSetDec ()        {return  &m_parameterSetManagerDecoder;}
     207#endif
    198208protected:
    199209  Void  xGetNewPicBuffer  (TComSlice* pcSlice, TComPic*& rpcPic);
     
    208218  Bool      xDecodeSlice(InputNALUnit &nalu, Int iSkipFrame, Int iPOCLastDisplay);
    209219#endif
    210 #if VIDYO_VPS_INTEGRATION
     220#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    211221  Void      xDecodeVPS();
    212222#endif
  • trunk/source/Lib/TLibEncoder/NALwrite.cpp

    r77 r210  
    6464#endif
    6565
     66#if QC_MVHEVC_B0046
     67  bsNALUHeader.write(nalu.m_layerId,        5); // when nal_ref_flag is signalled, 5 bits here. otherwise, 6 bits
     68  bsNALUHeader.write(nalu.m_temporalId + 1, 3); // temporal_id
     69#else
    6670#if VIDYO_VPS_INTEGRATION
    6771  bsNALUHeader.write(nalu.m_temporalId, 3); // temporal_id
     
    7983  case NAL_UNIT_CODED_SLICE_IDR:
    8084#if H0566_TLA
     85#if !QC_REM_IDV_B0046
    8186  case NAL_UNIT_CODED_SLICE_IDV:
     87#endif
    8288  case NAL_UNIT_CODED_SLICE_CRA:
    8389  case NAL_UNIT_CODED_SLICE_TLA:
     
    95101#endif
    96102#endif
    97  
     103#endif
    98104  out.write(bsNALUHeader.getByteStream(), bsNALUHeader.getByteStreamLength());
    99105
     
    196202}
    197203
     204#if !QC_MVHEVC_B0046
    198205/**
    199206 * Copy NALU from naluSrc to naluDest
     
    222229  naluDest.m_Bitstream   = naluSrc.m_Bitstream;
    223230}
     231#endif
    224232
    225233//! \}
  • trunk/source/Lib/TLibEncoder/NALwrite.h

    r77 r210  
    6262    NalRefIdc nalRefIDC,
    6363#endif
    64 #if VIDYO_VPS_INTEGRATION
     64#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    6565    unsigned layerId,
    6666#else
     
    7070    unsigned temporalID = 0)
    7171#if NAL_REF_FLAG
    72 #if VIDYO_VPS_INTEGRATION
     72#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    7373  : NALUnit(nalUnitType, nalRefFlag, layerId, temporalID)
    7474#else
  • trunk/source/Lib/TLibEncoder/TEncCavlc.cpp

    r189 r210  
    375375}
    376376
     377#if QC_MVHEVC_B0046
     378Void TEncCavlc::codeVPS( TComVPS* pcVPS )
     379{
     380  WRITE_CODE( pcVPS->getVPSId(),               4,        "video_parameter_set_id"     );
     381  WRITE_FLAG( pcVPS->getTemporalNestingFlag() -1,        "temporal_id_nesting_flag"   );
     382  WRITE_CODE( 0,                 2,        "vps_reserved_zero_2bits"    );
     383  WRITE_CODE( pcVPS->getMaxLayers() - 1,       6,        "vps_max_layers_minus1"      );
     384  WRITE_CODE( pcVPS->getMaxTLayers() - 1,      3,        "vps_max_sub_layers_minus1"  );
     385  //to be determined
     386  //profile_tier_level( 1, vps_max_sub_layers_minus1 );
     387  //to be modified
     388  WRITE_CODE( 0,                              12,         "vps_extension_offset"      );
     389  for(UInt i=0; i <= pcVPS->getMaxTLayers()-1; i++)
     390  {
     391    WRITE_UVLC( pcVPS->getMaxDecPicBuffering(i),           "max_dec_pic_buffering[i]" );
     392    WRITE_UVLC( pcVPS->getNumReorderPics(i),               "num_reorder_pics[i]"      );
     393    WRITE_UVLC( pcVPS->getMaxLatencyIncrease(i),           "max_latency_increase[i]"  );
     394  }
     395  //!!!waste one bit: 3-view, 3; 2-view or more views: 1
     396  WRITE_UVLC(pcVPS->getNumHRDParameters(),                 "vps_num_hrd_parameters"   );
     397  assert(pcVPS->getNumHRDParameters()==0);
     398  for ( UInt i = 0; i < pcVPS->getNumHRDParameters(); i ++)
     399  {
     400   //   if( i > 0 ) 
     401    //{
     402    //  WRITE_UVLC (0, "op_num_layer_id_values_minus1[ opIdx ]");
     403    //  for( i = 0; i <= op_num_layer_id_values_minus1[ opIdx ]; i++ ) 
     404    //    WRITE_CODE(0, 6, "op_layer_id[ opIdx ][ i ]");
     405    //} 
     406    //hrd_parameters( i  = =  0, vps_max_sub_layers_minus1 ); 
     407  }
     408  WRITE_CODE( 1,      1,        "bit_equal_to_one" );
     409  //btye aligned
     410  m_pcBitIf->writeAlignOne();
     411
     412  if(pcVPS->getMaxLayers() == 3)
     413    pcVPS->setNumAddiLayerOperationPoints (pcVPS->getMaxLayers());    //may be configured
     414  else
     415    pcVPS->setNumAddiLayerOperationPoints (1);   
     416  pcVPS->setNumAddiProLevelSets         (1);
     417  WRITE_CODE( pcVPS->getNumAddiLayerOperationPoints(),         8,               "num_additional_layer_operation_points" );   
     418  WRITE_CODE( pcVPS->getNumAddiProLevelSets(),                 8,               "num_additional_profile_level_sets"     );   
     419  for(UInt i=0; i <= pcVPS->getMaxLayers()-1; i++)
     420  {
     421    WRITE_CODE( 0,         4,               "num_types_zero_4bits[i]" );   
     422    WRITE_CODE( 0,         4,               "type_zero_4bits[i]"      );   
     423    WRITE_CODE( pcVPS->getViewId(i),         8,               "view_id[i]" );   
     424    if(i)
     425    {
     426      WRITE_CODE( pcVPS->getNumDirectRefLayer(i), 6,  "num_direct_ref_layers[ i ]" );   
     427      for (UInt j = 0; j< pcVPS->getNumDirectRefLayer(i); j++)
     428      {
     429        WRITE_CODE( pcVPS->getDirectRefLayerId (i, j), 6,  "ref_layer_id[i][j]" );
     430      }
     431    }
     432  }
     433  for( UInt i=1; i<=pcVPS->getNumAddiProLevelSets(); i++)
     434  {
     435    //profile_tier_level
     436  }
     437  for( UInt i=1; i<= pcVPS->getNumAddiLayerOperationPoints(); i++)
     438  {   
     439    if(pcVPS->getMaxLayers() == 3)
     440    {
     441      pcVPS->setNumOpLayerIdMinus1((i < pcVPS->getNumAddiLayerOperationPoints() ? 1: 2), (i-1));
     442    }
     443    else if( i==1 )
     444    {
     445      assert(pcVPS->getNumAddiLayerOperationPoints()==1);
     446      pcVPS->setNumOpLayerIdMinus1(pcVPS->getMaxLayers()-1, (i-1));
     447    }
     448    WRITE_UVLC( pcVPS->getNumOpLayerIdMinus1(i-1),           "op_num_layer_id_values_minus1[ opIdx ]" );
     449    for(UInt j = 0; j <= pcVPS->getNumOpLayerIdMinus1(i-1); j++ )
     450    {
     451      if(pcVPS->getMaxLayers() == 3 && i== 2 && j==1)
     452        pcVPS->setNumOpLayerId (2, i-1, j);
     453      else
     454        pcVPS->setNumOpLayerId (j, i-1, j);
     455      WRITE_UVLC( pcVPS->getNumOpLayerId(i-1, j),           "op_layer_id[ opIdx ][ i ]" );
     456    }
     457    if (pcVPS->getNumAddiProLevelSets())
     458    {
     459      //profile_level_idx[ i ]
     460    }
     461  }
     462  return;
     463}
     464#else
    377465#if VIDYO_VPS_INTEGRATION
    378466Void TEncCavlc::codeVPS( TComVPS* pcVPS )
     
    419507}
    420508#endif
    421 
     509#endif
    422510#if HHI_MPI
    423511Void TEncCavlc::codeSPS( TComSPS* pcSPS, Bool bIsDepth )
     
    620708#endif
    621709  WRITE_FLAG( 1, "sps_extension_flag" );
    622 
     710#if !QC_MVHEVC_B0046
    623711  WRITE_FLAG( (pcSPS->getNumberOfUsableInterViewRefs() > 0) ? 1 : 0, "interview_refs_present_flag" );
    624712  if( pcSPS->getNumberOfUsableInterViewRefs() > 0 )
     
    719807  }
    720808  WRITE_FLAG( 0, "sps_extension2_flag" );
     809#endif
    721810}
    722811
     
    795884  if (!bEntropySlice)
    796885  {
     886#if QC_MVHEVC_B0046
     887    WRITE_UVLC( 0, "pic_parameter_set_id" );
     888#else
    797889    WRITE_UVLC( pcSlice->getPPS()->getPPSId(), "pic_parameter_set_id" );
     890#endif
    798891#if H0388
    799892    if( pcSlice->getPPS()->getOutputFlagPresentFlag() )
     
    802895    }
    803896#endif
     897#if QC_REM_IDV_B0046
     898    if(pcSlice->getNalUnitType()==NAL_UNIT_CODED_SLICE_IDR && pcSlice->getViewId() == 0)
     899#else
    804900    if(pcSlice->getNalUnitType()==NAL_UNIT_CODED_SLICE_IDR)
     901#endif
    805902    {
    806903      WRITE_UVLC( 0, "idr_pic_id" );
     
    810907    {
    811908      WRITE_CODE( (pcSlice->getPOC()-pcSlice->getLastIDR()+(1<<pcSlice->getSPS()->getBitsForPOC()))%(1<<pcSlice->getSPS()->getBitsForPOC()), pcSlice->getSPS()->getBitsForPOC(), "pic_order_cnt_lsb");
     909#if QC_REM_IDV_B0046
     910      if( pcSlice->getPOC() == 0 && !(pcSlice->getSPS()->getViewId() && (pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA)))
     911#else
    812912      if( pcSlice->getPOC() == 0 && pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_IDV )
     913#endif
    813914      {
    814915        TComReferencePictureSet* rps = pcSlice->getRPS();
  • trunk/source/Lib/TLibEncoder/TEncCavlc.h

    r189 r210  
    114114  UInt  getCoeffCost          ()                { return  m_uiCoeffCost;  }
    115115 
    116 #if VIDYO_VPS_INTEGRATION
     116#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    117117  Void  codeVPS                 ( TComVPS* pcVPS );
    118118#endif
  • trunk/source/Lib/TLibEncoder/TEncCfg.h

    r189 r210  
    183183  Int       m_iSearchRange;                     //  0:Full frame
    184184  Int       m_bipredSearchRange;
    185 
     185#if DV_V_RESTRICTION_B0037
     186  Bool      m_bUseDisparitySearchRangeRestriction;
     187  Int       m_iVerticalDisparitySearchRange;
     188#endif
    186189  //====== Quality control ========
    187190  Int       m_iMaxDeltaQP;                      //  Max. absolute delta QP (1:default)
     
    307310#endif
    308311
    309 #if VIDYO_VPS_INTEGRATION
     312#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    310313  UInt     m_layerId;
    311314#endif
     
    322325#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    323326  Bool     m_bUseDMM;
     327#endif
     328
     329#if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER_M23723
     330  Bool m_bUseDMM34;
    324331#endif
    325332
     
    468475  Void      setSearchRange                  ( Int   i )      { m_iSearchRange = i; }
    469476  Void      setBipredSearchRange            ( Int   i )      { m_bipredSearchRange = i; }
    470 
     477#if DV_V_RESTRICTION_B0037
     478  Void      setUseDisparitySearchRangeRestriction ( Bool   b )      { m_bUseDisparitySearchRangeRestriction = b; }
     479  Void      setVerticalDisparitySearchRange ( Int   i )      { m_iVerticalDisparitySearchRange = i; }
     480#endif
    471481#if HHI_INTER_VIEW_MOTION_PRED
    472482  UInt      getMultiviewMvRegMode           ()      { return  m_uiMultiviewMvRegMode; }
     
    559569  Int       getFastSearch                   ()      { return  m_iFastSearch; }
    560570  Int       getSearchRange                  ()      { return  m_iSearchRange; }
    561 
     571#if DV_V_RESTRICTION_B0037
     572  Bool      getUseDisparitySearchRangeRestriction ()      { return  m_bUseDisparitySearchRangeRestriction; }
     573  Int       getVerticalDisparitySearchRange ()      { return  m_iVerticalDisparitySearchRange; }
     574#endif
    562575#if HHI_VSO
    563576  //==== VSO  ==========
     
    820833  Int       getTSIG()                            { return m_signHidingThreshold; }
    821834#endif
    822 #if VIDYO_VPS_INTEGRATION
     835#if VIDYO_VPS_INTEGRATION |QC_MVHEVC_B0046
    823836  Void      setLayerId             ( UInt layerId )   { m_layerId = layerId; }
    824837  UInt      getLayerId             ()               { return m_layerId; }
     
    833846  Void      setUseDMM( Bool b) { m_bUseDMM = b;    }
    834847  Bool      getUseDMM()        { return m_bUseDMM; }
     848#endif
     849
     850#if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER_M23723
     851  Void setUseDMM34( Bool b) { m_bUseDMM34 = b;    }
     852  Bool getUseDMM34()        { return m_bUseDMM34; }
    835853#endif
    836854
  • trunk/source/Lib/TLibEncoder/TEncEntropy.cpp

    r189 r210  
    121121}
    122122
    123 #if VIDYO_VPS_INTEGRATION
     123#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    124124Void TEncEntropy::encodeVPS( TComVPS* pcVPS )
    125125{
     
    129129#endif
    130130
    131 #if VIDYO_VPS_INTEGRATION
     131#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    132132Void  codeVPS                 ( TComVPS* pcVPS );
    133133#endif
  • trunk/source/Lib/TLibEncoder/TEncEntropy.h

    r189 r210  
    7676  virtual UInt  getCoeffCost          ()                = 0;
    7777
    78 #if VIDYO_VPS_INTEGRATION
     78#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    7979  virtual Void  codeVPS                 ( TComVPS* pcVPS )                                      = 0;
    8080#endif
     
    242242 
    243243public:
    244 #if VIDYO_VPS_INTEGRATION
     244#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    245245  Void encodeVPS               ( TComVPS* pcVPS);
    246246#endif
  • trunk/source/Lib/TLibEncoder/TEncGOP.cpp

    r189 r210  
    246246
    247247      std::vector<TComAPS>& vAPS = m_pcEncTop->getAPS();
    248 #if VIDYO_VPS_INTEGRATION
     248#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    249249    m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, uiPOCCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getEncTop()->getVPS(), m_pcEncTop->getSPS(), m_pcEncTop->getPPS() );
    250250#else
     
    298298      if( pcSlice->getSliceType() == B_SLICE )
    299299      {
    300         if( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); }
    301       }
     300#if QC_REM_IDV_B0046
     301      if( m_pcCfg->getGOPEntry(pcSlice->getSPS()->getViewId() && ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA))? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); }
     302#else
     303      if( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); }
     304#endif
     305    }
    302306
    303307      // Set the nal unit type
     
    332336#endif
    333337
     338#if !QC_REM_IDV_B0046
    334339      pcSlice->setNumRefIdx( REF_PIC_LIST_0, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs()) ) );
    335340      pcSlice->setNumRefIdx( REF_PIC_LIST_1, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs()) ) );
    336 
    337       TComRefPicListModification* refPicListModification = pcSlice->getRefPicListModification();
    338       refPicListModification->setRefPicListModificationFlagL0( false );
     341#else
     342
     343    Bool bNalRAP = ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR)) && (pcSlice->getSPS()->getViewId())  ? 1: 0;
     344    pcSlice->setNumRefIdx( REF_PIC_LIST_0, min( m_pcCfg->getGOPEntry( bNalRAP ? MAX_GOP : iGOPid ).m_numRefPicsActive, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs()) ) );
     345    pcSlice->setNumRefIdx( REF_PIC_LIST_1, min( m_pcCfg->getGOPEntry( bNalRAP ? MAX_GOP : iGOPid ).m_numRefPicsActive, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs()) ) );
     346#endif
     347    TComRefPicListModification* refPicListModification = pcSlice->getRefPicListModification();
     348    refPicListModification->setRefPicListModificationFlagL0( false );
    339349#if !H0137_0138_LIST_MODIFICATION
    340350      refPicListModification->setNumberOfRefPicListModificationsL0(0);
     
    353363      assert( tAppEncTop != NULL );
    354364
     365
     366#if FLEX_CODING_ORDER_M23723
     367      TComPic * pcTexturePic;
     368      if(m_pcEncTop->getIsDepth() == 1)
     369      {
     370        TComPicYuv * recText;
     371        recText = tAppEncTop->getPicYuvFromView(m_pcEncTop->getViewId(), pcSlice->getPOC(), false ,true);
     372        if(recText == NULL)
     373        {
     374           pcSlice->setTexturePic(NULL);
     375        }
     376        else
     377        {
     378           pcTexturePic = m_pcEncTop->getIsDepth() ? tAppEncTop->getPicFromView( m_pcEncTop->getViewId(), pcSlice->getPOC(), false ) : NULL;
     379           pcSlice->setTexturePic( pcTexturePic );
     380        }
     381      }
     382      else
     383    {
     384        pcTexturePic = m_pcEncTop->getIsDepth() ? tAppEncTop->getPicFromView( m_pcEncTop->getViewId(), pcSlice->getPOC(), false ) : NULL;
     385        assert( !m_pcEncTop->getIsDepth() || pcTexturePic != NULL );
     386          pcSlice->setTexturePic( pcTexturePic );
     387      }
     388
     389#else
    355390      TComPic * const pcTexturePic = m_pcEncTop->getIsDepth() ? tAppEncTop->getPicFromView( m_pcEncTop->getViewId(), pcSlice->getPOC(), false ) : NULL;
    356391      assert( !m_pcEncTop->getIsDepth() || pcTexturePic != NULL );
    357392      pcSlice->setTexturePic( pcTexturePic );
    358393
     394#endif
    359395      std::vector<TComPic*> apcInterViewRefPics = tAppEncTop->getInterViewRefPics( m_pcEncTop->getViewId(), pcSlice->getPOC(), m_pcEncTop->getIsDepth(), pcSlice->getSPS() );
    360396      pcSlice->setRefPicListMvc( rcListPic, apcInterViewRefPics );
     
    363399      if( pcSlice->getSliceType() == B_SLICE )
    364400      {
     401#if !QC_REM_IDV_B0046
    365402        if( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); }
     403#else
     404      Bool bRAP = ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR)) && (pcSlice->getSPS()->getViewId())  ? 1: 0;
     405      if( m_pcCfg->getGOPEntry( bRAP ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); }
     406#endif
    366407      }
    367408     
     
    451492
    452493#if SAIT_VSO_EST_A0033
    453     m_pcRdCost->setVideoRecPicYuv( m_pcEncTop->getEncTop()->getPicYuvFromView( pcSlice->getViewId(), pcSlice->getPOC(), false, true ) );
    454     m_pcRdCost->setDepthPicYuv   ( m_pcEncTop->getEncTop()->getPicYuvFromView( pcSlice->getViewId(), pcSlice->getPOC(), true, false ) );
     494#ifdef FLEX_CODING_ORDER_M23723   
     495{
     496  Bool flagRec;
     497  flagRec =  ((m_pcEncTop->getEncTop()->getPicYuvFromView( pcSlice->getViewId(), pcSlice->getPOC(), false, true) == NULL) ? false: true);
     498  m_pcRdCost->setVideoRecPicYuv( m_pcEncTop->getEncTop()->getPicYuvFromView( pcSlice->getViewId(), pcSlice->getPOC(), false, flagRec ) );
     499  m_pcRdCost->setDepthPicYuv   ( m_pcEncTop->getEncTop()->getPicYuvFromView( pcSlice->getViewId(), pcSlice->getPOC(), true, false ) );
     500}
     501#else
     502  m_pcRdCost->setVideoRecPicYuv( m_pcEncTop->getEncTop()->getPicYuvFromView( pcSlice->getViewId(), pcSlice->getPOC(), false, true ) );
     503  m_pcRdCost->setDepthPicYuv   ( m_pcEncTop->getEncTop()->getPicYuvFromView( pcSlice->getViewId(), pcSlice->getPOC(), true, false ) );
     504#endif
    455505#endif
    456506#if LGE_WVSO_A0119
     
    830880      if ( m_bSeqFirst )
    831881      {
    832 #if VIDYO_VPS_INTEGRATION
     882#if QC_MVHEVC_B0046
     883      if(!m_pcEncTop->getLayerId())
     884      {
     885#endif
     886#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    833887        {
    834888          OutputNALUnit nalu(NAL_UNIT_VPS, true, m_pcEncTop->getLayerId());
     
    840894#endif
    841895#if NAL_REF_FLAG
    842 #if VIDYO_VPS_INTEGRATION
     896#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    843897        OutputNALUnit nalu(NAL_UNIT_SPS, true, m_pcEncTop->getLayerId());
    844898#else
     
    861915
    862916#if NAL_REF_FLAG
    863 #if VIDYO_VPS_INTEGRATION
     917#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
     918#if QC_MVHEVC_B0046
    864919        nalu = NALUnit(NAL_UNIT_PPS, true, m_pcEncTop->getLayerId());
     920#else
     921        nalu = NALUnit(NAL_UNIT_PPS, true, m_pcEncTop->getLayerId());
     922#endif
    865923#else
    866924        nalu = NALUnit(NAL_UNIT_PPS, true, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth());
     
    873931        writeRBSPTrailingBits(nalu.m_Bitstream);
    874932        accessUnit.push_back(new NALUnitEBSP(nalu));
    875 
    876         m_bSeqFirst = false;
    877       }
     933#if QC_MVHEVC_B0046
     934      }
     935#endif
     936      m_bSeqFirst = false;
     937    }
    878938
    879939      /* use the main bitstream buffer for storing the marshalled picture */
     
    9931053#if NAL_REF_FLAG
    9941054        OutputNALUnit nalu( pcSlice->getNalUnitType(), pcSlice->isReferenced(),
    995 #if !VIDYO_VPS_INTEGRATION
     1055#if !VIDYO_VPS_INTEGRATION &!QC_MVHEVC_B0046
    9961056                           m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth(), pcSlice->getTLayer() );
    9971057#else
     
    14691529          {
    14701530#if NAL_REF_FLAG
    1471 #if VIDYO_VPS_INTEGRATION
     1531#if VIDYO_VPS_INTEGRATION | QC_MVHEVC_B0046
    14721532            OutputNALUnit nalu(NAL_UNIT_APS, true, m_pcEncTop->getLayerId());
    14731533#else
     
    15351595
    15361596#if NAL_REF_FLAG
    1537 #if VIDYO_VPS_INTEGRATION
     1597#if VIDYO_VPS_INTEGRATION | QC_MVHEVC_B0046
    15381598        OutputNALUnit nalu(NAL_UNIT_SEI, false, m_pcEncTop->getLayerId());
    15391599#else
     
    19732033  case NAL_UNIT_CODED_SLICE: return "SLICE";
    19742034#if H0566_TLA
     2035#if !QC_REM_IDV_B0046
    19752036  case NAL_UNIT_CODED_SLICE_IDV: return "IDV";
     2037#endif
    19762038  case NAL_UNIT_CODED_SLICE_CRA: return "CRA";
    19772039  case NAL_UNIT_CODED_SLICE_TLA: return "TLA";
     
    21882250    if( bInterViewOnlySlice )
    21892251    {
     2252#if !QC_REM_IDV_B0046
    21902253      return NAL_UNIT_CODED_SLICE_IDV;
     2254#else
     2255      return NAL_UNIT_CODED_SLICE_IDR;
     2256#endif
    21912257    }
    21922258    else
     
    22012267      if( bInterViewOnlySlice )
    22022268      {
     2269#if !QC_REM_IDV_B0046
    22032270        return NAL_UNIT_CODED_SLICE_IDV;
     2271#else
     2272        return NAL_UNIT_CODED_SLICE_CRA;
     2273#endif
    22042274      }
    22052275      else
     
    22162286      if( bInterViewOnlySlice )
    22172287      {
     2288#if !QC_REM_IDV_B0046
    22182289        return NAL_UNIT_CODED_SLICE_IDV;
     2290#else
     2291        return NAL_UNIT_CODED_SLICE_IDR;
     2292#endif
    22192293      }
    22202294      else
     
    24542528
    24552529  // analyze inter-view modifications
     2530#if !QC_REM_IDV_B0046
    24562531  GOPEntryMvc gem = m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid );
     2532#else
     2533  Bool bRAP = ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA)) && (pcSlice->getSPS()->getViewId()) ? 1:0;
     2534  GOPEntryMvc gem = m_pcCfg->getGOPEntry( bRAP ? MAX_GOP : iGOPid );
     2535#endif
    24572536  Int numL0Modifications = 0;
    24582537  Int numL1Modifications = 0;
  • trunk/source/Lib/TLibEncoder/TEncSbac.cpp

    r189 r210  
    396396}
    397397
    398 #if VIDYO_VPS_INTEGRATION
     398#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    399399Void TEncSbac::codeVPS( TComVPS* pcVPS )
    400400{
     
    10761076#endif
    10771077#if HHI_DMM_PRED_TEX
     1078
     1079#if FLEX_CODING_ORDER_M23723
     1080    if ( !pcCU->getSlice()->getSPS()->getUseDMM34() )
     1081    {
     1082      assert( uiDir != DMM_WEDGE_PREDTEX_D_IDX );
     1083      assert( uiDir != DMM_CONTOUR_PREDTEX_D_IDX );
     1084    }
     1085#endif
     1086
    10781087    if( uiDir == DMM_WEDGE_PREDTEX_D_IDX )     { xCodeWedgePredTexDeltaInfo  ( pcCU, uiAbsPartIdx ); }
    10791088    if( uiDir == DMM_CONTOUR_PREDTEX_D_IDX )   { xCodeContourPredTexDeltaInfo( pcCU, uiAbsPartIdx ); }
  • trunk/source/Lib/TLibEncoder/TEncSbac.h

    r189 r210  
    9898  //--SBAC RD
    9999
    100 #if VIDYO_VPS_INTEGRATION
     100#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    101101  Void  codeVPS                 ( TComVPS* pcVPS );
    102102#endif
  • trunk/source/Lib/TLibEncoder/TEncSearch.cpp

    r189 r210  
    160160                      Int           iSearchRange,
    161161                      Int           bipredSearchRange,
     162#if DV_V_RESTRICTION_B0037
     163                      Bool          bUseDisparitySearchRangeRestriction,
     164                      Int           iVerticalDisparitySearchRange,
     165#endif
    162166                      Int           iFastSearch,
    163167                      Int           iMaxDeltaQP,
     
    172176  m_iSearchRange         = iSearchRange;
    173177  m_bipredSearchRange    = bipredSearchRange;
     178#if DV_V_RESTRICTION_B0037
     179  m_bUseDisparitySearchRangeRestriction = bUseDisparitySearchRangeRestriction;
     180  m_iVerticalDisparitySearchRange = iVerticalDisparitySearchRange;
     181#endif
    174182  m_iFastSearch          = iFastSearch;
    175183  m_iMaxDeltaQP          = iMaxDeltaQP;
     
    22362244#endif
    22372245#if HHI_DMM_PRED_TEX
     2246     
     2247#if FLEX_CODING_ORDER_M23723
     2248      if ( pcCU->getSlice()->getSPS()->getUseDMM34() )
     2249      {
     2250#endif
    22382251      UInt uiTexTabIdx  = 0;
    22392252      Int  iTexDeltaDC1 = 0;
     
    22592272        uiRdModeList[ numModesForFullRD++ ] = DMM_CONTOUR_PREDTEX_D_IDX;
    22602273      }
     2274#if FLEX_CODING_ORDER_M23723
     2275      }
     2276#endif
    22612277#endif
    22622278    }
     
    23032319
    23042320#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     2321#if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER_M23723
     2322      if( m_pcEncCfg->getIsDepth() && !predIntraLumaDMMAvailable( uiOrgMode, uiWidth, uiHeight, pcCU->getSlice()->getSPS()->getUseDMM34() )
     2323#if LGE_EDGE_INTRA_A0070
     2324        && uiOrgMode < EDGE_INTRA_IDX
     2325#endif
     2326        )
     2327
     2328#else
     2329
    23052330      if( m_pcEncCfg->getIsDepth() && !predIntraLumaDMMAvailable( uiOrgMode, uiWidth, uiHeight )
    23062331#if LGE_EDGE_INTRA_A0070
     
    23082333#endif
    23092334        )
     2335#endif
    23102336      {
    23112337        continue;
     
    42144240  TComYuv*      pcYuv = pcYuvOrg;
    42154241  m_iSearchRange = m_aaiAdaptSR[eRefPicList][iRefIdxPred];
    4216  
     4242
    42174243  Int           iSrchRng      = ( bBi ? m_bipredSearchRange : m_iSearchRange );
     4244#if DV_V_RESTRICTION_B0037
     4245  Int           iVerDispSrchRng = m_iVerticalDisparitySearchRange; 
     4246#endif
    42184247  TComPattern*  pcPatternKey  = pcCU->getPattern        ();
    42194248 
     
    42524281 
    42534282  TComMv      cMvPred = *pcMvPred;
    4254  
     4283
     4284#if DV_V_RESTRICTION_B0037
     4285  Bool bMv_VRng_Restricted = false;
     4286  if( pcCU->getSlice()->getViewId() > 0
     4287      &&
     4288      pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->getPOC() == pcCU->getSlice()->getPOC()
     4289      &&
     4290      m_bUseDisparitySearchRangeRestriction
     4291     )
     4292  {
     4293      bMv_VRng_Restricted = true;
     4294  }
     4295#endif
     4296
     4297#if DV_V_RESTRICTION_B0037
     4298  if ( bBi )  xSetSearchRange   ( pcCU, rcMv   , iSrchRng, cMvSrchRngLT, cMvSrchRngRB, bMv_VRng_Restricted, iVerDispSrchRng );
     4299  else        xSetSearchRange   ( pcCU, cMvPred, iSrchRng, cMvSrchRngLT, cMvSrchRngRB, bMv_VRng_Restricted, iVerDispSrchRng );
     4300#else
    42554301  if ( bBi )  xSetSearchRange   ( pcCU, rcMv   , iSrchRng, cMvSrchRngLT, cMvSrchRngRB );
    42564302  else        xSetSearchRange   ( pcCU, cMvPred, iSrchRng, cMvSrchRngLT, cMvSrchRngRB );
    4257  
     4303#endif
     4304
    42584305  m_pcRdCost->getMotionCost ( 1, 0 );
    42594306 
     
    42804327    if( bMultiviewReg && !bBi )
    42814328    {
     4329#if DV_V_RESTRICTION_B0037
     4330      xSetSearchRange( pcCU, cOrgDepthMapMv, iSrchRng, cMvSrchRngLT, cMvSrchRngRB, bMv_VRng_Restricted, iVerDispSrchRng  );
     4331#else
    42824332      xSetSearchRange( pcCU, cOrgDepthMapMv, iSrchRng, cMvSrchRngLT, cMvSrchRngRB );
    4283     }
    4284   }
    4285 #endif
    4286 
     4333#endif
     4334    }
     4335  }
     4336#endif
     4337#if QC_MVHEVC_B0046
     4338  m_pcRdCost->setMultiviewReg( 0 );
     4339#endif
    42874340  setWpScalingDistParam( pcCU, iRefIdxPred, eRefPicList );
    42884341  //  Do integer search
     
    43304383}
    43314384
    4332 
     4385#if DV_V_RESTRICTION_B0037
     4386Void TEncSearch::xSetSearchRange ( TComDataCU* pcCU, TComMv& cMvPred, Int iSrchRng, TComMv& rcMvSrchRngLT, TComMv& rcMvSrchRngRB, Bool bMv_VRng_Restricted, Int iVerDispSrchRng )
     4387#else
    43334388Void TEncSearch::xSetSearchRange ( TComDataCU* pcCU, TComMv& cMvPred, Int iSrchRng, TComMv& rcMvSrchRngLT, TComMv& rcMvSrchRngRB )
     4389#endif
    43344390{
    43354391  Int  iMvShift = 2;
     
    43464402  rcMvSrchRngRB.setHor( cTmpMvPred.getHor() + (iSrchRng << iMvShift) );
    43474403  rcMvSrchRngRB.setVer( cTmpMvPred.getVer() + (iSrchRng << iMvShift) );
     4404
     4405#if DV_V_RESTRICTION_B0037
     4406  if ( bMv_VRng_Restricted ) {
     4407    Int iRestrictMvVrange = ( iVerDispSrchRng ) << iMvShift;   
     4408    if ( rcMvSrchRngRB.getVer() >= iRestrictMvVrange  ){
     4409      rcMvSrchRngRB.setVer( iRestrictMvVrange );
     4410    }
     4411    //restrict minus vector too
     4412    if ( rcMvSrchRngLT.getVer() <= -iRestrictMvVrange ){
     4413      rcMvSrchRngLT.setVer( -iRestrictMvVrange );
     4414    }
     4415  }
     4416#endif
    43484417  pcCU->clipMv        ( rcMvSrchRngLT );
    43494418  pcCU->clipMv        ( rcMvSrchRngRB );
     
    64156484
    64166485#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     6486#if ((HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX)&&FLEX_CODING_ORDER_M23723)
     6487Bool TEncSearch::predIntraLumaDMMAvailable( UInt uiMode, UInt uiWidth, UInt uiHeight, Bool bDMMAvailable34 )
     6488#else
    64176489Bool TEncSearch::predIntraLumaDMMAvailable( UInt uiMode, UInt uiWidth, UInt uiHeight )
     6490#endif
    64186491{
    64196492  if( uiMode < NUM_INTRA_MODE ) return true;
     
    64436516      bDMMAvailable = false;
    64446517    }
     6518
     6519#if FLEX_CODING_ORDER_M23723
     6520    if ( !bDMMAvailable34 )
     6521    {
     6522      bDMMAvailable = false;
     6523    }
     6524#endif
     6525
    64456526  }
    64466527#endif
  • trunk/source/Lib/TLibEncoder/TEncSearch.h

    r189 r210  
    9494  Int             m_iSearchRange;
    9595  Int             m_bipredSearchRange; // Search range for bi-prediction
     96#if DV_V_RESTRICTION_B0037
     97  Bool            m_bUseDisparitySearchRangeRestriction;
     98  Int             m_iVerticalDisparitySearchRange;
     99#endif
    96100  Int             m_iFastSearch;
    97101  Int             m_aaiAdaptSR[2][33];
     
    132136            Int           iSearchRange,
    133137            Int           bipredSearchRange,
     138#if DV_V_RESTRICTION_B0037
     139            Bool          bUseDisparitySearchRangeRestriction,
     140            Int           iVerticalDisparitySearchRange,
     141#endif
    134142            Int           iFastSearch,
    135143            Int           iMaxDeltaQP,
     
    325333
    326334#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     335
    327336  Bool predIntraLumaDMMAvailable  ( UInt           uiMode,
    328337                                    UInt           uiWidth,
    329                                     UInt           uiHeight );
     338#if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER_M23723
     339                                    UInt         uiHeight,
     340                                    Bool         bDMMAvailable34 );
     341#else
     342                                    UInt         uiHeight );
     343#endif
     344
    330345  Void xGetWedgeDeltaDCsMinDist   ( TComWedgelet*  pcWedgelet,
    331346                                    TComDataCU*    pcCU,
     
    523538                                    UInt&         ruiSAD );
    524539 
     540#if DV_V_RESTRICTION_B0037
     541  Void xSetSearchRange            ( TComDataCU*   pcCU,
     542                                    TComMv&       cMvPred,
     543                                    Int           iSrchRng,
     544                                    TComMv&       rcMvSrchRngLT,
     545                                    TComMv&       rcMvSrchRngRB,
     546                                    Bool          bDispSrchRngRst,
     547                                    Int           iDispVerSrchRng );
     548#else
    525549  Void xSetSearchRange            ( TComDataCU*   pcCU,
    526550                                    TComMv&       cMvPred,
     
    528552                                    TComMv&       rcMvSrchRngLT,
    529553                                    TComMv&       rcMvSrchRngRB );
     554#endif
    530555 
    531556  Void xPatternSearchFast         ( TComDataCU*   pcCU,
  • trunk/source/Lib/TLibEncoder/TEncSlice.cpp

    r189 r210  
    162162 \param pPPS          PPS associated with the slice
    163163 */
    164 #if VIDYO_VPS_INTEGRATION
     164#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    165165Void TEncSlice::initEncSlice( TComPic* pcPic, Int iPOCLast, UInt uiPOCCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComVPS * pVPS, TComSPS* pSPS, TComPPS *pPPS )
    166166#else
     
    172172 
    173173  rpcSlice = pcPic->getSlice(0);
    174 #if VIDYO_VPS_INTEGRATION
     174#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    175175  rpcSlice->setVPS( pVPS );
    176176#endif
     
    820820  UInt uiTileStartLCU = 0;
    821821  UInt uiTileLCUX     = 0;
    822 
     822#if !QC_MVHEVC_B0046
    823823  Int iLastPosY = -1;
    824 
     824#endif
    825825  // for every CU in slice
    826826  UInt uiEncCUOrder;
     
    833833    TComDataCU*& pcCU = rpcPic->getCU( uiCUAddr );
    834834    pcCU->initCU( rpcPic, uiCUAddr );
    835 
     835#if !QC_MVHEVC_B0046
    836836    if ( m_pcRdCost->getUseRenModel() )
    837837    {
     
    847847      }
    848848    }   
    849 
     849#endif
    850850    // inherit from TR if necessary, select substream to use.
    851851    if( m_pcCfg->getUseSBACRD() )
  • trunk/source/Lib/TLibEncoder/TEncSlice.h

    r189 r210  
    110110 
    111111  /// preparation of slice encoding (reference marking, QP and lambda)
    112 #if VIDYO_VPS_INTEGRATION
     112#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    113113  Void    initEncSlice        ( TComPic*  pcPic, Int iPOCLast, UInt uiPOCCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS );
    114114#else
  • trunk/source/Lib/TLibEncoder/TEncTop.cpp

    r189 r210  
    375375 
    376376  // initialize encoder search class
     377#if DV_V_RESTRICTION_B0037
     378  m_cSearch.init( this, &m_cTrQuant, m_iSearchRange, m_bipredSearchRange, m_bUseDisparitySearchRangeRestriction, m_iVerticalDisparitySearchRange, m_iFastSearch, 0, &m_cEntropyCoder, &m_cRdCost, getRDSbacCoder(), getRDGoOnSbacCoder() );
     379#else
    377380  m_cSearch.init( this, &m_cTrQuant, m_iSearchRange, m_bipredSearchRange, m_iFastSearch, 0, &m_cEntropyCoder, &m_cRdCost, getRDSbacCoder(), getRDGoOnSbacCoder() );
    378 
     381#endif
    379382  if(m_bUseALF)
    380383  {
     
    766769  m_cSPS.setUseDMM( m_bUseDMM );
    767770#endif
     771
     772#if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER_M23723
     773  m_cSPS.setUseDMM34( m_bUseDMM34 );
     774#endif
     775
    768776#if OL_QTLIMIT_PREDCODING_B0068
    769777  m_cSPS.setUseQTLPC( m_bUseQTLPC );
     
    785793  else
    786794  {
     795#if QC_MVHEVC_B0046
     796    m_cSPS.initMultiviewSPS   ( m_viewId);
     797#else
    787798    m_cSPS.initMultiviewSPS           ( m_viewId, m_iViewOrderIdx, m_uiCamParPrecision, m_bCamParInSliceHeader, m_aaiCodedScale, m_aaiCodedOffset );
     799#endif
    788800    if( m_viewId )
    789801    {
     
    9931005Void TEncTop::selectReferencePictureSet(TComSlice* slice, Int POCCurr, Int GOPid,TComList<TComPic*>& listPic )
    9941006{
     1007#if QC_REM_IDV_B0046
     1008  if( (slice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR ||slice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA) && slice->getSPS()->getViewId() && POCCurr == 0 )
     1009#else
    9951010  if( slice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV && POCCurr == 0 )
     1011#endif
    9961012  {
    9971013    TComReferencePictureSet* rps = slice->getLocalRPS();
  • trunk/source/Lib/TLibExtractor/TExtrTop.cpp

    r100 r210  
    5555Bool TExtrTop::extract( InputNALUnit& nalu, std::set<UInt>& rsuiExtractLayerIds )
    5656{
    57 #if VIDYO_VPS_INTEGRATION
     57#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    5858  //extraction now has to be done using layer_id
    5959  UInt uiLayerId = nalu.m_layerId;
     
    6565  m_cEntropyDecoder.setBitstream     ( nalu.m_Bitstream );
    6666 
    67 #if VIDYO_VPS_INTEGRATION
     67#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    6868  if ( nalu.m_nalUnitType == NAL_UNIT_VPS )
    6969  {
  • trunk/source/Lib/TLibExtractor/TExtrTop.h

    r77 r210  
    5454{
    5555private:
    56 #if VIDYO_VPS_INTEGRATION
     56#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    5757  TComVPS                 m_cVPS;
    5858#endif
  • trunk/source/Lib/TLibRenderer/TRenModSetupStrParser.cpp

    r100 r210  
    3636#include "TRenFilter.h"
    3737#include "TRenModSetupStrParser.h"
    38 
     38#if !QC_MVHEVC_B0046
    3939Int
    4040TRenModSetupStrParser::getNumOfModels()
     
    450450  rcNextChar = m_pchSetStr[iPos];
    451451}
     452#endif
     453
  • trunk/source/Lib/TLibRenderer/TRenModSetupStrParser.h

    r56 r210  
    3131 * THE POSSIBILITY OF SUCH DAMAGE.
    3232 */
    33 
     33#if !QC_MVHEVC_B0046
    3434#ifndef __TRENMODSETUPSTRPARSER__
    3535#define __TRENMODSETUPSTRPARSER__
     
    127127
    128128#endif //__TRENMODEL__
     129#endif
     130
  • trunk/source/Lib/TLibRenderer/TRenModel.cpp

    r189 r210  
    3535#include "TRenFilter.h"
    3636#include "TRenModel.h"
    37 
     37#if !QC_MVHEVC_B0046
    3838///////////  TRENMODEL //////////////////////
    3939TRenModel::TRenModel()
     
    697697  }
    698698}
     699#endif
     700
  • trunk/source/Lib/TLibRenderer/TRenModel.h

    r189 r210  
    3232 */
    3333
    34 
     34#if !QC_MVHEVC_B0046
    3535#ifndef __TRENMODEL__
    3636#define __TRENMODEL__
     
    156156
    157157#endif //__TRENMODEL__
     158#endif
     159
  • trunk/source/Lib/TLibRenderer/TRenSingleModel.cpp

    r189 r210  
    3636#include "TRenSingleModel.h"
    3737
     38#if !QC_MVHEVC_B0046
    3839////////////// TRENSINGLE MODEL ///////////////
    3940template <BlenMod iBM, Bool bBitInc>
     
    19561957}
    19571958#endif
     1959#endif
     1960
  • trunk/source/Lib/TLibRenderer/TRenSingleModel.h

    r189 r210  
    3232 */
    3333
    34 
    35 #ifndef __TRENSINGLEMODEL__
     34#if !QC_MVHEVC_B0046
     35#ifndef __TRENSINGLEMODEL__ 
    3636#define __TRENSINGLEMODEL__
    3737
     
    391391
    392392#endif //__TRENSINGLEMODEL__
     393#endif
     394
Note: See TracChangeset for help on using the changeset viewer.