Ignore:
Timestamp:
13 Feb 2014, 22:58:51 (10 years ago)
Author:
tech
Message:

Integrated following MV-HEVC HLS 7 items:

H_MV_HLS7_GEN Stub for further integrations (not tested)
H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
Output layer sets, various

(VPS/P0300/alt output layer flag) #27 Change alt output layer flag to be signalled within the loop of output layer sets, from JCTVC-P0300-v2. Decision: Adopt.
(VPS/P0156/Num of output_layer_flag) #10 Proposal 3: The output_layer_flag[ i ][ j ] is signalled for j equal to 0 to NumLayersInIdList[ lsIdx ] inclusive. It was remarked that we might be able to just assume that the top layer is always output; however, this was not entirely clear , so the safe thing to do may be to also send the flag for this layer.
(VPS/P0295/Default output layer sets) #5 Discussion from (P0110). Decision: Three-state approach (text in P0295, decoder shall allow 3 to be present and shall treat 3 the same as the value 2).

H_MV_HLS_7_HRD_P0156_7 (HRD/P0156/MaxSubLayersInLayerSetMinus1) #7 Proposal 1: signal, in the VPS extension, the DPB parameters for an output layer set for sub-DPBs only up to the maximum temporal sub-layers in the corresponding layer set
H_MV_HLS_7_VPS_P0048_14
(VPS/P0048/profile_ref_minus1 rem) #14 Remove profile_ref_minus1 from the VPS extension, from JCTVC-P0048
H_MV_HLS_7_VPS_P0076_15 (VPS/P0076/video signal info move) #15 Move video signal information syntax structure earlier in the VPS VUI.
H_MV_HLS_7_SPS_P0155_16_32
(SPS/P0155/sps_sub_layer_ordering_info) #16, #32 Not signal the sps_max_num_reorder_pics[], sps_max_latency_increase_plus1[], and sps_max_dec_pic_buffering_minus1[] syntax elements in the SPS when nuh_layer_id > 0.
H_MV_HLS_7_GEN_P0166_PPS_EXTENSION (GEN/P0166/pps_extension) #17 Add PPS extension type flags for conditional presence of syntax extensions per extension type, aligned with the SPS extension type flags, from JCTVC-P0166. Further align the SPS extension type flags syntax between RExt and MV-HEVC/SHVC
H_MV_HLS_7_FIX_SET_DPB_SIZE
Fix derivation dpb size parameters
H_MV_HLS_7_RESERVED_FLAGS Added flags

(SPS/P0312/SHVC reserved flag) The flag will be used for the syntax vert_phase_position_enable_flag in SHVC draft
(VPS/O0215/SHVC reserved flag): this flag will be used for the syntax cross_layer_phase_alignment_flag in SHVC draft.
(VPS VUI/O0199,P0312/SHVC reserved flags) the 3 reserved bits will be used for the syntaxes single_layer_for_non_irap_flag, higher_layer_irap_skip_flag and vert_phase_position_not_in_use_flag in SHVC draft.

