Changeset 194 in 3DVCSoftware for branches/HTM-5.0-Qualcomm/source/App


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/App
Files:
11 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
Note: See TracChangeset for help on using the changeset viewer.