Changeset 193 in 3DVCSoftware for branches/HTM-4.0.1-VSP-dev0/source/App


Ignore:
Timestamp:
19 Nov 2012, 21:15:40 (12 years ago)
Author:
mitsubishi-htm
Message:

A second release, as planned

  • Migrate to HTM 4.1
  • Move VSP related switches to cfg file instead of #define in the source code
  • A few bug fixes
  • For VC project files, only VC9 file is updated

TODO

  • Migrate to HTM 5.0, to be used as anchor for CE1 toward Geneva meeting
Location:
branches/HTM-4.0.1-VSP-dev0/source/App
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-4.0.1-VSP-dev0/source/App/TAppDecoder/TAppDecCfg.cpp

    r100 r193  
    103103  if (!m_pchBitstreamFile)
    104104  {
    105     fprintf(stderr, "No input file specifed, aborting\n");
     105    fprintf(stderr, "No input file specified, aborting\n");
    106106    return false;
    107107  }
  • branches/HTM-4.0.1-VSP-dev0/source/App/TAppDecoder/TAppDecTop.cpp

    r166 r193  
    262262    }
    263263  }
    264 #if DEBUGIMGOUT
    265   for(Int viewDepthIdx=0; viewDepthIdx<m_tVideoIOYuvReconDbgFile.size() ; viewDepthIdx++)
    266   {
    267     if( m_tVideoIOYuvReconDbgFile[viewDepthIdx] )
    268     {
    269       m_tVideoIOYuvReconDbgFile[viewDepthIdx]->close();
    270       delete m_tVideoIOYuvReconDbgFile[viewDepthIdx];
    271       m_tVideoIOYuvReconDbgFile[viewDepthIdx] = NULL ;
    272     }
    273   }
    274 #endif
    275264
    276265  for(Int viewDepthIdx=0; viewDepthIdx<m_tDecTop.size() ; viewDepthIdx++)
     
    341330#endif
    342331      }
    343 #if DEBUGIMGOUT
    344 #if PIC_CROPPING
    345       m_tVideoIOYuvReconDbgFile[viewDepthId]->write( pcPic->getPicYuvRecDbg(), sps->getPicCropLeftOffset(), sps->getPicCropRightOffset(), sps->getPicCropTopOffset(), sps->getPicCropBottomOffset() );
    346 #else
    347       m_tVideoIOYuvReconDbgFile[viewDepthId]->write( pcPic->getPicYuvRecDbg(), pcPic->getSlice(0)->getSPS()->getPad() );
    348 #endif
    349 #endif   
    350332     
    351333      // update POC of display order
     
    406388#endif
    407389      }
    408 #if DEBUGIMGOUT
    409 #if PIC_CROPPING
    410       m_tVideoIOYuvReconDbgFile[viewDepthId]->write( pcPic->getPicYuvRecDbg(), sps->getPicCropLeftOffset(), sps->getPicCropRightOffset(), sps->getPicCropTopOffset(), sps->getPicCropBottomOffset() );
    411 #else
    412       m_tVideoIOYuvReconDbgFile[viewDepthId]->write( pcPic->getPicYuvRecDbg(), pcPic->getSlice(0)->getSPS()->getPad() );
    413 #endif
    414 #endif
    415390     
    416391      // update POC of display order
     
    501476  }
    502477#endif
    503 #if DEBUGIMGOUT
    504   while( m_tVideoIOYuvReconDbgFile.size() < newNumberOfViewDepth)
    505   {
    506     m_tVideoIOYuvReconDbgFile.push_back(new TVideoIOYuv);
    507     Char buffer[4];
    508     sprintf(buffer,"_%i", (Int)(m_tVideoIOYuvReconDbgFile.size()-1) / 2 );
    509     Char* nextFilename = NULL;
    510     if( (m_tVideoIOYuvReconDbgFile.size() % 2) == 0 )
    511     {
    512       Char* pchTempFilename = NULL;
    513       xAppendToFileNameEnd( "DebugImg.yuv", "_depth", pchTempFilename);
    514       xAppendToFileNameEnd( pchTempFilename, buffer, nextFilename);
    515       free ( pchTempFilename );
    516     }
    517     else
    518     {
    519       xAppendToFileNameEnd( "DebugImg.yuv", buffer, nextFilename);
    520     }
    521     if( isDepth || ( !isDepth && (m_tVideoIOYuvReconDbgFile.size() % 2) == 1 ) )
    522     {
    523       m_tVideoIOYuvReconDbgFile.back()->open( nextFilename, true, m_outputBitDepth, g_uiBitDepth + g_uiBitIncrement );
    524     }
    525     free ( nextFilename );
    526   }
    527 #endif
     478
    528479  while( m_pocLastDisplay.size() < newNumberOfViewDepth )
    529480  {
     
    587538{
    588539  //first view does not have VSP
    589 #if VSP_TEXT_ONLY
    590   if((iCodedViewIdx == 0)||(bDepth))
    591 #else
    592540  if((iCodedViewIdx == 0))
    593 #endif
    594541    return;
    595542  pcPicVSP->getSlice(0)->setPOC( iCurPoc );
     543  pcPicVSP->getSlice(0)->setViewId( iCodedViewIdx );
    596544  Int iNeighborViewId = 0;
    597545  Bool bRenderFromLeft;
  • branches/HTM-4.0.1-VSP-dev0/source/App/TAppDecoder/TAppDecTop.h

    r166 r193  
    6868
    6969  std::vector<TVideoIOYuv*>       m_tVideoIOYuvReconFile;         ///< reconstruction YUV class
    70 #if DEBUGIMGOUT
    71   std::vector<TVideoIOYuv*>       m_tVideoIOYuvReconDbgFile;      ///< debug YUV class
    72 #endif
    7370
    7471  // for output control
  • branches/HTM-4.0.1-VSP-dev0/source/App/TAppEncoder/TAppEncCfg.cpp

    r166 r193  
    120120#endif
    121121
     122#if FIX_MEM_LEAKS
     123 if ( m_pchCameraParameterFile != NULL )
     124   free ( m_pchCameraParameterFile );
     125
     126 if ( m_pchBaseViewCameraNumbers != NULL )
     127   free ( m_pchBaseViewCameraNumbers );
     128
     129 if ( m_pchdQPFile      != NULL )
     130   free ( m_pchdQPFile      );
     131
     132 if ( m_pchColumnWidth  != NULL )
     133   free ( m_pchColumnWidth  );
     134
     135 if ( m_pchRowHeight    != NULL )
     136   free ( m_pchRowHeight    );
     137
     138 if ( m_scalingListFile != NULL )
     139   free ( m_scalingListFile );
     140
     141#endif   
     142
    122143}
    123144
     
    168189    in>>entry.m_interViewRefPosL1[i];
    169190  }
     191#if VSP_CFG
     192  in>>entry.m_numVSPRefPics;
     193  for( Int i = 0; i < entry.m_numVSPRefPics; i++ )
     194  {
     195    in>>entry.m_VSPRefPics[i];
     196  }
     197  for( Int i = 0; i < entry.m_numVSPRefPics; i++ )
     198  {
     199    in>>entry.m_VSPRefPosL0[i];
     200  }
     201  for( Int i = 0; i < entry.m_numVSPRefPics; i++ )
     202  {
     203    in>>entry.m_VSPRefPosL1[i];
     204  }
     205#endif
     206
    170207  return in;
    171208}
     
    339376  ("AllowNegDist",                    m_bAllowNegDist           , true          , "Allow negative Distortion in VSO")
    340377#endif
    341 
     378#if LGE_WVSO_A0119
     379  ("WVSO",                            m_bUseWVSO                , false         , "Use depth fidelity term for VSO" )
     380  ("VSOWeight",                       m_iVSOWeight              , 10            , "Synthesized View Distortion Change weight" )
     381  ("VSDWeight",                       m_iVSDWeight              , 1             , "View Synthesis Distortion estimate weight" )
     382  ("DWeight",                         m_iDWeight                , 1             , "Depth Distortion weight" )
     383#endif
     384
     385#if OL_DEPTHLIMIT_A0044
     386  ("DPL",                             m_bDepthPartitionLimiting , false         , "Use DepthPartitionLimiting" )
     387#endif
     388#endif
     389
     390#if VSP_N
     391  ("VSP",                             m_bUseVSP                 , false         , "Use VSP" )   
     392  ("VSPDepthDisable",                 m_bVSPDepthDisable        , false         , "Use VSP Depth Disable" )   
    342393#endif
    343394
     
    498549  m_pchRowHeight = cfg_RowHeight.empty() ? NULL : strdup(cfg_RowHeight.c_str());
    499550  m_scalingListFile = cfg_ScalingListFile.empty() ? NULL : strdup(cfg_ScalingListFile.c_str());
    500 
     551 
    501552  if ( m_bUsingDepthMaps )
    502553  {
     
    648699#endif
    649700
     701#if LGE_WVSO_A0119
     702  m_bUseWVSO = m_bUseVSO && m_bUseWVSO && m_bUsingDepthMaps;
     703#endif
    650704  xCleanUpVectors();
    651705
     
    11071161  }
    11081162  xConfirmPara( bErrorIvpEnhV, "Invalid inter-view coding structure for enhancement views given" );
     1163
     1164#if VSP_CFG
     1165  // validate vsp refs
     1166  Bool bErrorVspEnhV = false;
     1167  if( m_iNumberOfViews > 1 )
     1168  {
     1169    for( Int k = 1; k < m_iNumberOfViews; k++ )
     1170    {
     1171      for( Int i = 0; i < MAX_GOP+1; i++ )
     1172      {
     1173        if( m_GOPListsMvc[k][i].m_numVSPRefPics < 0 || m_GOPListsMvc[k][i].m_numVSPRefPics > 1 )
     1174        {
     1175          printf( "\nError: m_numVSPRefPics < 0 or m_numVSPRefPics > 1 \n" );
     1176          bErrorVspEnhV = true;
     1177        }
     1178
     1179        for( Int j = 0; j < m_GOPListsMvc[k][i].m_numVSPRefPics; j++ )
     1180        {
     1181          Int iAbsViewId = m_GOPListsMvc[k][i].m_VSPRefPics[j] + k;
     1182          if( iAbsViewId != 0 )
     1183          {
     1184            printf( "\nError: VSP is allowed to reference only base view\n" );
     1185            bErrorVspEnhV = true;
     1186          }
     1187          if( m_GOPListsMvc[k][i].m_sliceType == 'P' && m_GOPListsMvc[k][i].m_VSPRefPosL1[j] != 0 )
     1188          {
     1189            printf( "\nError: m_sliceType == P and m_VSPRefPosL1 != 0\n" );
     1190            bErrorVspEnhV = true;
     1191          }
     1192        }
     1193
     1194        for( Int j = 0; j < m_GOPListsMvc[k][i].m_numVSPRefPics || j < m_GOPListsMvc[k][i].m_numInterViewRefPics; j++ )
     1195        {
     1196          if( (m_GOPListsMvc[k][i].m_VSPRefPosL0[j] != 0 && m_GOPListsMvc[k][i].m_VSPRefPosL0[j] == m_GOPListsMvc[k][i].m_interViewRefPosL0[j])
     1197           || (m_GOPListsMvc[k][i].m_VSPRefPosL1[j] != 0 && m_GOPListsMvc[k][i].m_VSPRefPosL1[j] == m_GOPListsMvc[k][i].m_interViewRefPosL1[j]) )
     1198          {
     1199            printf( "\nError: vsp_ref_list_pos[%d] == IV ref list pos[%d]\n", j, j );
     1200            bErrorVspEnhV = true;
     1201          }
     1202        }
     1203      }
     1204    }
     1205  }
     1206  xConfirmPara( bErrorVspEnhV, "Invalid VSP coding structure for enhancement views given" );
     1207#endif
    11091208
    11101209  // validate temporal coding structure
     
    16921791#if HHI_VSO
    16931792  printf("VSO:%d ", m_bUseVSO             );
    1694 #endif 
     1793#endif
     1794#if LGE_WVSO_A0119
     1795  printf("WVSO:%d ", m_bUseWVSO );
     1796#endif
     1797#if OL_DEPTHLIMIT_A0044
     1798  printf("DPL:%d ", m_bDepthPartitionLimiting);
     1799#endif
    16951800#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    16961801  printf("DMM:%d ", m_bUseDMM );
     
    16981803#if HHI_MPI
    16991804  printf("MVI:%d ", m_bUseMVI ? 1 : 0 );
     1805#endif
     1806#if LGE_WVSO_A0119
     1807  printf("\nVSO : VSD : SAD weight = %d : %d : %d ", m_iVSOWeight, m_iVSDWeight, m_iDWeight );
    17001808#endif
    17011809  printf("\n\n");
  • branches/HTM-4.0.1-VSP-dev0/source/App/TAppEncoder/TAppEncCfg.h

    r102 r193  
    297297  Bool      m_bUseEstimatedVSD;                           ///< Flag for using model based VSD estimation instead of VSO for some encoder decisions (JCT3V-A0033 modification 3) 
    298298#endif
     299#if LGE_WVSO_A0119
     300  Bool      m_bUseWVSO;                                    ///< flag for using View Synthesis Optimization 
     301  Int       m_iVSOWeight;
     302  Int       m_iVSDWeight;
     303  Int       m_iDWeight;
     304#endif
     305#if VSP_N
     306  Bool      m_bUseVSP;
     307  Bool      m_bVSPDepthDisable;
     308#endif
    299309
    300310  // coding tools (depth intra modes)
    301311#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    302312  Bool      m_bUseDMM;                                        ///< flag for using DMM
     313#endif
     314
     315#if OL_DEPTHLIMIT_A0044
     316  Bool      m_bDepthPartitionLimiting;
    303317#endif
    304318
  • branches/HTM-4.0.1-VSP-dev0/source/App/TAppEncoder/TAppEncTop.cpp

    r166 r193  
    207207    m_acTEncTopList[iViewIdx]->setUseEstimatedVSD              ( false );
    208208#endif
     209#if LGE_WVSO_A0119
     210    m_acTEncTopList[iViewIdx]->setUseWVSO                      ( false );
     211#endif
    209212#endif
    210213
     
    361364    m_acTEncTopList[iViewIdx]->setUseDMM                     ( false );
    362365#endif
     366#if OL_DEPTHLIMIT_A0044
     367    m_acTEncTopList[iViewIdx]->setUseDPL                     ( false );
     368#endif
    363369#if HHI_MPI
    364370    m_acTEncTopList[iViewIdx]->setUseMVI( false );
     371#endif
     372
     373#if VSP_N
     374    m_acTEncTopList[iViewIdx]->setUseVSP( m_bUseVSP );
     375    m_acTEncTopList[iViewIdx]->setVSPDepthDisable( m_bVSPDepthDisable );
    365376#endif
    366377  }
     
    524535      m_acTEncDepthTopList[iViewIdx]->setUseEstimatedVSD              ( m_bUseEstimatedVSD );
    525536#endif
     537#if LGE_WVSO_A0119
     538      m_acTEncDepthTopList[iViewIdx]->setUseWVSO                      ( m_bUseWVSO         );
     539#endif
    526540#endif
    527541
     
    634648    m_acTEncDepthTopList[iViewIdx]->setUseDMM                     ( m_bUseDMM );
    635649#endif
     650#if OL_DEPTHLIMIT_A0044
     651    m_acTEncDepthTopList[iViewIdx]->setUseDPL                      (m_bDepthPartitionLimiting);
     652#endif
    636653#if HHI_MPI
    637654     m_acTEncDepthTopList[iViewIdx]->setUseMVI( m_bUseMVI );
     655#endif
     656
     657#if VSP_N
     658      m_acTEncDepthTopList[iViewIdx]->setUseVSP( m_bUseVSP );
     659      m_acTEncDepthTopList[iViewIdx]->setVSPDepthDisable( m_bVSPDepthDisable );
    638660#endif
    639661    }
     
    690712      AOT(true);
    691713    }
     714#if LGE_WVSO_A0119
     715    for ( Int iViewNum = 0; iViewNum < m_iNumberOfViews; iViewNum++ )
     716    {
     717      for (Int iContent = 0; iContent < 2; iContent++ )
     718      {
     719        TEncTop* pcEncTop = ( iContent == 0 ) ? m_acTEncTopList[iViewNum] : m_acTEncDepthTopList[iViewNum];
     720        pcEncTop->setUseWVSO  ( m_bUseWVSO );
     721        pcEncTop->setVSOWeight( m_iVSOWeight );
     722        pcEncTop->setVSDWeight( m_iVSDWeight );
     723        pcEncTop->setDWeight  ( m_iDWeight );
     724      }
     725    }
     726#endif
    692727  }
    693728#endif
     
    938973        iNumEncoded = 0;
    939974
    940 #if VSP_SLICE_HEADER
    941         m_acTEncTopList     [iViewIdx]->setUseVSP( (gopId%VSP_FRAME_INTERVAL==0) );
    942         m_acTEncDepthTopList[iViewIdx]->setUseVSP( (gopId%VSP_FRAME_INTERVAL==0) );
     975#if VSP_SLICE_HEADER && !VSP_CFG
     976        if( m_acTEncTopList     [iViewIdx]->getUseVSP() ) m_acTEncTopList     [iViewIdx]->setUseVSP( (gopId%VSP_FRAME_INTERVAL==0) );
     977        if( m_acTEncDepthTopList[iViewIdx]->getUseVSP() ) m_acTEncDepthTopList[iViewIdx]->setUseVSP( (gopId%VSP_FRAME_INTERVAL==0) );
    943978#endif
    944979
     
    963998#if VSP_SLICE_HEADER
    964999          if( m_acTEncDepthTopList[iViewIdx]->getUseVSP() )
     1000          if( !m_acTEncDepthTopList[iViewIdx]->getVSPDepthDisable() )
    9651001#endif
    9661002            xStoreVSPInBuffer(m_acTEncDepthTopList[iViewIdx]->getVSPBuf(), m_acTEncDepthTopList[iViewIdx]->getVSPAvailBuf(), iViewIdx, true, gopId);
     
    10031039  delete pcDepthPicYuvOrg;
    10041040  pcDepthPicYuvOrg = NULL;
     1041 
     1042#if FIX_MEM_LEAKS
     1043  if ( pcPdmDepthOrg != NULL )
     1044  {
     1045    pcPdmDepthOrg->destroy();
     1046    delete pcPdmDepthOrg;     
     1047    pcPdmDepthOrg = NULL;
     1048  };
     1049#endif
     1050
    10051051 
    10061052  for(Int iViewIdx=0; iViewIdx < m_iNumberOfViews; iViewIdx++ )
     
    12631309Void TAppEncTop::setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent, Int iHorOffset )
    12641310{
     1311#if FIX_VSO_SETUP
     1312  m_cRendererModel.setupPart( iHorOffset, Min( g_uiMaxCUHeight, m_iSourceHeight - iHorOffset ) );
     1313#else
    12651314  m_cRendererModel.setHorOffset( iHorOffset );
     1315#endif
    12661316#else
    12671317Void TAppEncTop::setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent )
     
    14101460{
    14111461  //first view does not have VSP
    1412 #if VSP_TEXT_ONLY
    1413   if((iCodedViewIdx == 0)||(bDepth))
    1414 #else
    14151462  if((iCodedViewIdx == 0))
    1416 #endif
    14171463    return;
    14181464
     
    14391485  }
    14401486  pcPicVSP->getSlice(0)->setPOC( iCurPoc );
    1441 
    1442   Int iNeighborViewId = 0;
     1487  pcPicVSP->getSlice(0)->setViewId( iCodedViewIdx );
     1488
     1489  Int iNeighborViewId = 0;  //iCodedViewIdx + m_GOPListsMvc[iCodedViewIdx][gopId].m_VSPRefPics[0];
    14431490  Bool bRenderFromLeft;
    14441491  //check if the neighboring view is situated to the left of the current view
  • branches/HTM-4.0.1-VSP-dev0/source/App/TAppRenderer/TAppRendererTop.cpp

    r101 r193  
    533533
    534534#if HHI_VSO_SPEEDUP_A0033
     535#if FIX_VSO_SETUP
     536    cCurModel.setupPart( 0, m_iSourceHeight  );
     537#else
    535538    cCurModel.setHorOffset( 0 );
     539#endif
    536540#endif
    537541
     
    710714  AOT( m_iLog2SamplingFactor != 0 );
    711715#if HHI_VSO_SPEEDUP_A0033
     716#if FIX_VSO_SETUP
     717  cCurModel.setupPart( 0, m_iSourceHeight  );
     718#else
    712719  cCurModel.setHorOffset( 0 );
     720#endif
    713721#endif
    714722#if LGE_VSO_EARLY_SKIP_A0093
Note: See TracChangeset for help on using the changeset viewer.