Changeset 262 in 3DVCSoftware for branches/HTM-5.1-dev2-Sony/source/Lib


Ignore:
Timestamp:
7 Feb 2013, 06:01:05 (12 years ago)
Author:
sony
Message:

JCT2-C0115 Inter-view vector scaling for TMVP & flag
The macro is INTER_VIEW_VECTOR_SCALING_C0115.

Location:
branches/HTM-5.1-dev2-Sony/source/Lib
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TComDataCU.cpp

    r254 r262  
    69016901  RefPicList  eColRefPicList;
    69026902  Int iColPOC, iColRefPOC, iCurrPOC, iCurrRefPOC, iScale;
    6903 #if SONY_COLPIC_AVAILABILITY
    6904 #if QC_IV_AS_LT_B0046
    6905   Int iColViewOrderIdx, iCurrViewOrderIdx, iCurrRefViewOrderIdx;
    6906 #else
    6907   Int iColViewOrderIdx, iColRefViewOrderIdx, iCurrViewOrderIdx, iCurrRefViewOrderIdx;
    6908 #endif
    6909 #endif
    69106903  TComMv cColMv;
    6911 
    6912 #if SONY_COLPIC_AVAILABILITY
    6913   iCurrViewOrderIdx    = m_pcSlice->getViewOrderIdx();
    6914   iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx();
    6915 #endif
     6904#if INTER_VIEW_VECTOR_SCALING_C0115
     6905  Int iColViewId, iColRefViewId, iCurrViewId, iCurrRefViewId;
     6906#endif
     6907
    69166908  // use coldir.
    69176909#if COLLOCATED_REF_IDX
     
    69286920  iCurrRefPOC = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC();
    69296921  iColPOC = pColCU->getSlice()->getPOC(); 
    6930 #if SONY_COLPIC_AVAILABILITY
    6931   iColViewOrderIdx = pColCU->getSlice()->getViewOrderIdx();
     6922#if INTER_VIEW_VECTOR_SCALING_C0115
     6923  iCurrViewId = m_pcSlice->getViewOrderIdx(); // will be changed to view_id   
     6924  iCurrRefViewId = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx(); // will be changed to view_id
     6925  iColViewId = pColCU->getSlice()->getViewOrderIdx(); // will be changed to view_id
    69326926#endif
    69336927
     
    69376931  }
    69386932
    6939 #if !SONY_COLPIC_AVAILABILITY&!QC_IV_AS_LT_B0046
     6933#if !INTER_VIEW_VECTOR_SCALING_C0115&!QC_IV_AS_LT_B0046
    69406934  if( m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewId() != m_pcSlice->getViewId() )
    69416935    return false;
     
    69646958  // Scale the vector.
    69656959  iColRefPOC = pColCU->getSlice()->getRefPOC(eColRefPicList, iColRefIdx);
    6966 
     6960#if INTER_VIEW_VECTOR_SCALING_C0115
     6961  iColRefViewId = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewOrderIdx(); // will be changed to view_id
     6962#endif
    69676963#if !QC_IV_AS_LT_B0046
    6968 #if SONY_COLPIC_AVAILABILITY
    6969   iColRefViewOrderIdx = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewOrderIdx();
    6970 #else
    69716964  if( pColCU->getSlice()->getRefViewId( eColRefPicList, iColRefIdx ) != pColCU->getSlice()->getViewId() )
    69726965  {
    69736966    return false;
    69746967  }
    6975 #endif
    69766968#else
    69776969  Bool bIsCurrRefLongTerm = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getIsLongTerm();
     
    69906982        bIsCurrRefLongTerm = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getIsLongTerm();
    69916983        iCurrRefPOC = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC();
    6992 #if SONY_COLPIC_AVAILABILITY
    6993         iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx();
     6984#if INTER_VIEW_VECTOR_SCALING_C0115
     6985        iCurrRefViewId = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx(); // will be changed to view_id
    69946986#endif
    69956987      }
     
    70247016      }
    70257017    }else
    7026 #if QC_MVHEVC_B0046
    7027       rcMv = cColMv; //inter-view
    7028 #else
    7029     {
    7030 #if SONY_COLPIC_AVAILABILITY
    7031       Int iColRefViewOrderIdx = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewOrderIdx();
    7032       iScale = xGetDistScaleFactor(iCurrViewOrderIdx, iCurrRefViewOrderIdx, iColViewOrderIdx, iColRefViewOrderIdx);
    7033       if ( iScale == 4096 )
    7034       {
    7035         rcMv = cColMv;
    7036       }
    7037       else
    7038       {
    7039         rcMv = cColMv.scaleMv( iScale );
    7040       }
    7041 #else
    7042       return false;
    7043 #endif
    7044     }
    7045 #endif
    7046   }
    7047 #else
    7048 #if SONY_COLPIC_AVAILABILITY
    7049   iScale = 0;
    7050   iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx();
    7051   if((iColPOC != iColRefPOC)&&(iCurrPOC != iCurrRefPOC))
    7052     iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC);
    7053   else if((iColPOC == iColRefPOC)&&(iCurrPOC == iCurrRefPOC))
    7054     iScale = xGetDistScaleFactor(iCurrViewOrderIdx, iCurrRefViewOrderIdx, iColViewOrderIdx, iColRefViewOrderIdx);
    7055   else
    7056     return false;
    7057 
    7058 #else
    7059   iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC);
    7060 #endif
    7061   if ( iScale == 4096 )
    7062   {
    7063     rcMv = cColMv;
    7064   }
    7065   else
    7066   {
    7067     rcMv = cColMv.scaleMv( iScale );
    7068   }
    7069 #endif
     7018#if INTER_VIEW_VECTOR_SCALING_C0115
     7019    {
     7020        if((iCurrPOC == iCurrRefPOC) && m_pcSlice->getIVScalingFlag())    // inter-view & inter-view
     7021            iScale = xGetDistScaleFactor( iCurrViewId, iCurrRefViewId, iColViewId, iColRefViewId );
     7022        else
     7023            iScale = 4096;            // inter & inter
     7024        if ( iScale == 4096 )
     7025        {
     7026          rcMv = cColMv;
     7027        }
     7028        else
     7029        {
     7030          rcMv = cColMv.scaleMv( iScale );
     7031        }
     7032    }
     7033#else
     7034    rcMv = cColMv; //inter-view
     7035#endif
     7036  }
     7037#endif
     7038
    70707039  return true;
    70717040}
  • branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TComPic.cpp

    r210 r262  
    7676  m_pcUsedPelsMap     = NULL;
    7777#endif
    78 #if SONY_COLPIC_AVAILABILITY
    79   m_iViewOrderIdx     = 0;
     78#if INTER_VIEW_VECTOR_SCALING_C0115
     79  m_iViewOrderIdx     = 0;    // will be changed to view_id
    8080#endif
    8181  m_aaiCodedScale     = 0;
  • branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TComPic.h

    r210 r262  
    112112  TComPicYuv*           m_pcUsedPelsMap;
    113113#endif
    114 #if SONY_COLPIC_AVAILABILITY
    115   Int                   m_iViewOrderIdx;
     114#if INTER_VIEW_VECTOR_SCALING_C0115
     115  Int                   m_iViewOrderIdx;    // will be changed to view_id
    116116#endif
    117117  Int**                 m_aaiCodedScale;
     
    188188#endif
    189189
    190 #if SONY_COLPIC_AVAILABILITY
    191   Void          setViewOrderIdx(Int i)                        { m_iViewOrderIdx = i; }
    192   Int           getViewOrderIdx()                             { return m_iViewOrderIdx; }
     190#if INTER_VIEW_VECTOR_SCALING_C0115
     191  Void          setViewOrderIdx(Int i)                        { m_iViewOrderIdx = i; }        // will be changed to view_id
     192  Int           getViewOrderIdx()                             { return m_iViewOrderIdx; }    // will be changed to view_id
    193193#endif
    194194
  • branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TComSlice.cpp

    r237 r262  
    113113, m_numEntryPointOffsets          ( 0 )
    114114#endif
    115 #if SONY_COLPIC_AVAILABILITY
    116 , m_iViewOrderIdx                 ( 0 )
    117 #endif
    118115#if LGE_ILLUCOMP_B0045
    119116, m_bApplyIC                      ( false )
     117#endif
     118#if INTER_VIEW_VECTOR_SCALING_C0115
     119, m_bIVScalingFlag                (false)
     120, m_iViewOrderIdx                 ( 0 )        // will be changed to view_id
    120121#endif
    121122{
     
    722723  m_iPOC                 = pSrc->m_iPOC;
    723724  m_viewId               = pSrc->m_viewId;
    724 #if SONY_COLPIC_AVAILABILITY
    725   m_iViewOrderIdx        = pSrc->m_iViewOrderIdx;
     725#if INTER_VIEW_VECTOR_SCALING_C0115   
     726  m_iViewOrderIdx        = pSrc->m_iViewOrderIdx;// will be changed to view_id
     727  m_bIVScalingFlag       = pSrc->m_bIVScalingFlag;
    726728#endif
    727729  m_eNalUnitType         = pSrc->m_eNalUnitType;
  • branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TComSlice.h

    r237 r262  
    179179  UInt        m_uiMaxDecPicBuffering[MAX_TLAYER];
    180180  UInt        m_uiMaxLatencyIncrease[MAX_TLAYER];
    181  
     181#if INTER_VIEW_VECTOR_SCALING_C0115
     182  Bool          m_bIVScalingFlag;
     183#endif
    182184public:
    183185  TComVPS();
     
    213215  Void    setDependentLayer(UInt v, UInt layer)                     { m_uiDependentLayer[layer] = v;    }
    214216  UInt    getDependentLayer(UInt layer)                             { return m_uiDependentLayer[layer]; }
     217#endif
     218#if INTER_VIEW_VECTOR_SCALING_C0115
     219  Bool getIVScalingFlag( )                                   { return m_bIVScalingFlag; }
     220  Void setIVScalingFlag(Bool b)                              { m_bIVScalingFlag = b;    }
    215221#endif
    216222  Void    setNumReorderPics(UInt v, UInt tLayer)                { m_numReorderPics[tLayer] = v;    }
     
    13431349  Int        m_aaiCodedOffset[2][MAX_VIEW_NUM];
    13441350
    1345 #if SONY_COLPIC_AVAILABILITY|QC_MVHEVC_B0046
    1346   Int         m_iViewOrderIdx;
    1347 #endif
    13481351#if LGE_ILLUCOMP_B0045
    13491352  Bool        m_bApplyIC;
    13501353#endif
    1351 
     1354#if INTER_VIEW_VECTOR_SCALING_C0115|QC_MVHEVC_B0046
     1355  Bool       m_bIVScalingFlag;
     1356  Int        m_iViewOrderIdx;    // will be changed to view_id
     1357#endif
    13521358public:
    13531359  TComSlice();
     
    14331439  Int       getRefViewId        ( RefPicList e, Int iRefIdx)    { return  m_aiRefViewIdList[e][iRefIdx]; }
    14341440  TComPic*  getTexturePic       () const                        { return  m_pcTexturePic; }
    1435 #if SONY_COLPIC_AVAILABILITY
    1436   Int       getViewOrderIdx     ()                                  { return  m_iViewOrderIdx;              }
    1437 #endif
    14381441  Int       getDepth            ()                              { return  m_iDepth;                     }
    14391442  UInt      getColDir           ()                              { return  m_uiColDir;                   }
     
    14851488  Void      setRefViewId        ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefViewIdList[e][iRefIdx] = i; }
    14861489  Void      setTexturePic       ( TComPic *pcTexturePic )       { m_pcTexturePic = pcTexturePic; }
    1487 #if SONY_COLPIC_AVAILABILITY
    1488   Void      setViewOrderIdx     ( Int i )                       { m_iViewOrderIdx     = i;      }
    1489 #endif
    14901490  Void      setNumRefIdx        ( RefPicList e, Int i )         { m_aiNumRefIdx[e]    = i;      }
    14911491  Void      setPic              ( TComPic* p )                  { m_pcPic             = p;      }
     
    16611661  Void      setNewRefIdx        ( RefPicList e, Int i )         { m_aiNewRefIdx[e]    = i;      }
    16621662#endif
    1663 
     1663#if INTER_VIEW_VECTOR_SCALING_C0115
     1664  Void setIVScalingFlag( Bool val )         { m_bIVScalingFlag = val;     }
     1665  Bool getIVScalingFlag()                   { return m_bIVScalingFlag;    }
     1666  Void setViewOrderIdx     ( Int i )        { m_iViewOrderIdx     = i;    }   // will be changed to view_id
     1667  Int  getViewOrderIdx     ()               { return  m_iViewOrderIdx;    }   // will be changed to view_id
     1668#endif
    16641669protected:
    16651670  TComPic*  xGetRefPic        (TComList<TComPic*>& rcListPic, UInt uiPOC);
  • branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TypeDef.h

    r254 r262  
    148148///// ***** OTHERS *********
    149149#define LG_ZEROINTRADEPTHRESI_A0087       1   // JCT2-A0087
    150 #define SONY_COLPIC_AVAILABILITY          1
     150#define INTER_VIEW_VECTOR_SCALING_C0115   1   // JCT2-C0115 Inter-view vector scaling for TMVP & flag
    151151#define HHI_FULL_PEL_DEPTH_MAP_MV_ACC     1   // full-pel mv accuracy for depth maps
    152152#define VIDYO_VPS_INTEGRATION             1
  • branches/HTM-5.1-dev2-Sony/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r254 r262  
    14581458      }
    14591459    }
     1460#if INTER_VIEW_VECTOR_SCALING_C0115
     1461    READ_FLAG( uiCode,  "inter_view_vector_scaling_flag" );    pcVPS->setIVScalingFlag( uiCode ? true:false);
     1462#endif
    14601463  }
    14611464 
  • branches/HTM-5.1-dev2-Sony/source/Lib/TLibDecoder/TDecTop.cpp

    r254 r262  
    254254  m_iMaxRefPicNum = 0;
    255255  m_uiValidPS = 0;
    256 #if SONY_COLPIC_AVAILABILITY
    257   m_iViewOrderIdx = 0;
    258 #endif
    259256#if ENC_DEC_TRACE
    260257  g_hTrace = fopen( "TraceDec.txt", "wb" );
     
    687684  }
    688685
    689 #if SONY_COLPIC_AVAILABILITY
    690   m_apcSlicePilot->setViewOrderIdx( m_apcSlicePilot->getSPS()->getViewOrderIdx());
    691 #endif
    692 
    693686#if NAL_REF_FLAG
    694687  m_apcSlicePilot->setReferenced(nalu.m_nalRefFlag);
     
    768761    xGetNewPicBuffer (m_apcSlicePilot, pcPic);
    769762
    770 #if SONY_COLPIC_AVAILABILITY
    771     pcPic->setViewOrderIdx( m_apcSlicePilot->getSPS()->getViewOrderIdx() );
    772 #endif
    773 
     763#if INTER_VIEW_VECTOR_SCALING_C0115
     764    pcPic->setViewOrderIdx( m_apcSlicePilot->getVPS()->getViewOrderIdx(nalu.m_layerId) );    // will be changed to view_id
     765#endif
    774766    /* transfer any SEI messages that have been received to the picture */
    775767    pcPic->setSEIs(m_SEIs);
     
    996988#endif
    997989
    998 #if SONY_COLPIC_AVAILABILITY
     990#if INTER_VIEW_VECTOR_SCALING_C0115
    999991#if VIDYO_VPS_INTEGRATION
    1000     pcSlice->setViewOrderIdx( pcSlice->getVPS()->getViewOrderIdx(nalu.m_layerId) );
     992    pcSlice->setViewOrderIdx( pcSlice->getVPS()->getViewOrderIdx(nalu.m_layerId) );        // will be changed to view_id
    1001993#else
    1002994    pcSlice->setViewOrderIdx( pcPic->getViewOrderIdx() );
    1003995#endif
     996#endif
     997
     998#if INTER_VIEW_VECTOR_SCALING_C0115
     999    pcSlice->setIVScalingFlag( pcSlice->getVPS()->getIVScalingFlag());
    10041000#endif
    10051001
  • branches/HTM-5.1-dev2-Sony/source/Lib/TLibDecoder/TDecTop.h

    r210 r262  
    118118 
    119119  SEImessages *m_SEIs; ///< "all" SEI messages.  If not NULL, we own the object.
    120 
    121 #if SONY_COLPIC_AVAILABILITY
    122   Int                     m_iViewOrderIdx;
    123 #endif
    124120
    125121  // functional classes
     
    187183  Void setIsDepth( Bool isDepth ) { m_isDepth = isDepth; }
    188184
    189 #if SONY_COLPIC_AVAILABILITY
    190   Void setViewOrderIdx(Int i)     { m_iViewOrderIdx = i ;}
    191   Int  getViewOrderIdx()          { return m_iViewOrderIdx ; }
    192 #endif
    193 
    194185#if DEPTH_MAP_GENERATION
    195186  TComDepthMapGenerator*  getDepthMapGenerator  () { return &m_cDepthMapGenerator; }
  • branches/HTM-5.1-dev2-Sony/source/Lib/TLibEncoder/TEncCavlc.cpp

    r254 r262  
    498498      }
    499499    }
     500#if INTER_VIEW_VECTOR_SCALING_C0115
     501      WRITE_FLAG( pcVPS->getIVScalingFlag(),                      "inter_view_vector_scaling_flag" );
     502#endif
    500503  }
    501504 
  • branches/HTM-5.1-dev2-Sony/source/Lib/TLibEncoder/TEncCfg.h

    r210 r262  
    170170  Bool      m_bUseIC;
    171171#endif
     172#if INTER_VIEW_VECTOR_SCALING_C0115
     173  Bool      m_bUseIVS;
     174#endif
    172175#if SAO_UNIT_INTERLEAVING
    173176  Int       m_maxNumOffsetsPerPic;
     
    713716  Void  setUseIC                       ( Bool bVal )   {m_bUseIC = bVal;}
    714717  Bool  getUseIC                       ()              {return m_bUseIC;}
     718#endif
     719#if INTER_VIEW_VECTOR_SCALING_C0115
     720  Void  setUseIVS                       ( Bool bVal )   {m_bUseIVS = bVal;}
     721  Bool  getUseIVS                       ()              {return m_bUseIVS;}
    715722#endif
    716723#if SAO_UNIT_INTERLEAVING
     
    869876  Void      setCodedOffset                  ( Int** p )      { m_aaiCodedOffset         = p; }
    870877
    871 #if SONY_COLPIC_AVAILABILITY
    872   Int       getViewOrderIdx                 ()      { return  m_iViewOrderIdx; }
     878#if INTER_VIEW_VECTOR_SCALING_C0115
     879  Int       getViewOrderIdx                 ()      { return  m_iViewOrderIdx; }    // will be changed to view_id
    873880#endif
    874881};
  • branches/HTM-5.1-dev2-Sony/source/Lib/TLibEncoder/TEncGOP.cpp

    r254 r262  
    259259      pcSlice->setViewId( m_pcEncTop->getViewId() );
    260260      pcSlice->setIsDepth( m_pcEncTop->getIsDepth() );
     261#if INTER_VIEW_VECTOR_SCALING_C0115
     262      pcSlice->setIVScalingFlag( m_pcEncTop->getUseIVS() );
     263#endif
    261264
    262265      m_pcEncTop->getSPS()->setDisInter4x4(m_pcEncTop->getDisInter4x4());
  • branches/HTM-5.1-dev2-Sony/source/Lib/TLibEncoder/TEncSlice.cpp

    r254 r262  
    190190  rpcSlice->setPOC( uiPOCCurr );
    191191 
    192 #if SONY_COLPIC_AVAILABILITY
    193   rpcSlice->setViewOrderIdx(m_pcCfg->getViewOrderIdx());
     192#if INTER_VIEW_VECTOR_SCALING_C0115
     193  rpcSlice->setViewOrderIdx(m_pcCfg->getViewOrderIdx());    // will be changed to view_id
    194194#endif
    195195#if LGE_ILLUCOMP_B0045
  • branches/HTM-5.1-dev2-Sony/source/Lib/TLibEncoder/TEncTop.cpp

    r210 r262  
    404404  pcPicYuvOrg->copyToPic( pcPicCurr->getPicYuvOrg() );
    405405
    406 #if SONY_COLPIC_AVAILABILITY
    407   pcPicCurr->setViewOrderIdx(m_iViewOrderIdx);
     406#if INTER_VIEW_VECTOR_SCALING_C0115
     407  pcPicCurr->setViewOrderIdx(m_iViewOrderIdx);    // will be changed to view_id
    408408#endif
    409409  pcPicCurr->setScaleOffset( m_aaiCodedScale, m_aaiCodedOffset );
Note: See TracChangeset for help on using the changeset viewer.