Changeset 1275 in 3DVCSoftware


Ignore:
Timestamp:
15 Jul 2015, 12:46:07 (9 years ago)
Author:
tech
Message:
  • Further fixes
Location:
branches/HTM-14.1-update-dev2/source/Lib
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComDataCU.cpp

    r1274 r1275  
    36313631  if ( ivMvPredFlag && cDisInfo.m_aVIdxCan!=-1)
    36323632  {
    3633 #if H_3D_IC
     3633#if NH_3D_IC
    36343634    getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP, bICFlag );
    36353635#else
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComRom.cpp

    r1274 r1275  
    564564Bool g_disableNumbering = false;
    565565Bool g_disableHLSTrace = false;
    566 UInt64 g_stopAtCounter       = 0;
     566UInt64 g_stopAtCounter       = 4660;
    567567Bool g_traceCopyBack         = false;
    568568Bool g_decTraceDispDer       = false;
     
    704704  }
    705705  Bool stopFlag = false;
    706   if ( g_stopAtPos && poc == 0 && layerId == 2 )
     706  if ( g_stopAtPos && poc == 16 && layerId == 1 )
    707707  {
    708708    Bool stopAtCU = true;
    709709    if ( stopAtCU )        // Stop at CU with specific size
    710710    {   
    711       stopFlag = ( cuPelX  == 0 ) && ( cuPelY  == 0 ) && ( cuWidth == 8 ) && ( cuHeight == 8 );
     711      stopFlag = ( cuPelX  == 0 ) && ( cuPelY  == 0 ) && ( cuWidth == 32 ) && ( cuHeight == 32 );
    712712    }
    713713    else
     
    729729  if ( ( ( g_nSymbolCounter >= COUNTER_START && g_nSymbolCounter <= COUNTER_END )|| g_bJustDoIt ) && doIt  )
    730730  {
    731     if ( g_stopAtCounter == g_nSymbolCounter )
    732     {
    733       std::cout << "Break point here." << std::endl;
    734     }
     731    incSymbolCounter(); 
    735732    if ( !g_disableNumbering )
    736733    { 
    737       fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     734      fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter );
    738735    }
    739736    fprintf( g_hTrace, "%-50s       : %d\n", symbolName, val );     
    740     fflush ( g_hTrace );
    741     g_nSymbolCounter++;
    742   }
     737    fflush ( g_hTrace );   
     738  }
     739}
     740Int incSymbolCounter( )
     741{
     742  g_nSymbolCounter++; 
     743  if ( g_stopAtCounter == g_nSymbolCounter )
     744  {
     745    std::cout << "Break point here." << std::endl;
     746  } 
     747  return g_nSymbolCounter;
    743748}
    744749Void writeToTraceFile( const Char* symbolName, Bool doIt )
     
    746751  if ( ( ( g_nSymbolCounter >= COUNTER_START && g_nSymbolCounter <= COUNTER_END )|| g_bJustDoIt ) && doIt  )
    747752  {
     753    incSymbolCounter();
    748754    fprintf( g_hTrace, "%s", symbolName );   
    749     fflush ( g_hTrace );
    750     g_nSymbolCounter++;
     755    fflush ( g_hTrace );   
    751756  }
    752757}
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComRom.h

    r1200 r1275  
    201201 Void           writeToTraceFile( const Char* symbolName, Int val, Bool doIt );
    202202 Void           writeToTraceFile( const Char* symbolName, Bool doIt );
     203 Int            incSymbolCounter();         
    203204 Void           stopAtPos       ( Int poc, Int layerId, Int cuPelX, Int cuPelY, Int cuWidth, Int cuHeight );           
    204205#endif
  • branches/HTM-14.1-update-dev2/source/Lib/TLibDecoder/SyntaxElementParser.cpp

    r1200 r1275  
    6363  if ( !g_disableNumbering )
    6464  {
    65 #endif
    66   fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
    67 #if H_MV_ENC_DEC_TRAC
    68   }
     65    incSymbolCounter();
     66    fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter );
     67  }
     68#else
     69    fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
    6970#endif
    7071  if (length < 10)
     
    9394  if ( !g_disableNumbering )
    9495  {
    95 #endif
     96  incSymbolCounter();
     97  fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter );
     98  }
     99#else
    96100  fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
    97 #if H_MV_ENC_DEC_TRAC
    98   }
    99101#endif
    100102  fprintf( g_hTrace, "%-50s ue(v) : %u\n", pSymbolName, rValue );
     
    115117  }
    116118  if ( !g_disableNumbering )
    117   {
    118 #endif
    119   fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
    120 #if H_MV_ENC_DEC_TRAC
    121   }
     119  { 
     120    incSymbolCounter();
     121    fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter );
     122  }
     123#else
     124    fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
    122125#endif
    123126  fprintf( g_hTrace, "%-50s se(v) : %d\n", pSymbolName, rValue );
     
    139142  if ( !g_disableNumbering )
    140143  {
    141 #endif
     144    incSymbolCounter();
     145    fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter );
     146  }
     147#else
    142148  fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
    143 #if H_MV_ENC_DEC_TRAC
    144   }
    145149#endif
    146150  fprintf( g_hTrace, "%-50s u(1)  : %d\n", pSymbolName, rValue );
  • branches/HTM-14.1-update-dev2/source/Lib/TLibDecoder/TDecEntropy.cpp

    r1274 r1275  
    261261  }
    262262  Int numValidMergeCand = 0;
    263 #if !NH_3D
    264263  Bool hasMergedCandList = false;
    265 #else
    266   Bool isMerged = false;
    267 #endif
    268264
    269265  pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 );
     
    309305  decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
    310306#endif
    311 #if H_3D_IC
     307#if NH_3D_IC
    312308  decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    313309#endif
     
    319315    {
    320316      UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
     317#if ENVIRONMENT_VARIABLE_DEBUG_AND_TEST
     318      if (bDebugPredEnabled)
     319      {
     320        std::cout << "Coded merge flag, CU absPartIdx: " << uiAbsPartIdx << " PU(" << uiPartIdx << ") absPartIdx: " << uiSubPartIdx;
     321        std::cout << " merge index: " << (UInt)pcCU->getMergeIndex(uiSubPartIdx) << std::endl;
     322      }
     323#endif
     324
    321325#if NH_3D_DBBP
    322326      if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false )
     
    325329#endif
    326330      {
    327         pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );
    328         if ( !isMerged )
    329         {
     331        if ( !hasMergedCandList )
     332        {
     333          pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); // temporarily set.
     334
     335#if NH_3D_MLC
    330336#if NH_3D_VSP
    331337          Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    332338          memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    333 #if H_3D_SPIVMP
     339#endif
     340#if NH_3D_SPIVMP
    334341          memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
    335342#endif
    336343          pcSubCU->initAvailableFlags();
    337           pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
     344#endif
     345          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
     346#if NH_3D_MLC
    338347          pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours
    339348#if NH_3D_SPIVMP
     
    341350#endif
    342351            , numValidMergeCand );
    343           pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag
     352          pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours
     353#if NH_3D_VSP
     354            , vspFlag
     355#endif
    344356#if NH_3D_SPIVMP
    345357            , bSPIVMPFlag
    346358#endif
    347359            , numValidMergeCand );
     360#if NH_3D_VSP
    348361          pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    349 #else
    350 #if H_3D
    351           pcSubCU->initAvailableFlags();
    352           pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
    353           pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    354 
    355 #else
    356           pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    357 #endif
    358 #endif
    359           isMerged = true;
    360         }
    361         pcSubCU->setPartSizeSubParts( ePartSize, 0, uiDepth );
     362#endif
     363#endif
     364          pcSubCU->setPartSizeSubParts( ePartSize, 0, uiDepth ); // restore.
     365          hasMergedCandList = true;
     366        }
    362367      }
    363368      else
    364369      {
    365         uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
     370#if NH_3D_MLC
    366371#if NH_3D_VSP
    367372        Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    368373        memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    369 #if H_3D_SPIVMP
     374#endif
     375#if NH_3D_SPIVMP
    370376        memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
    371377#endif
    372378        pcSubCU->initAvailableFlags();
     379#endif
    373380        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
     381#if NH_3D_MLC
    374382        pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours
    375383#if NH_3D_SPIVMP
     
    377385#endif
    378386          ,numValidMergeCand, uiMergeIndex );
    379         pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag
     387        pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours
     388#if NH_3D_VSP
     389          , vspFlag
     390#endif
    380391#if NH_3D_SPIVMP
    381392          , bSPIVMPFlag
    382393#endif
    383394          ,numValidMergeCand );
     395#if NH_3D_VSP
    384396        pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    385 #else
    386 #if H_3D
    387         pcSubCU->initAvailableFlags();
    388         pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    389         pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    390 #else
    391         pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    392397#endif
    393398#endif
     
    397402      TComMv cTmpMv( 0, 0 );
    398403      for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
    399       {       
     404      {
    400405        if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 )
    401406        {
     
    424429        }
    425430      }
    426 #if H_3D_SPIVMP
     431#if NH_3D_SPIVMP
    427432      pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 
    428433      if (bSPIVMPFlag[uiMergeIndex] != 0)
     
    455460        {
    456461          decodeMvsAMVP   ( pcSubCU, uiSubPartIdx-uiAbsPartIdx, uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) );
     462#if ENVIRONMENT_VARIABLE_DEBUG_AND_TEST
     463          if (bDebugPredEnabled)
     464          {
     465            std::cout << "refListIdx: " << uiRefListIdx << std::endl;
     466            std::cout << "MVD horizontal: " << pcCU->getCUMvField(RefPicList(uiRefListIdx))->getMvd( uiAbsPartIdx ).getHor() << std::endl;
     467            std::cout << "MVD vertical:   " << pcCU->getCUMvField(RefPicList(uiRefListIdx))->getMvd( uiAbsPartIdx ).getVer() << std::endl;
     468            std::cout << "MVPIdxPU: " << pcCU->getMVPIdx(RefPicList( uiRefListIdx ), uiSubPartIdx) << std::endl;
     469            std::cout << "InterDir: " << (UInt)pcCU->getInterDir(uiSubPartIdx) << std::endl;
     470          }
     471#endif
    457472        }
    458473      }
  • branches/HTM-14.1-update-dev2/source/Lib/TLibDecoder/TDecSlice.cpp

    r1200 r1275  
    9090  g_bJustDoIt = g_bEncDecTraceEnable;
    9191#endif
     92#if H_MV_ENC_DEC_TRAC
     93  incSymbolCounter();
     94  DTRACE_CABAC_VL( g_nSymbolCounter );
     95#else
    9296  DTRACE_CABAC_VL( g_nSymbolCounter++ );
     97#endif
    9398  DTRACE_CABAC_T( "\tPOC: " );
    9499  DTRACE_CABAC_V( pcPic->getPOC() );
  • branches/HTM-14.1-update-dev2/source/Lib/TLibEncoder/SyntaxElementWriter.cpp

    r1200 r1275  
    5252    if ( !g_disableNumbering )
    5353    {
    54 #endif
     54      incSymbolCounter();
     55      fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter );
     56    }
     57#else
    5558    fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
    56 #if H_MV_ENC_DEC_TRAC
    57     }
    5859#endif
    5960
     
    7778    if ( !g_disableNumbering )
    7879    {
    79 #endif
     80      incSymbolCounter();
     81      fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter );
     82    }
     83#else
    8084    fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
    81 #if H_MV_ENC_DEC_TRAC
    82     }
    8385#endif
    8486
     
    9597    if ( !g_disableNumbering )
    9698    {
    97 #endif
     99      incSymbolCounter();
     100      fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter );
     101    }
     102#else
    98103    fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
    99 #if H_MV_ENC_DEC_TRAC
    100     }
    101104#endif
    102105
     
    113116    if ( !g_disableNumbering )
    114117    {
     118      incSymbolCounter();
     119      fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter );
     120    }
     121#else
     122     fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
    115123#endif
    116     fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
    117 #if H_MV_ENC_DEC_TRAC
    118     }
    119 #endif
     124
    120125    fprintf( g_hTrace, "%-50s u(1)  : %d\n", pSymbolName, value );
    121126  }
  • branches/HTM-14.1-update-dev2/source/Lib/TLibEncoder/TEncCu.cpp

    r1274 r1275  
    19081908#if NH_3D_ARP
    19091909  Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1;
    1910 #if H_3D_IC
     1910#if NH_3D_IC
    19111911  if( nARPWMax < 0 || bICFlag )
    19121912#else
     
    22562256    Bool bFirstTime = true;
    22572257    Int nARPWMax    = rpcTempCU->getSlice()->getARPStepNum() - 1;
    2258 #if H_3D_IC
     2258#if NH_3D_IC
    22592259    if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N || rpcTempCU->getICFlag(0) )
    22602260#else
  • branches/HTM-14.1-update-dev2/source/Lib/TLibEncoder/TEncSlice.cpp

    r1274 r1275  
    11211121  g_bJustDoIt = g_bEncDecTraceEnable;
    11221122#endif
     1123#if H_MV_ENC_DEC_TRAC
     1124  incSymbolCounter();
     1125  DTRACE_CABAC_VL( g_nSymbolCounter );
     1126#else
    11231127  DTRACE_CABAC_VL( g_nSymbolCounter++ );
     1128#endif
    11241129  DTRACE_CABAC_T( "\tPOC: " );
    11251130  DTRACE_CABAC_V( pcPic->getPOC() );
Note: See TracChangeset for help on using the changeset viewer.