H_MV_FIX_VPS_LAYER_ID_NOT_EQUAL_ZERO Discard VPS with nuh_layer_Id > 0
H_MV_HLS_7_MISC_P0130_EOS
(MISC/P0130/EOS NAL layer id) #19 Require that end of bitstream NAL unit shall have nuh_layer_id equal to 0, from JCTVC-P0130. Decoders shall allow an end of bitstream NAL unit with nuh_layer_id > 0 to be present, and shall ignore the NAL unit.
H_MV_HLS_7_MISC_P0182_13 (MISC/P0182/BL PS Compatibility flag) #13 Define the flag (in VPS VUI) with the proposed semantics, without specifying an associated extraction process. Editors to select the position in the VPS VUI.
H_MV_HLS_7_MISC_P0068_21
(MISC/P0068/all irap idr flag) #21 Add flag in VUI to indicate that all IRAP pictures are IDRs and that all layer pictures in an AU are IDR aligned, from JCTVC-P0068 proposal 1.
H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG Fix inference of cross_layer_irap_aligned_flag
H_MV_HLS_7_MISC_P0079_18
(MISC/P0079/NumActiveRefLayerPics) #18 Modification of derivation of variable NumActiveRefLayerPics.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-10.0-dev0/source/Lib/TLibDecoder/TDecTop.cpp

    r852 r854  
    5151  m_aaiCodedOffset         = new Int* [ MAX_NUM_LAYERS ];
    5252  m_aaiCodedScale          = new Int* [ MAX_NUM_LAYERS ];
     53#if !FIX_CAM_PARS_COLLECTOR
    5354  m_aiViewId               = new Int  [ MAX_NUM_LAYERS ];
    5455
    5556  m_bViewReceived          = new Bool [ MAX_NUM_LAYERS ];
     57#endif
    5658  for( UInt uiId = 0; uiId < MAX_NUM_LAYERS; uiId++ )
    5759  {
     
    6365  m_iLog2Precision   = LOG2_DISP_PREC_LUT;
    6466  m_uiBitDepthForLUT = 8; // fixed
     67#if FIX_CAM_PARS_COLLECTOR
     68  m_receivedIdc = NULL;
     69  m_vps         = NULL;
     70#endif
    6571}
    6672
     
    7480  delete [] m_aaiCodedOffset;
    7581  delete [] m_aaiCodedScale;
     82#if !FIX_CAM_PARS_COLLECTOR
    7683  delete [] m_aiViewId; 
    7784  delete [] m_bViewReceived;
     85#endif
    7886
    7987  xDeleteArray( m_adBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 );
    8088  xDeleteArray( m_aiBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 );
    81 }
    82 
     89#if FIX_CAM_PARS_COLLECTOR
     90  xDeleteArray( m_receivedIdc, m_uiMaxViewIndex + 1 );
     91#endif
     92}
     93
     94
     95#if FIX_CAM_PARS_COLLECTOR
     96Void
     97CamParsCollector::init( FILE* pCodedScaleOffsetFile, TComVPS* vps)
     98{
     99  assert( !isInitialized() ); // Only one initialization currently supported
     100  m_bInitialized            = true;
     101  m_vps                     = vps;
     102  m_bCamParsVaryOverTime    = false;
     103  m_pCodedScaleOffsetFile   = pCodedScaleOffsetFile;
     104  m_lastPoc                 = -1;   
     105  m_firstReceivedPoc        = -2;
     106
     107  m_uiMaxViewIndex            = -1;
     108  for (Int i = 0; i <= vps->getMaxLayersMinus1(); i++)
     109  {
     110    Int curViewIdx = m_vps->getViewIndex( m_vps->getLayerIdInNuh( i ));
     111    m_bCamParsVaryOverTime = m_bCamParsVaryOverTime || vps->hasCamParInSliceHeader( curViewIdx );
     112    m_uiMaxViewIndex = std::max( m_uiMaxViewIndex, curViewIdx  ) ;
     113  }
     114
     115  assert( m_receivedIdc == NULL );
     116  m_receivedIdc = new Int*[ m_uiMaxViewIndex + 1];
     117  for (Int i = 0; i <= m_uiMaxViewIndex; i++)
     118  {
     119    m_receivedIdc[i] = new Int[ m_uiMaxViewIndex + 1 ];
     120  }
     121
     122  xResetReceivedIdc( true );
     123
     124  for (Int viewIndex = 0; viewIndex <= m_uiMaxViewIndex ; viewIndex++ )
     125  {
     126    if (m_vps->getCamParPresent( viewIndex ) )
     127    {   
     128      if( !m_vps->hasCamParInSliceHeader( viewIndex ) )
     129      {
     130        for (Int baseViewIndex = 0; baseViewIndex < viewIndex ; baseViewIndex++ )
     131        {
     132          m_receivedIdc   [ baseViewIndex ][ viewIndex ] = -1;
     133          m_aaiCodedScale [ baseViewIndex ][ viewIndex ] = m_vps->getCodedScale    (viewIndex) [ baseViewIndex ];
     134          m_aaiCodedOffset[ baseViewIndex ][ viewIndex ] = m_vps->getCodedOffset   (viewIndex) [ baseViewIndex ];
     135
     136          m_receivedIdc   [ viewIndex ][ baseViewIndex ] = -1;
     137          m_aaiCodedScale [ viewIndex ][ baseViewIndex ] = m_vps->getInvCodedScale (viewIndex) [ baseViewIndex ];
     138          m_aaiCodedOffset[ viewIndex ][ baseViewIndex ] = m_vps->getInvCodedOffset(viewIndex) [ baseViewIndex ];
     139          xInitLUTs( baseViewIndex, viewIndex, m_aaiCodedScale[ baseViewIndex ][ viewIndex ], m_aaiCodedOffset[ baseViewIndex ][ viewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
     140          xInitLUTs( viewIndex, baseViewIndex, m_aaiCodedScale[ viewIndex ][ baseViewIndex ], m_aaiCodedOffset[ viewIndex ][ baseViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
     141        }
     142      }
     143    }
     144  }
     145}
     146
     147Void
     148CamParsCollector::xResetReceivedIdc( Bool overWriteFlag )
     149{
     150  for (Int i = 0; i <= m_uiMaxViewIndex; i++)
     151  { 
     152    for (Int j = 0; j <= m_uiMaxViewIndex; j++)
     153    {
     154      if ( overWriteFlag ||  ( m_receivedIdc[i][j] != -1 ) )
     155      {
     156        m_receivedIdc[i][j] = 0;
     157      }     
     158    }
     159  }
     160}
     161#else
    83162Void
    84163CamParsCollector::init( FILE* pCodedScaleOffsetFile )
     
    92171  m_uiMaxViewIndex             = 0;
    93172}
     173#endif
     174
     175
    94176
    95177Void
     
    124206  CamParsCollector::xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT)
    125207{
     208#if FIX_CAM_PARS_COLLECTOR
     209  Int     iLog2DivLuma   = m_uiBitDepthForLUT + m_vps->getCamParPrecision() + 1 - m_iLog2Precision;   AOF( iLog2DivLuma > 0 );
     210#else
    126211  Int     iLog2DivLuma   = m_uiBitDepthForLUT + m_uiCamParsCodedPrecision + 1 - m_iLog2Precision;   AOF( iLog2DivLuma > 0 );
     212#endif
    127213  Int     iLog2DivChroma = iLog2DivLuma + 1;
    128214
     
    166252}
    167253
     254#if !FIX_CAM_PARS_COLLECTOR
    168255Void
    169256CamParsCollector::setSlice( TComSlice* pcSlice )
     
    284371}
    285372
     373#else
     374Void
     375CamParsCollector::setSlice( TComSlice* pcSlice )
     376{
     377  if( pcSlice == 0 )
     378  {
     379    xOutput( m_lastPoc );
     380    return;
     381  }
     382
     383  if ( pcSlice->getIsDepth())
     384  {
     385    return;
     386  }
     387
     388  Int curPoc = pcSlice->getPOC();
     389  if( m_firstReceivedPoc == -2 )
     390  {
     391    m_firstReceivedPoc = curPoc;
     392  }
     393
     394  Bool newPocFlag = ( m_lastPoc != curPoc ); 
     395
     396  if ( newPocFlag )
     397  {   
     398    if( m_lastPoc != -1 )
     399    {
     400      xOutput( m_lastPoc );
     401    }
     402
     403    xResetReceivedIdc( false );
     404    m_lastPoc = pcSlice->getPOC();
     405  }
     406
     407  UInt uiViewIndex          = pcSlice->getViewIndex(); 
     408  if( m_vps->getCamParPresent( uiViewIndex ) )
     409  {   
     410    if( m_vps->hasCamParInSliceHeader( uiViewIndex ) ) // check consistency of slice parameters here
     411    {   
     412      for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < uiViewIndex; uiBaseViewIndex++ )
     413      {       
     414        if ( m_receivedIdc[ uiViewIndex ][ uiBaseViewIndex ] != 0 )
     415        {     
     416          AOF( m_aaiCodedScale [ uiViewIndex ][ uiBaseViewIndex ] == pcSlice->getInvCodedScale () [ uiBaseViewIndex ] );
     417          AOF( m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ] == pcSlice->getInvCodedOffset() [ uiBaseViewIndex ] );
     418        }
     419        else
     420        {         
     421          m_receivedIdc   [ uiViewIndex ][ uiBaseViewIndex ]  = 1;
     422          m_aaiCodedScale [ uiViewIndex ][ uiBaseViewIndex ]  = pcSlice->getInvCodedScale () [ uiBaseViewIndex ];
     423          m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ]  = pcSlice->getInvCodedOffset() [ uiBaseViewIndex ];
     424          xInitLUTs( uiViewIndex, uiBaseViewIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseViewIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT);
     425        }
     426        if ( m_receivedIdc[ uiBaseViewIndex ][ uiViewIndex ] != 0 )
     427        {     
     428          AOF( m_aaiCodedScale [ uiBaseViewIndex ][ uiViewIndex ] == pcSlice->getCodedScale    () [ uiBaseViewIndex ] );
     429          AOF( m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ] == pcSlice->getCodedOffset   () [ uiBaseViewIndex ] );
     430        }
     431        else
     432        {       
     433          m_receivedIdc   [ uiBaseViewIndex ][ uiViewIndex ]  = 1;
     434          m_aaiCodedScale [ uiBaseViewIndex ][ uiViewIndex ]  = pcSlice->getCodedScale    () [ uiBaseViewIndex ];
     435          m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ]  = pcSlice->getCodedOffset   () [ uiBaseViewIndex ];
     436          xInitLUTs( uiBaseViewIndex, uiViewIndex, m_aaiCodedScale[ uiBaseViewIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT);
     437        }
     438      }
     439    }
     440  }
     441}
     442#endif
     443
     444
    286445#if H_3D_IV_MERGE
    287446Void
     
    295454#endif
    296455
     456#if !FIX_CAM_PARS_COLLECTOR
    297457Bool
    298458CamParsCollector::xIsComplete()
     
    307467  return true;
    308468}
     469#endif
    309470
    310471Void
     
    313474  if( m_pCodedScaleOffsetFile )
    314475  {
     476#if FIX_CAM_PARS_COLLECTOR
     477    if( iPOC == m_firstReceivedPoc )
     478#else
    315479    if( iPOC == 0 )
     480#endif
    316481    {
    317482      fprintf( m_pCodedScaleOffsetFile, "#  ViewIndex       ViewId\n" );
    318483      fprintf( m_pCodedScaleOffsetFile, "#----------- ------------\n" );
     484#if FIX_CAM_PARS_COLLECTOR
    319485      for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ )
    320486      {
     487        fprintf( m_pCodedScaleOffsetFile, "%12d %12d\n", uiViewIndex, m_vps->getViewIdVal( uiViewIndex ) );
     488#else       
     489      for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ )
     490      {
    321491        fprintf( m_pCodedScaleOffsetFile, "%12d %12d\n", uiViewIndex, m_aiViewId[ uiViewIndex ] );
     492#endif
    322493      }
    323494      fprintf( m_pCodedScaleOffsetFile, "\n\n");
     
    325496      fprintf( m_pCodedScaleOffsetFile, "#----------- ------------ ------------ ------------ ------------ ------------ ------------\n" );
    326497    }
     498#if FIX_CAM_PARS_COLLECTOR
     499    if( iPOC == m_firstReceivedPoc || m_bCamParsVaryOverTime  )
     500#else
    327501    if( iPOC == 0 || m_bCamParsVaryOverTime )
     502#endif
    328503    {
    329504      Int iS = iPOC;
     
    335510          if( uiViewIndex != uiBaseIndex )
    336511          {
     512#if FIX_CAM_PARS_COLLECTOR
     513            if ( m_receivedIdc[uiBaseIndex][uiViewIndex] != 0 )
     514            {           
     515              fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n",
     516                iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_vps->getCamParPrecision() );
     517            }           
     518#else
    337519            fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n",
    338520              iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_uiCamParsCodedPrecision );
     521#endif
     522
    339523          }
    340524        }
     
    457641  for( Int temporalLayer=0; temporalLayer < MAX_TLAYER; temporalLayer++)
    458642  {
     643#if H_MV_HLS_7_SPS_P0155_16_32
     644    numReorderPics[temporalLayer] = ( getLayerId() == 0 ) ? pcSlice->getSPS()->getNumReorderPics(temporalLayer) : pcSlice->getVPS()->getNumReorderPics(temporalLayer);
     645#else
    459646    numReorderPics[temporalLayer] = pcSlice->getSPS()->getNumReorderPics(temporalLayer);
    460   }
    461 
     647#endif
     648  }
     649#if H_MV_HLS_7_SPS_P0155_16_32
     650  if ( getLayerId() == 0 )
     651  { 
     652    m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer());
     653  }
     654  else
     655  {
     656    m_iMaxRefPicNum = pcSlice->getVPS()->getMaxDecPicBuffering(pcSlice->getTLayer());
     657#if H_MV_HLS7_GEN
     658    TComVPS* vps         = pcSlice->getVPS();
     659    TComDpbSize* dpbSize = vps->getDpbSize();
     660    Int lsIdx            = vps->getLayerSetIdxForOutputLayerSet( getTargetOutputLayerSetIdx()); // Is this correct, seems to be missing in spec?
     661    Int layerIdx         = vps->getIdxInLayerSet     ( lsIdx, getLayerId() );
     662    Int subDpbIdx        = dpbSize->getSubDpbAssigned( lsIdx, layerIdx );
     663    m_iMaxRefPicNum      = dpbSize->getMaxVpsDecPicBufferingMinus1(getTargetOutputLayerSetIdx(), subDpbIdx , vps->getSubLayersVpsMaxMinus1( vps->getLayerIdInVps( getLayerId() ) ) + 1 ) + 1 ; 
     664#endif   
     665  }
     666#else
    462667  m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer());     // m_uiMaxDecPicBuffering has the space for the picture currently being decoded
     668#endif
    463669  if (m_cListPic.size() < (UInt)m_iMaxRefPicNum)
    464670  {
Note: See TracChangeset for help on using the changeset viewer.