Changeset 1043 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibEncoder


Ignore:
Timestamp:
2 Mar 2015, 21:08:06 (10 years ago)
Author:
seregin
Message:

fix layerId/layerIdx mismatch at decoder, including fixes for the tickets 66 and 68

Location:
branches/SHM-dev/source/Lib/TLibEncoder
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1030 r1043  
    10771077#if N0065_LAYER_POC_ALIGNMENT
    10781078#if O0062_POC_LSB_NOT_PRESENT_FLAG
    1079     if( (pcSlice->getLayerId() > 0 && !pcSlice->getVPS()->getPocLsbNotPresentFlag( pcSlice->getVPS()->getLayerIdInVps(pcSlice->getLayerId())) ) || !pcSlice->getIdrPicFlag())
     1079    if( (pcSlice->getLayerId() > 0 && !pcSlice->getVPS()->getPocLsbNotPresentFlag( pcSlice->getVPS()->getLayerIdxInVps(pcSlice->getLayerId())) ) || !pcSlice->getIdrPicFlag())
    10801080#else
    10811081    if( pcSlice->getLayerId() > 0 || !pcSlice->getIdrPicFlag() )
     
    27472747        for(Int k = 0; k < vps->getNumLayersInIdList(optLsIdx); k++ ) {
    27482748            Int  lId = vps->getLayerSetLayerIdList(optLsIdx, k);
    2749             maxSLMinus1 = max(maxSLMinus1, vps->getMaxTSLayersMinus1(vps->getLayerIdInVps(lId)));
     2749            maxSLMinus1 = max(maxSLMinus1, vps->getMaxTSLayersMinus1(vps->getLayerIdxInVps(lId)));
    27502750        }
    27512751        MaxSubLayersInLayerSetMinus1[ i ] = maxSLMinus1;
     
    29572957      {
    29582958#if VPS_VUI_TILES_NOT_IN_USE__FLAG
    2959         layerIdx = vps->getLayerIdInVps(vps->getRefLayerId(vps->getLayerIdInNuh(i), j));
     2959        layerIdx = vps->getLayerIdxInVps(vps->getRefLayerId(vps->getLayerIdInNuh(i), j));
    29602960        if (vps->getTilesInUseFlag(i) && vps->getTilesInUseFlag(layerIdx)) {
    29612961          WRITE_FLAG( vps->getTileBoundariesAlignedFlag(i,j) ? 1 : 0 , "tile_boundaries_aligned_flag[i][j]" );
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r1030 r1043  
    930930  {
    931931#if REPN_FORMAT_IN_VPS
    932     m_cSPS.setBitDepth    (ChannelType(channelType), m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdInVps( m_layerId ) ) )->getBitDepthVps(ChannelType(channelType))            );
    933     m_cSPS.setQpBDOffset  (ChannelType(channelType), (6 * (m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdInVps( m_layerId ) ) )->getBitDepthVps(ChannelType(channelType)) - 8)));
     932    m_cSPS.setBitDepth    (ChannelType(channelType), m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdxInVps( m_layerId ) ) )->getBitDepthVps(ChannelType(channelType))            );
     933    m_cSPS.setQpBDOffset  (ChannelType(channelType), (6 * (m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdxInVps( m_layerId ) ) )->getBitDepthVps(ChannelType(channelType)) - 8)));
    934934#else
    935935    m_cSPS.setBitDepth    (ChannelType(channelType), g_bitDepth[channelType]            );
     
    15801580{
    15811581#if O0096_REP_FORMAT_INDEX
    1582   RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cSPS.getUpdateRepFormatFlag() ? m_cSPS.getUpdateRepFormatIndex() : m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdInVps(m_layerId) ) );
    1583 #else
    1584   RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdInVps(m_layerId) ) );
     1582  RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cSPS.getUpdateRepFormatFlag() ? m_cSPS.getUpdateRepFormatIndex() : m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdxInVps(m_layerId) ) );
     1583#else
     1584  RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdxInVps(m_layerId) ) );
    15851585#endif
    15861586  Int bitDepthY,bitDepthC,picWidth,picHeight;
     
    16451645    if( m_cVPS.getNumRefLayers( m_layerId ) == 0 )
    16461646    {
    1647       UInt layerIdx = m_cVPS.getLayerIdInVps( m_layerId );
     1647      UInt layerIdx = m_cVPS.getLayerIdxInVps( m_layerId );
    16481648      RepFormat* repFmt = m_cVPS.getVpsRepFormat(m_cVPS.getVpsRepFormatIdx(layerIdx));
    16491649     
Note: See TracChangeset for help on using the changeset viewer.