Changeset 964 in 3DVCSoftware for trunk/source/App


Ignore:
Timestamp:
5 Jul 2014, 05:16:45 (11 years ago)
Author:
tech
Message:
  • Merged 11.0-dev0@963. (Update to HM 14.0 + MV-HEVC Draft 8 HLS)
  • Added coding results.
  • Changed version number.
Location:
trunk/source/App
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/source/App/TAppDecoder/TAppDecCfg.h

    r872 r964  
    4545#include "TLibCommon/CommonDef.h"
    4646#include <vector>
    47 
    4847//! \ingroup TAppDecoder
    4948//! \{
  • TabularUnified trunk/source/App/TAppDecoder/TAppDecTop.cpp

    r884 r964  
    7070    m_pScaleOffsetFile  = 0;
    7171#endif
     72
     73#if H_MV_HLS_7_VPS_P0300_27
     74    m_markedForOutput = false;
     75#endif
     76
    7277}
    7378
     
    152157  Bool openedReconFile = false; // reconstruction file not yet opened. (must be performed after SPS is seen)
    153158#else
    154 #if H_3D
     159
    155160  Int  pocCurrPic        = -MAX_INT;     
    156161  Int  pocLastPic        = -MAX_INT;   
    157 #endif
    158 
     162
     163#if H_MV_HLS_7_VPS_P0300_27
     164  Int  layerIdLastPic    = -MAX_INT;
     165#endif
    159166  Int  layerIdCurrPic    = 0;
    160167
     
    188195    Bool newSliceDiffPoc   = false;
    189196    Bool newSliceDiffLayer = false;
    190     Bool sliceSkippedFlag = false;
    191 #if H_3D
     197    Bool sliceSkippedFlag  = false;
    192198    Bool allLayersDecoded  = false;     
    193 #endif
    194199#endif
    195200    if (nalUnit.empty())
     
    210215          || nalu.m_layerId > MAX_NUM_LAYER_IDS-1
    211216          || (nalu.m_nalUnitType == NAL_UNIT_VPS && nalu.m_layerId > 0)           
    212           || (nalu.m_nalUnitType == NAL_UNIT_EOB && nalu.m_layerId > 0)           
     217          || (nalu.m_nalUnitType == NAL_UNIT_EOB && nalu.m_layerId > 0)   
     218#if H_MV_HLS_8_MIS_Q0177_47
     219          || (nalu.m_nalUnitType == NAL_UNIT_EOS && nalu.m_layerId > 0)   
     220#endif
    213221         )
    214222      {
     
    229237        // - nalu.isSlice() == true     
    230238
     239#if H_MV_HLS_7_VPS_P0300_27
     240        if ( nalu.m_nalUnitType == NAL_UNIT_VPS )
     241        {
     242          m_vps = m_tDecTop[decIdx]->getPrefetchedVPS();
     243          if ( m_targetDecLayerIdSetFileEmpty )
     244          {
     245            TComVPS* vps = m_vps;
     246#else
    231247        // Update TargetDecLayerIdList only when not specified by layer id file, specification by file might actually out of conformance.
    232248        if (nalu.m_nalUnitType == NAL_UNIT_VPS && m_targetDecLayerIdSetFileEmpty )
    233249        {
    234250          TComVPS* vps = m_tDecTop[decIdx]->getPrefetchedVPS();
     251#endif
    235252          if ( m_targetOptLayerSetIdx == -1 )
    236253          {
     
    238255            m_targetOptLayerSetIdx = vps->getVpsNumLayerSetsMinus1();
    239256          }
     257#if H_MV_HLS_8_HRD_Q0102_08
     258          for (Int dI = 0; dI < m_numDecoders; dI++ )
     259          {
     260            m_tDecTop[decIdx]->setTargetOptLayerSetIdx( m_targetOptLayerSetIdx );
     261          }
     262#endif
    240263
    241264          if ( m_targetOptLayerSetIdx < 0 || m_targetOptLayerSetIdx >= vps->getNumOutputLayerSets() )
     
    246269          m_targetDecLayerIdSet = vps->getTargetDecLayerIdList( m_targetOptLayerSetIdx );
    247270        }
    248 
     271#if H_MV_HLS_7_VPS_P0300_27
     272      }
     273#endif
    249274#if H_3D
    250275        if (nalu.m_nalUnitType == NAL_UNIT_VPS )
     
    257282        {
    258283          layerIdCurrPic = nalu.m_layerId;
    259 #if H_3D
    260284          pocCurrPic     = m_tDecTop[decIdx]->getCurrPoc();
    261 #endif
    262285          decIdxCurrPic  = decIdx;
    263286          firstSlice     = false;
     
    266289        if ( bNewPicture || !bitstreamFile )
    267290        {
     291#if H_MV_HLS_7_VPS_P0300_27
     292          layerIdLastPic    = layerIdCurrPic;
     293#endif
    268294          layerIdCurrPic    = nalu.m_layerId;
    269 #if H_3D         
    270295          pocLastPic        = pocCurrPic;
    271296          pocCurrPic        = m_tDecTop[decIdx]->getCurrPoc();
    272 #endif         
    273297          decIdxLastPic     = decIdxCurrPic;
    274298          decIdxCurrPic     = decIdx;
    275 #if H_3D
    276299          allLayersDecoded = ( pocCurrPic != pocLastPic );
    277 #endif
    278300        }
    279301#else
     
    318340        assert( decIdxLastPic != -1 );
    319341        m_tDecTop[decIdxLastPic]->endPicDecoding(poc, pcListPic, m_targetDecLayerIdSet );
     342#if H_MV_HLS_7_VPS_P0300_27
     343        xMarkForOutput( allLayersDecoded, poc, layerIdLastPic );
     344#endif
    320345#else
    321346        m_cTDecTop.executeLoopFilters(poc, pcListPic);
     
    324349      loopFiltered = (nalu.m_nalUnitType == NAL_UNIT_EOS);
    325350    }
     351#if !FIX_WRITING_OUTPUT
     352#if SETTING_NO_OUT_PIC_PRIOR
     353    if (bNewPicture && m_cTDecTop.getIsNoOutputPriorPics())
     354    {
     355      m_cTDecTop.checkNoOutputPriorPics( pcListPic );
     356    }
     357#endif
     358#endif
    326359#if H_3D
    327360    if ( allLayersDecoded || !bitstreamFile )
     
    351384        m_reconOpen[decIdxLastPic] = true;
    352385      }
     386#if FIX_WRITING_OUTPUT
     387      // write reconstruction to file
     388      if( bNewPicture )
     389      {
     390        // Bumping after picture has been decoded
     391#if ENC_DEC_TRACE
     392        g_bJustDoIt = true; 
     393        writeToTraceFile( "Bumping after decoding \n", g_decTracePicOutput  );         
     394        g_bJustDoIt = false; 
     395#endif
     396        xWriteOutput( pcListPic, decIdxLastPic, nalu.m_temporalId );
     397      }
     398#if SETTING_NO_OUT_PIC_PRIOR
     399      if ( (bNewPicture || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA) && m_tDecTop[decIdxLastPic]->getNoOutputPriorPicsFlag() )
     400      {
     401        m_tDecTop[decIdxLastPic]->checkNoOutputPriorPics( pcListPic );
     402        m_tDecTop[decIdxLastPic]->setNoOutputPriorPicsFlag (false);
     403      }
     404#endif
     405#endif
    353406      if ( bNewPicture && newSliceDiffPoc &&
    354407#else
     
    356409        openedReconFile  = true;
    357410      }
     411#if FIX_WRITING_OUTPUT
     412      // write reconstruction to file
     413      if( bNewPicture )
     414      {
     415        xWriteOutput( pcListPic, nalu.m_temporalId );
     416      }
     417#if SETTING_NO_OUT_PIC_PRIOR
     418      if ( (bNewPicture || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA) && m_cTDecTop.getNoOutputPriorPicsFlag() )
     419      {
     420        m_cTDecTop.checkNoOutputPriorPics( pcListPic );
     421        m_cTDecTop.setNoOutputPriorPicsFlag (false);
     422      }
     423#endif
     424#endif
    358425      if ( bNewPicture &&
    359426#endif
     
    373440      {
    374441#if H_MV
     442#if FIX_OUTPUT_EOS
     443        xWriteOutput( pcListPic, decIdxLastPic, nalu.m_temporalId );
     444#else
    375445        xFlushOutput( pcListPic, decIdxLastPic );
     446#endif
     447#else
     448#if FIX_OUTPUT_EOS
     449        xWriteOutput( pcListPic, nalu.m_temporalId );
    376450#else
    377451        xFlushOutput( pcListPic );
    378452#endif
    379       }
    380       // write reconstruction to file
     453
     454#endif
     455      }
     456      // write reconstruction to file -- for additional bumping as defined in C.5.2.3
     457#if H_MV
     458      // Above comment seems to be wrong
     459#endif
     460#if FIX_WRITING_OUTPUT
     461      if(!bNewPicture && nalu.m_nalUnitType >= NAL_UNIT_CODED_SLICE_TRAIL_N && nalu.m_nalUnitType <= NAL_UNIT_RESERVED_VCL31)
     462#else
    381463      if(bNewPicture)
    382       {
    383 #if H_MV
    384         xWriteOutput( pcListPic, decIdxLastPic, nalu.m_temporalId );
    385       }
    386     }
    387   }
    388 
     464#endif
     465      {
     466#if H_MV       
     467        // Bumping after reference picture set has been applied (here after first vcl nalu.
     468#if ENC_DEC_TRACE
     469        g_bJustDoIt = true; 
     470        writeToTraceFile( "Bumping after reference picture set has been applied \n", g_decTracePicOutput  );         
     471        g_bJustDoIt = false; 
     472#endif
     473
     474        xWriteOutput( m_tDecTop[decIdxCurrPic]->getListPic(), decIdxCurrPic, nalu.m_temporalId );
     475#else
     476        xWriteOutput( pcListPic, nalu.m_temporalId );
     477#endif
     478      }
     479    }
     480  }
     481#if H_MV
    389482#if H_3D
    390483  if( m_cCamParsCollector.isInitialized() )
     
    397490    xFlushOutput( m_tDecTop[decIdx]->getListPic(), decIdx );
    398491  }
    399 #else
    400         xWriteOutput( pcListPic, nalu.m_temporalId );
    401       }
    402     }
    403   }
    404  
     492#else 
    405493  xFlushOutput( pcListPic );
    406494  // delete buffers
     
    497585  TComList<TComPic*>::iterator iterPic   = pcListPic->begin();
    498586  Int numPicsNotYetDisplayed = 0;
     587  Int dpbFullness = 0;
     588#if H_MV
     589  // preliminary fix
     590  TComSPS* activeSPS = m_tDecTop[0]->getActiveSPS();
     591#else
     592  TComSPS* activeSPS = m_cTDecTop.getActiveSPS();
     593#endif
     594  UInt numReorderPicsHighestTid;
     595  UInt maxDecPicBufferingHighestTid;
     596  UInt maxNrSublayers = activeSPS->getMaxTLayers();
     597
     598  if(m_iMaxTemporalLayer == -1 || m_iMaxTemporalLayer >= maxNrSublayers)
     599  {
     600    numReorderPicsHighestTid = activeSPS->getNumReorderPics(maxNrSublayers-1);
     601    maxDecPicBufferingHighestTid =  activeSPS->getMaxDecPicBuffering(maxNrSublayers-1);
     602  }
     603  else
     604  {
     605    numReorderPicsHighestTid = activeSPS->getNumReorderPics(m_iMaxTemporalLayer);
     606    maxDecPicBufferingHighestTid = activeSPS->getMaxDecPicBuffering(m_iMaxTemporalLayer);
     607  }
    499608 
    500609  while (iterPic != pcListPic->end())
     
    508617    {
    509618      numPicsNotYetDisplayed++;
     619      dpbFullness++;
     620    }
     621    else if(pcPic->getSlice( 0 )->isReferenced())
     622    {
     623      dpbFullness++;
    510624    }
    511625    iterPic++;
     
    533647          && pcPicBottom->getOutputMark() && (numPicsNotYetDisplayed >  pcPicBottom->getNumReorderPics(tId) && (pcPicTop->getPOC() == m_pocLastDisplay[decIdx]+1 || m_pocLastDisplay[decIdx]<0)))
    534648#else
    535       if ( pcPicTop->getOutputMark() && (numPicsNotYetDisplayed >  pcPicTop->getNumReorderPics(tId) && !(pcPicTop->getPOC()%2) && pcPicBottom->getPOC() == pcPicTop->getPOC()+1)
    536           && pcPicBottom->getOutputMark() && (numPicsNotYetDisplayed >  pcPicBottom->getNumReorderPics(tId) && (pcPicTop->getPOC() == m_iPOCLastDisplay+1 || m_iPOCLastDisplay<0)))
     649      if ( pcPicTop->getOutputMark() && pcPicBottom->getOutputMark() &&
     650          (numPicsNotYetDisplayed >  numReorderPicsHighestTid || dpbFullness > maxDecPicBufferingHighestTid) &&
     651          (!(pcPicTop->getPOC()%2) && pcPicBottom->getPOC() == pcPicTop->getPOC()+1) &&
     652          (pcPicTop->getPOC() == m_iPOCLastDisplay+1 || m_iPOCLastDisplay < 0))
    537653#endif
    538654      {
     
    552668        assert( conf   .getScaledFlag() );
    553669        assert( defDisp.getScaledFlag() );
     670#if ENC_DEC_TRACE
     671        g_bJustDoIt = true; 
     672        writeToTraceFile( "OutputPic Poc"   , pcPic->getPOC    (), g_decTracePicOutput  );
     673        writeToTraceFile( "OutputPic LayerId", pcPic->getLayerId(), g_decTracePicOutput );         
     674        g_bJustDoIt = false; 
     675#endif
    554676        m_tVideoIOYuvReconFile[decIdx]->write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(),
    555677#else
     
    613735
    614736#if H_MV
    615       if ( pcPic->getOutputMark() && (numPicsNotYetDisplayed >  pcPic->getNumReorderPics(tId) && pcPic->getPOC() > m_pocLastDisplay[decIdx]))
     737      if(pcPic->getOutputMark() && pcPic->getPOC() > m_pocLastDisplay[decIdx] &&
     738        (numPicsNotYetDisplayed >  numReorderPicsHighestTid || dpbFullness > maxDecPicBufferingHighestTid))
    616739#else     
    617       if ( pcPic->getOutputMark() && (numPicsNotYetDisplayed >  pcPic->getNumReorderPics(tId) && pcPic->getPOC() > m_iPOCLastDisplay))
     740      if(pcPic->getOutputMark() && pcPic->getPOC() > m_iPOCLastDisplay &&
     741        (numPicsNotYetDisplayed >  numReorderPicsHighestTid || dpbFullness > maxDecPicBufferingHighestTid))
    618742#endif
    619743      {
    620744        // write to file
    621745        numPicsNotYetDisplayed--;
     746        if(pcPic->getSlice(0)->isReferenced() == false)
     747        {
     748          dpbFullness--;
     749        }
    622750#if H_MV
    623751      if ( m_pchReconFiles[decIdx] )
     
    631759        assert( conf   .getScaledFlag() );
    632760        assert( defDisp.getScaledFlag() );
     761#if ENC_DEC_TRACE
     762        g_bJustDoIt = true; 
     763        writeToTraceFile( "OutputPic Poc"   , pcPic->getPOC    (), g_decTracePicOutput  );
     764        writeToTraceFile( "OutputPic LayerId", pcPic->getLayerId(), g_decTracePicOutput );         
     765        g_bJustDoIt = false;
     766#endif
    633767        m_tVideoIOYuvReconFile[decIdx]->write( pcPic->getPicYuvRec(),
    634768#else
     
    665799        }
    666800        pcPic->setOutputMark(false);
     801#if H_MV_HLS_7_VPS_P0300_27
     802        pcPic->setPicOutputFlag(false);
     803#endif
    667804      }
    668805     
     
    715852        assert( conf   .getScaledFlag() );
    716853        assert( defDisp.getScaledFlag() );
     854#if ENC_DEC_TRACE
     855        g_bJustDoIt = true; 
     856        writeToTraceFile( "OutputPic Poc"   , pcPic->getPOC    (), g_decTracePicOutput  );
     857        writeToTraceFile( "OutputPic LayerId", pcPic->getLayerId(), g_decTracePicOutput );         
     858        g_bJustDoIt = false; 
     859#endif
    717860        m_tVideoIOYuvReconFile[decIdx]->write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(),
    718861#else
     
    802945        assert( conf   .getScaledFlag() );
    803946        assert( defDisp.getScaledFlag() );
     947#if ENC_DEC_TRACE
     948        g_bJustDoIt = true; 
     949        writeToTraceFile( "OutputPic Poc"   , pcPic->getPOC    (), g_decTracePicOutput  );
     950        writeToTraceFile( "OutputPic LayerId", pcPic->getLayerId(), g_decTracePicOutput );         
     951        g_bJustDoIt = false; 
     952#endif
    804953        m_tVideoIOYuvReconFile[decIdx]->write( pcPic->getPicYuvRec(),
    805954#else
     
    836985        }
    837986        pcPic->setOutputMark(false);
     987#if H_MV_HLS_7_VPS_P0300_27
     988        pcPic->setPicOutputFlag(false);
     989#endif
    838990      }
    839991#if !H_MV
     
    9091061    m_tDecTop[ decIdx ]->setIvPicLists( &m_ivPicLists );
    9101062    m_tDecTop[ decIdx ]->setLayerInitilizedFlags( m_layerInitilizedFlags );
     1063#if    H_MV_HLS_8_HRD_Q0102_08
     1064    m_tDecTop[ decIdx ]->setTargetOptLayerSetIdx( m_targetOptLayerSetIdx );   
     1065#endif
    9111066
    9121067#if H_3D
     
    9411096  };
    9421097  return decIdx;
     1098
    9431099}
     1100
     1101
     1102#if H_MV_HLS_7_VPS_P0300_27
     1103Void TAppDecTop::xMarkForOutput( Bool allLayersDecoded, Int pocLastPic, Int layerIdLastPic )
     1104
     1105  vector<Int> targetOptLayerIdList = m_vps->getTargetOptLayerIdList( m_targetOptLayerSetIdx );
     1106
     1107  if (m_vps->getAltOutputLayerFlagVar( m_targetOptLayerSetIdx ) )
     1108  {
     1109    assert( targetOptLayerIdList.size() == 1 );
     1110    Int targetLayerId = targetOptLayerIdList[0];     
     1111
     1112    TComPic* curPic = m_ivPicLists.getPic( layerIdLastPic, pocLastPic );
     1113    assert( curPic != NULL );
     1114
     1115    if ( layerIdLastPic == targetLayerId )
     1116    {
     1117      if ( curPic->getPicOutputFlag() )
     1118      {
     1119        curPic->setOutputMark( true );
     1120      }
     1121      else
     1122      {       
     1123        xMarkAltOutPic( targetLayerId, pocLastPic );
     1124      }
     1125      m_markedForOutput = true;
     1126    }
     1127    else if ( ( layerIdLastPic > targetLayerId || allLayersDecoded ) && !m_markedForOutput )
     1128    {
     1129      xMarkAltOutPic( targetLayerId, pocLastPic );
     1130    }
     1131
     1132    if ( allLayersDecoded )
     1133    {
     1134      m_markedForOutput = false;
     1135    }
     1136  }
     1137  else
     1138  {
     1139    for( Int dI = 0; dI < m_numDecoders; dI++ )
     1140    {     
     1141      Int layerId = m_tDecTop[dI]->getLayerId();
     1142      TComPic* curPic = m_ivPicLists.getPic( layerId, pocLastPic );
     1143      if ( curPic != NULL )
     1144      {
     1145        if ( curPic->getReconMark() )
     1146        {
     1147          Bool isTargetOptLayer = std::find(targetOptLayerIdList.begin(), targetOptLayerIdList.end(), layerId) != targetOptLayerIdList.end();
     1148          curPic->setOutputMark( isTargetOptLayer ? curPic->getPicOutputFlag() : false );
     1149        }
     1150      }
     1151    }
     1152  }
     1153}
     1154#endif
    9441155#endif
    9451156//! \}
  • TabularUnified trunk/source/App/TAppDecoder/TAppDecTop.h

    r872 r964  
    6868  TComPicLists                    m_ivPicLists;                                ///< picture buffers of decoder instances
    6969  Bool                            m_layerInitilizedFlags[ MAX_NUM_LAYER_IDS ]; ///< for layerwise startup
    70 
     70#if H_MV_HLS_7_VPS_P0300_27
     71  TComVPS*                        m_vps;                                ///< active VPS
     72#endif
    7173#else
    7274  TDecTop                         m_cTDecTop;                     ///< decoder class
     
    8082  Int                             m_iPOCLastDisplay;              ///< last POC in display order
    8183#endif
     84#if H_MV_HLS_7_VPS_P0300_27
     85  Bool                            m_markedForOutput;
     86#endif
     87
     88
    8289#if H_3D
    8390  FILE*                           m_pScaleOffsetFile;
     
    99106#if H_MV
    100107  Void  xWriteOutput      ( TComList<TComPic*>* pcListPic, Int layerId, Int tId ); ///< write YUV to file
     108
     109#if H_MV_HLS_7_VPS_P0300_27
     110  Void  xMarkForOutput   ( Bool allLayersDecoded, Int pocLastPic, Int layerIdLastPic );         
     111  Void  xMarkAltOutPic    ( Int targetOutputLayer, Int pocLastPic )
     112  {
     113    Int optLayerIdxInVps = m_vps->getLayerIdInNuh( targetOutputLayer );
     114    Int highestNuhLayerId = -1;
     115    TComPic* picWithHighestNuhLayerId = NULL;
     116    for (Int dIdx = 0; dIdx < m_numDecoders; dIdx++)
     117    {
     118      Int curLayerId = m_tDecTop[dIdx]->getLayerId();
     119      Int curLayerIdxInVps = m_vps->getLayerIdInNuh( curLayerId  );
     120      if ( m_vps->getInDirectDependencyFlag(optLayerIdxInVps, curLayerIdxInVps ) )
     121      {
     122        TComPic* curPic = m_ivPicLists.getPic( curLayerId, pocLastPic );
     123        if (curPic != NULL)
     124        {
     125          if (curPic->getReconMark() && curPic->getPicOutputFlag() )
     126          {
     127            curPic->setOutputMark   ( false );
     128            curPic->setPicOutputFlag( false );
     129            if ( curLayerId > highestNuhLayerId)
     130            {
     131              highestNuhLayerId = curLayerId ;
     132              picWithHighestNuhLayerId = curPic;
     133            }           
     134          }
     135        }
     136      }
     137    }
     138    if ( picWithHighestNuhLayerId != NULL )
     139    {
     140      picWithHighestNuhLayerId->setPicOutputFlag(true);
     141      picWithHighestNuhLayerId->setOutputMark   (true);
     142    }
     143  }
     144#endif
     145
    101146  Void  xFlushOutput      ( TComList<TComPic*>* pcListPic, Int layerId ); ///< flush all remaining decoded pictures to file
    102147  Int   xGetDecoderIdx    ( Int layerId, Bool createFlag = false );
  • TabularUnified trunk/source/App/TAppEncoder/TAppEncCfg.cpp

    r950 r964  
    388388  ("VpsNumLayerSets",       m_vpsNumLayerSets    , 1                    , "Number of layer sets")   
    389389  ("LayerIdsInSet_%d",      m_layerIdsInSets     , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set") 
    390   ("DefaultTargetOutputLayerIdc"     , m_defaultTargetOutputLayerIdc     , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet")
     390  ("DefaultTargetOutputLayerIdc"     , m_defaultOutputLayerIdc     , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet")
    391391  ("OutputLayerSetIdx",     m_outputLayerSetIdx  , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets") 
    392392
    393393  ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet      , std::vector<Int>(0,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "Indices in VPS of output layers in additional output layer set") 
    394394  ("LayerIdsInDefOutputLayerSet_%d", m_layerIdsInDefOutputLayerSet      , std::vector<Int>(0,0), MAX_VPS_OP_SETS_PLUS1, "Indices in VPS of output layers in layer set") 
     395#if H_MV_HLS_7_VPS_P0300_27
     396  ("AltOutputLayerFlag",    m_altOutputLayerFlag , std::vector<Bool>(1,0), "Alt output layer flag")
     397#endif
    395398  ("ProfileLevelTierIdx",   m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier")
    396399 
     
    453456("IntraPeriod,-ip",         m_iIntraPeriod,              -1, "Intra period in frames, (-1: only first frame)")
    454457#endif
     458#if ALLOW_RECOVERY_POINT_AS_RAP
     459  ("DecodingRefreshType,-dr", m_iDecodingRefreshType,       0, "Intra refresh type (0:none 1:CRA 2:IDR 3:RecPointSEI)")
     460#else
    455461  ("DecodingRefreshType,-dr", m_iDecodingRefreshType,       0, "Intra refresh type (0:none 1:CRA 2:IDR)")
     462#endif
    456463  ("GOPSize,g",               m_iGOPSize,                   1, "GOP size of temporal structure")
    457464  // motion options
     
    470477  ("LambdaModifier5,-LM5", m_adLambdaModifier[ 5 ], ( Double )1.0, "Lambda modifier for temporal layer 5")
    471478  ("LambdaModifier6,-LM6", m_adLambdaModifier[ 6 ], ( Double )1.0, "Lambda modifier for temporal layer 6")
    472   ("LambdaModifier7,-LM7", m_adLambdaModifier[ 7 ], ( Double )1.0, "Lambda modifier for temporal layer 7")
    473479
    474480  /* Quantization parameters */
     
    694700  ("SEIToneMapCameraIsoSpeedIdc",                     m_cameraIsoSpeedIdc,                        0, "Indicates the camera ISO speed for daylight illumination")
    695701  ("SEIToneMapCameraIsoSpeedValue",                   m_cameraIsoSpeedValue,                    400, "Specifies the camera ISO speed for daylight illumination of Extended_ISO")
     702  ("SEIToneMapExposureIndexIdc",                      m_exposureIndexIdc,                         0, "Indicates the exposure index setting of the camera")
     703  ("SEIToneMapExposureIndexValue",                    m_exposureIndexValue,                     400, "Specifies the exposure index setting of the cameran of Extended_ISO")
    696704  ("SEIToneMapExposureCompensationValueSignFlag",     m_exposureCompensationValueSignFlag,        0, "Specifies the sign of ExposureCompensationValue")
    697705  ("SEIToneMapExposureCompensationValueNumerator",    m_exposureCompensationValueNumerator,       0, "Specifies the numerator of ExposureCompensationValue")
     
    724732  ("SEISOPDescription",              m_SOPDescriptionSEIEnabled,              0, "Control generation of SOP description SEI messages")
    725733  ("SEIScalableNesting",             m_scalableNestingSEIEnabled,              0, "Control generation of scalable nesting SEI messages")
     734#if H_MV
    726735  ("SubBitstreamPropSEIEnabled",              m_subBistreamPropSEIEnabled,    false                     ,"Enable signaling of sub-bitstream property SEI message")
    727736  ("SEISubBitstreamNumAdditionalSubStreams",  m_sbPropNumAdditionalSubStreams,0, "Number of substreams for which additional information is signalled")
     
    731740  ("SEISubBitstreamAvgBitRate",               m_sbPropAvgBitRate,             std::vector< Int  >(1,0)  ,"Specifies average bit rate of the i-th sub-bitstream")
    732741  ("SEISubBitstreamMaxBitRate",               m_sbPropMaxBitRate,             std::vector< Int  >(1,0)  ,"Specifies maximum bit rate of the i-th sub-bitstream")
     742#endif
    733743#if H_3D
    734744  ("CameraParameterFile,cpf", m_pchCameraParameterFile,    (Char *) 0, "Camera Parameter File Name")
     
    10471057  xResizeVector( m_loopFilterNotAcrossTilesFlag );
    10481058  xResizeVector( m_wppInUseFlag );
     1059
     1060#if H_MV_HLS_7_VPS_P0300_27
     1061  for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + (Int) m_outputLayerSetIdx.size(); olsIdx++)
     1062  {   
     1063    m_altOutputLayerFlag.push_back( false );     
     1064  }
     1065#endif
    10491066#else
    10501067  m_aidQP = new Int[ m_framesToBeEncoded + m_iGOPSize + 1 ];
     
    14171434  }
    14181435
    1419   xConfirmPara( m_defaultTargetOutputLayerIdc < 0 || m_defaultTargetOutputLayerIdc > 2, "Default target output layer idc must greater than or equal to 0 and less than or equal to 2." ); 
    1420 
    1421   if( m_defaultTargetOutputLayerIdc != 2 )
     1436  xConfirmPara( m_defaultOutputLayerIdc < 0 || m_defaultOutputLayerIdc > 2, "Default target output layer idc must greater than or equal to 0 and less than or equal to 2." ); 
     1437
     1438  if( m_defaultOutputLayerIdc != 2 )
    14221439  {
    14231440    Bool anyDefaultOutputFlag = false;   
     
    14481465  }
    14491466
     1467#if H_MV_HLS_7_VPS_P0300_27
     1468  xConfirmPara( m_altOutputLayerFlag.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" );
     1469#endif
    14501470  xConfirmPara( m_profileLevelTierIdx.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" );
    14511471
     
    14721492  xConfirmPara( (m_iIntraPeriod > 0 && m_iIntraPeriod < m_iGOPSize) || m_iIntraPeriod == 0, "Intra period must be more than GOP size, or -1 , not 0" );
    14731493#endif
     1494#if ALLOW_RECOVERY_POINT_AS_RAP
     1495  xConfirmPara( m_iDecodingRefreshType < 0 || m_iDecodingRefreshType > 3,                   "Decoding Refresh Type must be comprised between 0 and 3 included" );
     1496  if(m_iDecodingRefreshType == 3)
     1497  {
     1498    xConfirmPara( !m_recoveryPointSEIEnabled,                                               "When using RecoveryPointSEI messages as RA points, recoveryPointSEI must be enabled" );
     1499  }
     1500#else
    14741501  xConfirmPara( m_iDecodingRefreshType < 0 || m_iDecodingRefreshType > 2,                   "Decoding Refresh Type must be equal to 0, 1 or 2" );
     1502#endif
    14751503#if H_MV
    14761504  for( Int layer = 0; layer < m_numberOfLayers; layer++ )
     
    15911619  xConfirmPara( m_pchCameraParameterFile    == 0                ,   "CameraParameterFile must be given");
    15921620  xConfirmPara( m_pchBaseViewCameraNumbers  == 0                ,   "BaseViewCameraNumbers must be given" );
     1621#if BUG_FIX_TK65
     1622  xConfirmPara( ( ((UInt) m_numberOfLayers >> 1 ) != m_cCameraData.getBaseViewNumbers().size() ) && ( m_numberOfLayers != m_cCameraData.getBaseViewNumbers().size() ),   "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" );
     1623#else
    15931624  xConfirmPara( ((UInt) m_numberOfLayers >> 1 ) != m_cCameraData.getBaseViewNumbers().size(),   "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" );
     1625#endif
    15941626  xConfirmPara    ( m_iCodedCamParPrecision < 0 || m_iCodedCamParPrecision > 5,       "CodedCamParsPrecision must be in range of 0..5" );
    15951627#if H_3D_VSO
     
    21782210    xConfirmPara( m_toneMapModelId < 0 || m_toneMapModelId > 4 , "SEIToneMapModelId must be in rage 0 to 4");
    21792211    xConfirmPara( m_cameraIsoSpeedValue == 0, "SEIToneMapCameraIsoSpeedValue shall not be equal to 0");
     2212    xConfirmPara( m_exposureIndexValue  == 0, "SEIToneMapExposureIndexValue shall not be equal to 0");
    21802213    xConfirmPara( m_extendedRangeWhiteLevel < 100, "SEIToneMapExtendedRangeWhiteLevel should be greater than or equal to 100");
    21812214    xConfirmPara( m_nominalBlackLevelLumaCodeValue >= m_nominalWhiteLevelLumaCodeValue, "SEIToneMapNominalWhiteLevelLumaCodeValue shall be greater than SEIToneMapNominalBlackLevelLumaCodeValue");
  • TabularUnified trunk/source/App/TAppEncoder/TAppEncCfg.h

    r950 r964  
    8989  Int                    m_vpsNumLayerSets;                   ///< Number of layer sets
    9090  std::vector< std::vector<Int> > m_layerIdsInSets;           ///< LayerIds in vps of layer set
    91   Int                    m_defaultTargetOutputLayerIdc;       ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet
     91  Int                    m_defaultOutputLayerIdc;       ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet
    9292  std::vector<Int>       m_outputLayerSetIdx;                 ///< Indices of layer sets used as additional output layer sets 
    9393  std::vector< std::vector<Int> > m_layerIdsInAddOutputLayerSet; ///< LayerIds in vps of additional output layers
    9494  std::vector< std::vector<Int> > m_layerIdsInDefOutputLayerSet; ///< Indices in vps of output layers in layer sets
    9595  std::vector<Int>       m_profileLevelTierIdx;               ///< Indices of of profile level tier
    96  
     96  #if H_MV_HLS_7_VPS_P0300_27
     97  std::vector<Bool>      m_altOutputLayerFlag;                ///< Alt output layer flag
     98#endif
     99
    97100  // Dependencies
    98101  std::vector< std::vector<Int> > m_directRefLayers;          ///< LayerIds of direct reference layers
     
    338341  Int       m_cameraIsoSpeedIdc;
    339342  Int       m_cameraIsoSpeedValue;
     343  Int       m_exposureIndexIdc;
     344  Int       m_exposureIndexValue;
    340345  Int       m_exposureCompensationValueSignFlag;
    341346  Int       m_exposureCompensationValueNumerator;
  • TabularUnified trunk/source/App/TAppEncoder/TAppEncTop.cpp

    r950 r964  
    5757TAppEncTop::TAppEncTop()
    5858{
     59
     60#if H_MV_HLS_8
     61  m_vps = new TComVPS;
     62#endif
    5963#if !H_MV
    6064  m_iFrameRcvd = 0;
     
    6670TAppEncTop::~TAppEncTop()
    6771{
     72#if H_MV_HLS_8
     73  if (m_vps)
     74  {
     75   delete m_vps;
     76  };
     77#endif
     78
    6879}
    6980
     
    7182{
    7283#if H_MV
     84#if H_MV_HLS_8
     85  TComVPS& vps = (*m_vps);   
     86#else
    7387  TComVPS& vps = m_vps;   
     88#endif
    7489#else
    7590  TComVPS vps;
     
    409424  m_cTEncTop.setTMISEICameraIsoSpeedIdc                   ( m_cameraIsoSpeedIdc );
    410425  m_cTEncTop.setTMISEICameraIsoSpeedValue                 ( m_cameraIsoSpeedValue );
     426  m_cTEncTop.setTMISEIExposureIndexIdc                    ( m_exposureIndexIdc );
     427  m_cTEncTop.setTMISEIExposureIndexValue                  ( m_exposureIndexValue );
    411428  m_cTEncTop.setTMISEIExposureCompensationValueSignFlag   ( m_exposureCompensationValueSignFlag );
    412429  m_cTEncTop.setTMISEIExposureCompensationValueNumerator  ( m_exposureCompensationValueNumerator );
     
    691708{
    692709#if H_3D
     710#if H_MV_HLS_8
     711  for ( Int viewIndex = 0; viewIndex < m_vps->getNumViews(); viewIndex++ )
     712  {
     713    m_vps->initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(),
     714      m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() );
     715#else
    693716  for ( Int viewIndex = 0; viewIndex < m_vps.getNumViews(); viewIndex++ )
    694717  {
    695     m_vps.initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(),
     718  m_vps.initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(),
    696719      m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() );
     720#endif
    697721  }
    698722#endif
     
    12751299
    12761300  Int  defaultDirectDependencyType = -1;
     1301#if MV_FIX_DEP_TYPES
     1302  Bool defaultDirectDependencyFlag = false;
     1303#else
    12771304  Bool defaultDirectDependencyFlag = true;
     1305#endif
     1306
    12781307  for( Int depLayer = 1; depLayer < m_numberOfLayers; depLayer++ )
    12791308  {
     
    12931322      {
    12941323        defaultDirectDependencyType = curDirectDependencyType;
     1324#if MV_FIX_DEP_TYPES
     1325        defaultDirectDependencyFlag = true;
     1326#endif
    12951327      }
    12961328     
     
    14821514Void TAppEncTop::xSetRepFormat( TComVPS& vps )
    14831515{
     1516#if H_MV_HLS_8_PMS_Q0195_20
     1517  vps.setRepFormatIdxPresentFlag( false );
     1518#else
    14841519  vps.setRepFormatIdxPresentFlag( true );
     1520#endif
    14851521  vps.setVpsNumRepFormatsMinus1 ( 0    );
    14861522
     
    14991535  vps.setRepFormat( 0 , repFormat );
    15001536
     1537#if !H_MV_HLS_8_PMS_Q0195_20
    15011538  for(Int i = 0; i <= vps.getMaxLayersMinus1(); i++ )
    15021539  {
    15031540    vps.setVpsRepFormatIdx( i , 0 );
    15041541  }
     1542#endif
    15051543}
    15061544
     
    15131551  assert ( dpbSize != 0 );
    15141552
     1553#if H_MV_HLS_8_HRD_Q0102_08
     1554  for( Int i = 0; i < vps.getNumOutputLayerSets(); i++ )
     1555#else
    15151556  for( Int i = 1; i < vps.getNumOutputLayerSets(); i++ )
     1557#endif
    15161558  { 
     1559#if H_MV_HLS_8_MIS_Q0102_30
     1560    Int currLsIdx = vps.olsIdxToLsIdx( i );
     1561#endif
    15171562    std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i );
    15181563    Bool subLayerFlagInfoPresentFlag = false;
    15191564
     1565#if H_MV_HLS_8_MIS_Q0102_30
     1566    for( Int j = 0; j  <=  vps.getMaxSubLayersInLayerSetMinus1( currLsIdx ); j++ )
     1567#else
    15201568    for( Int j = 0; j  <=  vps.getMaxSubLayersInLayerSetMinus1( i ); j++ )
     1569#endif
    15211570    {   
    15221571      Bool subLayerDpbInfoPresentFlag = false;
    1523       assert( vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i ) ) == targetDecLayerIdList.size() );
    1524       for( Int k = 0; k < vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i )); k++ )   
     1572#if H_MV_HLS_8_MIS_Q0102_30 || H_MV_HLS_8_DBP_NODOC_42
     1573      assert( vps.getNumLayersInIdList( currLsIdx ) == targetDecLayerIdList.size() );
     1574      for( Int k = 0; k < vps.getNumLayersInIdList( currLsIdx ); k++ )   
     1575#else
     1576      assert( vps.getNumSubDpbs( vps.olsIdxToLsIdx( i ) ) == targetDecLayerIdList.size() );
     1577      for( Int k = 0; k < vps.getNumSubDpbs( vps.olsIdxToLsIdx( i )); k++ )   
     1578#endif
    15251579      {
    15261580        Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] );           
     
    15871641  Int numAddOuputLayerSets = (Int) m_outputLayerSetIdx.size();
    15881642  // Additional output layer sets + profileLevelTierIdx
    1589   vps.setDefaultTargetOutputLayerIdc      ( m_defaultTargetOutputLayerIdc );   
    1590   vps.setNumAddOutputLayerSets            ( numAddOuputLayerSets          );
     1643  vps.setDefaultOutputLayerIdc      ( m_defaultOutputLayerIdc );   
     1644#if H_MV_HLS_8_SYN_39_19
     1645  vps.setNumAddLayerSets            ( 0                             ); 
     1646  vps.setNumAddOlss                 ( numAddOuputLayerSets          );
     1647#else
     1648  vps.setNumAddLayerSets            ( numAddOuputLayerSets          );
     1649#endif
    15911650  vps.initTargetLayerIdLists();
    15921651
     
    15951654    Int addOutLsIdx = olsIdx - m_vpsNumLayerSets;     
    15961655   
    1597     vps.setOutputLayerSetIdxMinus1( olsIdx, ( ( addOutLsIdx < 0 ) ?  olsIdx  : m_outputLayerSetIdx[ addOutLsIdx ] ) - 1 );
    1598 
    1599     std::vector<Int>& layerIdList    = m_layerIdsInSets[ vps.getLayerSetIdxForOutputLayerSet( olsIdx ) ];
    1600 
    1601     if (vps.getDefaultTargetOutputLayerIdc() == 2 || addOutLsIdx >= 0 )
     1656    vps.setLayerSetIdxForOlsMinus1( olsIdx, ( ( addOutLsIdx < 0 ) ?  olsIdx  : m_outputLayerSetIdx[ addOutLsIdx ] ) - 1 );
     1657
     1658    std::vector<Int>& layerIdList    = m_layerIdsInSets[ vps.olsIdxToLsIdx( olsIdx ) ];
     1659
     1660    if (vps.getDefaultOutputLayerIdc() == 2 || addOutLsIdx >= 0 )
    16021661    {
    16031662      for ( Int i = 0; i < layerIdList.size(); i++)
     
    16371696      vps.setProfileLevelTierIdx( olsIdx, m_profileLevelTierIdx[ olsIdx ] );
    16381697    }
    1639 
     1698#if H_MV_HLS_7_VPS_P0300_27
     1699    if ( vps.getNumOutputLayersInOutputLayerSet( olsIdx ) == 1 &&
     1700        vps.getNumDirectRefLayers( vps.getOlsHighestOutputLayerId( olsIdx ) ) )
     1701    {   
     1702      vps.setAltOutputLayerFlag( olsIdx , m_altOutputLayerFlag[ olsIdx ]);
     1703    }
     1704    else
     1705    {
     1706      vps.setAltOutputLayerFlag( olsIdx , false );
     1707      if ( m_altOutputLayerFlag[ olsIdx ] )
     1708      {
     1709        printf( "\nWarning: Ignoring AltOutputLayerFlag for output layer set %d, since more than one output layer or no dependent layers.\n", olsIdx );           
     1710      }
     1711    }
     1712#else
    16401713    vps.setAltOutputLayerFlag( olsIdx , false);     
    1641   }
    1642 
     1714#endif
     1715  }
    16431716}
    16441717
  • TabularUnified trunk/source/App/TAppEncoder/TAppEncTop.h

    r872 r964  
    7575
    7676  TComPicLists               m_ivPicLists;                  ///< picture buffers of encoder instances
     77#if H_MV_HLS_8
     78  TComVPS*                   m_vps;                         ///< vps
     79#else
    7780  TComVPS                    m_vps;                         ///< vps
     81#endif
    7882#else
    7983  TEncTop                    m_cTEncTop;                    ///< encoder class
Note: See TracChangeset for help on using the changeset viewer.