Changeset 194 in 3DVCSoftware


Ignore:
Timestamp:
26 Nov 2012, 18:35:20 (12 years ago)
Author:
qualcomm
Message:

JCT3V-B0046, MVHEVC codec;
Two bugs fixed for HTM:
1) encoder crash, see the macro 'BUG_FIX_HTM'
2) wrong place for '#endif' in TComPrediction.h

Location:
branches/HTM-5.0-Qualcomm/source
Files:
53 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-5.0-Qualcomm/source/App/TAppDecoder/TAppDecTop.cpp

    r189 r194  
    8282Void TAppDecTop::decode()
    8383{
    84 #if VIDYO_VPS_INTEGRATION
     84#if VIDYO_VPS_INTEGRATION|MVHEVC
    8585  increaseNumberOfViews( 0, 0, 0 );
    8686#else
     
    145145    {
    146146      read(nalu, nalUnit);
     147#if MVHEVC
     148    viewDepthId = nalu.m_layerId;
     149    Int depth = 0;
     150    Int viewId = viewDepthId;
     151#else
    147152#if VIDYO_VPS_INTEGRATION
    148153      Int viewId = 0;
     
    162167      viewDepthId = viewId * 2 + depth;   // coding order T0D0T1D1T2D2
    163168#endif
    164       
     169#endif     
    165170      newPicture[viewDepthId] = false;
    166171      if( viewDepthId >= m_tDecTop.size() )     
    167172      {
    168 #if VIDYO_VPS_INTEGRATION
     173#if VIDYO_VPS_INTEGRATION|MVHEVC
    169174        increaseNumberOfViews( viewDepthId, viewId, depth );
    170175#else
     
    195200      if( !(m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) )
    196201      {
     202#if MVHEVC
     203        if(viewDepthId && m_tDecTop[viewDepthId]->m_bFirstNal== false)
     204        {
     205          m_tDecTop[viewDepthId]->m_bFirstNal = true;
     206          ParameterSetManagerDecoder* pDecV0 = m_tDecTop[0]->xGetParaSetDec();
     207          m_tDecTop[viewDepthId]->xCopyVPS(pDecV0->getPrefetchedVPS(0));
     208          m_tDecTop[viewDepthId]->xCopySPS(pDecV0->getPrefetchedSPS(0));
     209          m_tDecTop[viewDepthId]->xCopyPPS(pDecV0->getPrefetchedPPS(0));
     210        }
     211#endif
    197212        newPicture[viewDepthId] = m_tDecTop[viewDepthId]->decode(nalu, m_iSkipFrame, m_pocLastDisplay[viewDepthId]);
    198213        if (newPicture[viewDepthId])
     
    218233    if( pcListPic[viewDepthId] )
    219234    {
     235#if QC_REM_IDV
     236      Int iviewId = m_tDecTop[viewDepthId]->getViewId();
     237      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)) )
     238#else
    220239      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)) )
     240#endif
    221241      {
    222242        xFlushOutput( pcListPic[viewDepthId], viewDepthId );
     
    275295        m_tDecTop[viewDepthIdx]->destroy() ;
    276296      }
     297#if MVHEVC
     298      if(viewDepthIdx)
     299      {
     300         //Call clear function to remove the record, which has been freed during viewDepthIdx = 0 case.
     301        m_tDecTop[viewDepthIdx]->xGetParaSetDec()->clearSPS();
     302        m_tDecTop[viewDepthIdx]->xGetParaSetDec()->clearVPS();
     303        m_tDecTop[viewDepthIdx]->xGetParaSetDec()->clearPPS();
     304      }
     305#endif
    277306      delete m_tDecTop[viewDepthIdx] ;
    278307      m_tDecTop[viewDepthIdx] = NULL ;
     
    416445  m_pocLastDisplay[viewDepthId] = -MAX_INT;
    417446}
    418 #if VIDYO_VPS_INTEGRATION
     447#if VIDYO_VPS_INTEGRATION|MVHEVC
    419448Void  TAppDecTop::increaseNumberOfViews  ( UInt layerId, UInt viewId, UInt isDepth )
    420449#else
     
    422451#endif
    423452{
    424 #if VIDYO_VPS_INTEGRATION
     453#if VIDYO_VPS_INTEGRATION|MVHEVC
    425454  Int newNumberOfViewDepth = layerId + 1;
    426455#endif
     
    429458    m_outputBitDepth = g_uiBitDepth + g_uiBitIncrement;
    430459  }
    431 #if !VIDYO_VPS_INTEGRATION
     460#if !VIDYO_VPS_INTEGRATION&!MVHEVC
    432461  Int viewId = (newNumberOfViewDepth-1)>>1;   // coding order T0D0T1D1T2D2
    433462  Bool isDepth = ((newNumberOfViewDepth % 2) == 0);  // coding order T0D0T1D1T2D2
     
    442471      m_tVideoIOYuvReconFile.push_back(new TVideoIOYuv);
    443472      Char buffer[4];
    444 #if VIDYO_VPS_INTEGRATION
     473#if VIDYO_VPS_INTEGRATION|MVHEVC
    445474      sprintf(buffer,"_%i", viewId );
    446475#else
     
    448477#endif
    449478      Char* nextFilename = NULL;
    450 #if VIDYO_VPS_INTEGRATION
     479#if VIDYO_VPS_INTEGRATION|MVHEVC
    451480      if( isDepth)
    452481#else
     
    463492        xAppendToFileNameEnd( m_pchReconFile, buffer, nextFilename);
    464493      }
    465 #if !VIDYO_VPS_INTEGRATION
     494#if !VIDYO_VPS_INTEGRATION&!MVHEVC
    466495      if( isDepth || ( !isDepth && (m_tVideoIOYuvReconFile.size() % 2) == 1 ) )
    467496#endif
     
    480509  {
    481510    m_tDecTop.push_back(new TDecTop);
    482 #if !VIDYO_VPS_INTEGRATION
     511#if !VIDYO_VPS_INTEGRATION&!MVHEVC
    483512    if( isDepth || ( !isDepth && (m_tVideoIOYuvReconFile.size() % 2) == 1 ) )
    484513    {
     
    490519      m_tDecTop.back()->setPictureDigestEnabled(m_pictureDigestEnabled);
    491520      m_tDecTop.back()->setCamParsCollector( &m_cCamParsCollector );
    492 #if !VIDYO_VPS_INTEGRATION
     521#if !VIDYO_VPS_INTEGRATION&!MVHEVC
    493522    }
    494523#endif
  • branches/HTM-5.0-Qualcomm/source/App/TAppDecoder/TAppDecTop.h

    r100 r194  
    7474  CamParsCollector                m_cCamParsCollector;
    7575#if DEPTH_MAP_GENERATION
    76 #if VIDYO_VPS_INTEGRATION
     76#if VIDYO_VPS_INTEGRATION|MVHEVC
    7777  TComVPSAccess                   m_cVPSAccess;
    7878#endif
     
    8888  Void  destroy           (); ///< destroy internal members
    8989  Void  decode            (); ///< main decoding function
    90 #if VIDYO_VPS_INTEGRATION
     90#if VIDYO_VPS_INTEGRATION|MVHEVC
    9191  Void  increaseNumberOfViews  (UInt layerId, UInt viewId, UInt isDepth);
    9292#else
  • branches/HTM-5.0-Qualcomm/source/App/TAppEncoder/TAppEncCfg.cpp

    r189 r194  
    329329  /* Camera Paremetes */
    330330  ("CameraParameterFile,cpf", m_pchCameraParameterFile,    (Char *) 0, "Camera Parameter File Name")
     331#if MVHEVC
     332  ("BaseViewCameraNumbers" ,  m_aiVId,     std::vector<Int>(1, MAX_VIEW_NUM), "Numbers of base views")
     333#endif
    331334  ("BaseViewCameraNumbers" ,  m_pchBaseViewCameraNumbers,  (Char *) 0, "Numbers of base views")
    332335
     
    786789}
    787790#else
     791#if !MVHEVC
    788792  m_cCameraData     .init     ( (UInt)m_iNumberOfViews,
    789793    m_uiInputBitDepth,
     
    797801    LOG2_DISP_PREC_LUT );
    798802#endif
     803#endif
    799804
    800805
    801806  // check validity of input parameters
    802807  xCheckParameter();
     808#if !MVHEVC
    803809  m_cCameraData.check( false, true );
    804  
     810#endif
    805811  // print-out parameters
    806812  xPrintParameter();
  • branches/HTM-5.0-Qualcomm/source/App/TAppEncoder/TAppEncCfg.h

    r189 r194  
    109109  std::vector<Double>  m_adQP;                                ///< QP value of key-picture (floating point) [0] video, [1] depth
    110110  std::vector<Int>     m_aiQP;                                ///< QP value of key-picture (integer) [0] video, [1] depth
     111#if MVHEVC
     112  std::vector<Int>     m_aiVId;                                ///< view id
     113#endif
    111114  Int       m_aiTLayerQPOffset[MAX_TLAYER];                   ///< QP offset corresponding to temporal layer depth
    112115  char*     m_pchdQPFile;                                     ///< QP offset for each slice (initialized from external file)
     
    285288  Char*     m_pchCameraParameterFile;                         ///< camera parameter file
    286289  Char*     m_pchBaseViewCameraNumbers;
     290#if !MVHEVC
    287291  TAppComCamPara m_cCameraData;
    288 
     292#endif
    289293  Int       m_iCodedCamParPrecision;                          ///< precision for coding of camera parameters
    290294
  • branches/HTM-5.0-Qualcomm/source/App/TAppEncoder/TAppEncTop.cpp

    r189 r194  
    6767Void TAppEncTop::xInitLibCfg()
    6868{
    69 #if VIDYO_VPS_INTEGRATION
     69#if VIDYO_VPS_INTEGRATION|MVHEVC
     70#if !MVHEVC
    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 MVHEVC
     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 MVHEVC
     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 ========
     
    406417      m_acTEncDepthTopList[iViewIdx]->setViewId                       ( iViewIdx );
    407418      m_acTEncDepthTopList[iViewIdx]->setIsDepth                      ( true );
     419#if MVHEVC
     420      m_acTEncDepthTopList[iViewIdx]->setLayerId                      ( iViewIdx );
     421#else
    408422      m_acTEncDepthTopList[iViewIdx]->setViewOrderIdx                 ( m_cCameraData.getViewOrderIndex()[ iViewIdx ] );
     423#endif
    409424#if VIDYO_VPS_INTEGRATION
    410425      layerId = iViewIdx * 2 + 1;
     
    821836  {
    822837    m_acTEncTopList[iViewIdx]->init( this );
     838#if MVHEVC
     839  //set setNumDirectRefLayer
     840  Int iNumDirectRef = m_acTEncTopList[iViewIdx]->getSPS()->getNumberOfUsableInterViewRefs();
     841  m_acTEncTopList[iViewIdx]->getEncTop()->getVPS()->setNumDirectRefLayer(iNumDirectRef, iViewIdx);
     842  for(Int iNumIvRef = 0; iNumIvRef < iNumDirectRef; iNumIvRef ++)
     843  {
     844    Int iLayerId = m_acTEncTopList[iViewIdx]->getSPS()->getUsableInterViewRef(iNumIvRef);
     845    m_acTEncTopList[iViewIdx]->getEncTop()->getVPS()->setDirectRefLayerId( iLayerId + iViewIdx, iViewIdx, iNumIvRef);
     846  }
     847#endif
    823848  }
    824849  for(Int iViewIdx=0; iViewIdx<m_iNumberOfViews; iViewIdx++)
     
    862887  TComPicYuv*       pcPicYuvOrg = new TComPicYuv;
    863888  TComPicYuv*       pcDepthPicYuvOrg = new TComPicYuv;
     889#if !MVHEVC
    864890  TComPicYuv*       pcPdmDepthOrg    = new TComPicYuv;
     891#endif
    865892  TComPicYuv*       pcPicYuvRec = NULL;
    866893  TComPicYuv*       pcDepthPicYuvRec = NULL;
     
    963990    {
    964991      Int  iNumEncoded = 0;
     992#if !MVHEVC
    965993      UInt iNextPoc = m_acTEncTopList[0] -> getFrameId( gopId );
    966994      if ( iNextPoc < m_iFrameToBeEncoded )
     
    968996      m_cCameraData.update( iNextPoc );
    969997      }
     998#endif
    970999      for(Int iViewIdx=0; iViewIdx < m_iNumberOfViews; iViewIdx++ )
    9711000      {
     
    10221051  delete pcDepthPicYuvOrg;
    10231052  pcDepthPicYuvOrg = NULL;
    1024  
     1053
     1054#if !MVHEVC
     1055#if BUG_FIX_HTM
     1056  if ( pcPdmDepthOrg != NULL && m_uiMultiviewMvRegMode )
     1057#else
    10251058  if ( pcPdmDepthOrg != NULL )
     1059#endif
    10261060  {
    10271061    pcPdmDepthOrg->destroy();
     
    10291063    pcPdmDepthOrg = NULL;
    10301064  };
    1031 
     1065#endif
    10321066 
    10331067  for(Int iViewIdx=0; iViewIdx < m_iNumberOfViews; iViewIdx++ )
     
    12331267    case NAL_UNIT_CODED_SLICE:
    12341268#if H0566_TLA
     1269#if !QC_REM_IDV
    12351270    case NAL_UNIT_CODED_SLICE_IDV:
     1271#endif
    12361272    case NAL_UNIT_CODED_SLICE_TLA:
    12371273    case NAL_UNIT_CODED_SLICE_CRA:
  • branches/HTM-5.0-Qualcomm/source/App/TAppEncoder/TAppEncTop.h

    r189 r194  
    8787#endif
    8888
    89 #if VIDYO_VPS_INTEGRATION
     89#if VIDYO_VPS_INTEGRATION|MVHEVC
    9090  TComVPS                     m_cVPS;
    9191#endif
     
    139139#endif
    140140 
     141#if MVHEVC
     142  TComVPS*          getVPS()  { return &m_cVPS; }
     143#endif
    141144#if VIDYO_VPS_INTEGRATION
    142145  TComVPS*          getVPS()  { return &m_cVPS; }
  • branches/HTM-5.0-Qualcomm/source/App/TAppRenderer/RendererMain.cpp

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

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

    r100 r194  
    5050#include <string>
    5151#include <vector>
    52 
     52#if !MVHEVC
    5353// ====================================================================================================================
    5454// Class definition
     
    134134
    135135
    136 
     136#endif
    137137#endif // __TAppRENDERERCFG__
    138138
  • branches/HTM-5.0-Qualcomm/source/App/TAppRenderer/TAppRendererTop.cpp

    r189 r194  
    4545// Constructor / destructor / initialization / destroy
    4646// ====================================================================================================================
    47 
     47#if !MVHEVC
    4848TAppRendererTop::TAppRendererTop()
    4949{
     
    10341034
    10351035}
     1036#endif
  • branches/HTM-5.0-Qualcomm/source/App/TAppRenderer/TAppRendererTop.h

    r100 r194  
    5050#include "../../Lib/TLibRenderer/TRenModel.h"
    5151
    52 
     52#if !MVHEVC
    5353// ====================================================================================================================
    5454// Class definition
     
    8787};// END CLASS DEFINITION TAppRendererTop
    8888
    89 #endif // __TAppRendererTOP__
     89#endif
    9090
     91#endif
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibCommon/CommonDef.h

    r189 r194  
    185185// VPS constants
    186186// ====================================================================================================================
     187#if MVHEVC
     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
     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|MVHEVC
    511518  NAL_UNIT_VPS,
    512519#else
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibCommon/NAL.h

    r100 r194  
    5151  NalRefIdc   m_nalRefIDC;   ///< nal_ref_idc
    5252#endif
    53 #if VIDYO_VPS_INTEGRATION
     53#if VIDYO_VPS_INTEGRATION|MVHEVC
    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 & !MVHEVC    
    7272    Int         viewId,
    7373    Bool        isDepth,
     
    7878    :m_nalUnitType (nalUnitType)
    7979    ,m_nalRefFlag  (nalRefFlag)
    80 #if !VIDYO_VPS_INTEGRATION
     80#if !VIDYO_VPS_INTEGRATION & !MVHEVC
    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   
    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
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp

    r189 r194  
    43074307  {
    43084308    // col [2]
     4309#if !TMVP_INDEX_MODIFY
    43094310    Int iRefIdxSkip[2] = {-1, -1};
    43104311    for (Int i=0; i<2; i++)
     
    43264327      iRefIdxSkip[i] = (iRefIdxTmp != -1) ? iRefIdxTmp : 0;
    43274328    }
     4329#endif
    43284330    //>> MTK colocated-RightBottom
    43294331    UInt uiPartIdxRB;
     
    43374339
    43384340    TComMv cColMv;
     4341#if TMVP_INDEX_MODIFY
     4342    Int iRefIdx = 0;
     4343#else
    43394344    Int iRefIdx;
    4340 
     4345#endif
    43414346    if      ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getSPS()->getPicWidthInLumaSamples() )  // image boundary check
    43424347    {
     
    43714376      }
    43724377    }
     4378#if !TMVP_INDEX_MODIFY
    43734379    iRefIdx = iRefIdxSkip[0];
    4374 
     4380#else
     4381    iRefIdx = 0;
     4382#endif
    43754383    Bool bExistMV = false;
    43764384    UInt uiPartIdxCenter;
     
    43904398      if ( getSlice()->isInterB() )
    43914399      {       
     4400#if !TMVP_INDEX_MODIFY
    43924401        iRefIdx = iRefIdxSkip[1];
     4402#else
     4403        iRefIdx = 0;
     4404#endif
    43934405        bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_1, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx);
    43944406        if( bExistMV == false )
     
    64006412  if( pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) >= 0 )
    64016413  {
     6414#if IV_AS_LT
     6415    Bool bIsCurrRefLongTerm = m_pcSlice->getRefPic( eRefPicList, iRefIdx)->getIsLongTerm();
     6416    Bool bIsNeibRefLongTerm = m_pcSlice->getRefPic( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx))->getIsLongTerm();
     6417    iNeibRefPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) );
     6418    if ( (bIsCurrRefLongTerm == bIsNeibRefLongTerm) && (iNeibRefPOC == iCurrRefPOC) )
     6419#else
    64026420    if( pcTmpCU->getSlice()->getRefViewId( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) )
    64036421    {
     
    64066424    iNeibRefPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) );
    64076425    if( iNeibRefPOC == iCurrRefPOC ) // Same Reference Frame But Diff List//
     6426#endif
    64086427    {
    64096428      TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList2nd)->getMv(uiIdx);
     
    65426561  Int iNeibRefPOC;
    65436562
     6563#if IV_AS_LT
     6564  Bool bIsCurrRefLongTerm = m_pcSlice->getRefPic( eRefPicList, iRefIdx)->getIsLongTerm();
     6565  Bool bIsNeibRefLongTerm = false;
     6566#endif
    65446567  if( pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) >= 0 )
    65456568  {
    65466569    iNeibRefPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) );
     6570#if IV_AS_LT
     6571    bIsNeibRefLongTerm = m_pcSlice->getRefPic( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx))->getIsLongTerm() ;
     6572    if ( (bIsCurrRefLongTerm == bIsNeibRefLongTerm) && (iNeibRefPOC == iCurrRefPOC) )
     6573#else
    65476574    if( pcTmpCU->getSlice()->getRefViewId( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) )
    65486575      return false;
    65496576    if( iNeibRefPOC == iCurrRefPOC ) // Same Reference Frame But Diff List//
     6577#endif
    65506578    {
    65516579      TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList2nd)->getMv(uiIdx);
     
    65656593    TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx);
    65666594    TComMv rcMv;
    6567 
     6595#if IV_AS_LT
     6596    bIsNeibRefLongTerm = m_pcSlice->getRefPic( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx))->getIsLongTerm();
     6597    if ( bIsCurrRefLongTerm == bIsNeibRefLongTerm )
     6598    {
     6599#else
    65686600    if( pcTmpCU->getSlice()->getRefViewId( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) )
    65696601    {
    65706602      return false;
    65716603    }
    6572 
     6604#endif
    65736605    Int iScale = xGetDistScaleFactor( iCurrPOC, iCurrRefPOC, iNeibPOC, iNeibRefPOC );
    65746606    if ( iScale == 4096 )
     
    65856617    pInfo->m_acMvCand[ pInfo->iN++] = rcMv;
    65866618    return true;
     6619#if IV_AS_LT
     6620    }
     6621#endif
    65876622  }
    65886623  //---------------------- V2(END) --------------------//
     
    65926627    TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList2nd)->getMv(uiIdx);
    65936628    TComMv rcMv;
    6594 
     6629#if IV_AS_LT
     6630    bIsNeibRefLongTerm = m_pcSlice->getRefPic( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx))->getIsLongTerm(); ;
     6631    if ( bIsCurrRefLongTerm == bIsNeibRefLongTerm )
     6632    {
     6633#else
    65956634    if( pcTmpCU->getSlice()->getRefViewId( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) )
    65966635    {
    65976636      return false;
    65986637    }
    6599 
     6638#endif
    66006639    Int iScale = xGetDistScaleFactor( iCurrPOC, iCurrRefPOC, iNeibPOC, iNeibRefPOC );
    66016640    if ( iScale == 4096 )
     
    66126651    pInfo->m_acMvCand[ pInfo->iN++] = rcMv;
    66136652    return true;
     6653#if IV_AS_LT
     6654  }
     6655#endif
    66146656  }
    66156657  //---------------------- V3(END) --------------------//
     
    67226764  Int iColPOC, iColRefPOC, iCurrPOC, iCurrRefPOC, iScale;
    67236765#if SONY_COLPIC_AVAILABILITY
     6766#if IV_AS_LT
     6767  Int iColViewOrderIdx, iCurrViewOrderIdx, iCurrRefViewOrderIdx;
     6768#else
    67246769  Int iColViewOrderIdx, iColRefViewOrderIdx, iCurrViewOrderIdx, iCurrRefViewOrderIdx;
     6770#endif
    67256771#endif
    67266772  TComMv cColMv;
     
    67536799  }
    67546800
    6755 #if !SONY_COLPIC_AVAILABILITY
     6801#if !SONY_COLPIC_AVAILABILITY&!IV_AS_LT
    67566802  if( m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewId() != m_pcSlice->getViewId() )
    67576803    return false;
     
    67816827  iColRefPOC = pColCU->getSlice()->getRefPOC(eColRefPicList, iColRefIdx);
    67826828
     6829#if !IV_AS_LT
    67836830#if SONY_COLPIC_AVAILABILITY
    67846831  iColRefViewOrderIdx = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewOrderIdx();
     
    67896836  }
    67906837#endif
    6791 
     6838#else
     6839  Bool bIsCurrRefLongTerm = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getIsLongTerm();
     6840  Bool bIsColRefLongTerm = pColCU->getSlice()->getWasLongTerm(eColRefPicList, iColRefIdx);
     6841  if(bIsCurrRefLongTerm != bIsColRefLongTerm)
     6842  {
     6843    assert( ((iColPOC == iColRefPOC)&&(iCurrPOC != iCurrRefPOC))||((iColPOC != iColRefPOC)&&(iCurrPOC == iCurrRefPOC)));
     6844    return false;
     6845  }
     6846#endif
    67926847  cColMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiAbsPartAddr);
    67936848
    67946849  iCurrRefPOC = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC();
     6850#if IV_AS_LT
     6851  {
     6852    assert( ((iColPOC != iColRefPOC)&&(iCurrPOC != iCurrRefPOC))||((iColPOC == iColRefPOC)&&(iCurrPOC == iCurrRefPOC)));
     6853    if(!bIsCurrRefLongTerm)  //short-term
     6854    {
     6855      iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC);
     6856      if ( iScale == 4096 )
     6857      {
     6858        rcMv = cColMv;
     6859      }
     6860      else
     6861      {
     6862        rcMv = cColMv.scaleMv( iScale );
     6863      }
     6864    }else
     6865      rcMv = cColMv; //inter-view
     6866  }
     6867#else
    67956868#if SONY_COLPIC_AVAILABILITY
    67966869  iScale = 0;
     
    68146887    rcMv = cColMv.scaleMv( iScale );
    68156888  }
    6816 
     6889#endif
    68176890  return true;
    68186891}
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibCommon/TComDepthMapGenerator.h

    r189 r194  
    239239  Bool              m_bDecoder;
    240240  TComPrediction*   m_pcPrediction;
    241 #if VIDYO_VPS_INTEGRATION
     241#if VIDYO_VPS_INTEGRATION|MVHEVC
    242242  TComVPSAccess*    m_pcVPSAccess;
    243243#endif
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibCommon/TComPic.cpp

    r189 r194  
    519519      UInt uiTempLayer = currSlice->getRefPic(eRefPicList, lpRef)->getCurrSlice()->getTLayer();
    520520      Int iTempDiff = (iTempPoc > iPOCCurr) ? (iTempPoc - iPOCCurr): (iPOCCurr - iTempPoc);
     521#if QC_REM_IDV
     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      {
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibCommon/TComPic.h

    r189 r194  
    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|MVHEVC
    143143  TComVPS*      getVPS()              { return  m_apcPicSym->getSlice(m_uiCurrSliceIdx)->getVPS();  }
    144144#endif
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibCommon/TComPrediction.cpp

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

    r189 r194  
    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 
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibCommon/TComSlice.cpp

    r189 r194  
    4444
    4545TComSlice::TComSlice()
     46#if MVHEVC
     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 IV_AS_LT
     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 IV_AS_LT
     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 IV_AS_LT
     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 IV_AS_LT
     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 IV_AS_LT
     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 IV_AS_LT
     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 MVHEVC
     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|MVHEVC
    14321499: m_VPSId                     (  0)
    14331500, m_SPSId                     (  0)
     
    14811548, m_bLCMod                    (false)
    14821549#if H0412_REF_PIC_LIST_RESTRICTION
     1550#if MVHEVC
     1551, m_restrictedRefPicListsFlag   (  0)
     1552#else
    14831553, m_restrictedRefPicListsFlag   (  1)
     1554#endif
    14841555, m_listsModificationPresentFlag(  0)
    14851556#endif
     
    17341805TComSPS::initMultiviewSPS( UInt uiViewId, Int iViewOrderIdx, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset )
    17351806{
     1807#if !MVHEVC
    17361808  AOT( uiViewId == 0 && iViewOrderIdx != 0 );
    17371809  AOT( uiViewId != 0 && iViewOrderIdx == 0 );
    17381810  AOT( uiViewId != 0 && !bCamParSlice && ( aaiScale == 0 || aaiOffset == 0 ) );
    1739 
     1811#endif
    17401812  m_uiViewId              = uiViewId;
    17411813  m_iViewOrderIdx         = iViewOrderIdx;
     
    17451817  ::memset( m_aaiCodedScale,  0x00, sizeof( m_aaiCodedScale  ) );
    17461818  ::memset( m_aaiCodedOffset, 0x00, sizeof( m_aaiCodedOffset ) );
     1819#if !MVHEVC
    17471820  if( !m_bCamParInSliceHeader )
    17481821  {
     
    17551828    }
    17561829  }
     1830#endif
    17571831}
    17581832
     
    23742448, m_ppsMap(MAX_NUM_PPS)
    23752449, m_apsMap(MAX_NUM_APS)
    2376 #if VIDYO_VPS_INTEGRATION
     2450#if VIDYO_VPS_INTEGRATION|MVHEVC
    23772451, m_vpsMap(MAX_NUM_VPS)
    23782452#endif
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibCommon/TComSlice.h

    r189 r194  
    144144#endif
    145145
    146 #if VIDYO_VPS_INTEGRATION
     146#if VIDYO_VPS_INTEGRATION|MVHEVC
    147147/// VPS class
    148148
     
    156156
    157157  UInt        m_uiExtensionType;
    158  
     158#if !MVHEVC 
    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 !MVHEVC 
    161171  Bool        m_bDepthFlag[MAX_LAYER_NUM];
     172#endif
    162173  Int         m_iViewOrderIdx[MAX_LAYER_NUM];
     174#if !MVHEVC 
    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 !MVHEVC
    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 !MVHEVC
    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 !MVHEVC  
    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 MVHEVC
     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|MVHEVC
    221252  Int          m_VPSId;
    222253#endif
     
    391422  TComSPS();
    392423  virtual ~TComSPS();
    393 #if VIDYO_VPS_INTEGRATION
     424#if VIDYO_VPS_INTEGRATION|MVHEVC
    394425  Int  getVPSId       ()         { return m_VPSId;          }
    395426  Void setVPSId       (Int i)    { m_VPSId = i;             }
     
    12211252 
    12221253  // access channel
    1223 #if VIDYO_VPS_INTEGRATION
     1254#if VIDYO_VPS_INTEGRATION|MVHEVC
    12241255  TComVPS*    m_pcVPS;
     1256#endif
     1257#if IV_AS_LT
     1258  Bool                  m_bWasLongTerm[2][MAX_NUM_REF+1]; //was long-term picture
    12251259#endif
    12261260  TComSPS*    m_pcSPS;
     
    12971331  Int        m_aaiCodedOffset[2][MAX_VIEW_NUM];
    12981332
    1299 #if SONY_COLPIC_AVAILABILITY
     1333#if SONY_COLPIC_AVAILABILITY|MVHEVC
    13001334  Int         m_iViewOrderIdx;
    13011335#endif
     
    13111345  Void      initTiles();
    13121346
    1313 #if VIDYO_VPS_INTEGRATION
     1347#if VIDYO_VPS_INTEGRATION|MVHEVC
    13141348  Void      setVPS          ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; }
    13151349  TComVPS*  getVPS          () { return m_pcVPS; }
    13161350#endif
     1351#if IV_AS_LT
     1352  Void          setWasLongTerm( Bool lt,  RefPicList e, Int iRefIdx ) { m_bWasLongTerm[e][iRefIdx] = lt; }
     1353  Bool          getWasLongTerm( RefPicList e, Int iRefIdx           ) { return m_bWasLongTerm[e][iRefIdx] ; }
     1354#endif
     1355
    13171356  Void      setSPS          ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; }
    13181357  TComSPS*  getSPS          () { return m_pcSPS; }
     
    15871626  Void setViewId( Int viewId )       { m_viewId = viewId;   }
    15881627  Int  getViewId()                   { return m_viewId;     }
     1628#if MVHEVC
     1629  Void    setViewOrderIdx(Int v, UInt layer)                { m_iViewOrderIdx = v;    }
     1630  Int     getViewOrderIdx()                                 { return m_iViewOrderIdx; }
     1631#endif
    15891632  Void setIsDepth( Bool isDepth )    { m_isDepth = isDepth; }
    15901633  Bool getIsDepth()                  { return m_isDepth;    }
     
    16551698  }
    16561699
     1700#if MVHEVC
     1701  Void clearPSList()
     1702  {
     1703    m_paramsetMap.clear();
     1704  }
     1705#endif
    16571706private:
    16581707  std::map<Int,T *> m_paramsetMap;
     
    16651714  ParameterSetManager();
    16661715  virtual ~ParameterSetManager();
    1667 #if VIDYO_VPS_INTEGRATION
     1716#if VIDYO_VPS_INTEGRATION|MVHEVC
    16681717  //! store video parameter set and take ownership of it
    16691718  Void storeVPS(TComVPS *vps) { m_vpsMap.storePS( vps->getVPSId(), vps); };
     
    16711720  TComVPS* getVPS(Int vpsId)  { return m_vpsMap.getPS(vpsId); };
    16721721  TComVPS* getFirstVPS()      { return m_vpsMap.getFirstPS(); };
     1722#if MVHEVC
     1723  Void     clearVPS()         { m_vpsMap.clearPSList(); };
     1724  Void     clearSPS()         { m_spsMap.clearPSList(); };
     1725  Void     clearPPS()         { m_ppsMap.clearPSList(); };
     1726#endif
    16731727#endif
    16741728  //! store sequence parameter set and take ownership of it
     
    16931747  ParameterSetMap<TComPPS> m_ppsMap;
    16941748  ParameterSetMap<TComAPS> m_apsMap;
    1695 #if VIDYO_VPS_INTEGRATION
     1749#if VIDYO_VPS_INTEGRATION|MVHEVC
    16961750  ParameterSetMap<TComVPS> m_vpsMap;
    16971751#endif
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibCommon/TypeDef.h

    r189 r194  
    4141//! \ingroup TLibCommon
    4242//! \{
    43 
     43#define MVHEVC                            0
     44#define            IV_AS_LT               1   //inter-view reference pictures are treated as long-term pictures         
     45#define            TMVP_INDEX_MODIFY      1   //the reference index for temporal merging candidate is set to 0, as defined in HEVC
     46#define            QC_REM_IDV             1   //nal unit type NAL_UNIT_CODED_SLICE_IDV is removed.
     47#define            BUG_FIX_HTM            1
     48#if !MVHEVC
    4449///// ***** FIXES *********
    4550// A
     
    177182
    178183#define HHI_MPI_MERGE_POS                 0
    179 
     184#endif
    180185///// ***** HM 6.1 *********
    181186#define SKIPFRAME_BUGFIX                  1 ///< bug fix to enable skipFrame at decoder
     
    477482// VPS INTEGRATION
    478483// ====================================================================================================================
    479 
     484#if !MVHEVC
    480485#if VIDYO_VPS_INTEGRATION
    481486#define MAX_NUM_VPS 10
    482487#endif
     488#else
     489#define MAX_NUM_VPS 1
     490#endif
     491
    483492
    484493// ====================================================================================================================
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibDecoder/NALread.cpp

    r77 r194  
    132132#endif
    133133
     134#if MVHEVC
     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
     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
    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
     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//! \}
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r189 r194  
    13381338  }
    13391339}
    1340 
     1340#if MVHEVC
     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 !MVHEVC
    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 !MVHEVC
    16471727  if(uiCode)
    16481728  {
     
    18031883    }
    18041884  }
     1885#endif
    18051886}
    18061887
     
    19071988    }
    19081989#endif
     1990#if QC_REM_IDV
     1991#if !MVHEVC
     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
     2033#if !MVHEVC
     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 MVHEVC
     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 MVHEVC
     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 MVHEVC
     2344    if( rpcSlice->getViewId() && rpcSlice->getSPS()->getListsModificationPresentFlag() )
     2345#else
     2346    if(rpcSlice->getSPS()->getListsModificationPresentFlag() )
     2347#endif
    22402348      {
    22412349#endif
     
    29443052}
    29453053
     3054#if MVHEVC
     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
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.h

    r189 r194  
    7575  Void  xReadFlagTr           (              UInt& rValue, const Char *pSymbolName);
    7676#endif
    77  
     77#if MVHEVC
     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|MVHEVC
    116118  Void  parseVPS            ( TComVPS* pcVPS );
    117119#endif
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibDecoder/TDecEntropy.h

    r189 r194  
    7171#endif
    7272
    73 #if VIDYO_VPS_INTEGRATION
     73#if VIDYO_VPS_INTEGRATION|MVHEVC
    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|MVHEVC
    178178  Void    decodeVPS                   ( TComVPS* pcVPS ) { m_pcEntropyDecoderIf->parseVPS(pcVPS); }
    179179#endif
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibDecoder/TDecSbac.h

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

    r77 r194  
    446446, m_ppsBuffer(16)
    447447, m_apsBuffer(64)
    448 #if VIDYO_VPS_INTEGRATION
     448#if VIDYO_VPS_INTEGRATION|MVHEVC
    449449, m_vpsBuffer(16)
    450450#endif
     
    458458}
    459459
    460 #if VIDYO_VPS_INTEGRATION
     460#if VIDYO_VPS_INTEGRATION|MVHEVC
    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|MVHEVC
    516516  m_vpsMap.mergePSList(m_vpsBuffer);
    517517#endif
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibDecoder/TDecSlice.h

    r100 r194  
    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|MVHEVC
    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|MVHEVC
    109109  ParameterSetMap<TComVPS> m_vpsBuffer;
    110110#endif
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibDecoder/TDecTop.cpp

    r77 r194  
    5050  m_aaiCodedScale          = new Int* [ MAX_VIEW_NUM ];
    5151  m_aiViewOrderIndex       = new Int  [ MAX_VIEW_NUM ];
     52#if MVHEVC
     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 MVHEVC
     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
    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 MVHEVC
     597  TComVPS *vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId());
     598#endif
     599#if VIDYO_VPS_INTEGRATION|MVHEVC
    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|MVHEVC
     642#if MVHEVC
     643  m_apcSlicePilot->setIsDepth(false);
     644#endif
    629645  m_apcSlicePilot->setVPS(m_parameterSetManagerDecoder.getPrefetchedVPS(0));
    630646#endif
    631647  m_apcSlicePilot->initTiles();
    632 
     648#if MVHEVC
     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 MVHEVC
     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 !MVHEVC
    953985#if VIDYO_VPS_INTEGRATION
    954986    pcSlice->setViewId( pcSlice->getVPS()->getViewId(nalu.m_layerId) );
     
    957989    pcSlice->setViewId(m_viewId);
    958990    pcSlice->setIsDepth(m_isDepth);
     991#endif
    959992#endif
    960993
     
    10711104  m_cGopDecoder.decompressGop(nalu.m_Bitstream, pcPic, false);
    10721105
     1106#if IV_AS_LT
     1107  std::vector<TComPic*> apcInterViewRefPics = m_tAppDecTop->getInterViewRefPics( m_viewId, pcSlice->getPOC(), m_isDepth, pcSlice->getSPS() );
     1108  for( Int k = 0; k < apcInterViewRefPics.size(); k++ )
     1109  {
     1110    TComPic*  pcPicIv = apcInterViewRefPics[k];
     1111    pcPicIv->setIsLongTerm( 0 );
     1112  }
     1113#endif
    10731114  if( m_pcCamParsCollector )
    10741115  {
     
    10821123}
    10831124
    1084 #if VIDYO_VPS_INTEGRATION
     1125#if VIDYO_VPS_INTEGRATION|MVHEVC
    10851126Void TDecTop::xDecodeVPS()
    10861127{
     
    10891130  m_cEntropyDecoder.decodeVPS( vps );
    10901131  m_parameterSetManagerDecoder.storePrefetchedVPS(vps); 
     1132#if !MVHEVC
    10911133  getTAppDecTop()->getVPSAccess()->addVPS( vps );
     1134#endif
    10921135}
    10931136#endif
     
    11551198  switch (nalu.m_nalUnitType)
    11561199  {
    1157 #if VIDYO_VPS_INTEGRATION
     1200#if VIDYO_VPS_INTEGRATION|MVHEVC
    11581201    case NAL_UNIT_VPS:
    11591202      xDecodeVPS();
     
    11781221    case NAL_UNIT_CODED_SLICE_IDR:
    11791222#if H0566_TLA
     1223#if !QC_REM_IDV
    11801224    case NAL_UNIT_CODED_SLICE_IDV:
     1225#endif
    11811226    case NAL_UNIT_CODED_SLICE_CRA:
    11821227    case NAL_UNIT_CODED_SLICE_TLA:
     
    11931238}
    11941239
     1240#if MVHEVC
     1241Void TDecTop::xCopyVPS( TComVPS* pVPSV0 )
     1242{
     1243  m_parameterSetManagerDecoder.storePrefetchedVPS(pVPSV0); 
     1244}
     1245
     1246Void TDecTop::xCopySPS( TComSPS* pSPSV0 )
     1247{
     1248  TComSPS* sps = new TComSPS();
     1249  sps = pSPSV0;
     1250  m_parameterSetManagerDecoder.storePrefetchedSPS(sps);
     1251#if LCU_SYNTAX_ALF
     1252  m_cAdaptiveLoopFilter.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
     1253#endif
     1254}
     1255
     1256Void TDecTop::xCopyPPS(TComPPS* pPPSV0 )
     1257{
     1258  m_parameterSetManagerDecoder.storePrefetchedPPS( pPPSV0 );
     1259
     1260  //!!!KS: Activate parameter sets for parsing APS (unless dependency is resolved)
     1261  m_apcSlicePilot->setPPSId(pPPSV0->getPPSId());
     1262  xActivateParameterSets();
     1263  m_apcSlicePilot->initTiles();
     1264}
     1265#endif
    11951266/** Function for checking if picture should be skipped because of random access
    11961267 * \param iSkipFrame skip frame counter
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibDecoder/TDecTop.h

    r100 r194  
    8888  Int**   m_aaiCodedScale;
    8989  Int*    m_aiViewOrderIndex;
     90#if MVHEVC
     91  Int*    m_aiViewId;
     92#endif
    9093  Int*    m_aiViewReceived;
    9194  UInt    m_uiCamParsCodedPrecision;
     
    168171 
    169172  Void  deletePicBuffer();
    170 
     173#if MVHEVC
     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 MVHEVC
     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|MVHEVC
    211221  Void      xDecodeVPS();
    212222#endif
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibEncoder/NALwrite.cpp

    r77 r194  
    6464#endif
    6565
     66#if MVHEVC
     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
    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 !MVHEVC
    198205/**
    199206 * Copy NALU from naluSrc to naluDest
     
    222229  naluDest.m_Bitstream   = naluSrc.m_Bitstream;
    223230}
     231#endif
    224232
    225233//! \}
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibEncoder/NALwrite.h

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

    r189 r194  
    375375}
    376376
     377#if MVHEVC
     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 !MVHEVC
    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 MVHEVC
     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
     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
     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();
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.h

    r189 r194  
    114114  UInt  getCoeffCost          ()                { return  m_uiCoeffCost;  }
    115115 
    116 #if VIDYO_VPS_INTEGRATION
     116#if VIDYO_VPS_INTEGRATION|MVHEVC
    117117  Void  codeVPS                 ( TComVPS* pcVPS );
    118118#endif
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibEncoder/TEncCfg.h

    r189 r194  
    307307#endif
    308308
    309 #if VIDYO_VPS_INTEGRATION
     309#if VIDYO_VPS_INTEGRATION|MVHEVC
    310310  UInt     m_layerId;
    311311#endif
     
    820820  Int       getTSIG()                            { return m_signHidingThreshold; }
    821821#endif
    822 #if VIDYO_VPS_INTEGRATION
     822#if VIDYO_VPS_INTEGRATION |MVHEVC
    823823  Void      setLayerId             ( UInt layerId )   { m_layerId = layerId; }
    824824  UInt      getLayerId             ()               { return m_layerId; }
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibEncoder/TEncEntropy.cpp

    r189 r194  
    121121}
    122122
    123 #if VIDYO_VPS_INTEGRATION
     123#if VIDYO_VPS_INTEGRATION|MVHEVC
    124124Void TEncEntropy::encodeVPS( TComVPS* pcVPS )
    125125{
     
    129129#endif
    130130
    131 #if VIDYO_VPS_INTEGRATION
     131#if VIDYO_VPS_INTEGRATION|MVHEVC
    132132Void  codeVPS                 ( TComVPS* pcVPS );
    133133#endif
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibEncoder/TEncEntropy.h

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

    r189 r194  
    246246
    247247      std::vector<TComAPS>& vAPS = m_pcEncTop->getAPS();
    248 #if VIDYO_VPS_INTEGRATION
     248#if VIDYO_VPS_INTEGRATION|MVHEVC
    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
     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
    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);
     
    363373      if( pcSlice->getSliceType() == B_SLICE )
    364374      {
     375#if !QC_REM_IDV
    365376        if( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); }
     377#else
     378      Bool bRAP = ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR)) && (pcSlice->getSPS()->getViewId())  ? 1: 0;
     379      if( m_pcCfg->getGOPEntry( bRAP ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); }
     380#endif
    366381      }
    367382     
     
    830845      if ( m_bSeqFirst )
    831846      {
    832 #if VIDYO_VPS_INTEGRATION
     847#if MVHEVC
     848      if(!m_pcEncTop->getLayerId())
     849      {
     850#endif
     851#if VIDYO_VPS_INTEGRATION|MVHEVC
    833852        {
    834853          OutputNALUnit nalu(NAL_UNIT_VPS, true, m_pcEncTop->getLayerId());
     
    840859#endif
    841860#if NAL_REF_FLAG
    842 #if VIDYO_VPS_INTEGRATION
     861#if VIDYO_VPS_INTEGRATION|MVHEVC
    843862        OutputNALUnit nalu(NAL_UNIT_SPS, true, m_pcEncTop->getLayerId());
    844863#else
     
    861880
    862881#if NAL_REF_FLAG
    863 #if VIDYO_VPS_INTEGRATION
     882#if VIDYO_VPS_INTEGRATION|MVHEVC
     883#if MVHEVC
    864884        nalu = NALUnit(NAL_UNIT_PPS, true, m_pcEncTop->getLayerId());
     885#else
     886        nalu = NALUnit(NAL_UNIT_PPS, true, m_pcEncTop->getLayerId());
     887#endif
    865888#else
    866889        nalu = NALUnit(NAL_UNIT_PPS, true, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth());
     
    873896        writeRBSPTrailingBits(nalu.m_Bitstream);
    874897        accessUnit.push_back(new NALUnitEBSP(nalu));
    875 
    876         m_bSeqFirst = false;
    877       }
     898#if MVHEVC
     899      }
     900#endif
     901      m_bSeqFirst = false;
     902    }
    878903
    879904      /* use the main bitstream buffer for storing the marshalled picture */
     
    9931018#if NAL_REF_FLAG
    9941019        OutputNALUnit nalu( pcSlice->getNalUnitType(), pcSlice->isReferenced(),
    995 #if !VIDYO_VPS_INTEGRATION
     1020#if !VIDYO_VPS_INTEGRATION &!MVHEVC
    9961021                           m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth(), pcSlice->getTLayer() );
    9971022#else
     
    14691494          {
    14701495#if NAL_REF_FLAG
    1471 #if VIDYO_VPS_INTEGRATION
     1496#if VIDYO_VPS_INTEGRATION | MVHEVC
    14721497            OutputNALUnit nalu(NAL_UNIT_APS, true, m_pcEncTop->getLayerId());
    14731498#else
     
    15351560
    15361561#if NAL_REF_FLAG
    1537 #if VIDYO_VPS_INTEGRATION
     1562#if VIDYO_VPS_INTEGRATION | MVHEVC
    15381563        OutputNALUnit nalu(NAL_UNIT_SEI, false, m_pcEncTop->getLayerId());
    15391564#else
     
    19731998  case NAL_UNIT_CODED_SLICE: return "SLICE";
    19741999#if H0566_TLA
     2000#if !QC_REM_IDV
    19752001  case NAL_UNIT_CODED_SLICE_IDV: return "IDV";
     2002#endif
    19762003  case NAL_UNIT_CODED_SLICE_CRA: return "CRA";
    19772004  case NAL_UNIT_CODED_SLICE_TLA: return "TLA";
     
    21882215    if( bInterViewOnlySlice )
    21892216    {
     2217#if !QC_REM_IDV
    21902218      return NAL_UNIT_CODED_SLICE_IDV;
     2219#else
     2220      return NAL_UNIT_CODED_SLICE_IDR;
     2221#endif
    21912222    }
    21922223    else
     
    22012232      if( bInterViewOnlySlice )
    22022233      {
     2234#if !QC_REM_IDV
    22032235        return NAL_UNIT_CODED_SLICE_IDV;
     2236#else
     2237        return NAL_UNIT_CODED_SLICE_CRA;
     2238#endif
    22042239      }
    22052240      else
     
    22162251      if( bInterViewOnlySlice )
    22172252      {
     2253#if !QC_REM_IDV
    22182254        return NAL_UNIT_CODED_SLICE_IDV;
     2255#else
     2256        return NAL_UNIT_CODED_SLICE_IDR;
     2257#endif
    22192258      }
    22202259      else
     
    24542493
    24552494  // analyze inter-view modifications
     2495#if !QC_REM_IDV
    24562496  GOPEntryMvc gem = m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid );
     2497#else
     2498  Bool bRAP = ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA)) && (pcSlice->getSPS()->getViewId()) ? 1:0;
     2499  GOPEntryMvc gem = m_pcCfg->getGOPEntry( bRAP ? MAX_GOP : iGOPid );
     2500#endif
    24572501  Int numL0Modifications = 0;
    24582502  Int numL1Modifications = 0;
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibEncoder/TEncSbac.cpp

    r189 r194  
    396396}
    397397
    398 #if VIDYO_VPS_INTEGRATION
     398#if VIDYO_VPS_INTEGRATION|MVHEVC
    399399Void TEncSbac::codeVPS( TComVPS* pcVPS )
    400400{
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibEncoder/TEncSbac.h

    r189 r194  
    9898  //--SBAC RD
    9999
    100 #if VIDYO_VPS_INTEGRATION
     100#if VIDYO_VPS_INTEGRATION|MVHEVC
    101101  Void  codeVPS                 ( TComVPS* pcVPS );
    102102#endif
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibEncoder/TEncSearch.cpp

    r189 r194  
    42844284  }
    42854285#endif
    4286 
     4286#if MVHEVC
     4287  m_pcRdCost->setMultiviewReg( 0 );
     4288#endif
    42874289  setWpScalingDistParam( pcCU, iRefIdxPred, eRefPicList );
    42884290  //  Do integer search
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibEncoder/TEncSlice.cpp

    r189 r194  
    162162 \param pPPS          PPS associated with the slice
    163163 */
    164 #if VIDYO_VPS_INTEGRATION
     164#if VIDYO_VPS_INTEGRATION|MVHEVC
    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|MVHEVC
    175175  rpcSlice->setVPS( pVPS );
    176176#endif
     
    820820  UInt uiTileStartLCU = 0;
    821821  UInt uiTileLCUX     = 0;
    822 
     822#if !MVHEVC
    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 !MVHEVC
    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() )
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibEncoder/TEncSlice.h

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

    r189 r194  
    785785  else
    786786  {
     787#if MVHEVC
     788    m_cSPS.initMultiviewSPS   ( m_viewId);
     789#else
    787790    m_cSPS.initMultiviewSPS           ( m_viewId, m_iViewOrderIdx, m_uiCamParPrecision, m_bCamParInSliceHeader, m_aaiCodedScale, m_aaiCodedOffset );
     791#endif
    788792    if( m_viewId )
    789793    {
     
    993997Void TEncTop::selectReferencePictureSet(TComSlice* slice, Int POCCurr, Int GOPid,TComList<TComPic*>& listPic )
    994998{
     999#if QC_REM_IDV
     1000  if( (slice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR ||slice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA) && slice->getSPS()->getViewId() && POCCurr == 0 )
     1001#else
    9951002  if( slice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV && POCCurr == 0 )
     1003#endif
    9961004  {
    9971005    TComReferencePictureSet* rps = slice->getLocalRPS();
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibExtractor/TExtrTop.cpp

    r100 r194  
    5555Bool TExtrTop::extract( InputNALUnit& nalu, std::set<UInt>& rsuiExtractLayerIds )
    5656{
    57 #if VIDYO_VPS_INTEGRATION
     57#if VIDYO_VPS_INTEGRATION|MVHEVC
    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|MVHEVC
    6868  if ( nalu.m_nalUnitType == NAL_UNIT_VPS )
    6969  {
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibExtractor/TExtrTop.h

    r77 r194  
    5454{
    5555private:
    56 #if VIDYO_VPS_INTEGRATION
     56#if VIDYO_VPS_INTEGRATION|MVHEVC
    5757  TComVPS                 m_cVPS;
    5858#endif
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibRenderer/TRenModSetupStrParser.cpp

    r100 r194  
    3636#include "TRenFilter.h"
    3737#include "TRenModSetupStrParser.h"
    38 
     38#if !MVHEVC
    3939Int
    4040TRenModSetupStrParser::getNumOfModels()
     
    450450  rcNextChar = m_pchSetStr[iPos];
    451451}
     452#endif
     453
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibRenderer/TRenModSetupStrParser.h

    r56 r194  
    3131 * THE POSSIBILITY OF SUCH DAMAGE.
    3232 */
    33 
     33#if !MVHEVC
    3434#ifndef __TRENMODSETUPSTRPARSER__
    3535#define __TRENMODSETUPSTRPARSER__
     
    127127
    128128#endif //__TRENMODEL__
     129#endif
     130
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibRenderer/TRenModel.cpp

    r189 r194  
    3535#include "TRenFilter.h"
    3636#include "TRenModel.h"
    37 
     37#if !MVHEVC
    3838///////////  TRENMODEL //////////////////////
    3939TRenModel::TRenModel()
     
    697697  }
    698698}
     699#endif
     700
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibRenderer/TRenModel.h

    r189 r194  
    3232 */
    3333
    34 
     34#if !MVHEVC
    3535#ifndef __TRENMODEL__
    3636#define __TRENMODEL__
     
    156156
    157157#endif //__TRENMODEL__
     158#endif
     159
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibRenderer/TRenSingleModel.cpp

    r189 r194  
    3636#include "TRenSingleModel.h"
    3737
     38#if !MVHEVC
    3839////////////// TRENSINGLE MODEL ///////////////
    3940template <BlenMod iBM, Bool bBitInc>
     
    19561957}
    19571958#endif
     1959#endif
     1960
  • branches/HTM-5.0-Qualcomm/source/Lib/TLibRenderer/TRenSingleModel.h

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