Changeset 506 in SHVCSoftware for branches


Ignore:
Timestamp:
22 Nov 2013, 00:13:36 (11 years ago)
Author:
interdigital
Message:

Integrated JCTVC-O0092/0094/0096

  1. Implement O1008 SHVC text pseudo code for direct/indirect reference layers detection
  2. constraint on the maximum number of reference layers
  3. constraint on the layer id of SPS/PPS
  4. identify SPS rep format with index into the list of rep format in VPS
  5. specify default direct dependency type in VPS
Location:
branches/SHM-4.1-dev/source/Lib/TLibEncoder
Files:
3 edited

Legend:

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

    r502 r506  
    471471    WRITE_FLAG( pcSPS->getUpdateRepFormatFlag(), "update_rep_format_flag" );
    472472  }
     473#if O0096_REP_FORMAT_INDEX
     474  if( pcSPS->getLayerId() == 0 )
     475#else
    473476  if( pcSPS->getLayerId() == 0 || pcSPS->getUpdateRepFormatFlag() )
     477#endif
    474478  {
    475479#endif
     
    486490#if REPN_FORMAT_IN_VPS
    487491  }
     492#if O0096_REP_FORMAT_INDEX
     493  else if (pcSPS->getUpdateRepFormatFlag())
     494  {
     495    WRITE_CODE( pcSPS->getUpdateRepFormatIndex(), 8,   "update_rep_format_index");
     496  }
     497#endif
    488498#endif
    489499  Window conf = pcSPS->getConformanceWindow();
     
    499509
    500510#if REPN_FORMAT_IN_VPS
     511#if O0096_REP_FORMAT_INDEX
     512  if( pcSPS->getLayerId() == 0 )
     513#else
    501514  if( pcSPS->getLayerId() == 0 || pcSPS->getUpdateRepFormatFlag() )
     515#endif 
    502516  {
    503517    assert( pcSPS->getBitDepthY() >= 8 );
     
    9871001  if( vps->getRepFormatIdxPresentFlag() )
    9881002  {
     1003#if O0096_REP_FORMAT_INDEX
     1004    WRITE_CODE( vps->getVpsNumRepFormats() - 1, 8, "vps_num_rep_formats_minus1" );
     1005#else
    9891006    WRITE_CODE( vps->getVpsNumRepFormats() - 1, 4, "vps_num_rep_formats_minus1" );
     1007#endif
    9901008  }
    9911009  for(i = 0; i < vps->getVpsNumRepFormats(); i++)
     
    10011019      if( vps->getVpsNumRepFormats() > 1 )
    10021020      {
     1021#if O0096_REP_FORMAT_INDEX
     1022        WRITE_CODE( vps->getVpsRepFormatIdx(i), 8, "vps_rep_format_idx[i]" );
     1023#else
    10031024        WRITE_CODE( vps->getVpsRepFormatIdx(i), 4, "vps_rep_format_idx[i]" );
     1025#endif
    10041026      }
    10051027    }
     
    10271049#if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS
    10281050  WRITE_UVLC( vps->getDirectDepTypeLen()-2,                           "direct_dep_type_len_minus2");
     1051#if O0096_DEFAULT_DEPENDENCY_TYPE
     1052  WRITE_FLAG(vps->getDefaultDirectDependencyTypeFlag(), "default_direct_dependency_flag");
     1053  if (vps->getDefaultDirectDependencyTypeFlag())
     1054  {
     1055    WRITE_CODE( vps->getDefaultDirectDependencyType(), vps->getDirectDepTypeLen(), "default_direct_dependency_type" );
     1056  }
     1057  else
     1058  {
     1059    for(i = 1; i < vps->getMaxLayers(); i++)
     1060    {
     1061      for(j = 0; j < i; j++)
     1062      {
     1063        if (vps->getDirectDependencyFlag(i, j))
     1064        {
     1065          WRITE_CODE( vps->getDirectDependencyType(i, j), vps->getDirectDepTypeLen(), "direct_dependency_type[i][j]" );
     1066        }
     1067      }
     1068    }
     1069  }
     1070#else
    10291071  for(i = 1; i < vps->getMaxLayers(); i++)
    10301072  {
     
    10371079    }
    10381080  }
     1081#endif
    10391082
    10401083#if IL_SL_SIGNALLING_N0371
  • branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r494 r506  
    17531753        pcSlice->getSPS()->getVuiParameters()->setHrdParametersPresentFlag( true );
    17541754      }
     1755#if O0092_0094_DEPENDENCY_CONSTRAINT
     1756      assert( pcSlice->getSPS()->getSPSId() == 0 || pcSlice->getSPS()->getSPSId() == m_layerId || m_pcEncTop->getVPS()->getRecursiveRefLayerFlag(m_layerId, pcSlice->getSPS()->getSPSId()) );
     1757#endif
    17551758      m_pcEntropyCoder->encodeSPS(pcSlice->getSPS());
    17561759      writeRBSPTrailingBits(nalu.m_Bitstream);
     
    17661769#endif
    17671770      m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);
     1771#if O0092_0094_DEPENDENCY_CONSTRAINT
     1772      assert( pcSlice->getPPS()->getPPSId() == 0 || pcSlice->getPPS()->getPPSId() == m_layerId || m_pcEncTop->getVPS()->getRecursiveRefLayerFlag(m_layerId, pcSlice->getPPS()->getPPSId()) );
     1773#endif
    17681774      m_pcEntropyCoder->encodePPS(pcSlice->getPPS());
    17691775      writeRBSPTrailingBits(nalu.m_Bitstream);
  • branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r494 r506  
    10721072#if REPN_FORMAT_IN_VPS
    10731073  Int lowestQP;
     1074#if O0096_REP_FORMAT_INDEX
     1075  if( m_layerId == 0 )
     1076  {
     1077    lowestQP = - m_cSPS.getQpBDOffsetY();
     1078  }
     1079  else
     1080  {
     1081    lowestQP = - (m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cSPS.getUpdateRepFormatFlag() ? m_cSPS.getUpdateRepFormatIndex() : m_layerId ) )->getBitDepthVpsLuma() - 8) * 6;
     1082  }
     1083#else
    10741084  if( m_layerId == 0 || m_cSPS.getUpdateRepFormatFlag() )
    10751085  {
     
    10801090    lowestQP = - (m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_layerId ) )->getBitDepthVpsLuma() - 8) * 6;
    10811091  }
     1092#endif
    10821093#else
    10831094  Int lowestQP = - m_cSPS.getQpBDOffsetY();
     
    16071618Void TEncTop::xInitILRP()
    16081619{
     1620#if O0096_REP_FORMAT_INDEX
     1621  RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cSPS.getUpdateRepFormatFlag() ? m_cSPS.getUpdateRepFormatIndex() : m_layerId ) );
     1622#else
    16091623  RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_layerId ) );
     1624#endif
    16101625  Int bitDepthY,bitDepthC,picWidth,picHeight;
    16111626
     1627#if O0096_REP_FORMAT_INDEX
     1628  bitDepthY   = repFormat->getBitDepthVpsLuma();
     1629  bitDepthC   = repFormat->getBitDepthVpsChroma();
     1630  picWidth    = repFormat->getPicWidthVpsInLumaSamples();
     1631  picHeight   = repFormat->getPicHeightVpsInLumaSamples();
     1632#else
    16121633  if( m_cSPS.getUpdateRepFormatFlag() )
    16131634  {
     
    16241645    picHeight   = repFormat->getPicHeightVpsInLumaSamples();
    16251646  }
     1647#endif
    16261648 
    16271649  if(m_layerId > 0)
Note: See TracChangeset for help on using the changeset viewer.